简体   繁体   English

在JAX-WS中获取SOAP请求

[英]Get SOAP request in JAX-WS

I have a simple JAX-WS client and server. 我有一个简单的JAX-WS客户端和服务器。

I want to get the SOAP request sent by client in server side. 我想获取服务器端客户端发送的SOAP请求。

Is it possible? 可能吗? If so, how? 如果是这样,怎么办?

Thanks in advance. 提前致谢。

如果您是想在xml中查看实际的肥皂消息,则可以使用apache工具tcpMon

It's possible to set java property either on server side or on client side as specified in documentation . 这是可能的,如指定了在服务器端或客户端设置Java属性文件 Although handler could be an option if you'd need to do something more than just dump SOAP messages. 尽管如果您需要做的不仅仅是转储SOAP消息,还可以选择处理程序 Depending on your environment tcpdump might be most simple solution - no need to restart server, download software etc. actually I prefer it when there's need for such measures. 根据您的环境,tcpdump可能是最简单的解决方案-无需重新启动服务器,下载软件等。实际上,在需要此类措施时,我更喜欢它。 One peculiar thing to note is that MTOM optimization occurs after handlers execute, so tcpdump would show actual message sent through the wire. 要注意的一件事是MTOM优化是在处理程序执行后发生的,因此tcpdump将显示通过网络发送的实际消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM