camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r856911 - in /websites/production/camel/content: book-dataformat-appendix.html jaxb.html
Date Mon, 01 Apr 2013 20:24:27 GMT
Author: buildbot
Date: Mon Apr  1 20:24:26 2013
New Revision: 856911

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/book-dataformat-appendix.html
    websites/production/camel/content/jaxb.html

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 Mon Apr  1 20:24:26 2013
@@ -406,6 +406,30 @@ You can setup which encoding to use when
 </div></div>
 
 
+<h3><a shape="rect" name="BookDataFormatAppendix-Schemavalidation"></a>Schema
validation</h3>
+<p><b>Available as of Camel 2.11</b></p>
+
+<p>The JAXB <a shape="rect" href="data-format.html" title="Data Format">Data
Format</a> supports validation by marshalling and unmarshalling from/to XML. Your can
use the prefix <b>classpath:</b>, <b><a shape="rect" class="external-link"
href="file:*" rel="nofollow">file:*</a> or *http:</b> to specify how the resource
should by resolved. You can separate multiple schema files by using the <b>','</b>
character.</p>
+
+<p>Using the Java DSL, you can configure it in the following way:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+JaxbDataFormat jaxbDataFormat = <span class="code-keyword">new</span> JaxbDataFormat();
+jaxbDataFormat.setContextPath(Person.class.getPackage().getName());
+jaxbDataFormat.setSchema(<span class="code-quote">"classpath:person.xsd,classpath:address.xsd"</span>);
+</pre>
+</div></div>
+
+<p>You can do the same using the XML DSL:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+<span class="code-tag">&lt;marshal&gt;</span>
+    <span class="code-tag">&lt;jaxb id=<span class="code-quote">"jaxb"</span>
schema=<span class="code-quote">"classpath:person.xsd,classpath:address.xsd"</span>/&gt;</span>
+<span class="code-tag">&lt;/marshal&gt;</span>
+</pre>
+</div></div>
+
+
 <h3><a shape="rect" name="BookDataFormatAppendix-Dependencies"></a>Dependencies</h3>
 
 <p>To use JAXB in your camel routes you need to add the a dependency on <b>camel-jaxb</b>
which implements this data format. </p>

Modified: websites/production/camel/content/jaxb.html
==============================================================================
--- websites/production/camel/content/jaxb.html (original)
+++ websites/production/camel/content/jaxb.html Mon Apr  1 20:24:26 2013
@@ -245,6 +245,30 @@ You can setup which encoding to use when
 </div></div>
 
 
+<h3><a shape="rect" name="JAXB-Schemavalidation"></a>Schema validation</h3>
+<p><b>Available as of Camel 2.11</b></p>
+
+<p>The JAXB <a shape="rect" href="data-format.html" title="Data Format">Data
Format</a> supports validation by marshalling and unmarshalling from/to XML. Your can
use the prefix <b>classpath:</b>, <b><a shape="rect" class="external-link"
href="file:*" rel="nofollow">file:*</a> or *http:</b> to specify how the resource
should by resolved. You can separate multiple schema files by using the <b>','</b>
character.</p>
+
+<p>Using the Java DSL, you can configure it in the following way:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+JaxbDataFormat jaxbDataFormat = <span class="code-keyword">new</span> JaxbDataFormat();
+jaxbDataFormat.setContextPath(Person.class.getPackage().getName());
+jaxbDataFormat.setSchema(<span class="code-quote">"classpath:person.xsd,classpath:address.xsd"</span>);
+</pre>
+</div></div>
+
+<p>You can do the same using the XML DSL:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+<span class="code-tag">&lt;marshal&gt;</span>
+    <span class="code-tag">&lt;jaxb id=<span class="code-quote">"jaxb"</span>
schema=<span class="code-quote">"classpath:person.xsd,classpath:address.xsd"</span>/&gt;</span>
+<span class="code-tag">&lt;/marshal&gt;</span>
+</pre>
+</div></div>
+
+
 <h3><a shape="rect" name="JAXB-Dependencies"></a>Dependencies</h3>
 
 <p>To use JAXB in your camel routes you need to add the a dependency on <b>camel-jaxb</b>
which implements this data format. </p>



Mime
View raw message