Hello guys, I'm here again with probably quite obvious things that I haven't understood or missed. Let's describe my scenario. I want to provide REST interface on the "from()" side of the Camel route, and HTML/JSON/XML/etc stream on the other side, that is the "to()" side in Camel routes terms.
Right now, I don't have any "to()", because I don't know which component I should use there for my purpose. I just create the REST interface, then I do something in the route with help of Processor and then send the result back with in exchange.getOut().setBody(). I don't like that, I want to get rid of Processor and replace it with bean(s), I'm working on that. But what I should use as the "to()" side? Maybe my custom Component? It's producer, right? It will be producing data (XML or JSON, or whatever is the required format of data) computed by the inputs given via REST interface. Does Camel offers something what exactly match my situation? Btw, here is a simple snippet, how it works for me right now: from("restlet:{{rest.base}}/test") .process(new Processor() { @Override public void process(Exchange exchange) throws Exception { Response response = exchange.getIn().getHeader(RestletConstants.RESTLET_RESPONSE, Response.class); response.setEntity("test", MediaType.TEXT_PLAIN); exchange.getOut().setBody(response); } }); Thanks guys! -- S pozdravem Martin Stiborský Jabber: st...@njs.netlab.cz