You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2012/12/22 10:24:57 UTC

svn commit: r843468 - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache spring-web-services.html

Author: buildbot
Date: Sat Dec 22 09:24:57 2012
New Revision: 843468

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/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 Sat Dec 22 09:24:57 2012
@@ -15667,7 +15667,8 @@ spring-integration:defaultChannelName[?o
 <p>Maven users will need to add the following dependency to their <tt>pom.xml</tt> for this component:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml"><span class="code-tag">&lt;dependency&gt;</span>
+<pre class="code-xml">
+<span class="code-tag">&lt;dependency&gt;</span>
 	<span class="code-tag">&lt;groupId&gt;</span>org.apache.camel<span class="code-tag">&lt;/groupId&gt;</span>
 	<span class="code-tag">&lt;artifactId&gt;</span>camel-spring-ws<span class="code-tag">&lt;/artifactId&gt;</span>
 	<span class="code-tag">&lt;version&gt;</span>x.x.x<span class="code-tag">&lt;/version&gt;</span>
@@ -15685,7 +15686,8 @@ spring-integration:defaultChannelName[?o
 <p>The URI scheme for this component is as follows</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">spring-ws:[mapping-type:]address[?options]
+<pre class="code-java">
+spring-ws:[mapping-type:]address[?options]
 </pre>
 </div></div>
 
@@ -15712,8 +15714,9 @@ spring-integration:defaultChannelName[?o
 <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"> Name </th><th colspan="1" rowspan="1" class="confluenceTh"> Required? </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>webServiceTemplate</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> 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. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>messageSender</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td co
 lspan="1" rowspan="1" class="confluenceTd"> 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 </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>messageFactory</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> 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 </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>transformerFactory</tt> </td><td colspan="1" rowspan="1"
  class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> Option to override default TransformerFactory. The provided transformer factory must be of type <tt>javax.xml.transform.TransformerFactory</tt> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endpointMapping</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Only when <em>mapping-type</em> is <tt>rootqname</tt>, <tt>soapaction</tt>, <tt>uri</tt> or <tt>xpathresult</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Reference to an instance of <tt>org.apache.camel.component.spring.ws.bean.CamelEndpointMapping</tt> 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) </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh"> Required? </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>webServiceTemplate</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> 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. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>messageSender</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td co
 lspan="1" rowspan="1" class="confluenceTd"> 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 </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>messageFactory</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> 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 </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>transformerFactory</tt> </td><td colspan="1" rowspan="1"
  class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> Option to override default TransformerFactory. The provided transformer factory must be of type <tt>javax.xml.transform.TransformerFactory</tt> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endpointMapping</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Only when <em>mapping-type</em> is <tt>rootqname</tt>, <tt>soapaction</tt>, <tt>uri</tt> or <tt>xpathresult</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Reference to an instance of <tt>org.apache.camel.component.spring.ws.bean.CamelEndpointMapping</tt> 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) </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>messageFilter</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> Option to provide a custom MessageFilter since 2.10.3. For example when you want to process your headers or attachments by your own. </td></tr></tbody></table>
 </div>
+
 </div>
 
 <h3><a shape="rect" name="BookComponentAppendix-Messageheaders"></a>Message headers</h3>
@@ -15727,13 +15730,15 @@ spring-integration:defaultChannelName[?o
 
 <p>To call a web service at <tt><a shape="rect" class="external-link" href="http://foo.com/bar" rel="nofollow">http://foo.com/bar</a></tt> simply define a route:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"direct:example"</span>).to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//foo.com/bar"</span>)</span>
+<pre class="code-java">
+from(<span class="code-quote">"direct:example"</span>).to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//foo.com/bar"</span>)</span>
 </pre>
 </div></div>
 
 <p>And sent a message:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">template.requestBody(<span class="code-quote">"direct:example"</span>, <span class="code-quote">"&lt;foobar xmlns=\"</span>http:<span class="code-comment">//foo.com\<span class="code-quote">"&gt;&lt;msg&gt;test message&lt;/msg&gt;&lt;/foobar&gt;"</span>);</span>
+<pre class="code-java">
+template.requestBody(<span class="code-quote">"direct:example"</span>, <span class="code-quote">"&lt;foobar xmlns=\"</span>http:<span class="code-comment">//foo.com\<span class="code-quote">"&gt;&lt;msg&gt;test message&lt;/msg&gt;&lt;/foobar&gt;"</span>);</span>
 </pre>
 </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>
@@ -15742,24 +15747,118 @@ spring-integration:defaultChannelName[?o
 
 <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" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"direct:example"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"direct:example"</span>)
 .to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//foo.com/bar?soapAction=http://foo.com&amp;wsAddressingAction=http://bar.com"</span>)</span>
 </pre>
 </div></div>
 
 <p>Optionally you can override the endpoint options with header values:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">template.requestBodyAndHeader(<span class="code-quote">"direct:example"</span>,
+<pre class="code-java">
+template.requestBodyAndHeader(<span class="code-quote">"direct:example"</span>,
 <span class="code-quote">"&lt;foobar xmlns=\"</span>http:<span class="code-comment">//foo.com\<span class="code-quote">"&gt;&lt;msg&gt;test message&lt;/msg&gt;&lt;/foobar&gt;"</span>,
 </span>SpringWebserviceConstants.SPRING_WS_SOAP_ACTION, <span class="code-quote">"http:<span class="code-comment">//baz.com"</span>);</span>
 </pre>
 </div></div>
 
+<h3><a shape="rect" name="BookComponentAppendix-Theheaderandattachmentpropagation"></a>The header and attachment propagation</h3>
+<p>Spring WS Camel supports propagation of the headers and attachments into Spring-WS WebServiceMessage response since version <b>2.10.3</b>.<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" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+exchange.getOut().getHeaders().put(<span class="code-quote">"myCustom"</span>,<span class="code-quote">"myHeaderValue"</span>)
+exchange.getIn().addAttachment(<span class="code-quote">"myAttachment"</span>, <span class="code-keyword">new</span> DataHandler(...))
+</pre>
+</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><a shape="rect" name="BookComponentAppendix-HowtouseMTOMattachments"></a>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" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+&lt;bean id=<span class="code-quote">"axiomMessageFactory"</span>
+class=<span class="code-quote">"org.springframework.ws.soap.axiom.AxiomSoapMessageFactory"</span>&gt;
+&lt;property name=<span class="code-quote">"payloadCaching"</span> value=<span class="code-quote">"<span class="code-keyword">false</span>"</span> /&gt;
+&lt;property name=<span class="code-quote">"attachmentCaching"</span> value=<span class="code-quote">"<span class="code-keyword">true</span>"</span> /&gt;
+&lt;property name=<span class="code-quote">"attachmentCacheThreshold"</span> value=<span class="code-quote">"1024"</span> /&gt;
+&lt;/bean&gt;
+</pre>
+</div></div>
+
+<p>2. Add into your pom.xml the following dependencies</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+&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;
+&lt;/dependency&gt;
+&lt;dependency&gt;
+&lt;groupId&gt;org.apache.ws.commons.axiom&lt;/groupId&gt;
+&lt;artifactId&gt;axiom-impl&lt;/artifactId&gt;
+&lt;version&gt;1.2.13&lt;/version&gt;
+&lt;scope&gt;runtime&lt;/scope&gt;
+&lt;/dependency&gt;
+</pre>
+</div></div>
+<p>3. Add your attachment into the pipeline, for example using a Processor implementation.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+<span class="code-keyword">private</span> class Attachement <span class="code-keyword">implements</span> Processor {
+<span class="code-keyword">public</span> void process(Exchange exchange) <span class="code-keyword">throws</span> Exception
+{ exchange.getOut().copyFrom(exchange.getIn()); File file = <span class="code-keyword">new</span> File(<span class="code-quote">"testAttachment.txt"</span>); exchange.getOut().addAttachment(<span class="code-quote">"test"</span>, <span class="code-keyword">new</span> DataHandler(<span class="code-keyword">new</span> FileDataSource(file)));	 }
+}
+</pre>
+</div></div>
+<p>4. Define endpoint (producer) as ussual, for example like this:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+from(<span class="code-quote">"direct:send"</span>)
+.process(<span class="code-keyword">new</span> Attachement())
+.to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//localhost:8089/mySoapService?soapAction=mySoap&amp;messageFactory=axiomMessageFactory"</span>);</span>
+</pre>
+</div></div>
+<p>5. Now, your producer will generate MTOM message with otpmized attachments.</p>
+
+<h3><a shape="rect" name="BookComponentAppendix-Thecustomheaderandattachmentfiltering"></a>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" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java"> 
+&lt;bean id=<span class="code-quote">"messageFilter"</span> class=<span class="code-quote">"your.domain.myMessageFiler"</span> scope=<span class="code-quote">"singleton"</span> /&gt;
+</pre>
+</div></div>
+<p>or<br clear="none">
+b) the local messageFilter directly on the endpoint as follows:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//yourdomain.com?messageFilter=#myEndpointSpecificMessageFilter"</span>);</span>
+</pre>
+</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" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+<span class="code-keyword">protected</span> void doProcessSoapHeader(Message inOrOut, SoapMessage soapMessage)
+{your code /*no need to call <span class="code-keyword">super</span>*/ }
+<span class="code-keyword">protected</span> void doProcessSoapAttachements(Message inOrOut, SoapMessage response)
+{ your code /*no need to call <span class="code-keyword">super</span>*/ }
+</pre>
+</div></div>
+
 <h3><a shape="rect" name="BookComponentAppendix-UsingacustomMessageSenderandMessageFactory"></a>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" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"direct:example"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"direct:example"</span>)
 .to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//foo.com/bar?messageFactory=#messageFactory&amp;messageSender=#messageSender"</span>)</span>
 </pre>
 </div></div>
@@ -15832,28 +15931,32 @@ spring-integration:defaultChannelName[?o
 
 <p>The following route will receive all web service requests that have a root element named "GetFoo" within the <tt><a shape="rect" class="external-link" href="http://example.com/" rel="nofollow">http://example.com/</a></tt> namespace.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"spring-ws:rootqname:{http:<span class="code-comment">//example.com/}GetFoo?endpointMapping=#endpointMapping"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"spring-ws:rootqname:{http:<span class="code-comment">//example.com/}GetFoo?endpointMapping=#endpointMapping"</span>)
 </span>.convertBodyTo(<span class="code-object">String</span>.class).to(mock:example)
 </pre>
 </div></div>
 
 <p>The following route will receive web service requests containing the <tt><a shape="rect" class="external-link" href="http://example.com/GetFoo" rel="nofollow">http://example.com/GetFoo</a></tt> SOAP action.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"spring-ws:soapaction:http:<span class="code-comment">//example.com/GetFoo?endpointMapping=#endpointMapping"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"spring-ws:soapaction:http:<span class="code-comment">//example.com/GetFoo?endpointMapping=#endpointMapping"</span>)
 </span>.convertBodyTo(<span class="code-object">String</span>.class).to(mock:example)
 </pre>
 </div></div>
 
 <p>The following route will receive all requests sent to <tt><a shape="rect" class="external-link" href="http://example.com/foobar" rel="nofollow">http://example.com/foobar</a></tt>.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"spring-ws:uri:http:<span class="code-comment">//example.com/foobar?endpointMapping=#endpointMapping"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"spring-ws:uri:http:<span class="code-comment">//example.com/foobar?endpointMapping=#endpointMapping"</span>)
 </span>.convertBodyTo(<span class="code-object">String</span>.class).to(mock:example)
 </pre>
 </div></div>
 
 <p>The route below will receive requests that contain the element <tt>&lt;foobar&gt;abc&lt;/foobar&gt;</tt> anywhere inside the message (and the default namespace).</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"spring-ws:xpathresult:abc?expression=<span class="code-comment">//foobar&amp;endpointMapping=#endpointMapping"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"spring-ws:xpathresult:abc?expression=<span class="code-comment">//foobar&amp;endpointMapping=#endpointMapping"</span>)
 </span>.convertBodyTo(<span class="code-object">String</span>.class).to(mock:example)
 </pre>
 </div></div>
@@ -15866,7 +15969,8 @@ spring-integration:defaultChannelName[?o
 
 <p>An example of a route using <tt>beanname</tt>:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">&lt;camelContext xmlns=<span class="code-quote">"http:<span class="code-comment">//camel.apache.org/schema/spring"</span>&gt;
+<pre class="code-java">
+&lt;camelContext xmlns=<span class="code-quote">"http:<span class="code-comment">//camel.apache.org/schema/spring"</span>&gt;
 </span>	&lt;route&gt;
 		&lt;from uri=<span class="code-quote">"spring-ws:beanname:QuoteEndpointDispatcher"</span> /&gt;
 		&lt;to uri=<span class="code-quote">"mock:example"</span> /&gt;
@@ -15893,7 +15997,8 @@ spring-integration:defaultChannelName[?o
 
 <p>When <em>accessing</em> web services you can marshal the request and unmarshal the response message:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">JaxbDataFormat jaxb = <span class="code-keyword">new</span> JaxbDataFormat(<span class="code-keyword">false</span>);
+<pre class="code-java">
+JaxbDataFormat jaxb = <span class="code-keyword">new</span> JaxbDataFormat(<span class="code-keyword">false</span>);
 jaxb.setContextPath(<span class="code-quote">"com.example.model"</span>);
 
 from(<span class="code-quote">"direct:example"</span>).marshal(jaxb).to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//foo.com/bar"</span>).unmarshal(jaxb);</span>
@@ -15902,7 +16007,8 @@ from(<span class="code-quote">"direct:ex
 
 <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" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"spring-ws:rootqname:{http:<span class="code-comment">//example.com/}GetFoo?endpointMapping=#endpointMapping"</span>).unmarshal(jaxb)
+<pre class="code-java">
+from(<span class="code-quote">"spring-ws:rootqname:{http:<span class="code-comment">//example.com/}GetFoo?endpointMapping=#endpointMapping"</span>).unmarshal(jaxb)
 </span>.to(<span class="code-quote">"mock:example"</span>).marshal(jaxb);
 </pre>
 </div></div>

Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Sat Dec 22 09:24:57 2012
@@ -35926,7 +35926,8 @@ spring-integration:defaultChannelName[?o
 <p>Maven users will need to add the following dependency to their <tt>pom.xml</tt> for this component:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml"><span class="code-tag">&lt;dependency&gt;</span>
+<pre class="code-xml">
+<span class="code-tag">&lt;dependency&gt;</span>
 	<span class="code-tag">&lt;groupId&gt;</span>org.apache.camel<span class="code-tag">&lt;/groupId&gt;</span>
 	<span class="code-tag">&lt;artifactId&gt;</span>camel-spring-ws<span class="code-tag">&lt;/artifactId&gt;</span>
 	<span class="code-tag">&lt;version&gt;</span>x.x.x<span class="code-tag">&lt;/version&gt;</span>
@@ -35944,7 +35945,8 @@ spring-integration:defaultChannelName[?o
 <p>The URI scheme for this component is as follows</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">spring-ws:[mapping-type:]address[?options]
+<pre class="code-java">
+spring-ws:[mapping-type:]address[?options]
 </pre>
 </div></div>
 
@@ -35971,8 +35973,9 @@ spring-integration:defaultChannelName[?o
 <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"> Name </th><th colspan="1" rowspan="1" class="confluenceTh"> Required? </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>webServiceTemplate</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> 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. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>messageSender</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td co
 lspan="1" rowspan="1" class="confluenceTd"> 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 </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>messageFactory</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> 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 </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>transformerFactory</tt> </td><td colspan="1" rowspan="1"
  class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> Option to override default TransformerFactory. The provided transformer factory must be of type <tt>javax.xml.transform.TransformerFactory</tt> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endpointMapping</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Only when <em>mapping-type</em> is <tt>rootqname</tt>, <tt>soapaction</tt>, <tt>uri</tt> or <tt>xpathresult</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Reference to an instance of <tt>org.apache.camel.component.spring.ws.bean.CamelEndpointMapping</tt> 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) </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh"> Required? </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>webServiceTemplate</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> 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. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>messageSender</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td co
 lspan="1" rowspan="1" class="confluenceTd"> 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 </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>messageFactory</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> 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 </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>transformerFactory</tt> </td><td colspan="1" rowspan="1"
  class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> Option to override default TransformerFactory. The provided transformer factory must be of type <tt>javax.xml.transform.TransformerFactory</tt> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endpointMapping</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Only when <em>mapping-type</em> is <tt>rootqname</tt>, <tt>soapaction</tt>, <tt>uri</tt> or <tt>xpathresult</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Reference to an instance of <tt>org.apache.camel.component.spring.ws.bean.CamelEndpointMapping</tt> 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) </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>messageFilter</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> Option to provide a custom MessageFilter since 2.10.3. For example when you want to process your headers or attachments by your own. </td></tr></tbody></table>
 </div>
+
 </div>
 
 <h3><a shape="rect" name="BookInOnePage-Messageheaders"></a>Message headers</h3>
@@ -35986,13 +35989,15 @@ spring-integration:defaultChannelName[?o
 
 <p>To call a web service at <tt><a shape="rect" class="external-link" href="http://foo.com/bar" rel="nofollow">http://foo.com/bar</a></tt> simply define a route:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"direct:example"</span>).to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//foo.com/bar"</span>)</span>
+<pre class="code-java">
+from(<span class="code-quote">"direct:example"</span>).to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//foo.com/bar"</span>)</span>
 </pre>
 </div></div>
 
 <p>And sent a message:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">template.requestBody(<span class="code-quote">"direct:example"</span>, <span class="code-quote">"&lt;foobar xmlns=\"</span>http:<span class="code-comment">//foo.com\<span class="code-quote">"&gt;&lt;msg&gt;test message&lt;/msg&gt;&lt;/foobar&gt;"</span>);</span>
+<pre class="code-java">
+template.requestBody(<span class="code-quote">"direct:example"</span>, <span class="code-quote">"&lt;foobar xmlns=\"</span>http:<span class="code-comment">//foo.com\<span class="code-quote">"&gt;&lt;msg&gt;test message&lt;/msg&gt;&lt;/foobar&gt;"</span>);</span>
 </pre>
 </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>
@@ -36001,24 +36006,118 @@ spring-integration:defaultChannelName[?o
 
 <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" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"direct:example"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"direct:example"</span>)
 .to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//foo.com/bar?soapAction=http://foo.com&amp;wsAddressingAction=http://bar.com"</span>)</span>
 </pre>
 </div></div>
 
 <p>Optionally you can override the endpoint options with header values:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">template.requestBodyAndHeader(<span class="code-quote">"direct:example"</span>,
+<pre class="code-java">
+template.requestBodyAndHeader(<span class="code-quote">"direct:example"</span>,
 <span class="code-quote">"&lt;foobar xmlns=\"</span>http:<span class="code-comment">//foo.com\<span class="code-quote">"&gt;&lt;msg&gt;test message&lt;/msg&gt;&lt;/foobar&gt;"</span>,
 </span>SpringWebserviceConstants.SPRING_WS_SOAP_ACTION, <span class="code-quote">"http:<span class="code-comment">//baz.com"</span>);</span>
 </pre>
 </div></div>
 
+<h3><a shape="rect" name="BookInOnePage-Theheaderandattachmentpropagation"></a>The header and attachment propagation</h3>
+<p>Spring WS Camel supports propagation of the headers and attachments into Spring-WS WebServiceMessage response since version <b>2.10.3</b>.<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" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+exchange.getOut().getHeaders().put(<span class="code-quote">"myCustom"</span>,<span class="code-quote">"myHeaderValue"</span>)
+exchange.getIn().addAttachment(<span class="code-quote">"myAttachment"</span>, <span class="code-keyword">new</span> DataHandler(...))
+</pre>
+</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><a shape="rect" name="BookInOnePage-HowtouseMTOMattachments"></a>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" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+&lt;bean id=<span class="code-quote">"axiomMessageFactory"</span>
+class=<span class="code-quote">"org.springframework.ws.soap.axiom.AxiomSoapMessageFactory"</span>&gt;
+&lt;property name=<span class="code-quote">"payloadCaching"</span> value=<span class="code-quote">"<span class="code-keyword">false</span>"</span> /&gt;
+&lt;property name=<span class="code-quote">"attachmentCaching"</span> value=<span class="code-quote">"<span class="code-keyword">true</span>"</span> /&gt;
+&lt;property name=<span class="code-quote">"attachmentCacheThreshold"</span> value=<span class="code-quote">"1024"</span> /&gt;
+&lt;/bean&gt;
+</pre>
+</div></div>
+
+<p>2. Add into your pom.xml the following dependencies</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+&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;
+&lt;/dependency&gt;
+&lt;dependency&gt;
+&lt;groupId&gt;org.apache.ws.commons.axiom&lt;/groupId&gt;
+&lt;artifactId&gt;axiom-impl&lt;/artifactId&gt;
+&lt;version&gt;1.2.13&lt;/version&gt;
+&lt;scope&gt;runtime&lt;/scope&gt;
+&lt;/dependency&gt;
+</pre>
+</div></div>
+<p>3. Add your attachment into the pipeline, for example using a Processor implementation.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+<span class="code-keyword">private</span> class Attachement <span class="code-keyword">implements</span> Processor {
+<span class="code-keyword">public</span> void process(Exchange exchange) <span class="code-keyword">throws</span> Exception
+{ exchange.getOut().copyFrom(exchange.getIn()); File file = <span class="code-keyword">new</span> File(<span class="code-quote">"testAttachment.txt"</span>); exchange.getOut().addAttachment(<span class="code-quote">"test"</span>, <span class="code-keyword">new</span> DataHandler(<span class="code-keyword">new</span> FileDataSource(file)));	 }
+}
+</pre>
+</div></div>
+<p>4. Define endpoint (producer) as ussual, for example like this:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+from(<span class="code-quote">"direct:send"</span>)
+.process(<span class="code-keyword">new</span> Attachement())
+.to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//localhost:8089/mySoapService?soapAction=mySoap&amp;messageFactory=axiomMessageFactory"</span>);</span>
+</pre>
+</div></div>
+<p>5. Now, your producer will generate MTOM message with otpmized attachments.</p>
+
+<h3><a shape="rect" name="BookInOnePage-Thecustomheaderandattachmentfiltering"></a>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" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java"> 
+&lt;bean id=<span class="code-quote">"messageFilter"</span> class=<span class="code-quote">"your.domain.myMessageFiler"</span> scope=<span class="code-quote">"singleton"</span> /&gt;
+</pre>
+</div></div>
+<p>or<br clear="none">
+b) the local messageFilter directly on the endpoint as follows:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//yourdomain.com?messageFilter=#myEndpointSpecificMessageFilter"</span>);</span>
+</pre>
+</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" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+<span class="code-keyword">protected</span> void doProcessSoapHeader(Message inOrOut, SoapMessage soapMessage)
+{your code /*no need to call <span class="code-keyword">super</span>*/ }
+<span class="code-keyword">protected</span> void doProcessSoapAttachements(Message inOrOut, SoapMessage response)
+{ your code /*no need to call <span class="code-keyword">super</span>*/ }
+</pre>
+</div></div>
+
 <h3><a shape="rect" name="BookInOnePage-UsingacustomMessageSenderandMessageFactory"></a>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" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"direct:example"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"direct:example"</span>)
 .to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//foo.com/bar?messageFactory=#messageFactory&amp;messageSender=#messageSender"</span>)</span>
 </pre>
 </div></div>
@@ -36091,28 +36190,32 @@ spring-integration:defaultChannelName[?o
 
 <p>The following route will receive all web service requests that have a root element named "GetFoo" within the <tt><a shape="rect" class="external-link" href="http://example.com/" rel="nofollow">http://example.com/</a></tt> namespace.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"spring-ws:rootqname:{http:<span class="code-comment">//example.com/}GetFoo?endpointMapping=#endpointMapping"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"spring-ws:rootqname:{http:<span class="code-comment">//example.com/}GetFoo?endpointMapping=#endpointMapping"</span>)
 </span>.convertBodyTo(<span class="code-object">String</span>.class).to(mock:example)
 </pre>
 </div></div>
 
 <p>The following route will receive web service requests containing the <tt><a shape="rect" class="external-link" href="http://example.com/GetFoo" rel="nofollow">http://example.com/GetFoo</a></tt> SOAP action.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"spring-ws:soapaction:http:<span class="code-comment">//example.com/GetFoo?endpointMapping=#endpointMapping"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"spring-ws:soapaction:http:<span class="code-comment">//example.com/GetFoo?endpointMapping=#endpointMapping"</span>)
 </span>.convertBodyTo(<span class="code-object">String</span>.class).to(mock:example)
 </pre>
 </div></div>
 
 <p>The following route will receive all requests sent to <tt><a shape="rect" class="external-link" href="http://example.com/foobar" rel="nofollow">http://example.com/foobar</a></tt>.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"spring-ws:uri:http:<span class="code-comment">//example.com/foobar?endpointMapping=#endpointMapping"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"spring-ws:uri:http:<span class="code-comment">//example.com/foobar?endpointMapping=#endpointMapping"</span>)
 </span>.convertBodyTo(<span class="code-object">String</span>.class).to(mock:example)
 </pre>
 </div></div>
 
 <p>The route below will receive requests that contain the element <tt>&lt;foobar&gt;abc&lt;/foobar&gt;</tt> anywhere inside the message (and the default namespace).</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"spring-ws:xpathresult:abc?expression=<span class="code-comment">//foobar&amp;endpointMapping=#endpointMapping"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"spring-ws:xpathresult:abc?expression=<span class="code-comment">//foobar&amp;endpointMapping=#endpointMapping"</span>)
 </span>.convertBodyTo(<span class="code-object">String</span>.class).to(mock:example)
 </pre>
 </div></div>
@@ -36125,7 +36228,8 @@ spring-integration:defaultChannelName[?o
 
 <p>An example of a route using <tt>beanname</tt>:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">&lt;camelContext xmlns=<span class="code-quote">"http:<span class="code-comment">//camel.apache.org/schema/spring"</span>&gt;
+<pre class="code-java">
+&lt;camelContext xmlns=<span class="code-quote">"http:<span class="code-comment">//camel.apache.org/schema/spring"</span>&gt;
 </span>	&lt;route&gt;
 		&lt;from uri=<span class="code-quote">"spring-ws:beanname:QuoteEndpointDispatcher"</span> /&gt;
 		&lt;to uri=<span class="code-quote">"mock:example"</span> /&gt;
@@ -36152,7 +36256,8 @@ spring-integration:defaultChannelName[?o
 
 <p>When <em>accessing</em> web services you can marshal the request and unmarshal the response message:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">JaxbDataFormat jaxb = <span class="code-keyword">new</span> JaxbDataFormat(<span class="code-keyword">false</span>);
+<pre class="code-java">
+JaxbDataFormat jaxb = <span class="code-keyword">new</span> JaxbDataFormat(<span class="code-keyword">false</span>);
 jaxb.setContextPath(<span class="code-quote">"com.example.model"</span>);
 
 from(<span class="code-quote">"direct:example"</span>).marshal(jaxb).to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//foo.com/bar"</span>).unmarshal(jaxb);</span>
@@ -36161,7 +36266,8 @@ from(<span class="code-quote">"direct:ex
 
 <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" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"spring-ws:rootqname:{http:<span class="code-comment">//example.com/}GetFoo?endpointMapping=#endpointMapping"</span>).unmarshal(jaxb)
+<pre class="code-java">
+from(<span class="code-quote">"spring-ws:rootqname:{http:<span class="code-comment">//example.com/}GetFoo?endpointMapping=#endpointMapping"</span>).unmarshal(jaxb)
 </span>.to(<span class="code-quote">"mock:example"</span>).marshal(jaxb);
 </pre>
 </div></div>

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

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 Sat Dec 22 09:24:57 2012
@@ -84,7 +84,8 @@
 <p>Maven users will need to add the following dependency to their <tt>pom.xml</tt> for this component:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml"><span class="code-tag">&lt;dependency&gt;</span>
+<pre class="code-xml">
+<span class="code-tag">&lt;dependency&gt;</span>
 	<span class="code-tag">&lt;groupId&gt;</span>org.apache.camel<span class="code-tag">&lt;/groupId&gt;</span>
 	<span class="code-tag">&lt;artifactId&gt;</span>camel-spring-ws<span class="code-tag">&lt;/artifactId&gt;</span>
 	<span class="code-tag">&lt;version&gt;</span>x.x.x<span class="code-tag">&lt;/version&gt;</span>
@@ -102,7 +103,8 @@
 <p>The URI scheme for this component is as follows</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">spring-ws:[mapping-type:]address[?options]
+<pre class="code-java">
+spring-ws:[mapping-type:]address[?options]
 </pre>
 </div></div>
 
@@ -129,8 +131,9 @@
 <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"> Name </th><th colspan="1" rowspan="1" class="confluenceTh"> Required? </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>webServiceTemplate</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> 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. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>messageSender</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td co
 lspan="1" rowspan="1" class="confluenceTd"> 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 </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>messageFactory</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> 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 </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>transformerFactory</tt> </td><td colspan="1" rowspan="1"
  class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> Option to override default TransformerFactory. The provided transformer factory must be of type <tt>javax.xml.transform.TransformerFactory</tt> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endpointMapping</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Only when <em>mapping-type</em> is <tt>rootqname</tt>, <tt>soapaction</tt>, <tt>uri</tt> or <tt>xpathresult</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Reference to an instance of <tt>org.apache.camel.component.spring.ws.bean.CamelEndpointMapping</tt> 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) </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh"> Required? </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>webServiceTemplate</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> 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. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>messageSender</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td co
 lspan="1" rowspan="1" class="confluenceTd"> 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 </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>messageFactory</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> 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 </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>transformerFactory</tt> </td><td colspan="1" rowspan="1"
  class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> Option to override default TransformerFactory. The provided transformer factory must be of type <tt>javax.xml.transform.TransformerFactory</tt> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>endpointMapping</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Only when <em>mapping-type</em> is <tt>rootqname</tt>, <tt>soapaction</tt>, <tt>uri</tt> or <tt>xpathresult</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Reference to an instance of <tt>org.apache.camel.component.spring.ws.bean.CamelEndpointMapping</tt> 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) </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>messageFilter</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> No </td><td colspan="1" rowspan="1" class="confluenceTd"> Option to provide a custom MessageFilter since 2.10.3. For example when you want to process your headers or attachments by your own. </td></tr></tbody></table>
 </div>
+
 </div>
 
 <h3><a shape="rect" name="SpringWebServices-Messageheaders"></a>Message headers</h3>
@@ -144,13 +147,15 @@
 
 <p>To call a web service at <tt><a shape="rect" class="external-link" href="http://foo.com/bar" rel="nofollow">http://foo.com/bar</a></tt> simply define a route:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"direct:example"</span>).to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//foo.com/bar"</span>)</span>
+<pre class="code-java">
+from(<span class="code-quote">"direct:example"</span>).to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//foo.com/bar"</span>)</span>
 </pre>
 </div></div>
 
 <p>And sent a message:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">template.requestBody(<span class="code-quote">"direct:example"</span>, <span class="code-quote">"&lt;foobar xmlns=\"</span>http:<span class="code-comment">//foo.com\<span class="code-quote">"&gt;&lt;msg&gt;test message&lt;/msg&gt;&lt;/foobar&gt;"</span>);</span>
+<pre class="code-java">
+template.requestBody(<span class="code-quote">"direct:example"</span>, <span class="code-quote">"&lt;foobar xmlns=\"</span>http:<span class="code-comment">//foo.com\<span class="code-quote">"&gt;&lt;msg&gt;test message&lt;/msg&gt;&lt;/foobar&gt;"</span>);</span>
 </pre>
 </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>
@@ -159,24 +164,118 @@
 
 <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" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"direct:example"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"direct:example"</span>)
 .to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//foo.com/bar?soapAction=http://foo.com&amp;wsAddressingAction=http://bar.com"</span>)</span>
 </pre>
 </div></div>
 
 <p>Optionally you can override the endpoint options with header values:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">template.requestBodyAndHeader(<span class="code-quote">"direct:example"</span>,
+<pre class="code-java">
+template.requestBodyAndHeader(<span class="code-quote">"direct:example"</span>,
 <span class="code-quote">"&lt;foobar xmlns=\"</span>http:<span class="code-comment">//foo.com\<span class="code-quote">"&gt;&lt;msg&gt;test message&lt;/msg&gt;&lt;/foobar&gt;"</span>,
 </span>SpringWebserviceConstants.SPRING_WS_SOAP_ACTION, <span class="code-quote">"http:<span class="code-comment">//baz.com"</span>);</span>
 </pre>
 </div></div>
 
+<h3><a shape="rect" name="SpringWebServices-Theheaderandattachmentpropagation"></a>The header and attachment propagation</h3>
+<p>Spring WS Camel supports propagation of the headers and attachments into Spring-WS WebServiceMessage response since version <b>2.10.3</b>.<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" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+exchange.getOut().getHeaders().put(<span class="code-quote">"myCustom"</span>,<span class="code-quote">"myHeaderValue"</span>)
+exchange.getIn().addAttachment(<span class="code-quote">"myAttachment"</span>, <span class="code-keyword">new</span> DataHandler(...))
+</pre>
+</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><a shape="rect" name="SpringWebServices-HowtouseMTOMattachments"></a>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" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+&lt;bean id=<span class="code-quote">"axiomMessageFactory"</span>
+class=<span class="code-quote">"org.springframework.ws.soap.axiom.AxiomSoapMessageFactory"</span>&gt;
+&lt;property name=<span class="code-quote">"payloadCaching"</span> value=<span class="code-quote">"<span class="code-keyword">false</span>"</span> /&gt;
+&lt;property name=<span class="code-quote">"attachmentCaching"</span> value=<span class="code-quote">"<span class="code-keyword">true</span>"</span> /&gt;
+&lt;property name=<span class="code-quote">"attachmentCacheThreshold"</span> value=<span class="code-quote">"1024"</span> /&gt;
+&lt;/bean&gt;
+</pre>
+</div></div>
+
+<p>2. Add into your pom.xml the following dependencies</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+&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;
+&lt;/dependency&gt;
+&lt;dependency&gt;
+&lt;groupId&gt;org.apache.ws.commons.axiom&lt;/groupId&gt;
+&lt;artifactId&gt;axiom-impl&lt;/artifactId&gt;
+&lt;version&gt;1.2.13&lt;/version&gt;
+&lt;scope&gt;runtime&lt;/scope&gt;
+&lt;/dependency&gt;
+</pre>
+</div></div>
+<p>3. Add your attachment into the pipeline, for example using a Processor implementation.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+<span class="code-keyword">private</span> class Attachement <span class="code-keyword">implements</span> Processor {
+<span class="code-keyword">public</span> void process(Exchange exchange) <span class="code-keyword">throws</span> Exception
+{ exchange.getOut().copyFrom(exchange.getIn()); File file = <span class="code-keyword">new</span> File(<span class="code-quote">"testAttachment.txt"</span>); exchange.getOut().addAttachment(<span class="code-quote">"test"</span>, <span class="code-keyword">new</span> DataHandler(<span class="code-keyword">new</span> FileDataSource(file)));	 }
+}
+</pre>
+</div></div>
+<p>4. Define endpoint (producer) as ussual, for example like this:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+from(<span class="code-quote">"direct:send"</span>)
+.process(<span class="code-keyword">new</span> Attachement())
+.to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//localhost:8089/mySoapService?soapAction=mySoap&amp;messageFactory=axiomMessageFactory"</span>);</span>
+</pre>
+</div></div>
+<p>5. Now, your producer will generate MTOM message with otpmized attachments.</p>
+
+<h3><a shape="rect" name="SpringWebServices-Thecustomheaderandattachmentfiltering"></a>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" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java"> 
+&lt;bean id=<span class="code-quote">"messageFilter"</span> class=<span class="code-quote">"your.domain.myMessageFiler"</span> scope=<span class="code-quote">"singleton"</span> /&gt;
+</pre>
+</div></div>
+<p>or<br clear="none">
+b) the local messageFilter directly on the endpoint as follows:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//yourdomain.com?messageFilter=#myEndpointSpecificMessageFilter"</span>);</span>
+</pre>
+</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" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+<span class="code-keyword">protected</span> void doProcessSoapHeader(Message inOrOut, SoapMessage soapMessage)
+{your code /*no need to call <span class="code-keyword">super</span>*/ }
+<span class="code-keyword">protected</span> void doProcessSoapAttachements(Message inOrOut, SoapMessage response)
+{ your code /*no need to call <span class="code-keyword">super</span>*/ }
+</pre>
+</div></div>
+
 <h3><a shape="rect" name="SpringWebServices-UsingacustomMessageSenderandMessageFactory"></a>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" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"direct:example"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"direct:example"</span>)
 .to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//foo.com/bar?messageFactory=#messageFactory&amp;messageSender=#messageSender"</span>)</span>
 </pre>
 </div></div>
@@ -249,28 +348,32 @@
 
 <p>The following route will receive all web service requests that have a root element named "GetFoo" within the <tt><a shape="rect" class="external-link" href="http://example.com/" rel="nofollow">http://example.com/</a></tt> namespace.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"spring-ws:rootqname:{http:<span class="code-comment">//example.com/}GetFoo?endpointMapping=#endpointMapping"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"spring-ws:rootqname:{http:<span class="code-comment">//example.com/}GetFoo?endpointMapping=#endpointMapping"</span>)
 </span>.convertBodyTo(<span class="code-object">String</span>.class).to(mock:example)
 </pre>
 </div></div>
 
 <p>The following route will receive web service requests containing the <tt><a shape="rect" class="external-link" href="http://example.com/GetFoo" rel="nofollow">http://example.com/GetFoo</a></tt> SOAP action.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"spring-ws:soapaction:http:<span class="code-comment">//example.com/GetFoo?endpointMapping=#endpointMapping"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"spring-ws:soapaction:http:<span class="code-comment">//example.com/GetFoo?endpointMapping=#endpointMapping"</span>)
 </span>.convertBodyTo(<span class="code-object">String</span>.class).to(mock:example)
 </pre>
 </div></div>
 
 <p>The following route will receive all requests sent to <tt><a shape="rect" class="external-link" href="http://example.com/foobar" rel="nofollow">http://example.com/foobar</a></tt>.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"spring-ws:uri:http:<span class="code-comment">//example.com/foobar?endpointMapping=#endpointMapping"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"spring-ws:uri:http:<span class="code-comment">//example.com/foobar?endpointMapping=#endpointMapping"</span>)
 </span>.convertBodyTo(<span class="code-object">String</span>.class).to(mock:example)
 </pre>
 </div></div>
 
 <p>The route below will receive requests that contain the element <tt>&lt;foobar&gt;abc&lt;/foobar&gt;</tt> anywhere inside the message (and the default namespace).</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"spring-ws:xpathresult:abc?expression=<span class="code-comment">//foobar&amp;endpointMapping=#endpointMapping"</span>)
+<pre class="code-java">
+from(<span class="code-quote">"spring-ws:xpathresult:abc?expression=<span class="code-comment">//foobar&amp;endpointMapping=#endpointMapping"</span>)
 </span>.convertBodyTo(<span class="code-object">String</span>.class).to(mock:example)
 </pre>
 </div></div>
@@ -283,7 +386,8 @@
 
 <p>An example of a route using <tt>beanname</tt>:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">&lt;camelContext xmlns=<span class="code-quote">"http:<span class="code-comment">//camel.apache.org/schema/spring"</span>&gt;
+<pre class="code-java">
+&lt;camelContext xmlns=<span class="code-quote">"http:<span class="code-comment">//camel.apache.org/schema/spring"</span>&gt;
 </span>	&lt;route&gt;
 		&lt;from uri=<span class="code-quote">"spring-ws:beanname:QuoteEndpointDispatcher"</span> /&gt;
 		&lt;to uri=<span class="code-quote">"mock:example"</span> /&gt;
@@ -310,7 +414,8 @@
 
 <p>When <em>accessing</em> web services you can marshal the request and unmarshal the response message:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">JaxbDataFormat jaxb = <span class="code-keyword">new</span> JaxbDataFormat(<span class="code-keyword">false</span>);
+<pre class="code-java">
+JaxbDataFormat jaxb = <span class="code-keyword">new</span> JaxbDataFormat(<span class="code-keyword">false</span>);
 jaxb.setContextPath(<span class="code-quote">"com.example.model"</span>);
 
 from(<span class="code-quote">"direct:example"</span>).marshal(jaxb).to(<span class="code-quote">"spring-ws:http:<span class="code-comment">//foo.com/bar"</span>).unmarshal(jaxb);</span>
@@ -319,7 +424,8 @@ from(<span class="code-quote">"direct:ex
 
 <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" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"spring-ws:rootqname:{http:<span class="code-comment">//example.com/}GetFoo?endpointMapping=#endpointMapping"</span>).unmarshal(jaxb)
+<pre class="code-java">
+from(<span class="code-quote">"spring-ws:rootqname:{http:<span class="code-comment">//example.com/}GetFoo?endpointMapping=#endpointMapping"</span>).unmarshal(jaxb)
 </span>.to(<span class="code-quote">"mock:example"</span>).marshal(jaxb);
 </pre>
 </div></div>