Thanks Dan,
I noticed in CXF 2.4.6 which uses WSS4J 1.6.x that SignaturePropRefId is not
working. When I configure using the reference, I get the following NPE:
java.lang.NullPointerException
at
org.apache.ws.security.message.WSSecSignature.getSigningCerts(WSSecSignature.java:785)[wss4j-1.6.4.jar:1.6.4]
at
org.apache.ws.security.message.WSSecSignature.prepare(WSSecSignature.java:168)[wss4j-1.6.4.jar:1.6.4]
at
org.apache.ws.security.message.WSSecSignature.build(WSSecSignature.java:362)[wss4j-1.6.4.jar:1.6.4]
at
org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:61)[wss4j-1.6.4.jar:1.6.4]
at
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:202)[wss4j-1.6.4.jar:1.6.4]
at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.access$200(WSS4JOutInterceptor.java:52)[cxf-rt-ws-security-2.4.6.jar:2.4.6]
at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:260)[cxf-rt-ws-security-2.4.6.jar:2.4.6]
at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:136)[cxf-rt-ws-security-2.4.6.jar:2.4.6]
Although it does not explicitly say it, the Crypto object is null which
probably means it couldn't open the keystore.
When I switch back to a properties file:
<entry key="signaturePropFile" value="etc/Client_Sign.properties" />
It works fine. I don't like baking the properties file into my bundle and
prefer the other configuration:
<entry key="SignaturePropRefId" value="wsCryptoPropertiesOut"/>
<entry key="wsCryptoPropertiesOut"
value-ref="wsCryptoPropertiesOut" />
<util:properties id="wsCryptoPropertiesOut">
<prop
key="org.apache.ws.security.crypto.provider">org.apache.ws.security.components.crypto.Merlin</prop>
<prop
key="org.apache.ws.security.crypto.merlin.keystore.type">jks</prop>
<prop
key="org.apache.ws.security.crypto.merlin.keystore.password">password</prop>
<prop
key="org.apache.ws.security.crypto.merlin.keystore.alias">alias</prop>
<prop
key="org.apache.ws.security.crypto.merlin.keystore.file">keystore.jks</prop>
</util:properties>
Any ideas on how to get this working in CXF 2.4.6 with WSS4J 1.6?
Thanks,
Yogesh
--
View this message in context:
http://cxf.547215.n5.nabble.com/WS-Security-Properties-Reference-tp5505704p5543154.html
Sent from the cxf-user mailing list archive at Nabble.com.