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 2015/03/19 08:21:50 UTC

svn commit: r944304 [3/3] - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html book-languages-appendix.html cache/main.pageCache camel-2160-release.html properties.html simple.html

Modified: websites/production/camel/content/simple.html
==============================================================================
--- websites/production/camel/content/simple.html (original)
+++ websites/production/camel/content/simple.html Thu Mar 19 07:21:50 2015
@@ -114,7 +114,7 @@
                             <p>The <a shape="rect" href="simple.html">Simple</a> language have been improved from Camel 2.9 onwards to use a better syntax parser, which can do index precise error messages, so you know exactly what is wrong and where the problem is. For example if you have made a typo in one of the operators, then previously the parser would not be able to detect this, and cause the evaluation to be true. There is a few changes in the syntax which are no longer backwards compatible. When using <a shape="rect" href="simple.html">Simple</a> language as a <a shape="rect" href="predicate.html">Predicate</a> then the literal text <strong>must</strong> be enclosed in either single or double quotes. For example: <code>"${body} == 'Camel'"</code>. Notice how we have single quotes around the literal. The old style of using <code>"body"</code> and <code>"header.foo"</code> to refer to the message body and header is @deprecated, and its encouraged to always use ${ } tokens for 
 the built-in functions.<br clear="none"> The range operator now requires the range to be in single quote as well as shown: <code>"${header.zip} between '30000..39999'"</code>.</p>
                     </div>
     </div>
-<p>To get the body of the in message: <code>"body"</code>, or <code>"in.body"</code> or <code>"${body}"</code>.</p><p>A complex expression must use ${ } placeholders, such as: <code>"Hello ${in.header.name} how are you?"</code>.</p><p>You can have multiple functions in the same expression: <code>"Hello ${in.header.name} this is ${in.header.me} speaking"</code>.<br clear="none"> However you can <strong>not</strong> nest functions in Camel 2.8.x or older (i.e. having another ${ } placeholder in an existing, is not allowed).<br clear="none"> From <strong>Camel 2.9</strong> onwards you can nest functions.</p><h3 id="Simple-Variables">Variables</h3><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Variable</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" cl
 ass="confluenceTd"><p>camelId</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> the <a shape="rect" href="camelcontext.html">CamelContext</a> name</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>camelContext.<strong>OGNL</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> the CamelContext invoked using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exchangeId</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> the exchange id</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>id</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" cl
 ass="confluenceTd"><p>the input message id</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>body</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the input body</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.body</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the input body</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>body.<strong>OGNL</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> the input body invoked using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.body.<strong>OGNL</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confl
 uenceTd"><p><strong>Camel 2.3:</strong> the input body invoked using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>bodyAs(<em>type</em>)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Type</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> Converts the body to the given type determined by its classname. The converted body can be null.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>mandatoryBodyAs(<em>type</em>)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Type</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> Converts the body to the given type determined by its classname, and expects the body to be not null.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>out.body</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>th
 e output body</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>header.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>refer to the input foo header</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>header[foo]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the input foo header</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>headers.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>refer to the input foo header</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>headers[foo]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> r
 efer to the input foo header</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.header.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>refer to the input foo header</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.header[foo]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the input foo header</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.headers.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>refer to the input foo header</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.headers[foo]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><str
 ong>Camel 2.9.2:</strong> refer to the input foo header</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>header.foo[bar]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> regard input foo header as a map and perform lookup on the map with bar as key</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.header.foo[bar]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> regard input foo header as a map and perform lookup on the map with bar as key</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.headers.foo[bar]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> regard input foo header as a map and perform lookup on t
 he map with bar as key</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>header.foo.<strong>OGNL</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> refer to the input foo header and invoke its value using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.header.foo.<strong>OGNL</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> refer to the input foo header and invoke its value using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.headers.foo.<strong>OGNL</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> refer to the input foo header an
 d invoke its value using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>out.header.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>refer to the out header foo</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>out.header[foo]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the out header foo</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>out.headers.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>refer to the out header foo</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>out.headers[foo]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="co
 nfluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the out header foo</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>headerAs(<em>key</em>,<em>type</em>)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Type</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> Converts the header to the given type determined by its classname</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>headers</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Map</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> refer to the input headers</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.headers</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Map</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> refer to the input headers</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>property.foo</p
 ></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Deprecated:</strong> refer to the foo property on the exchange</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">exchangeProperty.foo</td><td colspan="1" rowspan="1" class="confluenceTd">Object</td><td colspan="1" rowspan="1" class="confluenceTd"><span><strong>Camel 2.15:</strong> refer to the foo property on the exchange</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>property[foo]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Deprecated:</strong> refer to the foo property on the exchange</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><span>exchangeProperty[foo]</span></td><td colspan="1" rowspan="1" class="confluenceTd">Object</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15:</stron
 g><span> refer to the foo property on the exchange</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>property.foo.<strong>OGNL</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Deprecated:</strong> refer to the foo property on the exchange and invoke its value using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><span>exchangeProperty.foo.</span><strong>OGNL</strong></td><td colspan="1" rowspan="1" class="confluenceTd">Object</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15:</strong><span> refer to the foo property on the exchange and invoke its value using a Camel OGNL expression.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>sys.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>refer to the syste
 m property</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>sysenv.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> refer to the system environment</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exception</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.4:</strong> Refer to the exception object on the exchange, is <strong>null</strong> if no exception set on exchange. Will fallback and grab caught exceptions (<code>Exchange.EXCEPTION_CAUGHT</code>) if the Exchange has any.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exception.<strong>OGNL</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.4:</strong> Refer to the exch
 ange exception invoked using a Camel OGNL expression object</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exception.message</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Refer to the exception.message on the exchange, is <strong>null</strong> if no exception set on exchange. Will fallback and grab caught exceptions (<code>Exchange.EXCEPTION_CAUGHT</code>) if the Exchange has any.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exception.stacktrace</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.6.</strong> Refer to the exception.stracktrace on the exchange, is <strong>null</strong> if no exception set on exchange. Will fallback and grab caught exceptions (<code>Exchange.EXCEPTION_CAUGHT</code>) if the Exchange has any.</p></td></tr><tr><td colspan="1" rowspan="1" cla
 ss="confluenceTd"><p>date:<em>command:pattern</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Date formatting using the <code>java.text.SimpleDataFormat</code> patterns. Supported commands are: <strong>now</strong> for current timestamp, <strong>in.header.xxx</strong> or <strong>header.xxx</strong> to use the Date object in the IN header with the key xxx. <strong>out.header.xxx</strong> to use the Date object in the OUT header with the key xxx.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>bean:<em>bean expression</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Invoking a bean expression using the <a shape="rect" href="bean.html">Bean</a> language. Specifying a method name you must use dot as separator. We also support the ?method=methodname syntax that is used by the <a shape="rect" href="bean.
 html">Bean</a> component.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>properties:<em>locations:key</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Deprecated (use properties-location instead) Camel 2.3:</strong> Lookup a property with the given key. The <code>locations</code> option is optional. See more at <a shape="rect" href="using-propertyplaceholder.html">Using PropertyPlaceholder</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>properties-location:<em><a shape="rect" class="external-link" href="http://locationskey" rel="nofollow">locations:key</a></em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.14.1:</strong> Lookup a property with the given key. The <code>locations</code> option is optional. See more at <a shape="rect" href="using-propert
 yplaceholder.html">Using PropertyPlaceholder</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">properties:key:default</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.14.1</strong>: Lookup a property with the given key. If the key does not exists or has no value, then an optional default value can be specified.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>routeId</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> Returns the id of the current route the <a shape="rect" href="exchange.html">Exchange</a> is being routed.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>threadName</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> Returns the 
 name of the current thread. Can be used for logging purpose.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ref:xxx</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.6:</strong> To lookup a bean from the <a shape="rect" href="registry.html">Registry</a> with the given id.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>type:name.field</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> To refer to a type or field by its FQN name. To refer to a field you can append .FIELD_NAME. For example you can refer to the constant field from Exchange as: <code>org.apache.camel.Exchange.FILE_NAME</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1" 
 rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.12.3:</strong> represents a <strong>null</strong></p></td></tr></tbody></table></div></div><h3 id="Simple-OGNLexpressionsupport">OGNL expression support</h3><p><strong>Available as of Camel 2.3</strong></p>    <div class="aui-message hint shadowed information-macro">
+<p>To get the body of the in message: <code>"body"</code>, or <code>"in.body"</code> or <code>"${body}"</code>.</p><p>A complex expression must use ${ } placeholders, such as: <code>"Hello ${in.header.name} how are you?"</code>.</p><p>You can have multiple functions in the same expression: <code>"Hello ${in.header.name} this is ${in.header.me} speaking"</code>.<br clear="none"> However you can <strong>not</strong> nest functions in Camel 2.8.x or older (i.e. having another ${ } placeholder in an existing, is not allowed).<br clear="none"> From <strong>Camel 2.9</strong> onwards you can nest functions.</p><h3 id="Simple-Variables">Variables</h3><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Variable</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" cl
 ass="confluenceTd"><p>camelId</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> the <a shape="rect" href="camelcontext.html">CamelContext</a> name</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>camelContext.<strong>OGNL</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> the CamelContext invoked using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">exchange</td><td colspan="1" rowspan="1" class="confluenceTd">Exchange</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> the <a shape="rect" href="exchange.html">Exchange</a></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">exchange.<strong>OGNL</strong></td><td colspan="1" rowspan="1" class="confluenceTd">Object</t
 d><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong><span> the </span><a shape="rect" href="exchange.html">Exchange</a><span> invoked using a Camel OGNL expression.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exchangeId</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> the exchange id</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>id</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the input message id</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>body</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the input body</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.body</p></td><td colspan="1" rowspan="1" cl
 ass="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the input body</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>body.<strong>OGNL</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> the input body invoked using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.body.<strong>OGNL</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> the input body invoked using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>bodyAs(<em>type</em>)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Type</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> Converts the body to the given type 
 determined by its classname. The converted body can be null.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>mandatoryBodyAs(<em>type</em>)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Type</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> Converts the body to the given type determined by its classname, and expects the body to be not null.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>out.body</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the output body</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>header.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>refer to the input foo header</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>header[foo]</p></td><td colspan="1" rowspan="1" class=
 "confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the input foo header</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>headers.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>refer to the input foo header</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>headers[foo]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the input foo header</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.header.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>refer to the input foo header</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.header[foo]</p></td><td colspan="
 1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the input foo header</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.headers.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>refer to the input foo header</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.headers[foo]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the input foo header</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>header.foo[bar]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> regard input foo header as a map and perform lookup on the map with bar as key
 </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.header.foo[bar]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> regard input foo header as a map and perform lookup on the map with bar as key</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.headers.foo[bar]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> regard input foo header as a map and perform lookup on the map with bar as key</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>header.foo.<strong>OGNL</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> refer to the input foo header and invoke its value using a Camel OGNL expression.</p></td></tr
 ><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.header.foo.<strong>OGNL</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> refer to the input foo header and invoke its value using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.headers.foo.<strong>OGNL</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> refer to the input foo header and invoke its value using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>out.header.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>refer to the out header foo</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>out.header[foo]<
 /p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the out header foo</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>out.headers.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>refer to the out header foo</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>out.headers[foo]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the out header foo</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>headerAs(<em>key</em>,<em>type</em>)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Type</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> Converts the header to the given type dete
 rmined by its classname</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>headers</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Map</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> refer to the input headers</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.headers</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Map</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> refer to the input headers</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>property.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Deprecated:</strong> refer to the foo property on the exchange</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">exchangeProperty.foo</td><td colspan="1" rowspan="1" class="confluenceTd">Object</td><td colspan="1" rowspan="1"
  class="confluenceTd"><span><strong>Camel 2.15:</strong> refer to the foo property on the exchange</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>property[foo]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Deprecated:</strong> refer to the foo property on the exchange</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><span>exchangeProperty[foo]</span></td><td colspan="1" rowspan="1" class="confluenceTd">Object</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15:</strong><span> refer to the foo property on the exchange</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>property.foo.<strong>OGNL</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Deprecated:</strong> refer to the foo property on the exchange and invoke its val
 ue using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><span>exchangeProperty.foo.</span><strong>OGNL</strong></td><td colspan="1" rowspan="1" class="confluenceTd">Object</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15:</strong><span> refer to the foo property on the exchange and invoke its value using a Camel OGNL expression.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>sys.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>refer to the system property</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>sysenv.foo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> refer to the system environment</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exception</p></td><td colsp
 an="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.4:</strong> Refer to the exception object on the exchange, is <strong>null</strong> if no exception set on exchange. Will fallback and grab caught exceptions (<code>Exchange.EXCEPTION_CAUGHT</code>) if the Exchange has any.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exception.<strong>OGNL</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.4:</strong> Refer to the exchange exception invoked using a Camel OGNL expression object</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exception.message</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Refer to the exception.message on the exchange, is <strong>null</strong> if no exception set on exch
 ange. Will fallback and grab caught exceptions (<code>Exchange.EXCEPTION_CAUGHT</code>) if the Exchange has any.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exception.stacktrace</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.6.</strong> Refer to the exception.stracktrace on the exchange, is <strong>null</strong> if no exception set on exchange. Will fallback and grab caught exceptions (<code>Exchange.EXCEPTION_CAUGHT</code>) if the Exchange has any.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>date:<em>command:pattern</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Date formatting using the <code>java.text.SimpleDataFormat</code> patterns. Supported commands are: <strong>now</strong> for current timestamp, <strong>in.header.xxx</strong> or <strong>header.xxx
 </strong> to use the Date object in the IN header with the key xxx. <strong>out.header.xxx</strong> to use the Date object in the OUT header with the key xxx.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>bean:<em>bean expression</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Invoking a bean expression using the <a shape="rect" href="bean.html">Bean</a> language. Specifying a method name you must use dot as separator. We also support the ?method=methodname syntax that is used by the <a shape="rect" href="bean.html">Bean</a> component.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>properties:<em>locations:key</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Deprecated (use properties-location instead) Camel 2.3:</strong> Lookup a property with the given key. The <co
 de>locations</code> option is optional. See more at <a shape="rect" href="using-propertyplaceholder.html">Using PropertyPlaceholder</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>properties-location:<em><a shape="rect" class="external-link" href="http://locationskey" rel="nofollow">locations:key</a></em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.14.1:</strong> Lookup a property with the given key. The <code>locations</code> option is optional. See more at <a shape="rect" href="using-propertyplaceholder.html">Using PropertyPlaceholder</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">properties:key:default</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.14.1</strong>: Lookup a property with the given key. If the key does not exists or has no value, then an o
 ptional default value can be specified.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>routeId</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> Returns the id of the current route the <a shape="rect" href="exchange.html">Exchange</a> is being routed.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>threadName</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> Returns the name of the current thread. Can be used for logging purpose.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ref:xxx</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.6:</strong> To lookup a bean from the <a shape="rect" href="registry.html">Registry</a> with 
 the given id.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>type:name.field</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> To refer to a type or field by its FQN name. To refer to a field you can append .FIELD_NAME. For example you can refer to the constant field from Exchange as: <code>org.apache.camel.Exchange.FILE_NAME</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.12.3:</strong> represents a <strong>null</strong></p></td></tr></tbody></table></div></div><h3 id="Simple-OGNLexpressionsupport">OGNL expression support</h3><p><strong>Available as of Camel 2.3</strong></p>    <div class="aui-message hint shadowed informati
 on-macro">
                             <span class="aui-icon icon-hint">Icon</span>
                 <div class="message-content">
                             <p>Camel's OGNL support is for invoking methods only. You cannot access fields.<br clear="none"> From <strong>Camel 2.11.1</strong> onwards we added special support for accessing the length field of Java arrays.</p>