Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

OptionDefaultDescription

component

 

The Camel Rest component to use for the REST transport, such as restlet, spark-rest. If no component has been explicit configured, then Camel will lookup if there is a Camel component that integrates with the Rest DSL, or if a org.apache.camel.spi.RestConsumerFactory is registered in the registry. If either one is found, then that is being used.

scheme

http

The scheme to use for exposing the REST service. Usually http or https is supported

hostname

 

The hostname to use for exposing the REST service.

port

 

The port number to use for exposing the REST service. Notice if you use servlet component then the port number configured here does not apply, as the port number in use is the actual port number the servlet component is using. eg if using Apache Tomcat its the tomcat http port, if using Apache Karaf its the HTTP service in Karaf that uses port 8181 by default etc. Though in those situations setting the port number here, allows tooling and JMX to know the port number, so its recommended to set the port number to the number that the servlet engine uses.

contextPath

 

Sets a leading context-path the REST services will be using. This can be used when using components such as SERVLET where the deployed web application is deployed using a context-path.

restHostNameResolver

localHostName 

If no hostname has been explicit configured, then this resolver is used to compute the hostname the REST service will be using. The resolver supports allLocalIp (Camel 2.17), localHostName or localIp. The default value for Camel 2.16.x or older is localHostName, and allLocalIp from Camel 2.17 onwards.

bindingMode

off

Whether binding is in use. See further above for more details.

skipBindingOnErrorCode

true

Camel 2.14.1: Whether to skip binding on output if there is a custom HTTP error code header. This allows to build custom error messages that do not bind to json / xml etc, as success messages otherwise will do. See further below for an example.

enableCORS

false

Camel 2.14.1: Whether to enable CORS headers in the HTTP response.

jsonDataFormat

 

Name of specific json data format to use. By default json-jackson will be used. Important: This option is only for setting a custom name of the data format, not to refer to an existing data format instance. Notice: Currently Jackson is what we recommend and are using for testing.

xmlDataFormat

 

Name of specific XML data format to use. By default jaxb will be used. Important: This option is only for setting a custom name of the data format, not to refer to an existing data format instance. Notice: Currently only jaxb is supported.

componentProperty

 

Allows to configure as many additional properties. This is used to configure component specific options such as for Restlet / Spark-Rest etc. The options value can use the # notation to refer to a bean to lookup in the  Registry 

endpointProperty

 

Allows to configure as many additional properties. This is used to configure endpoint specific options for  Restlet / Spark-Rest etc. The options value can use the # notation to refer to a bean to lookup in the  Registry 

consumerProperty

 

Allows to configure as many additional properties. This is used to configure consumer specific options for  Restlet / Spark-Rest etc. The options value can use the # notation to refer to a bean to lookup in the  Registry 

dataFormatProperty

 

Allows to configure as many additional properties. This is used to configure the data format specific options. For example set property prettyPrint to true to have json outputted in pretty mode. From Camel 2.14.1 onwards the keys can be prefixed with either

  • json.in.

  • json.out.

  • xml.in.

  • xml.out.

to denote that the option is only for either JSON or XML data format, and only for either the in or the out going. For example a key with value "xml.out.mustBeJAXBElement" is only for the XML data format for the outgoing. A key without a prefix is a common key for all situations.

From Camel 2.17 onwards the options value can use the # notation to refer to a bean to lookup in the Registry

corsHeaderProperty

 

Allows to configure custom CORS headers.

...