asp.netsoapproxyasmxweb-reference

Getting RAW Soap Data from a Web Reference Client running in ASP.net


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?


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.

    <system.diagnostics>
      <trace autoflush="true"/>
      <sources>
        <source name="System.Net" maxdatasize="1024">
          <listeners>
            <add name="TraceFile"/>
          </listeners>
        </source>
        <source name="System.Net.Sockets" maxdatasize="1024">
          <listeners>
            <add name="TraceFile"/>
          </listeners>
        </source>
      </sources>
      <sharedListeners>
        <add name="TraceFile" type="System.Diagnostics.TextWriterTraceListener"
          initializeData="trace.log"/>
      </sharedListeners>
      <switches>
        <add name="System.Net" value="Verbose"/>
        <add name="System.Net.Sockets" value="Verbose"/>
      </switches>
    </system.diagnostics>