Dynamically setting the username/password with Rampart.
Joined: Jan 16, 2008
I'm attempting to call a simple Web Service (an Echo Service) that is protected by WS-Security UsernameToken. I'm using Axis2-1.3 and Rampart 1.3. I've been looking at the samples given in the Apache Rampart distro and it makes sense to me. However, in the samples given in the Rampart distro, the username is hardcoded within the OuflowSecurity element in the client config file (client.axis2.xml) as shown below:
client.setOptions(options); result = client.sendReceive(payload);
However, the client seems to be picking up the value within the <user> in the "OutflowSecurity" element which is defined in client.axis2.xml (from axis2ConfPath/conf). How do I override the "user" value in client.axis2.xml so that the client picks up the username from 'options.setUserName("bob")'? Any help would be appreciated. Cheers.
Joined: May 28, 2009
Were you able to resolve this issue? If yes then what you did?