The AMSeT Project Blog

Tuesday Jul 14, 2009

wsmonitor

When developing Web services and workflows, a tool to monitor outgoing and incoming messages is pretty much essential.

There are a few candidates here: SOAPMonitor, soapUI, TCPMon, tcpmon. I have used wsmonitor (Web Services Monitor) most of the time and find it is easy to use and works well.

It uses port-forwarding and intercepts all HTTP traffic in and out of a port specified in a config.xml file. Outgoing messages are then re-routed to the ultimate Web service endpoint.

An example config.xml file is given below:

<monitor xmlns="http://java.sun.com/xml/ns/jax-ws/ri/config/monitor"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="config.xsd">
<connection
name="5050 --> my.webservicehost.ac.uk:8080"
description="5050->8080"
listenPort="5050"
targetHost="my.webservicehost.ac.uk"
targetPort="8080"/>
</monitor>

In order for this to work the host in the service endpoint URL in the WSDL file must be changed to http://localhost:5050/myservice from http://my.webservicehost.ac.uk:8080/myservice.

Unzipping the distribution file provides an executable in the bin directory. Placing the config.xml file in the bin and executing

>wsmonitor config.xml

from the command line, wsmonitor would then look the following:

wsmonitor

Connections to multiple servers can be created simultaneously, each with a different listen port.

Calendar

Search

Navigation