Vishal
Vishal

Reputation: 12369

How to get the Soap XML from a web service and store it in a string?

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 ...

Upvotes: 0

Views: 2100

Answers (1)

marc_s
marc_s

Reputation: 754478

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:

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

Upvotes: 1

Related Questions