[ACCEPTED]-.NET Log Soap Request on Client-.net-2.0
I wrote a post about this a while ago titled 5 "Logging SOAP Messages in .NET".
The easiest way is to use the tools already provided with .NET.
1. Extend 4 the class SoapExtension
.
2. override the method ProcessMessage
to get 3 a full output of your Soap Request, then 2 output this information to a text file or 1 event log.
public class SoapMessageLogger : SoapExtension
{
//…
public override void ProcessMessage(SoapMessage message)
{
switch(message.Stage)
{
case SoapMessageStage.BeforeDeserialize:
LogResponse(message);
break;
case SoapMessageStage.AfterSerialize:
LogResponse(message);
break;
// Do nothing on other states
case SoapMessageStage.AfterDeserialize:
case SoapMessageStage.BeforeSerialize:
default:
break;
}
}
//…
}
If it's for debugging purposes I'd just 4 configure the web request to use a proxy 3 and send the entire request though fiddler 2 (http://www.fiddlertool.com) then you can see exactly what's getting 1 transmitted over the wire.
There are many options you can use. There 12 are certainly some commercial tools for 11 this (like SOAPScope), but if you're just 10 looking to capture the raw contents of the 9 requests/responses there are several tools 8 out there besides Fiddler (that Walden mentioned 7 already).
Personally, I've been a long time 6 user of Simon Fell's TcpTrace and YATT.
If you're interested 5 in actually instrumenting the code so that 4 it can do it on its own (say, by logging 3 everything to a file or something), then 2 you might want to look into implementing 1 a SoapExtension on your server.
You can use a SoapExtension to log the Soap 1 calls.
I've used the Web Service, SOA and SOAP Testing Tool - soapUI with good success in the past.
-Edoode
0
Maybe wireshark ? I'm always using it for capturing 1 traffic of my applications.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.