Spring集成Web服务器日志文件的SOAP请求消息(即使SOAP消息是不正确的)

问题描述:

你能告诉我登录的SOAP消息的方式,即使消息是不正确的格式?Spring集成Web服务器日志文件的SOAP请求消息(即使SOAP消息是不正确的)

<sws:interceptors> 
    <bean class="com.capgemini.manulife.integration.interceptor.LogInterceptor" /> 
</sws:interceptors> 

<!-- inbound --> 
<ws:inbound-gateway id="cas-inbound-gateway" request-channel="casRequestChannel" reply-channel="casResponseChannel" 
     marshaller="casMarshaller"  unmarshaller="casMarshaller" /> 
<int:channel id="casRequestChannel"> 
    <int:interceptors> 
     <int:wire-tap channel="SOAPLogChannel"/> 
    </int:interceptors> 
</int:channel> 
<int:channel id="SOAPLogChannel" /> 
<int:logging-channel-adapter id="logger" expression="payload" level="INFO" channel="SOAPLogChannel"/> 

正如你看到的,我已经在使用PayloadLoggingInterceptor(7.LogInterceptor纪录延伸PayloadLoggingInterceptor),但它并没有经过PayloadLoggingInterceptor

谢谢你,最好的问候,

这不是Spring集成的问题,但更多的直接使用SOAP。

所以,如果你的XML是不正确的格式,你没有选择,除非解组之前手动检查。

所以,你必须依靠simple<ws:inbound-gateway><int-xml:validating-filter>(或其他一些检查),只有在那之后执行<int-xml:unmarshalling-transformer>

+0

我试图设置Jaxb2Unmarshaller Unmarshaller的监听器,认为它可以解组之前登录的消息,但听者的目的不是为了这个目的。 –

+0

我们可以使用Servlet过滤器来做到这一点?我认为这是可能的。尝试它... :-) –

是的,我们可以添加过滤器的Spring Web服务使用FilterRegistrationBean ^^