JAX-WS HTTP logging in Java 1.7
Asked Answered
S

1

9

I am using JAX-WS as a client. I used to use the following system property to log all HTTP requests & responses for debugging:

com.sun.xml.ws.transport.local.HTTPTransportPipe.dump=true

However, since upgrading to Java 1.7 and using the built-in JAX-WS (instead of the external libraries) this functionality has stopped working.

I have done a lot of searching to find what the equivalent properly is in 1.7 but have had no luck. Does anybody know how to log the output?

Thanks for any help

Spires answered 21/8, 2013 at 9:50 Comment(0)
B
8

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

EDIT:

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

Or in your application:

HttpTransportPipe.dump = true;

From HttpTransportPipe.java:

   public static boolean dump;

    static {
        boolean b;
        try {
            b = Boolean.getBoolean(HttpTransportPipe.class.getName()+".dump");
        } catch( Throwable t ) {
            b = false;
        }
        dump = b;
    }
Birdseed answered 21/8, 2013 at 13:6 Comment(4)
Hmm...Which version of Java 7 do you have?Birdseed
This one worked! com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump...Thank you very much! (where did you find the information by the way?) Version: jdk1.7.0_25Spires
In the source itself. I'll add the relevant bit to the answer.Birdseed
Yes, the name of the property will depend on if you use the standalone JAX-WS RI or the one that is now bundled in the JDK (since v6).Denominationalism

© 2022 - 2024 — McMap. All rights reserved.