Modified: websites/production/camel/content/spring-web-services.html
==============================================================================
--- websites/production/camel/content/spring-web-services.html (original)
+++ websites/production/camel/content/spring-web-services.html Thu Feb 20 
08:18:57 2014
@@ -86,173 +86,72 @@
        <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 
id="SpringWebServices-SpringWebServicesComponent">Spring Web Services 
Component</h2>
-
-<p><strong>Available as of Camel 2.6</strong></p>
-
-<p>The <strong>spring-ws:</strong> component allows you to integrate with <a 
shape="rect" class="external-link" 
href="http://static.springsource.org/spring-ws/sites/1.5/"; 
rel="nofollow">Spring Web Services</a>. It offers both <em>client</em>-side 
support, for accessing web services, and <em>server</em>-side support for 
creating your own contract-first web services.</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="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-&lt;dependency&gt;
+<div class="wiki-content maincontent"><h2 
id="SpringWebServices-SpringWebServicesComponent">Spring Web Services 
Component</h2><p><strong>Available as of Camel 2.6</strong></p><p>The 
<strong>spring-ws:</strong> component allows you to integrate with <a 
shape="rect" class="external-link" 
href="http://static.springsource.org/spring-ws/sites/1.5/"; 
rel="nofollow">Spring Web Services</a>. It offers both <em>client</em>-side 
support, for accessing web services, and <em>server</em>-side support for 
creating your own contract-first web services.</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="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
        &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
        &lt;artifactId&gt;camel-spring-ws&lt;/artifactId&gt;
        &lt;version&gt;x.x.x&lt;/version&gt;
        &lt;!-- use the same version as your Camel core version --&gt;
 &lt;/dependency&gt;
 ]]></script>
-</div></div>
-
-    <div class="aui-message hint shadowed information-macro">
+</div></div>    <div class="aui-message hint shadowed information-macro">
                     <p class="title">Dependencies</p>
                             <span class="aui-icon icon-hint">Icon</span>
                 <div class="message-content">
-                            <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>
+                            <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="SpringWebServices-URIformat">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="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-spring-ws:[mapping-type:]address[?options]
+<h3 id="SpringWebServices-URIformat">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="theme: Default; brush: java; gutter: false" 
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></div><p>To expose a web service <strong>mapping-type</strong> needs to 
be set to any of the following:</p><div class="confluenceTableSmall">
 <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>
-
-<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&amp;option=value&amp;...</code></p>
-
-<h3 id="SpringWebServices-Options">Options</h3>
-
-<div class="confluenceTableSmall">
+</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&amp;option=value&amp;...</code></p><h3 
id="SpringWebServices-Options">Options</h3><div class="confluenceTableSmall">
 <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></t
 d></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://stati
 
c.springsource.org/spring-ws/site/apidocs/org/springframework/ws/transport/http/CommonsHttpMessageSender.html#setReadTimeout(int)"
 rel="nofollow">CommonsHttpMessageSender.setReadTimeout()</a>. &#160;This 
option works when using the built-in message sender 
implementations:&#160;<em>CommonsHttpMessageSender</em>&#160;and&#160;<em>HttpUrlConnectionMessageSender</em>.
 &#160;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. &#160;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>&#160;The built-in message 
sender&#160;<em>HttpComponentsMessageSender</em>&#160;is considered 
<strong>instead of</strong>&#160;<em>CommonsHttpMessageSender</em>&#160;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>&#160;Reference to 
an&#160;<code>org.apache.camel.util.jsse.SSLContextParameters</code> 
in&#160;the&#160;<a shape="rect" class="external-link" 
href="http://camel.apache.org/registry.html";>Registry</a>. &#160;See&#160;<a 
shape="rect" class="external-link" h
 
ref="http://camel.apache.org/http4.html#HTTP4-UsingtheJSSEConfigurationUtility";>Using
 the JSSE Configuration Utility</a>. &#160;This option works when using the 
built-in message sender 
implementations:&#160;<em>CommonsHttpMessageSender</em>&#160;and&#160;<em>HttpUrlConnectionMessageSender</em>.
 &#160;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. &#160;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>&#160;The built-in message 
sender&#160;<em>HttpComponentsMessageSender</em>&#160;is considered 
<strong>instead of</strong>&#160;<em>CommonsHttpMessageSender</em>&#160;which 
has been deprecated. </p></td></tr></tbody></table>
-</div>
-
-<h4 id="SpringWebServices-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><h4 id="SpringWebServices-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">
+<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 
colspan="1" rowspan="1" cl
 ass="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://stati
 
c.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 class="confluenceTableSmall">
-<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 
colspan="1" rowspan="1" cl
 ass="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://stati
 
c.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> Option to provide a custom MessageFilter since 2.10.3. 
For example when you want to process your headers or attachments by your own. 
</p></td></tr></tbody></table>
-
-</div>
-
-<h3 id="SpringWebServices-Messageheaders">Message headers</h3>
-
-<div class="confluenceTableSmall">
+</div><h3 id="SpringWebServices-Messageheaders">Message headers</h3><div 
class="confluenceTableSmall">
 <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="con
 fluenceTd"><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>
-
-<h2 id="SpringWebServices-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="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-from(&quot;direct:example&quot;).to(&quot;spring-ws:http://foo.com/bar&quot;)
+</div><h2 id="SpringWebServices-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="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[from(&quot;direct:example&quot;).to(&quot;spring-ws:http://foo.com/bar&quot;)
 ]]></script>
-</div></div>
-
-<p>And sent a message:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-template.requestBody(&quot;direct:example&quot;, &quot;&lt;foobar 
xmlns=\&quot;http://foo.com\&quot;&gt;&lt;msg&gt;test 
message&lt;/msg&gt;&lt;/foobar&gt;&quot;);
+</div></div><p>And sent a message:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[template.requestBody(&quot;direct:example&quot;,
 &quot;&lt;foobar xmlns=\&quot;http://foo.com\&quot;&gt;&lt;msg&gt;test 
message&lt;/msg&gt;&lt;/foobar&gt;&quot;);
 ]]></script>
-</div></div>
-<p>Remember if it's a SOAP service you're calling you don't have to include 
SOAP tags. Spring-WS will perform the XML-to-SOAP marshaling.</p>
-
-<h3 id="SpringWebServices-SendingSOAPandWS-Addressingactionheaders">Sending 
SOAP and WS-Addressing action headers</h3>
-
-<p>When a remote web service requires a SOAP action or use of the 
WS-Addressing standard you define your route as:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-from(&quot;direct:example&quot;)
+</div></div><p>Remember if it's a SOAP service you're calling you don't have 
to include SOAP tags. Spring-WS will perform the XML-to-SOAP marshaling.</p><h3 
id="SpringWebServices-SendingSOAPandWS-Addressingactionheaders">Sending SOAP 
and WS-Addressing action headers</h3><p>When a remote web service requires a 
SOAP action or use of the WS-Addressing standard you define your route 
as:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[from(&quot;direct:example&quot;)
 
.to(&quot;spring-ws:http://foo.com/bar?soapAction=http://foo.com&amp;wsAddressingAction=http://bar.com&quot;)
 ]]></script>
-</div></div>
-
-<p>Optionally you can override the endpoint options with header values:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-template.requestBodyAndHeader(&quot;direct:example&quot;,
+</div></div><p>Optionally you can override the endpoint options with header 
values:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[template.requestBodyAndHeader(&quot;direct:example&quot;,
 &quot;&lt;foobar xmlns=\&quot;http://foo.com\&quot;&gt;&lt;msg&gt;test 
message&lt;/msg&gt;&lt;/foobar&gt;&quot;,
 SpringWebserviceConstants.SPRING_WS_SOAP_ACTION, &quot;http://baz.com&quot;);
 ]]></script>
-</div></div>
-
-
-<h3 id="SpringWebServices-UsingSOAPheaders">Using SOAP headers</h3>
-<p><strong>Available as of Camel 2.11.1</strong></p>
-
-<p>You can provide the SOAP header(s) as a Camel Message header when sending a 
message to a spring-ws endpoint, for example given the following SOAP header in 
a String</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-String body = ...
+</div></div><h3 id="SpringWebServices-UsingSOAPheaders">Using SOAP 
headers</h3><p><strong>Available as of Camel 2.11.1</strong></p><p>You can 
provide the SOAP header(s) as a Camel Message header when sending a message to 
a spring-ws endpoint, for example given the following SOAP header in a 
String</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[String body = ...
 String soapHeader = &quot;&lt;h:Header 
xmlns:h=\&quot;http://www.webserviceX.NET/\&quot;&gt;&lt;h:MessageID&gt;1234567890&lt;/h:MessageID&gt;&lt;h:Nested&gt;&lt;h:NestedID&gt;1111&lt;/h:NestedID&gt;&lt;/h:Nested&gt;&lt;/h:Header&gt;&quot;;
 ]]></script>
-</div></div>
-
-<p>We can set the body and header on the Camel Message as follows:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-exchange.getIn().setBody(body);
+</div></div><p>We can set the body and header on the Camel Message as 
follows:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[exchange.getIn().setBody(body);
 exchange.getIn().setHeader(SpringWebserviceConstants.SPRING_WS_SOAP_HEADER, 
soapHeader);
 ]]></script>
-</div></div>
-
-<p>And then send the Exchange to a <code>spring-ws</code> endpoint to call the 
Web Service.</p>
-
-<p>Likewise the spring-ws consumer will also enrich the Camel Message with the 
SOAP header.</p>
-
-<p>For an example see this <a shape="rect" class="external-link" 
href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/SoapHeaderTest.java";>unit
 test</a>.</p>
-
-
-<h3 id="SpringWebServices-Theheaderandattachmentpropagation">The header and 
attachment propagation</h3>
-<p>Spring WS Camel supports propagation of the headers and attachments into 
Spring-WS WebServiceMessage response since version <strong>2.10.3</strong>.<br 
clear="none">
-The endpoint will use so called "hook" the MessageFilter (default 
implementation is provided by BasicMessageFilter) to propagate the exchange 
headers and attachments into WebSdrviceMessage response.<br clear="none">
-Now you can use </p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-exchange.getOut().getHeaders().put(&quot;myCustom&quot;,&quot;myHeaderValue&quot;)
+</div></div><p>And then send the Exchange to a <code>spring-ws</code> endpoint 
to call the Web Service.</p><p>Likewise the spring-ws consumer will also enrich 
the Camel Message with the SOAP header.</p><p>For an example see this <a 
shape="rect" class="external-link" 
href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/SoapHeaderTest.java";>unit
 test</a>.</p><h3 id="SpringWebServices-Theheaderandattachmentpropagation">The 
header and attachment propagation</h3><p>Spring WS Camel supports propagation 
of the headers and attachments into Spring-WS WebServiceMessage response since 
version <strong>2.10.3</strong>.&#160;The endpoint will use so called "hook" 
the MessageFilter (default implementation is provided by BasicMessageFilter) to 
propagate the exchange headers and attachments into WebServiceMessage 
response.&#160;Now you can use</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent 
 panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[exchange.getOut().getHeaders().put(&quot;myCustom&quot;,&quot;myHeaderValue&quot;)
 exchange.getIn().addAttachment(&quot;myAttachment&quot;, new DataHandler(...))
 ]]></script>
-</div></div>
-<p>Note: If the exchange header in the pipeline contains text, it generates 
Qname(key)=value attribute in the soap header. <br clear="none">
-Recommended is to create a QName class directly and put into any key into 
header.</p>
-
-<h3 id="SpringWebServices-HowtouseMTOMattachments">How to use MTOM 
attachments</h3>
-<p>The BasicMessageFilter provides all required information for Apache Axiom 
in order to produce MTOM message. If you want to use Apache Camel Spring WS 
within Apache Axiom, here is an example:<br clear="none">
-1. Simply define the messageFactory as is bellow and spring-ws will use MTOM 
strategy to populate your SOAP message with optimized attachments.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-&lt;bean id=&quot;axiomMessageFactory&quot;
+</div></div><p>Note: If the exchange header in the pipeline contains text, it 
generates Qname(key)=value attribute in the soap header. Recommended is to 
create a QName class directly and put into any key into header.</p><h3 
id="SpringWebServices-HowtouseMTOMattachments">How to use MTOM 
attachments</h3><p>The BasicMessageFilter provides all required information for 
Apache Axiom in order to produce MTOM message. If you want to use Apache Camel 
Spring WS within Apache Axiom, here is an example:<br clear="none"> 1. Simply 
define the messageFactory as is bellow and Spring-WS will use MTOM strategy to 
populate your SOAP message with optimized attachments.</p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;bean id=&quot;axiomMessageFactory&quot;
 class=&quot;org.springframework.ws.soap.axiom.AxiomSoapMessageFactory&quot;&gt;
 &lt;property name=&quot;payloadCaching&quot; value=&quot;false&quot; /&gt;
 &lt;property name=&quot;attachmentCaching&quot; value=&quot;true&quot; /&gt;
 &lt;property name=&quot;attachmentCacheThreshold&quot; value=&quot;1024&quot; 
/&gt;
 &lt;/bean&gt;
 ]]></script>
-</div></div>
-
-<p>2. Add into your pom.xml the following dependencies</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-&lt;dependency&gt;
+</div></div><p>2. Add into your pom.xml the following dependencies</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
 &lt;groupId&gt;org.apache.ws.commons.axiom&lt;/groupId&gt;
 &lt;artifactId&gt;axiom-api&lt;/artifactId&gt;
 &lt;version&gt;1.2.13&lt;/version&gt;
@@ -264,67 +163,36 @@ class=&quot;org.springframework.ws.soap.
 &lt;scope&gt;runtime&lt;/scope&gt;
 &lt;/dependency&gt;
 ]]></script>
-</div></div>
-<p>3. Add your attachment into the pipeline, for example using a Processor 
implementation.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-private class Attachement implements Processor {
+</div></div><p>3. Add your attachment into the pipeline, for example using a 
Processor implementation.</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[private class Attachement implements 
Processor {
 public void process(Exchange exchange) throws Exception
 { exchange.getOut().copyFrom(exchange.getIn()); File file = new 
File(&quot;testAttachment.txt&quot;); 
exchange.getOut().addAttachment(&quot;test&quot;, new DataHandler(new 
FileDataSource(file)));     }
 }
 ]]></script>
-</div></div>
-<p>4. Define endpoint (producer) as ussual, for example like this:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-from(&quot;direct:send&quot;)
+</div></div><p>4. Define endpoint (producer) as ussual, for example like 
this:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[from(&quot;direct:send&quot;)
 .process(new Attachement())
 
.to(&quot;spring-ws:http://localhost:8089/mySoapService?soapAction=mySoap&amp;messageFactory=axiomMessageFactory&quot;);
 ]]></script>
-</div></div>
-<p>5. Now, your producer will generate MTOM message with otpmized 
attachments.</p>
-
-<h3 id="SpringWebServices-Thecustomheaderandattachmentfiltering">The custom 
header and attachment filtering</h3>
-<p>If you need to provide your custome processing of either headers or 
attachments, extend existing BasicMessageFilter and override the approchiate 
methods or write a brand new implementation of the MessageFilter interface.<br 
clear="none">
-To use your custom filter, add this into your spring context:<br clear="none">
-You can specify either a global a or a local message filter as follows:<br 
clear="none">
-a) the global custome filter that provides the global configuration for all 
spring-ws endpoints</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>5. Now, your producer will generate MTOM message with otpmized 
attachments.</p><h3 
id="SpringWebServices-Thecustomheaderandattachmentfiltering">The custom header 
and attachment filtering</h3><p>If you need to provide your custom processing 
of either headers or attachments, extend existing BasicMessageFilter and 
override the appropriate methods or write a brand new implementation of the 
MessageFilter interface.<br clear="none"> To use your custom filter, add this 
into your spring context:</p><p>You can specify either a global a or a local 
message filter as follows:<br clear="none"> a) the global custom filter that 
provides the global configuration for all Spring-WS endpoints</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[ 
 &lt;bean id=&quot;messageFilter&quot; 
class=&quot;your.domain.myMessageFiler&quot; scope=&quot;singleton&quot; /&gt;
 ]]></script>
-</div></div>
-<p>or<br clear="none">
-b) the local messageFilter directly on the endpoint as follows:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-to(&quot;spring-ws:http://yourdomain.com?messageFilter=#myEndpointSpecificMessageFilter&quot;);
-]]></script>
-</div></div>
-<p>For more information see <a shape="rect" class="external-link" 
href="https://issues.apache.org/jira/browse/CAMEL-5724";>CAMEL-5724</a></p>
-
-<p>If you want to create your own MessageFilter, consider overrideing the 
following methods in the default implementation of MessageFilter in class 
BasicMessageFilter:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-protected void doProcessSoapHeader(Message inOrOut, SoapMessage soapMessage)
+</div></div><p>or<br clear="none"> b) the local messageFilter directly on the 
endpoint as follows:</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[to(&quot;spring-ws:http://yourdomain.com?messageFilter=#myEndpointSpecificMessageFilter&quot;);
+]]></script>
+</div></div><p>For more information see <a shape="rect" class="external-link" 
href="https://issues.apache.org/jira/browse/CAMEL-5724";>CAMEL-5724</a></p><p>If 
you want to create your own MessageFilter, consider overriding the following 
methods in the default implementation of MessageFilter in class 
BasicMessageFilter:</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[protected void doProcessSoapHeader(Message 
inOrOut, SoapMessage soapMessage)
 {your code /*no need to call super*/ }
+
 protected void doProcessSoapAttachements(Message inOrOut, SoapMessage response)
 { your code /*no need to call super*/ }
 ]]></script>
-</div></div>
-
-<h3 id="SpringWebServices-UsingacustomMessageSenderandMessageFactory">Using a 
custom MessageSender and MessageFactory</h3>
-
-<p>A custom message sender or factory in the registry can be referenced like 
this:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-from(&quot;direct:example&quot;)
+</div></div><h3 
id="SpringWebServices-UsingacustomMessageSenderandMessageFactory">Using a 
custom MessageSender and MessageFactory</h3><p>A custom message sender or 
factory in the registry can be referenced like this:</p><div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[from(&quot;direct:example&quot;)
 
.to(&quot;spring-ws:http://foo.com/bar?messageFactory=#messageFactory&amp;messageSender=#messageSender&quot;)
 ]]></script>
-</div></div>
-
-<p>Spring configuration:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>Spring configuration:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;!-- authenticate using HTTP Basic 
Authentication --&gt;
 &lt;bean id=&quot;messageSender&quot; 
class=&quot;org.springframework.ws.transport.http.HttpComponentsMessageSender&quot;&gt;
        &lt;property name=&quot;credentials&quot;&gt;
@@ -342,16 +210,7 @@ from(&quot;direct:example&quot;)
        &lt;/property&gt;
 &lt;/bean&gt;
 ]]></script>
-</div></div>
-
-<h2 id="SpringWebServices-Exposingwebservices">Exposing web services</h2>
-
-<p>In order to expose a web service using this component you first need to 
set-up a <a shape="rect" class="external-link" 
href="http://static.springsource.org/spring-ws/sites/1.5/reference/html/server.html";
 rel="nofollow">MessageDispatcher</a> to look for endpoint mappings in a Spring 
XML file. If you plan on running inside a servlet container you probably want 
to use a <code>MessageDispatcherServlet</code> configured in 
<code>web.xml</code>.</p>
-
-<p>By default the <code>MessageDispatcherServlet</code> will look for a Spring 
XML named <code>/WEB-INF/spring-ws-servlet.xml</code>. To use Camel with 
Spring-WS the only mandatory bean in that XML file is 
<code>CamelEndpointMapping</code>. This bean allows the 
<code>MessageDispatcher</code> to dispatch web service requests to your 
routes.</p>
-
-<p><em>web.xml</em></p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><h2 id="SpringWebServices-Exposingwebservices">Exposing web 
services</h2><p>In order to expose a web service using this component you first 
need to set-up a <a shape="rect" class="external-link" 
href="http://static.springsource.org/spring-ws/sites/1.5/reference/html/server.html";
 rel="nofollow">MessageDispatcher</a> to look for endpoint mappings in a Spring 
XML file. If you plan on running inside a servlet container you probably want 
to use a <code>MessageDispatcherServlet</code> configured in 
<code>web.xml</code>.</p><p>By default the 
<code>MessageDispatcherServlet</code> will look for a Spring XML named 
<code>/WEB-INF/spring-ws-servlet.xml</code>. To use Camel with Spring-WS the 
only mandatory bean in that XML file is <code>CamelEndpointMapping</code>. This 
bean allows the <code>MessageDispatcher</code> to dispatch web service requests 
to your routes.</p><p><em>web.xml</em></p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pd
 l">
 <script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;web-app&gt;
     &lt;servlet&gt;
         &lt;servlet-name&gt;spring-ws&lt;/servlet-name&gt;
@@ -364,10 +223,7 @@ from(&quot;direct:example&quot;)
     &lt;/servlet-mapping&gt;
 &lt;/web-app&gt;
 ]]></script>
-</div></div>
-
-<p><em>spring-ws-servlet.xml</em></p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p><em>spring-ws-servlet.xml</em></p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;bean id=&quot;endpointMapping&quot; 
class=&quot;org.apache.camel.component.spring.ws.bean.CamelEndpointMapping&quot;
 /&gt;
 
 &lt;bean id=&quot;wsdl&quot; 
class=&quot;org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition&quot;&gt;
@@ -381,62 +237,30 @@ from(&quot;direct:example&quot;)
        &lt;property name=&quot;targetNamespace&quot; 
value=&quot;http://example.com/&quot;/&gt;
 &lt;/bean&gt;
 ]]></script>
-</div></div>
-
-<p>More information on setting up Spring-WS can be found in <a shape="rect" 
class="external-link" 
href="http://static.springsource.org/spring-ws/sites/1.5/reference/html/tutorial.html";
 rel="nofollow">Writing Contract-First Web Services</a>. Basically paragraph 
3.6 "Implementing the Endpoint" is handled by this component (specifically 
paragraph 3.6.2 "Routing the Message to the Endpoint" is where 
<code>CamelEndpointMapping</code> comes in). Also don't forget to check out the 
<a shape="rect" href="spring-ws-example.html">Spring Web Services Example</a> 
included in the Camel distribution.</p>
-
-<h3 id="SpringWebServices-Endpointmappinginroutes">Endpoint mapping in 
routes</h3>
-
-<p>With the XML configuration in-place you can now use Camel's DSL to define 
what web service requests are handled by your endpoint:</p>
-
-<p>The following route will receive all web service requests that have a root 
element named "GetFoo" within the <code><a shape="rect" class="external-link" 
href="http://example.com/"; rel="nofollow">http://example.com/</a></code> 
namespace.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-from(&quot;spring-ws:rootqname:{http://example.com/}GetFoo?endpointMapping=#endpointMapping&quot;)
+</div></div><p>More information on setting up Spring-WS can be found in <a 
shape="rect" class="external-link" 
href="http://static.springsource.org/spring-ws/sites/1.5/reference/html/tutorial.html";
 rel="nofollow">Writing Contract-First Web Services</a>. Basically paragraph 
3.6 "Implementing the Endpoint" is handled by this component (specifically 
paragraph 3.6.2 "Routing the Message to the Endpoint" is where 
<code>CamelEndpointMapping</code> comes in). Also don't forget to check out the 
<a shape="rect" href="spring-ws-example.html">Spring Web Services Example</a> 
included in the Camel distribution.</p><h3 
id="SpringWebServices-Endpointmappinginroutes">Endpoint mapping in 
routes</h3><p>With the XML configuration in-place you can now use Camel's DSL 
to define what web service requests are handled by your endpoint:</p><p>The 
following route will receive all web service requests that have a root element 
named "GetFoo" within the <code><a shape="rect" class="external-link" 
href="http://ex
 ample.com/" rel="nofollow">http://example.com/</a></code> namespace.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[from(&quot;spring-ws:rootqname:{http://example.com/}GetFoo?endpointMapping=#endpointMapping&quot;)
 .convertBodyTo(String.class).to(mock:example)
 ]]></script>
-</div></div>
-
-<p>The following route will receive web service requests containing the 
<code><a shape="rect" class="external-link" href="http://example.com/GetFoo"; 
rel="nofollow">http://example.com/GetFoo</a></code> SOAP action.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-from(&quot;spring-ws:soapaction:http://example.com/GetFoo?endpointMapping=#endpointMapping&quot;)
+</div></div><p>The following route will receive web service requests 
containing the <code><a shape="rect" class="external-link" 
href="http://example.com/GetFoo"; 
rel="nofollow">http://example.com/GetFoo</a></code> SOAP action.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[from(&quot;spring-ws:soapaction:http://example.com/GetFoo?endpointMapping=#endpointMapping&quot;)
 .convertBodyTo(String.class).to(mock:example)
 ]]></script>
-</div></div>
-
-<p>The following route will receive all requests sent to <code><a shape="rect" 
class="external-link" href="http://example.com/foobar"; 
rel="nofollow">http://example.com/foobar</a></code>.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-from(&quot;spring-ws:uri:http://example.com/foobar?endpointMapping=#endpointMapping&quot;)
+</div></div><p>The following route will receive all requests sent to <code><a 
shape="rect" class="external-link" href="http://example.com/foobar"; 
rel="nofollow">http://example.com/foobar</a></code>.</p><div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[from(&quot;spring-ws:uri:http://example.com/foobar?endpointMapping=#endpointMapping&quot;)
 .convertBodyTo(String.class).to(mock:example)
 ]]></script>
-</div></div>
-
-<p>The route below will receive requests that contain the element 
<code>&lt;foobar&gt;abc&lt;/foobar&gt;</code> anywhere inside the message (and 
the default namespace).</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-from(&quot;spring-ws:xpathresult:abc?expression=//foobar&amp;endpointMapping=#endpointMapping&quot;)
+</div></div><p>The route below will receive requests that contain the element 
<code>&lt;foobar&gt;abc&lt;/foobar&gt;</code> anywhere inside the message (and 
the default namespace).</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[from(&quot;spring-ws:xpathresult:abc?expression=//foobar&amp;endpointMapping=#endpointMapping&quot;)
 .convertBodyTo(String.class).to(mock:example)
 ]]></script>
-</div></div>
-
-<h3 
id="SpringWebServices-Alternativeconfiguration,usingexistingendpointmappings">Alternative
 configuration, using existing endpoint mappings</h3>
-
-<p>For every endpoint with mapping-type <code>beanname</code> one bean of type 
<code>CamelEndpointDispatcher</code> with a corresponding name is required in 
the Registry/ApplicationContext. This bean acts as a bridge between the Camel 
endpoint and an existing <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 mapping</a> like 
<code>PayloadRootQNameEndpointMapping</code>.</p>
-
-    <div class="aui-message warning shadowed information-macro">
+</div></div><h3 
id="SpringWebServices-Alternativeconfiguration,usingexistingendpointmappings">Alternative
 configuration, using existing endpoint mappings</h3><p>For every endpoint with 
mapping-type <code>beanname</code> one bean of type 
<code>CamelEndpointDispatcher</code> with a corresponding name is required in 
the Registry/ApplicationContext. This bean acts as a bridge between the Camel 
endpoint and an existing <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 mapping</a> like 
<code>PayloadRootQNameEndpointMapping</code>.</p>    <div class="aui-message 
warning shadowed information-macro">
                             <span class="aui-icon icon-warning">Icon</span>
                 <div class="message-content">
                             <p>The use of the <code>beanname</code> 
mapping-type is primarily meant for (legacy) situations where you're already 
using Spring-WS and have endpoint mappings defined in a Spring XML file. The 
<code>beanname</code> mapping-type allows you to wire your Camel route into an 
existing endpoint mapping. When you're starting from scratch it's recommended 
to define your endpoint mappings as Camel URI's (as illustrated above with 
<code>endpointMapping</code>) since it requires less configuration and is more 
expressive. Alternatively you could use vanilla Spring-WS with the help of 
annotations.</p>
                     </div>
     </div>
-
-
-<p>An example of a route using <code>beanname</code>:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-&lt;camelContext xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
+<p>An example of a route using <code>beanname</code>:</p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;camelContext 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
        &lt;route&gt;
                &lt;from 
uri=&quot;spring-ws:beanname:QuoteEndpointDispatcher&quot; /&gt;
                &lt;to uri=&quot;mock:example&quot; /&gt;
@@ -455,31 +279,17 @@ from(&quot;spring-ws:xpathresult:abc?exp
 &lt;bean id=&quot;QuoteEndpointDispatcher&quot; 
class=&quot;org.apache.camel.component.spring.ws.bean.CamelEndpointDispatcher&quot;
 /&gt;
 &lt;bean id=&quot;FutureEndpointDispatcher&quot; 
class=&quot;org.apache.camel.component.spring.ws.bean.CamelEndpointDispatcher&quot;
 /&gt;
 ]]></script>
-</div></div>
-
-<h2 id="SpringWebServices-POJO(un)marshalling">POJO (un)marshalling</h2>
-
-<p>Camel's <a shape="rect" href="data-format.html">pluggable data formats</a> 
offer support for pojo/xml marshalling using libraries such as JAXB, XStream, 
JibX, Castor and XMLBeans. You can use these data formats in your route to sent 
and receive pojo's, to and from web services.</p>
-
-<p>When <em>accessing</em> web services you can marshal the request and 
unmarshal the response message:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-JaxbDataFormat jaxb = new JaxbDataFormat(false);
+</div></div><h2 id="SpringWebServices-POJO(un)marshalling">POJO 
(un)marshalling</h2><p>Camel's <a shape="rect" 
href="data-format.html">pluggable data formats</a> offer support for pojo/xml 
marshalling using libraries such as JAXB, XStream, JibX, Castor and XMLBeans. 
You can use these data formats in your route to sent and receive pojo's, to and 
from web services.</p><p>When <em>accessing</em> web services you can marshal 
the request and unmarshal the response message:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[JaxbDataFormat jaxb = new 
JaxbDataFormat(false);
 jaxb.setContextPath(&quot;com.example.model&quot;);
 
 
from(&quot;direct:example&quot;).marshal(jaxb).to(&quot;spring-ws:http://foo.com/bar&quot;).unmarshal(jaxb);
 ]]></script>
-</div></div>
-
-<p>Similarly when <em>providing</em> web services, you can unmarshal XML 
requests to POJO's and marshal the response message back to XML:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-from(&quot;spring-ws:rootqname:{http://example.com/}GetFoo?endpointMapping=#endpointMapping&quot;).unmarshal(jaxb)
+</div></div><p>Similarly when <em>providing</em> web services, you can 
unmarshal XML requests to POJO's and marshal the response message back to 
XML:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[from(&quot;spring-ws:rootqname:{http://example.com/}GetFoo?endpointMapping=#endpointMapping&quot;).unmarshal(jaxb)
 .to(&quot;mock:example&quot;).marshal(jaxb);
 ]]></script>
-</div></div>
-
-<h3 id="SpringWebServices-SeeAlso">See Also</h3>
+</div></div><p></p><h3 id="SpringWebServices-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></div>
         </td>
         <td valign="top">


Reply via email to