CXF-RS

CXF-RS

Scheme: cxfrs
Syntax: cxfrs:beanId:address
Description: The cxfrs component is used for JAX-RS REST services using Apache CXF.
Deprecated:false
Async:false
Maven: org.apache.camel/camel-cxf/2.18.1.redhat-000024

The cxfrs component is used for JAX-RS REST services using Apache CXF.

Name Kind Group Required Default Type Enum Description
beanId path common java.lang.String To lookup an existing configured CxfRsEndpoint. Must used bean: as prefix.
address path common java.lang.String The service publish address.
features parameter common java.util.List Set the feature list to the CxfRs endpoint.
loggingFeatureEnabled parameter common boolean This option enables CXF Logging Feature which writes inbound and outbound REST messages to log.
loggingSizeLimit parameter common int To limit the total size of number of bytes the logger will output when logging feature has been enabled.
modelRef parameter common java.lang.String This option is used to specify the model file which is useful for the resource class without annotation. When using this option, then the service class can be omitted, to emulate document-only endpoints
providers parameter common java.lang.String Set custom JAX-RS provider(s) list to the CxfRs endpoint. You can specify a string with a list of providers to lookup in the registy separated by comma.
resourceClasses parameter common java.util.List> The resource classes which you want to export as REST service. Multiple classes can be separated by comma.
schemaLocations parameter common java.util.List Sets the locations of the schema(s) which can be used to validate the incoming XML or JAXB-driven JSON.
skipFaultLogging parameter common boolean This option controls whether the PhaseInterceptorChain skips logging the Fault that it catches.
bindingStyle parameter consumer Default org.apache.camel.component.cxf.jaxrs.BindingStyle SimpleConsumer
Default
Custom
Sets how requests and responses will be mapped to/from Camel. Two values are possible:
  • SimpleConsumer: This binding style processes request parameters, multiparts, etc. and maps them to IN headers, IN attachments and to the message body. It aims to eliminate low-level processing of {@link org.apache.cxf.message.MessageContentsList}. It also also adds more flexibility and simplicity to the response mapping. Only available for consumers.
  • Default: The default style. For consumers this passes on a MessageContentsList to the route, requiring low-level processing in the route. This is the traditional binding style, which simply dumps the {@link org.apache.cxf.message.MessageContentsList} coming in from the CXF stack onto the IN message body. The user is then responsible for processing it according to the contract defined by the JAX-RS method signature.
  • Custom: allows you to specify a custom binding through the binding option.
bridgeErrorHandler parameter consumer boolean Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN/ERROR level and ignored.
exceptionHandler parameter consumer (advanced) org.apache.camel.spi.ExceptionHandler To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions, that will be logged at WARN/ERROR level and ignored.
exchangePattern parameter consumer (advanced) org.apache.camel.ExchangePattern InOnly
RobustInOnly
InOut
InOptionalOut
OutOnly
RobustOutOnly
OutIn
OutOptionalIn
Sets the exchange pattern when the consumer creates an exchange.
hostnameVerifier parameter producer javax.net.ssl.HostnameVerifier The hostname verifier to be used. Use the # notation to reference a HostnameVerifier from the registry.
sslContextParameters parameter producer org.apache.camel.util.jsse.SSLContextParameters The Camel SSL setting reference. Use the # notation to reference the SSL Context.
throwExceptionOnFailure parameter producer true boolean This option tells the CxfRsProducer to inspect return codes and will generate an Exception if the return code is larger than 207.
httpClientAPI parameter producer (advanced) true boolean 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
ignoreDeleteMethodMessageBody parameter producer (advanced) boolean This option is used to tell CxfRsProducer to ignore the message body of the DELETE method when using HTTP API.
maxClientCacheSize parameter producer (advanced) 10 int This option allows you to configure the maximum size of the cache. The implementation caches CXF clients or ClientFactoryBean in CxfProvider and CxfRsProvider.
binding parameter advanced org.apache.camel.component.cxf.jaxrs.CxfRsBinding To use a custom CxfBinding to control the binding between Camel Message and CXF Message.
bus parameter advanced org.apache.cxf.Bus To use a custom configured CXF Bus.
continuationTimeout parameter advanced 30000 long 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.
cxfRsEndpointConfigurer parameter advanced org.apache.camel.component.cxf.jaxrs.CxfRsEndpointConfigurer This option could apply the implementation of org.apache.camel.component.cxf.jaxrs.CxfRsEndpointConfigurer which supports to configure the CXF endpoint in programmatic way. User can configure the CXF server and client by implementing configure{Server/Client} method of CxfEndpointConfigurer.
defaultBus parameter advanced boolean Will set the default bus when CXF endpoint create a bus by itself
headerFilterStrategy parameter advanced org.apache.camel.spi.HeaderFilterStrategy To use a custom HeaderFilterStrategy to filter header to and from Camel message.
performInvocation parameter advanced boolean 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.
propagateContexts parameter advanced boolean 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.
synchronous parameter advanced false boolean Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported).

cxfrs consumer

A Consumer of exchanges for a JAXRS service in CXF. CxfRsConsumer acts a CXF service to receive REST requests, convert them to a normal java object invocation, and forward them to Camel route for processing. It is also responsible for converting and sending back responses to CXF client.