You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Eric Chow <er...@gmail.com> on 2014/01/20 13:30:04 UTC
HELP: Invoke web service with HTTP basic authentication!
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?
Please help!
Best regards,
Eric
Re: HELP: Invoke web service with HTTP basic authentication!
Posted by Daniel Kulp <dk...@apache.org>.
On Jan 20, 2014, at 7:30 AM, Eric Chow <er...@gmail.com> 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
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
RE: HELP: Invoke web service with HTTP basic authentication!
Posted by Andrei Shakirin <as...@talend.com>.
Hi,
The conduit configuration for http basic is described here: http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport%28includingSSLsupport%29-BasicAuthentication
Regards,
Andrei.
> -----Original Message-----
> From: Eric Chow [mailto:eric138@gmail.com]
> Sent: Montag, 20. Januar 2014 13:30
> To: users@cxf.apache.org
> Subject: HELP: Invoke web service with HTTP basic authentication!
>
> 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?
>
>
> Please help!
>
>
> Best regards,
> Eric