You can also set the username/password programatically by using a policy based
configuration. The samples you are referring to are paramater based and the
username/password are hardcoded. You should take a look at samples/policy in
the rampart distro.
Cheers
Sanjay
________________________________
From: Pete [mailto:[EMAIL PROTECTED]
Sent: 24 March 2008 15:32
To: [email protected]
Subject: Re: AW: Axis2 with rampart sample, username hardcoded
It would be nice to have those classes available long term,
unfortunately they are deprecated, so who knows when they will actually go away.
----- Original Message ----
From: Matthias Wermund <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, March 24, 2008 4:28:01 AM
Subject: AW: Axis2 with rampart sample, username hardcoded
Hi,
this is the way I handle the rampart username in my clients
programmatically:
OutflowConfiguration
outflowConfig = new OutflowConfiguration();
outflowConfig.setActionItems("UsernameToken");
outflowConfig.setUser("bob");
outflowConfig.setPasswordCallbackClass("test1.security.PWCBClientHandler");
axisstub._getServiceClient().getOptions().setProperty(WSSHandlerConstants.OUTFLOW_SECURITY,
outflowConfig.getProperty());
Your password callback class then only needs to pass the correct
password for this username.
Greets,
Matthias
Von: Daniel Woo [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 24. März 2008 09:35
An: [email protected]
Betreff: Axis2 with rampart sample, username hardcoded
Hi,
I tried to use axis2 with rampart for UsernameToken authentication. The
problem is that all the samples just hardcoded the username in axis2.xml, eg:
<parameter name="OutflowSecurity">
<action>
<items>UsernameToken</items>
<user>bob</user>
<passwordCallbackClass>test1.security.PWCBClientHandler</passwordCallbackClass>
</action>
</parameter>
How can I get rid of the <user> element in the config file and set the
username/password in the handler PWCBClientHandler?
--
Thanks & Regards,
Daniel
________________________________
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try
it now.
<http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ>