You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by xinxinwang <wa...@bah.com> on 2009/07/09 17:24:53 UTC

SAXSource

I have a question regarding the SAXSource. If a web service uses Source mode
with SAXSource, will the returned data be sent back to the client in a
streaming way? If the data is very large, do I still need to worry about the
memory usage if using SAXSource?
-- 
View this message in context: http://www.nabble.com/SAXSource-tp24411461p24411461.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: SAXSource

Posted by Daniel Kulp <dk...@apache.org>.
On Thu July 9 2009 11:24:53 am xinxinwang wrote:
> I have a question regarding the SAXSource. If a web service uses Source
> mode with SAXSource, will the returned data be sent back to the client in a
> streaming way?

It depends on a couple things:   :-)

1) Version of CXF - DEFINITELY use 2.2.1 or newer (2.2.2 is current).  Prior 
versions would not have streamed it properly.

2) JAX-WS handlers - don't use them.  The JAX-WS handler APIs require a SAAJ 
SOAPMessage which would put the whole thing in memory.   If there are no SAAJ 
handlers we can stream.

3) Likewise, WS-Security related things require the full SAAJ model.

> If the data is very large, do I still need to worry about
> the memory usage if using SAXSource?

For the most part, using "normal" things, you won't need to worry.   The 
result will stream back fine.    

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog