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 2012/08/23 16:20:03 UTC

svn commit: r829867 - in /websites/production/camel/content: book-component-appendix.html book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache hl7-dataformat.html hl7.html

Author: buildbot
Date: Thu Aug 23 14:20:02 2012
New Revision: 829867

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/book-component-appendix.html
    websites/production/camel/content/book-dataformat-appendix.html
    websites/production/camel/content/book-in-one-page.html
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/hl7-dataformat.html
    websites/production/camel/content/hl7.html

Modified: websites/production/camel/content/book-component-appendix.html
==============================================================================
--- websites/production/camel/content/book-component-appendix.html (original)
+++ websites/production/camel/content/book-component-appendix.html Thu Aug 23 14:20:02 2012
@@ -2218,7 +2218,8 @@ Error:sendSms: SoapFault exception: [Cli
 <p>You can add a customer interceptor like this and configure it into you camel-cxf endpont</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-xml">&lt;cxf:cxfEndpoint id=<span class="code-quote">"routerEndpoint"</span> address=<span class="code-quote">"http://localhost:${CXFTestSupport.port2}/CXFGreeterRouterTest/CamelContext/RouterPort"</span>
- 		serviceClass=<span class="code-quote">"org.apache.hello_world_soap_http.GreeterImpl"</span>&gt;
+ 		serviceClass=<span class="code-quote">"org.apache.hello_world_soap_http.GreeterImpl"</span>
+ 		skipFaultLogging=<span class="code-quote">"true"</span>&gt;
      <span class="code-tag">&lt;cxf:outInterceptors&gt;</span>
          <span class="code-tag"><span class="code-comment">&lt;!-- This interceptor will force the CXF server send the XML start document to client --&gt;</span></span>
          <span class="code-tag">&lt;bean class=<span class="code-quote">"org.apache.camel.component.cxf.WriteXmlDeclarationInterceptor"</span>/&gt;</span>
@@ -2932,12 +2933,12 @@ You can find an camel REST service route
   <span class="code-tag"><span class="code-comment">&lt;!-- Defined the server endpoint to create the cxf-rs consumer --&gt;</span></span> 
   &lt;cxf:rsServer id=<span class="code-quote">"rsServer"</span> address=<span class="code-quote">"http://localhost:${CXFTestSupport.port1}/CxfRsRouterTest/route"</span>
     serviceClass=<span class="code-quote">"org.apache.camel.component.cxf.jaxrs.testbean.CustomerService"</span> 
-    loggingFeatureEnabled=<span class="code-quote">"true"</span> loggingSizeLimit=<span class="code-quote">"20"</span>/&gt;
+    loggingFeatureEnabled=<span class="code-quote">"true"</span> loggingSizeLimit=<span class="code-quote">"20"</span> skipFaultLogging=<span class="code-quote">"true"</span>/&gt;
 
   <span class="code-tag"><span class="code-comment">&lt;!-- Defined the client endpoint to create the cxf-rs consumer --&gt;</span></span>
   &lt;cxf:rsClient id=<span class="code-quote">"rsClient"</span> address=<span class="code-quote">"http://localhost:${CXFTestSupport.port2}/CxfRsRouterTest/rest"</span>
     serviceClass=<span class="code-quote">"org.apache.camel.component.cxf.jaxrs.testbean.CustomerService"</span>
-    loggingFeatureEnabled=<span class="code-quote">"true"</span> /&gt;
+    loggingFeatureEnabled=<span class="code-quote">"true"</span> skipFaultLogging=<span class="code-quote">"true"</span>/&gt;
   
   <span class="code-tag"><span class="code-comment">&lt;!-- The camel route context --&gt;</span></span>
   <span class="code-tag">&lt;camelContext id=<span class="code-quote">"camel"</span> xmlns=<span class="code-quote">"http://camel.apache.org/schema/spring"</span>&gt;</span>
@@ -6621,7 +6622,7 @@ hibernate:[entityClassName][?options]
 
 <h2><a shape="rect" name="BookComponentAppendix-HL7Component"></a>HL7 Component</h2>
 
-<p>The <b>hl7</b> component is used for working with the HL7 MLLP protocol and the <a shape="rect" class="external-link" href="http://www.hl7.org/" rel="nofollow">HL7 model</a> using the <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net" rel="nofollow">HAPI library</a>.</p>
+<p>The <b>hl7</b> component is used for working with the HL7 MLLP protocol and <a shape="rect" class="external-link" href="http://www.hl7.org/" rel="nofollow">HL7 v2 messages</a> using the <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net" rel="nofollow">HAPI library</a>.</p>
 
 <p>This component supports the following:</p>
 <ul class="alternate" type="square"><li>HL7 MLLP codec for <a shape="rect" class="external-link" href="http://mina.apache.org/">Mina</a></li><li>Agnostic data format using either plain String objects or HAPI HL7 model objects.</li><li><a shape="rect" href="type-converter.html" title="Type Converter">Type Converter</a> from/to HAPI and String</li><li>HL7 DataFormat using HAPI library</li><li>Even more ease-of-use as it's integrated well with the <a shape="rect" href="mina.html" title="MINA">camel-mina</a> component.</li></ul>
@@ -6646,7 +6647,7 @@ hibernate:[entityClassName][?options]
 
 <p>The HL7 MLLP codec has the following options:</p>
 <div class="confluenceTableSmall"><div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>startByte</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x0b</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The start byte spanning the HL7 payload. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endByte1</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x1c</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The first end byte spanning the HL7 payload.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endByte2</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x0d</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The 2nd end byte spanning the HL7 payload. </td></tr
 ><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>charset</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> JVM Default </td><td colspan="1" rowspan="1" class="confluenceTd"> The encoding (is a <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/charset/Charset.html" rel="nofollow">charset name</a>) to use for the codec. If not provided, Camel will use the <a shape="rect" class="external-link" href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html#defaultCharset()" rel="nofollow">JVM default Charset</a>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>convertLFtoCR</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Will convert <tt>\n</tt> to <tt>\r</tt> (<tt>0x0d</tt>, 13 decimal) as HL7 usually uses <tt>\r</tt> as segment terminators. The HAPI library requires the use of <tt>\r</tt>. </td></tr><t
 r><td colspan="1" rowspan="1" class="confluenceTd"> <tt>validate</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether HAPI Parser should validate or not. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>parser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ca.uhn.hl7v2.parser.PipeParser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> To use a custom parser. Should be of type <tt>ca.uhn.hl7v2.parser.Parser</tt>. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>startByte</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x0b</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The start byte spanning the HL7 payload. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endByte1</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x1c</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The first end byte spanning the HL7 payload.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endByte2</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x0d</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The 2nd end byte spanning the HL7 payload. </td></tr
 ><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>charset</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> JVM Default </td><td colspan="1" rowspan="1" class="confluenceTd"> The encoding (is a <a shape="rect" class="external-link" href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html" rel="nofollow">charset name</a>) to use for the codec. If not provided, Camel will use the <a shape="rect" class="external-link" href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html#defaultCharset()" rel="nofollow">JVM default Charset</a>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>convertLFtoCR</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Will convert <tt>\n</tt> to <tt>\r</tt> (<tt>0x0d</tt>, 13 decimal) as HL7 usually uses <tt>\r</tt> as segment terminators. The HAPI library requires the use of <tt>\r</tt>. </td></tr><
 tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>validate</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether HAPI Parser should validate or not. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>parser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ca.uhn.hl7v2.parser.PipeParser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> To use a custom parser. Must be of type <tt>ca.uhn.hl7v2.parser.Parser</tt>. </td></tr></tbody></table>
 </div>
 </div>
 
@@ -6670,18 +6671,23 @@ hibernate:[entityClassName][?options]
 <p>The endpoint <b>hl7listener</b> can then be used in a route as a consumer, as this Java DSL example illustrates:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
-    from(<span class="code-quote">"hl7socket"</span>).to(<span class="code-quote">"patientLookupService"</span>);
+    from(<span class="code-quote">"hl7listener"</span>).to(<span class="code-quote">"patientLookupService"</span>);
 </pre>
 </div></div>
 <p>This is a very simple route that will listen for HL7 and route it to a service named <b>patientLookupService</b> that is also a Spring bean ID we have configured in the Spring XML as:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-xml">
-    <span class="code-tag">&lt;bean id=<span class="code-quote">"patientLookupService"</span> class=<span class="code-quote">"com.mycompany.healtcare.service.PatientLookupService"</span>/&gt;</span>
+    <span class="code-tag">&lt;bean id=<span class="code-quote">"patientLookupService"</span> class=<span class="code-quote">"com.mycompany.healthcare.service.PatientLookupService"</span>/&gt;</span>
 </pre>
 </div></div>
 <p>Another powerful feature of Camel is that we can have our business logic in POJO classes that is not tied to Camel as shown here:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
+
+<span class="code-keyword">import</span> ca.uhn.hl7v2.HL7Exception;
+<span class="code-keyword">import</span> ca.uhn.hl7v2.model.Message;
+<span class="code-keyword">import</span> ca.uhn.hl7v2.model.v24.segment.QRD;
+
 <span class="code-keyword">public</span> class PatientLookupService {
     <span class="code-keyword">public</span> Message lookupPatient(Message input) <span class="code-keyword">throws</span> HL7Exception {
         QRD qrd = (QRD)input.get(<span class="code-quote">"QRD"</span>);
@@ -6693,18 +6699,18 @@ hibernate:[entityClassName][?options]
     }
 </pre>
 </div></div>
-<p>Notice that this class uses just imports from the HAPI library and <b>none</b> from Camel.</p>
+<p>Notice that this class uses just imports from the HAPI library and <b>not</b> from Camel.</p>
 
 <h3><a shape="rect" name="BookComponentAppendix-HL7Modelusingjava.lang.String"></a>HL7 Model using java.lang.String</h3>
 <p>The HL7MLLP codec uses plain <tt>String</tt> as its data format. Camel uses its <a shape="rect" href="type-converter.html" title="Type Converter">Type Converter</a> to convert to/from strings to the HAPI HL7 model objects. However, you can use plain <tt>String</tt> objects if you prefer, for instance if you wish to parse the data yourself.</p>
 
 <p>See samples for such an example.</p>
 
-<h3><a shape="rect" name="BookComponentAppendix-HL7ModelusingHAPI"></a>HL7 Model using HAPI</h3>
-<p>The HL7 model uses Java objects from the HAPI library. Using this library, we can encode and decode from the EDI format (ER7) that is mostly used with HL7.<br clear="none">
+<h3><a shape="rect" name="BookComponentAppendix-HL7v2ModelusingHAPI"></a>HL7v2 Model using HAPI</h3>
+<p>The HL7v2 model uses Java objects from the HAPI library. Using this library, we can encode and decode from the EDI format (ER7) that is mostly used with HL7v2.<br clear="none">
 With this model you can code with Java objects instead of the EDI based HL7 format that can be hard for humans to read and understand.</p>
 
-<p>The ER7 sample below is a request to lookup a patient with the patient ID, <tt>0101701234</tt>.</p>
+<p>The sample below is a request to lookup a patient with the patient ID <tt>0101701234</tt>.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 MSH|^~\\&amp;|MYSENDER|MYRECEIVER|MYAPPLICATION||200612211200||QRY^A19|1234|P|2.4
@@ -6712,8 +6718,8 @@ QRD|200612211200|R|I|GetPatient|||1^RD|0
 </pre>
 </div></div>
 
-<p>Using the HL7 model we can work with the data as a <tt>ca.uhn.hl7v2.model.Message.Message</tt> object.<br clear="none">
-To retrieve the patient ID for the patient in the ER7 above, you can do this in Java code:</p>
+<p>Using the HL7 model we can work with the data as a <tt>ca.uhn.hl7v2.model.Message</tt> object.<br clear="none">
+To retrieve the patient ID in the message above, you can do this in Java code:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 Message msg = exchange.getIn().getBody(Message.class);
@@ -6722,20 +6728,28 @@ QRD qrd = (QRD)msg.get(<span class="code
 </pre>
 </div></div>
 
+<p>If you know the message type in advance, you can be more type-safe:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+QRY_A19 msg = exchange.getIn().getBody(QRY_A19.class);
+<span class="code-object">String</span> patientId = msg.getQRD().getWhoSubjectFilter(0).getIDNumber().getValue();
+</pre>
+</div></div>
+
 <p>Camel has built-in type converters, so when this operation is invoked:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 Message msg = exchange.getIn().getBody(Message.class);
 </pre>
 </div></div>
-<p>Camel will convert the received HL7 data from <tt>String</tt> to <tt>Message</tt>. This is powerful when combined with the HL7 listener, then you as the end-user don't have to work with <tt>byte[]</tt>, <tt>String</tt> or any other simple object formats. You can just use the HAPI HL7 model objects.</p>
+<p>Camel will convert the received HL7 data from <tt>String</tt> to <tt>Message</tt>. This is powerful when combined with the HL7 listener, then you as the end-user don't have to work with <tt>byte[]</tt>, <tt>String</tt> or any other simple object formats. You can just use the HAPI HL7v2 model objects.</p>
 
 <h3><a shape="rect" name="BookComponentAppendix-HL7DataFormat"></a>HL7 DataFormat</h3>
 <p>The <a shape="rect" href="hl7.html" title="HL7">HL7</a> component ships with a HL7 data format that can be used to format between <tt>String</tt> and HL7 model objects. </p>
 <ul class="alternate" type="square"><li><tt>marshal</tt> = from Message to byte stream (can be used when returning as response using the HL7 MLLP codec)</li><li><tt>unmarshal</tt> = from byte stream to Message (can be used when receiving streamed data from the HL7 MLLP</li></ul>
 
 
-<p>To use the data format, simply instantiate an instance and invoke the marhsal or unmarshl operation in the route builder:</p>
+<p>To use the data format, simply instantiate an instance and invoke the marshal or unmarshal operation in the route builder:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
   DataFormat hl7 = <span class="code-keyword">new</span> HL7DataFormat();
@@ -6763,6 +6777,8 @@ Then you don't need to create an instanc
 </pre>
 </div></div>
 
+
+
 <h3><a shape="rect" name="BookComponentAppendix-MessageHeaders"></a>Message Headers</h3>
 <p>The <b>unmarshal</b> operation adds these MSH fields as headers on the Camel message:</p>
 
@@ -6776,7 +6792,7 @@ Then you don't need to create an instanc
 <h3><a shape="rect" name="BookComponentAppendix-Options"></a>Options</h3>
 <p>The HL7 Data Format supports the following options:</p>
 <div class="confluenceTableSmall"><div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Option </th><th colspan="1" rowspan="1" class="confluenceTh"> Default </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> validate </td><td colspan="1" rowspan="1" class="confluenceTd"> true </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether the HAPI Parser should validate. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>parser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ca.uhn.hl7v2.parser.PipeParser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> To use a custom parser. Should be of type <tt>ca.uhn.hl7v2.parser.Parser</tt>. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Option </th><th colspan="1" rowspan="1" class="confluenceTh"> Default </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> validate </td><td colspan="1" rowspan="1" class="confluenceTd"> true </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether the HAPI Parser should validate. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>parser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ca.uhn.hl7v2.parser.PipeParser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> To use a custom parser. Must be of type <tt>ca.uhn.hl7v2.parser.Parser</tt>. </td></tr></tbody></table>
 </div>
 
 </div>
@@ -6785,40 +6801,42 @@ Then you don't need to create an instanc
 
 <p>To use HL7 in your Camel routes you'll need to add a dependency on <b>camel-hl7</b> listed above, which implements this data format. </p>
 
-<p>The HAPI library since Version 0.6 has been split into a <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-base/1.0/" rel="nofollow">base library</a> and several structure libraries, one for each HL7v2 message version:</p>
+<p>The HAPI library since Version 0.6 has been split into a <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-base/1.2/" rel="nofollow">base library</a> and several structure libraries, one for each HL7v2 message version:</p>
 
-<ul><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v21/1.0/" rel="nofollow">v2.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v22/1.0/" rel="nofollow">v2.2 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v23/1.0/" rel="nofollow">v2.3 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v231/1.0/" rel="nofollow">v2.3.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v24/1.0/" rel="nofollow">v2.4 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v24/1.0/" rel="nofollow">v2.5 structures li
 brary</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v251/1.0/" rel="nofollow">v2.5.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v26/1.0/" rel="nofollow">v2.6 structures library</a></li></ul>
+<ul><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v21/1.2/" rel="nofollow">v2.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v22/1.2/" rel="nofollow">v2.2 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v23/1.2/" rel="nofollow">v2.3 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v231/1.2/" rel="nofollow">v2.3.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v24/1.2/" rel="nofollow">v2.4 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v25/1.2/" rel="nofollow">v2.5 structures library</a></li><li>
 <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v251/1.2/" rel="nofollow">v2.5.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v26/1.2/" rel="nofollow">v2.6 structures library</a></li></ul>
 
 
-<p>By default <tt>camel-hl7</tt> only references the HAPI <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-base/1.0/" rel="nofollow">base library</a>. Applications are responsible for including structure libraries themselves. For example, if a application works with HL7v2 message versions 2.4 and 2.5 then the following dependencies must be added:</p>
+<p>By default <tt>camel-hl7</tt> only references the HAPI <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-base/1.2/" rel="nofollow">base library</a>. Applications are responsible for including structure libraries themselves. For example, if a application works with HL7v2 message versions 2.4 and 2.5 then the following dependencies must be added:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-xml">
 <span class="code-tag">&lt;dependency&gt;</span>
     <span class="code-tag">&lt;groupId&gt;</span>ca.uhn.hapi<span class="code-tag">&lt;/groupId&gt;</span>
     <span class="code-tag">&lt;artifactId&gt;</span>hapi-structures-v24<span class="code-tag">&lt;/artifactId&gt;</span>
-    <span class="code-tag">&lt;version&gt;</span>1.0<span class="code-tag">&lt;/version&gt;</span>
+    <span class="code-tag">&lt;version&gt;</span>1.2<span class="code-tag">&lt;/version&gt;</span>
 <span class="code-tag">&lt;/dependency&gt;</span>
 <span class="code-tag">&lt;dependency&gt;</span>
     <span class="code-tag">&lt;groupId&gt;</span>ca.uhn.hapi<span class="code-tag">&lt;/groupId&gt;</span>
     <span class="code-tag">&lt;artifactId&gt;</span>hapi-structures-v25<span class="code-tag">&lt;/artifactId&gt;</span>
-    <span class="code-tag">&lt;version&gt;</span>1.0<span class="code-tag">&lt;/version&gt;</span>
+    <span class="code-tag">&lt;version&gt;</span>1.2<span class="code-tag">&lt;/version&gt;</span>
 <span class="code-tag">&lt;/dependency&gt;</span>
 </pre>
 </div></div>
 
-<p>Alternatively, an OSGi bundle containing the base library, all structures libraries and required dependencies (on the bundle classpath) can be downloaded from the <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-osgi-base/" rel="nofollow">HAPI Maven repository</a>. </p>
+<p>Alternatively, an OSGi bundle containing the base library, all structures libraries and required dependencies (on the bundle classpath) can be downloaded from the <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-osgi-base/1.2/" rel="nofollow">central Maven repository</a>. </p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-xml">
 <span class="code-tag">&lt;dependency&gt;</span>
     <span class="code-tag">&lt;groupId&gt;</span>ca.uhn.hapi<span class="code-tag">&lt;/groupId&gt;</span>
     <span class="code-tag">&lt;artifactId&gt;</span>hapi-osgi-base<span class="code-tag">&lt;/artifactId&gt;</span>
-    <span class="code-tag">&lt;version&gt;</span>1.0.1<span class="code-tag">&lt;/version&gt;</span>
+    <span class="code-tag">&lt;version&gt;</span>1.2<span class="code-tag">&lt;/version&gt;</span>
 <span class="code-tag">&lt;/dependency&gt;</span>
 </pre>
 </div></div>
 
+<p>Note that the version number must match the version of the hapi-base library that is transitively referenced by this component.</p>
+
 <h3><a shape="rect" name="BookComponentAppendix-Samples"></a>Samples</h3>
 <p>In the following example we send a HL7 request to a HL7 listener and retrieves a response. We use plain <tt>String</tt> types in this example:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
@@ -6889,7 +6907,7 @@ in.append(line2);
 </pre>
 </div></div>
 
-<p>Notice that we use the HL7 DataFormat to enrich our Camel Message with the MSH fields preconfigued on the Camel Message. This lets us much more easily define our routes using the fluent builders.<br clear="none">
+<p>Notice that we use the HL7 DataFormat to enrich our Camel Message with the MSH fields preconfigured on the Camel Message. This lets us much more easily define our routes using the fluent builders.<br clear="none">
 If we do not use the HL7 DataFormat, then we do not gains these headers and we must resort to a different technique for computing the MSH trigger event (= what kind of HL7 message it is). This is a big advantage of the HL7 DataFormat over the plain HL7 type converters.</p>
 
 <h4><a shape="rect" name="BookComponentAppendix-SampleusingplainStringobjects"></a>Sample using plain String objects</h4>

Modified: websites/production/camel/content/book-dataformat-appendix.html
==============================================================================
--- websites/production/camel/content/book-dataformat-appendix.html (original)
+++ websites/production/camel/content/book-dataformat-appendix.html Thu Aug 23 14:20:02 2012
@@ -789,7 +789,7 @@ from(<span class="code-quote">"jms:<span
 <ul class="alternate" type="square"><li><tt>marshal</tt> = from Message to byte stream (can be used when returning as response using the HL7 MLLP codec)</li><li><tt>unmarshal</tt> = from byte stream to Message (can be used when receiving streamed data from the HL7 MLLP</li></ul>
 
 
-<p>To use the data format, simply instantiate an instance and invoke the marhsal or unmarshl operation in the route builder:</p>
+<p>To use the data format, simply instantiate an instance and invoke the marshal or unmarshal operation in the route builder:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
   DataFormat hl7 = <span class="code-keyword">new</span> HL7DataFormat();
@@ -816,6 +816,8 @@ Then you don't need to create an instanc
   from(<span class="code-quote">"jms:queue:hl7out"</span>).unmarshal().hl7().to(<span class="code-quote">"patientLookupService"</span>);
 </pre>
 </div></div>
+
+
 <h2><a shape="rect" name="BookDataFormatAppendix-EDIDataFormat"></a>EDI DataFormat</h2>
 
 <p>We encourage end users to look at the <a shape="rect" class="external-link" href="http://milyn.codehaus.org/Home" rel="nofollow">Smooks</a> which supports EDI and Camel natively.</p>
@@ -3305,9 +3307,9 @@ from(<span class="code-quote">"direct:ke
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-comment">// Public Key FileName
-</span><span class="code-object">String</span> keyFileName = <span class="code-quote">"org/apache/camel/component/crypto/pubring.gpg"</span>;
+</span><span class="code-object">String</span> keyFileName = getKeyFileName();
 <span class="code-comment">// Private Key FileName
-</span><span class="code-object">String</span> keyFileNameSec = <span class="code-quote">"org/apache/camel/component/crypto/secring.gpg"</span>;
+</span><span class="code-object">String</span> keyFileNameSec = getKeyFileNameSec();
 <span class="code-comment">// Keyring Userid Used to Encrypt
 </span><span class="code-object">String</span> keyUserid = <span class="code-quote">"sdude@nowhere.net"</span>;
 <span class="code-comment">// Private key password

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 Thu Aug 23 14:20:02 2012
@@ -11746,7 +11746,7 @@ from(<span class="code-quote">"jms:<span
 <ul class="alternate" type="square"><li><tt>marshal</tt> = from Message to byte stream (can be used when returning as response using the HL7 MLLP codec)</li><li><tt>unmarshal</tt> = from byte stream to Message (can be used when receiving streamed data from the HL7 MLLP</li></ul>
 
 
-<p>To use the data format, simply instantiate an instance and invoke the marhsal or unmarshl operation in the route builder:</p>
+<p>To use the data format, simply instantiate an instance and invoke the marshal or unmarshal operation in the route builder:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
   DataFormat hl7 = <span class="code-keyword">new</span> HL7DataFormat();
@@ -11773,6 +11773,8 @@ Then you don't need to create an instanc
   from(<span class="code-quote">"jms:queue:hl7out"</span>).unmarshal().hl7().to(<span class="code-quote">"patientLookupService"</span>);
 </pre>
 </div></div>
+
+
 <h2><a shape="rect" name="BookInOnePage-EDIDataFormat"></a>EDI DataFormat</h2>
 
 <p>We encourage end users to look at the <a shape="rect" class="external-link" href="http://milyn.codehaus.org/Home" rel="nofollow">Smooks</a> which supports EDI and Camel natively.</p>
@@ -22815,7 +22817,8 @@ Error:sendSms: SoapFault exception: [Cli
 <p>You can add a customer interceptor like this and configure it into you camel-cxf endpont</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-xml">&lt;cxf:cxfEndpoint id=<span class="code-quote">"routerEndpoint"</span> address=<span class="code-quote">"http://localhost:${CXFTestSupport.port2}/CXFGreeterRouterTest/CamelContext/RouterPort"</span>
- 		serviceClass=<span class="code-quote">"org.apache.hello_world_soap_http.GreeterImpl"</span>&gt;
+ 		serviceClass=<span class="code-quote">"org.apache.hello_world_soap_http.GreeterImpl"</span>
+ 		skipFaultLogging=<span class="code-quote">"true"</span>&gt;
      <span class="code-tag">&lt;cxf:outInterceptors&gt;</span>
          <span class="code-tag"><span class="code-comment">&lt;!-- This interceptor will force the CXF server send the XML start document to client --&gt;</span></span>
          <span class="code-tag">&lt;bean class=<span class="code-quote">"org.apache.camel.component.cxf.WriteXmlDeclarationInterceptor"</span>/&gt;</span>
@@ -23529,12 +23532,12 @@ You can find an camel REST service route
   <span class="code-tag"><span class="code-comment">&lt;!-- Defined the server endpoint to create the cxf-rs consumer --&gt;</span></span> 
   &lt;cxf:rsServer id=<span class="code-quote">"rsServer"</span> address=<span class="code-quote">"http://localhost:${CXFTestSupport.port1}/CxfRsRouterTest/route"</span>
     serviceClass=<span class="code-quote">"org.apache.camel.component.cxf.jaxrs.testbean.CustomerService"</span> 
-    loggingFeatureEnabled=<span class="code-quote">"true"</span> loggingSizeLimit=<span class="code-quote">"20"</span>/&gt;
+    loggingFeatureEnabled=<span class="code-quote">"true"</span> loggingSizeLimit=<span class="code-quote">"20"</span> skipFaultLogging=<span class="code-quote">"true"</span>/&gt;
 
   <span class="code-tag"><span class="code-comment">&lt;!-- Defined the client endpoint to create the cxf-rs consumer --&gt;</span></span>
   &lt;cxf:rsClient id=<span class="code-quote">"rsClient"</span> address=<span class="code-quote">"http://localhost:${CXFTestSupport.port2}/CxfRsRouterTest/rest"</span>
     serviceClass=<span class="code-quote">"org.apache.camel.component.cxf.jaxrs.testbean.CustomerService"</span>
-    loggingFeatureEnabled=<span class="code-quote">"true"</span> /&gt;
+    loggingFeatureEnabled=<span class="code-quote">"true"</span> skipFaultLogging=<span class="code-quote">"true"</span>/&gt;
   
   <span class="code-tag"><span class="code-comment">&lt;!-- The camel route context --&gt;</span></span>
   <span class="code-tag">&lt;camelContext id=<span class="code-quote">"camel"</span> xmlns=<span class="code-quote">"http://camel.apache.org/schema/spring"</span>&gt;</span>
@@ -27218,7 +27221,7 @@ hibernate:[entityClassName][?options]
 
 <h2><a shape="rect" name="BookInOnePage-HL7Component"></a>HL7 Component</h2>
 
-<p>The <b>hl7</b> component is used for working with the HL7 MLLP protocol and the <a shape="rect" class="external-link" href="http://www.hl7.org/" rel="nofollow">HL7 model</a> using the <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net" rel="nofollow">HAPI library</a>.</p>
+<p>The <b>hl7</b> component is used for working with the HL7 MLLP protocol and <a shape="rect" class="external-link" href="http://www.hl7.org/" rel="nofollow">HL7 v2 messages</a> using the <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net" rel="nofollow">HAPI library</a>.</p>
 
 <p>This component supports the following:</p>
 <ul class="alternate" type="square"><li>HL7 MLLP codec for <a shape="rect" class="external-link" href="http://mina.apache.org/">Mina</a></li><li>Agnostic data format using either plain String objects or HAPI HL7 model objects.</li><li><a shape="rect" href="type-converter.html" title="Type Converter">Type Converter</a> from/to HAPI and String</li><li>HL7 DataFormat using HAPI library</li><li>Even more ease-of-use as it's integrated well with the <a shape="rect" href="mina.html" title="MINA">camel-mina</a> component.</li></ul>
@@ -27243,7 +27246,7 @@ hibernate:[entityClassName][?options]
 
 <p>The HL7 MLLP codec has the following options:</p>
 <div class="confluenceTableSmall"><div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>startByte</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x0b</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The start byte spanning the HL7 payload. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endByte1</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x1c</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The first end byte spanning the HL7 payload.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endByte2</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x0d</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The 2nd end byte spanning the HL7 payload. </td></tr
 ><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>charset</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> JVM Default </td><td colspan="1" rowspan="1" class="confluenceTd"> The encoding (is a <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/charset/Charset.html" rel="nofollow">charset name</a>) to use for the codec. If not provided, Camel will use the <a shape="rect" class="external-link" href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html#defaultCharset()" rel="nofollow">JVM default Charset</a>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>convertLFtoCR</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Will convert <tt>\n</tt> to <tt>\r</tt> (<tt>0x0d</tt>, 13 decimal) as HL7 usually uses <tt>\r</tt> as segment terminators. The HAPI library requires the use of <tt>\r</tt>. </td></tr><t
 r><td colspan="1" rowspan="1" class="confluenceTd"> <tt>validate</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether HAPI Parser should validate or not. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>parser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ca.uhn.hl7v2.parser.PipeParser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> To use a custom parser. Should be of type <tt>ca.uhn.hl7v2.parser.Parser</tt>. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>startByte</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x0b</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The start byte spanning the HL7 payload. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endByte1</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x1c</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The first end byte spanning the HL7 payload.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endByte2</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x0d</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The 2nd end byte spanning the HL7 payload. </td></tr
 ><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>charset</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> JVM Default </td><td colspan="1" rowspan="1" class="confluenceTd"> The encoding (is a <a shape="rect" class="external-link" href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html" rel="nofollow">charset name</a>) to use for the codec. If not provided, Camel will use the <a shape="rect" class="external-link" href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html#defaultCharset()" rel="nofollow">JVM default Charset</a>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>convertLFtoCR</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Will convert <tt>\n</tt> to <tt>\r</tt> (<tt>0x0d</tt>, 13 decimal) as HL7 usually uses <tt>\r</tt> as segment terminators. The HAPI library requires the use of <tt>\r</tt>. </td></tr><
 tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>validate</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether HAPI Parser should validate or not. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>parser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ca.uhn.hl7v2.parser.PipeParser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> To use a custom parser. Must be of type <tt>ca.uhn.hl7v2.parser.Parser</tt>. </td></tr></tbody></table>
 </div>
 </div>
 
@@ -27267,18 +27270,23 @@ hibernate:[entityClassName][?options]
 <p>The endpoint <b>hl7listener</b> can then be used in a route as a consumer, as this Java DSL example illustrates:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
-    from(<span class="code-quote">"hl7socket"</span>).to(<span class="code-quote">"patientLookupService"</span>);
+    from(<span class="code-quote">"hl7listener"</span>).to(<span class="code-quote">"patientLookupService"</span>);
 </pre>
 </div></div>
 <p>This is a very simple route that will listen for HL7 and route it to a service named <b>patientLookupService</b> that is also a Spring bean ID we have configured in the Spring XML as:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-xml">
-    <span class="code-tag">&lt;bean id=<span class="code-quote">"patientLookupService"</span> class=<span class="code-quote">"com.mycompany.healtcare.service.PatientLookupService"</span>/&gt;</span>
+    <span class="code-tag">&lt;bean id=<span class="code-quote">"patientLookupService"</span> class=<span class="code-quote">"com.mycompany.healthcare.service.PatientLookupService"</span>/&gt;</span>
 </pre>
 </div></div>
 <p>Another powerful feature of Camel is that we can have our business logic in POJO classes that is not tied to Camel as shown here:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
+
+<span class="code-keyword">import</span> ca.uhn.hl7v2.HL7Exception;
+<span class="code-keyword">import</span> ca.uhn.hl7v2.model.Message;
+<span class="code-keyword">import</span> ca.uhn.hl7v2.model.v24.segment.QRD;
+
 <span class="code-keyword">public</span> class PatientLookupService {
     <span class="code-keyword">public</span> Message lookupPatient(Message input) <span class="code-keyword">throws</span> HL7Exception {
         QRD qrd = (QRD)input.get(<span class="code-quote">"QRD"</span>);
@@ -27290,18 +27298,18 @@ hibernate:[entityClassName][?options]
     }
 </pre>
 </div></div>
-<p>Notice that this class uses just imports from the HAPI library and <b>none</b> from Camel.</p>
+<p>Notice that this class uses just imports from the HAPI library and <b>not</b> from Camel.</p>
 
 <h3><a shape="rect" name="BookInOnePage-HL7Modelusingjava.lang.String"></a>HL7 Model using java.lang.String</h3>
 <p>The HL7MLLP codec uses plain <tt>String</tt> as its data format. Camel uses its <a shape="rect" href="type-converter.html" title="Type Converter">Type Converter</a> to convert to/from strings to the HAPI HL7 model objects. However, you can use plain <tt>String</tt> objects if you prefer, for instance if you wish to parse the data yourself.</p>
 
 <p>See samples for such an example.</p>
 
-<h3><a shape="rect" name="BookInOnePage-HL7ModelusingHAPI"></a>HL7 Model using HAPI</h3>
-<p>The HL7 model uses Java objects from the HAPI library. Using this library, we can encode and decode from the EDI format (ER7) that is mostly used with HL7.<br clear="none">
+<h3><a shape="rect" name="BookInOnePage-HL7v2ModelusingHAPI"></a>HL7v2 Model using HAPI</h3>
+<p>The HL7v2 model uses Java objects from the HAPI library. Using this library, we can encode and decode from the EDI format (ER7) that is mostly used with HL7v2.<br clear="none">
 With this model you can code with Java objects instead of the EDI based HL7 format that can be hard for humans to read and understand.</p>
 
-<p>The ER7 sample below is a request to lookup a patient with the patient ID, <tt>0101701234</tt>.</p>
+<p>The sample below is a request to lookup a patient with the patient ID <tt>0101701234</tt>.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 MSH|^~\\&amp;|MYSENDER|MYRECEIVER|MYAPPLICATION||200612211200||QRY^A19|1234|P|2.4
@@ -27309,8 +27317,8 @@ QRD|200612211200|R|I|GetPatient|||1^RD|0
 </pre>
 </div></div>
 
-<p>Using the HL7 model we can work with the data as a <tt>ca.uhn.hl7v2.model.Message.Message</tt> object.<br clear="none">
-To retrieve the patient ID for the patient in the ER7 above, you can do this in Java code:</p>
+<p>Using the HL7 model we can work with the data as a <tt>ca.uhn.hl7v2.model.Message</tt> object.<br clear="none">
+To retrieve the patient ID in the message above, you can do this in Java code:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 Message msg = exchange.getIn().getBody(Message.class);
@@ -27319,20 +27327,28 @@ QRD qrd = (QRD)msg.get(<span class="code
 </pre>
 </div></div>
 
+<p>If you know the message type in advance, you can be more type-safe:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+QRY_A19 msg = exchange.getIn().getBody(QRY_A19.class);
+<span class="code-object">String</span> patientId = msg.getQRD().getWhoSubjectFilter(0).getIDNumber().getValue();
+</pre>
+</div></div>
+
 <p>Camel has built-in type converters, so when this operation is invoked:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 Message msg = exchange.getIn().getBody(Message.class);
 </pre>
 </div></div>
-<p>Camel will convert the received HL7 data from <tt>String</tt> to <tt>Message</tt>. This is powerful when combined with the HL7 listener, then you as the end-user don't have to work with <tt>byte[]</tt>, <tt>String</tt> or any other simple object formats. You can just use the HAPI HL7 model objects.</p>
+<p>Camel will convert the received HL7 data from <tt>String</tt> to <tt>Message</tt>. This is powerful when combined with the HL7 listener, then you as the end-user don't have to work with <tt>byte[]</tt>, <tt>String</tt> or any other simple object formats. You can just use the HAPI HL7v2 model objects.</p>
 
 <h3><a shape="rect" name="BookInOnePage-HL7DataFormat"></a>HL7 DataFormat</h3>
 <p>The <a shape="rect" href="hl7.html" title="HL7">HL7</a> component ships with a HL7 data format that can be used to format between <tt>String</tt> and HL7 model objects. </p>
 <ul class="alternate" type="square"><li><tt>marshal</tt> = from Message to byte stream (can be used when returning as response using the HL7 MLLP codec)</li><li><tt>unmarshal</tt> = from byte stream to Message (can be used when receiving streamed data from the HL7 MLLP</li></ul>
 
 
-<p>To use the data format, simply instantiate an instance and invoke the marhsal or unmarshl operation in the route builder:</p>
+<p>To use the data format, simply instantiate an instance and invoke the marshal or unmarshal operation in the route builder:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
   DataFormat hl7 = <span class="code-keyword">new</span> HL7DataFormat();
@@ -27360,6 +27376,8 @@ Then you don't need to create an instanc
 </pre>
 </div></div>
 
+
+
 <h3><a shape="rect" name="BookInOnePage-MessageHeaders"></a>Message Headers</h3>
 <p>The <b>unmarshal</b> operation adds these MSH fields as headers on the Camel message:</p>
 
@@ -27373,7 +27391,7 @@ Then you don't need to create an instanc
 <h3><a shape="rect" name="BookInOnePage-Options"></a>Options</h3>
 <p>The HL7 Data Format supports the following options:</p>
 <div class="confluenceTableSmall"><div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Option </th><th colspan="1" rowspan="1" class="confluenceTh"> Default </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> validate </td><td colspan="1" rowspan="1" class="confluenceTd"> true </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether the HAPI Parser should validate. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>parser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ca.uhn.hl7v2.parser.PipeParser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> To use a custom parser. Should be of type <tt>ca.uhn.hl7v2.parser.Parser</tt>. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Option </th><th colspan="1" rowspan="1" class="confluenceTh"> Default </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> validate </td><td colspan="1" rowspan="1" class="confluenceTd"> true </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether the HAPI Parser should validate. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>parser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ca.uhn.hl7v2.parser.PipeParser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> To use a custom parser. Must be of type <tt>ca.uhn.hl7v2.parser.Parser</tt>. </td></tr></tbody></table>
 </div>
 
 </div>
@@ -27382,40 +27400,42 @@ Then you don't need to create an instanc
 
 <p>To use HL7 in your Camel routes you'll need to add a dependency on <b>camel-hl7</b> listed above, which implements this data format. </p>
 
-<p>The HAPI library since Version 0.6 has been split into a <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-base/1.0/" rel="nofollow">base library</a> and several structure libraries, one for each HL7v2 message version:</p>
+<p>The HAPI library since Version 0.6 has been split into a <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-base/1.2/" rel="nofollow">base library</a> and several structure libraries, one for each HL7v2 message version:</p>
 
-<ul><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v21/1.0/" rel="nofollow">v2.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v22/1.0/" rel="nofollow">v2.2 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v23/1.0/" rel="nofollow">v2.3 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v231/1.0/" rel="nofollow">v2.3.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v24/1.0/" rel="nofollow">v2.4 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v24/1.0/" rel="nofollow">v2.5 structures li
 brary</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v251/1.0/" rel="nofollow">v2.5.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v26/1.0/" rel="nofollow">v2.6 structures library</a></li></ul>
+<ul><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v21/1.2/" rel="nofollow">v2.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v22/1.2/" rel="nofollow">v2.2 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v23/1.2/" rel="nofollow">v2.3 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v231/1.2/" rel="nofollow">v2.3.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v24/1.2/" rel="nofollow">v2.4 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v25/1.2/" rel="nofollow">v2.5 structures library</a></li><li>
 <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v251/1.2/" rel="nofollow">v2.5.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v26/1.2/" rel="nofollow">v2.6 structures library</a></li></ul>
 
 
-<p>By default <tt>camel-hl7</tt> only references the HAPI <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-base/1.0/" rel="nofollow">base library</a>. Applications are responsible for including structure libraries themselves. For example, if a application works with HL7v2 message versions 2.4 and 2.5 then the following dependencies must be added:</p>
+<p>By default <tt>camel-hl7</tt> only references the HAPI <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-base/1.2/" rel="nofollow">base library</a>. Applications are responsible for including structure libraries themselves. For example, if a application works with HL7v2 message versions 2.4 and 2.5 then the following dependencies must be added:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-xml">
 <span class="code-tag">&lt;dependency&gt;</span>
     <span class="code-tag">&lt;groupId&gt;</span>ca.uhn.hapi<span class="code-tag">&lt;/groupId&gt;</span>
     <span class="code-tag">&lt;artifactId&gt;</span>hapi-structures-v24<span class="code-tag">&lt;/artifactId&gt;</span>
-    <span class="code-tag">&lt;version&gt;</span>1.0<span class="code-tag">&lt;/version&gt;</span>
+    <span class="code-tag">&lt;version&gt;</span>1.2<span class="code-tag">&lt;/version&gt;</span>
 <span class="code-tag">&lt;/dependency&gt;</span>
 <span class="code-tag">&lt;dependency&gt;</span>
     <span class="code-tag">&lt;groupId&gt;</span>ca.uhn.hapi<span class="code-tag">&lt;/groupId&gt;</span>
     <span class="code-tag">&lt;artifactId&gt;</span>hapi-structures-v25<span class="code-tag">&lt;/artifactId&gt;</span>
-    <span class="code-tag">&lt;version&gt;</span>1.0<span class="code-tag">&lt;/version&gt;</span>
+    <span class="code-tag">&lt;version&gt;</span>1.2<span class="code-tag">&lt;/version&gt;</span>
 <span class="code-tag">&lt;/dependency&gt;</span>
 </pre>
 </div></div>
 
-<p>Alternatively, an OSGi bundle containing the base library, all structures libraries and required dependencies (on the bundle classpath) can be downloaded from the <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-osgi-base/" rel="nofollow">HAPI Maven repository</a>. </p>
+<p>Alternatively, an OSGi bundle containing the base library, all structures libraries and required dependencies (on the bundle classpath) can be downloaded from the <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-osgi-base/1.2/" rel="nofollow">central Maven repository</a>. </p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-xml">
 <span class="code-tag">&lt;dependency&gt;</span>
     <span class="code-tag">&lt;groupId&gt;</span>ca.uhn.hapi<span class="code-tag">&lt;/groupId&gt;</span>
     <span class="code-tag">&lt;artifactId&gt;</span>hapi-osgi-base<span class="code-tag">&lt;/artifactId&gt;</span>
-    <span class="code-tag">&lt;version&gt;</span>1.0.1<span class="code-tag">&lt;/version&gt;</span>
+    <span class="code-tag">&lt;version&gt;</span>1.2<span class="code-tag">&lt;/version&gt;</span>
 <span class="code-tag">&lt;/dependency&gt;</span>
 </pre>
 </div></div>
 
+<p>Note that the version number must match the version of the hapi-base library that is transitively referenced by this component.</p>
+
 <h3><a shape="rect" name="BookInOnePage-Samples"></a>Samples</h3>
 <p>In the following example we send a HL7 request to a HL7 listener and retrieves a response. We use plain <tt>String</tt> types in this example:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
@@ -27486,7 +27506,7 @@ in.append(line2);
 </pre>
 </div></div>
 
-<p>Notice that we use the HL7 DataFormat to enrich our Camel Message with the MSH fields preconfigued on the Camel Message. This lets us much more easily define our routes using the fluent builders.<br clear="none">
+<p>Notice that we use the HL7 DataFormat to enrich our Camel Message with the MSH fields preconfigured on the Camel Message. This lets us much more easily define our routes using the fluent builders.<br clear="none">
 If we do not use the HL7 DataFormat, then we do not gains these headers and we must resort to a different technique for computing the MSH trigger event (= what kind of HL7 message it is). This is a big advantage of the HL7 DataFormat over the plain HL7 type converters.</p>
 
 <h4><a shape="rect" name="BookInOnePage-SampleusingplainStringobjects"></a>Sample using plain String objects</h4>

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

Modified: websites/production/camel/content/hl7-dataformat.html
==============================================================================
--- websites/production/camel/content/hl7-dataformat.html (original)
+++ websites/production/camel/content/hl7-dataformat.html Thu Aug 23 14:20:02 2012
@@ -80,7 +80,7 @@
 <ul class="alternate" type="square"><li><tt>marshal</tt> = from Message to byte stream (can be used when returning as response using the HL7 MLLP codec)</li><li><tt>unmarshal</tt> = from byte stream to Message (can be used when receiving streamed data from the HL7 MLLP</li></ul>
 
 
-<p>To use the data format, simply instantiate an instance and invoke the marhsal or unmarshl operation in the route builder:</p>
+<p>To use the data format, simply instantiate an instance and invoke the marshal or unmarshal operation in the route builder:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
   DataFormat hl7 = <span class="code-keyword">new</span> HL7DataFormat();
@@ -106,7 +106,9 @@ Then you don't need to create an instanc
   from(<span class="code-quote">"direct:hl7in"</span>).marshal().hl7().to(<span class="code-quote">"jms:queue:hl7out"</span>);
   from(<span class="code-quote">"jms:queue:hl7out"</span>).unmarshal().hl7().to(<span class="code-quote">"patientLookupService"</span>);
 </pre>
-</div></div></div>
+</div></div>
+
+</div>
         </td>
         <td valign="top">
           <div class="navigation">

Modified: websites/production/camel/content/hl7.html
==============================================================================
--- websites/production/camel/content/hl7.html (original)
+++ websites/production/camel/content/hl7.html Thu Aug 23 14:20:02 2012
@@ -77,7 +77,7 @@
         <td valign="top" width="100%">
 <div class="wiki-content maincontent"><h2><a shape="rect" name="HL7-HL7Component"></a>HL7 Component</h2>
 
-<p>The <b>hl7</b> component is used for working with the HL7 MLLP protocol and the <a shape="rect" class="external-link" href="http://www.hl7.org/" rel="nofollow">HL7 model</a> using the <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net" rel="nofollow">HAPI library</a>.</p>
+<p>The <b>hl7</b> component is used for working with the HL7 MLLP protocol and <a shape="rect" class="external-link" href="http://www.hl7.org/" rel="nofollow">HL7 v2 messages</a> using the <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net" rel="nofollow">HAPI library</a>.</p>
 
 <p>This component supports the following:</p>
 <ul class="alternate" type="square"><li>HL7 MLLP codec for <a shape="rect" class="external-link" href="http://mina.apache.org/">Mina</a></li><li>Agnostic data format using either plain String objects or HAPI HL7 model objects.</li><li><a shape="rect" href="type-converter.html" title="Type Converter">Type Converter</a> from/to HAPI and String</li><li>HL7 DataFormat using HAPI library</li><li>Even more ease-of-use as it's integrated well with the <a shape="rect" href="mina.html" title="MINA">camel-mina</a> component.</li></ul>
@@ -102,7 +102,7 @@
 
 <p>The HL7 MLLP codec has the following options:</p>
 <div class="confluenceTableSmall"><div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>startByte</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x0b</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The start byte spanning the HL7 payload. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endByte1</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x1c</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The first end byte spanning the HL7 payload.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endByte2</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x0d</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The 2nd end byte spanning the HL7 payload. </td></tr
 ><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>charset</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> JVM Default </td><td colspan="1" rowspan="1" class="confluenceTd"> The encoding (is a <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/charset/Charset.html" rel="nofollow">charset name</a>) to use for the codec. If not provided, Camel will use the <a shape="rect" class="external-link" href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html#defaultCharset()" rel="nofollow">JVM default Charset</a>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>convertLFtoCR</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Will convert <tt>\n</tt> to <tt>\r</tt> (<tt>0x0d</tt>, 13 decimal) as HL7 usually uses <tt>\r</tt> as segment terminators. The HAPI library requires the use of <tt>\r</tt>. </td></tr><t
 r><td colspan="1" rowspan="1" class="confluenceTd"> <tt>validate</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether HAPI Parser should validate or not. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>parser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ca.uhn.hl7v2.parser.PipeParser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> To use a custom parser. Should be of type <tt>ca.uhn.hl7v2.parser.Parser</tt>. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>startByte</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x0b</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The start byte spanning the HL7 payload. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endByte1</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x1c</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The first end byte spanning the HL7 payload.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endByte2</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0x0d</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The 2nd end byte spanning the HL7 payload. </td></tr
 ><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>charset</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> JVM Default </td><td colspan="1" rowspan="1" class="confluenceTd"> The encoding (is a <a shape="rect" class="external-link" href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html" rel="nofollow">charset name</a>) to use for the codec. If not provided, Camel will use the <a shape="rect" class="external-link" href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html#defaultCharset()" rel="nofollow">JVM default Charset</a>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>convertLFtoCR</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Will convert <tt>\n</tt> to <tt>\r</tt> (<tt>0x0d</tt>, 13 decimal) as HL7 usually uses <tt>\r</tt> as segment terminators. The HAPI library requires the use of <tt>\r</tt>. </td></tr><
 tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>validate</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether HAPI Parser should validate or not. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>parser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ca.uhn.hl7v2.parser.PipeParser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> To use a custom parser. Must be of type <tt>ca.uhn.hl7v2.parser.Parser</tt>. </td></tr></tbody></table>
 </div>
 </div>
 
@@ -126,18 +126,23 @@
 <p>The endpoint <b>hl7listener</b> can then be used in a route as a consumer, as this Java DSL example illustrates:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
-    from(<span class="code-quote">"hl7socket"</span>).to(<span class="code-quote">"patientLookupService"</span>);
+    from(<span class="code-quote">"hl7listener"</span>).to(<span class="code-quote">"patientLookupService"</span>);
 </pre>
 </div></div>
 <p>This is a very simple route that will listen for HL7 and route it to a service named <b>patientLookupService</b> that is also a Spring bean ID we have configured in the Spring XML as:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-xml">
-    <span class="code-tag">&lt;bean id=<span class="code-quote">"patientLookupService"</span> class=<span class="code-quote">"com.mycompany.healtcare.service.PatientLookupService"</span>/&gt;</span>
+    <span class="code-tag">&lt;bean id=<span class="code-quote">"patientLookupService"</span> class=<span class="code-quote">"com.mycompany.healthcare.service.PatientLookupService"</span>/&gt;</span>
 </pre>
 </div></div>
 <p>Another powerful feature of Camel is that we can have our business logic in POJO classes that is not tied to Camel as shown here:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
+
+<span class="code-keyword">import</span> ca.uhn.hl7v2.HL7Exception;
+<span class="code-keyword">import</span> ca.uhn.hl7v2.model.Message;
+<span class="code-keyword">import</span> ca.uhn.hl7v2.model.v24.segment.QRD;
+
 <span class="code-keyword">public</span> class PatientLookupService {
     <span class="code-keyword">public</span> Message lookupPatient(Message input) <span class="code-keyword">throws</span> HL7Exception {
         QRD qrd = (QRD)input.get(<span class="code-quote">"QRD"</span>);
@@ -149,18 +154,18 @@
     }
 </pre>
 </div></div>
-<p>Notice that this class uses just imports from the HAPI library and <b>none</b> from Camel.</p>
+<p>Notice that this class uses just imports from the HAPI library and <b>not</b> from Camel.</p>
 
 <h3><a shape="rect" name="HL7-HL7Modelusingjava.lang.String"></a>HL7 Model using java.lang.String</h3>
 <p>The HL7MLLP codec uses plain <tt>String</tt> as its data format. Camel uses its <a shape="rect" href="type-converter.html" title="Type Converter">Type Converter</a> to convert to/from strings to the HAPI HL7 model objects. However, you can use plain <tt>String</tt> objects if you prefer, for instance if you wish to parse the data yourself.</p>
 
 <p>See samples for such an example.</p>
 
-<h3><a shape="rect" name="HL7-HL7ModelusingHAPI"></a>HL7 Model using HAPI</h3>
-<p>The HL7 model uses Java objects from the HAPI library. Using this library, we can encode and decode from the EDI format (ER7) that is mostly used with HL7.<br clear="none">
+<h3><a shape="rect" name="HL7-HL7v2ModelusingHAPI"></a>HL7v2 Model using HAPI</h3>
+<p>The HL7v2 model uses Java objects from the HAPI library. Using this library, we can encode and decode from the EDI format (ER7) that is mostly used with HL7v2.<br clear="none">
 With this model you can code with Java objects instead of the EDI based HL7 format that can be hard for humans to read and understand.</p>
 
-<p>The ER7 sample below is a request to lookup a patient with the patient ID, <tt>0101701234</tt>.</p>
+<p>The sample below is a request to lookup a patient with the patient ID <tt>0101701234</tt>.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 MSH|^~\\&amp;|MYSENDER|MYRECEIVER|MYAPPLICATION||200612211200||QRY^A19|1234|P|2.4
@@ -168,8 +173,8 @@ QRD|200612211200|R|I|GetPatient|||1^RD|0
 </pre>
 </div></div>
 
-<p>Using the HL7 model we can work with the data as a <tt>ca.uhn.hl7v2.model.Message.Message</tt> object.<br clear="none">
-To retrieve the patient ID for the patient in the ER7 above, you can do this in Java code:</p>
+<p>Using the HL7 model we can work with the data as a <tt>ca.uhn.hl7v2.model.Message</tt> object.<br clear="none">
+To retrieve the patient ID in the message above, you can do this in Java code:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 Message msg = exchange.getIn().getBody(Message.class);
@@ -178,20 +183,28 @@ QRD qrd = (QRD)msg.get(<span class="code
 </pre>
 </div></div>
 
+<p>If you know the message type in advance, you can be more type-safe:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+QRY_A19 msg = exchange.getIn().getBody(QRY_A19.class);
+<span class="code-object">String</span> patientId = msg.getQRD().getWhoSubjectFilter(0).getIDNumber().getValue();
+</pre>
+</div></div>
+
 <p>Camel has built-in type converters, so when this operation is invoked:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 Message msg = exchange.getIn().getBody(Message.class);
 </pre>
 </div></div>
-<p>Camel will convert the received HL7 data from <tt>String</tt> to <tt>Message</tt>. This is powerful when combined with the HL7 listener, then you as the end-user don't have to work with <tt>byte[]</tt>, <tt>String</tt> or any other simple object formats. You can just use the HAPI HL7 model objects.</p>
+<p>Camel will convert the received HL7 data from <tt>String</tt> to <tt>Message</tt>. This is powerful when combined with the HL7 listener, then you as the end-user don't have to work with <tt>byte[]</tt>, <tt>String</tt> or any other simple object formats. You can just use the HAPI HL7v2 model objects.</p>
 
 <h3><a shape="rect" name="HL7-HL7DataFormat"></a>HL7 DataFormat</h3>
 <p>The <a shape="rect" href="hl7.html" title="HL7">HL7</a> component ships with a HL7 data format that can be used to format between <tt>String</tt> and HL7 model objects. </p>
 <ul class="alternate" type="square"><li><tt>marshal</tt> = from Message to byte stream (can be used when returning as response using the HL7 MLLP codec)</li><li><tt>unmarshal</tt> = from byte stream to Message (can be used when receiving streamed data from the HL7 MLLP</li></ul>
 
 
-<p>To use the data format, simply instantiate an instance and invoke the marhsal or unmarshl operation in the route builder:</p>
+<p>To use the data format, simply instantiate an instance and invoke the marshal or unmarshal operation in the route builder:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
   DataFormat hl7 = <span class="code-keyword">new</span> HL7DataFormat();
@@ -219,6 +232,8 @@ Then you don't need to create an instanc
 </pre>
 </div></div>
 
+
+
 <h3><a shape="rect" name="HL7-MessageHeaders"></a>Message Headers</h3>
 <p>The <b>unmarshal</b> operation adds these MSH fields as headers on the Camel message:</p>
 
@@ -232,7 +247,7 @@ Then you don't need to create an instanc
 <h3><a shape="rect" name="HL7-Options"></a>Options</h3>
 <p>The HL7 Data Format supports the following options:</p>
 <div class="confluenceTableSmall"><div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Option </th><th colspan="1" rowspan="1" class="confluenceTh"> Default </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> validate </td><td colspan="1" rowspan="1" class="confluenceTd"> true </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether the HAPI Parser should validate. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>parser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ca.uhn.hl7v2.parser.PipeParser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> To use a custom parser. Should be of type <tt>ca.uhn.hl7v2.parser.Parser</tt>. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Option </th><th colspan="1" rowspan="1" class="confluenceTh"> Default </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> validate </td><td colspan="1" rowspan="1" class="confluenceTd"> true </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether the HAPI Parser should validate. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>parser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ca.uhn.hl7v2.parser.PipeParser</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> To use a custom parser. Must be of type <tt>ca.uhn.hl7v2.parser.Parser</tt>. </td></tr></tbody></table>
 </div>
 
 </div>
@@ -241,40 +256,42 @@ Then you don't need to create an instanc
 
 <p>To use HL7 in your Camel routes you'll need to add a dependency on <b>camel-hl7</b> listed above, which implements this data format. </p>
 
-<p>The HAPI library since Version 0.6 has been split into a <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-base/1.0/" rel="nofollow">base library</a> and several structure libraries, one for each HL7v2 message version:</p>
+<p>The HAPI library since Version 0.6 has been split into a <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-base/1.2/" rel="nofollow">base library</a> and several structure libraries, one for each HL7v2 message version:</p>
 
-<ul><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v21/1.0/" rel="nofollow">v2.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v22/1.0/" rel="nofollow">v2.2 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v23/1.0/" rel="nofollow">v2.3 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v231/1.0/" rel="nofollow">v2.3.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v24/1.0/" rel="nofollow">v2.4 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v24/1.0/" rel="nofollow">v2.5 structures li
 brary</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v251/1.0/" rel="nofollow">v2.5.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-structures-v26/1.0/" rel="nofollow">v2.6 structures library</a></li></ul>
+<ul><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v21/1.2/" rel="nofollow">v2.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v22/1.2/" rel="nofollow">v2.2 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v23/1.2/" rel="nofollow">v2.3 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v231/1.2/" rel="nofollow">v2.3.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v24/1.2/" rel="nofollow">v2.4 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v25/1.2/" rel="nofollow">v2.5 structures library</a></li><li>
 <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v251/1.2/" rel="nofollow">v2.5.1 structures library</a></li><li><a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-structures-v26/1.2/" rel="nofollow">v2.6 structures library</a></li></ul>
 
 
-<p>By default <tt>camel-hl7</tt> only references the HAPI <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-base/1.0/" rel="nofollow">base library</a>. Applications are responsible for including structure libraries themselves. For example, if a application works with HL7v2 message versions 2.4 and 2.5 then the following dependencies must be added:</p>
+<p>By default <tt>camel-hl7</tt> only references the HAPI <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-base/1.2/" rel="nofollow">base library</a>. Applications are responsible for including structure libraries themselves. For example, if a application works with HL7v2 message versions 2.4 and 2.5 then the following dependencies must be added:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-xml">
 <span class="code-tag">&lt;dependency&gt;</span>
     <span class="code-tag">&lt;groupId&gt;</span>ca.uhn.hapi<span class="code-tag">&lt;/groupId&gt;</span>
     <span class="code-tag">&lt;artifactId&gt;</span>hapi-structures-v24<span class="code-tag">&lt;/artifactId&gt;</span>
-    <span class="code-tag">&lt;version&gt;</span>1.0<span class="code-tag">&lt;/version&gt;</span>
+    <span class="code-tag">&lt;version&gt;</span>1.2<span class="code-tag">&lt;/version&gt;</span>
 <span class="code-tag">&lt;/dependency&gt;</span>
 <span class="code-tag">&lt;dependency&gt;</span>
     <span class="code-tag">&lt;groupId&gt;</span>ca.uhn.hapi<span class="code-tag">&lt;/groupId&gt;</span>
     <span class="code-tag">&lt;artifactId&gt;</span>hapi-structures-v25<span class="code-tag">&lt;/artifactId&gt;</span>
-    <span class="code-tag">&lt;version&gt;</span>1.0<span class="code-tag">&lt;/version&gt;</span>
+    <span class="code-tag">&lt;version&gt;</span>1.2<span class="code-tag">&lt;/version&gt;</span>
 <span class="code-tag">&lt;/dependency&gt;</span>
 </pre>
 </div></div>
 
-<p>Alternatively, an OSGi bundle containing the base library, all structures libraries and required dependencies (on the bundle classpath) can be downloaded from the <a shape="rect" class="external-link" href="http://hl7api.sourceforge.net/m2/ca/uhn/hapi/hapi-osgi-base/" rel="nofollow">HAPI Maven repository</a>. </p>
+<p>Alternatively, an OSGi bundle containing the base library, all structures libraries and required dependencies (on the bundle classpath) can be downloaded from the <a shape="rect" class="external-link" href="http://repo1.maven.org/maven2/ca/uhn/hapi/hapi-osgi-base/1.2/" rel="nofollow">central Maven repository</a>. </p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-xml">
 <span class="code-tag">&lt;dependency&gt;</span>
     <span class="code-tag">&lt;groupId&gt;</span>ca.uhn.hapi<span class="code-tag">&lt;/groupId&gt;</span>
     <span class="code-tag">&lt;artifactId&gt;</span>hapi-osgi-base<span class="code-tag">&lt;/artifactId&gt;</span>
-    <span class="code-tag">&lt;version&gt;</span>1.0.1<span class="code-tag">&lt;/version&gt;</span>
+    <span class="code-tag">&lt;version&gt;</span>1.2<span class="code-tag">&lt;/version&gt;</span>
 <span class="code-tag">&lt;/dependency&gt;</span>
 </pre>
 </div></div>
 
+<p>Note that the version number must match the version of the hapi-base library that is transitively referenced by this component.</p>
+
 <h3><a shape="rect" name="HL7-Samples"></a>Samples</h3>
 <p>In the following example we send a HL7 request to a HL7 listener and retrieves a response. We use plain <tt>String</tt> types in this example:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
@@ -345,7 +362,7 @@ in.append(line2);
 </pre>
 </div></div>
 
-<p>Notice that we use the HL7 DataFormat to enrich our Camel Message with the MSH fields preconfigued on the Camel Message. This lets us much more easily define our routes using the fluent builders.<br clear="none">
+<p>Notice that we use the HL7 DataFormat to enrich our Camel Message with the MSH fields preconfigured on the Camel Message. This lets us much more easily define our routes using the fluent builders.<br clear="none">
 If we do not use the HL7 DataFormat, then we do not gains these headers and we must resort to a different technique for computing the MSH trigger event (= what kind of HL7 message it is). This is a big advantage of the HL7 DataFormat over the plain HL7 type converters.</p>
 
 <h4><a shape="rect" name="HL7-SampleusingplainStringobjects"></a>Sample using plain String objects</h4>