How to debug Web Services
In this tutorial we will see how you can debug your JBoss Web Services applications by using some built-in logging features or using an external TCP dumper.
Debbugging SOAP Messages is a critical activity for every application running Web Services.
The simplest way to see the full SOAP messages returned by JBoss create a new Category for the SOAP Message Class in your conf/jboss-log4j.xml. All you have to do is add the following XML fragment in your Category section:
Another alternative can be monitoring your Web Service Port using an external tool. We have tested Apache TCPMon which is a valuable tool for monitoring your network applications.
Download here the lastest stable release of it:
http://ws.apache.org/commons/tcpmon/download.cgi
Launch the main Program in build/tcpmon.cmd
Configuring the Monitor is pretty easy. For our purpose we need to intercept Web Service request before they reach the Server and as well we need to capture response before they reach the client.
In the Admin tab select a Listening port for Apache TCPMon and a target port which corresponds to JBoss AS listening port. For example:
Now modify your Web Services client so that they point to the Apache TCPMon Port instead of JBoss. For example:
Download here the lastest stable release of it:
http://ws.apache.org/commons/tcpmon/download.cgi
Launch the main Program in build/tcpmon.cmd
Configuring the Monitor is pretty easy. For our purpose we need to intercept Web Service request before they reach the Server and as well we need to capture response before they reach the client.
In the Admin tab select a Listening port for Apache TCPMon and a target port which corresponds to JBoss AS listening port. For example:
Now modify your Web Services client so that they point to the Apache TCPMon Port instead of JBoss. For example:
In the meantime, you will find the outcomign and incoming SOAP Messages in the TCPMon Console:


TCPMon is a simple and easy to use tool that has many benefits when developing message driven applications. It is particularly useful in developing Web services.
For additional information about it, check:
http://ws.apache.org/commons/tcpmon/tcpmontutorial.html
For additional information about it, check:
http://ws.apache.org/commons/tcpmon/tcpmontutorial.html

