Getting RAW Soap Data from a Web Reference Client running in


I'm trying to trouble shoot a web service client in my current project. I'm not sure of the platform of the Service Server (Most likely LAMP). I believe there is a fault on their side of the fence as i have eliminated the potential issues with my client. The client is a standard ASMX type web reference proxy auto generated from the service WSDL.

What I need to get to is the RAW SOAP Messages (Request and Responses)

What is the best way to go about this?

Best Solution

I made following changes in web.config to get the SOAP (Request/Response) Envelope. This will output all of the raw SOAP information to the file trace.log.

  <trace autoflush="true"/>
    <source name="System.Net" maxdatasize="1024">
        <add name="TraceFile"/>
    <source name="System.Net.Sockets" maxdatasize="1024">
        <add name="TraceFile"/>
    <add name="TraceFile" type="System.Diagnostics.TextWriterTraceListener"
    <add name="System.Net" value="Verbose"/>
    <add name="System.Net.Sockets" value="Verbose"/>
Related Question