发生错误时使用JAX-WS跟踪XML请求/响应 [英] Tracing XML request/responses with JAX-WS when error occurs

查看:91
本文介绍了发生错误时使用JAX-WS跟踪XML请求/响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想记录原始soap post请求,如果有任何错误,我正在使用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.

是否有一种简单的方法(又名:不使用代理)来访问使用JAX发布的Web服务的原始请求/响应XML -WS参考实现(包含在JDK 1.5和更好的版本中)仅在响应中发生异常时?我想记录原始的SOAP reuest,以便我可以在以后的任何webservice客户端测试它

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

推荐答案

使用

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

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

(请注意包名中的内部),这对我来说很有用。

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

干杯,
Torsten

Cheers, Torsten

这篇关于发生错误时使用JAX-WS跟踪XML请求/响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆