axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Schöning (JIRA) <>
Subject [jira] [Commented] (AXIS2-5886) Axis2 - Authentication state already initialized
Date Wed, 13 Sep 2017 15:47:00 GMT


Thorsten Schöning commented on AXIS2-5886:

Maybe I'm missing something, but the package "org.apache.commons.httpclient" is the old, legacy
3.x HTTP client, not the newer 4 one. The latter has a package of "org.apache.http.client".
Are you sure your are using Axis2 1.7.6 and not an older HTTP client by accident?


Axis2 1.7.0 supports Apache HttpClient 4.x in addition to the no longer maintained Commons
HttpClient 3.x. To enable the support for HttpClient 4.x, use org.apache.axis2.transport.http.impl.httpclient4.HTTPClient4TransportSender
instead of org.apache.axis2.transport.http.CommonsHTTPTransportSender in axis2.xml. Please
note that the code was written for HttpClient 4.2.x and should work with 4.3.x and 4.4.x,
but is incompatible with 4.5.x.

> Axis2 - Authentication state already initialized
> ------------------------------------------------
>                 Key: AXIS2-5886
>                 URL:
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api, Integration
>    Affects Versions: 1.7.6
>         Environment: Windows 10, Java 6
>            Reporter: Andrea Porporino
>              Labels: Axis2, Client, Java, Proxy, Settings
> Hi,
> I'm trying to call a webservice, out of my network, using proxy. The service is reacheable
from browser but not using the client.
> My proxy settings are written in this way:
> HttpTransportProperties.ProxyProperties proxyProperties = new HttpTransportProperties.ProxyProperties();
> proxyProperties.setProxyName(proxyname);
> proxyProperties.setProxyPort(proxyport);
> proxyProperties.setDomain(domain);
> proxyProperties.setPassWord(password);
> proxyProperties.setUserName(username);
> service._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.PROXY,
> With this settings the program raises this error:
> {color:red}Exception in thread "main" java.lang.IllegalStateException: Authentication
state already initialized
> 	at org.apache.commons.httpclient.auth.AuthState.setPreemptive(
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeConnect(
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(
> 	at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.executeMethod(
> 	at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.sendViaPost(
> 	at org.apache.axis2.transport.http.HTTPSender.send(
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(
> 	at org.apache.axis2.engine.AxisEngine.send(
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(
> 	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
> 	at org.apache.axis2.client.OperationClient.execute(
> 	at
> 	at com.cdb.Service.main({color}
> If I not use this settings I receive a timeout connection, if I not pass the credentials
I receive an error about authentication required.
> I searched on the web and on your issues and the problem seemed solved with the http-client
version 4, but I used always this version so I would need an help.
> Thanks

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message