axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thilina Gunarathne (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-1380) Error calling a service thru proxy
Date Sun, 15 Oct 2006 05:18:35 GMT
    [ http://issues.apache.org/jira/browse/AXIS2-1380?page=comments#action_12442366 ] 
            
Thilina Gunarathne commented on AXIS2-1380:
-------------------------------------------

try this
http://people.apache.org/~thilina/axis2/1.1-RC1/eclipse_codegen_plugin_1.1-RC1/

thanks,
~Thilina

> Error calling a service thru proxy
> ----------------------------------
>
>                 Key: AXIS2-1380
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1380
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.0
>         Environment: Axis2.0 version 1.0 on Windows XP
>            Reporter: Robert Luo
>            Priority: Critical
>
> I used the Eclipse Plug-in Wizard to generate the client code to a public web servcie.
 I ran into problem trying to call the service.  I am doing this behind our company proxy
and I have modified the generated stub code as follow (I am using the adb binding).  I ahev
tried using:
> System.getProperties().setProperty()  and  _serviceClient.getOptions().setProperty(HTTPConstants.PROXY,
proxyProperties);
>     public MyServiceWSStub(
>         org.apache.axis2.context.ConfigurationContext configurationContext,
>         java.lang.String targetEndpoint) throws java.lang.Exception {
>         //To populate AxisService
>         populateAxisService();
>         populateFaults();
>         _serviceClient = new org.apache.axis2.client.ServiceClient(configurationContext,
>                 _service);
>         _serviceClient.getOptions().setTo(new org.apache.axis2.addressing.EndpointReference(
>                 targetEndpoint));
> // added the following lines.
>         System.getProperties().setProperty("http.proxySet", "true");
>       System.getProperties().setProperty("http.proxyUser", "uid");
>       System.getProperties().setProperty("http.proxyPassword", "password");
>       System.getProperties().setProperty("http.proxyHost","proxy.server.name");
>       System.getProperties().setProperty("http.proxyPort","80");
>        
>         HttpTransportProperties.ProxyProperties proxyProperties 
>         = new HttpTransportProperties().new ProxyProperties();
>     proxyProperties.setProxyName("proxy.server.name");
>     proxyProperties.setProxyPort(80);
>     proxyProperties.setUserName("uid");
>     proxyProperties.setPassWord("password");
>     _serviceClient.getOptions().setProperty(
>             HTTPConstants.PROXY, proxyProperties);
>     }
> However, no matter what I did.  I got the following error:
> The first time I called, I will get:
> org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!; nested
exception is: 
> 	javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed!;
nested exception is: 
> 	org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!;
nested exception is: 
> 	javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed!;
nested exception is: 
> 	org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!;
nested exception is: 
> 	javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed!;
nested exception is: 
> 	org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!;
nested exception is: 
> 	javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed!
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:223)
> 	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:589)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:328)
> 	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:279)
> 	at cag.conagrafoods.foodservicews.FoodServiceWSStub.getSalesRepsByZipCode(FoodServiceWSStub.java:408)
> 	at com.conagrafoods.mdm.ws.Test.main(Test.java:24)
> Caused by: org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!;
nested exception is: 
> 	javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed!;
nested exception is: 
> 	org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!;
nested exception is: 
> 	javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed!
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:305)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:207)
> 	... 5 more
> If I try again, sometime I will get:
> org.apache.axis2.AxisFault: Connection reset; nested exception is: 
> 	java.net.SocketException: Connection reset; nested exception is: 
> 	org.apache.axis2.AxisFault: Connection reset; nested exception is: 
> 	java.net.SocketException: Connection reset
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:223)
> 	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:589)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:328)
> 	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:279)
> 	at cag.conagrafoods.foodservicews.FoodServiceWSStub.getSalesRepsByZipCode(FoodServiceWSStub.java:408)
> 	at com.conagrafoods.mdm.ws.Test.main(Test.java:24)
> Caused by: org.apache.axis2.AxisFault: Connection reset; nested exception is: 
> 	java.net.SocketException: Connection reset
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:305)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:207)
> 	... 5 more
> Caused by: java.net.SocketException: Connection reset
> 	at java.net.SocketInputStream.read(SocketInputStream.java:168)
> 	at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
> 	at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
> 	at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77)
> 	at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105)
> 	at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1115)
> 	at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1832)
> 	at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
> 	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
> 	at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:530)
> 	at org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:92)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:299)
> 	... 6 more
> What am I missing here?

-- 
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

        

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


Mime
View raw message