Author: buildbot
Date: Wed Mar 9 15:22:14 2016
New Revision: 982313
Log:
Production update by buildbot for camel
Modified:
websites/production/camel/content/book-component-appendix.html
websites/production/camel/content/book-in-one-page.html
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/cdi-testing.html
websites/production/camel/content/cdi.html
websites/production/camel/content/spring-web-services.html
Modified: websites/production/camel/content/book-component-appendix.html
==============================================================================
--- websites/production/camel/content/book-component-appendix.html (original)
+++ websites/production/camel/content/book-component-appendix.html Wed Mar 9
15:22:14 2016
@@ -1016,11 +1016,11 @@ template.send("direct:alias-verify&
]]></script>
</div></div><p></p><h3 id="BookComponentAppendix-SeeAlso.8">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="crypto.html">Crypto</a> Crypto is also available as a <a
shape="rect" href="data-format.html">Data Format</a></li></ul> <h2
id="BookComponentAppendix-CXFComponent">CXF Component</h2><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>When using CXF as a consumer, the
<a shape="rect" href="cxf-bean-component.html">CXF Bean Component</a> allows
you to factor out how message payloads are received from their processing as a
RESTful or SOAP web service. This has the potential of using a multitude of
transports to cons
ume web services. The bean component's configuration is also simpler and
provides the fastest method to implement web services using Camel and
CXF.</p></div></div><div class="confluence-information-macro
confluence-information-macro-tip"><span class="aui-icon aui-icon-small
aui-iconfont-approve confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>When using CXF in streaming modes
(see DataFormat option), then also read about <a shape="rect"
href="stream-caching.html">Stream caching</a>.</p></div></div><p>The
<strong>cxf:</strong> component provides integration with <a shape="rect"
href="http://cxf.apache.org">Apache CXF</a> for connecting to JAX-WS services
hosted in CXF.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1457086657643 {padding: 0px;}
-div.rbtoc1457086657643 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1457086657643 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1457536695850 {padding: 0px;}
+div.rbtoc1457536695850 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1457536695850 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1457086657643">
+/*]]>*/</style></p><div class="toc-macro rbtoc1457536695850">
<ul class="toc-indentation"><li><a shape="rect"
href="#BookComponentAppendix-CXFComponent">CXF Component</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#BookComponentAppendix-URIformat">URI format</a></li><li><a shape="rect"
href="#BookComponentAppendix-Options">Options</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#BookComponentAppendix-Thedescriptionsofthedataformats">The descriptions
of the dataformats</a>
@@ -6765,6 +6765,7 @@ resultEndpoint.assertIsSatisfied();
]]></script>
</div></div><p>There are some examples of the Mock endpoint in use in the <a
shape="rect" class="external-link"
href="http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/">camel-core
processor tests</a>.</p><h3
id="BookComponentAppendix-Mockingexistingendpoints">Mocking existing
endpoints</h3><p><strong>Available as of Camel 2.7</strong></p><p>Camel now
allows you to automatically mock existing endpoints in your Camel
routes.</p><div class="confluence-information-macro
confluence-information-macro-information"><p class="title">How it
works</p><span class="aui-icon aui-icon-small aui-iconfont-info
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p><strong>Important:</strong> The
endpoints are still in action. What happens differently is that a <a
shape="rect" href="mock.html">Mock</a> endpoint is injected and receives the
message first and then delegates the message to the target endpoint. You can
view
this as a kind of intercept and delegate or endpoint
listener.</p></div></div><p>Suppose you have the given route below:</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeHeader
panelHeader pdl" style="border-bottom-width: 1px;"><b>Route</b></div><div
class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+// tag::route[]
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@@ -6776,9 +6777,11 @@ protected RouteBuilder createRouteBuilde
}
};
}
+// end::route[]
]]></script>
</div></div><p>You can then use the <code>adviceWith</code> feature in Camel
to mock all the endpoints in a given route from your unit test, as shown
below:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeHeader panelHeader pdl" style="border-bottom-width:
1px;"><b>adviceWith mocking all endpoints</b></div><div class="codeContent
panelContent pdl">
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+// tag::e1[]
public void testAdvisedMockEndpoints() throws Exception {
// advice the first route using the inlined AdviceWith route builder
// which has extended capabilities than the regular route builder
@@ -6809,12 +6812,14 @@ public void testAdvisedMockEndpoints() t
assertNotNull(context.hasEndpoint("mock:direct:foo"));
assertNotNull(context.hasEndpoint("mock:log:foo"));
}
+// end::e1[]
]]></script>
</div></div><p>Notice that the mock endpoints is given the uri
<code>mock:<endpoint></code>, for example <code>mock:direct:foo</code>.
Camel logs at <code>INFO</code> level the endpoints being mocked:</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[INFO Adviced endpoint [direct://foo] with
mock endpoint [mock:direct:foo]
]]></script>
</div></div><div class="confluence-information-macro
confluence-information-macro-information"><p class="title">Mocked endpoints are
without parameters</p><span class="aui-icon aui-icon-small aui-iconfont-info
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>Endpoints which are mocked will
have their parameters stripped off. For example the endpoint
"log:foo?showAll=true" will be mocked to the following endpoint "mock:log:foo".
Notice the parameters have been removed.</p></div></div><p>Its also possible to
only mock certain endpoints using a pattern. For example to mock all
<code>log</code> endpoints you do as shown:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeHeader panelHeader pdl"
style="border-bottom-width: 1px;"><b>adviceWith mocking only log endpoints
using a pattern</b></div><div class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+// tag::e2[]
public void testAdvisedMockEndpointsWithPattern() throws Exception {
// advice the first route using the inlined AdviceWith route builder
// which has extended capabilities than the regular route builder
@@ -6845,9 +6850,11 @@ public void testAdvisedMockEndpointsWith
assertNull(context.hasEndpoint("mock:direct:start"));
assertNull(context.hasEndpoint("mock:direct:foo"));
}
+// end::e2[]
]]></script>
</div></div><p>The pattern supported can be a wildcard or a regular
expression. See more details about this at <a shape="rect"
href="intercept.html">Intercept</a> as its the same matching function used by
Camel.</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>Mind that mocking endpoints causes
the messages to be copied when they arrive on the mock.<br clear="none"> That
means Camel will use more memory. This may not be suitable when you send in a
lot of messages.</p></div></div><h4
id="BookComponentAppendix-Mockingexistingendpointsusingthecamel-testcomponent">Mocking
existing endpoints using the <code>camel-test</code> component</h4><p>Instead
of using the <code>adviceWith</code> to instruct Camel to mock endpoints, you
can easily enable this behavior when using the <code>camel-test</code> Test
Kit.<b
r clear="none"> The same route can be tested as follows. Notice that we return
<code>"*"</code> from the <code>isMockEndpoints</code> method, which tells
Camel to mock all endpoints.<br clear="none"> If you only want to mock all
<code>log</code> endpoints you can return <code>"log*"</code> instead.</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeHeader
panelHeader pdl" style="border-bottom-width: 1px;"><b>isMockEndpoints using
camel-test kit</b></div><div class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+// tag::e1[]
public class IsMockEndpointsJUnit4Test extends CamelTestSupport {
@Override
@@ -6892,9 +6899,11 @@ public class IsMockEndpointsJUnit4Test e
};
}
}
+// end::e1[]
]]></script>
</div></div><h4
id="BookComponentAppendix-MockingexistingendpointswithXMLDSL">Mocking existing
endpoints with XML DSL</h4><p>If you do not use the <code>camel-test</code>
component for unit testing (as shown above) you can use a different approach
when using XML files for routes.<br clear="none"> The solution is to create a
new XML file used by the unit test and then include the intended XML file which
has the route you want to test.</p><p>Suppose we have the route in the
<code>camel-route.xml</code> file:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeHeader panelHeader pdl"
style="border-bottom-width: 1px;"><b>camel-route.xml</b></div><div
class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+<!-- tag::e1[] -->
<!-- this camel route is in the camel-route.xml file -->
<camelContext xmlns="http://camel.apache.org/schema/spring">
@@ -6913,14 +6922,17 @@ public class IsMockEndpointsJUnit4Test e
</route>
</camelContext>
+<!-- end::e1[] -->
]]></script>
</div></div><p>Then we create a new XML file as follows, where we include the
<code>camel-route.xml</code> file and define a spring bean with the class
<code>org.apache.camel.impl.InterceptSendToMockEndpointStrategy</code> which
tells Camel to mock all endpoints:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeHeader panelHeader pdl"
style="border-bottom-width: 1px;"><b>test-camel-route.xml</b></div><div
class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+<!-- tag::e1[] -->
<!-- the Camel route is defined in another XML file -->
<import resource="camel-route.xml"/>
<!-- bean which enables mocking all endpoints -->
<bean id="mockAllEndpoints"
class="org.apache.camel.impl.InterceptSendToMockEndpointStrategy"/>
+<!-- end::e1[] -->
]]></script>
</div></div><p>Then in your unit test you load the new XML file
(<code>test-camel-route.xml</code>) instead of
<code>camel-route.xml</code>.</p><p>To only mock all <a shape="rect"
href="log.html">Log</a> endpoints you can define the pattern in the constructor
for the bean:</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[<bean id="mockAllEndpoints"
class="org.apache.camel.impl.InterceptSendToMockEndpointStrategy">
@@ -6929,6 +6941,7 @@ public class IsMockEndpointsJUnit4Test e
]]></script>
</div></div><h4
id="BookComponentAppendix-Mockingendpointsandskipsendingtooriginalendpoint">Mocking
endpoints and skip sending to original endpoint</h4><p><strong>Available as of
Camel 2.10</strong></p><p>Sometimes you want to easily mock and skip sending to
a certain endpoints. So the message is detoured and send to the mock endpoint
only. From Camel 2.10 onwards you can now use the
<code>mockEndpointsAndSkip</code> method using <a shape="rect"
href="advicewith.html">AdviceWith</a> or the <a shape="rect" class="unresolved"
href="#">Test Kit</a>. The example below will skip sending to the two endpoints
<code>"direct:foo"</code>, and <code>"direct:bar"</code>.</p><div class="code
panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl"
style="border-bottom-width: 1px;"><b>adviceWith mock and skip sending to
endpoints</b></div><div class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+// tag::e1[]
public void testAdvisedMockEndpointsWithSkip() throws Exception {
// advice the first route using the inlined AdviceWith route builder
// which has extended capabilities than the regular route builder
@@ -6952,9 +6965,11 @@ public void testAdvisedMockEndpointsWith
SedaEndpoint seda = context.getEndpoint("seda:foo",
SedaEndpoint.class);
assertEquals(0, seda.getCurrentQueueSize());
}
+// end::e1[]
]]></script>
</div></div><p>The same example using the <a shape="rect"
href="testing.html">Test Kit</a></p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeHeader panelHeader pdl"
style="border-bottom-width: 1px;"><b>isMockEndpointsAndSkip using camel-test
kit</b></div><div class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
+// tag::e1[]
public class IsMockEndpointsAndSkipJUnit4Test extends CamelTestSupport {
@Override
@@ -6991,6 +7006,7 @@ public class IsMockEndpointsAndSkipJUnit
};
}
}
+// end::e1[]
]]></script>
</div></div><h3
id="BookComponentAppendix-Limitingthenumberofmessagestokeep">Limiting the
number of messages to keep</h3><p><strong>Available as of Camel
2.10</strong></p><p>The <a shape="rect" href="mock.html">Mock</a> endpoints
will by default keep a copy of every <a shape="rect"
href="exchange.html">Exchange</a> that it received. So if you test with a lot
of messages, then it will consume memory.<br clear="none"> From Camel 2.10
onwards we have introduced two options <code>retainFirst</code> and
<code>retainLast</code> that can be used to specify to only keep N'th of the
first and/or last <a shape="rect" href="exchange.html">Exchange</a>s.</p><p>For
example in the code below, we only want to retain a copy of the first 5 and
last 5 <a shape="rect" href="exchange.html">Exchange</a>s the mock
receives.</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[ MockEndpoint mock =
getMockEndpoint("mock:data");
@@ -9877,18 +9893,7 @@ The body of the message must be a map (a
</div></div><div class="confluence-information-macro
confluence-information-macro-information"><p
class="title">Dependencies</p><span class="aui-icon aui-icon-small
aui-iconfont-info confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>As of Camel 2.8 this component
ships with Spring-WS 2.0.x which (like the rest of Camel) requires Spring
3.0.x.</p><p>Earlier Camel versions shipped Spring-WS 1.5.9 which is compatible
with Spring 2.5.x and 3.0.x. In order to run earlier versions of
<code>camel-spring-ws</code> on Spring 2.5.x you need to add the
<code>spring-webmvc</code> module from Spring 2.5.x. In order to run Spring-WS
1.5.9 on Spring 3.0.x you need to exclude the OXM module from Spring 3.0.x as
this module is also included in Spring-WS 1.5.9 (see <a shape="rect"
class="external-link"
href="http://stackoverflow.com/questions/3313314/can-spring-ws-1-5-be-used-with-spring-3"
rel="nofollow">this post</a>)</p></div></div><h3 id="BookComponentApp
endix-URIformat.65">URI format</h3><p>The URI scheme for this component is as
follows</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[spring-ws:[mapping-type:]address[?options]
]]></script>
-</div></div><p>To expose a web service <strong>mapping-type</strong> needs to
be set to any of the following:</p><div class="confluenceTableSmall">
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p> Mapping type </p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p> Description
</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>rootqname</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> Offers the option to map web service requests based on
the qualified name of the root element contained in the message.
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>soapaction</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> Used to map web service requests based on the SOAP
action specified in the header of the message. </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>uri</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> In order to map web service
requests that target a specific URI. </p></td></tr><tr><td colspan="1"
rowspan="1"
class="confluenceTd"><p> <code>xpathresult</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Used to map web service requests based on
the evaluation of an XPath <code>expression</code> against the incoming
message. The result of the evaluation should match the XPath result specified
in the endpoint URI. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>beanname</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Allows you to reference an
<code>org.apache.camel.component.spring.ws.bean.CamelEndpointDispatcher</code>
object in order to integrate with existing (legacy) <a shape="rect"
class="external-link"
href="http://static.springsource.org/spring-ws/sites/1.5/reference/html/server.html#server-endpoint-mapping"
rel="nofollow">endpoint mappings</a> like
<code>PayloadRootQNameEndpointMapping</code>,
<code>SoapActionEndpointMapping</code>, etc </p></td></tr></tbody></table></div>
-</div><p>As a consumer the <strong>address</strong> should contain a value
relevant to the specified mapping-type (e.g. a SOAP action, XPath expression).
As a producer the address should be set to the URI of the web service your
calling upon.</p><p>You can append query <strong>options</strong> to the URI in
the following format,
<code>?option=value&option=value&...</code></p><h3
id="BookComponentAppendix-Options.51">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> Required? </p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>soapAction</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> SOAP action to include inside
a SOAP request when accessing remote web services </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>
<code>wsAddressingAction</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> WS-Addressing 1.0 action header to include when
accessing web services. The <code>To</code> header is set to the
<em>address</em> of the web service as specified in the endpoint URI (default
Spri
ng-WS behavior). </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>expression</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Only when <em>mapping-type</em> is
<code>xpathresult</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> XPath expression to use in the process of mapping web
service requests, should match the result specified by <code>xpathresult</code>
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>timeout</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>Camel 2.10:</strong> Sets the socket read
timeout (in milliseconds) while invoking a webservice using the producer, see
<a shape="rect" class="external-link"
href="http://docs.oracle.com/javase/6/docs/api/java/net/URLConnection.html#setReadTimeout(int)"
rel="nofollow">URLConnection.setReadTimeout()</a> and <a shape="rect"
class="external-
link"
href="http://static.springsource.org/spring-ws/site/apidocs/org/springframework/ws/transport/http/CommonsHttpMessageSender.html#setReadTimeout(int)"
rel="nofollow">CommonsHttpMessageSender.setReadTimeout()</a>.  This
option works when using the built-in message sender
implementations: <em>CommonsHttpMessageSender</em> and <em>HttpUrlConnectionMessageSender</em>.
 One of these implementations will be used by default for HTTP based
services unless you customize the Spring WS configuration options supplied to
the component.  If you are using a non-standard sender, it is assumed that
you will handle your own timeout configuration.<br clear="none"
class="atl-forced-newline">
-<strong>Camel 2.12:</strong> The built-in message
sender <em>HttpComponentsMessageSender</em> is considered
<strong>instead of</strong> <em>CommonsHttpMessageSender</em> which
has been deprecated, see <a shape="rect" class="external-link"
href="http://static.springsource.org/spring-ws/site/apidocs/org/springframework/ws/transport/http/HttpComponentsMessageSender.html#setReadTimeout(int)"
rel="nofollow">HttpComponentsMessageSender.setReadTimeout()</a>.
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>sslContextParameters</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>Camel 2.10:</strong> Reference to
an <code>org.apache.camel.util.jsse.SSLContextParameters</code>
in the <a shape="rect" class="external-link"
href="http://camel.apache.org/registry.html">Registry</a>.  See <a
shape="rect" class="external-link" h
ref="http://camel.apache.org/http4.html#HTTP4-UsingtheJSSEConfigurationUtility">Using
the JSSE Configuration Utility</a>.  This option works when using the
built-in message sender
implementations: <em>CommonsHttpMessageSender</em> and <em>HttpUrlConnectionMessageSender</em>.
 One of these implementations will be used by default for HTTP based
services unless you customize the Spring WS configuration options supplied to
the component.  If you are using a non-standard sender, it is assumed that
you will handle your own TLS configuration.<br clear="none"
class="atl-forced-newline">
-<strong>Camel 2.12:</strong> The built-in message
sender <em>HttpComponentsMessageSender</em> is considered
<strong>instead of</strong> <em>CommonsHttpMessageSender</em> which
has been deprecated. </p></td></tr></tbody></table></div>
-</div><h4 id="BookComponentAppendix-Registrybasedoptions">Registry based
options</h4><p>The following options can be specified in the registry (most
likely a Spring ApplicationContext) and referenced from the endpoint URI using
the # notation.</p><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> Required? </p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>
<code>webServiceTemplate</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> Option to provide a custom <a shape="rect"
class="external-link"
href="http://static.springsource.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/client/core/WebServiceTemplate.html"
rel="nofollow">WebServiceTemplate</a>. This allows for full control over
client-side web services handling; like adding a custom interceptor or
specifying a fault resolver, message sender or message factory.
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>messageSender</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> Option to provide a custom <a
shape="rect" class="external-link"
href="http://static.springsource.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/transport/WebServiceMessageSender.html"
rel="nofollow">WebServiceMessageSender</a>. For example to perform
authentication or use alternative transports </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>messageFactory</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Option to provide a custom <a shape="rect"
class="external-link"
href="http://static.springsource.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/WebServiceMessageFactory.html"
rel="nofollow">WebServiceMessageFactory</a>. For example when you want Apache
Axiom to handle web service messages instead of SAAJ </p></td></tr><tr><td co
lspan="1" rowspan="1" class="confluenceTd"><p> <code>transformerFactory</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> Option to override default
TransformerFactory. The provided transformer factory must be of type
<code>javax.xml.transform.TransformerFactory</code> </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>endpointMapping</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Only when
<em>mapping-type</em> is <code>rootqname</code>, <code>soapaction</code>,
<code>uri</code> or <code>xpathresult</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Reference to an instance of
<code>org.apache.camel.component.spring.ws.bean.CamelEndpointMapping</code> in
the Registry/ApplicationContext. Only one bean is required in the registry to
serve all Camel/Spring-WS endpoints. This bean is auto-discovered by the <a
shape="rect" class="external-
link"
href="http://static.springsource.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/server/MessageDispatcher.html"
rel="nofollow">MessageDispatcher</a> and used to map requests to Camel
endpoints based on characteristics specified on the endpoint (like root QName,
SOAP action, etc) </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>messageFilter</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>Camel 2.10.3</strong> Option to provide a
custom MessageFilter. For example when you want to process your headers or
attachments by your own. </p></td></tr></tbody></table></div>
-
-</div><h3 id="BookComponentAppendix-Messageheaders">Message headers</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> Description </p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>
<code>CamelSpringWebserviceEndpointUri</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> String </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> URI of the web service your accessing as a
client, overrides <em>address</em> part of the endpoint URI
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>CamelSpringWebserviceSoapAction</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> String </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Header to specify the SOAP action of the
message, overrides <code>soapAction</code> option if present
</p></td></tr><tr><td colspan="1
" rowspan="1" class="confluenceTd"><p>
<code>CamelSpringWebserviceAddressingAction</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> URI </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> Use this header to specify the WS-Addressing action of
the message, overrides <code>wsAddressingAction</code> option if present
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>CamelSpringWebserviceSoapHeader</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Source </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11.1:</strong> Use this
header to specify/access the SOAP headers of the message.
</p></td></tr></tbody></table></div>
-</div><h2 id="BookComponentAppendix-Accessingwebservices">Accessing web
services</h2><p>To call a web service at <code><a shape="rect"
class="external-link" href="http://foo.com/bar"
rel="nofollow">http://foo.com/bar</a></code> simply define a route:</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+</div></div><p>To expose a web service <strong>mapping-type</strong> needs to
be set to any of the following:</p><div class="confluenceTableSmall"><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Mapping type</p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>rootqname</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Offers the option to map web service
requests based on the qualified name of the root element contained in the
message.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>soapaction</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Used to map web service requests based on
the SOAP action specified in the header of the message.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>uri</code></p></td><td
colspan="1" rowspan="1" cl
ass="confluenceTd"><p>In order to map web service requests that target a
specific URI.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>xpathresult</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Used to map web service requests based on
the evaluation of an XPath <code>expression</code> against the incoming
message. The result of the evaluation should match the XPath result specified
in the endpoint URI.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>beanname</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Allows you to reference an
<code>org.apache.camel.component.spring.ws.bean.CamelEndpointDispatcher</code>
object in order to integrate with existing (legacy) <a shape="rect"
class="external-link"
href="http://static.springsource.org/spring-ws/sites/1.5/reference/html/server.html#server-endpoint-mapping"
rel="nofollow">endpoint mappings</a> like
<code>PayloadRootQNameEndpointMapping</code>,
<code>SoapActionEndpointMapping</code>,
etc</p></td></tr></tbody></table></div></div><p>As a consumer the
<strong>address</strong> should contain a value relevant to the specified
mapping-type (e.g. a SOAP action, XPath expression). As a producer the address
should be set to the URI of the web service your calling upon.</p><p>You can
append query <strong>options</strong> to the URI in the following format,
<code>?option=value&option=value&...</code></p><h3
id="BookComponentAppendix-Options.51">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>Required?</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>soapAction</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1
" rowspan="1" class="confluenceTd"><p>SOAP action to include inside a SOAP
request when accessing remote web services</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>wsAddressingAction</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>WS-Addressing 1.0 action header to include
when accessing web services. The <code>To</code> header is set to the
<em>address</em> of the web service as specified in the endpoint URI (default
Spring-WS behavior).</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">outputAction</td><td colspan="1" rowspan="1"
class="confluenceTd">No</td><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color: rgb(0,0,0);">Signifies the value
for the response WS-Addressing Action<span style="color:
rgb(119,183,103);"> </span>header that is provided by the
method.</span> </p></td></tr><tr><td colspan="1" rowspan="1" class="conflu
enceTd">faultAction</td><td colspan="1" rowspan="1"
class="confluenceTd">No</td><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color: rgb(0,0,0);"><span
style="line-height: 1.42857;">Signifies the value for the faultAction response
WS-Addressing</span><span style="line-height: 1.42857;"><span style="color:
rgb(119,183,103);"> </span></span><span style="line-height:
1.42857;">Fault Action</span><span style="line-height:
1.42857;"> </span><span style="line-height: 1.42857;">header that is
provided by the method.</span></span></p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd">faultTo</td><td colspan="1" rowspan="1"
class="confluenceTd"><span>No</span></td><td colspan="1" rowspan="1"
class="confluenceTd"><span style="color: rgb(0,0,0);">Signifies the value for
the faultAction response WS-Addressing FaultTo header that is provided by the
method.</span></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">replyTo</td><td colspan="1" row
span="1" class="confluenceTd"><span>No</span></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color: rgb(0,0,0);">Signifies the value
for the replyTo response WS-Addressing<span style="color:
rgb(119,183,103);"> </span>ReplyTo header that is provided by the
method.</span></p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>expression</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Only when <em>mapping-type</em> is
<code>xpathresult</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>XPath expression to use in the process of mapping web
service requests, should match the result specified by
<code>xpathresult</code></p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>timeout</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.10:</strong> Sets the socket read
timeout (in milliseconds) wh
ile invoking a webservice using the producer, see <a shape="rect"
class="external-link"
href="http://docs.oracle.com/javase/6/docs/api/java/net/URLConnection.html#setReadTimeout(int)"
rel="nofollow">URLConnection.setReadTimeout()</a> and <a shape="rect"
class="external-link"
href="http://static.springsource.org/spring-ws/site/apidocs/org/springframework/ws/transport/http/CommonsHttpMessageSender.html#setReadTimeout(int)"
rel="nofollow">CommonsHttpMessageSender.setReadTimeout()</a>.  This
option works when using the built-in message sender
implementations: <em>CommonsHttpMessageSender</em> and <em>HttpUrlConnectionMessageSender</em>.
 One of these implementations will be used by default for HTTP based
services unless you customize the Spring WS configuration options supplied to
the component.  If you are using a non-standard sender, it is assumed that
you will handle your own timeout configuration.<br clear="none"
class="atl-forced-newline"> <strong>Came
l 2.12:</strong> The built-in message
sender <em>HttpComponentsMessageSender</em> is considered
<strong>instead of</strong> <em>CommonsHttpMessageSender</em> which
has been deprecated, see <a shape="rect" class="external-link"
href="http://static.springsource.org/spring-ws/site/apidocs/org/springframework/ws/transport/http/HttpComponentsMessageSender.html#setReadTimeout(int)"
rel="nofollow">HttpComponentsMessageSender.setReadTimeout()</a>.</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>sslContextParameters</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> Reference
to an <code>org.apache.camel.util.jsse.SSLContextParameters</code>
in the <a shape="rect" class="external-link"
href="http://camel.apache.org/registry.html">Registry</a>.  See <a
shape="rect" class="external-link" href="http://camel.
apache.org/http4.html#HTTP4-UsingtheJSSEConfigurationUtility">Using the JSSE
Configuration Utility</a>.  This option works when using the built-in
message sender
implementations: <em>CommonsHttpMessageSender</em> and <em>HttpUrlConnectionMessageSender</em>.
 One of these implementations will be used by default for HTTP based
services unless you customize the Spring WS configuration options supplied to
the component.  If you are using a non-standard sender, it is assumed that
you will handle your own TLS configuration.<br clear="none"
class="atl-forced-newline"> <strong>Camel 2.12:</strong> The built-in
message sender <em>HttpComponentsMessageSender</em> is considered
<strong>instead of</strong> <em>CommonsHttpMessageSender</em> which
has been deprecated.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>webServiceTemplate</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>No</p></td><td c
olspan="1" rowspan="1" class="confluenceTd"><p>Option to provide a custom <a
shape="rect" class="external-link"
href="http://static.springsource.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/client/core/WebServiceTemplate.html"
rel="nofollow">WebServiceTemplate</a>. This allows for full control over
client-side web services handling; like adding a custom interceptor or
specifying a fault resolver, message sender or message
factory.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>messageSender</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Option to provide a custom <a shape="rect"
class="external-link"
href="http://static.springsource.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/transport/WebServiceMessageSender.html"
rel="nofollow">WebServiceMessageSender</a>. For example to perform
authentication or use alternative transports</p></td></tr><tr><td colspan
="1" rowspan="1"
class="confluenceTd"><p><code>messageFactory</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Option to provide a custom <a shape="rect"
class="external-link"
href="http://static.springsource.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/WebServiceMessageFactory.html"
rel="nofollow">WebServiceMessageFactory</a>. For example when you want Apache
Axiom to handle web service messages instead of SAAJ</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>endpointMapping</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Only when <em>mapping-type</em> is
<code>rootqname</code>, <code>soapaction</code>, <code>uri</code> or
<code>xpathresult</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Reference to an instance of <code><a shape="rect"
class="external-link" href="http://org.apache.camel.component.spring.ws"
rel="nofollow">org.a
pache.camel.component.spring.ws</a>.bean.CamelEndpointMapping</code> in the
Registry/ApplicationContext. Only one bean is required in the registry to serve
all Camel/Spring-WS endpoints. This bean is auto-discovered by the <a
shape="rect" class="external-link"
href="http://static.springsource.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/server/MessageDispatcher.html"
rel="nofollow">MessageDispatcher</a> and used to map requests to Camel
endpoints based on characteristics specified on the endpoint (like root QName,
SOAP action, etc)</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">endpointDispatcher</td><td colspan="1" rowspan="1"
class="confluenceTd">No</td><td colspan="1" rowspan="1"
class="confluenceTd"> Spring {@link <a shape="rect" class="external-link"
href="http://org.springframework.ws"
rel="nofollow">org.springframework.ws</a>.server.endpoint.MessageEndpoint} for
dispatching messages received by Spring-WS to a Camel endpoint, to integrate
with
existing (legacy) endpoint mappings like PayloadRootQNameEndpointMapping,
SoapActionEndpointMapping, etc.</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>messageFilter</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.10.3</strong> Option to provide a
custom MessageFilter. For example when you want to process your headers or
attachments by your own.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">messageIdStrategy</td><td colspan="1" rowspan="1"
class="confluenceTd">No</td><td colspan="1" rowspan="1" class="confluenceTd">A
custom MessageIdStrategy to control generation of unique message
ids</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><span>webServiceEndpointUri</span></td><td colspan="1"
rowspan="1" class="confluenceTd">No</td><td colspan="1" rowspan="1"
class="confluenceTd">The default Web Service endpoint uri to use for the pro
ducer</td></tr></tbody></table></div></div><h4
id="BookComponentAppendix-Messageheaders">Message headers</h4><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>Description</p></th></tr><tr><td colspan="1"
rowspan="1"
class="confluenceTd"><p><code>CamelSpringWebserviceEndpointUri</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>URI of the web service your accessing as a
client, overrides <em>address</em> part of the endpoint
URI</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>CamelSpringWebserviceSoapAction</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Header t
o specify the SOAP action of the message, overrides <code>soapAction</code>
option if present</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color:
rgb(0,0,0);">CamelSpringWebserviceSoapHeader</span></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><span>Source</span></td><td colspan="1"
rowspan="1" class="confluenceTd"><strong>Camel 2.11.1:</strong><span> Use this
header to specify/access the SOAP headers of the
message.</span></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>CamelSpringWebserviceAddressingAction</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>URI</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Use this header to specify the
WS-Addressing action of the message, overrides <code>wsAddressingAction</code>
option if present</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color:
rgb(0,0,0);">CamelSpringWebserviceAddressingFaultTo</span></p></
td><td colspan="1" rowspan="1" class="confluenceTd">URI</td><td colspan="1"
rowspan="1" class="confluenceTd"><span>Use this header to specify the
</span> <span style="color: rgb(0,0,0);">WS-Addressing FaultTo <span>,
overrides faultTo option if present</span></span></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><span style="color:
rgb(0,0,0);">CamelSpringWebserviceAddressingReplyTo</span></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><span>URI</span></td><td
colspan="1" rowspan="1" class="confluenceTd"><span>Use this header to specify
the </span><span> </span><span style="color: rgb(0,0,0);">WS-Addressing
ReplyTo , overrides replyTo option if present</span></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><span style="color:
rgb(0,0,0);">CamelSpringWebserviceAddressingOutputAction</span></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><span>URI</span></td><td
colspan="1" rowspan="1" class="confluenceTd"><span style="co
lor: rgb(0,0,0);"><span>Use this header to specify the</span> WS-Addressing
Action<span style="color: rgb(0,0,0);"> , overrides outputAction option if
present</span></span></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color:
rgb(0,0,0);">CamelSpringWebserviceAddressingFaultAction</span></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><span>URI</span></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><span style="color:
rgb(0,0,0);">Use this header to specify the</span><span style="color:
rgb(0,0,0);"> WS-Addressing <span style="color: rgb(0,0,0);">Fault
Action</span></span><span style="color: rgb(0,0,0);"> , overrides faultAction
option if present</span></p></td></tr></tbody></table></div></div><h2
id="BookComponentAppendix-Accessingwebservices">Accessing web
services</h2><p>To call a web service at <code><a shape="rect"
class="external-link" href="http://foo.com/bar"
rel="nofollow">http://foo.com/bar</a></code> simply define a
route:</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("direct:example").to("spring-ws:http://foo.com/bar")
]]></script>
</div></div><p>And sent a message:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">