You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Shantanu Sen <ss...@pacbell.net> on 2007/07/12 01:49:30 UTC
Axis2 - how to set ServiceClient with http basic auth
The article at http://wso2.org/library/161 seems obsolete.There is no HttpTransportProperties.BasicAuthentication in the current Axis2-1.2 codebase. Can this article be updated?
Is the basic and ntlm authentication unified so that we just need to use HttpTransportProperties.Authenticator?
Is the property name to be used HttpConstatns.AUTHENTICATE?
Thanks for any help.
Shantanu Sen
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Axis2 - how to set ServiceClient with http basic auth
Posted by Dimuthu <mu...@apache.org>.
Hi,
HttpTransportProperties.Authenticator auth = new
HttpTransportProperties.Authenticator();
String username = "user";
String passwd = "pass";
auth.setUsername(username);
auth.setPassword(passwd);
// un-comment the below line if you are sending authentication details
// without receiving 401 Authentication Required
//auth.setPreemptiveAuthentication(true);
options.setProperty(HTTPConstants.AUTHENTICATE,auth);
Regards,
Dimuthu
On Wed, 2007-07-11 at 16:49 -0700, Shantanu Sen wrote:
> The article at http://wso2.org/library/161 seems obsolete.There is no HttpTransportProperties.BasicAuthentication in the current Axis2-1.2 codebase. Can this article be updated?
>
> Is the basic and ntlm authentication unified so that we just need to use HttpTransportProperties.Authenticator?
>
> Is the property name to be used HttpConstatns.AUTHENTICATE?
>
> Thanks for any help.
> Shantanu Sen
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org