启用地铁/地铁日志记录
我需要启用在 Web 服务调用/请求期间捕获的原始数据的日志记录(使用 Metro WS 2.0)。
我尝试启用以下两个属性,但它们根本没有给日志记录任何结果:
System.setProperty("com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.ws.assembler.jaxws.TransportTubeFactory", "true");
以下给出了想要的效果,但每个条目都记录了 8 次:
System.setProperty("com.sun.metro.soap.dump", "true");
每个条目都重复了 8 次,日志变得非常混乱并且非常耗时跟随。如何在不以重复方式转储所有内容的情况下实现对 Web 服务调用/请求的跟踪?
I need to enable logging of the raw data captured during webservice calls/requests (using Metro WS 2.0).
I have tried to enable the two following properties, but they give no result at all to the logging:
System.setProperty("com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.ws.assembler.jaxws.TransportTubeFactory", "true");
The following gives the wanted effect but with every entry logged 8 times:
System.setProperty("com.sun.metro.soap.dump", "true");
With every entry duplicated 8 times the log gets very cluttered and very timeconsuming to follow. How can I achieve tracing of the webservice calls/requests without having everything dumped in a duplicated manner?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了类似的问题,通过以下方式解决:
Metro :打印/转储 SOAP 数据包的内容。
本质上,它使用“MessageDumpingFeature”。您可以在 webservices-rt.jar 文件的 Glassfish \lib 目录中找到它。
I had a similar problem which I resolved by:
Metro : Printing / dumping out the contents of a SOAP packet.
Essentially, it uses the "MessageDumpingFeature". You find this in the Glassfish \lib directory in the webservices-rt.jar file.