[ https://issues.apache.org/jira/browse/AXIS2-5886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16166055#comment-16166055 ] Andrea Porporino edited comment on AXIS2-5886 at 9/14/17 10:42 AM: ------------------------------------------------------------------- Ok, I was not using the axis2.xml. Now I've substituted the class path as per your release note: <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/> <transportSender name="http" class="org.apache.axis2.transport.http.impl.httpclient4.HTTPClient4TransportSender"> <parameter name="PROTOCOL">HTTP/1.1</parameter> <parameter name="Transfer-Encoding">chunked</parameter> <!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages --> <!-- <parameter name="OmitSOAP12Action">true</parameter> --> </transportSender> <transportSender name="https" class="org.apache.axis2.transport.http.impl.httpclient4.HTTPClient4TransportSender"> <parameter name="PROTOCOL">HTTP/1.1</parameter> <parameter name="Transfer-Encoding">chunked</parameter> </transportSender> and I've updtaded my code in this manner: URL url = Service.class.getResource("axis2.xml"); ConfigurationContext myConfigContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(url.getPath()); CustomerIntegrationServiceStub service = new CustomerIntegrationServiceStub(myConfigContext,endpoint); But the result is the same of before {color:red}Exception in thread "main" java.lang.IllegalStateException: Authentication state already initialized{color} Is it still missing? Thanks was (Author: suxper): Ok, I'm not using the axis2.xml. Now I've substituted the class path as per your release note: <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/> <transportSender name="http" class="org.apache.axis2.transport.http.impl.httpclient4.HTTPClient4TransportSender"> <parameter name="PROTOCOL">HTTP/1.1</parameter> <parameter name="Transfer-Encoding">chunked</parameter> <!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages --> <!-- <parameter name="OmitSOAP12Action">true</parameter> --> </transportSender> <transportSender name="https" class="org.apache.axis2.transport.http.impl.httpclient4.HTTPClient4TransportSender"> <parameter name="PROTOCOL">HTTP/1.1</parameter> <parameter name="Transfer-Encoding">chunked</parameter> </transportSender> and I've updtaded my code in this manner: URL url = Service.class.getResource("axis2.xml"); ConfigurationContext myConfigContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(url.getPath()); CustomerIntegrationServiceStub service = new CustomerIntegrationServiceStub(myConfigContext,endpoint); But the result is the same of before {color:red}Exception in thread "main" java.lang.IllegalStateException: Authentication state already initialized{color} Is it still missing? Thanks > Axis2 - Authentication state already initialized > ------------------------------------------------ > > Key: AXIS2-5886 > URL: https://issues.apache.org/jira/browse/AXIS2-5886 > 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 > Attachments: screenshot-1.png > > > 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, proxyProperties); > 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(AuthState.java:120) > at org.apache.commons.httpclient.HttpMethodDirector.executeConnect(HttpMethodDirector.java:487) > at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:391) > at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) > at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) > at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.executeMethod(HTTPSenderImpl.java:872) > at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.sendViaPost(HTTPSenderImpl.java:212) > at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121) > at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:403) > at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:234) > at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431) > at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:399) > at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225) > at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150) > at com.microsoft.schemas.crm._2006.webservices.CustomerIntegrationServiceStub.findCustomer(CustomerIntegrationServiceStub.java:741) > at com.cdb.Service.main(Service.java:48){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 (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
Free forum by Nabble | Edit this page |