Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Fri Aug  7 10:20:07 
2015
@@ -3685,11 +3685,11 @@ The tutorial has been designed in two pa
 While not actual tutorials you might find working through the source of the 
various <a shape="rect" href="examples.html">Examples</a> useful.</li></ul>
 
 <h2 id="BookInOnePage-TutorialonSpringRemotingwithJMS">Tutorial on Spring 
Remoting with JMS</h2><p>&#160;</p><div class="confluence-information-macro 
confluence-information-macro-information"><p class="title">Thanks</p><span 
class="aui-icon aui-icon-small aui-iconfont-info 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>This tutorial was kindly donated 
to Apache Camel by Martin Gilday.</p></div></div><h2 
id="BookInOnePage-Preface">Preface</h2><p>This tutorial aims to guide the 
reader through the stages of creating a project which uses Camel to facilitate 
the routing of messages from a JMS queue to a <a shape="rect" 
class="external-link" href="http://www.springramework.org"; 
rel="nofollow">Spring</a> service. The route works in a synchronous fashion 
returning a response to the client.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1438852726461 {padding: 0px;}
-div.rbtoc1438852726461 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1438852726461 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1438942689486 {padding: 0px;}
+div.rbtoc1438942689486 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1438942689486 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1438852726461">
+/*]]>*/</style></p><div class="toc-macro rbtoc1438942689486">
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-TutorialonSpringRemotingwithJMS">Tutorial on Spring 
Remoting with JMS</a></li><li><a shape="rect" 
href="#BookInOnePage-Preface">Preface</a></li><li><a shape="rect" 
href="#BookInOnePage-Prerequisites">Prerequisites</a></li><li><a shape="rect" 
href="#BookInOnePage-Distribution">Distribution</a></li><li><a shape="rect" 
href="#BookInOnePage-About">About</a></li><li><a shape="rect" 
href="#BookInOnePage-CreatetheCamelProject">Create the Camel Project</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-UpdatethePOMwithDependencies">Update the POM with 
Dependencies</a></li></ul>
 </li><li><a shape="rect" href="#BookInOnePage-WritingtheServer">Writing the 
Server</a>
@@ -5789,11 +5789,11 @@ So we completed the last piece in the pi
 <p>This example has been removed from <strong>Camel 2.9</strong> onwards. 
Apache Axis 1.4 is a very old and unsupported framework. We encourage users to 
use <a shape="rect" href="cxf.html">CXF</a> instead of Axis.</p></div></div>
 
 <style type="text/css">/*<![CDATA[*/
-div.rbtoc1438852727063 {padding: 0px;}
-div.rbtoc1438852727063 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1438852727063 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1438942690253 {padding: 0px;}
+div.rbtoc1438942690253 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1438942690253 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style><div class="toc-macro rbtoc1438852727063">
+/*]]>*/</style><div class="toc-macro rbtoc1438942690253">
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-TutorialusingAxis1.4withApacheCamel">Tutorial using Axis 
1.4 with Apache Camel</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-Prerequisites">Prerequisites</a></li><li><a shape="rect" 
href="#BookInOnePage-Distribution">Distribution</a></li><li><a shape="rect" 
href="#BookInOnePage-Introduction">Introduction</a></li><li><a shape="rect" 
href="#BookInOnePage-SettinguptheprojecttorunAxis">Setting up the project to 
run Axis</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-Maven2">Maven 2</a></li><li><a shape="rect" 
href="#BookInOnePage-wsdl">wsdl</a></li><li><a shape="rect" 
href="#BookInOnePage-ConfiguringAxis">Configuring Axis</a></li><li><a 
shape="rect" href="#BookInOnePage-RunningtheExample">Running the 
Example</a></li></ul>
@@ -10030,7 +10030,7 @@ from(&quot;file://site/inbox&quot;).unma
 &lt;/dependency&gt;
 ]]></script>
 </div></div>
-<h2 id="BookInOnePage-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"><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>Decimalformat</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>"##.###.###"</p></td><td colsp
 an="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"><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 (described 
hereafter) to the Class or field.</p><div class="confluence-information-mac
 ro confluence-information-macro-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></div></div><h2 
id="BookInOnePage-Annotations.2">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 
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="BookInOnePage-1.CsvRecord">1. CsvRecord</h3><p>The CsvRecord anno
 tation 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" 
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" rowspan="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" row
 span="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" 
class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>&#160;</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="confl
 uenceTd">boolean</td><td colspan="1" rowspan="1" 
class="confluenceTd"><strong>Camel 2.11:</strong>optional - default value = 
false -&#160;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" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<h2 id="BookInOnePage-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"><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>Decimalformat</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>"##.###.###"</p></td><td colsp
 an="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"><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 (described 
hereafter) to the Class or field.</p><div class="confluence-information-mac
 ro confluence-information-macro-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="BookInOnePage-Annotations.2">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 
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="BookInOnePage-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" 
class="confluenceTd"><p>Class</p></td></tr></tbody></table></div><div 
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" 
rowspan="1" clas
 s="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="confluenc
 eTd"><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" 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 - i
 f 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" 
class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>&#160;</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 -&#160;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" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[@CsvRecord( separator = &quot;,&quot; )
 public Class Order {
 ...
@@ -10700,18 +10700,32 @@ public class Security {
 
 ]]></script>
 </div></div><h3 id="BookInOnePage-UsingtheJavaDSL.2">Using the Java 
DSL</h3><p>The next step consists in instantiating the DataFormat 
<em>bindy</em> class associated with this record type and providing Java 
package name(s) as parameter.</p><p>For example the following uses the class 
<code>BindyCsvDataFormat</code> (who correspond to the class associated with 
the CSV record type) which is configured with "com.acme.model"<br clear="none"> 
package name to initialize the model objects configured in this 
package.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[DataFormat bindy = new 
BindyCsvDataFormat(&quot;com.acme.model&quot;);
-]]></script>
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[// Camel 2.15 or older (configure by package 
name)
+DataFormat bindy = new BindyCsvDataFormat(&quot;com.acme.model&quot;);
+
+?
+// Camel 2.16 onwards (configure by class name)
+DataFormat bindy = new 
BindyCsvDataFormat(com.acme.model.MyModel.class);]]></script>
 </div></div><h4 id="BookInOnePage-Settinglocale">Setting locale</h4><p>Bindy 
supports configuring the locale on the dataformat, such as&#160;</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[BindyCsvDataFormat bindy = new 
BindyCsvDataFormat(&quot;com.acme.model&quot;);
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[// Camel 2.15 or older (configure by package 
name)
+BindyCsvDataFormat bindy = new BindyCsvDataFormat(&quot;com.acme.model&quot;);
+// Camel 2.16 onwards (configure by class name)
+BindyCsvDataFormat bindy = new 
BindyCsvDataFormat(com.acme.model.MyModel.class);
 
 bindy.setLocale(&quot;us&quot;);]]></script>
 </div></div><p>Or to use the platform default locale then use "default" as the 
locale name. Notice this requires Camel 2.14/2.13.3/2.12.5.</p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[BindyCsvDataFormat bindy = new 
BindyCsvDataFormat(&quot;com.acme.model&quot;);
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[// Camel 2.15 or older (configure by package 
name)
+BindyCsvDataFormat bindy = new BindyCsvDataFormat(&quot;com.acme.model&quot;);
+// Camel 2.16 onwards (configure by class name)
+BindyCsvDataFormat bindy = new 
BindyCsvDataFormat(com.acme.model.MyModel.class);
 
 bindy.setLocale(&quot;default&quot;);]]></script>
 </div></div><p>for older releases you can set it using Java code as 
shown</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[BindyCsvDataFormat bindy = new 
BindyCsvDataFormat(&quot;com.acme.model&quot;);
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[// Camel 2.15 or older (configure by package 
name)
+BindyCsvDataFormat bindy = new BindyCsvDataFormat(&quot;com.acme.model&quot;);
+// Camel 2.16 onwards (configure by class name)
+BindyCsvDataFormat bindy = new 
BindyCsvDataFormat(com.acme.model.MyModel.class);
+
 
 bindy.setLocale(Locale.getDefault().getISO3Country());]]></script>
 </div></div><h4 id="BookInOnePage-Unmarshaling">Unmarshaling</h4><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
@@ -10757,161 +10771,7 @@ bindy.setLocale(Locale.getDefault().getI
    .marshal(bindy)
    .to(&quot;file://outbox&quot;)
 ]]></script>
-</div></div><h3 id="BookInOnePage-Unittest">Unit test</h3><p>Here is two 
examples showing how to marshall or unmarshall a CSV file with Camel</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeHeader 
panelHeader pdl" style="border-bottom-width: 1px;"><b>Marshall</b></div><div 
class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[package org.apache.camel.dataformat.bindy.csv;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.camel.EndpointInject;
-import org.apache.camel.Produce;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import 
org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink.Client;
-import 
org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink.Order;
-import org.apache.camel.spring.javaconfig.SingleRouteCamelConfiguration;
-import org.junit.Test;
-import org.springframework.config.java.annotation.Bean;
-import org.springframework.config.java.annotation.Configuration;
-import org.springframework.config.java.test.JavaConfigContextLoader;
-import org.springframework.test.context.ContextConfiguration;
-import 
org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
-
-@ContextConfiguration(locations = 
&quot;org.apache.camel.dataformat.bindy.csv.BindyComplexCsvMarshallTest$ContextConfig&quot;,
 loader = JavaConfigContextLoader.class)
-public class BindyComplexCsvMarshallTest extends 
AbstractJUnit4SpringContextTests {
-
-    private List&lt;Map&lt;String, Object&gt;&gt; models = new 
ArrayList&lt;Map&lt;String, Object&gt;&gt;();
-    private String result = &quot;10,A1,Julia,Roberts,BE123456789,Belgium 
Ventage 10/12,150,USD,14-01-2009&quot;;
-
-    @Produce(uri = &quot;direct:start&quot;)
-    private ProducerTemplate template;
-
-    @EndpointInject(uri = &quot;mock:result&quot;)
-    private MockEndpoint resultEndpoint;
-
-    @Test
-    public void testMarshallMessage() throws Exception {
-        resultEndpoint.expectedBodiesReceived(result);
-
-        template.sendBody(generateModel());
-
-        resultEndpoint.assertIsSatisfied();
-    }
-
-    private List&lt;Map&lt;String, Object&gt;&gt; generateModel() {
-        Map&lt;String, Object&gt; model = new HashMap&lt;String, Object&gt;();
-
-        Order order = new Order();
-        order.setOrderNr(10);
-        order.setAmount(new BigDecimal(&quot;150&quot;));
-        order.setIsinCode(&quot;BE123456789&quot;);
-        order.setInstrumentName(&quot;Belgium Ventage 10/12&quot;);
-        order.setCurrency(&quot;USD&quot;);
-
-        Calendar calendar = new GregorianCalendar();
-        calendar.set(2009, 0, 14);
-        order.setOrderDate(calendar.getTime());
-
-        Client client = new Client();
-        client.setClientNr(&quot;A1&quot;);
-        client.setFirstName(&quot;Julia&quot;);
-        client.setLastName(&quot;Roberts&quot;);
-
-        order.setClient(client);
-
-        model.put(order.getClass().getName(), order);
-        model.put(client.getClass().getName(), client);
-
-        models.add(0, model);
-
-        return models;
-    }
-
-    @Configuration
-    public static class ContextConfig extends SingleRouteCamelConfiguration {
-        BindyCsvDataFormat camelDataFormat = new 
BindyCsvDataFormat(&quot;org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink&quot;);
-
-        @Override
-        @Bean
-        public RouteBuilder route() {
-            return new RouteBuilder() {
-                @Override
-                public void configure() {
-                    
from(&quot;direct:start&quot;).marshal(camelDataFormat).to(&quot;mock:result&quot;);
-                }
-            };
-        }
-    }
-
-}
-]]></script>
-</div></div><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeHeader panelHeader pdl" style="border-bottom-width: 
1px;"><b>Unmarshall</b></div><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[package org.apache.camel.dataformat.bindy.csv;
-
-import org.apache.camel.EndpointInject;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.spring.javaconfig.SingleRouteCamelConfiguration;
-import org.junit.Test;
-import org.springframework.config.java.annotation.Bean;
-import org.springframework.config.java.annotation.Configuration;
-import org.springframework.config.java.test.JavaConfigContextLoader;
-import org.springframework.test.context.ContextConfiguration;
-import 
org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
-
-@ContextConfiguration(locations = 
&quot;org.apache.camel.dataformat.bindy.csv.BindyComplexCsvUnmarshallTest$ContextConfig&quot;,
 loader = JavaConfigContextLoader.class)
-public class BindyComplexCsvUnmarshallTest extends 
AbstractJUnit4SpringContextTests {
-
-    @EndpointInject(uri = &quot;mock:result&quot;)
-    private MockEndpoint resultEndpoint;
-
-    @Test
-    public void testUnMarshallMessage() throws Exception {
-        resultEndpoint.expectedMessageCount(1);
-        resultEndpoint.assertIsSatisfied();
-    }
-
-    @Configuration
-    public static class ContextConfig extends SingleRouteCamelConfiguration {
-        BindyCsvDataFormat csvBindyDataFormat = new 
BindyCsvDataFormat(&quot;org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink&quot;);
-
-        @Override
-        @Bean
-        public RouteBuilder route() {
-            return new RouteBuilder() {
-                @Override
-                public void configure() {
-                    
from(&quot;file://src/test/data?noop=true&quot;).unmarshal(csvBindyDataFormat).to(&quot;mock:result&quot;);
-                }
-            };
-        }
-    }
-
-}
-]]></script>
-</div></div><p>In this example, BindyCsvDataFormat class has been instantiated 
in a traditional way but it is also possible to provide information directly to 
the function (un)marshal like this where BindyType corresponds to the Bindy 
DataFormat class to instantiate and the parameter contains the list of package 
names.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[    public static class ContextConfig extends 
SingleRouteCamelConfiguration {
-        @Override
-        @Bean
-        public RouteBuilder route() {
-            return new RouteBuilder() {
-                @Override
-                public void configure() {
-                    from(&quot;direct:start&quot;)
-                    .marshal().bindy(BindyType.Csv, 
&quot;org.apache.camel.dataformat.bindy.model.simple.oneclass&quot;)
-                    .to(&quot;mock:result&quot;);
-                }
-            };
-        }
-    }
-]]></script>
-</div></div><h3 id="BookInOnePage-UsingSpringXML.2">Using Spring 
XML</h3><p>This is really easy to use Spring as your favorite DSL language to 
declare the routes to be used for camel-bindy. The following example shows two 
routes where the first will pick-up records from files, unmarshal the content 
and bind it to their model. The result is then send to a pojo (doing nothing 
special) and place them into a queue.</p><p>The second route will extract the 
pojos from the queue and marshal the content to generate a file containing the 
csv record</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>spring 
dsl</b></div><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookInOnePage-UsingSpringXML.2">Using Spring 
XML</h3><p>This is really easy to use Spring as your favorite DSL language to 
declare the routes to be used for camel-bindy. The following example shows two 
routes where the first will pick-up records from files, unmarshal the content 
and bind it to their model. The result is then send to a pojo (doing nothing 
special) and place them into a queue.</p><p>The second route will extract the 
pojos from the queue and marshal the content to generate a file containing the 
csv record. The example above is for using Camel 2.16 onwards.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeHeader 
panelHeader pdl" style="border-bottom-width: 1px;"><b>spring dsl</b></div><div 
class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;?xml version=&quot;1.0&quot; 
encoding=&quot;UTF-8&quot;?&gt;
 
 &lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
@@ -10922,13 +10782,6 @@ public class BindyComplexCsvUnmarshallTe
        http://camel.apache.org/schema/spring
        http://camel.apache.org/schema/spring/camel-spring.xsd&quot;&gt;
 
-       &lt;bean id=&quot;bindyDataformat&quot; 
class=&quot;org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat&quot;&gt;
-               &lt;constructor-arg 
value=&quot;org.apache.camel.bindy.model&quot; /&gt;
-       &lt;/bean&gt;
-
-       &lt;bean id=&quot;csv&quot; 
class=&quot;org.apache.camel.bindy.csv.HandleOrderBean&quot; /&gt;
-
-
         &lt;!-- Queuing engine - ActiveMq - work locally in mode virtual 
memory --&gt;
        &lt;bean id=&quot;activemq&quot; 
class=&quot;org.apache.activemq.camel.component.ActiveMQComponent&quot;&gt;
                &lt;property name=&quot;brokerURL&quot; 
value=&quot;vm://localhost:61616&quot;/&gt;
@@ -10936,7 +10789,11 @@ public class BindyComplexCsvUnmarshallTe
 
 
        &lt;camelContext 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
-               &lt;jmxAgent id=&quot;agent&quot; disabled=&quot;false&quot; 
/&gt;
+
+?
+        &lt;dataFormats&gt;
+          &lt;bindy id=&quot;bindyDataformat&quot; type=&quot;Csv&quot; 
classType=&quot;org.apache.camel.bindy.model.Order&quot;/&gt;
+        &lt;/dataFormats&gt;
 
                &lt;route&gt;
                        &lt;from uri=&quot;file://src/data/csv/?noop=true&quot; 
/&gt;
@@ -17742,11 +17599,11 @@ template.send(&quot;direct:alias-verify&
 ]]></script>
 </div></div><p></p><h3 id="BookInOnePage-SeeAlso.28">See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html">Configuring 
Camel</a></li><li><a shape="rect" 
href="component.html">Component</a></li><li><a shape="rect" 
href="endpoint.html">Endpoint</a></li><li><a shape="rect" 
href="getting-started.html">Getting Started</a></li></ul><ul><li><a 
shape="rect" href="crypto.html">Crypto</a> Crypto is also available as a <a 
shape="rect" href="data-format.html">Data Format</a></li></ul> <h2 
id="BookInOnePage-CXFComponent">CXF Component</h2><div 
class="confluence-information-macro confluence-information-macro-note"><span 
class="aui-icon aui-icon-small aui-iconfont-warning 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>When using CXF as a consumer, the 
<a shape="rect" href="cxf-bean-component.html">CXF Bean Component</a> allows 
you to factor out how message payloads are received from their processing as a 
RESTful or SOAP web service. This has the potential of using a multitude of 
transports to consume web 
 services. The bean component's configuration is also simpler and provides the 
fastest method to implement web services using Camel and 
CXF.</p></div></div><div class="confluence-information-macro 
confluence-information-macro-tip"><span class="aui-icon aui-icon-small 
aui-iconfont-approve confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>When using CXF in streaming modes 
(see DataFormat option), then also read about <a shape="rect" 
href="stream-caching.html">Stream caching</a>.</p></div></div><p>The 
<strong>cxf:</strong> component provides integration with <a shape="rect" 
href="http://cxf.apache.org";>Apache CXF</a> for connecting to JAX-WS services 
hosted in CXF.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1438852739256 {padding: 0px;}
-div.rbtoc1438852739256 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1438852739256 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1438942711757 {padding: 0px;}
+div.rbtoc1438942711757 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1438942711757 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1438852739256">
+/*]]>*/</style></p><div class="toc-macro rbtoc1438942711757">
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-CXFComponent">CXF Component</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-URIformat">URI format</a></li><li><a shape="rect" 
href="#BookInOnePage-Options">Options</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-Thedescriptionsofthedataformats">The descriptions of the 
dataformats</a>

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.


Reply via email to