Versions Compared

Key

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

...

Binding ModeDescription
offBinding is turned off. This is the default option.
autoBinding is enabled and Camel is relaxed and support json, xml or both if the needed data formats are included in the classpath. Notice that if for example camel-jaxb is not on the classpath, then XML binding is not enabled.
jsonBinding to/from json is enabled, and requires a json capabile data format on the classpath. By default Camel will use json-jackson as the data format.
xmlBinding to/from xml is enabled, and requires camel-jaxb on the classpath.
json_xmlBiding to/from json and xml is enabled and requires both data formats to be on the classpath.
Tip

From Camel 2.14.1 onwards when using camel-jaxb for xml bindings, then you can use the option mustBeJAXBElement to relax the output message body must be a class with JAXB annotations. You can use this in situations where the message body is already in XML format, and you want to use the message body as-is as the output type. If that is the case, then set the xmlDataFormat option mustBeJAXBElement to false value.

 

To use binding you must include the necessary data formats on the classpath, such as camel-jaxb and/or camel-jackson. And then enable the binding mode. You can configure the binding mode globally on the rest configuration, and then override per rest service as well.

...