Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6B0A711D3D for ; Thu, 11 Sep 2014 10:20:14 +0000 (UTC) Received: (qmail 55823 invoked by uid 500); 11 Sep 2014 10:20:14 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 55770 invoked by uid 500); 11 Sep 2014 10:20:14 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 55761 invoked by uid 99); 11 Sep 2014 10:20:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2014 10:20:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2014 10:20:09 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 70BF82388B56 for ; Thu, 11 Sep 2014 10:19:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r921855 [7/14] - in /websites/production/camel/content: ./ cache/ Date: Thu, 11 Sep 2014 10:19:21 -0000 To: commits@camel.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140911101924.70BF82388B56@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: websites/production/camel/content/content-enricher.html ============================================================================== --- websites/production/camel/content/content-enricher.html (original) +++ websites/production/camel/content/content-enricher.html Thu Sep 11 10:19:20 2014 @@ -86,39 +86,20 @@ -

Content Enricher

- -

Camel supports the Content Enricher from the EIP patterns using a Message Translator, an arbitrary Processor in the routing logic, or using the enrich DSL element to enrich the message.

- -

- -

Content enrichment using a Message Translator or a Processor

- -

Using the Fluent Builders

- -

You can use Templating to consume a message from one destination, transform it with something like Velocity or XQuery, and then send it on to another destination. For example using InOnly (one way messaging)

-
- -
-

If you want to use InOut (request-reply) semantics to process requests on the My.Queue queue on ActiveMQ with a template generated response, then sending responses back to the JMSReplyTo Destination you could use this:

-
- -
-

Here is a simple example using the DSL directly to transform the message body

-
+

Here is a simple example using the DSL directly to transform the message body

-
-

In this example we add our own Processor using explicit Java code

-
+

In this example we add our own Processor using explicit Java code

-
-

Finally we can use Bean Integration to use any Java method on any bean to act as the transformer

-
- -
-

For further examples of this pattern in use you could look at one of the JUnit tests

- - - -

Using Spring XML

-
- -
- -

-

Content enrichment using the enrich DSL element

- -

Camel comes with two flavors of content enricher in the DSL

-
  • enrich
  • pollEnrich
- - -

enrich uses a Producer to obtain the additional data. It is usually used for Request Reply messaging, for instance to invoke an external web service.
-pollEnrich on the other hand uses a Polling Consumer to obtain the additional data. It is usually used for Event Message messaging, for instance to read a file or download a FTP file.

- -
+

Content enrichment using the enrich DSL element

Camel comes with two flavors of content enricher in the DSL

  • enrich
  • pollEnrich

enrich uses a Producer to obtain the additional data. It is usually used for Request Reply messaging, for instance to invoke an external web service.
pollEnrich on the other hand uses a Polling Consumer to obtain the additional data. It is usually used for Event Message messaging, for instance to read a file or download a FTP file.

Data from current Exchange not used

Icon
- -

pollEnrich or enrich does not access any data from the current Exchange which means when polling it cannot use any of the existing headers you may have set on the Exchange. For example you cannot set a filename in the Exchange.FILE_NAME header and use pollEnrich to consume only that file. For that you must set the filename in the endpoint URI.

- -

Instead of using enrich you can use Recipient List and have dynamic endpoints and define an AggregationStrategy on the Recipient List which then would work as a enrich would do.

+

pollEnrich or enrich does not access any data from the current Exchange which means when polling it cannot use any of the existing headers you may have set on the Exchange. For example you cannot set a filename in the Exchange.FILE_NAME header and use pollEnrich to consume only that file. For that you must set the filename in the endpoint URI.

Instead of using enrich you can use Recipient List and have dynamic endpoints and define an AggregationStrategy on the Recipient List which then would work as a enrich would do.

- - -

Enrich Options

- -
-

Name

Default Value

Description

uri

 

The endpoint uri for the external service to enrich from. You must use either uri or ref.

ref

 

Refers to the endpoint for the external service to enrich from. You must use either uri or ref.

strategyRef

 

Refers to an AggregationStrategy to be used to merge the reply from the external service, into a single outgoing message. By default Camel will use the reply from the external service as outgoing message. From Camel 2.12 onwards you can also use a POJO as the AggregationStrategy, see the Aggregate page for more details.

strategyMethodName

 

Camel 2.12: This option can be used to explicit declare the method name to use, when using POJOs as the AggregationStrategy. See the Aggregate page for more details.

strategyMethodAllowNull

false

Camel 2.12: If this option is false then the aggregate method is not used if there was no data to enrich. If this option is true then null values is used as the oldExchange (when no data to enrich), when using POJOs as the AggregationStrategy. See the Aggregate page for more details.

-
- - -

Using the Fluent Builders

- -
- -
- -

The content enricher (enrich) retrieves additional data from a resource endpoint in order to enrich an incoming message (contained in the original exchange). An aggregation strategy is used to combine the original exchange and the resource exchange. The first parameter of the AggregationStrategy.aggregate(Exchange, Exchange) method corresponds to the the original exchange, the second parameter the resource exchange. The results from the resource endpoint are stored in the resource exchange's out-message. Here's an example template for implementing an aggregation strategy:

- -
- -
- -

Using this template the original exchange can be of any pattern. The resource exchange created by the enricher is always an in-out exchange.

- -

Using Spring XML

- -

The same example in the Spring DSL

- -
- -
- -

Aggregation strategy is optional

-

The aggregation strategy is optional. If you do not provide it Camel will by default just use the body obtained from the resource.

-
- -
-

In the route above the message sent to the direct:result endpoint will contain the output from the direct:resource as we do not use any custom aggregation.

- -

And for Spring DSL just omit the strategyRef attribute:

-
- -
- -

Content enrichment using pollEnrich

-

The pollEnrich works just as the enrich however as it uses a Polling Consumer we have 3 methods when polling

-
  • receive
  • receiveNoWait
  • receive(timeout)
- - -

PollEnrich Options

- -
-

Name

Default Value

Description

uri

 

The endpoint uri for the external service to enrich from. You must use either uri or ref.

ref

 

Refers to the endpoint for the external service to enrich from. You must use either uri or ref.

strategyRef

 

Refers to an AggregationStrategy to be used to merge the reply from the external service, into a single outgoing message. By default Camel will use the reply from the external service as outgoing message. From Camel 2.12 onwards you can also use a POJO as the AggregationStrategy, see the Aggregate page for more details.

strategyMethodName

 

Camel 2.12: This option can be used to explicit declare the method name to use, when using POJOs as the AggregationStrategy. See the Aggregate page for more details.

strategyMethodAllowNull

false

Camel 2.12: If this option is false then the aggregate method is not used if there was no data to enrich. If this option is true then null values is used as the oldExchange (when no data to enrich), when using POJOs as the AggregationStrategy. See the Aggregate page for more details.

timeout

-1

Timeout in millis when polling from the external service. See below for important details about the timeout.

-
- -
+

Content enrichment using pollEnrich

The pollEnrich works just as the enrich however as it uses a Polling Consumer we have 3 methods when polling

  • receive
  • receiveNoWait
  • receive(timeout)

PollEnrich Options

Name

Default Value

Description

uri

 

The endpoint uri for the external service to enrich from. You must use either uri or ref.

ref

 

Refers to the endpoint for the external service to enrich from. You must use either uri or ref.

strategyRef

 

Refers to an AggregationStrategy to be used to merge the reply from the external service, into a single outgoing message. By default Camel will use the reply from the ex ternal service as outgoing message. From Camel 2.12 onwards you can also use a POJO as the AggregationStrategy, see the Aggregate page for more details.

strategyMethodName

 

Camel 2.12: This option can be used to explicit declare the method name to use, when using POJOs as the AggregationStrategy. See the Aggregate page for more details.

strategyMethodAllowNull

false

Camel 2.12: If this option is fals e then the aggregate method is not used if there was no data to enrich. If this option is true then null values is used as the oldExchange (when no data to enrich), when using POJOs as the AggregationStrategy. See the Aggregate page for more details.

timeout

-1

Timeout in millis when polling from the external service. See below for important details about the timeout.

aggregateOnExceptionfalseCamel 2.14: If this option is false then the aggregat e method is not used if there was an exception thrown while trying to retrieve the data to enrich from the resource. Setting this option to true allows end users to control what to do if there was an exception in the aggregate method. For example to suppress the exception or set a custom message body etc.

Good practice to use timeout value

Icon
- -

By default Camel will use the receive. Which may block until there is a message available. It is therefore recommended to always provide a timeout value, to make this clear that we may wait for a message, until the timeout is hit.

+

By default Camel will use the receive. Which may block until there is a message available. It is therefore recommended to always provide a timeout value, to make this clear that we may wait for a message, until the timeout is hit.

- - -

If there is no data then the newExchange in the aggregation strategy is null.

- -

You can pass in a timeout value that determines which method to use

-
  • if timeout is -1 or other negative number then receive is selected (Important: the receive method may block if there is no message)
  • if timeout is 0 then receiveNoWait is selected
  • otherwise receive(timeout) is selected
- - -

The timeout values is in millis.

- -
+

If there is no data then the newExchange in the aggregation strategy is null.

You can pass in a timeout value that determines which method to use

  • if timeout is -1 or other negative number then receive is selected (Important: the receive method may block if there is no message)
  • if timeout is 0 then receiveNoWait is selected
  • otherwise receive(timeout) is selected

The timeout values is in millis.

Data from current Exchange not used

Icon
- -

pollEnrich does not access any data from the current Exchange which means when polling it cannot use any of the existing headers you may have set on the Exchange. For example you cannot set a filename in the Exchange.FILE_NAME header and use pollEnrich to consume only that file. For that you must set the filename in the endpoint URI.

+

pollEnrich does not access any data from the current Exchange which means when polling it cannot use any of the existing headers you may have set on the Exchange. For example you cannot set a filename in the Exchange.FILE_NAME header and use pollEnrich to consume only that file. For that you must set the filename in the endpoint URI.

- - -

Example

- -

In this example we enrich the message by loading the content from the file named inbox/data.txt.

-
- -
- -

And in XML DSL you do:

-
- -
- -

If there is no file then the message is empty. We can use a timeout to either wait (potentially forever) until a file exists, or use a timeout to wait a certain period.

- -

For example to wait up to 5 seconds you can do:

-
- -
- - -

Using This Pattern

+

Using This Pattern

If you would like to use this EIP Pattern then please read the Getting Started, you may also find the Architecture useful particularly the description of Endpoint and URIs. Then you could try out some of the Examples first before trying this pattern out.

Modified: websites/production/camel/content/contributing.html ============================================================================== --- websites/production/camel/content/contributing.html (original) +++ websites/production/camel/content/contributing.html Thu Sep 11 10:19:20 2014 @@ -98,7 +98,7 @@ mvn eclipse:eclipse

or

-

Submitting patches

The easiest way to submit a patch is to

  • create a new JIRA issue (you will need to register),
  • attach the patch or tarball as an attachment
  • tick the Patch Attached button on the issue

We prefer patches has unit tests as well and that these unit tests have proper assertions as well, so remember to replace your system.out or logging with an assertion instead!

Working with Git

There are several ways how Git users could improve Camel with their prefered tool:

  • Apache Git Mirror
  • Pull request at Github

Apache Git Mirror

Cloning the Apache git repo.

+

Submitting patches

The easiest way to submit a patch is to

  • create a new JIRA issue (you will need to register),
  • attach the patch or tarball as an attachment
  • tick the Patch Attached button on the issue

We prefer patches has unit tests as well and that these unit tests have proper assertions as well, so remember to replace your system.out or logging with an assertion instead!

Working with Git

There are several ways how Git users could improve Camel with their prefered tool:

  • Apache Git Mirror
  • Pull request at Github

Apache Git Mirror

Cloning the Apache git repo.

Bringing your modifications back to Apache is the same workflow as described before.

Pull request at Github

There is also a Git repository at Github which you could fork. Then you submit patches as any other github project - eg work on a new feature branch and send a pull request. One of the committers then needs to accept your pull request to bring the code  to the ASF codebase. After the code has been included into the ASF codebase, you need to close the pull request because we can't do that...

More resources

Git is not a brand new technology and therefore Camel is not the only ASF project thinking about using it. So here are some more resources you mind find useful:

Becoming a committer

Once you've got involved as above, we may well invite you to be a committer. See How do I become a committer for more details.

Using the issue tracker

Before you can raise an issue in the issue tracker you need to register with it. This is quick & painless .

If you want to have a go at fixing an issue you need to be in the list of activemq-developers on the issue tracker. To join the group, please mail the dev@camel.apache.org mail list with the email address you used to register with the issue tracker and we'll add you to the group.

Becomming a committer

The first step is contributing to the project; if you want to take that a step forward and become a fellow committer on the project then see the Committer Guide

Modified: websites/production/camel/content/correlation-identifier.html ============================================================================== --- websites/production/camel/content/correlation-identifier.html (original) +++ websites/production/camel/content/correlation-identifier.html Thu Sep 11 10:19:20 2014 @@ -36,6 +36,16 @@ + + + + + + + Apache Camel: Correlation Identifier @@ -75,21 +85,17 @@ <tbody> <tr> <td valign="top" width="100%"> -<div class="wiki-content maincontent"><h3 id="CorrelationIdentifier-CorrelationIdentifier">Correlation Identifier</h3> - -<p>Camel supports the <a shape="rect" class="external-link" href="http://www.enterpriseintegrationpatterns.com/CorrelationIdentifier.html" rel="nofollow">Correlation Identifier</a> from the <a shape="rect" href="enterprise-integration-patterns.html">EIP patterns</a> by getting or setting a header on a <a shape="rect" href="message.html">Message</a>. </p> - -<p>When working with the <a shape="rect" href="activemq.html">ActiveMQ</a> or <a shape="rect" href="jms.html">JMS</a> components the correlation identifier header is called <strong>JMSCorrelationID</strong>. You can add your own correlation identifier to any message exchange to help correlate messages together to a single conversation (or business process).</p> - -<p><img class="confluence-embedded-image confluence-external-resource" src="http://www.enterpriseintegrationpatterns.com/img/CorrelationIdentifierSolution.gif" data-image-src="http://www.enterpriseintegrationpatterns.com/img/CorrelationIdentifierSolution.gif"></p> - -<p>The use of a Correlation Identifier is key to working with the <a shape="rect" href="bam.html">Camel Business Activity Monitoring Framework</a> and can also be highly useful when testing with simulation or canned data such as with the <a shape="rect" href="mock.html">Mock testing framework</a></p> - -<p>Some <a shape="rect" href="eip.html">EIP</a> patterns will spin off a sub message, and in those cases, Camel will add a correlation id on the <a shape="rect" href="exchange.html">Exchange</a> as a property with they key <code>Exchange.CORRELATION_ID</code>, which links back to the source <a shape="rect" href="exchange.html">Exchange</a>. For example the <a shape="rect" href="splitter.html">Splitter</a>, <a shape="rect" href="multicast.html">Multicast</a>, <a shape="rect" href="recipient-list.html">Recipient List</a>, and <a shape="rect" href="wire-tap.html">Wire Tap</a> EIP does this.</p> - -<h4 id="CorrelationIdentifier-SeeAlso">See Also</h4> - -<ul><li><a shape="rect" href="bam.html">BAM</a></li></ul></div> +<div class="wiki-content maincontent"><h3 id="CorrelationIdentifier-CorrelationIdentifier">Correlation Identifier</h3><p>Camel supports the <a shape="rect" class="external-link" href="http://www.enterpriseintegrationpatterns.com/CorrelationIdentifier.html" rel="nofollow">Correlation Identifier</a> from the <a shape="rect" href="enterprise-integration-patterns.html">EIP patterns</a> by getting or setting a header on a <a shape="rect" href="message.html">Message</a>.</p><p>When working with the <a shape="rect" href="activemq.html">ActiveMQ</a> or <a shape="rect" href="jms.html">JMS</a> components the correlation identifier header is called <strong>JMSCorrelationID</strong>. You can add your own correlation identifier to any message exchange to help correlate messages together to a single conversation (or business process).</p><p><img class="confluence-embedded-image confluence-external-resource" src="http://www.enterpriseintegrationpatterns.com/img/CorrelationIdentifierSolution.gif" d ata-image-src="http://www.enterpriseintegrationpatterns.com/img/CorrelationIdentifierSolution.gif"></p><p>The use of a Correlation Identifier is key to working with the <a shape="rect" href="bam.html">Camel Business Activity Monitoring Framework</a> and can also be highly useful when testing with simulation or canned data such as with the <a shape="rect" href="mock.html">Mock testing framework</a></p><p>Some <a shape="rect" href="eip.html">EIP</a> patterns will spin off a sub message, and in those cases, Camel will add a correlation id on the <a shape="rect" href="exchange.html">Exchange</a> as a property with they key <code>Exchange.CORRELATION_ID</code>, which links back to the source <a shape="rect" href="exchange.html">Exchange</a>. For example the <a shape="rect" href="splitter.html">Splitter</a>, <a shape="rect" href="multicast.html">Multicast</a>, <a shape="rect" href="recipient-list.html">Recipient List</a>, and <a shape="rect" href="wire-tap.html">Wire Tap</a> EIP does this .</p><p>The following example demonstrates using the Camel JMSMessageID as the Correlation Identifier within a request/reply pattern in the <a shape="rect" href="jms.html">JMS</a> component</p><p><strong>Using the <a shape="rect" href="fluent-builders.html">Fluent Builders</a></strong></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from("direct:start") + .to(ExchangePattern.InOut,"jms:queue:foo?useMessageIDAsCorrelationID=true") + .to("mock:result");]]></script> +</div></div><p> </p><p><strong><strong>Using the <a shape="rect" href="spring-xml-extensions.html">Spring XML Extensions</a></strong></strong></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[<route> + <from uri="direct:start"/> + <to uri="jms:queue:foo?useMessageIDAsCorrelationID=true" pattern="InOut"/> + <to uri="mock:result"/> +</route>]]></script> +</div></div><h4 id="CorrelationIdentifier-SeeAlso">See Also</h4><ul><li><a shape="rect" href="bam.html">BAM</a></li></ul></div> </td> <td valign="top"> <div class="navigation"> Modified: websites/production/camel/content/cxf.html ============================================================================== --- websites/production/camel/content/cxf.html (original) +++ websites/production/camel/content/cxf.html Thu Sep 11 10:19:20 2014 @@ -99,11 +99,11 @@ </div> </div> <p>The <strong>cxf:</strong> component provides integration with <a shape="rect" href="http://cxf.apache.org">Apache CXF</a> for connecting to JAX-WS services hosted in CXF.</p><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1407575856959 {padding: 0px;} -div.rbtoc1407575856959 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1407575856959 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1410430649764 {padding: 0px;} +div.rbtoc1410430649764 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1410430649764 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1407575856959"> +/*]]>*/</style></p><div class="toc-macro rbtoc1410430649764"> <ul class="toc-indentation"><li><a shape="rect" href="#CXF-CXFComponent">CXF Component</a> <ul class="toc-indentation"><li><a shape="rect" href="#CXF-URIformat">URI format</a></li><li><a shape="rect" href="#CXF-Options">Options</a> <ul class="toc-indentation"><li><a shape="rect" href="#CXF-Thedescriptionsofthedataformats">The descriptions of the dataformats</a> Modified: websites/production/camel/content/cxfrs.html ============================================================================== --- websites/production/camel/content/cxfrs.html (original) +++ websites/production/camel/content/cxfrs.html Thu Sep 11 10:19:20 2014 @@ -108,7 +108,7 @@ </div></div><p>Where <strong>rsEndpoint</strong> represents the spring bean's name which presents the CXFRS client or server</p><p>For either style above, you can append options to the URI as follows:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[cxfrs:bean:cxfEndpoint?resourceClasses=org.apache.camel.rs.Example ]]></script> -</div></div><h3 id="CXFRS-Options">Options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Example</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Required?</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>default value</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>resourceClasses</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The resource classes which you want to export as REST service. Multiple classes can be separated by comma.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>resourceClasses=org.apache.camel.rs.Example1,</code><br clear="none"> <code>org.apache.camel.rs.Exchange2</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>resourceClass</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Deprecated</strong>: Use <code>resourceClasses</code> The resource class which you want to export as REST service.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>resourceClass =org.apache.camel.rs.Example1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>httpClientAPI</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>new to Camel 2.1</strong> If it is true, the CxfRsProducer will use the HttpClientAPI to invoke the service <br clear="none" class="atl-forced-newline"> If it is false, the CxfRsProducer will use the ProxyClientAPI to invoke the service</p></td><td colspan="1" r owspan="1" class="confluenceTd"><p>httpClientAPI=true</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>true</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>synchronous</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in 2.5, this option will let CxfRsConsumer decide to use sync or async API to do the underlying work. The default value is false which means it will try to use async API by default.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>synchronous=true</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>throwExceptionOnFailure</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in 2.6, this option tells the CxfRsProducer to inspect return codes and will generate an Exception if the return cod e is larger than 207.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>throwExceptionOnFailure=true</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>true</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maxClientCacheSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in 2.6, you can set a IN message header CamelDestinationOverrideUrl to dynamically override the target destination Web Service or REST Service defined in your routes.  The implementation caches CXF clients or ClientFactoryBean in CxfProvider and CxfRsProvider.  This option allows you to configure the maximum size of the cache.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>maxClientCacheSize=5</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>10</p></td></tr><tr><td colspan="1" rowspan="1" cl ass="confluenceTd"><p><code>setDefaultBus</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in 2.9.0. Will set the default bus when CXF endpoint create a bus by itself</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>setDefaultBus=true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bus</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in 2.9.0. A default bus created by CXF Bus Factory. Use <code>#</code> notation to reference a bus object from the registry. The referenced object must be an instance of <code>org.apache.cxf.Bus</code>.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bus=#busName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>None</em ></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bindingStyle</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>As of 2.11</strong>. Sets how requests and responses will be mapped to/from Camel. Two values are possible:</p><ul class="alternate"><li><code>SimpleConsumer</code> => see the <a shape="rect" href="#CXFRS-ConsumingaRESTRequest-SimpleBindingStyle">Consuming a REST Request with the Simple Binding Style</a> below.</li><li><code>Default</code> => the default style. For consumers this passes on a <code>MessageContentsList</code> to the route, requiring low-level processing in the route.</li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bindingStyle=SimpleConsumer</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>Default</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="line-heigh t: 1.4285715;">providers</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.4285715;">Since Camel 2.12.2</strong><span style="line-height: 1.4285715;"> set custom JAX-RS providers list to the CxfRs endpoint.</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>providers=#MyProviders</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="line-height: 1.4285715;">schemaLocations</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.4285715;">Since Camel 2.12.2</strong><span style="line-height: 1.4285715;"> Sets the locations of the schemas which can be used to validate the incoming XML or JAXB-driven JSON.</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>schemaLocations=#My SchemaLocations</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="line-height: 1.4285715;">features</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.4285715;">Since Camel 2.12.3</strong><span style="line-height: 1.4285715;"> Set the feature list to the CxfRs endpoint.</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>features=#MyFeatures</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>properties</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.4285715;">Since Camel 2.12.4</strong><span style="li ne-height: 1.4285715;"> Set the properties to the CxfRs endpoint.</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>properties=#MyProperties</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>inInterceptors</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.4285715;">Since Camel 2.12.4</strong><span style="line-height: 1.4285715;"> Set the inInterceptors to the CxfRs endpoint.</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>inInterceptors=#MyInterceptors</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>outInterceptors</p></td><td colspan="1 " rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.4285715;">Since Camel 2.12.4</strong><span style="line-height: 1.4285715;"> Set the outInterceptor to the CxfRs endpoint.</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="line-height: 1.4285715;">outInterceptors=#MyInterceptors</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="line-height: 1.4285715;">No</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>inFaultInterceptors</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.4285715;">Since Camel 2.12.4</strong><span style="line-height: 1.4285715;"> Set the inFaultInterceptors to the CxfRs endpoint.</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="line-height: 1.4285715;">inFaultInterceptors=#MyInterceptors</s pan></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="line-height: 1.4285715;">No</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>outFaultIntercetpros</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.4285715;">Since Camel 2.12.4</strong><span style="line-height: 1.4285715;"> Set the outFaultInterceptors to the CxfRs endpoint.</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="line-height: 1.4285715;">outFaultInterceptors=#MyInterceptors</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="line-height: 1.4285715;">No</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>continuationTimeout</p></td><td colspa n="1" rowspan="1" class="confluenceTd"><p><span style="line-height: 1.4285715;"><strong>Since</strong> </span><strong style="line-height: 1.4285715;">Camel 2.14.0 </strong><span style="line-height: 1.4285715;">This option is used to set the CXF continuation timeout which could be used in CxfConsumer by default when the CXF server is using Jetty or Servlet transport. (Before </span><strong style="line-height: 1.4285715;">Camel 2.14.0</strong><span style="line-height: 1.4285715;">, CxfConsumer just set the continuation timeout to be 0, which means the continuation suspend operation never timeout.)</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="line-height: 1.4285715;">continuationTimeout=800000</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">30000</em></p></td></tr></tbody></table></div><p>You can also configure the CXF R EST endpoint through the spring configuration. Since there are lots of difference between the CXF REST client and CXF REST Server, we provide different configuration for them.<br clear="none"> Please check out the <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/main/resources/schema/cxfEndpoint.xsd">schema file</a> and <a shape="rect" class="external-link" href="https://cwiki.apache.org/CXF20DOC/JAX-RS">CXF JAX-RS documentation</a> for more information.</p><h3 id="CXFRS-HowtoconfiguretheRESTendpointinCamel">How to configure the REST endpoint in Camel</h3><p>In <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/main/resources/schema/cxfEndpoint.xsd">camel-cxf schema file</a>, there are two elements for the REST endpoint definition. <strong>cxf:rsServer</strong> for REST consumer, <strong>cxf:rsClient</strong> for REST producer.<br clear="none"> You can find a Camel REST service route configuration example here.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><h3 id="CXFRS-Options">Options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Example</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Required?</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>default value</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>resourceClasses</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The resource classes which you want to export as REST service. Multiple classes can be separated by comma.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>resourceClasses=org.apache.camel.rs.Example1,</code><br clear="none"> <code>org.apache.camel.rs.Exchange2</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>resourceClass</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Deprecated</strong>: Use <code>resourceClasses</code> The resource class which you want to export as REST service.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>resourceClass =org.apache.camel.rs.Example1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>httpClientAPI</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>new to Camel 2.1</strong> If it is true, the CxfRsProducer will use the HttpClientAPI to invoke the service <br clear="none" class="atl-forced-newline"> If it is false, the CxfRsProducer will use the ProxyClientAPI to invoke the service</p></td><td colspan="1" r owspan="1" class="confluenceTd"><p>httpClientAPI=true</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>true</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>synchronous</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in 2.5, this option will let CxfRsConsumer decide to use sync or async API to do the underlying work. The default value is false which means it will try to use async API by default.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>synchronous=true</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>throwExceptionOnFailure</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in 2.6, this option tells the CxfRsProducer to inspect return codes and will generate an Exception if the return cod e is larger than 207.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>throwExceptionOnFailure=true</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>true</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maxClientCacheSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in 2.6, you can set a IN message header CamelDestinationOverrideUrl to dynamically override the target destination Web Service or REST Service defined in your routes.  The implementation caches CXF clients or ClientFactoryBean in CxfProvider and CxfRsProvider.  This option allows you to configure the maximum size of the cache.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>maxClientCacheSize=5</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>10</p></td></tr><tr><td colspan="1" rowspan="1" cl ass="confluenceTd"><p><code>setDefaultBus</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in 2.9.0. Will set the default bus when CXF endpoint create a bus by itself</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>setDefaultBus=true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bus</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in 2.9.0. A default bus created by CXF Bus Factory. Use <code>#</code> notation to reference a bus object from the registry. The referenced object must be an instance of <code>org.apache.cxf.Bus</code>.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bus=#busName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>None</em ></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bindingStyle</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>As of 2.11</strong>. Sets how requests and responses will be mapped to/from Camel. Two values are possible:</p><ul class="alternate"><li><code>SimpleConsumer</code> => see the <a shape="rect" href="#CXFRS-ConsumingaRESTRequest-SimpleBindingStyle">Consuming a REST Request with the Simple Binding Style</a> below.</li><li><code>Default</code> => the default style. For consumers this passes on a <code>MessageContentsList</code> to the route, requiring low-level processing in the route.</li><li><span style="font-family: monospace;">Custom</span> => allows you to specify a custom binding through the <code>binding</code> option.</li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bindingStyle=SimpleConsumer</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>Default</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><span>binding</span></td><td colspan="1" rowspan="1" class="confluenceTd">Allows you to specify a custom <code>CxfRsBinding</code> implementation to perform low-level processing of the raw CXF request and response objects. The implementation must be bound in the Camel registry, and you must use the hash (#) notation to refer to it.</td><td colspan="1" rowspan="1" class="confluenceTd"><code><span>binding=#myBinding</span></code></td><td colspan="1" rowspan="1" class="confluenceTd">No</td><td colspan="1" rowspan="1" class="confluenceTd"><code>DefaultCxfRsBinding</code></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="line-height: 1.4285715;">providers</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.4285715;">Since Camel 2.12.2</strong><span style="line-height: 1.4285715;"> set custom JAX-RS providers list to the CxfRs endpoint.</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>providers=#MyProviders</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="line-height: 1.4285715;">schemaLocations</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.4285715;">Since Camel 2.12.2</strong><span style="line-height: 1.4285715;"> Sets the locations of the schemas which can be used to validate the incoming XML or JAXB-driven JSON.</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>schemaLocations=#MySchemaLocations</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">None</em></p>< /td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="line-height: 1.4285715;">features</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.4285715;">Since Camel 2.12.3</strong><span style="line-height: 1.4285715;"> Set the feature list to the CxfRs endpoint.</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>features=#MyFeatures</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>properties</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.4285715;">Since Camel 2.12.4</strong><span style="line-height: 1.4285715;"> Set the properties to the CxfRs endpoint.</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>properties=#MyProperties</code></p></ td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>inInterceptors</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.4285715;">Since Camel 2.12.4</strong><span style="line-height: 1.4285715;"> Set the inInterceptors to the CxfRs endpoint.</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>inInterceptors=#MyInterceptors</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>outInterceptors</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.4285715;">Since Camel 2.12.4</strong><span style="line-height: 1.4285715;"> Set th e outInterceptor to the CxfRs endpoint.</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code><span style="line-height: 1.4285715;">outInterceptors=#MyInterceptors</span></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="line-height: 1.4285715;">No</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>inFaultInterceptors</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.4285715;">Since Camel 2.12.4</strong><span style="line-height: 1.4285715;"> Set the inFaultInterceptors to the CxfRs endpoint.</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code><span style="line-height: 1.4285715;">inFaultInterceptors=#MyInterceptors</span></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="line-height: 1.4285715;">No</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>outFaultIntercetpros</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.4285715;">Since Camel 2.12.4</strong><span style="line-height: 1.4285715;"> Set the outFaultInterceptors to the CxfRs endpoint.</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code><span style="line-height: 1.4285715;">outFaultInterceptors=#MyInterceptors</span></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="line-height: 1.4285715;">No</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">None</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>continuationTimeout</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="line-height: 1.4285715;"><strong>Since</strong> </s pan><strong style="line-height: 1.4285715;">Camel 2.14.0 </strong><span style="line-height: 1.4285715;">This option is used to set the CXF continuation timeout which could be used in CxfConsumer by default when the CXF server is using Jetty or Servlet transport. (Before </span><strong style="line-height: 1.4285715;">Camel 2.14.0</strong><span style="line-height: 1.4285715;">, CxfConsumer just set the continuation timeout to be 0, which means the continuation suspend operation never timeout.)</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code><span style="line-height: 1.4285715;">continuationTimeout=800000</span></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em style="line-height: 1.4285715;">30000</em></p></td></tr></tbody></table></div><p>You can also configure the CXF REST endpoint through the spring configuration. Since there are lots of difference between the CXF REST client and CXF REST Server, we provide different configuration for them.<br clear="none"> Please check out the <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/main/resources/schema/cxfEndpoint.xsd">schema file</a> and <a shape="rect" class="external-link" href="https://cwiki.apache.org/CXF20DOC/JAX-RS">CXF JAX-RS documentation</a> for more information.</p><h3 id="CXFRS-HowtoconfiguretheRESTendpointinCamel">How to configure the REST endpoint in Camel</h3><p>In <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/main/resources/schema/cxfEndpoint.xsd">camel-cxf schema file</a>, there are two elements for the REST endpoint definition. <strong>cxf:rsServer</strong> for REST consumer, <strong>cxf:rsClient</strong> for REST producer.<br clear="none"> You can find a Camel REST service route configuration example here.</p><div class="code panel pdl" style="border -width: 1px;"><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[ <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Modified: websites/production/camel/content/event-driven-consumer.html ============================================================================== --- websites/production/camel/content/event-driven-consumer.html (original) +++ websites/production/camel/content/event-driven-consumer.html Thu Sep 11 10:19:20 2014 @@ -36,6 +36,16 @@ <![endif]--> + <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css' rel='stylesheet' type='text/css' /> + <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' rel='stylesheet' type='text/css' /> + <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script> + <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script> + <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script> + + <script type="text/javascript"> + SyntaxHighlighter.defaults['toolbar'] = false; + SyntaxHighlighter.all(); + </script> <title> Apache Camel: Event Driven Consumer @@ -75,20 +85,15 @@ <tbody> <tr> <td valign="top" width="100%"> -<div class="wiki-content maincontent"><h3 id="EventDrivenConsumer-EventDrivenConsumer">Event Driven Consumer</h3> - -<p>Camel supports the <a shape="rect" class="external-link" href="http://www.enterpriseintegrationpatterns.com/EventDrivenConsumer.html" rel="nofollow">Event Driven Consumer</a> from the <a shape="rect" href="enterprise-integration-patterns.html">EIP patterns</a>. The default consumer model is event based (i.e. asynchronous) as this means that the Camel container can then manage pooling, threading and concurrency for you in a declarative manner.</p> - -<p><img class="confluence-embedded-image confluence-external-resource" src="http://www.enterpriseintegrationpatterns.com/img/EventDrivenConsumerSolution.gif" data-image-src="http://www.enterpriseintegrationpatterns.com/img/EventDrivenConsumerSolution.gif"></p> - -<p>The Event Driven Consumer is implemented by consumers implementing the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Processor.html">Processor</a> interface which is invoked by the <a shape="rect" href="message-endpoint.html">Message Endpoint</a> when a <a shape="rect" href="message.html">Message</a> is available for processing.</p> - -<p>For more details see</p> - -<ul><li><a shape="rect" href="message.html">Message</a></li><li><a shape="rect" href="message-endpoint.html">Message Endpoint</a></li></ul> - - -<h4 id="EventDrivenConsumer-UsingThisPattern">Using This Pattern</h4> +<div class="wiki-content maincontent"><h3 id="EventDrivenConsumer-EventDrivenConsumer">Event Driven Consumer</h3><p>Camel supports the <a shape="rect" class="external-link" href="http://www.enterpriseintegrationpatterns.com/EventDrivenConsumer.html" rel="nofollow">Event Driven Consumer</a> from the <a shape="rect" href="enterprise-integration-patterns.html">EIP patterns</a>. The default consumer model is event based (i.e. asynchronous) as this means that the Camel container can then manage pooling, threading and concurrency for you in a declarative manner.</p><p><img class="confluence-embedded-image confluence-external-resource" src="http://www.enterpriseintegrationpatterns.com/img/EventDrivenConsumerSolution.gif" data-image-src="http://www.enterpriseintegrationpatterns.com/img/EventDrivenConsumerSolution.gif"></p><p>The Event Driven Consumer is implemented by consumers implementing the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apid ocs/org/apache/camel/Processor.html">Processor</a> interface which is invoked by the <a shape="rect" href="message-endpoint.html">Message Endpoint</a> when a <a shape="rect" href="message.html">Message</a> is available for processing.</p><h4 id="EventDrivenConsumer-Example">Example</h4><p>The following demonstrates a <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Processor.html">Processor</a> defined in the Camel  <a shape="rect" href="registry.html">Registry</a> which is invoked when an event occurs from a <a shape="rect" href="jms.html">JMS</a> queue</p><p><strong><br clear="none"></strong></p><p><strong>Using the <a shape="rect" href="fluent-builders.html">Fluent Builders</a></strong></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from("jms:queue:foo") + .processRef("processor");]]></script> +</div></div><p> </p><p><strong><strong>Using the <a shape="rect" href="spring-xml-extensions.html">Spring XML Extensions</a></strong></strong></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[<route> + <from uri="jms:queue:foo"/> + <to uri="processor"/> +</route>]]></script> +</div></div><p> </p><p>For more details see</p><ul><li><a shape="rect" href="message.html">Message</a></li><li><a shape="rect" href="message-endpoint.html">Message Endpoint</a></li></ul><p></p><h4 id="EventDrivenConsumer-UsingThisPattern">Using This Pattern</h4> <p>If you would like to use this EIP Pattern then please read the <a shape="rect" href="getting-started.html">Getting Started</a>, you may also find the <a shape="rect" href="architecture.html">Architecture</a> useful particularly the description of <a shape="rect" href="endpoint.html">Endpoint</a> and <a shape="rect" href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" href="examples.html">Examples</a> first before trying this pattern out.</p></div> </td>