JAX-WS HTTP logging in Java 1.7

纵然是瞬间 提交于 2019-12-21 09:55:12

问题


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


回答1:


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;
    }


来源:https://stackoverflow.com/questions/18354201/jax-ws-http-logging-in-java-1-7

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!