camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Camel CXF RS: New Simple binding style for JAX-RS
Date Mon, 01 Apr 2013 08:45:14 GMT
Hi

This seems indeed much better.

It would be great with an example in examples, as well with a web page to
go along. We dont have any REST examples out of the box in Camel.
http://camel.apache.org/examples



On Sun, Mar 31, 2013 at 10:10 PM, Raul Kripalani <raul@evosent.com> wrote:

> 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
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message