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 

Reply via email to