camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dale King <d...@jadabeauty.com>
Subject Re: Jetty consumer - how to send reply?
Date Mon, 30 Sep 2013 13:51:01 GMT
Actually if you are trying to return one specific file there is probably an easier way. If
you set the body of a message to a java.io.File object pointing to the file you want and the
built-in type converters can convert that to an InputStream.

Setting up a file endpoint is way overkill. A file endpoint polls a directory looking for
a file. If you know exactly what file you want to send then what I described is easier and
faster.


On Sep 30, 2013, at 3:18 AM, alapaka <alapaka@rocketmail.com> wrote:

> Yep - pollEnrich works fine.
> 
> I tried using setBody() directly in the route like so:
> 
> from("jetty:http://localhost:8123/services?matchOnUriPrefix=true")
> .streamCaching()
> . setBody(body().append("TEST RESPONSE"))
> .end();
> 
> this does not seem to work... 
> any reason why?
> 
> thanks for the fast reply Claus
> 
> tusen takk og mvh
> ala
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Jetty-consumer-how-to-send-reply-tp5740450p5740459.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message