On Jan 20, 2014, at 7:30 AM, Eric Chow <[email protected]> wrote:

> Hello,
> 
> I generate a web service stub by using wsdl2java with the local wsdl file.
> When I calling the web service with the WSDL that in remote server, it
> requires the stub to provide HTTP basic authenticaion information( username
> and password).
> 
> 
> How can set the authentication for the stub?

If you have the proxy, you can just do:

((BindingProvider)proxy).getRequestContext().put(BindingProvider.USERNAME_PROPERTY,
 “me”);
((BindingProvider)proxy).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY,
 “pwd”);

Dan



> 
> 
> Please help!
> 
> 
> Best regards,
> Eric

-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to