[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Cannot see SOAP body in message trace in WCF

Posted on 2011-10-13
Medium Priority
Last Modified: 2012-05-12
I have a simple "hello world" WCF service that uses basichttpbinding. The service takes a string input parameter and returns s string value. I enabled tracing on the service using the ECF configuration.
My client config file is:
            <source name="System.ServiceModel.MessageLogging" switchValue="Verbose,ActivityTracing">
                    <add type="System.Diagnostics.DefaultTraceListener" name="Default">
                        <filter type="" />
                    <add name="ServiceModelMessageLoggingListener">
                        <filter type="" />
            <add initializeData="c:\gradschool\cis525\wcf\wcfdemo1\creditcardclient\app_messages.svclog"
                type="System.Diagnostics.XmlWriterTraceListener, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089"
                name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp">
                <filter type="" />
      <messageLogging logMalformedMessages="true" logMessagesAtServiceLevel="true"
        logMessagesAtTransportLevel="true" />

My service app config file is:
      <add initializeData="c:\gradschool\cis525\wcf\wcfdemo1\creditcardvalidationservice\app_tracelog.svclog"
        type="System.Diagnostics.XmlWriterTraceListener, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089"
        name="ServiceModelTraceListener" traceOutputOptions="Timestamp">
        <filter type="" />
    <compilation debug="true" />
  <!-- When deploying the service library project, the content of the config file must be added to the host's
  app.config file. System.Configuration does not support config files for libraries. -->
      <messageLogging logMalformedMessages="false" logMessagesAtServiceLevel="false"
        logMessagesAtTransportLevel="false" />
The log files are generated by I do not see anything in the soap envolope.
It looks like:
<HttpRequest xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace">
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://tempuri.org/ICreditcardValidationService/ValidateCreditCard</Action>

The parameter values are passed and processed correctly by the service.

I am not sure what I am doing wrong. How do I get the passed parameters to show in the soap body?

I am using VS 2010 and .Net 4.0 framework.

Please help.
Question by:shekhar_shashi
1 Comment

Accepted Solution

shekhar_shashi earned 0 total points
ID: 36965245
This was a configuration setting problem. I set the logEntireMessage = true and the entire message (SOAP header and body) started logging.

      <messageLogging logEntireMessage="true" logMalformedMessages="true"
        logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" />

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While working on Silverlight and WCF application, I faced one issue where fault exception occurred at WCF operation contract is not getting propagated to Silverlight client. So after searching net I came to know that it was behavior by default for s…
Here I am going to explain creating proxies at runtime for WCF Service. So basically we use to generate proxies using Add Service Reference and then giving the Url of the WCF service then generate proxy files at client side. Ok, what if something ge…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month19 days, 13 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question