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 2017/08/25 08:22:03 UTC

svn commit: r1017260 [13/40] - in /websites/production/camel/content: ./ cache/

Modified: websites/production/camel/content/camel-test.html
==============================================================================
--- websites/production/camel/content/camel-test.html (original)
+++ websites/production/camel/content/camel-test.html Fri Aug 25 08:22:01 2017
@@ -36,17 +36,6 @@
     <![endif]-->
 
 
-  <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css' rel='stylesheet' type='text/css' />
-  <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' rel='stylesheet' type='text/css' />
-  <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
-  
-  <script type="text/javascript">
-  SyntaxHighlighter.defaults['toolbar'] = false;
-  SyntaxHighlighter.all();
-  </script>
 
     <title>
     Apache Camel: Camel Test
@@ -86,24 +75,19 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="CamelTest-CamelTest">Camel Test</h2><p>As a simple alternative to using <a shape="rect" href="cdi-testing.html">CDI Testing</a>,&#160;<a shape="rect" href="spring-testing.html">Spring Testing</a> or <a shape="rect" href="guice.html">Guice</a> the <strong>camel-test</strong> module was introduced so you can perform powerful <a shape="rect" href="testing.html">Testing</a> of your <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a> easily.</p><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The <strong><code>camel-test</code></strong> JAR is using JUnit. There is an alternative <strong><code>camel-testng</code></strong> JAR (from <strong>Camel 2.8</strong>) using the <a shape="rect" class="external-link" href="http://te
 stng.org/doc/index.html" rel="nofollow">TestNG</a> test framework.</p></div></div><h3 id="CamelTest-Addingtoyourpom.xml">Adding to your&#160;<code>pom.xml</code></h3><p>To get started using Camel Test you will need to add an entry to your <strong><code>pom.xml</code></strong>:</p><h4 id="CamelTest-JUnit">JUnit</h4><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
+<div class="wiki-content maincontent"><h2 id="CamelTest-CamelTest">Camel Test</h2><p>As a simple alternative to using <a shape="rect" href="cdi-testing.html">CDI Testing</a>,&#160;<a shape="rect" href="spring-testing.html">Spring Testing</a> or <a shape="rect" href="guice.html">Guice</a> the <strong>camel-test</strong> module was introduced so you can perform powerful <a shape="rect" href="testing.html">Testing</a> of your <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a> easily.</p><parameter ac:name="tile">JUnit or TestNG</parameter><rich-text-body><p>The <strong><code>camel-test</code></strong> JAR is using JUnit. There is an alternative <strong><code>camel-testng</code></strong> JAR (from <strong>Camel 2.8</strong>) using the <a shape="rect" class="external-link" href="http://testng.org/doc/index.html" rel="nofollow">TestNG</a> test framework.</p></rich-text-body><h3 id="CamelTest-Addingtoyourpom.xml">Adding to your&#160;<code>pom.xm
 l</code></h3><p>To get started using Camel Test you will need to add an entry to your <strong><code>pom.xml</code></strong>:</p><h4 id="CamelTest-JUnit">JUnit</h4><parameter ac:name="">xml</parameter><plain-text-body>&lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-test&lt;/artifactId&gt;
   &lt;version&gt;${camel-version}&lt;/version&gt;
   &lt;scope&gt;test&lt;/scope&gt;
 &lt;/dependency&gt;
-]]></script>
-</div></div><h4 id="CamelTest-TestNG">TestNG</h4><p><strong>Available as of Camel 2.8</strong></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
+</plain-text-body><h4 id="CamelTest-TestNG">TestNG</h4><p><strong>Available as of Camel 2.8</strong></p><parameter ac:name="">xml</parameter><plain-text-body>&lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-testng&lt;/artifactId&gt;
   &lt;version&gt;${camel-version}&lt;/version&gt;
   &lt;scope&gt;test&lt;/scope&gt;
 &lt;/dependency&gt;
-]]></script>
-</div></div><p>You might also want to add&#160;<strong><code>slf4j</code></strong> and&#160;<strong><code>log4j</code></strong> to ensure nice logging messages (and maybe adding a <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-test/src/test/resources/log4j.properties">log4j.properties</a> file into your&#160;<strong><code>src/test/resources</code></strong> directory).</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
+</plain-text-body><p>You might also want to add&#160;<strong><code>slf4j</code></strong> and&#160;<strong><code>log4j</code></strong> to ensure nice logging messages (and maybe adding a <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-test/src/test/resources/log4j.properties">log4j.properties</a> file into your&#160;<strong><code>src/test/resources</code></strong> directory).</p><parameter ac:name="">xml</parameter><plain-text-body>&lt;dependency&gt;
   &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
   &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
   &lt;scope&gt;test&lt;/scope&gt;
@@ -113,109 +97,15 @@
   &lt;artifactId&gt;log4j&lt;/artifactId&gt;
   &lt;scope&gt;test&lt;/scope&gt;
 &lt;/dependency&gt;
-]]></script>
-</div></div><h3 id="CamelTest-Writingyourtest">Writing your test</h3><p>You firstly need to derive from the class&#160;<strong><code>CamelTestSupport</code></strong>&#160;<strong>(<code>org.apache.camel.test.CamelTestSupport</code>, <code>org.apache.camel.test.junit4.CamelTestSupport</code></strong>, or&#160;<strong><code>org.apache.camel.testng.CamelTestSupport</code></strong> for JUnit 3.x, JUnit 4.x, and TestNG, respectively)&#160;and typically you will need to override the&#160;<strong><strong><code>createRouteBuilder()</code></strong> or <strong><code>createRouteBuilders()</code></strong></strong> method to create routes to be tested.</p><p>Here is an <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/FilterTest.java">example</a>.</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[
-// tag::example[]
-public class FilterTest extends CamelTestSupport {
-
-    @EndpointInject(uri = &quot;mock:result&quot;)
-    protected MockEndpoint resultEndpoint;
-
-    @Produce(uri = &quot;direct:start&quot;)
-    protected ProducerTemplate template;
-
-    @Override
-    public boolean isDumpRouteCoverage() {
-        return true;
-    }
-
-    @Test
-    public void testSendMatchingMessage() throws Exception {
-        String expectedBody = &quot;&lt;matched/&gt;&quot;;
-
-        resultEndpoint.expectedBodiesReceived(expectedBody);
-
-        template.sendBodyAndHeader(expectedBody, &quot;foo&quot;, &quot;bar&quot;);
-
-        resultEndpoint.assertIsSatisfied();
-    }
-
-    @Test
-    public void testSendNotMatchingMessage() throws Exception {
-        resultEndpoint.expectedMessageCount(0);
-
-        template.sendBodyAndHeader(&quot;&lt;notMatched/&gt;&quot;, &quot;foo&quot;, &quot;notMatchedHeaderValue&quot;);
-
-        resultEndpoint.assertIsSatisfied();
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() {
-        return new RouteBuilder() {
-            public void configure() {
-                from(&quot;direct:start&quot;).filter(header(&quot;foo&quot;).isEqualTo(&quot;bar&quot;)).to(&quot;mock:result&quot;);
-            }
-        };
-    }
-}
-// end::example[]
-]]></script>
-</div></div><strong>Note</strong>: how you can use the various <a shape="rect" href="bean-integration.html">Camel binding and injection annotations</a> to inject individual <a shape="rect" href="endpoint.html">Endpoint</a> objects - particularly the <a shape="rect" href="mock.html">Mock endpoints</a> which are very useful for <a shape="rect" href="testing.html">Testing</a>. Also you can inject <a shape="rect" href="pojo-producing.html">producer objects such as ProducerTemplate or some application code interface</a> for sending messages or invoking services.<h4 id="CamelTest-FeaturesProvidedbyCamelTestSupport">Features Provided by&#160;<code>CamelTestSupport</code></h4><p>The various&#160;<strong><code>CamelTestSupport</code></strong> classes provide a standard set of behaviors relating to the&#160;<strong><code>CamelContext</code></strong> used to host the route(s) under test. &#160;The classes provide a number of methods that allow a test to alter the configuration of the&#160;<str
 ong><code>CamelContext</code></strong> used. &#160;The following table describes the available customization methods and the default behavior of tests that are built from a&#160;<strong><code>CamelTestSupport</code></strong> class.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Method Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Behavior</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean isUseRouteBuilder()</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If the route builders returned from either <strong><code>createRouteBuilder()</code></strong> or <strong><code>createRouteBuilders()</code></strong> should be added to the&#160;<strong><code>CamelContext</code></strong> for the test to be started.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Retur
 ns <strong><code>true</code></strong>.&#160;</p><p><strong><strong><code>createRouteBuilder()</code></strong> or <strong><code>createRouteBuilders()</code></strong></strong> are invoked and the&#160;<strong><code>CamelContext</code></strong> is started automatically.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean isUseAdviceWith()</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If the&#160;<strong><code>CamelContext</code></strong> use in the test should be automatically started before test methods are invoked.</p><p><br clear="none" class="atl-forced-newline"> Override when using <a shape="rect" href="advicewith.html">advice with</a>&#160;and return <strong><code>true</code></strong>. &#160;This helps in knowing the&#160;<strong><code>adviceWith()</code></strong> is to be used, and the&#160;<strong><code>CamelContext</code></strong> will not be started before&#160;the advice with takes place. This delay helps by ensuring the ad
 vice with has been property setup before the&#160;<strong><code>CamelContext</code></strong> is started.</p><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Its important to start the&#160;<strong><code>CamelContext</code></strong> manually from the unit test after you are done doing all the advice with.</p></div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Returns <strong><code>false</code></strong>.&#160;</p><p>The&#160;<strong><code>CamelContext</code></strong> is started automatically before test methods are invoked.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean isCreateCamelContextPerClass()</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>See&#160;<a shape="rect" href="#CamelTest-SetupCamelContextonceperclass,orpereverytestmeth
 od">Setup CamelContext once per class, or per every test method</a>.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The&#160;<strong><code>CamelContext</code></strong> and routes are recreated for each test method.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String isMockEndpoints()</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Triggers the auto-mocking of endpoints whose URIs match the provided filter. &#160;The default&#160;filter is&#160;<strong><code>null</code></strong> which disables this feature. &#160;</p><p>Return&#160;<strong><code>"*"</code></strong>&#160; to match all endpoints. &#160;</p><p>See&#160;<strong><code>org.apache.camel.impl.InterceptSendToMockEndpointStrategy</code></strong> for&#160;more details on the registration of the mock endpoints.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Disabled</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean isUseDe
 bugger()</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If this method returns <strong><code>true</code></strong>, the methods:</p><ul><li><strong><code>debugBefore(Exchange exchange, Processor processor, ProcessorDefinition&lt;?&gt; definition,&#160;String id, String label)</code></strong></li><li><strong> <code>debugAfter(Exchange exchange, Processor processor, ProcessorDefinition&lt;?&gt; definition,&#160;String id, String label, long timeTaken)</code></strong></li></ul><p>are invoked for each processor in the registered routes.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Disabled</p><p>The methods are not invoked during the test.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>int getShutdownTimeout()</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Returns the number of seconds that Camel should wait for graceful shutdown. &#160;</p><p>Useful for decreasing test times when a message is still in fli
 ght at the end of the test.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>10 seconds</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean useJmx()</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If JMX should be disabled on the&#160;<strong><code>CamelContext</code></strong> used in the test.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>JMX is disabled</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JndiRegistry createRegistry()</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Provides a hook for adding objects into the registry. &#160;Override this method to bind objects to the registry before test methods are invoked.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>An empty registry is initialized</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>useOverridePropertiesWithPropertiesComponent</code></p></td><td colspan="1" ro
 wspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> Allows to add/override properties when <a shape="rect" href="using-propertyplaceholder.html">Using PropertyPlaceholder</a> in Camel.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong><code>null</code></strong></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ignoreMissingLocationWithPropertiesComponent</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> Allows to control if Camel should ignore missing locations for properties.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong><code>null</code></strong></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean isDumpRouteCoverage</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16:</strong> If enabled, then Camel will dump all route coverage statistics into XML files in the target/camel-route-coverage director
 y. These XML files contains information about "route coverage" of all the routes that was used during the unit test. This allows tooling to inspect these XML files and generate nice route coverage reports.</p></td><td colspan="1" rowspan="1" class="confluenceTd">Disabled</td></tr></tbody></table></div><h3 id="CamelTest-JNDI">JNDI</h3><p>Camel uses a <a shape="rect" href="registry.html">Registry</a> to allow you to configure <a shape="rect" href="component.html">Component</a> or <a shape="rect" href="endpoint.html">Endpoint</a> instances or <a shape="rect" href="bean-integration.html">Beans used in your routes</a>. If you are not using <a shape="rect" href="spring.html">Spring</a> or <a shape="rect" class="unresolved" href="#">OSGi</a> then <a shape="rect" href="jndi.html">JNDI</a> is used as the default registry implementation.</p><p>So you will also need to create a&#160;<strong><code>jndi.properties</code></strong> file in your&#160;<strong><code>src/test/resources</code></strong>
  directory so that there is a default registry available to initialize the <a shape="rect" href="camelcontext.html">CamelContext</a>.</p><p>Here is <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-test/src/test/resources/jndi.properties">an example jndi.properties file</a></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[java.naming.factory.initial = org.apache.camel.util.jndi.CamelInitialContextFactory
-]]></script>
-</div></div><h3 id="CamelTest-DynamicallyAssigningPorts">Dynamically Assigning Ports</h3><p><strong>Available as of Camel 2.7</strong></p><p>Tests that use port numbers will fail if that port is already on use. <strong><code>AvailablePortFinder</code></strong> provides methods for finding unused port numbers at run time.</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[// Get the next available port number starting from the default starting port of 1024
+</plain-text-body><h3 id="CamelTest-Writingyourtest">Writing your test</h3><p>You firstly need to derive from the class&#160;<strong><code>CamelTestSupport</code></strong>&#160;<strong>(<code>org.apache.camel.test.CamelTestSupport</code>, <code>org.apache.camel.test.junit4.CamelTestSupport</code></strong>, or&#160;<strong><code>org.apache.camel.testng.CamelTestSupport</code></strong> for JUnit 3.x, JUnit 4.x, and TestNG, respectively)&#160;and typically you will need to override the&#160;<strong><strong><code>createRouteBuilder()</code></strong> or <strong><code>createRouteBuilders()</code></strong></strong> method to create routes to be tested.</p><p>Here is an <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/FilterTest.java">example</a>.<plain-text-body>{snippet:lang=java|id=example|url=camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/FilterTest.j
 ava}</plain-text-body><strong>Note</strong>: how you can use the various <a shape="rect" href="bean-integration.html">Camel binding and injection annotations</a> to inject individual <a shape="rect" href="endpoint.html">Endpoint</a> objects - particularly the <a shape="rect" href="mock.html">Mock endpoints</a> which are very useful for <a shape="rect" href="testing.html">Testing</a>. Also you can inject <a shape="rect" href="pojo-producing.html">producer objects such as ProducerTemplate or some application code interface</a> for sending messages or invoking services.</p><h4 id="CamelTest-FeaturesProvidedbyCamelTestSupport">Features Provided by&#160;<code>CamelTestSupport</code></h4><p>The various&#160;<strong><code>CamelTestSupport</code></strong> classes provide a standard set of behaviors relating to the&#160;<strong><code>CamelContext</code></strong> used to host the route(s) under test. &#160;The classes provide a number of methods that allow a test to alter the configuration of
  the&#160;<strong><code>CamelContext</code></strong> used. &#160;The following table describes the available customization methods and the default behavior of tests that are built from a&#160;<strong><code>CamelTestSupport</code></strong> class.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Method Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Behavior</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean isUseRouteBuilder()</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If the route builders returned from either <strong><code>createRouteBuilder()</code></strong> or <strong><code>createRouteBuilders()</code></strong> should be added to the&#160;<strong><code>CamelContext</code></strong> for the test to be started.</p></td><td colspan="1" rowspan="1" class="confluen
 ceTd"><p>Returns <strong><code>true</code></strong>.&#160;</p><p><strong><strong><code>createRouteBuilder()</code></strong> or <strong><code>createRouteBuilders()</code></strong></strong> are invoked and the&#160;<strong><code>CamelContext</code></strong> is started automatically.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean isUseAdviceWith()</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If the&#160;<strong><code>CamelContext</code></strong> use in the test should be automatically started before test methods are invoked.</p><p><br clear="none" class="atl-forced-newline"> Override when using <a shape="rect" href="advicewith.html">advice with</a>&#160;and return <strong><code>true</code></strong>. &#160;This helps in knowing the&#160;<strong><code>adviceWith()</code></strong> is to be used, and the&#160;<strong><code>CamelContext</code></strong> will not be started before&#160;the advice with takes place. This delay helps by e
 nsuring the advice with has been property setup before the&#160;<strong><code>CamelContext</code></strong> is started.</p><rich-text-body><p>Its important to start the&#160;<strong><code>CamelContext</code></strong> manually from the unit test after you are done doing all the advice with.</p></rich-text-body></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Returns <strong><code>false</code></strong>.&#160;</p><p>The&#160;<strong><code>CamelContext</code></strong> is started automatically before test methods are invoked.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean isCreateCamelContextPerClass()</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>See&#160;<a shape="rect" href="#CamelTest-SetupCamelContextonceperclass,orpereverytestmethod">Setup CamelContext once per class, or per every test method</a>.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The&#160;<strong><code>CamelContext</code></strong> and routes 
 are recreated for each test method.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String isMockEndpoints()</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Triggers the auto-mocking of endpoints whose URIs match the provided filter. &#160;The default&#160;filter is&#160;<strong><code>null</code></strong> which disables this feature. &#160;</p><p>Return&#160;<strong><code>"*"</code></strong>&#160; to match all endpoints. &#160;</p><p>See&#160;<strong><code>org.apache.camel.impl.InterceptSendToMockEndpointStrategy</code></strong> for&#160;more details on the registration of the mock endpoints.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Disabled</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean isUseDebugger()</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If this method returns <strong><code>true</code></strong>, the methods:</p><ul><li><strong><code>debugBefore(Exchang
 e exchange, Processor processor, ProcessorDefinition&lt;?&gt; definition,&#160;String id, String label)</code></strong></li><li><strong> <code>debugAfter(Exchange exchange, Processor processor, ProcessorDefinition&lt;?&gt; definition,&#160;String id, String label, long timeTaken)</code></strong></li></ul><p>are invoked for each processor in the registered routes.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Disabled</p><p>The methods are not invoked during the test.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>int getShutdownTimeout()</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Returns the number of seconds that Camel should wait for graceful shutdown. &#160;</p><p>Useful for decreasing test times when a message is still in flight at the end of the test.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>10 seconds</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean useJmx()</
 code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If JMX should be disabled on the&#160;<strong><code>CamelContext</code></strong> used in the test.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>JMX is disabled</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JndiRegistry createRegistry()</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Provides a hook for adding objects into the registry. &#160;Override this method to bind objects to the registry before test methods are invoked.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>An empty registry is initialized</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>useOverridePropertiesWithPropertiesComponent</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> Allows to add/override properties when <a shape="rect" href="using-propertyplaceholder.html">Using PropertyPlaceholder</a> in Cam
 el.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong><code>null</code></strong></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ignoreMissingLocationWithPropertiesComponent</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> Allows to control if Camel should ignore missing locations for properties.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong><code>null</code></strong></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean isDumpRouteCoverage</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16:</strong> If enabled, then Camel will dump all route coverage statistics into XML files in the target/camel-route-coverage directory. These XML files contains information about "route coverage" of all the routes that was used during the unit test. This allows tooling to inspect these XML files and generate nice route cove
 rage reports.</p></td><td colspan="1" rowspan="1" class="confluenceTd">Disabled</td></tr></tbody></table></div><h3 id="CamelTest-JNDI">JNDI</h3><p>Camel uses a <a shape="rect" href="registry.html">Registry</a> to allow you to configure <a shape="rect" href="component.html">Component</a> or <a shape="rect" href="endpoint.html">Endpoint</a> instances or <a shape="rect" href="bean-integration.html">Beans used in your routes</a>. If you are not using <a shape="rect" href="spring.html">Spring</a> or <a shape="rect" class="unresolved" href="#">OSGi</a> then <a shape="rect" href="jndi.html">JNDI</a> is used as the default registry implementation.</p><p>So you will also need to create a&#160;<strong><code>jndi.properties</code></strong> file in your&#160;<strong><code>src/test/resources</code></strong> directory so that there is a default registry available to initialize the <a shape="rect" href="camelcontext.html">CamelContext</a>.</p><p>Here is <a shape="rect" class="external-link" href="
 http://svn.apache.org/repos/asf/camel/trunk/components/camel-test/src/test/resources/jndi.properties">an example jndi.properties file</a></p><plain-text-body>java.naming.factory.initial = org.apache.camel.util.jndi.CamelInitialContextFactory
+</plain-text-body><h3 id="CamelTest-DynamicallyAssigningPorts">Dynamically Assigning Ports</h3><p><strong>Available as of Camel 2.7</strong></p><p>Tests that use port numbers will fail if that port is already on use. <strong><code>AvailablePortFinder</code></strong> provides methods for finding unused port numbers at run time.</p><parameter ac:name="language">java</parameter><plain-text-body>// Get the next available port number starting from the default starting port of 1024
 int port1 = AvailablePortFinder.getNextAvailable();
 /*
  * Get another port. Note that just getting a port number does not reserve it so
  * we look starting one past the last port number we got.
  */
 int port2 = AvailablePortFinder.getNextAvailable(port1 + 1);
-]]></script>
-</div></div><h3 id="CamelTest-SetupCamelContextonceperclass,orpereverytestmethod">Setup CamelContext once per class, or per every test method</h3><p><strong>Available as of Camel 2.8</strong></p><p>The <a shape="rect" href="camel-test.html">Camel Test</a> kit will by default setup and shutdown <a shape="rect" href="camelcontext.html">CamelContext</a> per every test method in your test class. So for example if you have 3 test methods, then <a shape="rect" href="camelcontext.html">CamelContext</a> is started and shutdown after each test, that is 3 times.</p><div class="confluence-information-macro confluence-information-macro-tip"><p class="title">TestNG</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>This feature is also supported in&#160;<strong><code>camel-testng</code></strong></p></div></div><div class="confluence-information-macro confluence-information-macro-warning"><p clas
 s="title">Beware</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>When using this the <a shape="rect" href="camelcontext.html">CamelContext</a> will keep state between tests, so have that in mind. So if your unit tests start to fail for no apparent reason, it could be due this fact. So use this feature with a bit of care.</p></div></div><p>You may want to do this once, to share the <a shape="rect" href="camelcontext.html">CamelContext</a> between test methods, to speedup unit testing. This requires the use of JUnit 4! In your unit test method you have to extend the <strong><code>org.apache.camel.test.junit4.CamelTestSupport</code></strong> or the <strong><code>org.apache.camel.test.junit4.CamelSpringTestSupport</code></strong> test class and override the <strong><code>isCreateCamelContextPerClass</code></strong> method and return <code>true</code> as shown in the following example:<
 /p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Setup CamelContext once per class</b></div><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-public class FilterCreateCamelContextPerClassTest extends CamelTestSupport {
-
-    @Override
-    public boolean isCreateCamelContextPerClass() {
-        // we override this method and return true, to tell Camel test-kit that
-        // it should only create CamelContext once (per class), so we will
-        // re-use the CamelContext between each test method in this class
-        return true;
-    }
-
-    @Test
-    public void testSendMatchingMessage() throws Exception {
-        String expectedBody = &quot;&lt;matched/&gt;&quot;;
-
-        getMockEndpoint(&quot;mock:result&quot;).expectedBodiesReceived(expectedBody);
-
-        template.sendBodyAndHeader(&quot;direct:start&quot;, expectedBody, &quot;foo&quot;, &quot;bar&quot;);
-
-        assertMockEndpointsSatisfied();
-    }
-
-    @Test
-    public void testSendNotMatchingMessage() throws Exception {
-        getMockEndpoint(&quot;mock:result&quot;).expectedMessageCount(0);
-
-        template.sendBodyAndHeader(&quot;direct:start&quot;, &quot;&lt;notMatched/&gt;&quot;, &quot;foo&quot;, &quot;notMatchedHeaderValue&quot;);
-
-        assertMockEndpointsSatisfied();
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() {
-        return new RouteBuilder() {
-            public void configure() {
-                from(&quot;direct:start&quot;).filter(header(&quot;foo&quot;).isEqualTo(&quot;bar&quot;)).to(&quot;mock:result&quot;);
-            }
-        };
-    }
-}
-]]></script>
-</div></div><h3 id="CamelTest-SeeAlso">See Also</h3><ul><li><a shape="rect" href="testing.html">Testing</a></li><li><a shape="rect" href="mock.html">Mock</a></li><li><a shape="rect" href="test.html">Test</a></li></ul><p>&#160;</p></div>
+</plain-text-body><h3 id="CamelTest-SetupCamelContextonceperclass,orpereverytestmethod">Setup CamelContext once per class, or per every test method</h3><p><strong>Available as of Camel 2.8</strong></p><p>The <a shape="rect" href="camel-test.html">Camel Test</a> kit will by default setup and shutdown <a shape="rect" href="camelcontext.html">CamelContext</a> per every test method in your test class. So for example if you have 3 test methods, then <a shape="rect" href="camelcontext.html">CamelContext</a> is started and shutdown after each test, that is 3 times.</p><parameter ac:name="title">TestNG</parameter><rich-text-body><p>This feature is also supported in&#160;<strong><code>camel-testng</code></strong></p></rich-text-body><parameter ac:name="title">Beware</parameter><rich-text-body><p>When using this the <a shape="rect" href="camelcontext.html">CamelContext</a> will keep state between tests, so have that in mind. So if your unit tests start to fail for no apparent reason, it could
  be due this fact. So use this feature with a bit of care.</p></rich-text-body><p>You may want to do this once, to share the <a shape="rect" href="camelcontext.html">CamelContext</a> between test methods, to speedup unit testing. This requires the use of JUnit 4! In your unit test method you have to extend the <strong><code>org.apache.camel.test.junit4.CamelTestSupport</code></strong> or the <strong><code>org.apache.camel.test.junit4.CamelSpringTestSupport</code></strong> test class and override the <strong><code>isCreateCamelContextPerClass</code></strong> method and return <code>true</code> as shown in the following example:<plain-text-body>{snippet:id=example|lang=java|title=Setup CamelContext once per class|url=camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/FilterCreateCamelContextPerClassTest.java}</plain-text-body></p><h3 id="CamelTest-SeeAlso">See Also</h3><ul><li><a shape="rect" href="testing.html">Testing</a></li><li><a shape="rect" href="moc
 k.html">Mock</a></li><li><a shape="rect" href="test.html">Test</a></li></ul><p>&#160;</p></div>
         </td>
         <td valign="top">
           <div class="navigation">

Modified: websites/production/camel/content/camel-transport-for-cxf.html
==============================================================================
--- websites/production/camel/content/camel-transport-for-cxf.html (original)
+++ websites/production/camel/content/camel-transport-for-cxf.html Fri Aug 25 08:22:01 2017
@@ -36,17 +36,6 @@
     <![endif]-->
 
 
-  <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css' rel='stylesheet' type='text/css' />
-  <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' rel='stylesheet' type='text/css' />
-  <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
-  
-  <script type="text/javascript">
-  SyntaxHighlighter.defaults['toolbar'] = false;
-  SyntaxHighlighter.all();
-  </script>
 
     <title>
     Apache Camel: Camel Transport for CXF
@@ -86,27 +75,24 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="CamelTransportforCXF-What'stheCamelTransportforCXF">What's the Camel Transport for CXF</h2><p>In CXF you offer or consume a webservice by defining its address. The first part of the address specifies the protocol to use. For example address="http://localhost:9000" in an endpoint configuration means your service will be offered using the http protocol on port 9000 of localhost. When you integrate Camel Tranport into CXF you get a new transport "camel". So you can specify address="camel://direct:MyEndpointName" to bind the CXF service address to a camel direct endpoint.</p><p>Technically speaking Camel transport for CXF is a component which implements the <a shape="rect" class="external-link" href="http://cwiki.apache.org/CXF20DOC/cxf-architecture.html#CXFArchitecture-Transports">CXF transport API</a> with the Camel core library. This allows you to easily use Camel's routing engine and integration patterns support together with your CXF se
 rvices.</p><h2 id="CamelTransportforCXF-IntegrateCamelintoCXFtransportlayer">Integrate Camel into CXF transport layer</h2><p>To include the Camel Tranport into your CXF bus you use the CamelTransportFactory. You can do this in Java as well as in Spring.</p><h3 id="CamelTransportforCXF-SettinguptheCamelTransportinSpring">Setting up the Camel Transport in Spring</h3><p>You can use the following snippet in your applicationcontext if you want to configure anything special. If you only want to activate the camel transport you do not have to do anything in your application context. As soon as you include the camel-cxf-transport jar (or camel-cxf.jar if your camel version is less than 2.7.x) in your app, cxf will scan the jar and load a CamelTransportFactory for you.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;!-- you don&#39;t need to specify the CamelTransportFactory configuration as it is auto load by CXF bus --&gt;
-&lt;bean class=&quot;org.apache.camel.component.cxf.transport.CamelTransportFactory&quot;&gt;
-  &lt;property name=&quot;bus&quot; ref=&quot;cxf&quot; /&gt;
-  &lt;property name=&quot;camelContext&quot; ref=&quot;camelContext&quot; /&gt;
+<div class="wiki-content maincontent"><h2 id="CamelTransportforCXF-What'stheCamelTransportforCXF">What's the Camel Transport for CXF</h2><p>In CXF you offer or consume a webservice by defining its address. The first part of the address specifies the protocol to use. For example address="http://localhost:9000" in an endpoint configuration means your service will be offered using the http protocol on port 9000 of localhost. When you integrate Camel Tranport into CXF you get a new transport "camel". So you can specify address="camel://direct:MyEndpointName" to bind the CXF service address to a camel direct endpoint.</p><p>Technically speaking Camel transport for CXF is a component which implements the <a shape="rect" class="external-link" href="http://cwiki.apache.org/CXF20DOC/cxf-architecture.html#CXFArchitecture-Transports">CXF transport API</a> with the Camel core library. This allows you to easily use Camel's routing engine and integration patterns support together with your CXF se
 rvices.</p><h2 id="CamelTransportforCXF-IntegrateCamelintoCXFtransportlayer">Integrate Camel into CXF transport layer</h2><p>To include the Camel Tranport into your CXF bus you use the CamelTransportFactory. You can do this in Java as well as in Spring.</p><h3 id="CamelTransportforCXF-SettinguptheCamelTransportinSpring">Setting up the Camel Transport in Spring</h3><p>You can use the following snippet in your applicationcontext if you want to configure anything special. If you only want to activate the camel transport you do not have to do anything in your application context. As soon as you include the camel-cxf-transport jar (or camel-cxf.jar if your camel version is less than 2.7.x) in your app, cxf will scan the jar and load a CamelTransportFactory for you.</p><parameter ac:name="">xml</parameter><plain-text-body>&lt;!-- you don't need to specify the CamelTransportFactory configuration as it is auto load by CXF bus --&gt;
+&lt;bean class="org.apache.camel.component.cxf.transport.CamelTransportFactory"&gt;
+  &lt;property name="bus" ref="cxf" /&gt;
+  &lt;property name="camelContext" ref="camelContext" /&gt;
   &lt;!-- checkException new added in Camel 2.1 and Camel 1.6.2 --&gt;
-  &lt;!-- If checkException is true , CamelDestination will check the outMessage&#39;s
+  &lt;!-- If checkException is true , CamelDestination will check the outMessage's
      exception and set it into camel exchange. You can also override this value 
-     in CamelDestination&#39;s configuration. The default value is false.
-     This option should be set true when you want to leverage the camel&#39;s error 
+     in CamelDestination's configuration. The default value is false.
+     This option should be set true when you want to leverage the camel's error 
      handler to deal with fault message --&gt;
-  &lt;property name=&quot;checkException&quot; value=&quot;true&quot; /&gt;
-  &lt;property name=&quot;transportIds&quot;&gt;
+  &lt;property name="checkException" value="true" /&gt;
+  &lt;property name="transportIds"&gt;
     &lt;list&gt;
       &lt;value&gt;http://cxf.apache.org/transports/camel&lt;/value&gt;
     &lt;/list&gt;
   &lt;/property&gt;
 &lt;/bean&gt;
-]]></script>
-</div></div><h3 id="CamelTransportforCXF-IntegratingtheCamelTransportinaprogrammaticway">Integrating the Camel Transport in a programmatic way</h3><p>Camel transport provides a setContext method that you could use to set the Camel context into the transport factory. If you want this factory take effect, you need to register the factory into the CXF bus. Here is a full example for you.</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[import org.apache.cxf.Bus;
+</plain-text-body><h3 id="CamelTransportforCXF-IntegratingtheCamelTransportinaprogrammaticway">Integrating the Camel Transport in a programmatic way</h3><p>Camel transport provides a setContext method that you could use to set the Camel context into the transport factory. If you want this factory take effect, you need to register the factory into the CXF bus. Here is a full example for you.</p><parameter ac:name="">java</parameter><plain-text-body>import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.transport.ConduitInitiatorManager;
 import org.apache.cxf.transport.DestinationFactoryManager;
@@ -129,106 +115,58 @@ DestinationFactoryManager dfm = bus.getE
 dfm.registerDestinationFactory(CamelTransportFactory.TRANSPORT_ID, camelTransportFactory);
 // set or bus as the default bus for cxf
 BusFactory.setDefaultBus(bus);
-]]></script>
-</div></div><h2 id="CamelTransportforCXF-ConfigurethedestinationandconduitwithSpring">Configure the destination and conduit with Spring</h2><h3 id="CamelTransportforCXF-Namespace">Namespace</h3><p>The elements used to configure an Camel transport endpoint are defined in the namespace <code><a shape="rect" href="http://cxf.apache.org/transports/camel">http://cxf.apache.org/transports/camel</a></code>. It is commonly referred to using the prefix <code>camel</code>. In order to use the Camel transport configuration elements, you will need to add the lines shown below to the beans element of your endpoint's configuration file. In addition, you will need to add the configuration elements' namespace to the <code>xsi:schemaLocation</code> attribute.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Adding the Configuration Namespace</b></div><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;beans ...
-       xmlns:camel=&quot;http://cxf.apache.org/transports/camel
+</plain-text-body><h2 id="CamelTransportforCXF-ConfigurethedestinationandconduitwithSpring">Configure the destination and conduit with Spring</h2><h3 id="CamelTransportforCXF-Namespace">Namespace</h3><p>The elements used to configure an Camel transport endpoint are defined in the namespace <code><a shape="rect" href="http://cxf.apache.org/transports/camel">http://cxf.apache.org/transports/camel</a></code>. It is commonly referred to using the prefix <code>camel</code>. In order to use the Camel transport configuration elements, you will need to add the lines shown below to the beans element of your endpoint's configuration file. In addition, you will need to add the configuration elements' namespace to the <code>xsi:schemaLocation</code> attribute.</p><parameter ac:name="title">Adding the Configuration Namespace</parameter><plain-text-body>&lt;beans ...
+       xmlns:camel="http://cxf.apache.org/transports/camel
        ...
-       xsi:schemaLocation=&quot;...
+       xsi:schemaLocation="...
                            http://cxf.apache.org/transports/camel
                            http://cxf.apache.org/transports/camel.xsd
                           ...&gt;
-]]></script>
-</div></div><h3 id="CamelTransportforCXF-Thedestinationelement">The <code>destination</code> element</h3><p>You configure an Camel transport server endpoint using the <code>camel:destination</code> element and its children. The <code>camel:destination</code> element takes a single attribute, <code>name</code>, that specifies the WSDL port element that corresponds to the endpoint. The value for the <code>name</code> attribute takes the form <em>portQName</em><code>.camel-destination</code>. The example below shows the <code>camel:destination</code> element that would be used to add configuration for an endpoint that was specified by the WSDL fragment <code>&lt;port binding="widgetSOAPBinding" name="widgetSOAPPort"&gt;</code> if the endpoint's target namespace was <code><a shape="rect" class="external-link" href="http://widgets.widgetvendor.net" rel="nofollow">http://widgets.widgetvendor.net</a></code>.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader p
 anelHeader pdl" style="border-bottom-width: 1px;"><b>camel:destination Element</b></div><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[...
-  &lt;camel:destination name=&quot;{http://widgets/widgetvendor.net}widgetSOAPPort.http-destination&gt;
-    &lt;camelContext id=&quot;context&quot; xmlns=&quot;http://activemq.apache.org/camel/schema/spring&quot;&gt;
+</plain-text-body><h3 id="CamelTransportforCXF-Thedestinationelement">The <code>destination</code> element</h3><p>You configure an Camel transport server endpoint using the <code>camel:destination</code> element and its children. The <code>camel:destination</code> element takes a single attribute, <code>name</code>, that specifies the WSDL port element that corresponds to the endpoint. The value for the <code>name</code> attribute takes the form <em>portQName</em><code>.camel-destination</code>. The example below shows the <code>camel:destination</code> element that would be used to add configuration for an endpoint that was specified by the WSDL fragment <code>&lt;port binding="widgetSOAPBinding" name="widgetSOAPPort"&gt;</code> if the endpoint's target namespace was <code><a shape="rect" class="external-link" href="http://widgets.widgetvendor.net" rel="nofollow">http://widgets.widgetvendor.net</a></code>.</p><parameter ac:name="title">camel:destination Element</parameter><plain-te
 xt-body>...
+  &lt;camel:destination name="{http://widgets/widgetvendor.net}widgetSOAPPort.http-destination&gt;
+    &lt;camelContext id="context" xmlns="http://activemq.apache.org/camel/schema/spring"&gt;
          &lt;route&gt;
-           &lt;from uri=&quot;direct:EndpointC&quot; /&gt;
-           &lt;to uri=&quot;direct:EndpointD&quot; /&gt;
+           &lt;from uri="direct:EndpointC" /&gt;
+           &lt;to uri="direct:EndpointD" /&gt;
          &lt;/route&gt;
      &lt;/camelContext&gt;
   &lt;/camel:destination&gt;
 
   &lt;!-- new added feature since Camel 2.11.x
-  &lt;camel:destination name=&quot;{http://widgets/widgetvendor.net}widgetSOAPPort.camel-destination&quot; camelContextId=&quot;context&quot; /&gt;  
+  &lt;camel:destination name="{http://widgets/widgetvendor.net}widgetSOAPPort.camel-destination" camelContextId="context" /&gt;  
 
 ...
-]]></script>
-</div></div><p>The <code>camel:destination</code> element for Spring has a number of child elements that specify configuration information. They are described below.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Element</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>camel-spring:camelContext</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>You can specify the camel context in the camel destination</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>camel:camelContextRef</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The camel context id which you want inject into the camel destination</p></td></tr></tbody></table></div><h3 id="CamelTransportforCXF-Theconduitelement">The <code>conduit</code> element</h3><p>You configure a Camel transport client using t
 he <code>camel:conduit</code> element and its children. The <code>camel:conduit</code> element takes a single attribute, <code>name</code>, that specifies the WSDL port element that corresponds to the endpoint. The value for the <code>name</code> attribute takes the form <em>portQName</em><code>.camel-conduit</code>. For example, the code below shows the <code>camel:conduit</code> element that would be used to add configuration for an endpoint that was specified by the WSDL fragment <code>&lt;port binding="widgetSOAPBinding" name="widgetSOAPPort"&gt;</code> if the endpoint's target namespace was <code><a shape="rect" class="external-link" href="http://widgets.widgetvendor.net" rel="nofollow">http://widgets.widgetvendor.net</a></code>.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>http-conf:conduit Element</b></div><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[...
-  &lt;camelContext id=&quot;conduit_context&quot; xmlns=&quot;http://activemq.apache.org/camel/schema/spring&quot;&gt;
+</plain-text-body><p>The <code>camel:destination</code> element for Spring has a number of child elements that specify configuration information. They are described below.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Element</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>camel-spring:camelContext</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>You can specify the camel context in the camel destination</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>camel:camelContextRef</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The camel context id which you want inject into the camel destination</p></td></tr></tbody></table></div><h3 id="CamelTransportforCXF-Theconduitelement">The <code>conduit</code> element</h3><p>You configure a Camel transport client u
 sing the <code>camel:conduit</code> element and its children. The <code>camel:conduit</code> element takes a single attribute, <code>name</code>, that specifies the WSDL port element that corresponds to the endpoint. The value for the <code>name</code> attribute takes the form <em>portQName</em><code>.camel-conduit</code>. For example, the code below shows the <code>camel:conduit</code> element that would be used to add configuration for an endpoint that was specified by the WSDL fragment <code>&lt;port binding="widgetSOAPBinding" name="widgetSOAPPort"&gt;</code> if the endpoint's target namespace was <code><a shape="rect" class="external-link" href="http://widgets.widgetvendor.net" rel="nofollow">http://widgets.widgetvendor.net</a></code>.</p><parameter ac:name="">xml</parameter><parameter ac:name="title">http-conf:conduit Element</parameter><plain-text-body>...
+  &lt;camelContext id="conduit_context" xmlns="http://activemq.apache.org/camel/schema/spring"&gt;
        &lt;route&gt;
-           &lt;from uri=&quot;direct:EndpointA&quot; /&gt;
-           &lt;to uri=&quot;direct:EndpointB&quot; /&gt;
+           &lt;from uri="direct:EndpointA" /&gt;
+           &lt;to uri="direct:EndpointB" /&gt;
        &lt;/route&gt;
    &lt;/camelContext&gt;
 
-  &lt;camel:conduit name=&quot;{http://widgets/widgetvendor.net}widgetSOAPPort.camel-conduit&quot;&gt;
+  &lt;camel:conduit name="{http://widgets/widgetvendor.net}widgetSOAPPort.camel-conduit"&gt;
      &lt;camel:camelContextRef&gt;conduit_context&lt;/camel:camelContextRef&gt;
   &lt;/camel:conduit&gt;
 
   &lt;!-- new added feature since Camel 2.11.x
-  &lt;camel:conduit name=&quot;{http://widgets/widgetvendor.net}widgetSOAPPort.camel-conduit&quot; camelContextId=&quot;conduit_context&quot; /&gt;
+  &lt;camel:conduit name="{http://widgets/widgetvendor.net}widgetSOAPPort.camel-conduit" camelContextId="conduit_context" /&gt;
      
 
-  &lt;camel:conduit name=&quot;*.camel-conduit&quot;&gt;
+  &lt;camel:conduit name="*.camel-conduit"&gt;
   &lt;!-- you can also using the wild card to specify the camel-conduit that you want to configure --&gt;
     ...
   &lt;/camel:conduit&gt;
 ...
-]]></script>
-</div></div><p>The <code>camel:conduit</code> element has a number of child elements that specify configuration information. They are described below.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Element</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>camel-spring:camelContext</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>You can specify the camel context in the camel conduit</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>camel:camelContextRef</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The camel context id which you want inject into the camel conduit</p></td></tr></tbody></table></div><h2 id="CamelTransportforCXF-ConfigurethedestinationandconduitwithBlueprint">Configure the destination and conduit with Blueprint</h2><p>From <strong>Camel 2
 .11.x</strong>, Camel Transport supports to be configured with Blueprint.</p><p>If you are using blueprint, you should use the the namespace <code><a shape="rect" href="http://cxf.apache.org/transports/camel/blueprint">http://cxf.apache.org/transports/camel/blueprint</a></code> and import the schema like the blow.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Adding the Configuration Namespace for blueprint</b></div><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;beans ...
-       xmlns:camel=&quot;http://cxf.apache.org/transports/camel/blueprint&quot;
+</plain-text-body><p>The <code>camel:conduit</code> element has a number of child elements that specify configuration information. They are described below.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Element</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>camel-spring:camelContext</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>You can specify the camel context in the camel conduit</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>camel:camelContextRef</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The camel context id which you want inject into the camel conduit</p></td></tr></tbody></table></div><h2 id="CamelTransportforCXF-ConfigurethedestinationandconduitwithBlueprint">Configure the destination and conduit with Blueprint</h2><p>From <strong>C
 amel 2.11.x</strong>, Camel Transport supports to be configured with Blueprint.</p><p>If you are using blueprint, you should use the the namespace <code><a shape="rect" href="http://cxf.apache.org/transports/camel/blueprint">http://cxf.apache.org/transports/camel/blueprint</a></code> and import the schema like the blow.</p><parameter ac:name="title">Adding the Configuration Namespace for blueprint</parameter><plain-text-body>&lt;beans ...
+       xmlns:camel="http://cxf.apache.org/transports/camel/blueprint"
        ...
-       xsi:schemaLocation=&quot;...
+       xsi:schemaLocation="...
                            http://cxf.apache.org/transports/camel/blueprint 
                            http://cxf.apache.org/schmemas/blueprint/camel.xsd
                           ...&gt;
-]]></script>
-</div></div><p>In blueprint <code>camel:conduit</code> <code>camel:destination</code> only has one camelContextId attribute, they doesn't support to specify the camel context in the camel destination.</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[  &lt;camel:conduit id=&quot;*.camel-conduit&quot; camelContextId=&quot;camel1&quot; /&gt;
-  &lt;camel:destination id=&quot;*.camel-destination&quot; camelContextId=&quot;camel1&quot; /&gt;
-]]></script>
-</div></div><h2 id="CamelTransportforCXF-ExampleUsingCamelasaloadbalancerforCXF">Example Using Camel as a load balancer for CXF</h2><p>This example shows how to use the camel load balancing feature in CXF. You need to load the configuration file in CXF and publish the endpoints on the address "camel://direct:EndpointA" and "camel://direct:EndpointB"</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
-       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
-       xmlns:camel=&quot;http://cxf.apache.org/transports/camel&quot;
-       xsi:schemaLocation=&quot;
-       http://www.springframework.org/schema/beans
-       http://www.springframework.org/schema/beans/spring-beans.xsd
-       http://cxf.apache.org/transports/camel http://cxf.apache.org/transports/camel.xsd
-       http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/cxfEndpoint.xsd
-       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-    &quot;&gt;
-    
-   &lt;!-- Enable bridge between Camel Property Placeholder and Spring Property placeholder so we can use system properties
-       to dynamically set the port number for unit testing the example.  --&gt;
-   &lt;bean id=&quot;bridgePropertyPlaceholder&quot; class=&quot;org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer&quot;/&gt;
-
-   &lt;bean id=&quot;roundRobinRef&quot; class=&quot;org.apache.camel.processor.loadbalancer.RoundRobinLoadBalancer&quot; /&gt;
-
-   &lt;camelContext id=&quot;dest_context&quot; xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
-       &lt;route&gt;
-            &lt;from uri=&quot;jetty:http://localhost:{{port}}/GreeterContext/GreeterPort&quot;/&gt;
-            &lt;loadBalance&gt;
-              &lt;custom ref=&quot;roundRobinRef&quot;/&gt;
-              &lt;to uri=&quot;direct:EndpointA&quot;/&gt;
-              &lt;to uri=&quot;direct:EndpointB&quot;/&gt;
-            &lt;/loadBalance&gt;
-        &lt;/route&gt;
-   &lt;/camelContext&gt;
-
-   &lt;!-- Inject the camel context to the Camel transport&#39;s destination --&gt;
-   &lt;camel:destination name=&quot;{http://apache.org/hello_world_soap_http}CamelPort.camel-destination&quot;&gt;
-        &lt;camel:camelContextRef&gt;dest_context&lt;/camel:camelContextRef&gt;
-   &lt;/camel:destination&gt;
-
-&lt;/beans&gt;
-]]></script>
-</div></div><h2 id="CamelTransportforCXF-CompleteHowtoandExampleforattachingCameltoCXF">Complete Howto and Example for attaching Camel to CXF</h2><p><a shape="rect" href="better-jms-transport-for-cxf-webservice-using-apache-camel.html">Better JMS Transport for CXF Webservice using Apache Camel</a>&#160;</p></div>
+</plain-text-body><p>In blueprint <code>camel:conduit</code> <code>camel:destination</code> only has one camelContextId attribute, they doesn't support to specify the camel context in the camel destination.</p><plain-text-body>  &lt;camel:conduit id="*.camel-conduit" camelContextId="camel1" /&gt;
+  &lt;camel:destination id="*.camel-destination" camelContextId="camel1" /&gt;
+</plain-text-body><h2 id="CamelTransportforCXF-ExampleUsingCamelasaloadbalancerforCXF">Example Using Camel as a load balancer for CXF</h2><p>This example shows how to use the camel load balancing feature in CXF. You need to load the configuration file in CXF and publish the endpoints on the address "camel://direct:EndpointA" and "camel://direct:EndpointB"</p><plain-text-body>{snippet:id=example|lang=xml|url=camel/trunk/examples/camel-example-cxf/src/main/resources/org/apache/camel/example/camel/transport/CamelDestination.xml}</plain-text-body><h2 id="CamelTransportforCXF-CompleteHowtoandExampleforattachingCameltoCXF">Complete Howto and Example for attaching Camel to CXF</h2><p><a shape="rect" href="better-jms-transport-for-cxf-webservice-using-apache-camel.html">Better JMS Transport for CXF Webservice using Apache Camel</a>&#160;</p></div>
         </td>
         <td valign="top">
           <div class="navigation">

Modified: websites/production/camel/content/claim-check.html
==============================================================================
--- websites/production/camel/content/claim-check.html (original)
+++ websites/production/camel/content/claim-check.html Fri Aug 25 08:22:01 2017
@@ -36,17 +36,6 @@
     <![endif]-->
 
 
-  <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css' rel='stylesheet' type='text/css' />
-  <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' rel='stylesheet' type='text/css' />
-  <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
-  
-  <script type="text/javascript">
-  SyntaxHighlighter.defaults['toolbar'] = false;
-  SyntaxHighlighter.all();
-  </script>
 
     <title>
     Apache Camel: Claim Check
@@ -100,48 +89,29 @@
 
 <p><strong>Using the <a shape="rect" href="fluent-builders.html">Fluent Builders</a></strong></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[
-from(&quot;direct:start&quot;).to(&quot;bean:checkLuggage&quot;, &quot;mock:testCheckpoint&quot;, &quot;bean:dataEnricher&quot;, &quot;mock:result&quot;);
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=e1|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ClaimCheckTest.java}</plain-text-body>
 
 <p><strong>Using the <a shape="rect" href="spring-xml-extensions.html">Spring XML Extensions</a></strong></p>
 
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<parameter ac:name="">xml</parameter><plain-text-body>
 
 &lt;route&gt;
-    &lt;from uri=&quot;direct:start&quot;/&gt;
+    &lt;from uri="direct:start"/&gt;
     &lt;pipeline&gt;
-        &lt;to uri=&quot;bean:checkLuggage&quot;/&gt;
-        &lt;to uri=&quot;mock:testCheckpoint&quot;/&gt;
-        &lt;to uri=&quot;bean:dataEnricher&quot;/&gt;
-        &lt;to uri=&quot;mock:result&quot;/&gt;
+        &lt;to uri="bean:checkLuggage"/&gt;
+        &lt;to uri="mock:testCheckpoint"/&gt;
+        &lt;to uri="bean:dataEnricher"/&gt;
+        &lt;to uri="mock:result"/&gt;
     &lt;/pipeline&gt;
 &lt;/route&gt;
 
-]]></script>
-</div></div>
+</plain-text-body>
 
 <p>The example route is pretty simple - its just a <a shape="rect" href="pipes-and-filters.html">Pipeline</a>. In a real application you would have some other steps where the <code>mock:testCheckpoint</code> endpoint is in the example.</p>
 
 <p>The message is first sent to the <code>checkLuggage</code> bean which looks like</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 final class CheckLuggageBean {        
-    public void checkLuggage(Exchange exchange, @Body String body, @XPath(&quot;/order/@custId&quot;) String custId) {   
-        // store the message body into the data store, using the custId as the claim check
-        dataStore.put(custId, body);
-        // add the claim check as a header
-        exchange.getIn().setHeader(&quot;claimCheck&quot;, custId);
-        // remove the body from the message
-        exchange.getIn().setBody(null);
-    }
-}    
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=e2|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ClaimCheckTest.java}</plain-text-body>
 
 <p>This bean stores the message body into the data store, using the <code>custId</code> as the claim check. In this example, we're just using a <code>HashMap</code> to store the message body; in a real application you would use a database or file system, etc. Next the claim check is added as a message header for use later. Finally we remove the body from the message and pass it down the pipeline. </p>
 
@@ -149,21 +119,7 @@ public static final class CheckLuggageBe
 
 <p>To add the message body back into the message, we use the <code>dataEnricher</code> bean which looks like</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 final class DataEnricherBean {
-    public void addDataBackIn(Exchange exchange, @Header(&quot;claimCheck&quot;) String claimCheck) { 
-        // query the data store using the claim check as the key and add the data
-        // back into the message body
-        exchange.getIn().setBody(dataStore.get(claimCheck));
-        // remove the message data from the data store
-        dataStore.remove(claimCheck);
-        // remove the claim check header
-        exchange.getIn().removeHeader(&quot;claimCheck&quot;);
-    }
-}    
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=e3|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ClaimCheckTest.java}</plain-text-body>
 
 <p>This bean queries the data store using the claim check as the key and then adds the data back into the message. The message body is then removed from the data store and finally the claim check is removed. Now the message is back to what we started with!</p>
 
@@ -172,9 +128,7 @@ public static final class DataEnricherBe
 <p><a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ClaimCheckTest.java">camel-core/src/test/java/org/apache/camel/processor/ClaimCheckTest.java</a></p>
 
 
-<h4 id="ClaimCheck-UsingThisPattern">Using This Pattern</h4>
-
-<p>If you would like to use this EIP Pattern then please read the <a shape="rect" href="getting-started.html">Getting Started</a>, you may also find the <a shape="rect" href="architecture.html">Architecture</a> useful particularly the description of <a shape="rect" href="endpoint.html">Endpoint</a> and <a shape="rect" href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" href="examples.html">Examples</a> first before trying this pattern out.</p></div>
+<parameter ac:name=""><a shape="rect" href="using-this-pattern.html">Using This Pattern</a></parameter></div>
         </td>
         <td valign="top">
           <div class="navigation">

Modified: websites/production/camel/content/configuring-camel.html
==============================================================================
--- websites/production/camel/content/configuring-camel.html (original)
+++ websites/production/camel/content/configuring-camel.html Fri Aug 25 08:22:01 2017
@@ -36,17 +36,6 @@
     <![endif]-->
 
 
-  <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css' rel='stylesheet' type='text/css' />
-  <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' rel='stylesheet' type='text/css' />
-  <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
-  
-  <script type="text/javascript">
-  SyntaxHighlighter.defaults['toolbar'] = false;
-  SyntaxHighlighter.all();
-  </script>
 
     <title>
     Apache Camel: Configuring Camel
@@ -88,31 +77,11 @@
         <td valign="top" width="100%">
 <div class="wiki-content maincontent"><div class="error"><span class="error">Unable to render {include}</span> The included page could not be found.</div>
 <div class="error"><span class="error">Unable to render {include}</span> The included page could not be found.</div>
-<h2 id="ConfiguringCamel-HowdoIaddacomponent">How do I add a component</h2><p>You might first want to read <a shape="rect" href="writing-components.html">Writing Components</a> for a background in how to implement a new component.<br clear="none"> Typically it means you write an implementation of the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Component.html">Component</a> interface, usually deriving from <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/DefaultComponent.html">DefaultComponent</a>.</p><p>You can then register your component explicitly via</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[CamelContext context = new DefaultCamelContext();
-context.addComponent(&quot;foo&quot;, new FooComponent(context));
-]]></script>
-</div></div><p>However you can use the auto-discovery feature of Camel where by Camel will automatically add a <a shape="rect" href="component.html">Component</a> when an endpoint URI is used. To do this you would create a file called</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[/META-INF/services/org/apache/camel/component/foo
-]]></script>
-</div></div><p>with contents</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[class=org.acme.FooComponent
-]]></script>
-</div></div><p>(you can add other property configurations in there too if you like)</p><p>Then if you refer to an endpoint as <strong><code>foo://somethingOrOther</code></strong> Camel will auto-discover your component and register it.</p><p>The&#160;<strong><code>FooComponent</code></strong> can then be auto-injected with resources using the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/Injector.html">Injector</a>, such as to support <a shape="rect" href="spring.html">Spring</a> based auto-wiring, or to support&#160;<strong><code>@Resource</code></strong> (EJB3 style) injection or Guice style&#160;<strong><code>@Inject</code></strong> injection.</p><h3 id="ConfiguringCamel-WorkingwithSpringXML">Working with Spring XML</h3><p>You can configure a component via Spring using the following mechanism...</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;camelContext id=&quot;camel&quot; xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
-    &lt;jmxAgent id=&quot;agent&quot; disabled=&quot;true&quot;/&gt;
-&lt;/camelContext&gt;
-
-&lt;bean id=&quot;activemq&quot; class=&quot;org.apache.activemq.camel.component.ActiveMQComponent&quot;&gt;
-  &lt;property name=&quot;connectionFactory&quot;&gt;
-    &lt;bean class=&quot;org.apache.activemq.ActiveMQConnectionFactory&quot;&gt;
-      &lt;property name=&quot;brokerURL&quot; value=&quot;vm://localhost?broker.persistent=false&amp;amp;broker.useJmx=false&quot;/&gt;
-    &lt;/bean&gt;
-  &lt;/property&gt;
-&lt;/bean&gt;
-]]></script>
-</div></div>Which allows you to configure a component using some name (activemq in the above example), then you can refer to the component using <strong><code>activemq:[queue:|topic:]destinationName</code></strong>.<p>If you want to add explicit Spring 2.x XML objects to your XML then you could use the&#160;<strong><code>xbean-spring</code></strong> which tries to automate most of the XML binding work for you; or you could look in camel-spring at&#160;<strong><code>CamelNamespaceHandler</code></strong> you'll see how we handle the Spring XML stuff (warning its kinda hairy code to look at <img class="emoticon emoticon-smile" src="https://cwiki.apache.org/confluence/s/en_GB/5997/6f42626d00e36f53fe51440403446ca61552e2a2.1/_/images/icons/emoticons/smile.png" data-emoticon-name="smile" alt="(smile)">. If you wanted&#160;<strong><code>&lt;fooComponent&gt;</code></strong> to be a standard part of the core Camel schema then you'd hack that file to add your component &amp; <a shape="rect" hr
 ef="contributing.html">conftribute a patch</a> to the camel XSD. Otherwise you could write your own namespace &amp; schema if you prefer.</p><h3 id="ConfiguringCamel-SeeAlso">See Also</h3><ul><li><a shape="rect" href="writing-components.html">Writing Components</a></li><li><a shape="rect" href="how-do-i-configure-endpoints.html">How Do I Configure Endpoints?</a></li></ul></div>
+<h2 id="ConfiguringCamel-HowdoIaddacomponent">How do I add a component</h2><p>You might first want to read <a shape="rect" href="writing-components.html">Writing Components</a> for a background in how to implement a new component.<br clear="none"> Typically it means you write an implementation of the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Component.html">Component</a> interface, usually deriving from <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/DefaultComponent.html">DefaultComponent</a>.</p><p>You can then register your component explicitly via</p><plain-text-body>CamelContext context = new DefaultCamelContext();
+context.addComponent("foo", new FooComponent(context));
+</plain-text-body><p>However you can use the auto-discovery feature of Camel where by Camel will automatically add a <a shape="rect" href="component.html">Component</a> when an endpoint URI is used. To do this you would create a file called</p><plain-text-body>/META-INF/services/org/apache/camel/component/foo
+</plain-text-body><p>with contents</p><plain-text-body>class=org.acme.FooComponent
+</plain-text-body><p>(you can add other property configurations in there too if you like)</p><p>Then if you refer to an endpoint as <strong><code>foo://somethingOrOther</code></strong> Camel will auto-discover your component and register it.</p><p>The&#160;<strong><code>FooComponent</code></strong> can then be auto-injected with resources using the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/Injector.html">Injector</a>, such as to support <a shape="rect" href="spring.html">Spring</a> based auto-wiring, or to support&#160;<strong><code>@Resource</code></strong> (EJB3 style) injection or Guice style&#160;<strong><code>@Inject</code></strong> injection.</p><h3 id="ConfiguringCamel-WorkingwithSpringXML">Working with Spring XML</h3><p>You can configure a component via Spring using the following mechanism...<plain-text-body>{snippet:id=example|lang=xml|url=camel/trunk/components/camel-jms/src/test/resources/org/
 apache/camel/component/jms/jmsRouteUsingSpring.xml}</plain-text-body>Which allows you to configure a component using some name (activemq in the above example), then you can refer to the component using <strong><code>activemq:[queue:|topic:]destinationName</code></strong>.</p><p>If you want to add explicit Spring 2.x XML objects to your XML then you could use the&#160;<strong><code>xbean-spring</code></strong> which tries to automate most of the XML binding work for you; or you could look in camel-spring at&#160;<strong><code>CamelNamespaceHandler</code></strong> you'll see how we handle the Spring XML stuff (warning its kinda hairy code to look at <img class="emoticon emoticon-smile" src="https://cwiki.apache.org/confluence/s/en_GB/5997/6f42626d00e36f53fe51440403446ca61552e2a2.1/_/images/icons/emoticons/smile.png" data-emoticon-name="smile" alt="(smile)">. If you wanted&#160;<strong><code>&lt;fooComponent&gt;</code></strong> to be a standard part of the core Camel schema then you'd 
 hack that file to add your component &amp; <a shape="rect" href="contributing.html">conftribute a patch</a> to the camel XSD. Otherwise you could write your own namespace &amp; schema if you prefer.</p><h3 id="ConfiguringCamel-SeeAlso">See Also</h3><ul><li><a shape="rect" href="writing-components.html">Writing Components</a></li><li><a shape="rect" href="how-do-i-configure-endpoints.html">How Do I Configure Endpoints?</a></li></ul></div>
         </td>
         <td valign="top">
           <div class="navigation">

Modified: websites/production/camel/content/console-example.html
==============================================================================
--- websites/production/camel/content/console-example.html (original)
+++ websites/production/camel/content/console-example.html Fri Aug 25 08:22:01 2017
@@ -36,17 +36,6 @@
     <![endif]-->
 
 
-  <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css' rel='stylesheet' type='text/css' />
-  <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' rel='stylesheet' type='text/css' />
-  <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
-  
-  <script type="text/javascript">
-  SyntaxHighlighter.defaults['toolbar'] = false;
-  SyntaxHighlighter.all();
-  </script>
 
     <title>
     Apache Camel: Console Example
@@ -96,52 +85,31 @@
 <p>In this example we integrate with the console using the <a shape="rect" href="stream.html">Stream</a> component. The example is interactive - it reads input from the console, and then transforms the input to upper case and prints it back to the console. </p>
 
 <p>This is implemented with a Camel route defined in the Spring XML markup shown below: </p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;!-- camelContext is the Camel runtime, where we can host Camel routes --&gt;
-&lt;camelContext xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
-  &lt;route&gt;
-    &lt;!-- read input from the console using the stream component --&gt;
-    &lt;from uri=&quot;stream:in?promptMessage=Enter something: &quot;/&gt;
-    &lt;!-- transform the input to upper case using the simple language --&gt;
-    &lt;!-- you can also use other languages such as groovy, ognl, mvel, javascript etc. --&gt;
-    &lt;transform&gt;
-      &lt;simple&gt;${body.toUpperCase()}&lt;/simple&gt;
-    &lt;/transform&gt;
-    &lt;!-- and then print to the console --&gt;
-    &lt;to uri=&quot;stream:out&quot;/&gt;
-  &lt;/route&gt;
-&lt;/camelContext&gt;
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=e1|lang=xml|url=camel/trunk/examples/camel-example-console/src/main/resources/META-INF/spring/camel-context.xml}</plain-text-body>
 
 <p>This example can be launched from the command line using Maven:</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[
+<plain-text-body>
 mvn compile exec:java
-]]></script>
-</div></div>
+</plain-text-body>
 
 <p>In the console you can enter a message and press &lt;ENTER&gt;. Camel responds by echoing the input message in upper case, as shown below:</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[
+<plain-text-body>
 [onsole.CamelConsoleMain.main()] SpringCamelContext             INFO  Apache Camel 2.10 (CamelContext: camel-1) started in 0.455 seconds
 Enter something: camel rocks
 CAMEL ROCKS
 Enter something: and we have fun
 AND WE HAVE FUN
 Enter something: 
-]]></script>
-</div></div>
+</plain-text-body>
 
 <p>To stop the example, strike Control+C </p>
 
 <p>You can also run this example from your editor. For example, from Eclipse you can import this project using: File &#8594; Import &#8230; &#8594; Existing Maven Project, and select <code>pom.xml</code> from the <code>examples\camel-example-console</code> directory.</p>
 
 <p>Next, navigate to the <code>org.apache.camel.example.console.CamelConsoleMain</code> class, right-click, and select Run As &#8594; Java Application.</p>
-<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>Click on the screenshot below, to make it bigger.</p></div></div>
-<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-thumbnail" src="console-example.thumbs/run-as.png" data-image-src="/confluence/download/attachments/27843710/run-as.png?version=1&amp;modificationDate=1334026057000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="28017569" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="run-as.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="27843710" data-linked-resource-container-version="20"></span></p>
+<rich-text-body>
+<p>Click on the screenshot below, to make it bigger.</p></rich-text-body>
+<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-thumbnail" src="console-example.thumbs/run-as.png" data-image-src="/confluence/download/attachments/27843710/run-as.png?version=1&amp;modificationDate=1334026057000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="28017569" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="run-as.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="27843710" data-linked-resource-container-version="21"></span></p>
 
 
 <h3 id="ConsoleExample-Seealso">See also</h3>