Hi, I've followed the tutorial at http://ws.apache.org/wss4j/axis.html and got a service protected with a username and password. I'm now trying to user signatures and certificates instead. I've searched all over the web but i can't find a tutorial of how to do this anywhere.

So far I've managed to cobble together the following:

the handler of the request flow of the server-config.wsdd contains the following parameters:

<parameter name="passwordCallbackClass" value="com.exampleService2.security.PWCallbackClass"/>

<parameter name="action" value="Signature"/>

<parameter name="signaturePropFile" value="crypto.properties"/>

the handler of the request flow of the client-config.wsdd contains the following parameters:

<parameter name="user" value="16c73ab6-b892-458f-abf5-2f875f74882e"/>

<parameter name="passwordCallbackClass" value="testClient.PWCallback2"/>

<parameter name="action" value="Signature"/>

<parameter name="signaturePropFile" value="testClient/crypto.properties" />

<parameter name="signatureKeyIdentifier" value="DirectReference" />

<parameter name="encryptionKeyIdentifier" value="X509KeyIdentifier" />

The crypto.properties file is:

org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin

org.apache.ws.security.crypto.merlin.keystore.type=pkcs12

org.apache.ws.security.crypto.merlin.keystore.password=security

org.apache.ws.security.crypto.merlin.keystore.alias=16c73ab6-b892-458f-abf5-2f875f74882e

org.apache.ws.security.crypto.merlin.alias.password=security

org.apache.ws.security.crypto.merlin.file=C:/keys/x509.PFX.MSFT

When I run my test client program I get the following error:

AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

faultSubcode:

faultString: java.lang.RuntimeException: CryptoFactory: Cannot load properties: crypto.properties

faultActor:

faultNode:

faultDetail:

{http://xml.apache.org/axis/}hostname:shelly

java.lang.RuntimeException: CryptoFactory: Cannot load properties: crypto.properties

.........

By using TCPMon and something other debug techniques I know that the soap is being signed by the client and gets sent to the server ok. The problem is that for some reason the server cannot locate crypto.properties. I have tried putting crypto.properties in various locations and also changing server-config.wsdd to reference the new location but to no avail.

Please can somebody tell me how to solve this problem. Or even better, can someone please provide me with a simple tutorial of how to use wss4j with certificates rather than just username and password. thanks

 

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to