Pepito Fernandez
Pepito Fernandez

Reputation: 2440

.Net Windows Form Client. Capturing Request/Response SOAP from ASMX webservice

before i decided to post this question i went thru several articles and questions in here... none of those seem to be a solution for me.... or i am doing something wrong.

I went thru this article, suggested in this site http://www.codeproject.com/Articles/38986/Trace-SOAP-Request-Response-XML-with-TraceExtensio?msg=4152902#xx4152902xx

that's not working. Not even the source code i downloaded.

then i found this other article...

http://blog.encoresystems.net/articles/how-to-capture-soap-envelopes-when-consuming-a-web-service.aspx

This is simple. I have a client (winform)... interacts with a webservice i have no control over, and i need to be able to capture the soap request and response. i followed like 5 tutorials so far, soapextensions, soapattributes, etc, etc... nothing seems to work for me. i have modified app.config, done everything by the book... nothing.

Question... Does anyone have a WORKING example of this? the two examples i found don't work :)

I am using Visual Studio 2010.

Upvotes: 0

Views: 3796

Answers (3)

Lex Li
Lex Li

Reputation: 63203

SOAP extensions need to be registered on the service side (that's why all posts asking you to do configuration inside web.config).

If you want to print out the SOAP messages inside your WinForms client, you will have to call web service in the "raw" way,

http://mikehadlow.blogspot.com/2006/05/making-raw-web-service-calls-with.html

@James demonstrates System.NET tracing, which is another way to see the SOAP messages in an external log file, but that's only useful for troubleshooting, as you won't receive the tracing data inside your client.

Upvotes: 0

John Saunders
John Saunders

Reputation: 161783

Simply use a "Service Reference" instead of a "Web Reference" then see WCF Tracing.

Upvotes: 1

JamieSee
JamieSee

Reputation: 13020

Have you tried using tracing in the config file as described in the MSDN articles How to: Configure Network Tracing and Configuring Tracing?

Upvotes: 2

Related Questions