Hi users, As you may know, Camel has supported JAX-RS under the camel-cxfrs component for a long time now.
However, the support has been rather low-level, requiring the user to manually process the MessageContentsList object coming into the route. Thus tightly coupling the route logic with the method signature and parameter indices of the JAX-RS operation. Somewhat inelegant, difficult and error-prone. As of Camel 2.11 (soon to be released), there's a new Simple binding style performing with these improvements: * JAX-RS Parameters (@HeaderParam, @QueryParam, etc.) are injected as IN message headers. * The request entity (POJO or other type) becomes the IN message body. * Binary @Multipart body parts become attachments, supporting DataHandler, InputStream, DataSource and CXF's Attachment class. * Non-binary @Multipart body parts are mapped as IN message headers. The Response mapping has also improved, now recognising custom Responses, the Exchange.HTTP_RESPONSE_CODE header, and more. This binding style can be activated by setting the bindingStyle parameter to 'SimpleConsumer'. Examples and more info here [1]. Or here [2] for the impatient (the Camel site takes a while to update from the Wiki). [1] http://camel.apache.org/cxfrs.html#CXFRS-ConsumingaRESTRequestSimpleBindingStyle [2] https://cwiki.apache.org/confluence/display/CAMEL/CXFRS#CXFRS-ConsumingaRESTRequestSimpleBindingStyle Regards, *Raúl Kripalani* Enterprise Architect, Open Source Integration specialist, Program Manager | Apache Camel Committer http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk