CXF-RS

CXF-RS

Scheme: cxfrs
Name Kind Type Required Deprecated Default Value Enum Values Description
bus path org.apache.cxf.Bus false To use a custom configured CXF Bus.
beanId path java.lang.String false To lookup an existing configured CxfRsEndpoint. Must used bean: as prefix.
address path java.lang.String false The service publish address.
resourceClasses parameter java.util.List> false The resource classes which you want to export as REST service. Multiple classes can be separated by comma.
modelRef parameter java.lang.String false 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
bindingStyle parameter org.apache.camel.component.cxf.jaxrs.CxfRsEndpoint.BindingStyle false Default 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.
headerFilterStrategy parameter org.apache.camel.spi.HeaderFilterStrategy false To use a custom HeaderFilterStrategy to filter header to and from Camel message.
binding parameter org.apache.camel.component.cxf.jaxrs.CxfRsBinding false To use a custom CxfBinding to control the binding between Camel Message and CXF Message.
providers parameter java.util.List false Set custom JAX-RS provider(s) list to the CxfRs endpoint.
schemaLocations parameter java.util.List false Sets the locations of the schema(s) which can be used to validate the incoming XML or JAXB-driven JSON.
features parameter java.util.List false Set the feature list to the CxfRs endpoint.
httpClientAPI parameter boolean false true 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 boolean false This option is used to tell CxfRsProducer to ignore the message body of the DELETE method when using HTTP API.
throwExceptionOnFailure parameter boolean false true This option tells the CxfRsProducer to inspect return codes and will generate an Exception if the return code is larger than 207.
maxClientCacheSize parameter int false 10 This option allows you to configure the maximum size of the cache. The implementation caches CXF clients or ClientFactoryBean in CxfProvider and CxfRsProvider.
loggingFeatureEnabled parameter boolean false This option enables CXF Logging Feature which writes inbound and outbound REST messages to log.
loggingSizeLimit parameter int false To limit the total size of number of bytes the logger will output when logging feature has been enabled.
skipFaultLogging parameter boolean false This option controls whether the PhaseInterceptorChain skips logging the Fault that it catches.
continuationTimeout parameter long false 30000 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.
defaultBus parameter boolean false Will set the default bus when CXF endpoint create a bus by itself
performInvocation parameter boolean false 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 boolean false 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.
exchangePattern parameter org.apache.camel.ExchangePattern false InOnly InOnly
RobustInOnly
InOut
InOptionalOut
OutOnly
RobustOutOnly
OutIn
OutOptionalIn
Sets the default exchange pattern when creating an exchange
synchronous parameter boolean false false 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.