Spring集成日志SOAP消息int-ws:outbound-gateway的内容

时间:2017-03-17 10:44:48

标签: spring-integration spring-ws

你能告诉我如何记录发送/接收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消息。

致以最诚挚的问候,

1 个答案:

答案 0 :(得分:1)

<int-ws:outbound-gateway>支持interceptor注入:

<xsd:documentation>
    Reference to the bean definition of a ClientInterceptor.
</xsd:documentation>

因此,您应该实现自己的LoggingClientInterceptor

您可以从现有PayloadLoggingInterceptor借用的记录提示。