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:[EMAIL PROTECTED] Sent: Friday, October 27, 2006 3:33 AM To: [email protected] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _______________________________________________________________________ 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

