Previous Section Next Section

Monitoring

Axis comes with a tool that can be useful in monitoring the TCP/IP traffic between your SOAP client and SOAP server. The tool is called tcpmon graphics/book.gif and can be executed by running

java org.apache.axis.utils.tcpmon

or

java org.apache.axis.utils.tcpmon 81 localhost 8080

The first command will bring up the tool and take you to an Admin page that allows you to enter a port number on which tcpmon will listen, a target host, and a target port number to which the incoming request should be routed. By simply routing your SOAP client's requests through tcpmon, you will be able to see the request and response SOAP messages. The second command will let you start tcpmon by specifying the listening port number (81 in the previous example), the target host name, and the port number (localhost and 8080 in this case) on the command line—thus bypassing the Admin page. Figure 4.8 shows what tcpmon looks like.

Figure 4.8. TCPMonitor can be used to examine the request and response messages.

graphics/04fig08.gif

You'll notice that each request/response pair is given its own entry table at the top of the window, allowing you to select which specific flow to examine. Below the table is the request and response data. You can save the data to a file, ask tcpmon to try to make the XML look nice (add linefeeds and spaces), switch between a side-by-side layout and a top-bottom layout, or even ask it to resend the request data. When resending the data, you are free to modify the data in the request side of the window before resending; thus, you can make a change to test a server with new XML without having to change any client code.

    Previous Section Next Section