13
votes

I want to get

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:prin="http://localhost/example">
   <soapenv:Header/>
   <soapenv:Body>
THIS
   </soapenv:Body>
</soapenv:Envelope>

from webservice request I send from Java.

I use javax.jws

2

2 Answers

9
votes

This can be done programmatically (invasive) or by configuration without changing any code. This page documents how to configure JAX-WS RI:

To dump SOAP messages on the client side, use the following system property:

-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true

To dump SOAP messages on the server side, use the following system property:

-Dcom.sun.xml.ws.transport.http.HttpAdapter.dump=true
8
votes

Set the following VM property:

-Dcom.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump=true