users@jaxb.java.net

Unmarshalling more than one root element from an InputStream

From: Karlo Berket <kberket_at_lbl.gov>
Date: Thu, 06 Feb 2003 16:42:48 -0700

I am interested in using JAXB to send and receive XML data over a TCP connection. If I marshal objects to an OutputStream and try to unmarshal them one by one through an InputStream, I get an error. I have run multiple tests and these are my conclusions regarding the beta implementation:

1) I can only unmarshal one root element from an InputStream.
2) When reading from an InputStream associated with a Socket, I have to close the corresponding OutputStream on the remote end before the object is unmarshalled.

Does anyone know if there are any plans for JAXB allow me to unmarshal multiple root objects from an InputStream, i.e. is this a limitation/bug of the beta release or part of the specification?