How to monitor SOAP Messages using TCP/IP Monitor in Eclipse
- Details
- Written by Nam Ha Minh
- Last Updated on 21 December 2019   |   Print Email
Background of the TCP/IP Monitor
Behind the scenes, the TCP/IP Monitor intercepts requests sent from the client at a specific port, and forwards them to the destination server at another port. So the monitor is able to capture the request and response in the middle (this technique is also called port forwarding). That means we need to change the server port at the client to the one at which the monitor is listening. The following diagram depicts the principles of the monitor:Setting Up a new TCP/IP Monitor in Eclipse
Assume that we already developed an application as described in the tutorial: Java Web Services Binary Data Transfer Example (base64 encoding), and the web service server is listening on the port number 9898. Now, we need to change the server port in the client code. Open the generated file FileTransfererImplService.java, and then replace all the port numbers 9898 to 8787. So the related URL looks like this:http://localhost:8787/codejava/fileService?wsdl
Click Window > Preferences from Eclipse’s main menu, then select Run/Debug > TCP/IP Monitor on the left side in the Preferences dialog:Click the Add button on the right, the New Monitor dialog appears. Enter the information as follows:- Local monitoring port: 8787
- Host name: localhost
- Port: 9898
- Type: TCP/IP
Other Java Web Services Tutorial:
- Java Client Server Web Services (JAX-WS) Tutorial
- Java Web Services Tutorial using Apache Axis2, Ant and Tomcat
- Java Web Services Binary Data Transfer Example (base64 encoding)
- Using MTOM to optimize binary data transfer with JAX-WS web services
- Java RESTful Web Services Tutorial for Beginner with Jersey and Tomcat
- How to code and deploy Java XML Web Services (JAX-WS) on Tomcat
- Java CRUD RESTful Web Services Examples with Jersey and Tomcat
Comments