Modified: websites/production/camel/content/spring-xquery-example.html ============================================================================== --- websites/production/camel/content/spring-xquery-example.html (original) +++ websites/production/camel/content/spring-xquery-example.html Tue Mar 26 22:22:28 2019 @@ -99,7 +99,7 @@ <p>For example from the source or binary distribution the following should work</p> -<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"> <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"> cd examples/camel-example-spring-xquery mvn camel:run
Modified: websites/production/camel/content/stax.html ============================================================================== --- websites/production/camel/content/stax.html (original) +++ websites/production/camel/content/stax.html Tue Mar 26 22:22:28 2019 @@ -96,7 +96,7 @@ Another feature of this component is to allow to iterate over JAXB records using StAX, for example using the <a shape="rect" href="splitter.html">Splitter</a> EIP.</p> <p>Maven users will need to add the following dependency to their <code>pom.xml</code> for this component:</p> -<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"> <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"> <dependency> <groupId>org.apache.camel</groupId> @@ -109,21 +109,21 @@ Another feature of this component is to <h3 id="StAX-URIformat">URI format</h3> -<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"> <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"> stax:content-handler-class </pre> </div></div> <p>example:</p> -<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"> <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"> stax:org.superbiz.FooContentHandler </pre> </div></div> <p>From <strong>Camel 2.11.1</strong> onwards you can lookup a <code>org.xml.sax.ContentHandler</code> bean from the <a shape="rect" href="registry.html">Registry</a> using the # syntax as shown:</p> -<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"> <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"> stax:#myHandler </pre> @@ -136,7 +136,7 @@ stax:#myHandler <p>Here an example:</p> -<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"> <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"> from("file:target/in") .to("stax:org.superbiz.handler.CountingHandler") @@ -157,7 +157,7 @@ from("file:target/in") <p>For instance a list of records in a wrapper object:</p> -<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"> <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"> import java.util.ArrayList; import java.util.List; @@ -184,7 +184,7 @@ public class Records { <p>and</p> -<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"> <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"> import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -221,7 +221,7 @@ public class Record { <p>Then you get a XML file to process:</p> -<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"> <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"> <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <records> @@ -237,7 +237,7 @@ public class Record { <p>The StAX component provides an <code>StAXBuilder</code> which can be used when iterating XML elements with the Camel <a shape="rect" href="splitter.html">Splitter</a></p> -<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"> <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"> from("file:target/in") .split(stax(Record.class)).streaming() @@ -246,7 +246,7 @@ from("file:target/in") </div></div> <p>Where <code>stax</code> is a static method on <code>org.apache.camel.component.stax.StAXBuilder</code> which you can static import in the Java code. The stax builder is by default namespace aware on the XMLReader it uses. From <strong>Camel 2.11.1</strong> onwards you can turn this off by setting the boolean parameter to false, as shown below:</p> -<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"> <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"> from("file:target/in") .split(stax(Record.class, false)).streaming() Modified: websites/production/camel/content/transactionerrorhandler.html ============================================================================== --- websites/production/camel/content/transactionerrorhandler.html (original) +++ websites/production/camel/content/transactionerrorhandler.html Tue Mar 26 22:22:28 2019 @@ -100,7 +100,7 @@ <h3 id="TransactionErrorHandler-Example">Example</h3> <p>In this route below, any exception thrown in eg the <code>validateOrder</code> bean will be propagated back to the caller, and its the jetty endpoint. It will return a HTTP error message back to the client.</p> -<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"> <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"> from("jetty:http://localhost/myservice/order").transacted().to("bean:validateOrder").to("jms:queue:order"); </pre> @@ -108,7 +108,7 @@ from("jetty:http://localhost/myservice/o <p>We can add a <strong>onException</strong> in case we want to catch certain exceptions and route them differently, for instance to catch a <strong>ValidationException</strong> and return a fixed response to the caller.</p> -<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"> <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"> onException(ValidationException.class).handled(true).transform(body(constant("INVALID ORDER"))); @@ -119,13 +119,13 @@ from("jetty:http://localhost/myservice/o <h3 id="TransactionErrorHandler-Conventionoverconfiguration">Convention over configuration</h3> <p>When you configure a route to be transacted you just mark it as transacted as follows:</p> -<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"> <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"> from("jms:queue:foo").transacted().to("bean:handleFoo"); </pre> </div></div> <p>And in Spring DSL:</p> -<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl"> <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"> <route> <from uri="jms:queue:foo"/> Modified: websites/production/camel/content/tutorial-example-reportincident-part6.html ============================================================================== --- websites/production/camel/content/tutorial-example-reportincident-part6.html (original) +++ websites/production/camel/content/tutorial-example-reportincident-part6.html Tue Mar 26 22:22:28 2019 @@ -98,69 +98,7 @@ <p>As I am writing this, its been 4.5 years since I wrote the first 5 parts of this tutorial. Recently an user on stackoverflow praised this tutorial said it helped him get onboard Camel. Though he was looking for part 6 with the routes in XML. Frankly I have forgot all about adding this part. So lets close the book and get this part into the Camel docs.</p></div></div> <p>The XML code below is included in the example in <code>camel-example-report-incident</code> in the directory <code>src/main/resources/META-INF/spring/</code>. The file is named <code>camel-context.xml</code></p> -Error rendering macro 'code': Invalid value specified for parameter 'java.lang.NullPointerException'<pre class="conf-macro output-inline" data-hasbody="true" data-macro-name="unmigrated-inline-wiki-markup"> - -<!-- here we have Spring XML file with all the namespaces here in the top of the XML file --> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:camel="http://camel.apache.org/schema/spring" - xmlns:cxf="http://camel.apache.org/schema/cxf" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd - http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd"> - - <!-- this is Spring XML example of the Camel route in the ReportIncidentRoutes class --> - <!-- this is for demonstration purpose, to show how you can use Camel with XML DSL --> - - <!-- here we define the CXF endpoint, where {{port}} refers to a placeholder so we can define the port number - in an external .properties file --> - <cxf:cxfEndpoint id="reportIncident" - address="http://localhost:{{port}}/camel-example-reportincident/webservices/incident" - wsdlURL="etc/report_incident.wsdl" - serviceClass="org.apache.camel.example.reportincident.ReportIncidentEndpoint"/> - - <!-- We use a bean to make the response bean that CXF expects --> - <bean id="responseBean" class="org.apache.camel.example.reportincident.MyBean"/> - - <!-- this is the bean we use to generate the dynamic file name --> - <bean id="filenameGenerator" class="org.apache.camel.example.reportincident.FilenameGenerator"/> - - <!-- this CamelContext contains the equivalent route from the Java DSL, but in XML - so end users can see how to implement the route in both Java and XML --> - <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> - - <!-- property which contains port number --> - <!-- we have file:target/custom.properties which can be optional and override existing values, we use this for testing purpose --> - <camel:propertyPlaceholder id="properties" location="classpath:incident.properties,file:target/custom.properties"/> - - <!-- this is the first route that uses CXF as web service --> - <route> - <from uri="cxf:bean:reportIncident"/> - <convertBodyTo type="org.apache.camel.example.reportincident.InputReportIncident"/> - <setHeader headerName="CamelFileName"> - <method ref="filenameGenerator" method="generateFilename"/> - </setHeader> - <to uri="velocity:etc/MailBody.vm"/> - <to uri="file://target/subfolder"/> - <transform> - <method ref="responseBean" method="getOK"/> - </transform> - </route> - - <!-- this is the 2nd route that pickup files and send them as emails --> - <route> - <from uri="file://target/subfolder"/> - <setHeader headerName="subject"> - <constant>new incident reported</constant> - </setHeader> - <to uri="smtp://someone@localhost?password=secret&amp;to=incid...@mycompany.com"/> - </route> - - </camelContext> - -</beans> -</pre> +<div class="error conf-macro output-inline" data-hasbody="true" data-macro-name="unmigrated-inline-wiki-markup"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div> <h3 id="Tutorial-Example-ReportIncident-Part6-After5yearsweareattheend">After 5 years we are at the end</h3>