目前,我有一个调用出站SOAP服务的wsgateway。现在,提供者希望将安全标头添加到传出的SOAP消息。
为了使服务调用成功,我需要将以下内容包含在SOAP:Header中。
<wsse:Security soapenv:mustUnderstand="1"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>xxxx</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">xxxx</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>如何使用Header enricher或mapper来解决这个问题。当前实施:
<int:chain input-channel="doOutBoundCallNow" output-channel="printChannel">
<ws:outbound-gateway uri="http://localhost:8082/mockBinding"></ws:outbound-gateway>
</int:chain>发布于 2015-09-04 23:42:36
你有没有看过Spring WS documentation?
您应该为WSHandlerConstants.USERNAME_TOKEN配置Wss4jSecurityInterceptor,并将此interceptor添加到<int-ws:outbound-gateway>。
https://stackoverflow.com/questions/32387152
复制相似问题