tags:

views:

730

answers:

7

I have a project where I have created web service proxy classes with wsdl.exe and then simply create an instance of that class (inherits System.Web.Services.Protocols.SoapHttpClientProtocol) and call the method that should send a SOAP message. I'm using Visual Studio 2008 if that matters. And I'm trying this in my development machine without access to actual web service that is located inside of customer's intranet. So, the sending will of course not succeed and I will not get any response back but all I would like to see is the exact content of SOAP messages this solution creates and tries to send. How do I see that?

+4  A: 

Use fiddler.

Otávio Décio
Thank you, spdenne.
Otávio Décio
My edit was messier than I intended... I meant to leave it saying "fiddler"
Stephen Denne
Now it does :) Thanks!
Otávio Décio
+1  A: 

If you're Web service is accessed by clear text, non-SSL HTTP, you can just use a sniffer, like Wireshark, to see the data coming from and to your application. Wireshark can trace, filter and analyze wire data. I have used it do debug HTTP and other protocols many times, and it's a great tool to do this.

Maciej Pasternacki
A: 

Link SOAPExtensionAttribute

CheGueVerra
+2  A: 

Have a look at SOAPUI from eviware.com.

Its a free for personal use Java app. Among other things you can set it up to run as a dummy test server. Just load up hte WSDL and enter the dummy data.

In test server mode it will log your requests so you can see whats happening inside the request message.

James Anderson
A: 

SOAP messages are simply XML data sent using the HTTP POST method. So you can for example install a local web server on your development machine, configure your web service to use some dummy URI on this server, and grab the network traffic with WireShark (AKA ethereal). The big advantage of this method is that it involves no coding.

Alternatively you can use an HTTP echo server that dumps its incoming traffic, like this one (found while googling "http echo server"):

fbonnet
A: 

You can intercept the call with tcpMon

John Channing
A: 

Use Membrane Monitor. It is a SOAP intermediary that can store and display messages.

baranco