1
春天-INT 4.1,我有头映射器工作正常,像这样:Spring集成 - 需要映射SOAP头
<int-ws:inbound-gateway id="my-gateway"
request-channel="my-gateway-input"
reply-channel="my-gateway-output"
unmarshaller="jaxb2Marshaller" marshaller="jaxb2Marshaller"
header-mapper="soapHeaderMapper" />
<beans:bean id="soapHeaderMapper" class="org.springframework.integration.ws.DefaultSoapHeaderMapper">
<beans:property name="requestHeaderNames" value="*"/>
</beans:bean>
当我试图升级到弹簧INT 4.2,标题映射器是不允许的。我需要它的原因是因为我需要映射肥皂安全头。但我不认为它没有指定soapHeaderMapper而被映射。请注意,我有以下上游拦截肥皂请求,我很确定拦截器不会删除肥皂标题。让我知道你是否需要完整的配置。
<beans:bean id="wss4jSecurityInterceptor" class="org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor">
<beans:property name="validationActions" value="UsernameToken"/>
<beans:property name="validationCallbackHandler" ref="validationCallbackHandler"></beans:property>
<beans:property name="removeSecurityHeader" value="false"></beans:property>
</beans:bean>
Artem,感谢您的及时回复。你说得对,它正在工作。我认为这不是因为Eclipse使用以下架构位置来验证XSD,而这正确地看起来不允许使用header-mapper:http://www.springframework.org/schema/integration/ws/spring-integration- ws.xsd。当将xsd更改为4.1时,我有其他验证问题。事后看来,我应该使用纯Java配置,而不是处理这个XML,这样会变得混乱(如果我将kafka,mongo-db添加到混合中)。 – code4kix