13

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

0

2 Answers 2

9

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
Sign up to request clarification or add additional context in comments.

Comments

8

Set the following VM property:

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

2 Comments

If you are using JAX-WS libraries baked into JDK 1.6 this will work. If you are using the JAX-RT jars with an earlier JDK you will need to use -Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true The package names seemed to have changed when the library got baked into the JDK.
and you need to add jaxws-rt.jar to your project's classpath as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.