You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by Richard Gregory <ri...@gsf.de> on 2005/10/04 16:19:43 UTC

newbie problem with wss4j examples

Hi,

I'm trying work through the wss4j examples 
<http://ws.apache.org/wss4j/package.html> . I have implemented the 
following in my client_deploy.wsdd

<requestFlow>
   <handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
    <parameter name="action" value="UsernameToken Encrypt"/>
    <parameter name="user" value="werner"/>
    <parameter name="passwordCallbackClass" 
value="org.apache.ws.axis.oasis.PWCallback"/>
    <parameter name="passwordType" value="PasswordText" />
    <parameter name="addUTElement" value="Nonce Created" />
    <parameter name="encryptionPropFile" value="crypto.properties" />
    <parameter name="encryptionKeyIdentifier" value="X509KeyIdentifier" />
    <parameter name="encryptionUser"
      value="16c73ab6-b892-458f-abf5-2f875f74882e" />
    <parameter name="encryptionParts"
      
value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken" 
/> 
   </handler>
  </requestFlow> 

and the corresponding

<requestFlow>
   <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
    <parameter name="passwordCallbackClass"
      value="org.apache.ws.axis.oasis.PWCallback"/>
    <parameter name="action" value="UsernameToken Encrypt"/>
    <parameter name="decryptionPropFile" value="crypto.properties" />
   </handler>
  </requestFlow>

in my service deploy.wsdd.

When I tried to invoke the service I got:

Exception in thread "main" AxisFault
 faultCode: 
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
 faultSubcode:
 faultString: WSDoAllReceiver: security processing failed; nested 
exception is:
    org.apache.ws.security.WSSecurityException: General security error 
(WSSecurityEngine: Callback supplied no password for: 
16c73ab6-b892-458f-abf5-2f875f74882e)
 faultActor:
 faultNode:
 faultDetail:
    {http://xml.apache.org/axis/}hostname:mws13

Looking at the crypto.properties file, I assumed the password for 
16c73ab6-b892-458f-abf5-2f875f74882e is "security", so I ammended my 
PWCallback class to include this.

if ("wss4j".equals(pc.getIdentifer())) {
      pc.setPassword("security");
}
else if ("16c73ab6-b892-458f-abf5-2f875f74882e".equals(pc.getIdentifer())) {
       pc.setPassword("security");
 }

However I still get the same error returned.

If anyone can point in the right direction here I'd be grateful.

Thanks.

Richard.