I want to be able to simulate a system that I'm integrating with. I'd like a route to return the contents of a file in a REST DSL route. Is it possible to do this in Camel? This is what I'd like to do:
restConfiguration() .component("jetty") .host("localhost") .port(1234) .bindingMode(RestBindingMode.off); rest().path("/mystuff") .get("/testing").bindingMode(RestBindingMode.json) .route() .setHeader(Exchange.CONTENT_TYPE).constant("application/json") <!-- set body to contents of file --> ??? .from("file:myfile.json"); ??? I tried adding the "from("file:myfile.json")" to my route, but the results do not come back.