Home > Java > javaTutorial > body text

How to Trace JAX-WS XML Request/Response Data Without Proxies?

DDD
Release: 2024-10-29 01:57:30
Original
188 people have browsed it

How to Trace JAX-WS XML Request/Response Data Without Proxies?

Tracing XML Request/Response with JAX-WS

This question seeks a method to access raw XML request/response data for JAX-WS webservices without using proxies. The user emphasizes the need for simplicity and wishes to avoid the overhead of frameworks like Axis or CXF.

Solution:

To enable logging of XML communication to the console, configure the following system properties:

System.setProperty("com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.ws.transport.http.HttpAdapter.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.HttpAdapter.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.HttpAdapter.dumpTreshold", "999999");
Copy after login

This enables exhaustive logging of all communication, including XML requests and responses. By setting the dumpTreshold property to 999999, it ensures logging of all content regardless of size.

Alternatively, this logging can be enabled as command line parameters using -D or as environment variables, as suggested by Upendra.

By utilizing this logging mechanism, you can access and trace the raw XML request/response data for webservices published with JAX-WS without the need for complex frameworks or proxies.

The above is the detailed content of How to Trace JAX-WS XML Request/Response Data Without Proxies?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template