Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tracing XML request/responses with JAX-WS when error occurs

Tags:

java

jax-ws

I want to log raw soap post requests if there are any errors , I am using JAX-WS. Any help will be appreciated.

Is there an easy way (aka: not using a proxy) to get access to the raw request/response XML for a webservice published with JAX-WS reference implementation (the one included in JDK 1.5 and better) only when exception occurs in response? I want to log raw SOAP reuest so that I can test it thorugh any webservice client at a later stage

like image 876
user665837 Avatar asked Mar 18 '11 10:03

user665837


People also ask

How do you trace a SOAP request and response?

In SOAP web service, each HTTP request or response encapsulates a SOAP envelope, these messages are easy to trace by using Eclipse IDE, build-in “TCP/IP monitor” tool. The idea is host another server in between the client and server to perform port forward function to intercept the HTTP traffic.

How do I test a JAX-WS web service?

A JAX-WS web service can be tested by using the Web Service Tester View displayed in Figure 7.1, “Web Service Test View”. The JAX-WS test is specified by: Selecting the JAX-WS combobox option. Entering the location of the WDSL file.

What is JAX-WS how it is useful for describing SOAP web services?

JAX-WS is a technology for building web services and clients that communicate using XML. JAX-WS allows developers to write message-oriented as well as RPC-oriented web services. In JAX-WS, a web service operation invocation is represented by an XML-based protocol such as SOAP.


1 Answers

Use

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

and

com.sun.xml.internal.ws.transport.http.HttpAdapter.dump=true

instead (note the "internal" in the package name), this did the trick for me.

Cheers, Torsten

like image 155
Torsten Avatar answered Oct 09 '22 05:10

Torsten