Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the source of request from Web Service?

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

like image 334
IAdapter Avatar asked Feb 15 '10 14:02

IAdapter


2 Answers

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
like image 107
Pascal Thivent Avatar answered Oct 12 '22 10:10

Pascal Thivent


Set the following VM property:

-Dcom.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump=true
like image 32
Tal Avatar answered Oct 12 '22 10:10

Tal