You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Radu Preotiuc-Pietro <ra...@bea.com> on 2006/11/08 03:23:01 UTC

RE: HttpUrl Input/Output stream problems

This exception comes from the parser and seems to indicate that the
stream gets truncated. Is there any way you can look at what the http
request looks like or replace the XMLBeans parse with a stream dump? I
am pretty sure that it's not a parse problem per se.

Radu 

-----Original Message-----
From: Alistair Young [mailto:alistair@smo.uhi.ac.uk] 
Sent: Friday, October 27, 2006 3:33 AM
To: user@xmlbeans.apache.org
Subject: HttpUrl Input/Output stream problems

Hi there,

I have an interesting problem and was wondering if anyone's seen it
before? I'm saving a document to an HttpUrl output stream and then
reading the result from the server and parsing a new document:

XmlOptions xmlOptions = new XmlOptions();
xmlOptions.setSavePrettyPrint(); xmlOptions.setSavePrettyPrintIndent(2);
xmlOptions.setUseDefaultNamespace();
...
OutputStream out = httpURL.getOutputStream(); efDoc.save(out,
xmlOptions); out.flush(); ...
InputStream in = httpURL.getInputStream(); EframeworkDocument
efResponseDoc = EframeworkDocument.Factory.parse(in);

it works fine the first 2 times. The 3rd time the server always throws
this exception:

org.apache.xmlbeans.XmlException: error: Unexpected end of file after
null

when it does:

SomeDocument doc = SomeDocument.Factory.parse(request.getInputStream());

thanks,

Alistair


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org