VI Axis TCP Monitor (tcpmon)
Build a full web service with Axis
Axis comes with the usefull org.apache.axis.utils.tcpmon tool, also known as Axis TCP monitor. This Java application can be used as a listener that intercepts and forwards XML/SOAP requests and responses between the service provider and the service requester. It's to get an example of an Axis generated XML/SOAP messages. It can also simulate slow connections to test the impact of a slow network on a single computer, on transactionnal rollbacks for exemple.
Let's see how it works with our AxisTutorial web service. First of all you'll need to modify the AxisTutorialSOAP_address invocation address in the AxisTutorial_ServiceLocator.java class. Change port 8080 to port 9000.
Start Tomcat and deploy the web service server AxisTutorialServer and the web service client AxisTutorialClient. Then start Axis TCP monitor : right click on the ListEmployeesProvider web project in your Eclipse Package Explorer view and choose Run As > 3 Java Application. Then, select the tcpmon class.
Set the TCP monitor listen port to 9000 to catch the client's requests and the forward port to 8080 to forward it to the service provider. Click the add button.
Use the AxisTutorialclient to make a request to the service provider and watch the HTTP request emitted by the requester and the provider response.
The XML/SOAP response looks like this :