Hi Sanjay,
> Is it possible to define the username dynamically?
Yes, this is possible. You can dynamically set username and password
using client's options.
ServiceClient client = new ServiceClient(ctx, null);
Options options = client.getOptions();
options.setUserName("user");
options.setPassword("password");
Options takes precedence over configuration/callback and if
it is set, Rampart won't look in configuration/callback for
username/password to create the username token.
> Perhaps from the command line or something along
> those lines?
Yes. You can find how username and password are passed as command line
parameters if you try the CommodityQuote sample of the WSO2 WSAS server
which uses Rampart for security. Commodity quote client [1] uses this approach.
You can download the WSO2 WSAS distribution here [2].
Thanks,
Nandana
[1] -
https://wso2.org/repos/wso2/trunk/wsas/java/modules/samples/CommodityQuote/src/org/wso2/wsas/sample/commodityquote/client/Client.java
[2] - http://wso2.org/projects/wsas/java