I have done that now but I'm not clear on what the response object should be.
I've tried using an attachment but then I get in trouble setting the
DataSource. Is there a particular DataSource I should use then?


bimargulies wrote:
> 
> Well, you could make a rather interesting InputStream that pulled objects
> from your ResultSetExtractor and put that into the DataHandler, so the
> data
> would never be sitting all in one place.
> 
> On Sun, Oct 25, 2009 at 7:33 PM, Ronald Pieterse
> <[email protected]>wrote:
> 
>>
>> I'm all SOAPy and of course you're right about DataSources but in that
>> case
>> the whole source would have to be completely available somewhere, right?
>> I
>> should have the bytes ready either in memory or in a file or something.
>> What I want to do is get thousands of objects from the database using a
>> ResultSetExtractor which allows me to loop through the resultset and then
>> handle each record separately and send it directly to the client, as I
>> loop
>> through the resultset.
>> The first bit I got working fine - has nothing to do with cxf - but the
>> streaming to the client per object / row is the problem. How would I do
>> that? What would be my response object etc?
>>
>> The client would preferably just use an InputStream or something to get
>> the
>> data, just like with an attachment.
>>
>> Thanx for the quick response.
>>
>>
>> bimargulies wrote:
>> >
>> > Well, let's see. AFAIK, none of the myriad of WS-* things that we have
>> in
>> > CXF directly addresses this, but you many be overly pessimistic about
>> some
>> > aspects. Are you SOAP-y on both ends, or is this a JAX-RS sort of
>> > business?
>> >
>> > CXF doesn't always make temp files out of outgoing attachments. If you
>> > have
>> > a DataHandler / DataSource, it will just pump the bytes.
>> >
>> > HOWEVER, the client side raises harder problems. I'm imagining some
>> sort
>> > of
>> > custom interceptor that would grab the content before MTOM processing
>> has
>> > a
>> > chance to do whatever it normally does, and calls you back.
>> >
>> > This all assumes that you are responsible for data format management;
>> none
>> > of the data bindings that I am familiar with can handle any concept of
>> > incrementally unmarshalling objects and handing them to you.
>> >
>> > People have whole object caching systems for this sort of thing ...
>> >
>> > On Sun, Oct 25, 2009 at 6:35 PM, Ronald Pieterse
>> > <[email protected]>wrote:
>> >
>> >>
>> >> Hi,
>> >>
>> >> I have a question about streaming with CXF. I'm already using
>> Attachments
>> >> which works fine but now I need something even more powerful.
>> >> I have a huge amount of objects that i retrieve from the database in a
>> >> 'streaming' fashion (using Spring's ResultSetExtractor) and now I want
>> to
>> >> stream them directly to the client, per object if that is at all
>> >> possible.
>> >> I don't want to use an attachment because that would require a temp
>> file
>> >> or
>> >> something like that. And it would also require me to change the
>> signature
>> >> of
>> >> the call.
>> >>
>> >> What are my options here? I'm using CXF 2.1.4 btw.
>> >> THNX
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Really-Streaming-objects-to-the-service-client-tp26052541p26052541.html
>> >> Sent from the cxf-user mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Really-Streaming-objects-to-the-service-client-tp26052541p26052998.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Really-Streaming-objects-to-the-service-client-tp26052541p26057582.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to