0
在配置用於處理用戶名令牌和簽名服務,它的設置是這樣的:如何在Mule入站CXF服務中設置WS-SecurityPolicy?
<service name="serviceName">
<inbound>
<cxf:inbound-endpoint address="someUrl" protocolConnector="httpsConnector" >
<cxf:inInterceptors>
<spring:bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" />
<spring:bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
<spring:constructor-arg>
<spring:map>
<spring:entry key="action" value="UsernameToken Timestamp Signature" />
<spring:entry key="passwordCallbackRef" value-ref="serverCallback" />
<spring:entry key="signaturePropFile" value="wssecurity.properties" />
</spring:map>
</spring:constructor-arg>
</spring:bean>
</cxf:inInterceptors>
</cxf:inbound-endpoint>
</inbound>
</service>
但是,如何可以創建被允許的什麼算法的政策,什麼消息的部分應簽署?
我認爲他們已經轉移到CXF 2.2.x.但是閱讀http://cxf.apache.org/docs/ws-securitypolicy.html上的描述並沒有解釋如何做到這一點。 雖然它聲明「WS-SecurityPolicy支持僅適用於」WSDL第一「方案」。所以我想你必須在WSDL文件中手動定義安全策略,然後在您使用CXF從該文件創建Web服務時自動應用它。 – Brakara 2010-06-01 18:43:45