[
http://issues.apache.org/jira/browse/AXIS2-656?page=comments#action_12378392 ]
Petri Hakala commented on AXIS2-656:
------------------------------------
I got basic authentication working in version 1.0.
Example code:
ConfigurationContext context =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
null);
ServiceClient client = new ServiceClient(context, null);
HttpClient httpClient = new HttpClient(new
MultiThreadedHttpConnectionManager());
httpClient.getState().setCredentials(AuthScope.ANY, new
UsernamePasswordCredentialls("username", "password"));
context.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, httpClient);
client.getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT, new
Boolean(true));
As you see, setting this is not so easy so it would be nice if there is some
api setting username and password.
> Support for basic authentication
> --------------------------------
>
> Key: AXIS2-656
> URL: http://issues.apache.org/jira/browse/AXIS2-656
> Project: Apache Axis 2.0 (Axis2)
> Type: New Feature
> Components: client-api
> Reporter: Petri Hakala
> Priority: Minor
>
> There is no support for basic authentication when making webservice calls via
> ServiceClient class. I see there is basic authentication support for proxy
> server but not for direct connection.
> It would be nice to have something following:
> ServiceClient client = new ServiceClient();
> client.getOptions().setUsername("username");
> client.getOptions().setPassword("password");
> Axis 1.3 have these in class org.apache.axis.client.Stub.
> -pete-
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira