Hi Take a look at the content enricher eip, and use <pollEnrich> to grab the file you want to enrich the message with.
http://camel.apache.org/content-enricher.html On Mon, Sep 30, 2013 at 7:11 AM, alapaka <[email protected]> wrote: > Hi all; > > I am playing around with the jetty component. Simple use case - I want to > receive a POST request, log the request body, read in a file and return the > file contents as the POST reply. > Here is the camel route: > > > from("jetty:http://localhost:8123/services?matchOnUriPrefix=true") > .log("Received Request\n----------------\n > ${body} > \n---------------------\n") > > .from("file:C:\\dev?fileName=TestResponse.xml&noop=true") > .log("Sending Response\n----------------\n > ${body} > \n---------------------\n") > .end(); > > All seems to be working - I get the request, see it in the log, read in the > file, see the file contents in the log; however the HTTP client gets an HTTP > 200 response code with no body (content-length=0); > > Obviously the response body is not being set... > Do I need to use a processor to get the Exchange through which I set the > response body? > i.e. > public void process(Exchange exch) throws Exception > {exch.getOut().setBody("some response");} > > Is there any other way to set the HTTP response body for a jetty consumer? > > aloha > ala > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Jetty-consumer-how-to-send-reply-tp5740450.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
