you can use the options.setUsername method.

please refere here[1].

thanks,
Amila.

[1]
http://wso2.org/library/articles/2011/06/securing-web-service-integration

On Mon, Sep 12, 2011 at 10:50 PM, jing <t...@nceas.ucsb.edu> wrote:

> Hi, everyone:
>
> I am using the username token authentication policy in rampart to secure my
> axis web service.
>
> Here is the segment of the axis configuration in my client side:
>
> <wsp:ExactlyOne>
> <wsp:All>
> <sp:SupportingTokens>
> <wsp:Policy>
> <sp:UsernameToken/>
> </wsp:Policy>
> </sp:SupportingTokens>
> <ramp:RampartConfig 
> xmlns:ramp="http://ws.apache.**org/rampart/policy<http://ws.apache.org/rampart/policy>
> ">
> <ramp:user>kepler</ramp:user>
> <ramp:passwordCallbackClass>**org.kepler.executionWS.client.**
> PWHandlerClient</ramp:**passwordCallbackClass>
> </ramp:RampartConfig>
> </wsp:All>
> </wsp:ExactlyOne>
>
>
> Can I only use one user in this policy? If i can use multiple users, would
> you mind telling me how to do so?
>
> I tried to repeat <ramp:user>, it seemed not working since I only see one
> user was printed out in the handle (Callback[] callbacks) method of
> PWHandlerClient class.
>
> Thank you very much.
>
> Jing
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> java-user-unsubscribe@axis.**apache.org<java-user-unsubscr...@axis.apache.org>
> For additional commands, e-mail: java-user-h...@axis.apache.org
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Reply via email to