1
votes

I'm creating a client using axis2 to consume a third party ws, everything works fine in the tomcat server in my machine, but once deployed to the server I'm not able to run it.

I have already checked:

  • Third party URL is up and running
  • No firewalls in the server
  • Tomcat reports AXIS2 is working correctly (checking the AXIS2 happy page)
[INFO] Unable to sendViaPost to url[http://third.party.URL]
java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:168)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
    at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
    at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)

Any suggestions?

1
Have you checked whether the server can access the third party URL (with wget or curl or something like that)?Mat
Yes, by the time we had the issue we were able to reach the third-party url by curl... that was all the axis2 client options.Billy Tobon

1 Answers

6
votes

FOUND IT! actually is not something about the Tomcat server but the AXIS2 Client configuration, by this post http://wso2.org/forum/thread/1878

You might need to set the HEADER_PROTOCOL_10 in the stub properties.

Options options=stub._getServiceClient().getOptions();
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.HTTP_PROTOCOL_VERSION,org.apache.axis2.transport.http.HTTPConstants.HEADER_PROTOCOL_10);

Now works!!!