0
我正在使用axis2與rampart1.6.2創建webservice客戶端。我需要設置壘使用用戶名令牌,只是爲了簽署消息,而不是加密,但壘是沒有任何理由加密用戶名令牌,我無法禁用此錯誤功能。如何禁用soap中的UsernameToken加密Axis2 Rampart
我正在使用ws-security1.0。
我的壁壘政策文件:
<wsp:Policy wsu:Id="RampartPolicy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsp:ExactlyOne>
<wsp:All>
<ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
<ramp:user>User</ramp:user>
<ramp:userCertAlias>user</ramp:userCertAlias>
<ramp:encryptionUser>User</ramp:encryptionUser>
<ramp:passwordType>PasswordText</ramp:passwordType>
<ramp:passwordCallbackClass>main.PWCBHandler</ramp:passwordCallbackClass>
<ramp:signatureCrypto>
<ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin" enableCryptoCaching="false">
<ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
<ramp:property name="org.apache.ws.security.crypto.merlin.file">cert.jks</ramp:property>
<ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">*****</ramp:property>
</ramp:crypto>
</ramp:signatureCrypto>
</ramp:RampartConfig>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
謝謝,它的工作原理。 – tomde