You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Brian Ewins <Br...@btinternet.com> on 2002/09/11 15:33:56 UTC

Re: Message Based Web Services

I'd take a look at the messages going over the wire with a proxy (use 
tcptunnelgui or  capeclear's excellent and free nettool - 
http://www.capescience.com/downloads/index.shtml )

that error message means you're not actually sending xml to the 
server[1]. Its seeing the HTTP headers then a blank document or maybe 
some untagged text. Its possible that you are actually sending the doc, 
but the server isnt seeing it because you've set Content-Length: 0 or 
something like that.

-Baz

[1] I say this because its a 'Server.userException' but the stacktrace 
below it makes it look like the problem might be in the other direction. 
Either way, nettool will show you whats actually being passed.

Ed Saikali wrote:
> Hi 
> 
> I am having a very hard time tracking this AXIS error for a  message
> based web service. I have service deployed to axis and according to
> tcpmon I can see the SOAP request being sent to the localhost:8808
> (tomcat) however I keep getting this a SAX parsing exception. I tried
> stepping into the AXIS code in hope of finding out why what was going on
> but no luck so far. Any help would be appreciated.
> 
> Thanks
> Ed 
> 
> ------------
> AxisFault
>  faultCode: {http://xml.apache.org/axis/}Server.userException
>  faultString: org.xml.sax.SAXParseException: Document root element is
> missing.
>  faultActor: null
>  faultDetail: 
> 	stackTrace: org.xml.sax.SAXParseException: Document root element
> is missing.
> 	at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)
> 	at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3170)
> 	at
> org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:501)
> 	at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
> 	at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
> 	at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
> 	at
> org.apache.axis.encoding.DeserializationContextImpl.parse(Deserializatio
> nContextImpl.java:219)
> 	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:535)
> 	at org.apache.axis.Message.getSOAPEnvelope(Message.java:368)
> 	at org.apache.axis.client.Call.invokeEngine(Call.java:2103)
> 	at org.apache.axis.client.Call.invoke(Call.java:2073)
> 	at org.apache.axis.client.Call.invoke(Call.java:1287)
> 	at
> com.octanewave.nexusws.order.OrderWebServiceClient.main(OrderWebServiceC
> lient.java:44)
> 
> org.xml.sax.SAXParseException: Document root element is missing.
> 	at org.apache.axis.AxisFault.makeFault(AxisFault.java:115)
> 	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:540)
> 	at org.apache.axis.Message.getSOAPEnvelope(Message.java:368)
> 	at org.apache.axis.client.Call.invokeEngine(Call.java:2103)
> 	at org.apache.axis.client.Call.invoke(Call.java:2073)
> 	at org.apache.axis.client.Call.invoke(Call.java:1287)
> 	at
> com.octanewave.nexusws.order.OrderWebServiceClient.main(OrderWebServiceC
> lient.java:44)
> Caused by: org.xml.sax.SAXParseException: Document root element is
> missing.
> 	at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)
> 	at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3170)
> 	at
> org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:501)
> 	at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
> 	at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
> 	at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
> 	at
> org.apache.axis.encoding.DeserializationContextImpl.parse(Deserializatio
> nContextImpl.java:219)
> 	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:535)
> 	... 5 more
> Exception in thread "main" 
> 
> 
> 


RE: Message Based Web Services

Posted by Ed Saikali <ed...@intelligenceaids.com>.
I still have not been able to track down this problem. Here is the SOAP
the HTTP Request which is generating the SAX exception you see below.
Does this request look it should be generating a SAX exception while it
is being parsed?

----------
POST /axis/services/NexusOrderService HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related,
text/*
User-Agent: Axis/beta3
Host: localhost:8081
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 331

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body><SubmitOrder xmlns="blaaaaaahahahaaah">
hello axis
</SubmitOrder> </soapenv:Body>
</soapenv:Envelope>


-----Original Message-----
From: Brian Ewins [mailto:Brian.Ewins@btinternet.com] 
Sent: Wednesday, September 11, 2002 9:34 AM
To: axis-user@xml.apache.org
Subject: Re: Message Based Web Services


I'd take a look at the messages going over the wire with a proxy (use 
tcptunnelgui or  capeclear's excellent and free nettool - 
http://www.capescience.com/downloads/index.shtml )

that error message means you're not actually sending xml to the 
server[1]. Its seeing the HTTP headers then a blank document or maybe 
some untagged text. Its possible that you are actually sending the doc, 
but the server isnt seeing it because you've set Content-Length: 0 or 
something like that.

-Baz

[1] I say this because its a 'Server.userException' but the stacktrace 
below it makes it look like the problem might be in the other direction.

Either way, nettool will show you whats actually being passed.

Ed Saikali wrote:
> Hi
> 
> I am having a very hard time tracking this AXIS error for a  message 
> based web service. I have service deployed to axis and according to 
> tcpmon I can see the SOAP request being sent to the localhost:8808
> (tomcat) however I keep getting this a SAX parsing exception. I tried 
> stepping into the AXIS code in hope of finding out why what was going 
> on but no luck so far. Any help would be appreciated.
> 
> Thanks
> Ed
> 
> ------------
> AxisFault
>  faultCode: {http://xml.apache.org/axis/}Server.userException
>  faultString: org.xml.sax.SAXParseException: Document root element is 
> missing.
>  faultActor: null
>  faultDetail: 
> 	stackTrace: org.xml.sax.SAXParseException: Document root element
is 
> missing.
> 	at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)
> 	at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3170)
> 	at
> org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:501)
> 	at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
> 	at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
> 	at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
> 	at 
> org.apache.axis.encoding.DeserializationContextImpl.parse(Deserializat
> io
> nContextImpl.java:219)
> 	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:535)
> 	at org.apache.axis.Message.getSOAPEnvelope(Message.java:368)
> 	at org.apache.axis.client.Call.invokeEngine(Call.java:2103)
> 	at org.apache.axis.client.Call.invoke(Call.java:2073)
> 	at org.apache.axis.client.Call.invoke(Call.java:1287)
> 	at
>
com.octanewave.nexusws.order.OrderWebServiceClient.main(OrderWebServiceC
> lient.java:44)
> 
> org.xml.sax.SAXParseException: Document root element is missing.
> 	at org.apache.axis.AxisFault.makeFault(AxisFault.java:115)
> 	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:540)
> 	at org.apache.axis.Message.getSOAPEnvelope(Message.java:368)
> 	at org.apache.axis.client.Call.invokeEngine(Call.java:2103)
> 	at org.apache.axis.client.Call.invoke(Call.java:2073)
> 	at org.apache.axis.client.Call.invoke(Call.java:1287)
> 	at 
> com.octanewave.nexusws.order.OrderWebServiceClient.main(OrderWebServic
> eC
> lient.java:44)
> Caused by: org.xml.sax.SAXParseException: Document root element is
> missing.
> 	at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)
> 	at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3170)
> 	at
> org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:501)
> 	at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
> 	at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
> 	at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
> 	at
>
org.apache.axis.encoding.DeserializationContextImpl.parse(Deserializatio
> nContextImpl.java:219)
> 	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:535)
> 	... 5 more
> Exception in thread "main" 
> 
> 
>