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 6E04917798 for ; Fri, 19 Jun 2015 09:20:36 +0000 (UTC) Received: (qmail 85974 invoked by uid 500); 19 Jun 2015 09:20:36 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 85927 invoked by uid 500); 19 Jun 2015 09:20:36 -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 85918 invoked by uid 99); 19 Jun 2015 09:20:36 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jun 2015 09:20:36 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id F2C3EAC0B79 for ; Fri, 19 Jun 2015 09:20:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r955357 [2/2] - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache cxfrs.html Date: Fri, 19 Jun 2015 09:20:35 -0000 To: commits@camel.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150619092035.F2C3EAC0B79@hades.apache.org> Modified: websites/production/camel/content/cxfrs.html ============================================================================== --- websites/production/camel/content/cxfrs.html (original) +++ websites/production/camel/content/cxfrs.html Fri Jun 19 09:20:35 2015 @@ -108,7 +108,7 @@

Where rsEndpoint represents the spring bean's name which presents the CXFRS client or server

For either style above, you can append options to the URI as follows:

-

Options

< td colspan="1" rowspan="1" class="confluenceTd">

properties=#MyProperties

Name

Description

Example

Required?

default value

resourceClasses

The resource classes which you want to export as REST service. Multiple classes can be separated by comma.

resourceClasses=org.apache.camel.rs.Example1,
org.apache.camel.rs.Exchange2

No

None

resourceClass

Deprecated: Use resourceClasses The resource class which you want to export as REST service.

resourceClass =org.apache.camel.rs.Example1

No

None

httpClientAPI

new to Camel 2.1 If it is true, the CxfRsProducer will use the HttpClientAPI to invoke the service
If it is false, the CxfRsProducer will use the ProxyClientAPI to invoke the service

httpClientAPI=true

No

true

synchronous

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.

synchronous=true

No

false

throwExceptionOnFailure

New in 2.6, this option tells the CxfRsProducer to inspect return codes and will generate an E xception if the return code is larger than 207.

throwExceptionOnFailure=true

No

true

maxClientCacheSize

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.

maxClientCacheSize=5

No

10

setDefaultBus

New in 2.9.0. Will set the default bus when CXF endpoint create a bus by itself

setDefaultBus=true

No

false

bus

New in 2.9.0. A default bus created by CXF Bus Factory. Use # notation to reference a bus object from the registry. The referenced object must be an instance of org.apache.cxf.Bus.

bus=#busName

No

None

bindingStyle

As of 2.11. Sets how requests and responses will be mapped to/from Camel. Two values are possible:

  • SimpleConsumer => see the Consuming a REST Request with the Simple Binding Style below.
  • Default => the default style. For consumers this passes on a MessageContentsList to the route, requiring low-level processing in the route.
  • Custom => allows you to specify a custom binding through the binding option.

bindingStyle=SimpleConsumer

No

Default

binding

Allows you to specify a custom CxfRsBinding 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.binding=#myBindingNoDefaultCxfRsBinding

providers

Since Camel 2.12.2< span style="line-height: 1.4285715;"> set custom JAX-RS providers list to the CxfRs endpoint.

providers=#MyProviders

No

None

schemaLocations

Since Camel 2.12.2 Sets the locations of the schemas which can be used to validate the incoming XML or JAXB-driven JSON.

schemaLocations=#MySchemaLocations

No

None

features

Since Camel 2.12.3 Set the feature list to the CxfRs endpoint.

features=#MyFeatures

No

None

properties

Since Camel 2.12.4 Set the properties to the CxfRs endpoint.

No

None

inInterceptors

Since Camel 2.12.4 Set the inInterceptors to the CxfRs endpoint.

inInterceptors=#MyInterceptors

No

None

outInterceptors

Since Camel 2.12.4 Set the outInterceptor to the CxfRs endpoint.

outInterceptors=#MyInterceptors

No

None

inFaultInterceptors

Since Camel 2.12.4 Set the inFaultInterceptors to the CxfRs endpoint.

inFaultInterceptors=#My Interceptors

No

None

outFaultIntercetpros

Since Camel 2.12.4 Set the outFaultInterceptors to the CxfRs endpoint.

outFaultInterceptors=#MyInterceptors

No

None

continuationTimeout

Since Camel 2.14.0 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 Camel 2.14.0, CxfConsumer just set the continuation timeout to be 0, which means the continuation suspend operation never timeout.)

continuationTimeout=800000

No

30000

ignoreDeleteMethodMessageBodySince Camel 2.14.1 This option is used to tell CxfRsProducer to ignore the message body of the DELETE method when using HTTP API.ignoreDeleteMethodMessageBody=trueNofalse

modelRef

Since Camel 2.14.2 This option is used to specify the model file which is useful for the resource class without annotation.

Sin ce Camel 2.15 This option can point to a model file without specifying a service class for emulating document-only endpoints

modelRef=classpath:/CustomerServiceModel.xml

NoNone

performInvocation

Since Camel 2.15 When the option is true, camel will perform the invocation of the resource class instance and put the response object into the exchange for further processing.

performInvocation= true

Nofalse
propagateContextsSince Camel 2.15 When the option is true, JAXRS UriInfo, HttpHeaders, Request and SecurityContext contexts will be available to custom CXFRS processors as typed Camel exchange properties. These contexts can be used to analyze the current requests using JAX-RS API.   

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.
Please check out the schema file and CXF JAX-RS documentation for more information.

How to configure the REST endpoint in Camel

In camel-cxf schema file, there are two elements for the REST endpoint definition. cxf:rsServer for REST consumer, cxf:rsClient for REST producer.
You can find a Camel REST service route configuration example here.

+

Options

Name

Description

Example

Required?

default value

resourceClasses

The resource classes which you want to export as REST service. Multiple classes can be separated by comma.

resourceClasses=org.apache.camel.rs.Example1,
org.apache.camel.rs.Exchange2

No

None

resourceClass

Deprecated: Use resourceClasses The resource class which you want to export as REST service.

resourceClass =org.apache.camel.rs.Example1

No

None

httpClientAPI

new to Camel 2.1 If it is true, the CxfRsProducer will use the HttpClientAPI to invoke the service
If it is false, the CxfRsProducer will use the ProxyClientAPI to invoke the service

httpClientAPI=true

No

true

synchronous

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.

synchronous=true

No

false

throwExceptionOnFailure

New in 2.6, this option tells the CxfRsProducer to inspect return codes and will generate an E xception if the return code is larger than 207.

throwExceptionOnFailure=true

No

true

maxClientCacheSize

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.

maxClientCacheSize=5

No

10

setDefaultBus

New in 2.9.0. deprecated use defaultBus option from Camel 2.16 onwards. Will set the default bus when CXF endpoint create a bus by itself

setDefaultBus=true

No

false

defaultBusCamel 2.16: Will set the default bus when CXF endpoint create a bus by itselfdefaultBus=trueNofalse

bus

New in 2.9.0. A default bus created by CXF Bus Factory. Use # notation to reference a bus object from the registry. The referenced object must be an instance of org.apache.cxf.Bus.

bus=#busName

No

None

bindingStyle

As of 2.11. Sets how requests and responses will be mapped to/from Camel. Two values are possible:

  • SimpleConsumer => see the Consuming a REST Request with th e Simple Binding Style below.
  • Default => the default style. For consumers this passes on a MessageContentsList to the route, requiring low-level processing in the route.
  • Custom => allows you to specify a custom binding through the binding option.

bindingStyle=SimpleConsumer

No

Default

binding

Allows you to specify a custom CxfRsBinding 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.binding=#myBindingNoDefaultCxfRsBinding

providers

Since Camel 2.12.2 set custom JAX-RS providers list to the CxfRs endpoint.

providers=#MyProviders

No

None

schemaLocations

Since Camel 2.12.2 Sets the locations of the schemas which can be used to validate the incoming XML or JAXB-driven JSON.

schemaLocations=#MySchemaLocations

No

None

features

Since Camel 2.12.3 Set the feature list to the CxfRs endpoint.

features=#MyFeatures

No

None

properties

Since Camel 2.12.4 Set the properties to the CxfRs endpoint.

properties=#MyProperties

No

None

inInterceptors

Since Camel 2. 12.4 Set the inInterceptors to the CxfRs endpoint.

inInterceptors=#MyInterceptors

No

None

outInterceptors

Since Camel 2.12.4 Set the outInterceptor to the CxfRs endpoint.

outInterceptors=#MyInterceptors

No

None

inFaultInterceptors

Since Camel 2.12.4 Set the inFaultInterceptors to the CxfRs endpoint.

inFaultInterceptors=#MyInterceptors

No

None

outFaultIntercetpros

Since Camel 2.12.4 Set the outFaultInterceptors to the CxfRs endpoint.

outFaultInterceptors=#MyInterceptors

No

None

continuationTimeout

Since Camel 2.14.0 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 Camel 2.14.0, CxfConsumer just set the continuation timeout to be 0, which means the continuation suspend operation never timeout.)

continuationTimeout=800000

No

30000

ignoreDeleteMethodMessageBodySince Camel 2.14.1 This option is used to tell CxfRsProducer to ignore the message body of the DELETE method when using HTTP API.ignoreDeleteMethodMessageBody=trueNofalse

modelRef

Since Camel 2.14.2 This option is used to specify the model file which is useful for the resource class without annotation.

Since Camel 2.15 This option can point to a model file without specifying a service class for emulating document-only endpoints

modelRef=classpath:/CustomerServiceModel.xml

NoNone

performInvocation

Since Camel 2.15 When the option is true, camel will perform the invocation of the resource class instance and put the response object into the exchange for further processing.

performInvocation= true

Nofalse
propagateContextsSince Camel 2.15 When the option is true, JAXRS UriInfo, HttpHeaders, Request and SecurityContext contexts will be available to custom CXFRS processors as typed Camel exchange properties. These contexts can be used to analyze the current requests using JAX-RS API.   

You can also configure the CXF REST endpoint through the spring con figuration. Since there are lots of difference between the CXF REST client and CXF REST Server, we provide different configuration for them.
Please check out the schema file and CXF JAX-RS documentation for more information.

How to configure the REST endpoint in Camel

In camel-cxf schema file, there are two elements for the REST endpoint definition. cxf:rsServer for REST consumer, cxf:rsClient for REST producer.
You can find a Camel REST service route configura tion example here.