Well, I know why it's NOT working.....   With the PipedIn/Out things, CXF 
pretty much sits in a loop reading from the InputStream and writing to the 
HTTP OutputStream.   Since there is no way to know that you requested a 
"flush" in there, that loop just loops until the close at which point it 
would flush and close the output.   

You may need to wait for Sergey to be back next week, but you COULD look at 
returning a "StreamingOutput" object where you could get the raw 
OutputStream and do the periodic writes as needed.     With my few minutes 
of research, that's what I came up with.  :-)   Sergey may have better 
ideas.

Dan


On Friday, June 08, 2012 01:47:07 PM Thorsten Höger wrote:
> Hi,
> 
> I'm currently devloping a REST API for our software and I need streaming
> functionality.
> 
> I'm using CXF with Jetty and wiring with Spring.
> 
> I tried it with the attached code, but if I do a curl on the address ti
> blocks until Message 5 and the prints all lines.
> 
> I expected it to print each line on its own with 1 second break.
> 
> Can anybody give me a hint what I am doing wrong?
> 
> Regards and thanks
> 
> Thorsten
-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to