java.io.IOException: Server returned HTTP response code: 503 for URL while using AXIS2 API along with AXIS, Apache httpclient, XML parsing APIs
I'm adding the following fragment to the existing application that is already communicating with another Web application for a service at the end of the workflow using java.net.HttpURLConnection and java.net.URL classes for "http://www.testURL.com/service/send.do"
Problem: Above code works fine and gets the desired data from "myTestWebService". but I'm getting the error "java.io.IOException: Server returned HTTP response code: 503 for URL"for the code that uses java.net.HttpURLConnection and java.net.URL to access "http://www.testURL.com/service/send.do" and sends an XML.we could see http connection is aborted by this (client) app immidiately or after transferring part of the XML data to the testURL.com
URL(some data received by testURL.com)
Environment/APIs used: Its a web application deployed in IBM websphere server 6.0, Java 6.0. axis(I think its ver.1 previous to axis2)(jar files:Activation, log4j, xalan.xerces..), JAXB, SAX and xpath parsers, apache httpclient.. in the , application for XML parsing, marshalling/unmarshalling and AXIS2(ver 1.5.4) for accessing myTestWebService AXIS2 jars added to existing application.. added by trial & err, added each jar whenever I get ClassNotFoundException axiom-api-1.2.10.jar
Application also hosts a webservice, gets 100 webservice requests per minute and goes through above workflow. Please note that we didn't close the http connection or disconnect http connection in the code for both "myTestWebService" and "testURL.com" URL. XML to testURL.com contains DTD in DOCTYPE (url:http://www.testURL.com/service/send.dtd)
Observation: We tried increasing connection timeout/socket timeout in AXIS2 org.apache.axis2.client.Options object, but of no use. Looks wierd but only after removing the axis2 jar library files and MyTestWebServiceSoapStub code from apllication(rollback to previous version), it works fine. We are not geting "java.io.IOException: Server returned HTTP response code: 503" http connection issues for testURL.com URL anymore.
Solution required: 1. Need to know why AXIS2(ver. 1.5.4) causing java.net.HttpURLConnection to abort connection and gives "java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.testURL.com/service/send.do" Required root cause for this behaviour.
2. Solution using AXIS2 library provided we get rid of "Server returned HTTP response code: 503" http connection problem.
Your help in this regard is much appreciated. Thanks-Kalyan
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: java.io.IOException: Server returned HTTP response code: 503 for URL while using AXIS2 API