You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "sushl (JIRA)" <ji...@apache.org> on 2013/10/18 08:49:41 UTC

[jira] [Created] (AXIS2-5611) Axis2 Service Stub throws java.lang.IllegalStateException

sushl created AXIS2-5611:
----------------------------

             Summary: Axis2 Service Stub throws java.lang.IllegalStateException
                 Key: AXIS2-5611
                 URL: https://issues.apache.org/jira/browse/AXIS2-5611
             Project: Axis2
          Issue Type: Bug
          Components: client-api
    Affects Versions: 1.6.1
         Environment: Windows 7
            Reporter: sushl


Call to web service using ServiceStub throws java.lang.IllegalStateException
Detail Exception: 

Stack Trace: 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.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:621)  at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)  at
org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)  at   
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:404)  at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231)  at     
org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)  at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)  at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)  at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)


Wireshark shows the followoing information When I am try to access same URL(https) through IE Browser
1. Ask for proxy credentials
Protocol capture : 
CONNECT 192.168.21.55:443 HTTP/1.0
HTTP/1.1 407 Proxy Authentication Required (text/html)

2. Ask for service credential
HTTP/1.0 200 Connection Established

Protocol capture : Proxy-Authorization: Digest username="user",realm="test",
nonce="dMjyhvzoBAA=83b1d5e7716046b5a4088e3c3a4d3d555d80389b",uri="192.168.21.55:443",
cnonce="599bba763bd29b412b5e42ad8099fab7",nc=00000001,algorithm=MD5,
response="dd992627cea62baf3b10e452628a01e1",qop="auth"

Wireshark shows the followoing information When I am try to access same URL(https) through java code
CONNECT 192.168.21.55:443 HTTP/1.0
HTTP/1.1 407 Proxy Authentication Required (text/html)

after that in java code it throws exception (java.lang.IllegalStateException) through java code I am providing proper proxyHost, proxyPort & credentials. I don't know what other parameters are required for proxy authorization. If any one having any idea, Please reply ASAP to this post.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org