atom feed6 messages in org.apache.ws.axis-userRe: Problem calling Web Service -> HT...
FromSent OnAttachments
Jan FreitagJul 23, 2009 3:38 am 
Andreas VeithenJul 23, 2009 11:52 am 
Jan FreitagJul 23, 2009 2:19 pm 
Andreas VeithenJul 23, 2009 3:09 pm 
Jan FreitagJul 28, 2009 10:29 am 
Andreas VeithenJul 28, 2009 11:44 am 
Subject:Re: Problem calling Web Service -> HTTP 503 error
From:Andreas Veithen (andr@gmail.com)
Date:Jul 23, 2009 3:09:42 pm
List:org.apache.ws.axis-user

Jan,

This is what happens in this case:

1. Your client sends a request to the server. 2. That request is rejected by the server and it sends back an HTML error page (instead of a SOAP fault). The particularity here is that the error page is XHTML and contains a reference (system ID) to the corresponding DTD. 3. Axis2 receives that response and tries to parse it (using StAX). 4. The StAX parser, seeing the reference to the DTD, tries to load that document (from the address you see in the error message: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd). 5. The W3C site probably has a policy in place that blocks access to the DTD to some User-Agents. They do this to protect themselves against libraries/products that repeatedly attempt to download the same DTD (or XML schema) without apparent need for it. 6. StAX gets back an HTTP error 503 (Service unavailable) and reports that as an exception. This is what you see in the logs.

Conclusion:

- Obviously there is an issue in Axis2: we should not allow the StAX parser to download DTDs from foreign sites. Note that DTDs are never used in SOAP messages. - In your case, the 503 error from www.w3.org obscures the actual error which occurs in your server. Since you are using HTTPS, probably the only way to find out what happens is to look at the server logs or increase the log level of the client (to DEBUG or even TRACE) to see at least the HTTP status line received from the server.

Regards,

Andreas

On Thu, Jul 23, 2009 at 23:19, Jan Freitag<Jan_@gmx.de> wrote:

Hi Andreas,

yes here it is:

org.apache.axis2.AxisFault: java.lang.RuntimeException: [was class java.io.IOException] Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)        at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:90)        at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:353)        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)        at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)        at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)        at server.LSFData.RoomDataClient.getLSFData(RoomDataClient.java:210)        at server.LSFData.RoomDataClient.getUni(RoomDataClient.java:231)        at server.LSFData.RoomSearch.<init>(RoomSearch.java:24)        at server.LSFData.RoomSearch.<clinit>(RoomSearch.java:18)        at server.servlets.MainPageServlet.handleRequest(MainPageServlet.java:47)        at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doRequest(VelocityViewServlet.java:545)        at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doGet(VelocityViewServlet.java:509)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)        at java.lang.Thread.run(Unknown Source) Caused by: org.apache.axiom.om.OMException: java.lang.RuntimeException: [was class java.io.IOException] Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd        at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:249)        at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:156)        at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:105)        at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:677)        at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:182)        at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:112)        at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:88)        ... 29 more Caused by: java.lang.RuntimeException: [was class java.io.IOException] Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd        at com.ctc.wstx.util.ExceptionUtil.throwRuntimeException(ExceptionUtil.java:18)        at com.ctc.wstx.sr.StreamScanner.throwLazyError(StreamScanner.java:706)        at com.ctc.wstx.sr.BasicStreamReader.safeFinishToken(BasicStreamReader.java:3655)        at com.ctc.wstx.sr.BasicStreamReader.getText(BasicStreamReader.java:809)        at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:224)        ... 35 more Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)        at java.net.URL.openStream(Unknown Source)        at com.ctc.wstx.util.URLUtil.optimizedStreamFromURL(URLUtil.java:113)        at com.ctc.wstx.io.DefaultInputResolver.sourceFromURL(DefaultInputResolver.java:256)        at com.ctc.wstx.io.DefaultInputResolver.resolveEntity(DefaultInputResolver.java:96)        at com.ctc.wstx.sr.ValidatingStreamReader.findDtdExtSubset(ValidatingStreamReader.java:468)        at com.ctc.wstx.sr.ValidatingStreamReader.finishDTD(ValidatingStreamReader.java:358)        at com.ctc.wstx.sr.BasicStreamReader.finishToken(BasicStreamReader.java:3735)        at com.ctc.wstx.sr.BasicStreamReader.safeFinishToken(BasicStreamReader.java:3647)        ... 37 more java.io.EOFException: no more input        at gnu.xml.aelfred2.XmlParser.popInput(XmlParser.java:3869)        at gnu.xml.aelfred2.XmlParser.readCh(XmlParser.java:3199)        at gnu.xml.aelfred2.XmlParser.tryRead(XmlParser.java:3947)        at gnu.xml.aelfred2.XmlParser.tryRead(XmlParser.java:3935)        at gnu.xml.aelfred2.XmlParser.tryEncodingDecl(XmlParser.java:3542)        at gnu.xml.aelfred2.XmlParser.pushURL(XmlParser.java:3403)        at gnu.xml.aelfred2.XmlParser.doParse(XmlParser.java:159)        at gnu.xml.aelfred2.SAXDriver.parse(SAXDriver.java:320)        at gnu.xml.aelfred2.XmlReader.parse(XmlReader.java:294)        at gnu.xml.dom.JAXPFactory$JAXPBuilder.parse(JAXPFactory.java:186)        at server.LSFData.RoomDataClient.parseBuildings(RoomDataClient.java:326)        at server.LSFData.RoomDataClient.getUni(RoomDataClient.java:233)        at server.LSFData.RoomSearch.<init>(RoomSearch.java:24)        at server.LSFData.RoomSearch.<clinit>(RoomSearch.java:18)        at server.servlets.MainPageServlet.handleRequest(MainPageServlet.java:47)        at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doRequest(VelocityViewServlet.java:545)        at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doGet(VelocityViewServlet.java:509)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)        at java.lang.Thread.run(Unknown Source) org.apache.axis2.AxisFault: java.lang.RuntimeException: [was class java.io.IOException] Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)        at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:90)        at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:353)        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)        at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)        at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)        at server.LSFData.RoomDataClient.getLSFData(RoomDataClient.java:210)        at server.LSFData.RoomDataClient.getUni(RoomDataClient.java:235)        at server.LSFData.RoomSearch.<init>(RoomSearch.java:24)        at server.LSFData.RoomSearch.<clinit>(RoomSearch.java:18)        at server.servlets.MainPageServlet.handleRequest(MainPageServlet.java:47)        at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doRequest(VelocityViewServlet.java:545)        at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doGet(VelocityViewServlet.java:509)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)        at java.lang.Thread.run(Unknown Source) Caused by: org.apache.axiom.om.OMException: java.lang.RuntimeException: [was class java.io.IOException] Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd        at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:249)        at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:156)        at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:105)        at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:677)        at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:182)        at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:112)        at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:88)        ... 29 more Caused by: java.lang.RuntimeException: [was class java.io.IOException] Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd        at com.ctc.wstx.util.ExceptionUtil.throwRuntimeException(ExceptionUtil.java:18)        at com.ctc.wstx.sr.StreamScanner.throwLazyError(StreamScanner.java:706)        at com.ctc.wstx.sr.BasicStreamReader.safeFinishToken(BasicStreamReader.java:3655)        at com.ctc.wstx.sr.BasicStreamReader.getText(BasicStreamReader.java:809)        at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:224)        ... 35 more Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)        at java.net.URL.openStream(Unknown Source)        at com.ctc.wstx.util.URLUtil.optimizedStreamFromURL(URLUtil.java:113)        at com.ctc.wstx.io.DefaultInputResolver.sourceFromURL(DefaultInputResolver.java:256)        at com.ctc.wstx.io.DefaultInputResolver.resolveEntity(DefaultInputResolver.java:96)        at com.ctc.wstx.sr.ValidatingStreamReader.findDtdExtSubset(ValidatingStreamReader.java:468)        at com.ctc.wstx.sr.ValidatingStreamReader.finishDTD(ValidatingStreamReader.java:358)        at com.ctc.wstx.sr.BasicStreamReader.finishToken(BasicStreamReader.java:3735)        at com.ctc.wstx.sr.BasicStreamReader.safeFinishToken(BasicStreamReader.java:3647)        ... 37 more java.io.EOFException: no more input        at gnu.xml.aelfred2.XmlParser.popInput(XmlParser.java:3869)        at gnu.xml.aelfred2.XmlParser.readCh(XmlParser.java:3199)        at gnu.xml.aelfred2.XmlParser.tryRead(XmlParser.java:3947)        at gnu.xml.aelfred2.XmlParser.tryRead(XmlParser.java:3935)        at gnu.xml.aelfred2.XmlParser.tryEncodingDecl(XmlParser.java:3542)        at gnu.xml.aelfred2.XmlParser.pushURL(XmlParser.java:3403)        at gnu.xml.aelfred2.XmlParser.doParse(XmlParser.java:159)        at gnu.xml.aelfred2.SAXDriver.parse(SAXDriver.java:320)        at gnu.xml.aelfred2.XmlReader.parse(XmlReader.java:294)        at gnu.xml.dom.JAXPFactory$JAXPBuilder.parse(JAXPFactory.java:186)        at server.LSFData.RoomDataClient.parseRooms(RoomDataClient.java:254)        at server.LSFData.RoomDataClient.getUni(RoomDataClient.java:236)        at server.LSFData.RoomSearch.<init>(RoomSearch.java:24)        at server.LSFData.RoomSearch.<clinit>(RoomSearch.java:18)        at server.servlets.MainPageServlet.handleRequest(MainPageServlet.java:47)        at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doRequest(VelocityViewServlet.java:545)        at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doGet(VelocityViewServlet.java:509)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)        at java.lang.Thread.run(Unknown Source)

Am 23.07.2009 um 20:53 schrieb Andreas Veithen:

Jan,

Can you please post the complete stacktrace?

On Thu, Jul 23, 2009 at 12:38, Jan Freitag<jan_@gmx.de> wrote:

Hi,

I have a problem with a web service. I wrote a axis2 web service client and it worked with a Web Service on "server 1" . Now I tried to use the same web service but on another server ("server 2").

The axis method sendRecieve throws an axis fault and the error is:

org.apache.axis2.AxisFault: java.lang.RuntimeException: [was class java.io.IOException] Server returned HTTP response code: 503 for URL:http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) ....... .....

The URL of the web service on "sever 2" is https. I have no idea how to solve the problem.

Any ideas? Thanks in advance!

JF