|
|||||
| |||||
| |||||
Capturing Soap Data in Delphi
Author: Deepak Shenoy (shenoy@agnisoft.com) Created
March 27, 2002.
Abstract This article shows you how you can see the SOAP data passed from and to your SOAP application (Delphi 6 Enterprise). Introduction I assume you already know how this SOAP business works, and how to write your basic SOAP server, your basic SOAP client etc. But let's say you're foxed about certain things, and you need to see the SOAP packet being passed from and to your application. I'm assuming that you're building a SOAP client in Delphi, and you're connecting to some SOAP server - which is potentially somewhere "out there". I will proceed to discuss TWO ways to get to the SOAP packets.
1) Using ProxyTrace: First, get ProxyTrace from http://www.4s4c.com/tcptrace/pt.asp. Now,
run it, on say port 8080 (which is the default). Then, simply go to Delphi and set your HTTPRio's HTTPWebNode.Proxy property to
"localhost:8080". Like this : 2) From within Delphi: "No", you say, "I want to manipulate the actual data sent and received". Well, after you apply Update Pack 2, you have an easy way to do this. Update Pack 2 is available at http://www.borland.com/delphi/webreg/d6/d6_registeredusers.html. You can use the events BeforeExecute and AfterExecute to do what you want:
Points to be noted: This should be even more clear from this source code at http://www.agnisoft.com/soap/ReqResp.zip. About the Author Deepak Shenoy is one of the founders of Agni Software, and has been working with Web Services in Delphi and Microsoft's .NET for a while now.
|