title

fire chief's random developer tidbits

Tuesday, May 21, 2013

Logging soap contents with JAX-WS


Looking around the web, I found various system properties that were suggested for getting JAX-WS to dump the soap contents to system out.  Different ones work for different situations.  While I can't name all the situations, here are the properties all in one place.  Set the appropriate one to "true".  Sometimes the "brute force" solution of putting them all in, then trying one half or the other (binary search) might be the fastest way to figure it out without driving yourself crazy.

These can work when not using the internal/embedded JAX-WS in the JVM (for example running within Glassfish with a full Metro stack in place):
com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump
com.sun.xml.ws.transport.http.HttpAdapter.dump
com.sun.xml.ws.transport.local.LocalTransportPipe.dump

These will work when using the Internal/embedded JAX-WS (for example running a single main class within Netbeans).
com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump
com.sun.xml.internal.ws.transport.http.HttpAdapter.dump
com.sun.xml.internal.ws.transport.local.LocalTransportPipe.dump


This was the one that actually worked in my situation, running a standalone JAX-WS client within Netbeans:
com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump