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 program/app workflow using java.net.HttpURLConnection and java.net.URL classes for "http://www.testURL.com/service/send.do"
/**** CODE SNIPPET STARTS ****/ // Enable logging System.setProperty("org.apache.commons.logging.Log","org.apache.commons.logging.impl.SimpleLog"); System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true"); System.setProperty("org.apache.commons.logging.simplelog.log.httpclient.wire.header", "debug"); String url = "http://testServicehost.com/service/myTestWebService"; //I use this in a method to get the response back HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); auth.setUsername ("user1"); auth.setPassword("passwd1"); auth.setDomain("DOMAIN"); auth.setHost("testServicehost.com"); List authPrefs = new ArrayList (1); authPrefs.add (AuthPolicy.NTLM); auth.setAuthSchemes (authPrefs); MyTestWebServiceSoapStub stub = new MyTestWebServiceSoapStub(url); stub._setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, auth); // Webservice requires authentication MyWSResponse res = stub.getXXXX(); res.getData(); //blah.. blah.. blah.. /**** CODE SNIPPET ENDS ****/ 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) Error: java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.testURL.com/service/send.do 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 axiom-impl-1.2.10.jar axis2-adb-1.5.4.jar axis2-kernel-1.5.4.jar axis2-transport-http-1.5.4.jar axis2-transport-local-1.5.4.jar geronimo-annotation_1.0_spec-1.1.jar httpcore-4.0.jar neethi-2.0.4.jar wstx-asl-3.2.9.jar XmlSchema-1.4.3.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,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 -- View this message in context: http://old.nabble.com/java.io.IOException%3A-Server-returned-HTTP-response-code%3A-503-for-URL-while-using-AXIS2-API-along-with-AXIS%2C-Apache-httpclient%2C-XML---parsing-APIs-tp32057205p32057205.html Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org For additional commands, e-mail: java-user-h...@axis.apache.org