Use the content enricher EIP to pickup the file from your servlet route
http://camel.apache.org/content-enricher.html

Use the pollEnrich for consuming the file.

To call other routes, use the direct component and link them together.

But in your use-case the correct solution is pollEnrich.

Or you can also just do a message transformation and set the body to a
java.io.File type with the name of the file to pickup



On Thu, Mar 24, 2016 at 10:13 AM, dnvycumt <[email protected]> wrote:
> Hi,
> from a web service, I want to return some file content to response:
>    <route>
>         <from uri="jetty:http://0.0.0.0:9081"/>
>         <if possible call another route such as route_id="read-file">
>     </route>
>     <route>
>       <from uri="file:src/data?noop=true"/>
>       <to ..... />
>     </route>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/one-route-how-to-call-another-route-tp5779618.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to