SOAP 请求日志记录 Tomcat 7 Axis2
我们正在尝试记录向 Tomcat 服务器发出的所有 http 请求,特别是 SOAP 请求。
我们的服务器设置如下: 雄猫7.0.11 轴2 Gentoo Linux
到目前为止,我们已经使用了 RequestDumperFilter 类,但这仅向我们显示标头信息。
我们需要的是能够查看包含 SOAP 请求 XML 的请求正文。
We are trying to log all http requests made to our Tomcat server, in particular SOAP requests.
Our server setup is as follows:
Tomcat 7.0.11
Axis 2
Gentoo Linux
So far we have used the RequestDumperFilter class however this only shows us the header information.
What we require is the ability to view the request body containing the SOAP request XML.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想您可以使用一些 请求处理组件 但我不确定是否有一种简单的方法可以在 Tomcat 中查看请求正文。
据我所知, ExtendedAccessLogValve 提供了有关请求的最多信息,但即使如此也缺少正文。
最简单的解决方案是将日志记录从 Tomcat 移走并使用代理服务器。您将代理放置在服务器与其客户端之间,并在代理中进行日志记录。
代理接收请求,记录它,然后转发到 Tomcat,后者生成响应,将其发送到代理,记录它,然后将其发送到客户端。我使用的最简单的代理(并且做得很好)是 Apache TCP Monitor。
此外,您可以查看类似 Fiddler 的内容,看看是否有帮助。
I guess you could make use of some request processing components but I'm not sure if there is an easy way to view the request body in Tomcat.
From what I know, the ExtendedAccessLogValve provides the most information about the request but even this is missing the body.
The most simple solution would be to move the logging away from Tomcat and use a proxy server. You place the proxy between the server and it's clients and do the logging in the proxy.
Proxy receives request, logs it, then forwards to Tomcat which generates response, sends it to the proxy which logs it and then sends it to client. The simplest proxy I used (and did its job pretty well) was the Apache TCP Monitor.
Additionally you could look at something like Fiddler and see if that helps.