Modified: websites/production/camel/content/book-dataformat-appendix.html
==============================================================================
--- websites/production/camel/content/book-dataformat-appendix.html (original)
+++ websites/production/camel/content/book-dataformat-appendix.html Thu Nov 29
08:26:57 2018
@@ -95,13 +95,13 @@
<h1 id="BookDataFormatAppendix-DataFormatAppendix">Data Format Appendix</h1>
-<h2 id="BookDataFormatAppendix-DataFormat">Data Format</h2>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include"><h2 id="BookDataFormatAppendix-DataFormat">Data
Format</h2>
<p>Camel supports a pluggable DataFormat to allow messages to be marshalled to
and from binary or text formats to support a kind of <a shape="rect"
href="message-translator.html">Message Translator</a>.</p>
<p>The following data formats are currently supported:</p>
-<ul><li>Standard JVM object marshalling<ul><li><a shape="rect"
href="serialization.html">Serialization</a></li><li><a shape="rect"
href="string.html">String</a></li></ul></li></ul><ul><li>Object
marshalling<ul><li><a shape="rect" href="avro.html">Avro</a></li><li><a
shape="rect" href="boon.html">Boon</a></li><li><a shape="rect"
href="hessian.html">Hessian</a></li><li><a shape="rect"
href="json.html">JSON</a></li><li><a shape="rect"
href="protobuf.html">Protobuf</a></li><li><a shape="rect"
href="yaml-data-format.html">YAML</a></li></ul></li></ul><ul><li>Object/XML
marshalling<ul><li><a shape="rect" href="castor.html">Castor</a></li><li><a
shape="rect" href="jaxb.html">JAXB</a></li><li><a shape="rect"
href="xmlbeans.html">XmlBeans</a></li><li><a shape="rect"
href="xstream.html">XStream</a></li><li><a shape="rect"
href="jibx.html">JiBX</a></li><li><a shape="rect"
href="jackson-xml.html">Jackson
XML</a></li></ul></li></ul><ul><li>Object/XML/Webservice marshalling<ul><li><a
shape="rect"
href="soap.html">SOAP</a></li></ul></li></ul><ul><li>Direct JSON / XML
marshalling<ul><li><a shape="rect"
href="xmljson.html">XmlJson</a></li></ul></li></ul><ul><li>Flat data structure
marshalling<ul><li><a shape="rect" href="beanio.html">BeanIO</a></li><li><a
shape="rect" href="bindy.html">Bindy</a></li><li><a shape="rect"
href="csv.html">CSV</a></li><li><a shape="rect"
href="edi.html">EDI</a></li><li><a shape="rect"
href="flatpack-dataformat.html">Flatpack DataFormat</a></li><li><a shape="rect"
href="univocity-parsers-formats.html">uniVocity-parsers
formats</a></li></ul></li></ul><ul><li>Domain specific marshalling<ul><li><a
shape="rect" href="hl7-dataformat.html">HL7
DataFormat</a></li></ul></li></ul><ul><li>Compression<ul><li><a shape="rect"
href="gzip-data-format.html">GZip data format</a></li><li><a shape="rect"
href="zip-dataformat.html">Zip DataFormat</a></li><li><a shape="rect"
href="zip-file-dataformat.html">Zip File DataFormat</a></li><li><a shape="rect"
href="lzf-data-fo
rmat.html">LZF Data Format</a></li><li><a shape="rect"
href="tar-dataformat.html">Tar
DataFormat</a></li></ul></li></ul><ul><li>Security<ul><li><a shape="rect"
href="crypto.html">Crypto</a></li><li><a shape="rect"
href="crypto.html">PGP</a></li><li><a shape="rect"
href="xmlsecurity-dataformat.html">XMLSecurity
DataFormat</a></li></ul></li></ul><ul><li>Misc.<ul><li><a shape="rect"
href="base64.html">Base64</a></li><li><a shape="rect"
href="custom-dataformat.html">Custom DataFormat</a> - to use your own custom
implementation</li><li><a shape="rect"
href="mime-multipart.html">MIME-Multipart</a></li><li><a shape="rect"
href="rss.html">RSS</a></li><li><a shape="rect"
href="tidymarkup.html">TidyMarkup</a></li><li><a shape="rect"
href="syslog.html">Syslog</a></li><li><a shape="rect"
href="ical.html">ICal</a></li><li><a shape="rect"
href="barcode-data-format.html">Barcode </a>- to read and generate barcodes
(QR-Code, PDF417, ...)</li></ul></li></ul>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include"><ul><li>Standard JVM object marshalling<ul><li><a
shape="rect" href="serialization.html">Serialization</a></li><li><a
shape="rect" href="string.html">String</a></li></ul></li></ul><ul><li>Object
marshalling<ul><li><a shape="rect" href="avro.html">Avro</a></li><li><a
shape="rect" href="boon.html">Boon</a></li><li><a shape="rect"
href="hessian.html">Hessian</a></li><li><a shape="rect"
href="json.html">JSON</a></li><li><a shape="rect"
href="protobuf.html">Protobuf</a></li><li><a shape="rect"
href="yaml-data-format.html">YAML</a></li></ul></li></ul><ul><li>Object/XML
marshalling<ul><li><a shape="rect" href="castor.html">Castor</a></li><li><a
shape="rect" href="jaxb.html">JAXB</a></li><li><a shape="rect"
href="xmlbeans.html">XmlBeans</a></li><li><a shape="rect"
href="xstream.html">XStream</a></li><li><a shape="rect"
href="jibx.html">JiBX</a></li><li><a shape="rect"
href="jackson-xml.html">Jackson XML</a><
/li></ul></li></ul><ul><li>Object/XML/Webservice marshalling<ul><li><a
shape="rect" href="soap.html">SOAP</a></li></ul></li></ul><ul><li>Direct JSON /
XML marshalling<ul><li><a shape="rect"
href="xmljson.html">XmlJson</a></li></ul></li></ul><ul><li>Flat data structure
marshalling<ul><li><a shape="rect" href="beanio.html">BeanIO</a></li><li><a
shape="rect" href="bindy.html">Bindy</a></li><li><a shape="rect"
href="csv.html">CSV</a></li><li><a shape="rect"
href="edi.html">EDI</a></li><li><a shape="rect"
href="flatpack-dataformat.html">Flatpack DataFormat</a></li><li><a shape="rect"
href="univocity-parsers-formats.html">uniVocity-parsers
formats</a></li></ul></li></ul><ul><li>Domain specific marshalling<ul><li><a
shape="rect" href="hl7-dataformat.html">HL7
DataFormat</a></li></ul></li></ul><ul><li>Compression<ul><li><a shape="rect"
href="gzip-data-format.html">GZip data format</a></li><li><a shape="rect"
href="zip-dataformat.html">Zip DataFormat</a></li><li><a shape="rect"
href="zip-fil
e-dataformat.html">Zip File DataFormat</a></li><li><a shape="rect"
href="lzf-data-format.html">LZF Data Format</a></li><li><a shape="rect"
href="tar-dataformat.html">Tar
DataFormat</a></li></ul></li></ul><ul><li>Security<ul><li><a shape="rect"
href="crypto.html">Crypto</a></li><li><a shape="rect"
href="crypto.html">PGP</a></li><li><a shape="rect"
href="xmlsecurity-dataformat.html">XMLSecurity
DataFormat</a></li></ul></li></ul><ul><li>Misc.<ul><li><a shape="rect"
href="base64.html">Base64</a></li><li><a shape="rect"
href="custom-dataformat.html">Custom DataFormat</a> - to use your own custom
implementation</li><li><a shape="rect"
href="mime-multipart.html">MIME-Multipart</a></li><li><a shape="rect"
href="rss.html">RSS</a></li><li><a shape="rect"
href="tidymarkup.html">TidyMarkup</a></li><li><a shape="rect"
href="syslog.html">Syslog</a></li><li><a shape="rect"
href="ical.html">ICal</a></li><li><a shape="rect"
href="barcode-data-format.html">Barcode </a>- to read and generate barcodes
(QR-Code, PDF417, ...)</li></ul></li></ul></div>
<p>And related is the following:</p>
<ul class="alternate"><li><a shape="rect"
href="dataformat-component.html">DataFormat Component</a> for working with <a
shape="rect" href="data-format.html">Data Format</a>s as if it was a regular <a
shape="rect" href="component.html">Component</a> supporting <a shape="rect"
href="endpoint.html">Endpoint</a>s and <a shape="rect"
href="uris.html">URIs</a>.</li><li><a shape="rect"
href="dozer-type-conversion.html">Dozer Type Conversion</a> using Dozer for
type converting POJOs</li></ul>
@@ -184,9 +184,9 @@ Error rendering macro 'code': Invalid va
<property name="contextPath" value="org.apache.camel.example"/>
</bean>
</pre>
-</div></div>
+</div></div></div>
-<h2 id="BookDataFormatAppendix-Serialization">Serialization</h2>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include"><h2
id="BookDataFormatAppendix-Serialization">Serialization</h2>
<p>Serialization is a <a shape="rect" href="data-format.html">Data Format</a>
which uses the standard Java Serialization mechanism to unmarshal a binary
payload into Java objects or to marshal Java objects into a binary blob.<br
clear="none">
For example the following uses Java serialization to unmarshal a binary file
then send it as an ObjectMessage to <a shape="rect"
href="activemq.html">ActiveMQ</a></p>
@@ -201,8 +201,8 @@ from("file://foo/bar").
<h3 id="BookDataFormatAppendix-Dependencies">Dependencies</h3>
-<p>This data format is provided in <strong>camel-core</strong> so no
additional dependencies is needed.</p>
-<h2 id="BookDataFormatAppendix-JAXB">JAXB</h2><p>JAXB is a <a shape="rect"
href="data-format.html">Data Format</a> which uses the JAXB2 XML marshalling
standard which is included in Java 6 to unmarshal an XML payload into Java
objects or to marshal Java objects into an XML payload.</p><h3
id="BookDataFormatAppendix-UsingtheJavaDSL">Using the Java DSL</h3><p>For
example the following uses a named DataFormat of <em>jaxb</em> which is
configured with a number of Java package names to initialize the <a
shape="rect" class="external-link"
href="http://java.sun.com/javase/6/docs/api/javax/xml/bind/JAXBContext.html"
rel="nofollow">JAXBContext</a>.</p><plain-text-body>DataFormat jaxb = new
JaxbDataFormat("com.acme.model");
+<p>This data format is provided in <strong>camel-core</strong> so no
additional dependencies is needed.</p></div>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include"><h2 id="BookDataFormatAppendix-JAXB">JAXB</h2><p>JAXB
is a <a shape="rect" href="data-format.html">Data Format</a> which uses the
JAXB2 XML marshalling standard which is included in Java 6 to unmarshal an XML
payload into Java objects or to marshal Java objects into an XML
payload.</p><h3 id="BookDataFormatAppendix-UsingtheJavaDSL">Using the Java
DSL</h3><p>For example the following uses a named DataFormat of <em>jaxb</em>
which is configured with a number of Java package names to initialize the <a
shape="rect" class="external-link"
href="http://java.sun.com/javase/6/docs/api/javax/xml/bind/JAXBContext.html"
rel="nofollow">JAXBContext</a>.</p><plain-text-body>DataFormat jaxb = new
JaxbDataFormat("com.acme.model");
from("activemq:My.Queue").
unmarshal(jaxb).
@@ -240,8 +240,8 @@ jaxbDataFormat.setSchemaLocation("schema
<artifactId>camel-jaxb</artifactId>
<version>x.x.x</version>
</dependency>
-</plain-text-body>
-<h2 id="BookDataFormatAppendix-XmlBeans">XmlBeans</h2>
+</plain-text-body></div>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include"><h2 id="BookDataFormatAppendix-XmlBeans">XmlBeans</h2>
<p>XmlBeans is a <a shape="rect" href="data-format.html">Data Format</a> which
uses the <a shape="rect" class="external-link"
href="http://xmlbeans.apache.org/">XmlBeans library</a> to unmarshal an XML
payload into Java objects or to marshal Java objects into an XML payload.</p>
@@ -268,8 +268,8 @@ from("activemq:My.Queue").
<!-- use the same version as your Camel core version -->
</dependency>
</pre>
-</div></div>
-<h2 id="BookDataFormatAppendix-XStream">XStream</h2><p>XStream is a <a
shape="rect" href="data-format.html">Data Format</a> which uses the <a
shape="rect" class="external-link" href="http://xstream.codehaus.org/"
rel="nofollow">XStream library</a> to marshal and unmarshal Java objects to and
from XML.</p><p>To use XStream in your camel routes you need to add the a
dependency on <strong>camel-xstream</strong> which implements this
data format.</p><p>Maven users will need to add the following dependency to
their <code>pom.xml</code> for this component:</p><parameter
ac:name="language">xml</parameter><plain-text-body><dependency>
+</div></div></div>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include"><h2
id="BookDataFormatAppendix-XStream">XStream</h2><p>XStream is a <a shape="rect"
href="data-format.html">Data Format</a> which uses the <a shape="rect"
class="external-link" href="http://xstream.codehaus.org/"
rel="nofollow">XStream library</a> to marshal and unmarshal Java objects to and
from XML.</p><p>To use XStream in your camel routes you need to add the a
dependency on <strong>camel-xstream</strong> which implements this
data format.</p><p>Maven users will need to add the following dependency to
their <code>pom.xml</code> for this component:</p><parameter
ac:name="language">xml</parameter><plain-text-body><dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-xstream</artifactId>
<version>x.x.x</version>
@@ -297,8 +297,8 @@ from("direct:marshal").
...
-</plain-text-body>
-<h2 id="BookDataFormatAppendix-CSV">CSV</h2><p>The CSV <a shape="rect"
href="data-format.html">Data Format</a> uses <a shape="rect"
class="external-link"
href="http://commons.apache.org/proper/commons-csv/">Apache Commons CSV</a> to
handle CSV payloads (Comma Separated Values) such as those exported/imported by
Excel.</p><p>As of Camel 2.15.0, it now uses the <a shape="rect"
class="external-link"
href="http://commons.apache.org/proper/commons-csv/archives/1.1/index.html">Apache
Commons CSV 1.1</a> which is based on a completely different set of
options.</p><h3
id="BookDataFormatAppendix-AvailableoptionsuntilCamel2.15">Available options
until Camel 2.15</h3><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"
><p>config</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>CSVConfig</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Can be used to set a custom <code>CSVConfig</code>
>object.</p></td></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p>strategy</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>CSVStrategy</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Can be used to set a custom <code>CSVStrategy</code>;
>the default is
><code>CSVStrategy.DEFAULT_STRATEGY</code>.</p></td></tr><tr><td colspan="1"
>rowspan="1" class="confluenceTd"><p>autogenColumns</p></td><td colspan="1"
>rowspan="1" class="confluenceTd"><p>boolean</p></td><td colspan="1"
>rowspan="1" class="confluenceTd"><p>Whether or not columns are auto-generated
>in the resulting CSV. The default value is <code>true</code>; subsequent
>messages use the previously created columns with new fields being added at
>the end of the line.</p></td></tr><tr><td colspan="1" rowspan="1" class="
confluenceTd"><p>delimiter</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.4:</strong> The column delimiter to
use; the default value is "<code>,</code>".</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>skipFirstLine</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>boolean</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.10:</strong> Whether or not to skip the
first line of CSV input when unmarshalling (e.g. if the content has headers on
the first line); the default value is <code>false</code>.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">lazyLoad</td><td colspan="1"
rowspan="1" class="confluenceTd">boolean</td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>Camel 2.12.2:</strong><span><span> Whether or
not to </span></span><span style="line-height: 1.4285715;">Sequential access
CSV input through
an iterator which could avoid OOM exception when processing huge CSV file;
</span><span>the default value is false </span></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd">useMaps</td><td colspan="1" rowspan="1"
class="confluenceTd">boolean</td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>Camel 2.13:</strong> Whether to use
List<Map> when unmarshalling instead of
List<List>.</td></tr></tbody></table></div><h3
id="BookDataFormatAppendix-AvailableoptionsasofCamel2.15">Available options as
of Camel 2.15</h3><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh">Option</th><th colspan="1" rowspan="1"
class="confluenceTh">Type</th><th colspan="1" rowspan="1"
class="confluenceTh">Description</th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>format</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><code>CSVFormat</code></td><td colspan="1" rowspan="1"
class="confluen
ceTd">The reference format to use, it will be updated with the other format
options, the default value is <code>CSVFormat.DEFAULT</code></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><code>commentMarkerDisabled</code></td><td colspan="1"
rowspan="1" class="confluenceTd"><code>boolean</code></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Disables the comment marker of the
reference format.</p><p>This option is <code>false</code> by
default.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>commentMarker</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><code>Character</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Overrides the comment marker of the reference
format.</p><p>This option is <code>null</code> by default. When
<code>null</code> it keeps the value of the reference format which is
<code>null</code> for <code>CSVFormat.DEFAULT</code>.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><co
de>delimiter</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><code>Character</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Overrides the delimiter of the reference
format.</p><p>This option is <code>null</code> by defaut. <span>When
</span><code>null</code><span> it keeps the value of the reference format which
is </span><code>','</code><span> for
</span><code>CSVFormat.DEFAULT</code><span>.</span></p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><code>escapeDisabled</code></td><td colspan="1"
rowspan="1" class="confluenceTd"><code>boolean</code></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Disables the escape character of the
reference format.</p><p>This option is <code>false</code> by
default.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>escape</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><code>Character</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Overrides the esc
ape character of the reference format.</p><p>This option is <code>null</code>
by default. <span>When </span><code>null</code><span> it keeps the value of the
reference format which is </span><code>null</code><span> for
</span><code>CSVFormat.DEFAULT</code><span>.</span></p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><code>headerDisabled</code></td><td colspan="1"
rowspan="1" class="confluenceTd"><code>boolean</code></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Disables the header of the reference
format.</p><p>This option is <code>false</code> by
default.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>header</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><code>String[]</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Overrides the header of the reference
format.</p><p>This option is <code>null</code> by default. <span>When
</span><code>null</code><span> it keeps the value of the reference format which
is </span><code>null</code><span> for
</span><code>CSVFormat.DEFAULT</code><span>.</span></p><p>In the XML DSL, this
option is configured using
children <code><header></code> tags:</p><div class="code panel
pdl conf-macro output-block" data-hasbody="true" data-macro-name="code"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</plain-text-body></div>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include"><h2 id="BookDataFormatAppendix-CSV">CSV</h2><p>The
CSV <a shape="rect" href="data-format.html">Data Format</a> uses <a
shape="rect" class="external-link"
href="http://commons.apache.org/proper/commons-csv/">Apache Commons CSV</a> to
handle CSV payloads (Comma Separated Values) such as those exported/imported by
Excel.</p><p>As of Camel 2.15.0, it now uses the <a shape="rect"
class="external-link"
href="http://commons.apache.org/proper/commons-csv/archives/1.1/index.html">Apache
Commons CSV 1.1</a> which is based on a completely different set of
options.</p><h3
id="BookDataFormatAppendix-AvailableoptionsuntilCamel2.15">Available options
until Camel 2.15</h3><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1"
class="confluence
Th"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>config</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>CSVConfig</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Can be used to set a custom <code>CSVConfig</code>
object.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>strategy</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>CSVStrategy</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Can be used to set a custom <code>CSVStrategy</code>;
the default is <code>CSVStrategy.DEFAULT_STRATEGY</code>.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>autogenColumns</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>boolean</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Whether or not columns are auto-generated
in the resulting CSV. The default value is <code>true</code>; subsequent
messages use the previously created columns with new fields bein
g added at the end of the line.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>delimiter</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.4:</strong> The column delimiter to
use; the default value is "<code>,</code>".</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>skipFirstLine</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>boolean</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.10:</strong> Whether or not to skip the
first line of CSV input when unmarshalling (e.g. if the content has headers on
the first line); the default value is <code>false</code>.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">lazyLoad</td><td colspan="1"
rowspan="1" class="confluenceTd">boolean</td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>Camel 2.12.2:</strong><span><span> Whether or
not to </sp
an></span><span style="line-height: 1.4285715;">Sequential access CSV input
through an iterator which could avoid OOM exception when processing huge CSV
file; </span><span>the default value is false </span></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">useMaps</td><td colspan="1"
rowspan="1" class="confluenceTd">boolean</td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>Camel 2.13:</strong> Whether to use
List<Map> when unmarshalling instead of
List<List>.</td></tr></tbody></table></div><h3
id="BookDataFormatAppendix-AvailableoptionsasofCamel2.15">Available options as
of Camel 2.15</h3><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh">Option</th><th colspan="1" rowspan="1"
class="confluenceTh">Type</th><th colspan="1" rowspan="1"
class="confluenceTh">Description</th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>format</code></td><td colspan="1" rowspan="1" class="
confluenceTd"><code>CSVFormat</code></td><td colspan="1" rowspan="1"
class="confluenceTd">The reference format to use, it will be updated with the
other format options, the default value is
<code>CSVFormat.DEFAULT</code></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>commentMarkerDisabled</code></td><td colspan="1"
rowspan="1" class="confluenceTd"><code>boolean</code></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Disables the comment marker of the
reference format.</p><p>This option is <code>false</code> by
default.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>commentMarker</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><code>Character</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Overrides the comment marker of the reference
format.</p><p>This option is <code>null</code> by default. When
<code>null</code> it keeps the value of the reference format which is
<code>null</code> for <code>CSVFormat.D
EFAULT</code>.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>delimiter</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><code>Character</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Overrides the delimiter of the reference
format.</p><p>This option is <code>null</code> by defaut. <span>When
</span><code>null</code><span> it keeps the value of the reference format which
is </span><code>','</code><span> for
</span><code>CSVFormat.DEFAULT</code><span>.</span></p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><code>escapeDisabled</code></td><td colspan="1"
rowspan="1" class="confluenceTd"><code>boolean</code></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Disables the escape character of the
reference format.</p><p>This option is <code>false</code> by
default.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>escape</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><code>Charac
ter</code></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Overrides
the escape character of the reference format.</p><p>This option is
<code>null</code> by default. <span>When </span><code>null</code><span> it
keeps the value of the reference format which is </span><code>null</code><span>
for </span><code>CSVFormat.DEFAULT</code><span>.</span></p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><code>headerDisabled</code></td><td colspan="1"
rowspan="1" class="confluenceTd"><code>boolean</code></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Disables the header of the reference
format.</p><p>This option is <code>false</code> by
default.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>header</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><code>String[]</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Overrides the header of the reference
format.</p><p>This option is <code>null</code> by default. <span>W
hen </span><code>null</code><span> it keeps the value of the reference format
which is </span><code>null</code><span> for
</span><code>CSVFormat.DEFAULT</code><span>.</span></p><p>In the XML DSL, this
option is configured using
children <code><header></code> tags:</p><div class="code panel
pdl conf-macro output-block" data-hasbody="true" data-macro-name="code"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: xml;
gutter: false; theme: Default" data-theme="Default"><csv >
<header>orderId</header>
<header>amount</header>
@@ -470,8 +470,8 @@ csvConfig.setDelimiter(';');
<version>x.x.x</version>
</dependency>
</pre>
-</div></div>
-The String <a shape="rect" href="data-format.html">Data Format</a> is a
textual based format that supports encoding.
+</div></div></div>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include">The String <a shape="rect"
href="data-format.html">Data Format</a> is a textual based format that supports
encoding.
<h3 id="BookDataFormatAppendix-Options">Options</h3>
<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p> Option </p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p> Default </p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p> Description
</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> charset
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> null </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> To use a specific charset for
encoding. If not provided Camel will use the JVM default charset.
</p></td></tr></tbody></table></div>
@@ -497,8 +497,8 @@ from("jms://queue/order").unmarshal().st
<h3 id="BookDataFormatAppendix-Dependencies.4">Dependencies</h3>
-<p>This data format is provided in <strong>camel-core</strong> so no
additional dependencies is needed.</p>
-<h3 id="BookDataFormatAppendix-HL7DataFormat">HL7 DataFormat</h3><p>The <a
shape="rect" href="hl7.html">HL7</a> component ships with a HL7 data format
that can be used to marshal or unmarshal HL7 model objects.</p><ul
class="alternate"><li><code>marshal</code> = from Message to byte stream (can
be used when responding using the HL7 MLLP
codec)</li><li><code>unmarshal</code> = from byte stream to Message (can be
used when receiving streamed data from the HL7 MLLP</li></ul><p>To use the data
format, simply instantiate an instance and invoke the marshal or unmarshal
operation in the route builder:</p><div class="code panel pdl conf-macro
output-block" data-hasbody="true" data-macro-name="code" style="border-width:
1px;"><div class="codeContent panelContent pdl">
+<p>This data format is provided in <strong>camel-core</strong> so no
additional dependencies is needed.</p></div>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include"><h3 id="BookDataFormatAppendix-HL7DataFormat">HL7
DataFormat</h3><p>The <a shape="rect" href="hl7.html">HL7</a> component ships
with a HL7 data format that can be used to marshal or unmarshal HL7 model
objects.</p><ul class="alternate"><li><code>marshal</code> = from Message to
byte stream (can be used when responding using the HL7 MLLP
codec)</li><li><code>unmarshal</code> = from byte stream to Message (can be
used when receiving streamed data from the HL7 MLLP</li></ul><p>To use the data
format, simply instantiate an instance and invoke the marshal or unmarshal
operation in the route builder:</p><div class="code panel pdl conf-macro
output-block" data-hasbody="true" data-macro-name="code" style="border-width:
1px;"><div class="codeContent panelContent pdl">
<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java;
gutter: false; theme: Default" data-theme="Default"> DataFormat hl7 = new
HL7DataFormat();
...
from("direct:hl7in").marshal(hl7).to("jms:queue:hl7out");
@@ -512,11 +512,11 @@ from("jms://queue/order").unmarshal().st
<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java;
gutter: false; theme: Default" data-theme="Default">
from("direct:hl7in").marshal().hl7().to("jms:queue:hl7out");
from("jms:queue:hl7out").unmarshal().hl7().to("patientLookupService");
</pre>
-</div></div><p> </p><p> </p>
-<h2 id="BookDataFormatAppendix-EDIDataFormat">EDI DataFormat</h2>
+</div></div><p> </p><p> </p></div>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include"><h2 id="BookDataFormatAppendix-EDIDataFormat">EDI
DataFormat</h2>
-<p>We encourage end users to look at the <a shape="rect" class="external-link"
href="http://milyn.codehaus.org/Home" rel="nofollow">Smooks</a> which supports
EDI and Camel natively.</p>
-<h2 id="BookDataFormatAppendix-FlatpackDataFormat">Flatpack DataFormat</h2>
+<p>We encourage end users to look at the <a shape="rect" class="external-link"
href="http://milyn.codehaus.org/Home" rel="nofollow">Smooks</a> which supports
EDI and Camel natively.</p></div>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include"><h2
id="BookDataFormatAppendix-FlatpackDataFormat">Flatpack DataFormat</h2>
<p>The <a shape="rect" href="flatpack.html">Flatpack</a> component ships with
the Flatpack data format that can be used to format between fixed width or
delimited text messages to a <code>List</code> of rows as <code>Map</code>. </p>
<ul class="alternate"><li>marshal = from <code>List<Map<String,
Object>></code> to <code>OutputStream</code> (can be converted to
<code>String</code>)</li><li>unmarshal = from <code>java.io.InputStream</code>
(such as a <code>File</code> or <code>String</code>) to a
<code>java.util.List</code> as an
<code>org.apache.camel.component.flatpack.DataSetList</code> instance.<br
clear="none">
The result of the operation will contain all the data. If you need to process
each row one by one you can split the exchange, using <a shape="rect"
href="splitter.html">Splitter</a>.</li></ul>
@@ -567,8 +567,8 @@ from("seda:people").marshal(df).convertB
<version>x.x.x</version>
</dependency>
</pre>
-</div></div>
-<h2 id="BookDataFormatAppendix-JSON">JSON</h2><p>JSON is a <a shape="rect"
href="data-format.html">Data Format</a> to marshal and unmarshal Java objects
to and from <a shape="rect" class="external-link" href="http://www.json.org/"
rel="nofollow">JSON</a>.</p><p>For JSON to object marshalling, Camel provides
integration with three popular JSON libraries:</p><ul class="alternate"><li>The
<a shape="rect" class="external-link" href="http://xstream.codehaus.org/"
rel="nofollow">XStream library</a> and <a shape="rect" class="external-link"
href="http://jettison.codehaus.org/" rel="nofollow">Jettsion </a></li><li>The
<a shape="rect" class="external-link"
href="https://github.com/FasterXML/jackson" rel="nofollow">Jackson
library</a></li><li><strong>Camel 2.10:</strong> The <a shape="rect"
class="external-link" href="http://code.google.com/p/google-gson/"
rel="nofollow">GSon library</a></li></ul><p>Every library requires adding the
special camel component (see "Dependency..." paragraphs furt
her down). By default Camel uses the XStream library.</p><parameter
ac:name="title">Direct, bi-directional JSON <=> XML
conversions</parameter><rich-text-body><p>As of Camel 2.10, Camel supports
direct, bi-directional JSON <=> XML conversions via the <a shape="rect"
href="xmljson.html">camel-xmljson</a> data format, which is documented
separately.</p></rich-text-body><h3
id="BookDataFormatAppendix-UsingJSONDataFormatWiththeXStreamLibrary">Using JSON
Data Format With the <code>XStream</code> Library</h3><parameter
ac:name="language">java</parameter><plain-text-body>// Let's turn Object
messages into JSON then send to MQSeries
+</div></div></div>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include"><h2 id="BookDataFormatAppendix-JSON">JSON</h2><p>JSON
is a <a shape="rect" href="data-format.html">Data Format</a> to marshal and
unmarshal Java objects to and from <a shape="rect" class="external-link"
href="http://www.json.org/" rel="nofollow">JSON</a>.</p><p>For JSON to object
marshalling, Camel provides integration with three popular JSON
libraries:</p><ul class="alternate"><li>The <a shape="rect"
class="external-link" href="http://xstream.codehaus.org/"
rel="nofollow">XStream library</a> and <a shape="rect" class="external-link"
href="http://jettison.codehaus.org/" rel="nofollow">Jettsion </a></li><li>The
<a shape="rect" class="external-link"
href="https://github.com/FasterXML/jackson" rel="nofollow">Jackson
library</a></li><li><strong>Camel 2.10:</strong> The <a shape="rect"
class="external-link" href="http://code.google.com/p/google-gson/"
rel="nofollow">GSon library</a></li></ul><p>Every libr
ary requires adding the special camel component (see "Dependency..."
paragraphs further down). By default Camel uses the XStream
library.</p><parameter ac:name="title">Direct, bi-directional JSON <=>
XML conversions</parameter><rich-text-body><p>As of Camel 2.10, Camel supports
direct, bi-directional JSON <=> XML conversions via the <a shape="rect"
href="xmljson.html">camel-xmljson</a> data format, which is documented
separately.</p></rich-text-body><h3
id="BookDataFormatAppendix-UsingJSONDataFormatWiththeXStreamLibrary">Using JSON
Data Format With the <code>XStream</code> Library</h3><parameter
ac:name="language">java</parameter><plain-text-body>// Let's turn Object
messages into JSON then send to MQSeries
from("activemq:My.Queue")
.marshal().json()
.to("mqseries:Another.Queue");
@@ -725,8 +725,8 @@ getContext().getProperties().put("CamelJ
<artifactId>camel-gson</artifactId>
<version>2.10.0</version>
</dependency>
-</plain-text-body>
-The Zip <a shape="rect" href="data-format.html">Data Format</a> is a message
compression and de-compression format. Messages marshalled using Zip
compression can be unmarshalled using Zip decompression just prior to being
consumed at the endpoint. The compression capability is quite useful when you
deal with large XML and Text based payloads. It facilitates more optimal use of
network bandwidth while incurring a small cost in order to compress and
decompress payloads at the endpoint.<div class="confluence-information-macro
confluence-information-macro-information conf-macro output-block"
data-hasbody="true" data-macro-name="info"><p class="title">About using with
Files</p><span class="aui-icon aui-icon-small aui-iconfont-info
confluence-information-macro-icon"> </span><div
class="confluence-information-macro-body"><p>The Zip data format, does not
(yet) have special support for files. Which means that when using big files,
the entire file content is loaded into memory.<br clear="none
"> This is subject to change in the future, to allow a streaming based
solution to have a low memory footprint.</p></div></div><h3
id="BookDataFormatAppendix-Options.2">Options</h3><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>compressionLevel</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>To specify a specific compression Level use
<code>java.util.zip.Deflater</code> settings. The possible settings are 
<br clear="none" class="atl-forced-newline">
          -
<code>Deflater.BEST_SPEED</code> <br clear="none" class="atl-forced-newline">
      &#
160;   - <code>Deflater.BEST_COMPRESSION</code> <br clear="none"
class="atl-forced-newline">
          -
<code>Deflater.DEFAULT_COMPRESSION</code> <br clear="none"
class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> If
compressionLevel is not explicitly specified the compressionLevel employed is
<code>Deflater.DEFAULT_COMPRESSION</code></p></td></tr></tbody></table></div><h3
id="BookDataFormatAppendix-Marshal.1">Marshal</h3><p>In this example we
marshal a regular text/XML payload to a compressed payload employing zip
compression <code>Deflater.BEST_COMPRESSION</code> and send it an ActiveMQ
queue called MY_QUEUE.</p><div class="code panel pdl conf-macro output-block"
data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+</plain-text-body></div>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include">The Zip <a shape="rect" href="data-format.html">Data
Format</a> is a message compression and de-compression format. Messages
marshalled using Zip compression can be unmarshalled using Zip decompression
just prior to being consumed at the endpoint. The compression capability is
quite useful when you deal with large XML and Text based payloads. It
facilitates more optimal use of network bandwidth while incurring a small cost
in order to compress and decompress payloads at the endpoint.<div
class="confluence-information-macro confluence-information-macro-information
conf-macro output-block" data-hasbody="true" data-macro-name="info"><p
class="title">About using with Files</p><span class="aui-icon aui-icon-small
aui-iconfont-info confluence-information-macro-icon"> </span><div
class="confluence-information-macro-body"><p>The Zip data format, does not
(yet) have special support for files. Which means that
when using big files, the entire file content is loaded into memory.<br
clear="none"> This is subject to change in the future, to allow a streaming
based solution to have a low memory footprint.</p></div></div><h3
id="BookDataFormatAppendix-Options.2">Options</h3><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>compressionLevel</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>To specify a specific compression Level use
<code>java.util.zip.Deflater</code> settings. The possible settings are 
<br clear="none" class="atl-forced-newline">
          -
<code>Deflater.BEST_SPEED</code>
<br clear="none" class="atl-forced-newline">
          -
<code>Deflater.BEST_COMPRESSION</code> <br clear="none"
class="atl-forced-newline">
          -
<code>Deflater.DEFAULT_COMPRESSION</code> <br clear="none"
class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> If
compressionLevel is not explicitly specified the compressionLevel employed is
<code>Deflater.DEFAULT_COMPRESSION</code></p></td></tr></tbody></table></div><h3
id="BookDataFormatAppendix-Marshal.1">Marshal</h3><p>In this example we
marshal a regular text/XML payload to a compressed payload employing zip
compression <code>Deflater.BEST_COMPRESSION</code> and send it an ActiveMQ
queue called MY_QUEUE.</p><div class="code panel pdl conf-macro output-block"
data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java;
gutter: false; theme: Default"
data-theme="Default">from("direct:start").marshal().zip(Deflater.BEST_COMPRESSION).to("activemq:queue:MY_QUEUE");
</pre>
</div></div><p>Alternatively if you would like to use the default setting you
could send it as</p><div class="code panel pdl conf-macro output-block"
data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
@@ -735,8 +735,8 @@ The Zip <a shape="rect" href="data-forma
</div></div><h3 id="BookDataFormatAppendix-Unmarshal.1">Unmarshal</h3><p>In
this example we unmarshal a zipped payload from an ActiveMQ queue
called MY_QUEUE to its original format, and forward it
for processing to the UnZippedMessageProcessor. Note that the
compression Level employed during the marshalling should be identical to the
one employed during unmarshalling to avoid errors.</p><div class="code panel
pdl conf-macro output-block" data-hasbody="true" data-macro-name="code"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java;
gutter: false; theme: Default"
data-theme="Default">from("activemq:queue:MY_QUEUE").unmarshal().zip().process(new
UnZippedMessageProcessor()); 
</pre>
-</div></div><h3
id="BookDataFormatAppendix-Dependencies.6">Dependencies</h3><p>This data format
is provided in <strong>camel-core</strong> so no additional dependencies are
needed.</p>
-<h2 id="BookDataFormatAppendix-TidyMarkup">TidyMarkup</h2>
+</div></div><h3
id="BookDataFormatAppendix-Dependencies.6">Dependencies</h3><p>This data format
is provided in <strong>camel-core</strong> so no additional dependencies are
needed.</p></div>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include"><h2
id="BookDataFormatAppendix-TidyMarkup">TidyMarkup</h2>
<p>TidyMarkup is a <a shape="rect" href="data-format.html">Data Format</a>
that uses the <a shape="rect" class="external-link"
href="http://www.ccil.org/~cowan/XML/tagsoup/" rel="nofollow">TagSoup</a> to
tidy up HTML. It can be used to parse ugly HTML and return it as pretty
wellformed HTML.</p>
@@ -786,8 +786,8 @@ from("file://site/inbox").unmarshal().ti
<version>x.x.x</version>
</dependency>
</pre>
-</div></div>
-<h2 id="BookDataFormatAppendix-Bindy">Bindy</h2><p>The goal of this component
is to allow the parsing/binding of non-structured data (or to be more precise
non-XML data)<br clear="none"> to/from Java Beans that have binding mappings
defined with annotations. Using Bindy, you can bind data from sources such as
:</p><ul class="alternate"><li>CSV records,</li><li>Fixed-length
records,</li><li>FIX messages,</li><li>or almost any other non-structured
data</li></ul><p>to one or many Plain Old Java Object (POJO). Bindy converts
the data according to the type of the java property. POJOs can be linked
together with one-to-many relationships available in some cases. Moreover, for
data type like Date, Double, Float, Integer, Short, Long and BigDecimal, you
can provide the pattern to apply during the formatting of the
property.</p><p>For the BigDecimal numbers, you can also define the precision
and the decimal or grouping separators.</p><div class="table-wrap"><table
class="confluenceTable"><tb
ody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Format Type</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Pattern example</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Link</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>Date</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>DateFormat</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>"dd-MM-yyyy"</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link"
href="http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html"
rel="nofollow">http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html</a></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>Decimal*</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Decimalformat</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>"##.###.###"</p></td>
<td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect"
class="external-link"
href="http://java.sun.com/j2se/1.5.0/docs/api/java/text/DecimalFormat.html"
rel="nofollow">http://java.sun.com/j2se/1.5.0/docs/api/java/text/DecimalFormat.html</a></p></td></tr></tbody></table></div><p>Decimal*
= Double, Integer, Float, Short, Long</p><div
class="confluence-information-macro confluence-information-macro-note
conf-macro output-block" data-hasbody="true" data-macro-name="note"><p
class="title">Format supported</p><span class="aui-icon aui-icon-small
aui-iconfont-warning confluence-information-macro-icon"> </span><div
class="confluence-information-macro-body"><p>This first release only support
comma separated values fields and key value pair fields (e.g. : FIX
messages).</p></div></div><p>To work with camel-bindy, you must first define
your model in a package (e.g. com.acme.model) and for each model class (e.g.
Order, Client, Instrument, ...) add the required annotations (describe
d hereafter) to the Class or field.</p><div
class="confluence-information-macro confluence-information-macro-note
conf-macro output-block" data-hasbody="true" data-macro-name="note"><p
class="title">Multiple models</p><span class="aui-icon aui-icon-small
aui-iconfont-warning confluence-information-macro-icon"> </span><div
class="confluence-information-macro-body"><p>If you use multiple models, each
model has to be placed in it's own package to prevent unpredictable
results.</p><p>From <strong>Camel 2.16</strong> onwards this is no longer the
case, as you can safely have multiple models in the same package, as you
configure bindy using class names instead of package names
now.</p></div></div><h2
id="BookDataFormatAppendix-Annotations">Annotations</h2><p>The annotations
created allow to map different concept of your model to the POJO like :</p><ul
class="alternate"><li>Type of record (csv, key value pair (e.g. FIX message),
fixed length ...),</li><li>Link (to link object in another ob
ject),</li><li>DataField and their properties (int, type,
...),</li><li>KeyValuePairField (for key = value format like we have in FIX
financial messages),</li><li>Section (to identify header, body and footer
section),</li><li>OneToMany</li></ul><p>This section will describe them
:</p><h3 id="BookDataFormatAppendix-1.CsvRecord">1. CsvRecord</h3><p>The
CsvRecord annotation is used to identified the root class of the model. It
represents a record = a line of a CSV file and can be linked to several
children model classes.</p><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Annotation name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Record type</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Level</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>CsvRecord</strong></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>csv</p></td><td colspan="1" rowspan="1" cl
ass="confluenceTd"><p>Class</p></td></tr></tbody></table></div><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Parameter name</p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p>type</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Info</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>separator</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>string</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>mandatory - can be ',' or ';' or 'anything'. This value
is interpreted as a regular expression. If you want to use a sign which has a
special meaning in regular expressions, e.g. the '|' sign, than you have to
mask it, like ' <br clear="none" class="atl-forced-newline">
|'</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>skipFirstLine</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>boolean</p></td><td colspan="1" rowspan="1" clas
s="confluenceTd"><p>optional - default value = false - allow to skip the first
line of the CSV file</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>crlf</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>string</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>optional - possible values = WINDOWS,UNIX,MAC, or
custom; default value = WINDOWS - allow to define the carriage return character
to use. If you specify a value other than the three listed before, the value
you enter (custom) will be used as the CRLF character(s)</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p>generateHeaderColumns</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>boolean</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>optional - default value = false - uses to generate the
header columns of the CSV generates</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>autospanLine</p></td><td colspan="1"
rowspan="1" cla
ss="confluenceTd"><p>boolean</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.13/2.12.2:</strong> optional - default
value = false - if enabled then the last column is auto spanned to end of line,
for example if its a comment, etc this allows the line to contain all
characters, also the delimiter char.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>isOrdered</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>boolean</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>optional - default value = false - allow to change the
order of the fields when CSV is generated</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>quote</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.8.3/2.9:</strong> option - allow to
specify a quote character of the fields when CSV is
generated</p></td></tr><tr><td colspan="1" rowspan="1" c
lass="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>This annotation is associated to the root class of the
model and must be declared one time.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd">quoting</td><td colspan="1" rowspan="1"
class="confluenceTd">boolean</td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>Camel 2.11:</strong>optional - default value =
false - Indicate if the values must be quoted when marshaling when CSV is
generated.</td></tr></tbody></table></div><p><strong>case 1 : separator =
','</strong></p><p>The separator used to segregate the fields in the CSV record
is ',' :</p><p>10, J, Pauline, M, XD12345678, Fortis Dynamic 15/15, 2500,
USD,08-01-2009</p><div class="code panel pdl conf-macro output-block"
data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+</div></div></div>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include"><h2
id="BookDataFormatAppendix-Bindy">Bindy</h2><p>The goal of this component is to
allow the parsing/binding of non-structured data (or to be more precise non-XML
data)<br clear="none"> to/from Java Beans that have binding mappings defined
with annotations. Using Bindy, you can bind data from sources such as :</p><ul
class="alternate"><li>CSV records,</li><li>Fixed-length records,</li><li>FIX
messages,</li><li>or almost any other non-structured data</li></ul><p>to one or
many Plain Old Java Object (POJO). Bindy converts the data according to the
type of the java property. POJOs can be linked together with one-to-many
relationships available in some cases. Moreover, for data type like Date,
Double, Float, Integer, Short, Long and BigDecimal, you can provide the pattern
to apply during the formatting of the property.</p><p>For the BigDecimal
numbers, you can also define the precision and the decimal o
r grouping separators.</p><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Format Type</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Pattern example</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Link</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>Date</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>DateFormat</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>"dd-MM-yyyy"</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect" class="external-link"
href="http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html"
rel="nofollow">http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html</a></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>Decimal*</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Decimalform
at</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>"##.###.###"</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><a shape="rect" class="external-link"
href="http://java.sun.com/j2se/1.5.0/docs/api/java/text/DecimalFormat.html"
rel="nofollow">http://java.sun.com/j2se/1.5.0/docs/api/java/text/DecimalFormat.html</a></p></td></tr></tbody></table></div><p>Decimal*
= Double, Integer, Float, Short, Long</p><div
class="confluence-information-macro confluence-information-macro-note
conf-macro output-block" data-hasbody="true" data-macro-name="note"><p
class="title">Format supported</p><span class="aui-icon aui-icon-small
aui-iconfont-warning confluence-information-macro-icon"> </span><div
class="confluence-information-macro-body"><p>This first release only support
comma separated values fields and key value pair fields (e.g. : FIX
messages).</p></div></div><p>To work with camel-bindy, you must first define
your model in a package (e.g. com.acme.model) and for each mode
l class (e.g. Order, Client, Instrument, ...) add the required annotations
(described hereafter) to the Class or field.</p><div
class="confluence-information-macro confluence-information-macro-note
conf-macro output-block" data-hasbody="true" data-macro-name="note"><p
class="title">Multiple models</p><span class="aui-icon aui-icon-small
aui-iconfont-warning confluence-information-macro-icon"> </span><div
class="confluence-information-macro-body"><p>If you use multiple models, each
model has to be placed in it's own package to prevent unpredictable
results.</p><p>From <strong>Camel 2.16</strong> onwards this is no longer the
case, as you can safely have multiple models in the same package, as you
configure bindy using class names instead of package names
now.</p></div></div><h2
id="BookDataFormatAppendix-Annotations">Annotations</h2><p>The annotations
created allow to map different concept of your model to the POJO like :</p><ul
class="alternate"><li>Type of record (csv, key value pa
ir (e.g. FIX message), fixed length ...),</li><li>Link (to link object in
another object),</li><li>DataField and their properties (int, type,
...),</li><li>KeyValuePairField (for key = value format like we have in FIX
financial messages),</li><li>Section (to identify header, body and footer
section),</li><li>OneToMany</li></ul><p>This section will describe them
:</p><h3 id="BookDataFormatAppendix-1.CsvRecord">1. CsvRecord</h3><p>The
CsvRecord annotation is used to identified the root class of the model. It
represents a record = a line of a CSV file and can be linked to several
children model classes.</p><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Annotation name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Record type</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Level</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>CsvRecord</strong></p></td><td colspa
n="1" rowspan="1" class="confluenceTd"><p>csv</p></td><td colspan="1"
rowspan="1"
class="confluenceTd"><p>Class</p></td></tr></tbody></table></div><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Parameter name</p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p>type</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Info</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>separator</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>string</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>mandatory - can be ',' or ';' or 'anything'. This value
is interpreted as a regular expression. If you want to use a sign which has a
special meaning in regular expressions, e.g. the '|' sign, than you have to
mask it, like ' <br clear="none" class="atl-forced-newline">
|'</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>skipFirstLine</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>boolean</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>optional - default value = false - allow to
skip the first line of the CSV file</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>crlf</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>string</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>optional - possible values = WINDOWS,UNIX,MAC, or
custom; default value = WINDOWS - allow to define the carriage return character
to use. If you specify a value other than the three listed before, the value
you enter (custom) will be used as the CRLF character(s)</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p>generateHeaderColumns</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>boolean</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>optional - default value = false - uses to generate the
header columns of the CSV generates</p></td></tr><tr><td colspan="1" rows
pan="1" class="confluenceTd"><p>autospanLine</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>boolean</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.13/2.12.2:</strong> optional - default
value = false - if enabled then the last column is auto spanned to end of line,
for example if its a comment, etc this allows the line to contain all
characters, also the delimiter char.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>isOrdered</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>boolean</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>optional - default value = false - allow to change the
order of the fields when CSV is generated</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>quote</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.8.3/2.9:</strong> option - allow to
specify a quote characte
r of the fields when CSV is generated</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>This annotation is associated to the root class of the
model and must be declared one time.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd">quoting</td><td colspan="1" rowspan="1"
class="confluenceTd">boolean</td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>Camel 2.11:</strong>optional - default value =
false - Indicate if the values must be quoted when marshaling when CSV is
generated.</td></tr></tbody></table></div><p><strong>case 1 : separator =
','</strong></p><p>The separator used to segregate the fields in the CSV record
is ',' :</p><p>10, J, Pauline, M, XD12345678, Fortis Dynamic 15/15, 2500,
USD,08-01-2009</p><div class="code panel pdl conf-macro output-block"
data-hasbody="true" data-macro-name="code" s
tyle="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java;
gutter: false; theme: Default" data-theme="Default">@CsvRecord( separator = ","
)
public Class Order {
...
@@ -1579,8 +1579,8 @@ bindy.setLocale(Locale.getDefault().getI
<version>x.x.x</version>
</dependency>
</pre>
-</div></div>
-<h2 id="BookDataFormatAppendix-XMLSecurityDataFormat">XMLSecurity Data
Format</h2><p>The XMLSecurity Data Format facilitates encryption and decryption
of XML payloads at the Document, Element, and Element Content levels (including
simultaneous multi-node encryption/decryption using XPath). To sign messages
using the XML Signature specification, please see the Camel XML Security <a
shape="rect" href="xml-security-component.html">component</a>.</p><p>The
encryption capability is based on formats supported using the Apache XML
Security (Santuario) project. Symmetric encryption/decryption is currently
supported using Triple-DES and AES (128, 192, and 256) encryption formats.
Additional formats can be easily added later as needed. This capability allows
Camel users to encrypt/decrypt payloads while being dispatched or received
along a route.</p><p><strong>Available as of Camel 2.9</strong><br
clear="none"> The XMLSecurity Data Format supports asymmetric key encryption.
In this encryption
model a symmetric key is generated and used to perform XML content encryption
or decryption. This "content encryption key" is then itself encrypted using an
asymmetric encryption algorithm that leverages the recipient's public key as
the "key encryption key". Use of an asymmetric key encryption algorithm ensures
that only the holder of the recipient's private key can access the generated
symmetric encryption key. Thus, only the private key holder can decode the
message. The XMLSecurity Data Format handles all of the logic required to
encrypt and decrypt the message content and encryption key(s) using asymmetric
key encryption.</p><p>The XMLSecurity Data Format also has improved support for
namespaces when processing the XPath queries that select content for
encryption. A namespace definition mapping can be included as part of the data
format configuration. This enables true namespace matching, even if the prefix
values in the XPath query and the target xml document are not equivale
nt strings.</p><h3 id="BookDataFormatAppendix-BasicOptions">Basic
Options</h3><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>secureTag</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The XPath reference to the XML
Element selected for encryption/decryption. If no tag is specified, the entire
payload is encrypted/decrypted.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>secureTagContents</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>A boolean value to specify whether the XML
Element is to be encrypted or the contents of the XML
Element</p><ul><li><code>false</code> = Element Level</li><li><code>true</code>
= Element Content Level</li></ul></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>passPhrase</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>A String used as passPhrase to
encrypt/decrypt content. The passPhrase has to be provided. If no passPhrase is
specified, a default passPhrase is used. The passPhrase needs to be put
together in conjunction with the appropriate encryption algorithm. For example
using <code>TRIPLEDES</code> the passPhase can be a <code>"Only another 24 Byte
key"</code></p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>xmlCipherAlgorithm</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>TRIPLEDES</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The
cipher algorithm to be used for encryption/decryption of the XML message
content. The available choices
are:</p><ul><li><code>XMLCipher.TRIPLEDES</code></li><li><code>XMLCipher.AES_128</code></li><li><code>XMLCipher.AES_128_GCM</code>
<strong>Camel
2.12</strong></li><li><code>XMLCipher.AES_192</code></li><li><code>XMLCipher.AES_192_GCM</code>
<strong>Camel
2.12</strong></li><li><code>XMLCipher.AES_256</code></li><li><code>XMLCipher.AES_256_GCM</code>
<strong>Camel 2.12</strong></li><li>XMLCipher.SEED_128 <strong>Camel
2.15</strong></li><li>XMLCipher.CAMELLIA_128, XMLCipher.CAMELLIA_192,
XMLCipher.CAMELLIA_256 <strong>Camel 2.15</strong></li></ul></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>namespaces</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>A map of namespace values indexed by
prefix. The index values must match the prefixes used in the <code>secureTag</
code> XPath query.</p></td></tr></tbody></table></div><h3
id="BookDataFormatAppendix-AsymmetricEncryptionOptions">Asymmetric Encryption
Options</h3><p>These options can be applied in addition to relevant the Basic
options to use asymmetric key encryption.</p><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>recipientKeyAlias</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The key alias to be used when
retrieving the recipient's public or private key from a KeyStore when
performing asymmetric key encryption or decryption.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>keyCiphe
rAlgorithm</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.12</strong>
<code>XMLCipher.RSA_OAEP</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The cipher algorithm to be used for
encryption/decryption of the asymmetric key. The available choices
are:</p><ul><li><code>XMLCipher.RSA_v1dot5</code></li><li><code>XMLCipher.RSA_OAEP</code></li><li><code>XMLCipher.RSA_OAEP_11</code></li></ul></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>keyOrTrustStoreParameters</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Configuration options for
creating and loading a KeyStore instance that represents the sender's
trustStore or recipient's keyStore.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>keyPassword</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td
><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10.2 /
>2.11:</strong> The password to be used for retrieving the private key from
>the KeyStore. This key is used for asymmetric
>decryption.</p></td></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p><code>digestAlgorithm</code></p></td><td colspan="1"
>rowspan="1" class="confluenceTd"><p>XMLCipher.SHA1</p></td><td colspan="1"
>rowspan="1" class="confluenceTd"><p><strong>Camel 2.12</strong> The digest
>algorithm to use with the RSA OAEP algorithm. The available choices
>are:</p><ul><li><code>XMLCipher.SHA1</code></li><li><code>XMLCipher.SHA256</code></li><li><code>XMLCipher.SHA512</code></li></ul></td></tr><tr><td
> colspan="1" rowspan="1"
>class="confluenceTd"><p><code>mgfAlgorithm</code></p></td><td colspan="1"
>rowspan="1" class="confluenceTd"><p>EncryptionConstants.MGF1_SHA1</p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.12</strong>
>The MGF Algorithm to use with the RSA OAEP algori
thm. The available choices
are:</p><ul><li><code>EncryptionConstants.MGF1_SHA1</code></li><li><code>EncryptionConstants.MGF1_SHA256</code></li><li><code>EncryptionConstants.MGF1_SHA512</code></li></ul></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd">addKeyValueForEncryptedKey</td><td colspan="1" rowspan="1"
class="confluenceTd">true</td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>Camel 2.14.1 </strong>Whether to add the public
key used to encrypt the session key as a KeyValue in the EncryptedKey structure
or not.</td></tr></tbody></table></div><h4
id="BookDataFormatAppendix-KeyCipherAlgorithm">Key Cipher Algorithm</h4><p>As
of Camel 2.12.0, the default Key Cipher Algorithm is now XMLCipher.RSA_OAEP
instead of XMLCipher.RSA_v1dot5. Usage of XMLCipher.RSA_v1dot5 is discouraged
due to various attacks. Requests that use RSA v1.5 as the key cipher algorithm
will be rejected unless it has been explicitly configured as the key cipher
algorithm.</p><h3 id="BookDat
aFormatAppendix-Marshal.2">Marshal</h3><p>In order to encrypt the payload, the
<code>marshal</code> processor needs to be applied on the route followed by the
<strong><code>secureXML()</code></strong> tag.</p><h3
id="BookDataFormatAppendix-Unmarshal.2">Unmarshal</h3><p>In order to decrypt
the payload, the <code>unmarshal</code> processor needs to be applied on the
route followed by the <strong><code>secureXML()</code></strong> tag.</p><h3
id="BookDataFormatAppendix-Examples">Examples</h3><p>Given below are several
examples of how marshalling could be performed at the Document, Element, and
Content levels.</p><h4
id="BookDataFormatAppendix-FullPayloadencryption/decryption">Full Payload
encryption/decryption</h4><div class="code panel pdl conf-macro output-block"
data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+</div></div></div>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include"><h2
id="BookDataFormatAppendix-XMLSecurityDataFormat">XMLSecurity Data
Format</h2><p>The XMLSecurity Data Format facilitates encryption and decryption
of XML payloads at the Document, Element, and Element Content levels (including
simultaneous multi-node encryption/decryption using XPath). To sign messages
using the XML Signature specification, please see the Camel XML Security <a
shape="rect" href="xml-security-component.html">component</a>.</p><p>The
encryption capability is based on formats supported using the Apache XML
Security (Santuario) project. Symmetric encryption/decryption is currently
supported using Triple-DES and AES (128, 192, and 256) encryption formats.
Additional formats can be easily added later as needed. This capability allows
Camel users to encrypt/decrypt payloads while being dispatched or received
along a route.</p><p><strong>Available as of Camel 2.9</strong><br clear="none"
> The XMLSecurity Data Format supports asymmetric key encryption. In this
> encryption model a symmetric key is generated and used to perform XML
> content encryption or decryption. This "content encryption key" is then
> itself encrypted using an asymmetric encryption algorithm that leverages the
> recipient's public key as the "key encryption key". Use of an asymmetric key
> encryption algorithm ensures that only the holder of the recipient's private
> key can access the generated symmetric encryption key. Thus, only the
> private key holder can decode the message. The XMLSecurity Data Format
> handles all of the logic required to encrypt and decrypt the message content
> and encryption key(s) using asymmetric key encryption.</p><p>The XMLSecurity
> Data Format also has improved support for namespaces when processing the
> XPath queries that select content for encryption. A namespace definition
> mapping can be included as part of the data format configuration. This
> enables true namespace matching, even
if the prefix values in the XPath query and the target xml document are not
equivalent strings.</p><h3 id="BookDataFormatAppendix-BasicOptions">Basic
Options</h3><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>secureTag</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The XPath reference to the XML
Element selected for encryption/decryption. If no tag is specified, the entire
payload is encrypted/decrypted.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>secureTagContents</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan
="1" rowspan="1" class="confluenceTd"><p>A boolean value to specify whether
the XML Element is to be encrypted or the contents of the XML
Element</p><ul><li><code>false</code> = Element Level</li><li><code>true</code>
= Element Content Level</li></ul></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>passPhrase</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>A String used as passPhrase to
encrypt/decrypt content. The passPhrase has to be provided. If no passPhrase is
specified, a default passPhrase is used. The passPhrase needs to be put
together in conjunction with the appropriate encryption algorithm. For example
using <code>TRIPLEDES</code> the passPhase can be a <code>"Only another 24 Byte
key"</code></p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>xmlCipherAlgorithm</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><co
de>TRIPLEDES</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The cipher algorithm to be used for
encryption/decryption of the XML message content. The available choices
are:</p><ul><li><code>XMLCipher.TRIPLEDES</code></li><li><code>XMLCipher.AES_128</code></li><li><code>XMLCipher.AES_128_GCM</code>
<strong>Camel
2.12</strong></li><li><code>XMLCipher.AES_192</code></li><li><code>XMLCipher.AES_192_GCM</code>
<strong>Camel
2.12</strong></li><li><code>XMLCipher.AES_256</code></li><li><code>XMLCipher.AES_256_GCM</code>
<strong>Camel 2.12</strong></li><li>XMLCipher.SEED_128 <strong>Camel
2.15</strong></li><li>XMLCipher.CAMELLIA_128, XMLCipher.CAMELLIA_192,
XMLCipher.CAMELLIA_256 <strong>Camel 2.15</strong></li></ul></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>namespaces</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>A map of namespace values index
ed by prefix. The index values must match the prefixes used in the
<code>secureTag</code> XPath query.</p></td></tr></tbody></table></div><h3
id="BookDataFormatAppendix-AsymmetricEncryptionOptions">Asymmetric Encryption
Options</h3><p>These options can be applied in addition to relevant the Basic
options to use asymmetric key encryption.</p><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>recipientKeyAlias</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The key alias to be used when
retrieving the recipient's public or private key from a KeyStore when
performing asymmetric key encryption or decryption.
</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>keyCipherAlgorithm</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>Camel 2.12</strong>
<code>XMLCipher.RSA_OAEP</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The cipher algorithm to be used for
encryption/decryption of the asymmetric key. The available choices
are:</p><ul><li><code>XMLCipher.RSA_v1dot5</code></li><li><code>XMLCipher.RSA_OAEP</code></li><li><code>XMLCipher.RSA_OAEP_11</code></li></ul></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>keyOrTrustStoreParameters</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Configuration options for
creating and loading a KeyStore instance that represents the sender's
trustStore or recipient's keyStore.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>keyPassword</code></
p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.10.2 / 2.11:</strong> The password to
be used for retrieving the private key from the KeyStore. This key is used for
asymmetric decryption.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>digestAlgorithm</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>XMLCipher.SHA1</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>Camel 2.12</strong> The digest
algorithm to use with the RSA OAEP algorithm. The available choices
are:</p><ul><li><code>XMLCipher.SHA1</code></li><li><code>XMLCipher.SHA256</code></li><li><code>XMLCipher.SHA512</code></li></ul></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>mgfAlgorithm</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>EncryptionConstants.MGF1_SHA1</p></td><td
colspan="1" rowspan="1" class="confluence
Td"><p><strong>Camel 2.12</strong> The MGF Algorithm to use with the RSA OAEP
algorithm. The available choices
are:</p><ul><li><code>EncryptionConstants.MGF1_SHA1</code></li><li><code>EncryptionConstants.MGF1_SHA256</code></li><li><code>EncryptionConstants.MGF1_SHA512</code></li></ul></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd">addKeyValueForEncryptedKey</td><td colspan="1" rowspan="1"
class="confluenceTd">true</td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>Camel 2.14.1 </strong>Whether to add the public
key used to encrypt the session key as a KeyValue in the EncryptedKey structure
or not.</td></tr></tbody></table></div><h4
id="BookDataFormatAppendix-KeyCipherAlgorithm">Key Cipher Algorithm</h4><p>As
of Camel 2.12.0, the default Key Cipher Algorithm is now XMLCipher.RSA_OAEP
instead of XMLCipher.RSA_v1dot5. Usage of XMLCipher.RSA_v1dot5 is discouraged
due to various attacks. Requests that use RSA v1.5 as the key cipher algorithm
will be rejected unle
ss it has been explicitly configured as the key cipher algorithm.</p><h3
id="BookDataFormatAppendix-Marshal.2">Marshal</h3><p>In order to encrypt the
payload, the <code>marshal</code> processor needs to be applied on the route
followed by the <strong><code>secureXML()</code></strong> tag.</p><h3
id="BookDataFormatAppendix-Unmarshal.2">Unmarshal</h3><p>In order to decrypt
the payload, the <code>unmarshal</code> processor needs to be applied on the
route followed by the <strong><code>secureXML()</code></strong> tag.</p><h3
id="BookDataFormatAppendix-Examples">Examples</h3><p>Given below are several
examples of how marshalling could be performed at the Document, Element, and
Content levels.</p><h4
id="BookDataFormatAppendix-FullPayloadencryption/decryption">Full Payload
encryption/decryption</h4><div class="code panel pdl conf-macro output-block"
data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java;
gutter: false; theme: Default" data-theme="Default">from("direct:start")
.marshal().secureXML()
.unmarshal().secureXML()
@@ -1695,8 +1695,8 @@ context.addRoutes(new RouteBuilder() {
</unmarshal>
...
</pre>
-</div></div><h3
id="BookDataFormatAppendix-Dependencies.9">Dependencies</h3><p>This data format
is provided within the <strong>camel-xmlsecurity</strong> component.</p>
-The GZip <a shape="rect" href="data-format.html">Data Format</a> is a message
compression and de-compression format. It uses the same deflate algorithm that
is used in <a shape="rect" href="zip-dataformat.html">Zip DataFormat</a>,
although some additional headers are provided. This format is produced by
popular <code>gzip</code>/<code>gunzip</code> tool. Messages marshalled using
GZip compression can be unmarshalled using GZip decompression just prior to
being consumed at the endpoint. The compression capability is quite useful when
you deal with large XML and Text based payloads or when you read messages
previously comressed using <code>gzip</code> tool.
+</div></div><h3
id="BookDataFormatAppendix-Dependencies.9">Dependencies</h3><p>This data format
is provided within the <strong>camel-xmlsecurity</strong> component.</p></div>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include">The GZip <a shape="rect" href="data-format.html">Data
Format</a> is a message compression and de-compression format. It uses the same
deflate algorithm that is used in <a shape="rect"
href="zip-dataformat.html">Zip DataFormat</a>, although some additional headers
are provided. This format is produced by popular
<code>gzip</code>/<code>gunzip</code> tool. Messages marshalled using GZip
compression can be unmarshalled using GZip decompression just prior to being
consumed at the endpoint. The compression capability is quite useful when you
deal with large XML and Text based payloads or when you read messages
previously comressed using <code>gzip</code> tool.
<h3 id="BookDataFormatAppendix-Options.3">Options</h3>
@@ -1722,8 +1722,8 @@ from("activemq:queue:MY_QUEUE").unmarsha
<h3 id="BookDataFormatAppendix-Dependencies.10">Dependencies</h3>
-<p>This data format is provided in <strong>camel-core</strong> so no
additional dependencies is needed.</p>
-<h2 id="BookDataFormatAppendix-Castor">Castor</h2>
+<p>This data format is provided in <strong>camel-core</strong> so no
additional dependencies is needed.</p></div>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include"><h2 id="BookDataFormatAppendix-Castor">Castor</h2>
<p><strong>Available as of Camel 2.1</strong></p>
<p>Castor is a <a shape="rect" href="data-format.html">Data Format</a> which
uses the <a shape="rect" class="external-link" href="http://www.castor.org/"
rel="nofollow">Castor XML library</a> to unmarshal an XML payload into Java
objects or to marshal Java objects into an XML payload.</p>
@@ -1849,8 +1849,8 @@ castor.getUnmarshaller();
<version>x.x.x</version>
</dependency>
</pre>
-</div></div>
-<h1 id="BookDataFormatAppendix-Protobuf-ProtocolBuffers">Protobuf - Protocol
Buffers</h1>
+</div></div></div>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include"><h1
id="BookDataFormatAppendix-Protobuf-ProtocolBuffers">Protobuf - Protocol
Buffers</h1>
<p>"Protocol Buffers - Google's data interchange format"</p>
@@ -1970,8 +1970,8 @@ message AddressBook {
<version>2.2.0</version>
</dependency>
</pre>
-</div></div>
-<h2 id="BookDataFormatAppendix-SOAPDataFormat">SOAP DataFormat</h2>
+</div></div></div>
+<div class="conf-macro output-block" data-hasbody="false"
data-macro-name="include"><h2 id="BookDataFormatAppendix-SOAPDataFormat">SOAP
DataFormat</h2>
<p><strong>Available as of Camel 2.3</strong></p>
<p>SOAP is a <a shape="rect" href="data-format.html">Data Format</a> which
uses JAXB2 and JAX-WS annotations to marshal and unmarshal SOAP payloads. It
provides the basic features of Apache CXF without need for the CXF Stack.</p>
@@ -2165,8 +2165,8 @@ from("jms://queue:customerServiceQueue")
<version>2.3.0</version>
</dependency>
</pre>
-</div></div>
[... 29 lines stripped ...]