I try to stay away from overly geeky subjects on this blog (no, really...) but sometimes true perfection has to be recognised.
As I do more and more design and development of solutions using web services (SOAP/HTTP, in particular), I find myself wanting to see exactly what is flowing over the wire. (That's code for: getting interoperability to work isn't always trivial....)
The number of times I've been saved by a groovy little tool called TCPMon is large. What's more, almost nobody knows about this tool.... until I tell them.... and then they can't get enough.
So, what is it? It's nothing more than a little app that listens for TCP requests on one port, dumps what it gets, forwards the data (unchanged) to a TCP port at another (or the same) machine and then dumps what comes back, before returning it to the original client... i.e. it's a proxy that dumps the traffic.
So, if you've ever wanted to see the SOAP-ENV or the fault or whatever as it flies over the network, now you can... and you've been able to for ages (since at least WAS 5 - and probably longer since I think there's also an apache version).
If you're running any WebSphere Application Server based product, grab a command prompt and navigate to the lib directory
java -classpath webservices.jar com.ibm.ws.webservices.engine.utils.tcpmon
Tell it which port to listen on (that is where you will subsequently point your client) and which hostname and port to forward the requests to (i.e. the "real" server) and off you go. Fab!
Note: the "ws" in the package name makes me suspect this isn't actually a supported part of the product so don't blame me if it doesn't work for you and don't even *think* of pretending that my mentioning it gives you the right to raise a PMR :-)