Reputation: 15844
I would like to have a REST web service using Apache CXF and send incomming requests to a camel:route for processing. Is it possible to create a response synchronnously (if a error during the processing occurs) from the route or not?
Upvotes: 0
Views: 158
Reputation: 19626
Yes. In fact this is the default. You can either use camel-cxf to trigger the route or use a direct endpoint to send something into the route.
With the direct endpoint you would do the following:
producer = camelContext.createProducerTemplate();
try {
result = producer.requestBody("direct:test", myContent);
} catch (Exception e) { ... }
The respective route then would have to start with:
from("direct:test")...
Upvotes: 1