Hi Sanjay, I still think if you starting from the scratch it is better to use the policy based configuration rather than parameter based configuration. We have tested setting the username and password using options in the policy based configuration and will look in to what happens in the parameter based configuration.
Regards, Nandana On Jan 15, 2008 10:56 PM, Sanjay Vivek <[EMAIL PROTECTED]> wrote: > Hi Nandana, > > The following code snippet below shows how I've gone about using the > ServiceClient to set the username and password: > > ConfigurationContext ctx = ConfigurationContextFactory > .createConfigurationContextFromFileSystem(axis2ConfPath, null); > > ServiceClient client = new ServiceClient(ctx, null); > OMElement payload = client.sendReceive(getPayload("Hello world")); > > Options options = new Options(); > client.engageModule(new QName("rampart")); > > options.setTo(targetEPR); > options.setAction("urn:echo"); > > options.setUserName("bob"); > options.setPassword("wspwd"); > > client.setOptions(options); > result = client.sendReceive(payload); > > > However, the client seems to be picking up the "user" value from 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. > > Regards > Sanjay > >