你能告诉我如何记录发送/接收int-ws的SOAP消息:outbound-gateway?
我试过了
<int-ws:outbound-gateway id="ais-outbound-gateway"
request-channel="aisRequestChannel" reply-channel="aisResponseChannel"
uri="http://localhost:8080/services/ONESHOT"
marshaller="aisMarshaller" unmarshaller="aisMarshaller" />
<int:channel id="aisRequestChannel">
<int:interceptors>
<int:wire-tap channel="logChannel"/>
</int:interceptors>
</int:channel>
<int:channel id="aisResponseChannel">
<int:interceptors>
<int:wire-tap channel="logChannel"/>
</int:interceptors>
</int:channel>
<int:logging-channel-adapter expression="payload" id="logChannel" level="DEBUG" />
但有效负载只是java对象,而不是SOAP消息。
致以最诚挚的问候,
答案 0 :(得分:1)
<int-ws:outbound-gateway>
支持interceptor
注入:
<xsd:documentation>
Reference to the bean definition of a ClientInterceptor.
</xsd:documentation>
因此,您应该实现自己的LoggingClientInterceptor
。
您可以从现有PayloadLoggingInterceptor
借用的记录提示。