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 ...
Asked
Active
Viewed 2,071 times
0
-
Do you mean you want to get the actual soap http response - the whole thing - and store it in a string? Or you want to call a method on your webservice that returns a string that happens to be xml? – Jubal Jul 14 '10 at 01:49
-
What kind of service do you mean? And what's your platform? Java, C#, what? – John Saunders Jul 14 '10 at 01:58
-
I want to get the actual soap http response - the whole thing - and store it in a string...in asp.net C# – Vishal Jul 14 '10 at 02:22
-
What kind of service? ASMX? WCF? That really matters. – John Saunders Jul 14 '10 at 03:36
-
Ya it is actually asmx service..sorry – Vishal Jul 14 '10 at 14:38
1 Answers
1
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