Hi
On 20/09/12 12:13, Muller, Anthony wrote:
Hello Sergey,

When JAXB is used for data binding, is there a way to stream the output instead 
of waiting to build the whole object structure to return?

This will be very useful when we have large object tree to build!

JAX-RS offers StreamingOutput interface and the implementations can write to and flush the output stream immediately after a portion of XML has been written to it. However I guess it also implies that one has to do more than only delegate to JAXB to marshall say "MyBigDataModel" but perhaps wrap some parts of the mode into JAXP Source, etc.

One other thing I know is that if you wrap a model into JAXP Source on the output then by default CXF StaxSource will be used to push the data out.

I'm not sure how else CXF can specifically help with enabling the JAXB-based streaming on the output.

Dan, do you know of any other JAXB or CXF techniques that can help ?

Cheers, Sergey

Thanks,
Anthony

Reply via email to