A short guide that briefly explain how to trace all inbound/outbound SOAP XML messages produced with java ws library.

In this case it’s used the following implementation of java ws.

implementation group: "javax.xml.ws", name: "jaxws-api", version: "2.3.1"
implementation group: "javax.jws", name: "javax.jws-api", version: "1.1"
implementation 'com.sun.xml.ws:jaxws-ri:2.3.3'

Set into the “jvmArgs” a “true” the option “com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump”

bootRun {
	jvmArgs=["-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true"]
}
@PostConstruct
public void traceSoapPayloads(){
	System.out.println("Trace soap payloads...start");
	com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump = true;
	System.out.println("Trace soap payloads...end");
}

Now all the SOAP messages will be logged on the standard output.

Categories: JavaServer

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published.