Author: buildbot
Date: Sat Jul 18 08:19:40 2015
New Revision: 958787
Log:
Production update by buildbot for camel
Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/jsonpath.html
Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/camel/content/jsonpath.html
==============================================================================
--- websites/production/camel/content/jsonpath.html (original)
+++ websites/production/camel/content/jsonpath.html Sat Jul 18 08:19:40 2015
@@ -86,81 +86,81 @@
<tr>
<td valign="top" width="100%">
<div class="wiki-content maincontent"><h2
id="JSonPath-JSonPath">JSonPath</h2><p><strong>Available as of Camel
2.13</strong></p><p>Camel supports <a shape="rect" class="external-link"
href="https://code.google.com/p/json-path/" rel="nofollow">JSonPath</a> to
allow using <a shape="rect" href="expression.html">Expression</a> or <a
shape="rect" href="predicate.html">Predicate</a> on json messages.</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">from("queue:books.new")
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[from("queue:books.new")
.choice()
- .when().jsonpath("$.store.book[?(@.price < 10)]")
- .to("jms:queue:book.cheap")
- .when().jsonpath("$.store.book[?(@.price < 30)]")
- .to("jms:queue:book.average")
+ .when().jsonpath("$.store.book[?(@.price < 10)]")
+ .to("jms:queue:book.cheap")
+ .when().jsonpath("$.store.book[?(@.price < 30)]")
+ .to("jms:queue:book.average")
.otherwise()
- .to("jms:queue:book.expensive")
-</pre>
+ .to("jms:queue:book.expensive")
+]]></script>
</div></div><h3 id="JSonPath-UsingXMLconfiguration">Using XML
configuration</h3><p>If you prefer to configure your routes in your <a
shape="rect" href="spring.html">Spring</a> XML file then you can use <a
shape="rect" href="jsonpath.html">JSonPath</a> expressions as follows</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<pre class="brush: xml; gutter: false; theme: Default"
style="font-size:12px;"> <camelContext id="camel"
xmlns="http://camel.apache.org/schema/spring">
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[ <camelContext id="camel"
xmlns="http://camel.apache.org/schema/spring">
<route>
- <from uri="direct:start"/>
+ <from uri="direct:start"/>
<choice>
<when>
<jsonpath>$.store.book[?(@.price &lt; 10)]</jsonpath>
- <to uri="mock:cheap"/>
+ <to uri="mock:cheap"/>
</when>
<when>
<jsonpath>$.store.book[?(@.price &lt; 30)]</jsonpath>
- <to uri="mock:average"/>
+ <to uri="mock:average"/>
</when>
<otherwise>
- <to uri="mock:expensive"/>
+ <to uri="mock:expensive"/>
</otherwise>
</choice>
</route>
</camelContext>
-</pre>
+]]></script>
</div></div><h3 id="JSonPath-Syntax">Syntax</h3><p>See the <a shape="rect"
class="external-link" href="https://code.google.com/p/json-path/"
rel="nofollow">JSonPath</a> project page for further examples.</p><h2
id="JSonPath-Suppressexceptions">Suppress exceptions</h2><p><strong>Available
as of Camel 2.16</strong></p><p>By default jsonpath will throw an exception if
the json payload does not have a valid path accordingly to the configured
jsonpath expression. In some use-cases you may want to ignore this in case the
json payload contains optional data. Therefore you can set the option
suppressExceptions to true to ignore this as shown:</p><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">from("direct:start")
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[from("direct:start")
.choice()
// use true to suppress exceptions
- .when().jsonpath("person.middlename", true)
- .to("mock:middle")
+ .when().jsonpath("person.middlename", true)
+ .to("mock:middle")
.otherwise()
- .to("mock:other");</pre>
+ .to("mock:other");]]></script>
</div></div><p><span style="line-height: 1.4285715;">And in XML
DSL:</span></p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
-<pre class="brush: xml; gutter: false; theme: Default"
style="font-size:12px;"> <route>
- <from uri="direct:start"/>
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[ <route>
+ <from uri="direct:start"/>
<choice>
<when>
- <jsonpath
suppressExceptions="true">person.middlename</jsonpath>
- <to uri="mock:middle"/>
+ <jsonpath
suppressExceptions="true">person.middlename</jsonpath>
+ <to uri="mock:middle"/>
</when>
<otherwise>
- <to uri="mock:other"/>
+ <to uri="mock:other"/>
</otherwise>
</choice>
</route>
-</pre>
+]]></script>
</div></div><p> </p><p>This option is also available on
the <code>@JsonPath</code> annotation.</p><h2
id="JSonPath-JSonPathinjection">JSonPath injection</h2><p>You can use <a
shape="rect" href="bean-integration.html">Bean Integration</a> to invoke a
method on a bean and use various languages such as JSonPath to extract a value
from the message and bind it to a method parameter.</p><p>For example</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">public class Foo {
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[public class Foo {
- @Consume(uri = "activemq:queue:books.new")
- public void doSomething(@JsonPath("$.store.book[*].author") String author,
@Body String json) {
+ @Consume(uri = "activemq:queue:books.new")
+ public void doSomething(@JsonPath("$.store.book[*].author")
String author, @Body String json) {
// process the inbound message here
}
}
-</pre>
-</div></div><h3 id="JSonPath-Dependencies">Dependencies</h3><p>To use JSonPath
in your camel routes you need to add the a dependency on
<strong>camel-jsonpath</strong> which implements the JSonPath
language.</p><p>If you use maven you could just add the following to your
pom.xml, substituting the version number for the latest & greatest release
(see <a shape="rect" href="download.html">the download page for the latest
versions</a>).</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
-<pre class="brush: xml; gutter: false; theme: Default"
style="font-size:12px;"><dependency>
+]]></script>
+</div></div><h2 id="JSonPath-EncodingDetection">Encoding
Detection</h2><p><strong>Since Camel version 2.16</strong>, the encoding of the
JSON document is detected automatically, if the document is encoded in unicode
 (UTF-8, UTF-16LE, UTF-16BE, UTF-32LE, UTF-32BE ) as specified in
 RFC-4627. If the encoding is a non-unicode encoding, you can either make
sure that you enter the document in String format to the JSONPath component or
you can specify the encoding in the
header "<strong>CamelJsonPathJsonEncoding</strong>"
(JsonpathConstants.HEADER_JSON_ENCODING).</p><h3
id="JSonPath-Dependencies">Dependencies</h3><p>To use JSonPath in your camel
routes you need to add the a dependency on <strong>camel-jsonpath</strong>
which implements the JSonPath language.</p><p>If you use maven you could just
add the following to your pom.xml, substituting the version number for the
latest & greatest release (see <a shape="rect" href="download.html">the
download page for the latest
versions</a>).</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[<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jsonpath</artifactId>
<version>x.x.x</version>
</dependency>
-</pre>
+]]></script>
</div></div></div>
</td>
<td valign="top">
<div class="navigation">
<div class="navigation_top">
<!-- NavigationBar -->
-<div class="navigation_bottom" id="navigation_bottom"><h3
id="Navigation-Overviewhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49132"><a
shape="rect" href="overview.html">Overview</a></h3><ul
class="alternate"><li><a shape="rect" href="index.html">Home</a></li><li><a
shape="rect" href="download.html">Download</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li><li><a shape="rect"
href="faq.html">FAQ</a></li></ul><h3
id="Navigation-Documentationhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49534"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul
class="alternate"><li><a shape="rect" href="user-guide.html">User
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a
shape="rect" href="books.html">Books</a></li><li><a shape="rect"
href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect"
href="cookbook.html">Cookbook</a></li>
<li><a shape="rect" href="architecture.html">Architecture</a></li><li><a
shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration
Patterns</a></li><li><a shape="rect" href="dsl.html">DSL</a></li><li><a
shape="rect" href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect"
href="languages.html">Languages</a></li><li><a shape="rect"
href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
+<div class="navigation_bottom" id="navigation_bottom"><h3
id="Navigation-Overview"><a shape="rect"
href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect"
href="index.html">Home</a></li><li><a shape="rect"
href="download.html">Download</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li><li><a shape="rect"
href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentation"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul
class="alternate"><li><a shape="rect" href="user-guide.html">User
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a
shape="rect" href="books.html">Books</a></li><li><a shape="rect"
href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect"
href="cookbook.html">Cookbook</a></li><li><a shape="rect"
href="architecture.html">Architecture</a></li><li><a shape="rect"
href="enterprise-integration-patterns.html">Enterprise
Integration Patterns</a></li><li><a shape="rect"
href="dsl.html">DSL</a></li><li><a shape="rect"
href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect"
href="languages.html">Languages</a></li><li><a shape="rect"
href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
<div>
<input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
<input type="hidden" name="ie" value="UTF-8">
@@ -168,7 +168,7 @@
<input type="submit" name="sa" value="Search">
</div>
</form>
-<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3
id="Navigation-Communityhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49115"><a
shape="rect" href="community.html">Community</a></h3><ul
class="alternate"><li><a shape="rect"
href="support.html">Support</a></li><li><a shape="rect"
href="contributing.html">Contributing</a></li><li><a shape="rect"
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect"
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect"
href="user-stories.html">User Stories</a></li><li><a shape="rect"
href="news.html">News</a></li><li><a shape="rect"
href="articles.html">Articles</a></li><li><a shape="rect"
href="site.html">Site</a></li><li><a shape="rect"
href="team.html">Team</a></li><li><a shape="rect" class="external-link"
href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developershttps://cwi
ki.apache.org/confluence/pages/viewpage.action?pageId=49124"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"><li><a
shape="rect" href="developers.html">Developer Guide</a></li><li><a shape="rect"
href="source.html">Source</a></li><li><a shape="rect"
href="building.html">Building</a></li><li><a shape="rect"
href="javadoc.html">JavaDoc</a></li><li><a shape="rect"
href="irc-room.html">IRC Room</a></li></ul><h3
id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul
class="alternate"><li><a shape="rect" class="external-link"
href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
class="external-link"
href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
shape="rect" class="external-link"
href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
shape="rect" class="external-link"
href="http://www.apache.org/security/">Security</a></li></ul></div>
+<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3
id="Navigation-Community"><a shape="rect"
href="community.html">Community</a></h3><ul class="alternate"><li><a
shape="rect" href="support.html">Support</a></li><li><a shape="rect"
href="contributing.html">Contributing</a></li><li><a shape="rect"
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect"
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect"
href="user-stories.html">User Stories</a></li><li><a shape="rect"
href="news.html">News</a></li><li><a shape="rect"
href="articles.html">Articles</a></li><li><a shape="rect"
href="site.html">Site</a></li><li><a shape="rect"
href="team.html">Team</a></li><li><a shape="rect" class="external-link"
href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developers"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"
><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a
>shape="rect" href="source.html">Source</a></li><li><a shape="rect"
>href="building.html">Building</a></li><li><a shape="rect"
>href="javadoc.html">JavaDoc</a></li><li><a shape="rect"
>href="irc-room.html">IRC Room</a></li></ul><h3
>id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul
>class="alternate"><li><a shape="rect" class="external-link"
>href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
>class="external-link"
>href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
> shape="rect" class="external-link"
>href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
>shape="rect" class="external-link"
>href="http://www.apache.org/security/">Security</a></li></ul></div>
<!-- NavigationBar -->
</div>
</div>