在 Spring Integration 中,使用入站网关,您知道如何将每个 SOAP WS 请求保存到单独的文件中吗?
目前,我坚持:
<!-- inbound -->
<ws:inbound-gateway id="inbound-gateway" request-channel="SOAPRequestChannel" reply-channel="SOAPResponseChannel"/>
<int:channel id="SOAPRequestChannel">
<int:interceptors>
<int:wire-tap channel="SOAPRequestChannelForLog"/>
</int:interceptors>
</int:channel>
<int:channel id="SOAPResponseChannel" />
<int:channel id="SOAPRequestChannelForLog" />
<int:logging-channel-adapter id="logger" expression="payload" level="INFO" channel="SOAPRequestChannelForLog"/>
但它只是将所有请求记录在 1 个文件中。
或者我必须编写另一个像 LogToFile 这样的类,它具有将该请求保存到文件的方法,将 int:logging-channel-adapter 替换为 int:service-activator ?Spring 是否支持开箱即用地记录每个 SOAP 请求?我阅读了参考文件,但找不到任何东西。
或者有什么更好的方法吗?^_^
问候,