Groups | Blog | Home
all groups > dotnet web services > february 2006 >

dotnet web services : Logging SOAP transactions?


Chris Ashley
2/8/2006 7:21:55 AM
Hi there,

I was just wondering if there was an easy (IE: Built into .NET) way of
automatically logging all the full SOAP messages that go through a web
service?

Thanks,

Chris
DBC User
2/8/2006 8:31:21 AM
I am also interested to know the same.
NuTcAsE
2/8/2006 11:35:03 AM
You can do this by creating a SoapExtention. Check this article out:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconAlteringSOAPMessageUsingSOAPExtensions.asp.
The article contains an example code to create a trace extention for
web services..

Hope this helps...
NuTcAsE
Udo Nesshoever
2/8/2006 7:24:32 PM
On 8 Feb 2006 07:21:55 -0800, "Chris Ashley"
[quoted text, click to view]

Use TcpTrace (http://www.pocketsoap.com/tcptrace/) and put it between
your application and the host. You'll find some documentation at the
website.

HTH

Cheers,
Udo Nesshoever
2/9/2006 12:58:40 AM
[quoted text, click to view]

Might work, too, but AFAIR Chris wanted an easy (in this case, I
guess, quick as well) way to accomplish this. ;)
With TcpTrace you don't really have to alter your source code. Just
change the port in the .config. That should do the trick - at least it
did it for me.

Cheers,
Chris Ashley
2/9/2006 1:22:05 AM

[quoted text, click to view]

Hi Udo,

Thanks for that. This looks like just what I need. I must confess to
being a little confused as to what I need to do in order to get this
working. What change should I make to the .config file in order to get
this working?

Thanks in advance,

Chris
Udo Nesshoever
2/10/2006 12:57:28 PM
On 9 Feb 2006 01:22:05 -0800, "Chris Ashley"
[quoted text, click to view]

Let's assume your client communicates with the server over port 80.
Now configure TcpTrace so it listens to port 8080 and set the
destination address to your server's name and the destination port to
80. Now change your client's address to communicate with to localhost
and the port to 8080.

original:
client sends to [server:80] ---> server listens @ port 80

now:
client sends to [localhost:8080] ---> TcpTrace listens @ port 8080
and
TrcTrace send to [server:80] ---> server (still) listens @ port 80

HTH

Cheers,
AddThis Social Bookmark Button