Java 1.7中的JAX-WS HTTP日志记录 [英] JAX-WS HTTP logging in Java 1.7
问题描述
我使用JAX-WS作为客户端。我曾经使用以下系统属性来记录所有HTTP请求和&调试回复:
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
但是,由于升级到Java 1.7并使用内置的JAX-WS(而不是外部库),因此该功能具有停止工作。
However, since upgrading to Java 1.7 and using the built-in JAX-WS (instead of the external libraries) this functionality has stopped working.
我已经做了很多搜索,以找到1.7中的等效物但是没有运气。有人知道如何记录输出吗?
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?
感谢您的帮助
推荐答案
尝试 com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump = true
编辑:
好的,试试 com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump = true
或在您的申请中:
HttpTransportPipe.dump = true;
来自HttpTransportPipe.java:
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;
}
这篇关于Java 1.7中的JAX-WS HTTP日志记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!