This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Web Services and the fly likes org.xml.sax.SAXParseException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Web Services
Bookmark "org.xml.sax.SAXParseException" Watch "org.xml.sax.SAXParseException" New topic
Author

org.xml.sax.SAXParseException

Sridhar Sreenivasan
Greenhorn

Joined: Dec 08, 2005
Posts: 10
Hi,
Am new to web services and was able to make a simple web service that returned a string back work. Am implementing the web service in Java, running tomcat,using Axis. Then I wanted to return an object instead of a simple data type. I was able to create the wsdl files and the supporting classes. I created the jar and successfully deployed them too. When I invoke the service through a client program following is the message I get:
org.xml.sax.SAXParseException: The root element is required in a well-formed document.
Any thoughts on how to fix it?
Sridhar.
Sridhar Sreenivasan
Greenhorn

Joined: Dec 08, 2005
Posts: 10
If anyone is actuallu looking into it,please stop as I've figured it myself and it is working now.Thanks for those who were trying to figure it out.
Sridhar.
kali kali
Greenhorn

Joined: Sep 18, 2006
Posts: 1
Sridhar,
Do you remember how you fixed this, because Im facing same problem.
Thanks in advance,
Kali
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12791
    
    5
org.xml.sax.SAXParseException: The root element is required in a well-formed document.


This means that the start of the character stream fed to the parser was not formatted as an XML document - there are many possible causes. For example the server may be sending an error message in plain text.

I suggest using TCPMON or similar tool to look at the actual message content - that should give you a clue.

Bill
uj joshi
Greenhorn

Joined: Jun 07, 2013
Posts: 4
Hey Sridhar! Could you please help me to solve the similar type of issue. Actually I am facing the same issue.
 
GeeCON Prague 2014
 
subject: org.xml.sax.SAXParseException