[
https://issues.apache.org/jira/browse/CXF-6520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14658268#comment-14658268
]
Colm O hEigeartaigh commented on CXF-6520:
------------------------------------------
You just need to play around with how the keystore is loaded, e.g. something
like:
props.put(WSHandlerConstants.SIG_PROP_FILE, "keys/clientkeystore.properties");
props.put(WSHandlerConstants.SIG_PROP_FILE,
"file:///D:/iimsworkspace/TestSampleProject/keys/clientkeystore.properties");
Take a look at the CXF ws-security systests.
Colm.
> Error when running code to execute secured webservice using CXF library
> -----------------------------------------------------------------------
>
> Key: CXF-6520
> URL: https://issues.apache.org/jira/browse/CXF-6520
> Project: CXF
> Issue Type: Bug
> Components: WS-* Components
> Reporter: sangeeta
> Priority: Critical
> Attachments: TestWithCXF.java
>
>
> Hi,
> I have used CXF library to generate WSDL client. Now I am using
> WSS4JOutInterceptor to add security for X509 signature.
> But I am getting this error. I have attached my client code as well. Same
> settings are working from SOAP UI client.
> Caused by: org.apache.ws.security.WSSecurityException: General security error
> (Cannot load the resource
> D:/iimsworkspace/TestSampleProject/keys/clientkeystore.properties)
> at
> org.apache.ws.security.components.crypto.CryptoFactory.getProperties(CryptoFactory.java:261)
> at
> org.apache.ws.security.components.crypto.CryptoFactory.getInstance(CryptoFactory.java:186)
> at
> org.apache.cxf.ws.security.wss4j.AbstractWSS4JInterceptor.loadCryptoFromPropertiesFile(AbstractWSS4JInterceptor.java:224)
> at
> org.apache.ws.security.handler.WSHandler.loadCrypto(WSHandler.java:910)
> at
> org.apache.ws.security.handler.WSHandler.loadSignatureCrypto(WSHandler.java:823)
> at
> org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:143)
> at
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.access$200(WSS4JOutInterceptor.java:52)
> at
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:265)
> at
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:141)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)