You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2019/03/31 15:23:09 UTC

svn commit: r1042911 [47/48] - in /websites/production/camel/content: ./ 2007/08/17/ 2008/04/08/ 2008/04/28/ 2009/01/19/ 2009/10/26/ 2012/01/17/ 2012/03/01/ 2019/03/ 2019/03/31/

Modified: websites/production/camel/content/xmljson.html
==============================================================================
--- websites/production/camel/content/xmljson.html (original)
+++ websites/production/camel/content/xmljson.html Sun Mar 31 15:23:07 2019
@@ -92,10 +92,10 @@
 <div class="wiki-content maincontent"><h2 id="XmlJson-XMLJSONDataFormat(camel-xmljson)">XML JSON Data Format (camel-xmljson)</h2><p><strong>Available as of Camel 2.10</strong></p><p>Camel already supports a number of data formats to perform XML and JSON-related conversions, but all of them require a POJO either as an input (for marshalling) or produce a POJO as output (for un-marshaling). This data format provides the capability to convert from XML to JSON and viceversa directly, without stepping through intermediate POJOs.</p><p>This data format leverages the <a shape="rect" class="external-link" href="http://json-lib.sourceforge.net/" rel="nofollow">Json-lib</a> library to achieve direct conversion. In this context, XML is considered the high-level format, while JSON is the low-level format. Hence, the marshal/unmarshal semantics are assigned as follows:</p><ul><li>marshalling =&gt; converting from XML to JSON</li><li>un-marshaling =&gt; converting from JSON to XML.</li></ul><h3 i
 d="XmlJson-Options">Options</h3><p>This data format supports the following options. You can set them via all DSLs. The defaults marked with&#160;<strong><code>(*)</code></strong> are determined by <strong><code>json-lib</code></strong>, rather than the code of the data format itself. They are reproduced here for convenience to avoid having to consult the <strong><code>json-lib</code></strong> documentation directly.</p><div class="confluenceTableSmall conf-macro output-block" data-hasbody="true" data-macro-name="div"><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>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>encoding</code></p></td><td colspan="1" rowspan="1" class="confluence
 Td"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>UTF-8 (*)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Used when</strong> <span style="color: rgb(0,128,0);"><strong>un-marshaling</strong></span> <strong>(JSON to XML conversion).</strong></p><p>Sets the encoding for the call to <a shape="rect" class="external-link" href="http://json-lib.sourceforge.net/apidocs/net/sf/json/xml/XMLSerializer.html#write(net.sf.json.JSON, java.lang.String)" rel="nofollow"><code>XMLSerializer.write()</code></a> method, hence it is only used when producing XML. <br clear="none" class="atl-forced-newline"> However, when producing JSON, the encoding is determined by the input String being processed.</p><p>If the conversion is performed on an <strong><code>InputStream</code></strong>,&#160;<strong><code>json-lib</code></strong> uses the platform's default encoding, e.g., determined by the <strong><code>file.encoding</code></strong> sys
 tem property.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>elementName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>'e' (*)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Used when</strong> <span style="color: rgb(0,128,0);"><strong>un-marshaling</strong></span><strong>&#160;(JSON to XML conversion).</strong></p><p>Specifies the name of the XML elements representing each array element.</p><p>See <a shape="rect" class="external-link" href="http://json-lib.sourceforge.net/snippets.html#JSONObject_to_XML_change_node_names" rel="nofollow">json-lib doc</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>arrayName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>'a' (*)</code></p></td><td colspan
 ="1" rowspan="1" class="confluenceTd"><p><strong>Used when</strong> <span style="color: rgb(0,128,0);"><strong>un-marshaling</strong></span><strong>&#160;(JSON to XML conversion).</strong></p><p>Specifies the name of the top-level XML element.</p><p>For example, when converting:</p><p><strong><code>[1, 2, 3]</code></strong></p><p>it is, by default, translated as:</p><p><strong><code>&lt;a&gt;&lt;e&gt;1&lt;/e&gt;&lt;e&gt;2&lt;/e&gt;&lt;e&gt;3&lt;/e&gt;&lt;/a&gt;</code></strong></p><p>By setting this option or <strong><code>rootName</code></strong>, you can alter the name of the element <strong><code>a</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>rootName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>none (*)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Used when</strong> <span style="color: rgb(0,128,0)
 ;"><strong>un-marshaling</strong></span><strong>&#160;(JSON to XML conversion).</strong></p><p>When converting any JSON construct (<strong><code>object</code>, <code>array</code>, <code>null</code></strong>) to XML (un-marshaling), this option specifies the name of the top-level XML element.</p><p>If not set,&#160;<strong><code>json-lib</code></strong> will use <strong><code>arrayName</code></strong> or&#160;<strong><code>objectName</code></strong> (default value: <strong><code>o</code></strong>, at the current time it is not configurable in this data format).</p><p>If set to <strong><code>root</code></strong>, the JSON string:</p><p><strong><code>{ "x": "value1", "y" : "value2" }</code></strong>&#160;</p><p>is translated as:</p><p><strong><code>&lt;root&gt;&lt;x&gt;value1&lt;/x&gt;&lt;y&gt;value2&lt;/y&gt;&lt;/root&gt;</code></strong></p><p>otherwise the&#160;<strong><code>root</code></strong> element would be named <strong><code>o</code></strong>.</p></td></tr><tr><td colspan="1" 
 rowspan="1" class="confluenceTd"><p><code>namespaceLenient</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false (*)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Used when</strong> <span style="color: rgb(0,128,0);"><strong>un-marshaling</strong></span><strong>&#160;(JSON to XML conversion).</strong></p><p>According to the <strong><strong><code>json-lib</code></strong></strong> docs: "<em>Flag to be tolerant to incomplete namespace prefixes.</em>"</p><p>In most cases, <strong><strong><code>json-lib</code></strong></strong> automatically changes this flag at runtime to match the processing.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>namespaceMappings</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>List&lt;NamespacesPerElementMapping&gt;</code></p></td><td colspan="1" rowspan="1" class="confluen
 ceTd"><p><code>none</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Used when</strong> <span style="color: rgb(0,128,0);"><strong>un-marshaling</strong></span><strong>&#160;(JSON to XML conversion).</strong></p><p>Binds namespace prefixes and URIs to specific JSON elements.&#160;</p><p><strong><code>NamespacesPerElementMapping</code></strong> is a wrapper around an element name + a map of prefixes against URIs.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>expandableProperties</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>List&lt;String&gt;</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>none</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Used when</strong> <span style="color: rgb(0,128,0);"><strong>un-marshaling</strong></span><strong>&#160;(JSON to XML conversion).</strong></p><p>With expandable properties, JSON array elements are converted to XML
  as a sequence of repetitive XML elements with the local name equal to the JSON key.</p><p>For example, the following JSON:&#160;</p><p><strong><code>{ "number": 1,2,3 }</code></strong></p><p>is normally translated as:</p><p><strong><code>&lt;number&gt;&lt;e&gt;1&lt;/e&gt;&lt;e&gt;2&lt;/e&gt;&lt;e&gt;3&lt;/e&gt;&lt;/number&gt;</code></strong></p><p>where&#160;<strong><code>e</code></strong> can be modified by setting&#160;<strong><code>elementName</code></strong>.</p><p>However, if&#160;<strong><code>number</code></strong> is set as an expandable property, it's translated as:</p><p><strong><code>&lt;number&gt;1&lt;/number&gt;&lt;number&gt;2&lt;/number&gt;&lt;number&gt;3&lt;/number&gt;</code></strong></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>typeHints</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>TypeHintsEnum</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>YES</code></p></td><td colspan="1" rowspan
 ="1" class="confluenceTd"><p><strong>Used when</strong> <span style="color: rgb(0,128,0);"><strong>un-marshaling</strong></span><strong>&#160;(JSON to XML conversion).</strong></p><p>Adds type hints to the resulting XML to aid conversion back to JSON.&#160;See documentation <a shape="rect" class="external-link" href="http://json-lib.sourceforge.net/apidocs/net/sf/json/xml/XMLSerializer.html" rel="nofollow">here</a> for an explanation.</p><p><strong><code>TypeHintsEnum</code></strong> comprises the following values, which lead to different combinations of the underlying XMLSerializer's <strong><code>typeHintsEnabled</code></strong> and <strong><code>typeHintsCompatibility</code></strong> flags:</p><ul><li><p><code>TypeHintsEnum.NO</code>&#160;<strong><code>=&gt;</code></strong> <code>typeHintsEnabled</code>&#160;=&#160;<code>false</code></p></li><li><p><code>TypeHintsEnum.YES</code>&#160;<strong><code>=&gt;</code></strong>&#160; <code>typeHintsEnabled</code> = <code>true</code>,&#160
 ;&#160;<code>typeHintsCompatibility</code> =&#160;<code>true</code></p></li><li><p><code>TypeHintsEnum.WITH_PREFIX</code>&#160;<strong><code>=&gt;</code></strong>&#160; <code>typeHintsEnabled</code> = <code>true</code>,&#160;&#160;<code>typeHintsCompatibility</code> = <code>false</code></p></li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>forceTopLevelObject</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false (*)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Used when</strong> <span style="color: rgb(51,51,153);"><strong>marshaling</strong></span> <strong>(XML to JSON conversion).</strong></p><p>Determines whether the resulting JSON will start off with a top-most element whose name matches the XML root element.</p><p>If this option is <strong><code>false</code></strong>, the XML string:</p><p><strong><code>&lt;a&gt;&
 lt;x&gt;1&lt;/x&gt;&lt;y&gt;2&lt;/y&gt;&lt;/a&gt;</code></strong></p><p>is translated as:</p><p><strong><code>{"x": "1", "y": "2"}</code></strong></p><p>If&#160;<strong><code>true</code></strong>, it's translated as:</p><p><strong><code>{ "a":&#160; { "x": "1", "y": "2" }}</code></strong></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>skipWhitespace</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false (*)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Used when</strong> <span style="color: rgb(51,51,153);"><strong>marshaling</strong></span><strong>&#160;(XML to JSON conversion).</strong></p><p>Determines whether white spaces between XML elements will be regarded as text values or disregarded.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>trimSpaces</code></p></td><td colspan="1" rowspan="1" cla
 ss="confluenceTd"><p><code>Boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false (*)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Used when</strong> <span style="color: rgb(51,51,153);"><strong>marshaling</strong></span><strong>&#160;(XML to JSON conversion).</strong></p><p>Determines whether leading and trailing white spaces will be omitted from String values.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>skipNamespaces</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false (*)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Used when</strong> <span style="color: rgb(51,51,153);"><strong>marshaling</strong></span><strong>&#160;(XML to JSON conversion).</strong></p><p>Signals whether namespaces should be ignored. By default they will be added to the JSON output u
 sing&#160;<strong><code>@xmlns</code></strong> elements.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>removeNamespacePrefixes</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false (*)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Used when</strong> <span style="color: rgb(51,51,153);"><strong>marshaling</strong></span><strong>&#160;(XML to JSON conversion).</strong></p><p>Removes the namespace prefixes from XML qualified elements, so that the resulting JSON string does not contain them.</p></td></tr></tbody></table></div></div>
 
 
-<h3 id="XmlJson-BasicUsageWiththeJavaDSL">Basic Usage With the Java DSL</h3><h4 id="XmlJson-ExplicitlyInstantiatingtheDataFormat">Explicitly Instantiating the DataFormat</h4><p>Just instantiate the&#160;<strong><code>XmlJsonDataFormat</code></strong> from package <strong><code>org.apache.camel.dataformat.xmljson</code></strong>. Make sure you have installed the <strong><code>camel-xmljson</code></strong> feature (if running on OSGi) or that you've included&#160;<strong><code>camel-xmljson-{version}.jar</code></strong> and its transitive dependencies in your classpath.</p><p>Example, initialization with a default configuration:</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">
+<h3 id="XmlJson-BasicUsageWiththeJavaDSL">Basic Usage With the Java DSL</h3><h4 id="XmlJson-ExplicitlyInstantiatingtheDataFormat">Explicitly Instantiating the DataFormat</h4><p>Just instantiate the&#160;<strong><code>XmlJsonDataFormat</code></strong> from package <strong><code>org.apache.camel.dataformat.xmljson</code></strong>. Make sure you have installed the <strong><code>camel-xmljson</code></strong> feature (if running on OSGi) or that you've included&#160;<strong><code>camel-xmljson-{version}.jar</code></strong> and its transitive dependencies in your classpath.</p><p>Example, initialization with a default configuration:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">XmlJsonDataFormat xmlJsonFormat = new XmlJsonDataFormat();
 </pre>
-</div></div><p>To tune the behavior of the data format as per the options above, use the appropriate setters:</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><p>To tune the behavior of the data format as per the options above, use the appropriate setters:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">XmlJsonDataFormat xmlJsonFormat = new XmlJsonDataFormat();
 xmlJsonFormat.setEncoding("UTF-8");
 xmlJsonFormat.setForceTopLevelObject(true);
@@ -105,7 +105,7 @@ xmlJsonFormat.setSkipNamespaces(true);
 xmlJsonFormat.setRemoveNamespacePrefixes(true);
 xmlJsonFormat.setExpandableProperties(Arrays.asList("d", "e"));
 </pre>
-</div></div><p>Once the&#160;<strong><code>DataFormat</code></strong> is instantiated, the next step is to use it as a parameter to either of the <strong><code>marshal()</code><code>/</code><code>unmarshal()</code></strong> DSL elements:</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><p>Once the&#160;<strong><code>DataFormat</code></strong> is instantiated, the next step is to use it as a parameter to either of the <strong><code>marshal()</code><code>/</code><code>unmarshal()</code></strong> DSL elements:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">// From XML to JSON
 from("direct:marshal")
   .marshal(xmlJsonFormat)
@@ -116,7 +116,7 @@ from("direct:unmarshal")
   .unmarshal(xmlJsonFormat)
   .to("mock:xml");
 </pre>
-</div></div><h4 id="XmlJson-DefiningtheDataFormatin-line">Defining the DataFormat in-line</h4><p>Alternatively, you can define the data format inline by using the <strong><code>xmljson()</code></strong> DSL element.</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><h4 id="XmlJson-DefiningtheDataFormatin-line">Defining the DataFormat in-line</h4><p>Alternatively, you can define the data format inline by using the <strong><code>xmljson()</code></strong> DSL element.</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">// From XML to JSON - inline dataformat
 from("direct:marshalInline")
   .marshal()
@@ -129,7 +129,7 @@ from("direct:unmarshalInline")
   .xmljson()
   .to("mock:xmlInline");
 </pre>
-</div></div><p>If you wish, you can even pass in a Map&lt;String, String&gt; to the inline methods to provide custom options:</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><p>If you wish, you can even pass in a Map&lt;String, String&gt; to the inline methods to provide custom options:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">Map&lt;String, String&gt; xmlJsonOptions = new HashMap&lt;String, String&gt;();
 
 xmlJsonOptions.put(org.apache.camel.model.dataformat.XmlJsonDataFormat.ENCODING, "UTF-8");
@@ -150,7 +150,7 @@ from("direct:unmarshalInlineOptions")
   .xmljson(xmlJsonOptions)
   .to("mock:xmlInlineOptions");
 </pre>
-</div></div><h3 id="XmlJson-BasicUsagewithSpringorBlueprintDSL">Basic Usage with Spring or Blueprint DSL</h3><p>Within the <strong><code>&lt;dataFormats&gt;</code></strong> block, simply configure an <strong><code>xmljson</code></strong> element with unique IDs:</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><h3 id="XmlJson-BasicUsagewithSpringorBlueprintDSL">Basic Usage with Spring or Blueprint DSL</h3><p>Within the <strong><code>&lt;dataFormats&gt;</code></strong> block, simply configure an <strong><code>xmljson</code></strong> element with unique IDs:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: xml; gutter: false; theme: Default" data-theme="Default">&lt;dataFormats&gt;
     &lt;xmljson id="xmljson"/&gt;
     &lt;xmljson id="xmljsonWithOptions" 
@@ -162,7 +162,7 @@ from("direct:unmarshalInlineOptions")
              expandableProperties="d e"/&gt;
 &lt;/dataFormats&gt;
 </pre>
-</div></div><p>Then you simply refer to the data format object within your <strong><code>&lt;marshal/&gt;</code></strong> and&#160;<strong><code>&lt;unmarshal/&gt;</code></strong> DSLs:</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><p>Then you simply refer to the data format object within your <strong><code>&lt;marshal/&gt;</code></strong> and&#160;<strong><code>&lt;unmarshal/&gt;</code></strong> DSLs:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: xml; gutter: false; theme: Default" data-theme="Default">&lt;route&gt;
     &lt;from uri="direct:marshal"/&gt;
     &lt;marshal ref="xmljson"/&gt;
@@ -175,10 +175,10 @@ from("direct:unmarshalInlineOptions")
     &lt;to uri="mock:xmlWithOptions"/&gt;
 &lt;/route&gt;
 </pre>
-</div></div><p>Enabling XML DSL autocompletion for this component is easy: just refer to the appropriate <a shape="rect" class="external-link" href="http://camel.apache.org/xml-reference.html">Schema locations</a>, depending on whether you're using <a shape="rect" class="external-link" href="http://camel.apache.org/schema/spring/">Spring</a> or <a shape="rect" class="external-link" href="http://camel.apache.org/schema/blueprint/">Blueprint</a> DSL. Remember that this data format is available from Camel 2.10. Therefore only schemas from that version or later will include these new XML elements and attributes.</p><p>The syntax with <a shape="rect" href="using-osgi-blueprint-with-camel.html">Blueprint</a> is identical to that of the Spring DSL. Just ensure the correct namespaces and&#160;<strong><code>schemaLocations</code></strong> are in use.</p><h3 id="XmlJson-NamespaceMappings">Namespace Mappings</h3><p>XML has namespaces to fully qualify elements and attributes; JSON doesn't. You 
 need to take this into account when performing XML-JSON conversions.</p><p>To bridge the gap, <a shape="rect" class="external-link" href="http://json-lib.sourceforge.net/" rel="nofollow">Json-lib</a> has an option to bind namespace declarations in the form of prefixes and namespace URIs to XML output elements while un-marshaling, e.g., converting from JSON to XML.</p><p>For example, provided the following JSON string:</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><p>Enabling XML DSL autocompletion for this component is easy: just refer to the appropriate <a shape="rect" class="external-link" href="http://camel.apache.org/xml-reference.html">Schema locations</a>, depending on whether you're using <a shape="rect" class="external-link" href="http://camel.apache.org/schema/spring/">Spring</a> or <a shape="rect" class="external-link" href="http://camel.apache.org/schema/blueprint/">Blueprint</a> DSL. Remember that this data format is available from Camel 2.10. Therefore only schemas from that version or later will include these new XML elements and attributes.</p><p>The syntax with <a shape="rect" href="using-osgi-blueprint-with-camel.html">Blueprint</a> is identical to that of the Spring DSL. Just ensure the correct namespaces and&#160;<strong><code>schemaLocations</code></strong> are in use.</p><h3 id="XmlJson-NamespaceMappings">Namespace Mappings</h3><p>XML has namespaces to fully qualify elements and attributes; JSON doesn't. You 
 need to take this into account when performing XML-JSON conversions.</p><p>To bridge the gap, <a shape="rect" class="external-link" href="http://json-lib.sourceforge.net/" rel="nofollow">Json-lib</a> has an option to bind namespace declarations in the form of prefixes and namespace URIs to XML output elements while un-marshaling, e.g., converting from JSON to XML.</p><p>For example, provided the following JSON string:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">{ "pref1:a": "value1", "pref2:b": "value2" }
 </pre>
-</div></div><p>you can ask&#160;<strong><code>json-lib</code></strong> to output namespace declarations on elements&#160;<strong><code>pref1:a</code></strong> and&#160;<strong><code>pref2:b</code></strong> to bind the prefixes&#160;<strong><code>pref1</code></strong> and&#160;<strong><code>pref2</code></strong> to specific namespace URIs.</p><p>To use this feature, simply create <strong><code>XmlJsonDataFormat.NamespacesPerElementMapping</code></strong> objects and add them to the <strong><code>namespaceMappings</code></strong> option (which is a <strong><code>List</code></strong>).</p><p>The <strong><code>XmlJsonDataFormat.NamespacesPerElementMapping</code></strong> holds an element name and a Map of <strong><code>[prefix =&gt; namespace URI]</code></strong>. To facilitate mapping multiple prefixes and namespace URIs, the <strong><code>NamespacesPerElementMapping(String element, String pipeSeparatedMappings)</code></strong> constructor takes a String-based pipe-separated sequence o
 f&#160;<strong><code>[prefix, namespaceURI]</code></strong> pairs in the following way: <strong><code>|ns2|http://camel.apache.org/personalData|ns3|http://camel.apache.org/personalData2|</code></strong>.</p><p>In order to define a default namespace, just leave the corresponding key field empty: <strong><code>|ns1|http://camel.apache.org/test1||http://camel.apache.org/default|</code>.</strong></p><p>Binding namespace declarations to an element name = empty string will attach those namespaces to the root element.</p><p>The code for this is:</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><p>you can ask&#160;<strong><code>json-lib</code></strong> to output namespace declarations on elements&#160;<strong><code>pref1:a</code></strong> and&#160;<strong><code>pref2:b</code></strong> to bind the prefixes&#160;<strong><code>pref1</code></strong> and&#160;<strong><code>pref2</code></strong> to specific namespace URIs.</p><p>To use this feature, simply create <strong><code>XmlJsonDataFormat.NamespacesPerElementMapping</code></strong> objects and add them to the <strong><code>namespaceMappings</code></strong> option (which is a <strong><code>List</code></strong>).</p><p>The <strong><code>XmlJsonDataFormat.NamespacesPerElementMapping</code></strong> holds an element name and a Map of <strong><code>[prefix =&gt; namespace URI]</code></strong>. To facilitate mapping multiple prefixes and namespace URIs, the <strong><code>NamespacesPerElementMapping(String element, String pipeSeparatedMappings)</code></strong> constructor takes a String-based pipe-separated sequence o
 f&#160;<strong><code>[prefix, namespaceURI]</code></strong> pairs in the following way: <strong><code>|ns2|http://camel.apache.org/personalData|ns3|http://camel.apache.org/personalData2|</code></strong>.</p><p>In order to define a default namespace, just leave the corresponding key field empty: <strong><code>|ns1|http://camel.apache.org/test1||http://camel.apache.org/default|</code>.</strong></p><p>Binding namespace declarations to an element name = empty string will attach those namespaces to the root element.</p><p>The code for this is:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">XmlJsonDataFormat namespacesFormat = new XmlJsonDataFormat();
 List&lt;XmlJsonDataFormat.NamespacesPerElementMapping&gt; namespaces = new ArrayList&lt;XmlJsonDataFormat.NamespacesPerElementMapping&gt;();
 
@@ -187,9 +187,9 @@ namespaces.add(new XmlJsonDataFormat.Nam
 namespacesFormat.setNamespaceMappings(namespaces);
 namespacesFormat.setRootElement("person");
 </pre>
-</div></div><p>And you can achieve the same in Spring DSL.</p><h4 id="XmlJson-Example">Example</h4><p>Using the namespace bindings in the Java snippet above on the following JSON string:</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><p>And you can achieve the same in Spring DSL.</p><h4 id="XmlJson-Example">Example</h4><p>Using the namespace bindings in the Java snippet above on the following JSON string:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: js; gutter: false; theme: Default" data-theme="Default">{ "name": "Raul", "surname": "Kripalani", "f": true, "g": null}</pre>
-</div></div><p>&#160;</p><p>Would yield the following XML:</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><p>&#160;</p><p>Would yield the following XML:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: xml; gutter: false; theme: Default" data-theme="Default">&lt;person xmlns="http://camel.apache.org/default" xmlns:ns1="http://camel.apache.org/test1"&gt;
     &lt;f&gt;true&lt;/f&gt;
     &lt;g null="true"/&gt;
@@ -197,7 +197,7 @@ namespacesFormat.setRootElement("person"
     &lt;surname xmlns:ns2="http://camel.apache.org/personalData" xmlns:ns3="http://camel.apache.org/personalData2"&gt;Kripalani&lt;/surname&gt;
 &lt;/person&gt;
 </pre>
-</div></div><p>Remember that the JSON spec defines a JSON object as follows:</p><blockquote><p>An object is an unordered set of name/value pairs. [...].</p></blockquote><p>That's why the elements are in a different order in the output XML.</p><h3 id="XmlJson-Dependencies">Dependencies</h3><p>To use the <a shape="rect" href="xmljson.html">XmlJson</a> dataformat in your camel routes you need to add the following dependency to your pom.</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><p>Remember that the JSON spec defines a JSON object as follows:</p><blockquote><p>An object is an unordered set of name/value pairs. [...].</p></blockquote><p>That's why the elements are in a different order in the output XML.</p><h3 id="XmlJson-Dependencies">Dependencies</h3><p>To use the <a shape="rect" href="xmljson.html">XmlJson</a> dataformat in your camel routes you need to add the following dependency to your pom.</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">&lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-xmljson&lt;/artifactId&gt;

Modified: websites/production/camel/content/xmlsecurity-dataformat.html
==============================================================================
--- websites/production/camel/content/xmlsecurity-dataformat.html (original)
+++ websites/production/camel/content/xmlsecurity-dataformat.html Sun Mar 31 15:23:07 2019
@@ -88,13 +88,13 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="XMLSecurityDataFormat-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 asymmetr
 ic 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="XMLSecurityDataFormat-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 boole
 an 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" rows
 pan="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 pr
 efixes used in the <code>secureTag</code> XPath query.</p></td></tr></tbody></table></div><h3 id="XMLSecurityDataFormat-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" cla
 ss="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="conflue
 nceTd"><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 Algori
 thm 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="XMLSecurityDataFormat-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 ci
 pher algorithm.</p><h3 id="XMLSecurityDataFormat-Marshal">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="XMLSecurityDataFormat-Unmarshal">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="XMLSecurityDataFormat-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="XMLSecurityDataFormat-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 class="wiki-content maincontent"><h2 id="XMLSecurityDataFormat-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 asymmetr
 ic 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="XMLSecurityDataFormat-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 boole
 an 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" rows
 pan="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 pr
 efixes used in the <code>secureTag</code> XPath query.</p></td></tr></tbody></table></div><h3 id="XMLSecurityDataFormat-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" cla
 ss="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="conflue
 nceTd"><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 Algori
 thm 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="XMLSecurityDataFormat-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 ci
 pher algorithm.</p><h3 id="XMLSecurityDataFormat-Marshal">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="XMLSecurityDataFormat-Unmarshal">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="XMLSecurityDataFormat-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="XMLSecurityDataFormat-FullPayloadencryption/decryption">Full Payload encryption/decryption</h4><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><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()
     .to("direct:end");
 </pre>
-</div></div><h4 id="XMLSecurityDataFormat-PartialPayloadContentOnlyencryption/decryption">Partial Payload Content Only 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><h4 id="XMLSecurityDataFormat-PartialPayloadContentOnlyencryption/decryption">Partial Payload Content Only encryption/decryption</h4><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">String tagXPATH = "//cheesesites/italy/cheese";
 boolean secureTagContent = true;
 ...
@@ -103,7 +103,7 @@ from("direct:start")
     .unmarshal().secureXML(tagXPATH, secureTagContent)
     .to("direct:end");
 </pre>
-</div></div><h4 id="XMLSecurityDataFormat-PartialMultiNodePayloadContentOnlyencryption/decryption">Partial Multi Node Payload Content Only 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><h4 id="XMLSecurityDataFormat-PartialMultiNodePayloadContentOnlyencryption/decryption">Partial Multi Node Payload Content Only encryption/decryption</h4><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">String tagXPATH = "//cheesesites/*/cheese";
 boolean secureTagContent = true;
 ...
@@ -112,7 +112,7 @@ from("direct:start")
     .unmarshal().secureXML(tagXPATH, secureTagContent)
     .to("direct:end");
 </pre>
-</div></div><h4 id="XMLSecurityDataFormat-PartialPayloadContentOnlyencryption/decryptionwithchoiceofpassPhrase(password)">Partial Payload Content Only encryption/decryption with choice of passPhrase(password)</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><h4 id="XMLSecurityDataFormat-PartialPayloadContentOnlyencryption/decryptionwithchoiceofpassPhrase(password)">Partial Payload Content Only encryption/decryption with choice of passPhrase(password)</h4><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">String tagXPATH = "//cheesesites/italy/cheese";
 boolean secureTagContent = true;
 ...
@@ -122,7 +122,7 @@ from("direct:start")
     .unmarshal().secureXML(tagXPATH, secureTagContent, passPhrase)
     .to("direct:end");
 </pre>
-</div></div><h4 id="XMLSecurityDataFormat-PartialPayloadContentOnlyencryption/decryptionwithpassPhrase(password)andAlgorithm">Partial Payload Content Only encryption/decryption with passPhrase(password) and Algorithm</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><h4 id="XMLSecurityDataFormat-PartialPayloadContentOnlyencryption/decryptionwithpassPhrase(password)andAlgorithm">Partial Payload Content Only encryption/decryption with passPhrase(password) and Algorithm</h4><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">import org.apache.xml.security.encryption.XMLCipher;
 ....
 String tagXPATH = "//cheesesites/italy/cheese";
@@ -134,7 +134,7 @@ from("direct:start")
     .unmarshal().secureXML(tagXPATH, secureTagContent, passPhrase, algorithm)
     .to("direct:end");
 </pre>
-</div></div><h4 id="XMLSecurityDataFormat-PartialPayloadContentwithNamespacesupport">Partial Payload Content with Namespace support</h4><h5 id="XMLSecurityDataFormat-JavaDSL">Java DSL</h5><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><h4 id="XMLSecurityDataFormat-PartialPayloadContentwithNamespacesupport">Partial Payload Content with Namespace support</h4><h5 id="XMLSecurityDataFormat-JavaDSL">Java DSL</h5><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">final Map&lt;String, String&gt; namespaces = new HashMap&lt;String, String&gt;();
 namespaces.put("cust", "http://cheese.xmlsecurity.camel.apache.org/");
 
@@ -151,7 +151,7 @@ context.addRoutes(new RouteBuilder() {
     }
 }
 </pre>
-</div></div><h5 id="XMLSecurityDataFormat-SpringXML">Spring XML</h5><p>A namespace prefix that is defined as part of the <code>camelContext</code> definition can be re-used in context within the data format <code>secureTag</code> attribute of the <code>secureXML</code> element.</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><h5 id="XMLSecurityDataFormat-SpringXML">Spring XML</h5><p>A namespace prefix that is defined as part of the <code>camelContext</code> definition can be re-used in context within the data format <code>secureTag</code> attribute of the <code>secureXML</code> element.</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">&lt;camelContext id="springXmlSecurityDataFormatTestCamelContext" 
               xmlns="http://camel.apache.org/schema/spring"
               xmlns:cheese="http://cheese.xmlsecurity.camel.apache.org/"&gt;        
@@ -163,7 +163,7 @@ context.addRoutes(new RouteBuilder() {
             &lt;/marshal&gt; 
             ...
 </pre>
-</div></div><h4 id="XMLSecurityDataFormat-AsymmetricKeyEncryption">Asymmetric Key Encryption</h4><h5 id="XMLSecurityDataFormat-SpringXMLSender">Spring XML Sender</h5><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><h4 id="XMLSecurityDataFormat-AsymmetricKeyEncryption">Asymmetric Key Encryption</h4><h5 id="XMLSecurityDataFormat-SpringXMLSender">Spring XML Sender</h5><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">&lt;!--  trust store configuration --&gt;                          
 &lt;camel:keyStoreParameters id="trustStoreParams" resource="./sender.ts" password="password"/&gt;
 
@@ -182,7 +182,7 @@ context.addRoutes(new RouteBuilder() {
             &lt;/marshal&gt; 
             ...
 </pre>
-</div></div><h5 id="XMLSecurityDataFormat-SpringXMLRecipient">Spring XML Recipient</h5><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><h5 id="XMLSecurityDataFormat-SpringXMLRecipient">Spring XML Recipient</h5><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"> 
 &lt;!--  key store configuration --&gt;
 &lt;camel:keyStoreParameters id="keyStoreParams" resource="./recipient.ks" password="password" /&gt;

Modified: websites/production/camel/content/xmpp.html
==============================================================================
--- websites/production/camel/content/xmpp.html (original)
+++ websites/production/camel/content/xmpp.html Sun Mar 31 15:23:07 2019
@@ -89,7 +89,7 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="XMPP-XMPPComponent">XMPP Component</h2><p>The <strong>xmpp:</strong> component implements an XMPP (Jabber) transport.</p><p>Maven users will need to add the following dependency to their <code>pom.xml</code> for this component:</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 class="wiki-content maincontent"><h2 id="XMPP-XMPPComponent">XMPP Component</h2><p>The <strong>xmpp:</strong> component implements an XMPP (Jabber) transport.</p><p>Maven users will need to add the following dependency to their <code>pom.xml</code> for this component:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">&lt;dependency&gt;
     &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
     &lt;artifactId&gt;camel-xmpp&lt;/artifactId&gt;
@@ -97,33 +97,33 @@
     &lt;!-- use the same version as your Camel core version --&gt;
 &lt;/dependency&gt;
 </pre>
-</div></div><h3 id="XMPP-URIformat">URI format</h3><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><h3 id="XMPP-URIformat">URI format</h3><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: text; gutter: false; theme: Default" data-theme="Default">xmpp://[login@]hostname[:port][/participant][?Options]
 </pre>
-</div></div><p>The component supports both room based and private person-person conversations.<br clear="none"> The component supports both producer and consumer (you can get messages from XMPP or send messages to XMPP). Consumer mode supports rooms starting.</p><p>You can append query options to the URI in the following format, <code>?option=value&amp;option=value&amp;...</code></p><h3 id="XMPP-Options">Options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>room</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If this option is specified, the component will connect to MUC (Multi User Chat). Usually, the domain name for MUC is different from the login domain. For example, if you are <code>superman@jabber.org</code> and want to join the <code>
 krypton</code> room, then the room URL is <code>krypton@conference.jabber.org</code>. Note the <code>conference</code> part.<br clear="none"> It is not a requirement to provide the full room JID. If the <code>room</code> parameter does not contain the <code>@</code> symbol, the domain part will be discovered and added by Camel</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>user</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>User name (without server name). If not specified, anonymous login will be attempted.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>password</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Password.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>resource</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>XMPP resource. The default is <code>Camel</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><cod
 e>createAccount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If <code>true</code>, an attempt to create an account will be made. Default is <code>false</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>participant</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>JID (Jabber ID) of person to receive messages. <code>room</code> parameter has precedence over <code>participant</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>nickname</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Use nickname when joining room. If room is specified and nickname is not, <code>user</code> will be used for the nickname.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serviceName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The name of the service you are connecting to. For Google Talk, this would be <code>gmail.com</code>.</p></td></
 tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>testConnectionOnStartup</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11</strong> Specifies whether to test the connection on startup. This is used to ensure that the XMPP client has a valid connection to the XMPP server when the route starts. Camel throws an exception on startup if a connection cannot be established. When this option is set to false, Camel will attempt to establish a "lazy" connection when needed by a producer, and will poll for a consumer connection until the connection is established. Default is <code>true</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>connectionPollDelay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11</strong> The amount of time in seconds between polls to verify the health of the XMPP connection, or between attempts to establish an initial consumer connection. Camel will 
 try to re-establish a connection if it has become inactive. Default is <code>10 seconds</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">pubsub</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15</strong> Accept pubsub packets on input, default is false</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">doc</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15</strong> <span>Set a doc header on the IN message containing a Document form of the incoming packet; default is true if presence or pubsub are true, otherwise false</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">connectionConfiguration</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.18:</strong> To use an existing connection configuration</td></tr></tbody></table></div><h3 id="XMPP-HeadersandsettingSubjectorLanguage">Headers and setting Subject or Language</h3><p>Camel sets the message IN headers as properties o
 n the XMPP message. You can configure a <code>HeaderFilterStategy</code> if you need custom filtering of headers.<br clear="none"> The <strong>Subject</strong> and <strong>Language</strong> of the XMPP message are also set if they are provided as IN headers.</p><h3 id="XMPP-Examples">Examples</h3><p>User <code>superman</code> to join room <code>krypton</code> at <code>jabber</code> server with password, <code>secret</code>:</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><p>The component supports both room based and private person-person conversations.<br clear="none"> The component supports both producer and consumer (you can get messages from XMPP or send messages to XMPP). Consumer mode supports rooms starting.</p><p>You can append query options to the URI in the following format, <code>?option=value&amp;option=value&amp;...</code></p><h3 id="XMPP-Options">Options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>room</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If this option is specified, the component will connect to MUC (Multi User Chat). Usually, the domain name for MUC is different from the login domain. For example, if you are <code>superman@jabber.org</code> and want to join the <code>
 krypton</code> room, then the room URL is <code>krypton@conference.jabber.org</code>. Note the <code>conference</code> part.<br clear="none"> It is not a requirement to provide the full room JID. If the <code>room</code> parameter does not contain the <code>@</code> symbol, the domain part will be discovered and added by Camel</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>user</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>User name (without server name). If not specified, anonymous login will be attempted.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>password</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Password.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>resource</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>XMPP resource. The default is <code>Camel</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><cod
 e>createAccount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If <code>true</code>, an attempt to create an account will be made. Default is <code>false</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>participant</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>JID (Jabber ID) of person to receive messages. <code>room</code> parameter has precedence over <code>participant</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>nickname</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Use nickname when joining room. If room is specified and nickname is not, <code>user</code> will be used for the nickname.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serviceName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The name of the service you are connecting to. For Google Talk, this would be <code>gmail.com</code>.</p></td></
 tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>testConnectionOnStartup</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11</strong> Specifies whether to test the connection on startup. This is used to ensure that the XMPP client has a valid connection to the XMPP server when the route starts. Camel throws an exception on startup if a connection cannot be established. When this option is set to false, Camel will attempt to establish a "lazy" connection when needed by a producer, and will poll for a consumer connection until the connection is established. Default is <code>true</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>connectionPollDelay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11</strong> The amount of time in seconds between polls to verify the health of the XMPP connection, or between attempts to establish an initial consumer connection. Camel will 
 try to re-establish a connection if it has become inactive. Default is <code>10 seconds</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">pubsub</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15</strong> Accept pubsub packets on input, default is false</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">doc</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15</strong> <span>Set a doc header on the IN message containing a Document form of the incoming packet; default is true if presence or pubsub are true, otherwise false</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">connectionConfiguration</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.18:</strong> To use an existing connection configuration</td></tr></tbody></table></div><h3 id="XMPP-HeadersandsettingSubjectorLanguage">Headers and setting Subject or Language</h3><p>Camel sets the message IN headers as properties o
 n the XMPP message. You can configure a <code>HeaderFilterStategy</code> if you need custom filtering of headers.<br clear="none"> The <strong>Subject</strong> and <strong>Language</strong> of the XMPP message are also set if they are provided as IN headers.</p><h3 id="XMPP-Examples">Examples</h3><p>User <code>superman</code> to join room <code>krypton</code> at <code>jabber</code> server with password, <code>secret</code>:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: text; gutter: false; theme: Default" data-theme="Default">xmpp://superman@jabber.org/?room=krypton@conference.jabber.org&amp;password=secret
 </pre>
-</div></div><p>User <code>superman</code> to send messages to <code>joker</code>:</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><p>User <code>superman</code> to send messages to <code>joker</code>:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: text; gutter: false; theme: Default" data-theme="Default">xmpp://superman@jabber.org/joker@jabber.org?password=secret
 </pre>
-</div></div><p>Routing example in Java:</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><p>Routing example in Java:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">from("timer://kickoff?period=10000").
 setBody(constant("I will win!\n Your Superman.")).
 to("xmpp://superman@jabber.org/joker@jabber.org?password=secret");
 </pre>
-</div></div><p>Consumer configuration, which writes all messages from <code>joker</code> into the queue, <code>evil.talk</code>.</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><p>Consumer configuration, which writes all messages from <code>joker</code> into the queue, <code>evil.talk</code>.</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">from("xmpp://superman@jabber.org/joker@jabber.org?password=secret").
 to("activemq:evil.talk");
 </pre>
-</div></div><p>Consumer configuration, which listens to room messages:</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><p>Consumer configuration, which listens to room messages:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">from("xmpp://superman@jabber.org/?password=secret&amp;room=krypton@conference.jabber.org").
 to("activemq:krypton.talk");
 </pre>
-</div></div><p>Room in short notation (no domain part):</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><p>Room in short notation (no domain part):</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">from("xmpp://superman@jabber.org/?password=secret&amp;room=krypton").
 to("activemq:krypton.talk");
 </pre>
-</div></div><p>When connecting to the Google Chat service, you'll need to specify the <code>serviceName</code> as well as your credentials:</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><p>When connecting to the Google Chat service, you'll need to specify the <code>serviceName</code> as well as your credentials:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">from("direct:start").
   to("xmpp://talk.google.com:5222/touser@gmail.com?serviceName=gmail.com&amp;user=fromuser&amp;password=secret").
   to("mock:result");</pre>