View a raw XML request

I am very new to WCF and SOAP exchanges, but I managed to build a pretty good client that I use to download news from a media organization. I created proxy classes that are obviously very abstracted out and mean that I basically just create objects by calling methods and iterating through the results.

My problem is that I have the original XML examples of what the web service calls should look like, and I want them to “compare” them with the calls I make. Basically, I need to make sure that the calls I make are consistent with the sample XML files for testing purposes.

Does what I ask make sense, or am I wrong about this? Please let me know if there is any necessary information that I missed, I could attack the paragraphs, but I don’t know what information is relevant.

+5
source share
5 answers

Do you use the Trace Tracking Services tool from Microsoft? This MSDN page will give you detailed information on how to use it.

+2
source

You can use WCF tracing to log raw XML messages. The following .configincludes WCF tracing with logging of raw messages:

<configuration>
  <system.serviceModel>
    <diagnostics>
      <messageLogging maxMessagesToLog="30000"
              logEntireMessage="true"
              logMessagesAtServiceLevel="true"
              logMalformedMessages="true"
              logMessagesAtTransportLevel="true">
      </messageLogging>
    </diagnostics>
  </system.serviceModel>
  <system.diagnostics>
    <sources>
      <source name="System.IdentityModel" switchValue="Verbose" logKnownPii="true">
        <listeners>
          <add name="xml" />
        </listeners>
      </source>
      <!-- Log all messages in the 'Messages' tab of SvcTraceViewer. -->
      <source name="System.ServiceModel.MessageLogging">
        <listeners>
          <add name="xml" />
        </listeners>
      </source>
      <!-- ActivityTracing and propogateActivity are used to flesh out the 'Activities' tab in
           SvcTraceViewer to aid debugging. -->
      <source name="System.ServiceModel" switchValue="Error, ActivityTracing" propagateActivity="true">
        <listeners>
          <add name="xml" />
        </listeners>
      </source>
      <!-- This records Microsoft.IdentityModel generated traces, including exceptions thrown
           from the framework. -->
      <source name="Microsoft.IdentityModel" switchValue="Warning">
        <listeners>
          <add name="xml" />
        </listeners>
      </source>
    </sources>
    <sharedListeners>
      <add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="trace.e2e" />
    </sharedListeners>
    <trace autoflush="true" />
  </system.diagnostics>
</configuration>

WCF MSDN: .

.svclog.

, , initializeData, .

+10

fiddler - - .

, , ( ), - - .

+2

WCF, - , - . , , . -, .

0

All Articles