I am using XFire as a WebService client with WS-Security but I can't set
the PasswordHandler using a reference.

The following works:
        client.addOutHandler(new DOMOutHandler());
        Map config = new HashMap();
        ...
 !      config.put(
 !          WSHandlerConstants.PW_CALLBACK_CLASS,
 !          PasswordHandler.class.toString());
        ...
        client.addOutHandler(new WSS4JOutHandler(config));
        ...

But I want to use this instead:
 !      config.put(
 !          WSHandlerConstants.PW_CALLBACK_REF,
 !          new PasswordHandler(password));

In the documentation at <http://xfire.codehaus.org/WS-Security>
it says:
  "You can also specify an existing handler instance, using the
WSHandlerConstants.PW_CALLBACK_REF property on the client/service instance
or MessageContext ( e.g. client.setProperty(new PasswordHandler())). "

The Client#setProperty takes a key as well as a value so the example must
be incorrect but if I do set the client property using
WSHandlerConstants.PW_CALLBACK_REF as the key I get no security headers at
all. Also, do I really need to set the property
on the client instead of the WSS4J config when useing a password call back
reference?

I also found this bug: <http://jira.codehaus.org/browse/XFIRE-658> but
upgrading to xfire 1.2.4 didn't fix the issue.

thanks for any pointers,
Thomas


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to