Debugging Remote Applications

In most cases, the hard part about debugging remote applications is that you don't know for sure what messages are being passed between remote locations. It would be nice if you could determine that a message was received and it was the proper format or that it was sent in a format that was expected. For this level of debugging, you need a tool that is inserted into the message stream. Microsoft provides a tool called MSSoapT, or the Microsoft SOAP trace utility, that does just that. This tool is available as part of the Microsoft SOAP Toolkit. MSSoapT can be inserted into part of the message stream, and it automatically forwards the messages that it receives. For example, assume that your application connects to a remote port 8000 on a machine called foo. Under normal circumstances, you would connect to this service using a URL like this:

http://foo:8000/FooService/foo.soap

To use the SOAP trace utility, you need to configure your client to connect to a different port, perhaps 8001. While you are debugging, your client would use the following URL:

http://foo:8001/FooService/foo.soap

The SOAP trace utility would be configured to listen to port 8001 on the server machine (assuming that is where you suspect a problem and that is where you are focusing your debug efforts) so that all incoming requests to port 8001 are satisfied by the trace utility. The other part of the trace utility is where the traffic should be forwarded. If you are on the server, specify localhost and port 8000. In essence, the trace utility routes messages from port 8001 to port 8000. In addition, it logs all traffic that passes between the client and the server. You can select a formatted display that shows both the request and response SOAP messages. The other option is to select the unformatted display. With the unformatted display, you can see the HTTP headers as well as the SOAP messages; it just does not look as “pretty” as the formatted display. Figure 13.11 shows a typical formatted display for this trace utility. With this utility, it is possible to see the exact message that is being transmitted and the response, which can greatly aid in tracking down a problem with your remote application.

Figure 13.11. MSSoapT tool in action.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.30.253