Author: buildbot
Date: Fri Mar 8 01:27:33 2013
New Revision: 853570
Log:
Production update by buildbot for camel
Modified:
websites/production/camel/content/book-component-appendix.html
websites/production/camel/content/cxf.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 Fri Mar 8
01:27:33 2013
@@ -2366,15 +2366,20 @@ assertEquals(<span class="code-quote">"R
</pre>
</div></div>
-<p>SOAP headers are propagated to and from Camel Message headers. The Camel
message header name is "org.apache.cxf.headers.Header.list" which is a constant
defined in CXF (org.apache.cxf.headers.Header.HEADER_LIST). The header value
is a List of CXF SoapHeader objects (org.apache.cxf.binding.soap.SoapHeader).
The following snippet is the InsertResponseOutHeaderProcessor (that insert a
new SOAP header in the response message). The way to access SOAP headers in
both InsertResponseOutHeaderProcessor and InsertRequestOutHeaderProcessor are
actually the same. The only difference between the two processors is setting
the direction of the inserted SOAP header.</p>
+<p>SOAP headers are propagated to and from Camel Message headers. The Camel
message header name is "org.apache.cxf.headers.Header.list" which is a constant
defined in CXF (org.apache.cxf.headers.Header.HEADER_LIST). The header value
is a List of CXF SoapHeader objects (org.apache.cxf.binding.soap.SoapHeader).
The following snippet is the InsertResponseOutHeaderProcessor (that insert a
new SOAP header in the response message). The way to access SOAP headers in
both InsertResponseOutHeaderProcessor and InsertRequestOutHeaderProcessor are
actually the same. The only difference between the two processors is setting
the direction of the inserted SOAP header.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent
panelContent">
<pre class="code-java">
<span class="code-keyword">public</span> <span
class="code-keyword">static</span> class InsertResponseOutHeaderProcessor <span
class="code-keyword">implements</span> Processor {
<span class="code-keyword">public</span> void process(Exchange exchange)
<span class="code-keyword">throws</span> Exception {
- List<SoapHeader> soapHeaders = CastUtils.<span
class="code-keyword">cast</span>((List<?>)exchange.getIn().getHeader(Header.HEADER_LIST));
-
+ <span class="code-comment">// You should be able to get the header
<span class="code-keyword">if</span> exchange is routed from camel-cxf endpoint
+</span> List<SoapHeader> soapHeaders = CastUtils.<span
class="code-keyword">cast</span>((List<?>)exchange.getIn().getHeader(Header.HEADER_LIST));
+ <span class="code-keyword">if</span> (soapHeaders == <span
class="code-keyword">null</span>) {
+ <span class="code-comment">// we just create a <span
class="code-keyword">new</span> soap headers in <span
class="code-keyword">case</span> the header is <span
class="code-keyword">null</span>
+</span> soapHeaders = <span class="code-keyword">new</span>
ArrayList<SoapHeader>();
+ }
+
<span class="code-comment">// Insert a <span
class="code-keyword">new</span> header
</span> <span class="code-object">String</span> xml = <span
class="code-quote">"<?xml version=\"</span>1.0\<span class="code-quote">"
encoding=\"</span>utf-8\<span class="code-quote">"?><outofbandHeader
"</span>
+ <span class="code-quote">"xmlns=\"</span>http:<span
class="code-comment">//cxf.apache.org/outofband/Header\<span
class="code-quote">" hdrAttribute=\"</span>testHdrAttribute\<span
class="code-quote">" "</span>
Modified: websites/production/camel/content/cxf.html
==============================================================================
--- websites/production/camel/content/cxf.html (original)
+++ websites/production/camel/content/cxf.html Fri Mar 8 01:27:33 2013
@@ -575,15 +575,20 @@ assertEquals(<span class="code-quote">"R
</pre>
</div></div>
-<p>SOAP headers are propagated to and from Camel Message headers. The Camel
message header name is "org.apache.cxf.headers.Header.list" which is a constant
defined in CXF (org.apache.cxf.headers.Header.HEADER_LIST). The header value
is a List of CXF SoapHeader objects (org.apache.cxf.binding.soap.SoapHeader).
The following snippet is the InsertResponseOutHeaderProcessor (that insert a
new SOAP header in the response message). The way to access SOAP headers in
both InsertResponseOutHeaderProcessor and InsertRequestOutHeaderProcessor are
actually the same. The only difference between the two processors is setting
the direction of the inserted SOAP header.</p>
+<p>SOAP headers are propagated to and from Camel Message headers. The Camel
message header name is "org.apache.cxf.headers.Header.list" which is a constant
defined in CXF (org.apache.cxf.headers.Header.HEADER_LIST). The header value
is a List of CXF SoapHeader objects (org.apache.cxf.binding.soap.SoapHeader).
The following snippet is the InsertResponseOutHeaderProcessor (that insert a
new SOAP header in the response message). The way to access SOAP headers in
both InsertResponseOutHeaderProcessor and InsertRequestOutHeaderProcessor are
actually the same. The only difference between the two processors is setting
the direction of the inserted SOAP header.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent
panelContent">
<pre class="code-java">
<span class="code-keyword">public</span> <span
class="code-keyword">static</span> class InsertResponseOutHeaderProcessor <span
class="code-keyword">implements</span> Processor {
<span class="code-keyword">public</span> void process(Exchange exchange)
<span class="code-keyword">throws</span> Exception {
- List<SoapHeader> soapHeaders = CastUtils.<span
class="code-keyword">cast</span>((List<?>)exchange.getIn().getHeader(Header.HEADER_LIST));
-
+ <span class="code-comment">// You should be able to get the header
<span class="code-keyword">if</span> exchange is routed from camel-cxf endpoint
+</span> List<SoapHeader> soapHeaders = CastUtils.<span
class="code-keyword">cast</span>((List<?>)exchange.getIn().getHeader(Header.HEADER_LIST));
+ <span class="code-keyword">if</span> (soapHeaders == <span
class="code-keyword">null</span>) {
+ <span class="code-comment">// we just create a <span
class="code-keyword">new</span> soap headers in <span
class="code-keyword">case</span> the header is <span
class="code-keyword">null</span>
+</span> soapHeaders = <span class="code-keyword">new</span>
ArrayList<SoapHeader>();
+ }
+
<span class="code-comment">// Insert a <span
class="code-keyword">new</span> header
</span> <span class="code-object">String</span> xml = <span
class="code-quote">"<?xml version=\"</span>1.0\<span class="code-quote">"
encoding=\"</span>utf-8\<span class="code-quote">"?><outofbandHeader
"</span>
+ <span class="code-quote">"xmlns=\"</span>http:<span
class="code-comment">//cxf.apache.org/outofband/Header\<span
class="code-quote">" hdrAttribute=\"</span>testHdrAttribute\<span
class="code-quote">" "</span>