Groups | Blog | Home
all groups > asp.net webservices > december 2004 >

asp.net webservices : Capture SOAP envelope


PokerJoker
12/29/2004 10:35:05 AM
I'm calling a web service provided to me by one of my company's vendors. I
used visual studio to automatically generate the SOAP request but I am trying
to figure out a way to trap the soap envelope before it is sent.

Dilip Krishnan
12/29/2004 11:09:54 AM
Hello PokerJoker,
You should be able to use the trace utility in the Microsoft Soap Toolkit,
if you just want to see the messages sent by the client

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com

[quoted text, click to view]

PokerJoker
12/29/2004 11:17:03 AM
Thanks Chris, but I dont need it in code at all.

The webservice at our vendor is returning errors, which in my opinion are
entirely unrelated to the envelope. They have asked me to trap the request
and email it to them to assist with debugging.

[quoted text, click to view]
PokerJoker
12/29/2004 11:35:05 AM
Thanks again to everybody who is assisting...

The trace utility as far as i can tell is designed to reside on the "host"
of the webservice...

Is there a way to configure the utility to grab the request "before it
leaves"?

[quoted text, click to view]
PokerJoker
12/29/2004 11:49:01 AM
Nevermind... I changed the wsdl to send the request to localhost... then i
forwarded it using the trace utility to its final destination (our vendor).

Great little utility, thanks for the help guys!

[quoted text, click to view]
Christoph Schittko [MVP]
12/29/2004 12:57:47 PM

Are you looking at trapping them to execute code before the message is
sent? Then you should look at building your own SoapExtension [0].

Depending on what you want to do, you'll need to plug in your code at
the BeforeSerialize or AfterSerialize stages.

HTH,
Christoph Schittko
MVP XML
http://weblogs.asp.net/cschittko


[0]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/h
tml/frlrfsystemwebservicesprotocolssoapextensionclasstopic.asp
[quoted text, click to view]
Christoph Schittko [MVP]
12/29/2004 1:23:24 PM
Then the trace tool MSSoapT shipped with the Soap Toolkit [0] that Dilip
mentioned or tcpTrace [1] should do just fine.

HTH,
Christoph Schittko
MVP XML
http://weblogs.asp.net/cschittko

[0]
http://www.microsoft.com/downloads/details.aspx?FamilyId=C943C0DD-CEEC-4
088-9753-86F052EC8450&displaylang=en
[1] http://www.pocketsoap.com


[quoted text, click to view]
Christoph Schittko [MVP]
12/29/2004 1:50:17 PM
The trace tools can run on any server, but you have to point your proxy
to the location/port where the tool is listening.

You should configure your proxy to dynamically pull the web service
location from the application's config file. Right click on the web
service node under Web References in the solution explorer and set the
URL Behavior to dynamic. Now rebuild your service consumer and you'll be
able to quickly configure the URL for the web service proxy to invoke.

HTH,
Christoph Schittko
MVP XML
http://weblogs.asp.net/cschittko

[quoted text, click to view]
Christoph Schittko [MVP]
12/29/2004 1:50:49 PM
The trace tools can run on any server, but you have to point your proxy
to the location/port where the tool is listening.

You should configure your proxy to dynamically pull the web service
location from the application's config file. Right click on the web
service node under Web References in the solution explorer and set the
URL Behavior to dynamic. Now rebuild your service consumer and you'll be
able to quickly configure the URL for the web service proxy to invoke.

HTH,
Christoph Schittko
MVP XML
http://weblogs.asp.net/cschittko


[quoted text, click to view]
Mujtaba Syed
12/29/2004 2:22:58 PM
Try Simon Fells' tcpTrace utility:

http://www.pocketsoap.com/tcptrace/

Mujtaba.

[quoted text, click to view]

AddThis Social Bookmark Button