views:

40

answers:

1

I have web service written that generates some data...can I call the web service in a way that i can store the xml soap representation of data...instead of actually calling the method that returns the actual data..i want to store the xml representation in a string ...

+1  A: 

In WCF, you could just simply enable tracing and let the WCF runtime handle all the messy logging and tracing, and then just simply view the messages in the Service Trace Viewer Tool and more info and screenshots here.

Simple, easy - a few config entries and you're done.

If you insist on staying on the "legacy" ASMX technology, check out this SO post:

http://stackoverflow.com/questions/2624621/capturing-soap-requests-to-an-asp-net-asmx-web-service

or have a look at this CodeProject article: Trace SOAP Request/Response XML with TraceExtension

marc_s