Modified: websites/production/camel/content/atom.html
==============================================================================
--- websites/production/camel/content/atom.html (original)
+++ websites/production/camel/content/atom.html Fri Aug 25 10:20:13 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: Atom
@@ -86,124 +75,15 @@
<tbody>
<tr>
<td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="Atom-AtomComponent">Atom
Component</h2><p>The <strong>atom:</strong> component is used for polling Atom
feeds.</p><p>Camel will poll the feed every 60 seconds by default.<br
clear="none"> <strong>Note:</strong> The component currently only supports
polling (consuming) feeds.</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" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[<dependency>
+<div class="wiki-content maincontent"><h2 id="Atom-AtomComponent">Atom
Component</h2><p>The <strong>atom:</strong> component is used for polling Atom
feeds.</p><p>Camel will poll the feed every 60 seconds by default.<br
clear="none"> <strong>Note:</strong> The component currently only supports
polling (consuming) feeds.</p><p>Maven users will need to add the following
dependency to their <code>pom.xml</code> for this component:</p><parameter
ac:name="">xml</parameter><plain-text-body><dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-atom</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel core version -->
</dependency>
-]]></script>
-</div></div><h3 id="Atom-URIformat">URI format</h3><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[atom://atomUri[?options]
-]]></script>
-</div></div><p>Where <strong>atomUri</strong> is the URI to the Atom feed to
poll.</p><h3 id="Atom-Options">Options</h3><div
class="confluenceTableSmall"><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Property</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>splitEntries</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>If <code>true</code> Camel will
poll the feed and for the subsequent polls return each entry poll by poll. If
the feed contains 7 entries then Camel will return the first entry on the first
poll, the 2nd entry on the next poll, until no more entries where as Camel will
do a new update on the feed. If <code>false</code> then Camel will poll a
fresh feed on every invocation.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>filter</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Is only used by the split entries to filter the entries
to return. Camel will default use the <code>UpdateDateFilter</code> that only
return new entries from the feed. So the client consuming from the feed never
receives the same entry more than once. The filter will return the entries
ordered by the newest last.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>lastUpdate</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Is only used by the filter, as the starting
timestamp for selection never entries (uses the <code>entry.updated</code>
timestamp). Syntax format is: <code>yyyy-MM-ddTHH:MM:ss</code>. Example:
<code>2007-12-24T17:45:59</code>.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>throttleEntries</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong>
Sets whether all entries identified in a single feed poll should be delivered
immediately. If <code>true</code>, only one entry is processed per
<code>consumer.delay</code>. Only applicable when <code>splitEntries</code> is
set to <code>true</code>.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>feedHeader</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Sets whether to add the Abdera Feed object
as a header.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>sortEntries</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>f
alse</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If
<code>splitEntries</code> is <code>true</code>, this sets whether to sort those
entries by updated date.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>consumer.delay</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>500</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Delay in millis between each
poll.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>consumer.initialDelay</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Millis before polling
starts.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>consumer.userFixedDelay</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>If <code>true</code>, use fixed
delay between pools, otherwise fixed rate is used. See <a shape="rect"
class="external-link"
href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html"
rel="nofollow">ScheduledExecutorService</a> in JDK for
details.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>username</code></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>Camel 2.16:</strong> For basic authentication when
polling from a HTTP feed</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>password</code></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>Camel 2.16:</strong><span> For basic
authentication when polling from a HTTP
feed</span></td></tr></tbody></table></div></div>
-
-
-<p>You can append query options to the URI in the following format,
<code>?option=value&option=value&...</code></p><h3
id="Atom-Exchangedataformat">Exchange data format</h3><p>Camel will set the In
body on the returned <code>Exchange</code> with the entries. Depending on the
<code>splitEntries</code> flag Camel will either return one <code>Entry</code>
or a <code>List<Entry></code>.</p><div class="confluenceTableSmall"><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Value</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Behavior</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>splitEntries</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Only a single entry from the currently
being processed feed is set:
<code>exchange.in.body(Entry)</code></p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>splitEntries</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The entire list of entries from
the feed is set:
<code>exchange.in.body(List<Entry>)</code></p></td></tr></tbody></table></div></div>
-
-
-<p>Camel can set the <code>Feed</code> object on the In header (see
<code>feedHeader</code> option to disable this):</p><h3
id="Atom-MessageHeaders">Message Headers</h3><p>Camel atom uses these
headers.</p><div class="confluenceTableSmall"><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>CamelAtomFeed</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>When consuming the
<code>org.apache.abdera.model.Feed</code> object is set to this
header.</p></td></tr></tbody></table></div></div>
-
-
-<h3 id="Atom-Samples">Samples</h3><p>In this sample we poll James Strachan's
blog.</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("atom://http://macstrac.blogspot.com/feeds/posts/default").to("seda:feeds");
-]]></script>
-</div></div><p>In this sample we want to filter only good blogs we like to a
SEDA queue. The sample also shows how to setup Camel standalone, not running in
any Container or using Spring.</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[
-
-// This is the CamelContext that is the heart of Camel
-private CamelContext context;
-
-protected CamelContext createCamelContext() throws Exception {
-
- // First we register a blog service in our bean registry
- SimpleRegistry registry = new SimpleRegistry();
- registry.put("blogService", new BlogService());
-
- // Then we create the camel context with our bean registry
- context = new DefaultCamelContext(registry);
-
- // Then we add all the routes we need using the route builder DSL syntax
- context.addRoutes(createMyRoutes());
-
- return context;
-}
-
-/**
- * This is the route builder where we create our routes using the Camel DSL
- */
-protected RouteBuilder createMyRoutes() throws Exception {
- return new RouteBuilder() {
- public void configure() throws Exception {
- // We pool the atom feeds from the source for further processing
in the seda queue
- // we set the delay to 1 second for each pool as this is a unit
test also and we can
- // not wait the default poll interval of 60 seconds.
- // Using splitEntries=true will during polling only fetch one Atom
Entry at any given time.
- // As the feed.atom file contains 7 entries, using this will
require 7 polls to fetch the entire
- // content. When Camel have reach the end of entries it will
refresh the atom feed from URI source
- // and restart - but as Camel by default uses the
UpdatedDateFilter it will only deliver new
- // blog entries to "seda:feeds". So only when James
Straham updates his blog with a new entry
- // Camel will create an exchange for the seda:feeds.
-
from("atom:file:src/test/data/feed.atom?splitEntries=true&consumer.delay=1000").to("seda:feeds");
-
- // From the feeds we filter each blot entry by using our blog
service class
-
from("seda:feeds").filter().method("blogService",
"isGoodBlog").to("seda:goodBlogs");
-
- // And the good blogs is moved to a mock queue as this sample is
also used for unit testing
- // this is one of the strengths in Camel that you can also use the
mock endpoint for your
- // unit tests
- from("seda:goodBlogs").to("mock:result");
- }
- };
-}
-
-/**
- * This is the actual junit test method that does the assertion that our
routes is working as expected
- */
-@Test
-public void testFiltering() throws Exception {
- // create and start Camel
- context = createCamelContext();
- context.start();
-
- // Get the mock endpoint
- MockEndpoint mock = context.getEndpoint("mock:result",
MockEndpoint.class);
-
- // There should be at least two good blog entries from the feed
- mock.expectedMinimumMessageCount(2);
-
- // Asserts that the above expectations is true, will throw assertions
exception if it failed
- // Camel will default wait max 20 seconds for the assertions to be true,
if the conditions
- // is true sooner Camel will continue
- mock.assertIsSatisfied();
-
- // stop Camel after use
- context.stop();
-}
-
-/**
- * Services for blogs
- */
-public class BlogService {
-
- /**
- * Tests the blogs if its a good blog entry or not
- */
- public boolean isGoodBlog(Exchange exchange) {
- Entry entry = exchange.getIn().getBody(Entry.class);
- String title = entry.getTitle();
-
- // We like blogs about Camel
- boolean good = title.toLowerCase().contains("camel");
- return good;
- }
-
-}
-
-]]></script>
-</div></div><h3 id="Atom-SeeAlso">See Also</h3>
-<ul><li><a shape="rect" href="configuring-camel.html">Configuring
Camel</a></li><li><a shape="rect"
href="component.html">Component</a></li><li><a shape="rect"
href="endpoint.html">Endpoint</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li></ul><ul
class="alternate"><li><a shape="rect" href="rss.html">RSS</a></li></ul></div>
+</plain-text-body><h3 id="Atom-URIformat">URI
format</h3><plain-text-body>atom://atomUri[?options]
+</plain-text-body><p>Where <strong>atomUri</strong> is the URI to the Atom
feed to poll.</p><h3 id="Atom-Options">Options</h3><parameter
ac:name="class">confluenceTableSmall</parameter><rich-text-body><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Property</p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>splitEntries</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>If <code>true</code> Camel will
poll the feed and for the subsequent polls return each entry poll by poll. If
the feed contains 7 entries then Camel will return the first entry on the first
poll, the 2nd entry on the next poll, until no more entries where as Camel will
do a new update on the fee
d. If <code>false</code> then Camel will poll a fresh feed on every
invocation.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>filter</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Is only used by the split entries to filter the entries
to return. Camel will default use the <code>UpdateDateFilter</code> that only
return new entries from the feed. So the client consuming from the feed never
receives the same entry more than once. The filter will return the entries
ordered by the newest last.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>lastUpdate</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Is only used by the filter, as the starting
timestamp for selection never entries (uses the <code>entry.updated</code>
timestamp). Syntax format
is: <code>yyyy-MM-ddTHH:MM:ss</code>. Example:
<code>2007-12-24T17:45:59</code>.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>throttleEntries</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> Sets whether
all entries identified in a single feed poll should be delivered immediately.
If <code>true</code>, only one entry is processed per
<code>consumer.delay</code>. Only applicable when <code>splitEntries</code> is
set to <code>true</code>.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>feedHeader</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Sets whether to add the Abdera Feed object
as a header.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>sortEntries</code></p></td><td colspan=
"1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>If <code>splitEntries</code> is
<code>true</code>, this sets whether to sort those entries by updated
date.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>consumer.delay</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>500</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Delay in millis between each
poll.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>consumer.initialDelay</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Millis before polling
starts.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>consumer.userFixedDelay</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="c
onfluenceTd"><p>If <code>true</code>, use fixed delay between pools, otherwise
fixed rate is used. See <a shape="rect" class="external-link"
href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html"
rel="nofollow">ScheduledExecutorService</a> in JDK for
details.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>username</code></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>Camel 2.16:</strong> For basic authentication when
polling from a HTTP feed</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><code>password</code></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>Camel 2.16:</strong><span> For basic
authentication when polling from a HTTP
feed</span></td></tr></tbody></table></div></rich-text-body><p>You can append
query options to the URI in the following format,
<code>?option=value&option=value&...</code></p><h3
id="Atom-Exchangedataformat">Exchange data format</h3><p>Camel will set the In
body on the returned <code>Exchange</code> with the entries. Depending on the
<code>splitEntries</code> flag Camel will either return one <code>Entry</code>
or a <code>List<Entry></code>.</p><parameter
ac:name="class">confluenceTableSmall</parameter><rich-text-body><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Value</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Behavior</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>splitEntries</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Only a single entry from the currently
being processed feed is set: <code>exchange.in.body(En
try)</code></p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>splitEntries</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>The entire list of entries from the feed is
set:
<code>exchange.in.body(List<Entry>)</code></p></td></tr></tbody></table></div></rich-text-body><p>Camel
can set the <code>Feed</code> object on the In header (see
<code>feedHeader</code> option to disable this):</p><h3
id="Atom-MessageHeaders">Message Headers</h3><p>Camel atom uses these
headers.</p><parameter
ac:name="class">confluenceTableSmall</parameter><rich-text-body><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>CamelAtomFeed</code></p></td><td
colspan="1" row
span="1" class="confluenceTd"><p>When consuming the
<code>org.apache.abdera.model.Feed</code> object is set to this
header.</p></td></tr></tbody></table></div></rich-text-body><h3
id="Atom-Samples">Samples</h3><p>In this sample we poll James Strachan's
blog.</p><plain-text-body>from("atom://http://macstrac.blogspot.com/feeds/posts/default").to("seda:feeds");
+</plain-text-body><p>In this sample we want to filter only good blogs we like
to a SEDA queue. The sample also shows how to setup Camel standalone, not
running in any Container or using
Spring.<plain-text-body>{snippet:id=e1|lang=java|url=camel/trunk/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomGoodBlogsTest.java}</plain-text-body><parameter
ac:name=""><a shape="rect" href="endpoint-see-also.html">Endpoint See
Also</a></parameter></p><ul class="alternate"><li><a shape="rect"
href="rss.html">RSS</a></li></ul></div>
</td>
<td valign="top">
<div class="navigation">
Modified: websites/production/camel/content/bean.html
==============================================================================
--- websites/production/camel/content/bean.html (original)
+++ websites/production/camel/content/bean.html Fri Aug 25 10:20:13 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: Bean
@@ -86,75 +75,27 @@
<tbody>
<tr>
<td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="Bean-BeanComponent">Bean
Component</h2><p>The <strong>bean:</strong> component binds beans to Camel
message exchanges.</p><h3 id="Bean-URIformat">URI format</h3><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[bean:beanID[?options]
-]]></script>
-</div></div><p>Where <strong>beanID</strong> can be any string which is used
to look up the bean in the <a shape="rect"
href="registry.html">Registry</a></p><h3 id="Bean-Options">Options</h3><div
class="confluenceTableSmall"><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>method</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>The method name from the bean that will be
invoked. If not provided, Camel will try to determine the method itself. In
case of ambiguity
an exception will be thrown. See <a shape="rect" href="bean-binding.html">Bean
Binding</a> for more details. From <strong>Camel 2.8</strong> onwards you can
specify type qualifiers to pin-point the exact method to use for overloaded
methods. From <strong>Camel 2.9</strong> onwards you can specify parameter
values directly in the method syntax. See more details at <a shape="rect"
href="bean-binding.html">Bean Binding</a>.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>cache</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>If enabled, Camel will cache
the result of the first <a shape="rect" href="registry.html">Registry</a>
look-up. Cache can be enabled if the bean in the <a shape="rect"
href="registry.html">Registry</a> is defined as a singleton
scope.</p></td></tr><tr><td colspan=
"1" rowspan="1"
class="confluenceTd"><p><code>multiParameterArray</code></p></td><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>How to treat the parameters which are
passed from the message body; if it is <code>true</code>, the In message body
should be an array of parameters.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>bean.xxx</p></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong style="line-height: 1.42857;">Camel
2.17:</strong> To configure additional options on the create bean instance
from the class name. For example to configure a foo option on the bean, use
bean.foo=123.</p></td></tr></tbody></table></div></div>
-
-
-<p>You can append query options to the URI in the following format,
<code>?option=value&option=value&...</code></p><h3
id="Bean-Using">Using</h3><p>The object instance that is used to consume
messages must be explicitly registered with the <a shape="rect"
href="registry.html">Registry</a>. For example, if you are using Spring you
must define the bean in the Spring configuration, <code>spring.xml</code>; or
if you don't use Spring, by registering the bean in JNDI.</p><div
class="error"><span class="error">Error formatting macro: snippet:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>Once an
endpoint has been registered, you can build Camel routes that use it to process
exchanges.<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[
-// lets add simple route
-camelContext.addRoutes(new RouteBuilder() {
- public void configure() {
- from("direct:hello").transform().constant("Good
Bye!");
- }
-});
-]]></script>
-</div></div>A <strong>bean:</strong> endpoint cannot be defined as the input
to the route; i.e. you cannot consume from it, you can only route from some
inbound message <a shape="rect" href="endpoint.html">Endpoint</a> to the bean
endpoint as output. So consider using a <strong>direct:</strong> or
<strong>queue:</strong> endpoint as the input.<p>You can use the
<code>createProxy()</code> methods on <a shape="rect" class="external-link"
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/component/bean/ProxyHelper.html">ProxyHelper</a>
to create a proxy that will generate BeanExchanges and send them to any
endpoint:</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[
-ISay proxy = new
ProxyBuilder(camelContext).endpoint("direct:hello").build(ISay.class);
-String rc = proxy.say();
-assertEquals("Good Bye!", rc);
-]]></script>
-</div></div>And the same route using Spring DSL:<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[<route>
- <from uri="direct:hello">
- <to uri="bean:bye"/>
+<div class="wiki-content maincontent"><h2 id="Bean-BeanComponent">Bean
Component</h2><p>The <strong>bean:</strong> component binds beans to Camel
message exchanges.</p><h3 id="Bean-URIformat">URI
format</h3><plain-text-body>bean:beanID[?options]
+</plain-text-body><p>Where <strong>beanID</strong> can be any string which is
used to look up the bean in the <a shape="rect"
href="registry.html">Registry</a></p><h3
id="Bean-Options">Options</h3><parameter
ac:name="class">confluenceTableSmall</parameter><rich-text-body><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>method</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>The method name from the bean that will be
invoked. If not provided, Camel will try to det
ermine the method itself. In case of ambiguity an exception will be thrown.
See <a shape="rect" href="bean-binding.html">Bean Binding</a> for more details.
From <strong>Camel 2.8</strong> onwards you can specify type qualifiers to
pin-point the exact method to use for overloaded methods. From <strong>Camel
2.9</strong> onwards you can specify parameter values directly in the method
syntax. See more details at <a shape="rect" href="bean-binding.html">Bean
Binding</a>.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>cache</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>If enabled, Camel will cache the result of
the first <a shape="rect" href="registry.html">Registry</a> look-up. Cache can
be enabled if the bean in the <a shape="rect" href="registry.html">Registry</a>
is defined as a
singleton scope.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>multiParameterArray</code></p></td><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>How to treat the parameters which are
passed from the message body; if it is <code>true</code>, the In message body
should be an array of parameters.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>bean.xxx</p></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong style="line-height: 1.42857;">Camel
2.17:</strong> To configure additional options on the create bean instance
from the class name. For example to configure a foo option on the bean, use
bean.foo=123.</p></td></tr></tbody></table><
/div></rich-text-body><p>You can append query options to the URI in the
following format, <code>?option=value&option=value&...</code></p><h3
id="Bean-Using">Using</h3><p>The object instance that is used to consume
messages must be explicitly registered with the <a shape="rect"
href="registry.html">Registry</a>. For example, if you are using Spring you
must define the bean in the Spring configuration, <code>spring.xml</code>; or
if you don't use Spring, by registering the bean in
JNDI.<plain-text-body>{snippet:id=register|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java}</plain-text-body>Once
an endpoint has been registered, you can build Camel routes that use it to
process
exchanges.<plain-text-body>{snippet:id=route|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java}</plain-text-body>A
<strong>bean:</strong> endpoint cannot be defined as the input to the route;
i.e. you c
annot consume from it, you can only route from some inbound message <a
shape="rect" href="endpoint.html">Endpoint</a> to the bean endpoint as output.
So consider using a <strong>direct:</strong> or <strong>queue:</strong>
endpoint as the input.</p><p>You can use the <code>createProxy()</code> methods
on <a shape="rect" class="external-link"
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/component/bean/ProxyHelper.html">ProxyHelper</a>
to create a proxy that will generate BeanExchanges and send them to any
endpoint:<plain-text-body>{snippet:id=invoke|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java}</plain-text-body>And
the same route using Spring DSL:</p><parameter
ac:name="">xml</parameter><plain-text-body><route>
+ <from uri="direct:hello">
+ <to uri="bean:bye"/>
</route>
-]]></script>
-</div></div><h3 id="Bean-Beanasendpoint">Bean as endpoint</h3><p>Camel also
supports invoking <a shape="rect" href="bean.html">Bean</a> as an Endpoint. In
the route 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[
-<camelContext xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="direct:start"/>
- <to uri="myBean"/>
- <to uri="mock:results"/>
- </route>
-</camelContext>
-
-<bean id="myBean"
class="org.apache.camel.spring.bind.ExampleBean"/>
-]]></script>
-</div></div>What happens is that when the exchange is routed to the
<code>myBean</code> Camel will use the <a shape="rect"
href="bean-binding.html">Bean Binding</a> to invoke the bean.<br clear="none">
The source for the bean is just a plain POJO:<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 class ExampleBean {
-
- public String sayHello(String name) {
- return "Hello " + name + "!";
- }
-}
-]]></script>
-</div></div>Camel will use <a shape="rect" href="bean-binding.html">Bean
Binding</a> to invoke the <code>sayHello</code> method, by converting the
Exchange's In body to the <code>String</code> type and storing the output of
the method on the Exchange Out body.<h3 id="Bean-JavaDSLbeansyntax">Java DSL
bean syntax</h3><p>Java DSL comes with syntactic sugar for the <a shape="rect"
href="bean.html">Bean</a> component. Instead of specifying the bean explicitly
as the endpoint (i.e. <code>to("bean:beanName")</code>) you can use the
following syntax:</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[// Send message to the bean endpoint
+</plain-text-body><h3 id="Bean-Beanasendpoint">Bean as endpoint</h3><p>Camel
also supports invoking <a shape="rect" href="bean.html">Bean</a> as an
Endpoint. In the route
below:<plain-text-body>{snippet:id=e1|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/bind/beanAsEndpoint.xml}</plain-text-body>What
happens is that when the exchange is routed to the <code>myBean</code> Camel
will use the <a shape="rect" href="bean-binding.html">Bean Binding</a> to
invoke the bean.<br clear="none"> The source for the bean is just a plain
POJO:<plain-text-body>{snippet:id=e1|lang=java|url=camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/bind/ExampleBean.java}</plain-text-body>Camel
will use <a shape="rect" href="bean-binding.html">Bean Binding</a> to invoke
the <code>sayHello</code> method, by converting the Exchange's In body to the
<code>String</code> type and storing the output of the method on the Exchange
Out body.</p><h3 id=
"Bean-JavaDSLbeansyntax">Java DSL bean syntax</h3><p>Java DSL comes with
syntactic sugar for the <a shape="rect" href="bean.html">Bean</a> component.
Instead of specifying the bean explicitly as the endpoint (i.e.
<code>to("bean:beanName")</code>) you can use the following
syntax:</p><parameter ac:name="">java</parameter><plain-text-body>// Send
message to the bean endpoint
// and invoke method resolved using Bean Binding.
-from("direct:start").beanRef("beanName");
+from("direct:start").beanRef("beanName");
// Send message to the bean endpoint
// and invoke given method.
-from("direct:start").beanRef("beanName",
"methodName");
-]]></script>
-</div></div><p>Instead of passing name of the reference to the bean (so that
Camel will lookup for it in the registry), you can specify the bean
itself:</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[// Send message to the given bean instance.
-from("direct:start").bean(new ExampleBean());
+from("direct:start").beanRef("beanName", "methodName");
+</plain-text-body><p>Instead of passing name of the reference to the bean (so
that Camel will lookup for it in the registry), you can specify the bean
itself:</p><parameter ac:name="">java</parameter><plain-text-body>// Send
message to the given bean instance.
+from("direct:start").bean(new ExampleBean());
// Explicit selection of bean method to be invoked.
-from("direct:start").bean(new ExampleBean(), "methodName");
+from("direct:start").bean(new ExampleBean(), "methodName");
// Camel will create the instance of bean and cache it for you.
-from("direct:start").bean(ExampleBean.class);
-]]></script>
-</div></div><h3 id="Bean-BeanBinding">Bean Binding</h3><p>How bean methods to
be invoked are chosen (if they are not specified explicitly through the
<strong>method</strong> parameter) and how parameter values are constructed
from the <a shape="rect" href="message.html">Message</a> are all defined by the
<a shape="rect" href="bean-binding.html">Bean Binding</a> mechanism which is
used throughout all of the various <a shape="rect"
href="bean-integration.html">Bean Integration</a> mechanisms in
Camel.</p><p></p><h3 id="Bean-SeeAlso">See Also</h3>
-<ul><li><a shape="rect" href="configuring-camel.html">Configuring
Camel</a></li><li><a shape="rect"
href="component.html">Component</a></li><li><a shape="rect"
href="endpoint.html">Endpoint</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li></ul><ul><li><a
shape="rect" href="class.html">Class</a> component</li><li><a shape="rect"
href="bean-binding.html">Bean Binding</a></li><li><a shape="rect"
href="bean-integration.html">Bean Integration</a></li></ul></div>
+from("direct:start").bean(ExampleBean.class);
+</plain-text-body><h3 id="Bean-BeanBinding">Bean Binding</h3><p>How bean
methods to be invoked are chosen (if they are not specified explicitly through
the <strong>method</strong> parameter) and how parameter values are constructed
from the <a shape="rect" href="message.html">Message</a> are all defined by the
<a shape="rect" href="bean-binding.html">Bean Binding</a> mechanism which is
used throughout all of the various <a shape="rect"
href="bean-integration.html">Bean Integration</a> mechanisms in
Camel.</p><p><parameter ac:name=""><a shape="rect"
href="endpoint-see-also.html">Endpoint See Also</a></parameter></p><ul><li><a
shape="rect" href="class.html">Class</a> component</li><li><a shape="rect"
href="bean-binding.html">Bean Binding</a></li><li><a shape="rect"
href="bean-integration.html">Bean Integration</a></li></ul></div>
</td>
<td valign="top">
<div class="navigation">
Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Fri Aug 25 10:20:13
2017
@@ -4368,11 +4368,11 @@ So we completed the last piece in the pi
<p>This example has been removed from <strong>Camel 2.9</strong> onwards.
Apache Axis 1.4 is a very old and unsupported framework. We encourage users to
use <a shape="rect" href="cxf.html">CXF</a> instead of Axis.</p></div></div>
<style type="text/css">/*<![CDATA[*/
-div.rbtoc1503652754455 {padding: 0px;}
-div.rbtoc1503652754455 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1503652754455 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1503656331936 {padding: 0px;}
+div.rbtoc1503656331936 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1503656331936 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style><div class="toc-macro rbtoc1503652754455">
+/*]]>*/</style><div class="toc-macro rbtoc1503656331936">
<ul class="toc-indentation"><li><a shape="rect"
href="#BookInOnePage-TutorialusingAxis1.4withApacheCamel">Tutorial using Axis
1.4 with Apache Camel</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#BookInOnePage-Prerequisites">Prerequisites</a></li><li><a shape="rect"
href="#BookInOnePage-Distribution">Distribution</a></li><li><a shape="rect"
href="#BookInOnePage-Introduction">Introduction</a></li><li><a shape="rect"
href="#BookInOnePage-SettinguptheprojecttorunAxis">Setting up the project to
run Axis</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#BookInOnePage-Maven2">Maven 2</a></li><li><a shape="rect"
href="#BookInOnePage-wsdl">wsdl</a></li><li><a shape="rect"
href="#BookInOnePage-ConfiguringAxis">Configuring Axis</a></li><li><a
shape="rect" href="#BookInOnePage-RunningtheExample">Running the
Example</a></li></ul>
Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/camel/content/cxf-bean-component.html
==============================================================================
--- websites/production/camel/content/cxf-bean-component.html (original)
+++ websites/production/camel/content/cxf-bean-component.html Fri Aug 25
10:20:13 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: CXF Bean Component
@@ -86,45 +75,18 @@
<tbody>
<tr>
<td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2
id="CXFBeanComponent-CXFBeanComponent">CXF Bean Component</h2><p>The
<strong>cxfbean:</strong> component allows other Camel endpoints to send
exchange and invoke Web service bean objects. <strong>Currently, it only
supports JAX-RS and JAX-WS (new to Camel 2.1) annotated service
beans.</strong></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><code>CxfBeanEndpoint</code> is a
<code>ProcessorEndpoint</code> so it has no consumers. It works similarly to a
Bean component.</p></div></div><p><span style="color: rgb(0,0,0);">Maven users
need to add the following dependency to their pom.xml to use the CXF Bean
Component:</span></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>
+<div class="wiki-content maincontent"><h2
id="CXFBeanComponent-CXFBeanComponent">CXF Bean Component</h2><p>The
<strong>cxfbean:</strong> component allows other Camel endpoints to send
exchange and invoke Web service bean objects. <strong>Currently, it only
supports JAX-RS and JAX-WS (new to Camel 2.1) annotated service
beans.</strong></p><rich-text-body><p><code>CxfBeanEndpoint</code> is a
<code>ProcessorEndpoint</code> so it has no consumers. It works similarly to a
Bean component.</p></rich-text-body><p><span style="color: rgb(0,0,0);">Maven
users need to add the following dependency to their pom.xml to use the CXF Bean
Component:</span></p><parameter
ac:name="language">xml</parameter><plain-text-body><dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cxf</artifactId>
<!-- use the same version as your Camel core version: -->
<version>x.x.x</version>
-</dependency>]]></script>
-</div></div><h3 id="CXFBeanComponent-URIformat">URI format</h3><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[cxfbean:serviceBeanRef
-]]></script>
-</div></div><p>Where <strong>serviceBeanRef</strong> is a registry key to look
up the service bean object. If <code>serviceBeanRef</code> references a
<code>List</code> object, elements of the <code>List</code> are the service
bean objects accepted by the endpoint.</p><h3
id="CXFBeanComponent-Options">Options</h3><div class="confluenceTableSmall">
+</dependency></plain-text-body><h3 id="CXFBeanComponent-URIformat">URI
format</h3><plain-text-body>cxfbean:serviceBeanRef
+</plain-text-body><p>Where <strong>serviceBeanRef</strong> is a registry key
to look up the service bean object. If <code>serviceBeanRef</code> references a
<code>List</code> object, elements of the <code>List</code> are the service
bean objects accepted by the endpoint.</p><h3
id="CXFBeanComponent-Options">Options</h3><parameter
ac:name="class">confluenceTableSmall</parameter><rich-text-body>
<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p> Description </p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p> Example </p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p> Required? </p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p> Default Value </p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>bus</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> CXF bus reference specified by
the <code>#</code> notation. The referenced object must be an instance of
<code>org.apache.cxf.Bus</code>. </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>bus=#busName</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> Default bus created by CXF Bus Factory
</p></td></tr><tr><td colspan="1" rowsp
an="1" class="confluenceTd"><p> <code>cxfBeanBinding</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> CXF bean binding specified by
the <code>#</code> notation. The referenced object must be an instance of
<code>org.apache.camel.component.cxf.cxfbean.CxfBeanBinding</code>.
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>cxfBinding=#bindingName</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>DefaultCxfBeanBinding</code>
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>headerFilterStrategy</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> Header filter strategy specified by the <code>#</code>
notation. The referenced object must be an instance of
<code>org.apache.camel.spi.HeaderFilterStrategy</code>. </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>
<code>headerFilterStrategy=#strategyName</cod
e> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>CxfHeaderFilterStrategy</code> </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>populateFromClass</code><br
clear="none" class="atl-forced-newline"> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> Since 2.3, the wsdlLocation annotated in the POJO is
ignored (by default) unless this option is set to  <code>false.</code>
Prior to 2.3, the wsdlLocation annotated in the POJO is always honored and it
is not possible to ignore.<br clear="none" class="atl-forced-newline">
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>true</code>, <code>false</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>true</code> </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>providers</code> </p></
td><td colspan="1" rowspan="1" class="confluenceTd"><p> Since 2.5, setting the
providers for the CXFRS endpoint. </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>providers=#providerRef1,#providerRef2</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>null</code></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>setDefaultBus</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Will set the
default bus when CXF endpoint create a bus by itself. </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>true</code>, <code>false</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code>
</p></td></tr></tbody></table></div>
-</div>
-
-
-<h3 id="CXFBeanComponent-Headers">Headers</h3><div
class="confluenceTableSmall">
+</rich-text-body><h3 id="CXFBeanComponent-Headers">Headers</h3><parameter
ac:name="class">confluenceTableSmall</parameter><rich-text-body>
<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p> Description </p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p> Type </p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p> Required? </p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p> Default Value </p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p> In/Out </p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p> Examples </p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>CamelHttpCharacterEncoding</code> (before
2.0-m2: <code>CamelCxfBeanCharacterEncoding</code>) </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Character encoding </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>String</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td
colspan="1" rowspan="1" class="c
onfluenceTd"><p> None </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> In </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> ISO-8859-1 </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>CamelContentType</code> (before
2.0-m2: <code>CamelCxfBeanContentType</code>) </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Content type </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>String</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> *<strong>/</strong>* </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> In </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>text/xml</code>
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
CamelHttpBaseUri <br clear="none" class="atl-forced-newline">
(2.0-m3 and before: <code>CamelCxfBeanRequestBasePath</code>) </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> The value of this header will
be set in the CXF message as the <code>Message.BASE_PATH</code> property. It
is needed by CXF JAX-RS processing. Basically, it is the scheme, host and port
portion of the request URI. </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>String</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Yes </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> The Endpoint URI of the source endpoint in the Camel
exchange </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> In
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect"
class="external-link" href="http://localhost:9000"
rel="nofollow">http://localhost:9000</a> </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>CamelHttpPath</code> (before 2.0-m2:
<code>CamelCxfBeanRequestPat</code>h
) </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Request URI's
path </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>String</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> Yes </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> None </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> In </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>consumer/123</code> </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelHttpMethod</code>
(before 2.0-m2: <code>CamelCxfBeanVerb</code>) </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> RESTful request verb </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>String</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Yes </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> None </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> In </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>GET</code>, <code>PUT</code>,
<code>POST</code>, <code>DELETE</code> </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>CamelHttpResponseCode</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> HTTP response
code </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>Integer</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> No <br clear="none" class="atl-forced-newline">
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> None </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> Out <br clear="none"
class="atl-forced-newline"> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> 200 <br clear="none" class="atl-forced-newline">
</p></td></tr></tbody></table></div>
-</div>
-
-
-<div class="confluence-information-macro
confluence-information-macro-note"><span class="aui-icon aui-icon-small
aui-iconfont-warning confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>Currently, the CXF Bean component
has (only) been tested with the <a shape="rect" href="jetty.html">Jetty
component</a>. It understands headers from <a shape="rect"
href="jetty.html">Jetty component</a> without requiring
conversion.</p></div></div><h3 id="CXFBeanComponent-AWorkingSample">A Working
Sample</h3><p>This sample shows how to create a route that starts an embedded
Jetty HTTP server. The route sends requests to a CXF Bean and invokes a JAX-RS
annotated service.</p><p>First, create a route as follows: The
<code>from</code> endpoint is a Jetty HTTP endpoint that is listening on port
9000. Notice that the <code>matchOnUriPrefix</code> option must be set to
<code>true</code> because the RESTful request URI will not exactly match the
endpoint's URI http:
73;//localhost:9000.</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[
-<route>
- <from ref="ep1" />
- <to uri="cxfbean:customerServiceBean" />
- <to uri="mock:endpointA" />
-</route>
-]]></script>
-</div></div><p>The <code>to</code> endpoint is a CXF Bean with bean name
<code>customerServiceBean</code>. The name will be looked up from the registry.
Next, we make sure our service bean is available in Spring registry. We create
a bean definition in the Spring configuration. In this example, we create a
List of service beans (of one element). We could have created just a single
bean without a List.</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[
-<util:list id="customerServiceBean">
- <bean
class="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService"
/>
-</util:list>
-
-<bean class="org.apache.camel.wsdl_first.PersonImpl"
id="jaxwsBean" />
-
-]]></script>
-</div></div><p>That's it. Once the route is started, the web service is ready
for business. A HTTP client can make a request and receive response.</p></div>
+</rich-text-body><rich-text-body><p>Currently, the CXF Bean component has
(only) been tested with the <a shape="rect" href="jetty.html">Jetty
component</a>. It understands headers from <a shape="rect"
href="jetty.html">Jetty component</a> without requiring
conversion.</p></rich-text-body><h3 id="CXFBeanComponent-AWorkingSample">A
Working Sample</h3><p>This sample shows how to create a route that starts an
embedded Jetty HTTP server. The route sends requests to a CXF Bean and invokes
a JAX-RS annotated service.</p><p>First, create a route as follows: The
<code>from</code> endpoint is a Jetty HTTP endpoint that is listening on port
9000. Notice that the <code>matchOnUriPrefix</code> option must be set to
<code>true</code> because the RESTful request URI will not exactly match the
endpoint's URI
http:­//localhost:9000.</p><plain-text-body>{snippet:id=routeDefinition|lang=xml|url=camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/cxfbean/CxfBeanTest-
context.xml}</plain-text-body><p>The <code>to</code> endpoint is a CXF Bean
with bean name <code>customerServiceBean</code>. The name will be looked up
from the registry. Next, we make sure our service bean is available in Spring
registry. We create a bean definition in the Spring configuration. In this
example, we create a List of service beans (of one element). We could have
created just a single bean without a
List.</p><plain-text-body>{snippet:id=beanDefinition|lang=xml|url=camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/cxfbean/CxfBeanTest-context.xml}</plain-text-body><p>That's
it. Once the route is started, the web service is ready for business. A HTTP
client can make a request and receive response.</p></div>
</td>
<td valign="top">
<div class="navigation">