ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ryan.cup...@kodak.com
Subject Re: Help - Fatal error parsing XML
Date Wed, 01 May 2002 14:19:25 GMT
From: Ryan D. Cuprak

 Well, I finally figured out the error below that I posted last week. It
turns out that the proxy settings on my machine were not properly set  - it
was attempting to through the proxy server to communicate with another
machine that was behind the firewall. So the HTML output was from the proxy
server. I eventually discovered this by adding the following code to
MinML.java (default Sax parser)

InputStreamReader ind = new InputStreamReader(source.getByteStream());
int aletter;
PipedOutputStream pos = new PipedOutputStream();
PipedOutputStream pis = new PipedInputStream(pos);
while ( (aletter = ind.read()) != -1 ) {
     System.out.print ((char)aletter);
     pos.write(int)aletter);
}
parse(new InputStreamReader(pis));

I inserted this code into "public void parse(final InputSource source)
throws SaxException , IOException

My code snippet prints out the xml message which were sent to the server or
returned prior to being "parsed". A request on my part, would it be
possible to add a debug mode to that parser so that you can see the xml
before it is parsed? Also, how about adding support for detecting http
error codes (authentication/proxy failures) - so that an xmlrpc exception
is thrown instead of a cryptic sax exception.

-Ryan




To:   rpc-user@xml.apache.org
cc:
Subject:  Help - Fatal error parsing XML

From: Ryan D. Cuprak

Hello,
  I am at a loss about the following error message:

Fatal error parsing XML: end tag </H4> does not match begin tag <P>
Fatal error parsing XML: end tag <BODY> does not match begin tag <HR>
Fatal error parsing XML: end tag </HTML> does not match begin tag <H4>
Fatal error parsing XML: unexpected end of file found.

Code making the call:
Object obj = client.execute("partylineclient.recieve" , params );

(obj is null upon the return of this code).
I have validated that the server is running fine - I ran the commandline
program and cut and pasted the url/port/procedure/message from the program.
It is quite obvious that someone is sending back an HTML page but I have no
idea what the content of the page is nor why the xml-rpc server would send
such a page back.

Note, it doesn't matter what procedure I put in the execute, I always get
the same output.

Any help would be appreciated, I am not going to compile the xml-rpc code
into my program and set break points.

Thanks,
-Ryan





Mime
View raw message