I have a C# application that is a client to a web service. One of my requirements is to allow capturing the SOAP that I send, so that if there is a problem, I can either fix the bug, or demonstrate that the problem is in the service I am calling.
My WebReference proxy service class derives from System.Web.Services.Protocols.SoapHttpClientProtocol
as usual. If I had a magic wand, I would make this base class implement an event OnPost
that I could handle to write the SOAP into my logs and continue.
Short of running a packet sniffer like WireShark, is there an easy way to get this level of logging?
<< is the left shift operator. It is shifting the number 1 to the left 0 bits, which is equivalent to the number 1 .
In C programming language, %d and %i are format specifiers as where %d specifies the type of variable as decimal and %i specifies the type as integer. In usage terms, there is no difference in printf() function output while printing a number using %d or %i but using scanf the difference occurs.
I think what you are looking for is addressed in this question:
Getting RAW Soap Data from a Web Reference Client running in ASP.net
It looks like a lot of code though.
If the application is running on your local box and the web service isn't doing anything funky, you can use Fiddler. Fire Up IE, run Fiddler, and you'll see your web service calls go through fiddler's proxy too.
I just used this this morning to do almost the same thing. I had to prove the data my web service was sending wasn't messed up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With