You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by An...@mro.com on 2006/02/08 21:37:09 UTC

wss4j usernametoken question

Hi
I am trying to write a JAX-RPC DII client [so no stubs generated] to invoke
a axis web service that has usernametoken ws security enabled. Have gone
through all the docs and not able to figure out how to set
username/password properties in the Call object to invoke the web service
with WS security headers. My old code used to have

      call.setProperty(Call.USERNAME_PROPERTY, username);
      call.setProperty(Call.PASSWORD_PROPERTY, password);

This doesn ot work anymore as it was prsumably setting into the http
header.

I tried this code

        call.setProperty(UsernameToken.PASSWORD_TYPE,
WSConstants.PASSWORD_TEXT);
        call.setProperty(WSHandlerConstants.USER, username);

        call.setProperty(WSHandlerConstants.PW_CALLBACK_REF,
Class.forName("psdi.iface.webservices.PWCallBack").newInstance());


And it does not generate the ws sec headers for username token. Just
wondering how can I write a client in a standard way to do this
invovocation?

thanks
Anamitra


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org