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 2014/04/09 22:24:48 UTC
svn commit: r905613 [2/3] - in /websites/production/camel/content:
book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache
xstream.html
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 Wed Apr 9 20:24:47 2014
@@ -4185,11 +4185,11 @@ While not actual tutorials you might fin
</div>
</div>
<h2 id="BookInOnePage-Preface">Preface</h2><p>This tutorial aims to guide the reader through the stages of creating a project which uses Camel to facilitate the routing of messages from a JMS queue to a <a shape="rect" class="external-link" href="http://www.springramework.org" rel="nofollow">Spring</a> service. The route works in a synchronous fashion returning a response to the client.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1395739173173 {padding: 0px;}
-div.rbtoc1395739173173 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1395739173173 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1397074885577 {padding: 0px;}
+div.rbtoc1397074885577 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1397074885577 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1395739173173">
+/*]]>*/</style></p><div class="toc-macro rbtoc1397074885577">
<ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-JmsRemoting-TutorialonSpringRemotingwithJMS">Tutorial on Spring Remoting with JMS</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-Preface">Preface</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-Prerequisites">Prerequisites</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-Distribution">Distribution</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-About">About</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-CreatetheCamelProject">Create the Camel Project</a>
<ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-JmsRemoting-UpdatethePOMwithDependencies">Update the POM with Dependencies</a></li></ul>
</li><li><a shape="rect" href="#Tutorial-JmsRemoting-WritingtheServer">Writing the Server</a>
@@ -6375,11 +6375,11 @@ So we completed the last piece in the pi
<style type="text/css">/*<![CDATA[*/
-div.rbtoc1395739173722 {padding: 0px;}
-div.rbtoc1395739173722 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1395739173722 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1397074885921 {padding: 0px;}
+div.rbtoc1397074885921 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1397074885921 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style><div class="toc-macro rbtoc1395739173722">
+/*]]>*/</style><div class="toc-macro rbtoc1397074885921">
<ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-AXIS-Camel-TutorialusingAxis1.4withApacheCamel">Tutorial using Axis 1.4 with Apache Camel</a>
<ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-AXIS-Camel-Prerequisites">Prerequisites</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-Distribution">Distribution</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-Introduction">Introduction</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-SettinguptheprojecttorunAxis">Setting up the project to run Axis</a>
<ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-AXIS-Camel-Maven2">Maven 2</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-wsdl">wsdl</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-ConfiguringAxis">Configuring Axis</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-RunningtheExample">Running the Example</a></li></ul>
@@ -10887,6 +10887,16 @@ from("activemq:My.Queue").
marshal().xstream().
to("mqseries:Another.Queue");
]]></script>
+</div></div><p>If you would like to configure the <code>XStream</code> instance used by the Camel for the message transformation, you can simply pass a reference to that instance on the DSL level.</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[XStream xStream = new XStream();
+xStream.aliasField("money", PurchaseOrder.class, "cash");
+
+...
+
+from("direct:marshal").
+ marshal(new XStreamDataFormat(xStream)).
+ to("mock:marshaled");
+]]></script>
</div></div><h3 id="BookInOnePage-XMLInputFactoryandXMLOutputFactory">XMLInputFactory and XMLOutputFactory</h3><p><a shape="rect" class="external-link" href="http://xstream.codehaus.org/" rel="nofollow">The XStream library</a> uses the <code>javax.xml.stream.XMLInputFactory</code> and <code>javax.xml.stream.XMLOutputFactory</code>, you can control which implementation of this factory should be used.</p><p>The Factory is discovered using this algorithm:<br clear="none"> 1. Use the <code>javax.xml.stream.XMLInputFactory</code> , <code>javax.xml.stream.XMLOutputFactory</code> system property.<br clear="none"> 2. Use the <code>lib/xml.stream.properties</code> file in the <code>JRE_HOME</code> directory.<br clear="none"> 3. Use the Services API, if available, to determine the classname by looking in the <code>META-INF/services/javax.xml.stream.XMLInputFactory</code>, <code>META-INF/services/javax.xml.stream.XMLOutputFactory</code> files in jars available to the JRE.<br clear="none"> 4. U
se the platform default XMLInputFactory,XMLOutputFactory instance.</p><h3 id="BookInOnePage-HowtosettheXMLencodinginXstreamDataFormat?">How to set the XML encoding in Xstream DataFormat?</h3><p>From Camel 2.2.0, you can set the encoding of XML in Xstream DataFormat by setting the Exchange's property with the key <code>Exchange.CHARSET_NAME</code>, or setting the encoding property on Xstream from DSL or Spring config.</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("activemq:My.Queue").
marshal().xstream("UTF-8").
@@ -19985,108 +19995,73 @@ from("direct:tap")
</div></div><h3 id="BookInOnePage-UsingonPreparetoexecutecustomlogicwhenpreparingmessages.3">Using onPrepare to execute custom logic when preparing messages</h3><p><strong>Available as of Camel 2.8</strong></p><p>See details at <a shape="rect" href="multicast.html">Multicast</a></p><p></p><h4 id="BookInOnePage-UsingThisPattern.47">Using This Pattern</h4>
<p>If you would like to use this EIP Pattern then please read the <a shape="rect" href="getting-started.html">Getting Started</a>, you may also find the <a shape="rect" href="architecture.html">Architecture</a> useful particularly the description of <a shape="rect" href="endpoint.html">Endpoint</a> and <a shape="rect" href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" href="examples.html">Examples</a> first before trying this pattern out.</p>
-<h2 id="BookInOnePage-Log">Log</h2>
-
-<p>How can I log processing a <a shape="rect" href="message.html">Message</a>?</p>
-
-<p>Camel provides many ways to log processing a message. Here is just some examples:</p>
-<ul class="alternate"><li>You can use the <a shape="rect" href="log.html">Log</a> component which logs the Message content.</li><li>You can use the <a shape="rect" href="tracer.html">Tracer</a> which trace logs message flow.</li><li>You can also use a <a shape="rect" href="processor.html">Processor</a> or <a shape="rect" href="bean.html">Bean</a> and log from Java code.</li><li>You can use the <code>log</code> DSL.</li></ul>
-
-
-<h3 id="BookInOnePage-UsinglogDSL">Using log DSL</h3>
-
-<p>And in <strong>Camel 2.2</strong> you can use the <code>log</code> DSL which allows you to use <a shape="rect" href="simple.html">Simple</a> language to construct a dynamic message which gets logged.<br clear="none">
-For example you can do</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("direct:start").log("Processing ${id}").to("bean:foo");
+<h2 id="BookInOnePage-Log">Log</h2><p>How can I log processing a <a shape="rect" href="message.html">Message</a>?</p><p>Camel provides many ways to log processing a message. Here is just some examples:</p><ul class="alternate"><li>You can use the <a shape="rect" href="log.html">Log</a> component which logs the Message content.</li><li>You can use the <a shape="rect" href="tracer.html">Tracer</a> which trace logs message flow.</li><li>You can also use a <a shape="rect" href="processor.html">Processor</a> or <a shape="rect" href="bean.html">Bean</a> and log from Java code.</li><li>You can use the <code>log</code> DSL.</li></ul><h3 id="BookInOnePage-UsinglogDSL">Using log DSL</h3><p>And in <strong>Camel 2.2</strong> you can use the <code>log</code> DSL which allows you to use <a shape="rect" href="simple.html">Simple</a> language to construct a dynamic message which gets logged.<br clear="none"> For example you can do</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("direct:start").log("Processing ${id}").to("bean:foo");
]]></script>
-</div></div>
-
-<p>Which will construct a String message at runtime using the <a shape="rect" href="simple.html">Simple</a> language. The log message will by logged at <code>INFO</code> level using the route id as the log name. By default a route is named <code>route-1</code>, <code>route-2</code> etc. But you can use the <code>routeId("myCoolRoute")</code> to set a route name of choice.</p>
-
- <div class="aui-message hint shadowed information-macro">
+</div></div><p>Which will construct a String message at runtime using the <a shape="rect" href="simple.html">Simple</a> language. The log message will by logged at <code>INFO</code> level using the route id as the log name. By default a route is named <code>route-1</code>, <code>route-2</code> etc. But you can use the <code>routeId("myCoolRoute")</code> to set a route name of choice.</p> <div class="aui-message hint shadowed information-macro">
<p class="title">Difference between log in the DSL and [Log] component</p>
<span class="aui-icon icon-hint">Icon</span>
<div class="message-content">
-
-<p>The <code>log</code> DSL is much lighter and meant for logging human logs such as <code>Starting to do ...</code> etc. It can only log a message based on the <a shape="rect" href="simple.html">Simple</a> language. On the other hand <a shape="rect" href="log.html">Log</a> component is a full fledged component which involves using endpoints and etc. The <a shape="rect" href="log.html">Log</a> component is meant for logging the Message itself and you have many URI options to control what you would like to be logged.</p>
+ <p>The <code>log</code> DSL is much lighter and meant for logging human logs such as <code>Starting to do ...</code> etc. It can only log a message based on the <a shape="rect" href="simple.html">Simple</a> language. On the other hand <a shape="rect" href="log.html">Log</a> component is a full fledged component which involves using endpoints and etc. The <a shape="rect" href="log.html">Log</a> component is meant for logging the Message itself and you have many URI options to control what you would like to be logged.</p>
+ </div>
+ </div>
+ <div class="aui-message hint shadowed information-macro">
+ <p class="title">Using Logger instance from the the Registry</p>
+ <span class="aui-icon icon-hint">Icon</span>
+ <div class="message-content">
+ <p>As of <strong>Camel 2.12.4/2.13.1</strong>, if no logger name or logger instance is passed to log DSL, there's a Registry lookup performed to find single instance of <code>org.slf4j.Logger</code>. If such instance is found, it is used instead of creating a new logger instance. If more instances are found, the behavior defaults to creating a new instance of logger.</p>
</div>
</div>
-
-
<div class="aui-message success shadowed information-macro">
<p class="title">Logging message body with streamed messages</p>
<span class="aui-icon icon-success">Icon</span>
<div class="message-content">
-
-<p>If the message body is stream based, then logging the message body, may cause the message body to be <em>empty</em> afterwards. See this <a shape="rect" href="why-is-my-message-body-empty.html">FAQ</a>. For streamed messages you can use <a shape="rect" href="stream-caching.html">Stream Caching</a> to allow logging the message body and be able to read the message body afterwards again.</p>
+ <p>If the message body is stream based, then logging the message body, may cause the message body to be <em>empty</em> afterwards. See this <a shape="rect" href="why-is-my-message-body-empty.html">FAQ</a>. For streamed messages you can use <a shape="rect" href="stream-caching.html">Stream caching</a> to allow logging the message body and be able to read the message body afterwards again.</p>
</div>
</div>
-
-
-<p>The log DSL have overloaded methods to set the logging level and/or name as well.</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("direct:start").log(LoggingLevel.DEBUG, "Processing ${id}").to("bean:foo");
+<p>The log DSL have overloaded methods to set the logging level and/or name as well.</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("direct:start").log(LoggingLevel.DEBUG, "Processing ${id}").to("bean:foo");
]]></script>
-</div></div>
-
-<p>and to set a logger name</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("direct:start").log(LoggingLevel.DEBUG, "com.mycompany.MyCoolRoute", "Processing ${id}").to("bean:foo");
+</div></div><p>and to set a logger name</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("direct:start").log(LoggingLevel.DEBUG, "com.mycompany.MyCoolRoute", "Processing ${id}").to("bean:foo");
]]></script>
-</div></div>
-
-<p>For example you can use this to log the file name being processed if you consume files.</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("file://target/files").log(LoggingLevel.DEBUG, "Processing file ${file:name}").to("bean:foo");
+</div></div><p>Since <strong>Camel 2.12.4/2.13.1</strong> the logger instance may be used as well:</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("direct:start").log(LoggingLeven.DEBUG, org.slf4j.LoggerFactory.getLogger("com.mycompany.mylogger"), "Processing ${id}").to("bean:foo");]]></script>
+</div></div><p>For example you can use this to log the file name being processed if you consume files.</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("file://target/files").log(LoggingLevel.DEBUG, "Processing file ${file:name}").to("bean:foo");
]]></script>
-</div></div>
-
-<h4 id="BookInOnePage-UsinglogDSLfromSpring">Using log DSL from Spring</h4>
-<p>In Spring DSL its also easy to use log DSL as shown below:</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[
- <route id="foo">
+</div></div><h4 id="BookInOnePage-UsinglogDSLfromSpring">Using log DSL from Spring</h4><p>In Spring DSL its also easy to use log DSL as shown below:</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[ <route id="foo">
<from uri="direct:foo"/>
<log message="Got ${body}"/>
<to uri="mock:foo"/>
</route>
]]></script>
-</div></div>
-
-<p>The log tag has attributes to set the <code>message</code>, <code>loggingLevel</code> and <code>logName</code>. For example:</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[
- <route id="baz">
+</div></div><p>The log tag has attributes to set the <code>message</code>, <code>loggingLevel</code> and <code>logName</code>. For example:</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[ <route id="baz">
<from uri="direct:baz"/>
<log message="Me Got ${body}" loggingLevel="FATAL" logName="com.mycompany.MyCoolRoute"/>
<to uri="mock:baz"/>
</route>
]]></script>
-</div></div>
-
-<h4 id="BookInOnePage-Usingslf4jMarker">Using slf4j Marker</h4>
-<p><strong>Available as of Camel 2.9</strong></p>
+</div></div><p>Since <strong>Camel 2.12.4/2.13.1</strong> it is possible to reference logger instance. For example:</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[ <bean id="myLogger" class="org.slf4j.LoggerFactory" factory-method="getLogger" xmlns="http://www.springframework.org/schema/beans">
+ <constructor-arg value="com.mycompany.mylogger" />
+ </bean>
-<p>You can specify a marker name in the DSL</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[
- <route id="baz">
- <from uri="direct:baz"/>
- <log message="Me Got ${body}" loggingLevel="FATAL" logName="com.mycompany.MyCoolRoute" marker="myMarker"/>
+ Â <route id="moo" xmlns="http://camel.apache.org/schema/spring">
+ <from uri="direct:moo"/>
+ <log message="Me Got ${body}" loggingLevel="INFO loggerRef="myLogger"/>
<to uri="mock:baz"/>
</route>
]]></script>
-</div></div>
-
-
-<h4 id="BookInOnePage-UsingThisPattern.48">Using This Pattern</h4>
+</div></div><h4 id="BookInOnePage-Usingslf4jMarker">Using slf4j Marker</h4><p><strong>Available as of Camel 2.9</strong></p><p>You can specify a marker name in the DSL</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[ <route id="baz">
+ <from uri="direct:baz"/>
+ <log message="Me Got ${body}" loggingLevel="FATAL" logName="com.mycompany.MyCoolRoute" marker="myMarker"/>
+ <to uri="mock:baz"/>
+ </route>]]></script>
+</div></div><h4 id="BookInOnePage-UsinglogDSLinOSGi">Using log DSL in OSGi</h4><p><strong>Improvement as of Camel 2.12.4/2.13.1</strong></p><p>When using log DSL inside OSGi (e.g., in Karaf), the underlying logging mechanisms are provided by PAX logging. It searches for a bundle which invokes <code>org.slf4j.LoggerFactory.getLogger()</code> method and associates the bundle with the logger instance. Passing only logger name to log DSL results in associating <code>camel-core</code> bundle with the logger instance created.</p><p>In some scenarios it is required that the bundle associated with logger should be the bundle which contains route definition. This is possible using provided logger instance both for Java DSL and Spring DSL (see the examples above).</p><p></p><h4 id="BookInOnePage-UsingThisPattern.48">Using This Pattern</h4>
<p>If you would like to use this EIP Pattern then please read the <a shape="rect" href="getting-started.html">Getting Started</a>, you may also find the <a shape="rect" href="architecture.html">Architecture</a> useful particularly the description of <a shape="rect" href="endpoint.html">Endpoint</a> and <a shape="rect" href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" href="examples.html">Examples</a> first before trying this pattern out.</p></div>
<div class="chapter" id="chapter-component-appendix">
@@ -21531,11 +21506,11 @@ template.send("direct:alias-verify&
</div>
</div>
<p>The <strong>cxf:</strong> component provides integration with <a shape="rect" href="http://cxf.apache.org">Apache CXF</a> for connecting to JAX-WS services hosted in CXF.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1395739186506 {padding: 0px;}
-div.rbtoc1395739186506 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1395739186506 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1397074895367 {padding: 0px;}
+div.rbtoc1397074895367 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1397074895367 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1395739186506">
+/*]]>*/</style></p><div class="toc-macro rbtoc1397074895367">
<ul class="toc-indentation"><li><a shape="rect" href="#CXF-CXFComponent">CXF Component</a>
<ul class="toc-indentation"><li><a shape="rect" href="#CXF-URIformat">URI format</a></li><li><a shape="rect" href="#CXF-Options">Options</a>
<ul class="toc-indentation"><li><a shape="rect" href="#CXF-Thedescriptionsofthedataformats">The descriptions of the dataformats</a>
@@ -21543,7 +21518,7 @@ div.rbtoc1395739186506 li {margin-left:
</li><li><a shape="rect" href="#CXF-DescriptionofrelayHeadersoption">Description of relayHeaders option</a>
<ul class="toc-indentation"><li><a shape="rect" href="#CXF-AvailableonlyinPOJOmode">Available only in POJO mode</a></li><li><a shape="rect" href="#CXF-ChangessinceRelease2.0">Changes since Release 2.0</a></li></ul>
</li></ul>
-</li><li><a shape="rect" href="#CXF-ConfiguretheCXFendpointswithSpring">Configure the CXF endpoints with Spring</a></li><li><a shape="rect" href="#CXF-ConfiguringtheCXFEndpointswithApacheAriesBlueprint.">Configuring the CXF Endpoints with Apache Aries Blueprint.</a></li><li><a shape="rect" href="#CXF-Howtomakethecamel-cxfcomponentuselog4jinsteadofjava.util.logging">How to make the camel-cxf component use log4j instead of java.util.logging</a></li><li><a shape="rect" href="#CXF-Howtoletcamel-cxfresponsemessagewithxmlstartdocument">How to let camel-cxf response message with xml start document</a></li><li><a shape="rect" href="#CXF-Howtoconsumeamessagefromacamel-cxfendpointinPOJOdataformat">How to consume a message from a camel-cxf endpoint in POJO data format</a></li><li><a shape="rect" href="#CXF-Howtopreparethemessageforthecamel-cxfendpointinPOJOdataformat">How to prepare the message for the camel-cxf endpoint in POJO data format</a></li><li><a shape="rect" href="#CXF-Howtodealwitht
hemessageforacamel-cxfendpointinPAYLOADdataformat">How to deal with the message for a camel-cxf endpoint in PAYLOAD data format</a></li><li><a shape="rect" href="#CXF-HowtogetandsetSOAPheadersinPOJOmode">How to get and set SOAP headers in POJO mode</a></li><li><a shape="rect" href="#CXF-HowtogetandsetSOAPheadersinPAYLOADmode">How to get and set SOAP headers in PAYLOAD mode</a></li><li><a shape="rect" href="#CXF-SOAPheadersarenotavailableinMESSAGEmode">SOAP headers are not available in MESSAGE mode</a></li><li><a shape="rect" href="#CXF-HowtothrowaSOAPFaultfromCamel">How to throw a SOAP Fault from Camel</a></li><li><a shape="rect" href="#CXF-Howtopropagateacamel-cxfendpoint'srequestandresponsecontext">How to propagate a camel-cxf endpoint's request and response context</a></li><li><a shape="rect" href="#CXF-AttachmentSupport">Attachment Support</a></li><li><a shape="rect" href="#CXF-StreamingSupportinPAYLOADmode">Streaming Support in PAYLOAD mode</a></li><li><a shape="rect" href="#CX
F-SeeAlso">See Also</a></li></ul>
+</li><li><a shape="rect" href="#CXF-ConfiguretheCXFendpointswithSpring">Configure the CXF endpoints with Spring</a></li><li><a shape="rect" href="#CXF-ConfiguringtheCXFEndpointswithApacheAriesBlueprint.">Configuring the CXF Endpoints with Apache Aries Blueprint.</a></li><li><a shape="rect" href="#CXF-Howtomakethecamel-cxfcomponentuselog4jinsteadofjava.util.logging">How to make the camel-cxf component use log4j instead of java.util.logging</a></li><li><a shape="rect" href="#CXF-Howtoletcamel-cxfresponsemessagewithxmlstartdocument">How to let camel-cxf response message with xml start document</a></li><li><a shape="rect" href="#CXF-Howtoconsumeamessagefromacamel-cxfendpointinPOJOdataformat">How to consume a message from a camel-cxf endpoint in POJO data format</a></li><li><a shape="rect" href="#CXF-Howtopreparethemessageforthecamel-cxfendpointinPOJOdataformat">How to prepare the message for the camel-cxf endpoint in POJO data format</a></li><li><a shape="rect" href="#CXF-Howtodealwitht
hemessageforacamel-cxfendpointinPAYLOADdataformat">How to deal with the message for a camel-cxf endpoint in PAYLOAD data format</a></li><li><a shape="rect" href="#CXF-HowtogetandsetSOAPheadersinPOJOmode">How to get and set SOAP headers in POJO mode</a></li><li><a shape="rect" href="#CXF-HowtogetandsetSOAPheadersinPAYLOADmode">How to get and set SOAP headers in PAYLOAD mode</a></li><li><a shape="rect" href="#CXF-SOAPheadersarenotavailableinMESSAGEmode">SOAP headers are not available in MESSAGE mode</a></li><li><a shape="rect" href="#CXF-HowtothrowaSOAPFaultfromCamel">How to throw a SOAP Fault from Camel</a></li><li><a shape="rect" href="#CXF-Howtopropagateacamel-cxfendpoint'srequestandresponsecontext">How to propagate a camel-cxf endpoint's request and response context</a></li><li><a shape="rect" href="#CXF-AttachmentSupport">Attachment Support</a></li><li><a shape="rect" href="#CXF-StreamingSupportinPAYLOADmode">Streaming Support in PAYLOAD mode</a></li><li><a shape="rect" href="#CX
F-UsingthegenericCXFDispatchmode">Using the generic CXF Dispatch mode</a></li><li><a shape="rect" href="#CXF-SeeAlso">See Also</a></li></ul>
</li></ul>
</div><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[<dependency>
@@ -21569,18 +21544,7 @@ div.rbtoc1395739186506 li {margin-left:
</div></div><p>Where <strong>someAddress</strong> specifies the CXF endpoint's address. With this URI format, most of the endpoint details are specified using options.</p><p>For either style above, you can append options to the URI 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[cxf:bean:cxfEndpoint?wsdlURL=wsdl/hello_world.wsdl&dataFormat=PAYLOAD
]]></script>
-</div></div><h3 id="BookInOnePage-Options.29">Options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Required </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>wsdlURL</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The location of the WSDL. It is obtained from endpoint address by default. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <a shape="rect" class="external-link" href="file://local/wsdl/hello.wsdl" rel="nofollow">file://local/wsdl/hello.wsdl</a> or <code>wsdl/hello.wsdl</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>serviceClass</code> </p></td><td cols
pan="1" rowspan="1" class="confluenceTd"><p> Yes </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The name of the SEI (Service Endpoint Interface) class. This class can have, but does not require, JSR181 annotations. <br clear="none" class="atl-forced-newline"> This option is only required by POJO mode. If the wsdlURL option is provided, serviceClass is not required for PAYLOAD and MESSAGE mode. When wsdlURL option is used without serviceClass, the serviceName and portName (endpointName for Spring configuration) options <strong>MUST</strong> be provided. It is possible to use <code>#</code> notation to reference a <code>serviceClass</code> object instance from the registry. E.g. <code>serviceClass=#beanName</code>. The <code>serviceClass</code> for a CXF producer (that is, the <code>to</code> endpoint) should be a Java interface.<br clear="none" class="atl-forced-newline"> <strong>Since 2.8,</strong> it is possible to omit both wsdlURL and serviceClass options for PAYLO
AD and MESSAGE mode. When they are omitted, arbitrary XML elements can be put in CxfPayload's body in PAYLOAD mode to facilitate CXF Dispatch Mode. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> Please be advised that the <strong>referenced object cannot be a Proxy</strong> (Spring AOP Proxy is OK) as it relies on <code>Object.getClass().getName()</code> method for non Spring AOP Proxy. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>org.apache.camel.Hello</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>serviceName</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The service name this service is implementing, it maps to the <code>wsdl:service@name</code>. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <strong>Requi
red</strong> for camel-cxf consumer since camel-2.2.0 or if more than one <code>serviceName</code> is present in WSDL. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Example</em>: {http:­//org.apache.camel}ServiceName </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>portName</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The port name this service is implementing, it maps to the <code>wsdl:port@name</code>. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <strong>Required</strong> for camel-cxf consumer since camel-2.2.0 or if more than one <code>portName</code> is present under <code>serviceName</code>. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Example</em>: {http:­//org.apache.camel}PortName </p></td></tr><tr><td colspan
="1" rowspan="1" class="confluenceTd"><p> <code>dataFormat</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The data type messages supported by the CXF endpoint. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>POJO</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>POJO</code>, <code>PAYLOAD</code>, <code>MESSAGE</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>relayHeaders</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Please see the <strong>Description of</strong> <code><strong>relayHeaders</strong></code> <strong>option</strong> section for this option. Should a CXF endpoint relay headers along the route. Currently only available when <code>dataFormat=POJO</code> <br clear="none" class=
"atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>true</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>true</code>, <code>false</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>wrapped</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Which kind of operation that CXF endpoint producer will invoke <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>false</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>true</code>, <code>false</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>wrappedStyle</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>New in 2.5.0</strong> The WSDL style that describe
s how parameters are represented in the SOAP body. If the value is false, CXF will chose the document-literal unwrapped style, If the value is true, CXF will chose the document-literal wrapped style <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>Null</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>true</code>, <code>false</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>setDefaultBus</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Will set the default bus when CXF endpoint create a bus by itself <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>false</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>true</code>, <code>false</code> </p></td></tr><tr><td colspan="1" rowspan="1" class=
"confluenceTd"><p> <code>bus</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> A default bus created by CXF Bus Factory. Use <code>#</code> notation to reference a bus object from the registry. The referenced object must be an instance of <code>org.apache.cxf.Bus</code>. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>bus=#busName</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cxfBinding</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Use <code>#</code> notation to reference a CXF binding object from the registry. The referenced object must be an instance of <code>org.apache.camel.component.cxf.CxfBinding</code> (use an instance of <code>org.apache.camel.component.cxf.DefaultCxfBinding</code>). <br clear="none" cla
ss="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>cxfBinding=#bindingName</code> <br clear="none" class="atl-forced-newline"> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>headerFilterStrategy</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Use <code>#</code> notation to reference a header filter strategy object from the registry. The referenced object must be an instance of <code>org.apache.camel.spi.HeaderFilterStrategy</code> (use an instance of <code>org.apache.camel.component.cxf.CxfHeaderFilterStrategy</code>). <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>headerFilterStrategy=#strategyName</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>loggingFeatureEnabled</code> </p></td><td colspan="1" rowspan="1" class="conflue
nceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> New in 2.3. This option enables CXF Logging Feature which writes inbound and outbound SOAP messages to log. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>false</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>loggingFeatureEnabled</code><code>=true</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>defaultOperationName</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> New in 2.4, this option will set the default operationName that will be used by the CxfProducer which invokes the remote service. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>null</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>defaultOperat
ionName</code><code>=greetMe</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>defaultOperationNamespace</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> New in 2.4. This option will set the default operationNamespace that will be used by the CxfProducer which invokes the remote service. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>null</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>defaultOperationNamespace</code><code>=</code><code><a shape="rect" class="external-link" href="http://apache.org/hello_world_soap_http">http://apache.org/hello_world_soap_http</a></code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>synchronous</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="c
onfluenceTd"><p> New in 2.5. This option will let cxf endpoint decide to use sync or async API to do the underlying work. The default value is false which means camel-cxf endpoint will try to use async API by default. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>false</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: synchronous=true </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>publishedEndpointUrl</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> New in 2.5. This option can override the endpointUrl that published from the WSDL which can be accessed with service address url plus ?wsdl. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>null</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: publshedEn
dpointUrl=<a shape="rect" class="external-link" href="http://example.com/service" rel="nofollow">http://example.com/service</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>properties.XXX</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.8:</strong> Allows to set custom properties to CXF in the endpoint uri. For example setting <code>properties.mtom-enabled=true</code> to enable MTOM. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>allowStreaming</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> New in 2.8.2. This option controls whether the CXF component, when running in PAYLOAD mode (see below), will DOM parse the incoming messages into DOM Elements or keep the payload as a javax.xml.transform.Source object that would allow streaming in s
ome cases. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>skipFaultLogging</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> New in 2.11. This option controls whether the PhaseInterceptorChain skips logging the Fault that it catches. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>username</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> New in <strong>Camel 2.12.3</strong> This option is used to set the basic authentication information of username for the CXF client. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>password</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> New in <strong>Camel 2.12.3</strong> This option is used to set the basic au
thentication information of password for the CXF client. </p></td></tr></tbody></table></div>
-
-
-<p>The <code>serviceName</code> and <code>portName</code> are <a shape="rect" class="external-link" href="http://en.wikipedia.org/wiki/QName" rel="nofollow">QNames</a>, so if you provide them be sure to prefix them with their {namespace} as shown in the examples above.</p>
-
-<h4 id="BookInOnePage-Thedescriptionsofthedataformats">The descriptions of the dataformats</h4>
-
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> DataFormat </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>POJO</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> POJOs (Plain old Java objects) are the Java parameters to the method being invoked on the target server. Both Protocol and Logical JAX-WS handlers are supported. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>PAYLOAD</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>PAYLOAD</code> is the message payload (the contents of the <code>soap:body</code>) after message configuration in the CXF endpoint is applied. Only Protocol JAX-WS handler is supported. Logical JAX-WS handler is not supported. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>MESSAGE</code
> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>MESSAGE</code> is the raw message that is received from the transport layer. It is not suppose to touch or change Stream, some of the CXF interceptor will be removed if you are using this kind of DataFormat so you can't see any soap headers after the camel-cxf consumer and JAX-WS handler is not supported. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CXF_MESSAGE</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> New in <strong>Camel 2.8.2</strong>, <code>CXF_MESSAGE</code> allows for invoking the full capabilities of CXF interceptors by converting the message from the transport layer into a raw SOAP message</p></td></tr></tbody></table></div>
-
-
-<p>You can determine the data format mode of an exchange by retrieving the exchange property, <code>CamelCXFDataFormat</code>. The exchange key constant is defined in <code>org.apache.camel.component.cxf.CxfConstants.DATA_FORMAT_PROPERTY</code>.</p><h5 id="BookInOnePage-HowtoenableCXF'sLoggingOutInterceptorinMESSAGEmode">How to enable CXF's LoggingOutInterceptor in MESSAGE mode</h5><p>CXF's <code>LoggingOutInterceptor</code> outputs outbound message that goes on the wire to logging system (Java Util Logging). Since the <code>LoggingOutInterceptor</code> is in <code>PRE_STREAM</code> phase (but <code>PRE_STREAM</code> phase is removed in <code>MESSAGE</code> mode), you have to configure <code>LoggingOutInterceptor</code> to be run during the <code>WRITE</code> phase. The following is an example.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookInOnePage-Options.29">Options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Required</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>wsdlURL</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The location of the WSDL. It is obtained from endpoint address by default. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <a shape="rect" class="external-link" href="file://local/wsdl/hello.wsdl" rel="nofollow">file://local/wsdl/hello.wsdl</a> or <code>wsdl/hello.wsdl</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serviceClass</code></p></td><td colspan="1" rowspa
n="1" class="confluenceTd"><p>Yes</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The name of the SEI (Service Endpoint Interface) class. This class can have, but does not require, JSR181 annotations. <br clear="none" class="atl-forced-newline"> This option is only required by POJO mode. If the wsdlURL option is provided, serviceClass is not required for PAYLOAD and MESSAGE mode. When wsdlURL option is used without serviceClass, the serviceName and portName (endpointName for Spring configuration) options <strong>MUST</strong> be provided. It is possible to use <code>#</code> notation to reference a <code>serviceClass</code> object instance from the registry. E.g. <code>serviceClass=#beanName</code>. The <code>serviceClass</code> for a CXF producer (that is, the <code>to</code> endpoint) should be a Java interface.<br clear="none" class="atl-forced-newline"> <strong>Since 2.8,</strong> it is possible to omit both wsdlURL and serviceClass options for PAYLOAD and MESSAGE mo
de. When they are omitted, arbitrary XML elements can be put in CxfPayload's body in PAYLOAD mode to facilitate CXF Dispatch Mode. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> Please be advised that the <strong>referenced object cannot be a Proxy</strong> (Spring AOP Proxy is OK) as it relies on <code>Object.getClass().getName()</code> method for non Spring AOP Proxy. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>org.apache.camel.Hello</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serviceName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The service name this service is implementing, it maps to the <code>wsdl:service@name</code>. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <strong>Required</strong> for camel-
cxf consumer since camel-2.2.0 or if more than one <code>serviceName</code> is present in WSDL. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Example</em>: {http:­//org.apache.camel}ServiceName</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>endpointName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The port name this service is implementing, it maps to the <code>wsdl:port@name</code>. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <strong>Required</strong> for camel-cxf consumer since camel-2.2.0 or if more than one <code>portName</code> is present under <code>serviceName</code>. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Example</em>: {http:­//org.apache.camel}PortName</p></td></tr><tr><td colspan="1" rowspan="1" class="co
nfluenceTd"><p><code>dataFormat</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The data type messages supported by the CXF endpoint. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>POJO</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>POJO</code>, <code>PAYLOAD</code>, <code>MESSAGE</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>relayHeaders</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Please see the <strong>Description of</strong> <code><strong>relayHeaders</strong></code> <strong>option</strong> section for this option. Should a CXF endpoint relay headers along the route. Currently only available when <code>dataFormat=POJO</code> <br clear="none" class="atl-forced-newline"> <br clear="none"
class="atl-forced-newline"> <em>Default</em>: <code>true</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>true</code>, <code>false</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>wrapped</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Which kind of operation that CXF endpoint producer will invoke <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>false</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>true</code>, <code>false</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>wrappedStyle</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>New in 2.5.0</strong> The WSDL style that describes how parameters are represented in the SOAP body.
If the value is false, CXF will chose the document-literal unwrapped style, If the value is true, CXF will chose the document-literal wrapped style <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>Null</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>true</code>, <code>false</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>setDefaultBus</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Will set the default bus when CXF endpoint create a bus by itself <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>false</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>true</code>, <code>false</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bus</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A default bus created by CXF Bus Factory. Use <code>#</code> notation to reference a bus object from the registry. The referenced object must be an instance of <code>org.apache.cxf.Bus</code>. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>bus=#busName</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cxfBinding</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Use <code>#</code> notation to reference a CXF binding object from the registry. The referenced object must be an instance of <code>org.apache.camel.component.cxf.CxfBinding</code> (use an instance of <code>org.apache.camel.component.cxf.DefaultCxfBinding</code>). <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline">
<em>Example</em>: <code>cxfBinding=#bindingName</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>headerFilterStrategy</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Use <code>#</code> notation to reference a header filter strategy object from the registry. The referenced object must be an instance of <code>org.apache.camel.spi.HeaderFilterStrategy</code> (use an instance of <code>org.apache.camel.component.cxf.CxfHeaderFilterStrategy</code>). <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>headerFilterStrategy=#strategyName</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>loggingFeatureEnabled</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in 2.3. This option enables CXF Logging Featur
e which writes inbound and outbound SOAP messages to log. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>false</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>loggingFeatureEnabled</code><code>=true</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>defaultOperationName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in 2.4, this option will set the default operationName that will be used by the CxfProducer which invokes the remote service. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>null</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>defaultOperationName</code><code>=greetMe</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>defaultOperationNames
pace</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in 2.4. This option will set the default operationNamespace that will be used by the CxfProducer which invokes the remote service. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>null</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: <code>defaultOperationNamespace</code><code>=</code><code><a shape="rect" class="external-link" href="http://apache.org/hello_world_soap_http">http://apache.org/hello_world_soap_http</a></code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>synchronous</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in 2.5. This option will let cxf endpoint decide to use sync or async API to do the underlying work. The default value is f
alse which means camel-cxf endpoint will try to use async API by default. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>false</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: synchronous=true</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>publishedEndpointUrl</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in 2.5. This option can override the endpointUrl that published from the WSDL which can be accessed with service address url plus ?wsdl. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>null</code> <br clear="none" class="atl-forced-newline"> <em>Example</em>: publshedEndpointUrl=<a shape="rect" class="external-link" href="http://example.com/service" rel="nofollow">http://example.com/service</a></p></td></tr><tr><td c
olspan="1" rowspan="1" class="confluenceTd"><p><code>properties.XXX</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.8:</strong> Allows to set custom properties to CXF in the endpoint uri. For example setting <code>properties.mtom-enabled=true</code> to enable MTOM.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>allowStreaming</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in 2.8.2. This option controls whether the CXF component, when running in PAYLOAD mode (see below), will DOM parse the incoming messages into DOM Elements or keep the payload as a javax.xml.transform.Source object that would allow streaming in some cases.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>skipFaultLogging</code></p></td><td colspan="1" rowspan="1" class="confluenceT
d"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in 2.11. This option controls whether the PhaseInterceptorChain skips logging the Fault that it catches.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>username</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in <strong>Camel 2.12.3</strong> This option is used to set the basic authentication information of username for the CXF client.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>password</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in <strong>Camel 2.12.3</strong> This option is used to set the basic authentication information of password for the CXF client.</p></td></tr></tbody></table></div><p>The <code>serviceName</code> and <code>portName</code> are <a shape="rect" class="exter
nal-link" href="http://en.wikipedia.org/wiki/QName" rel="nofollow">QNames</a>, so if you provide them be sure to prefix them with their {namespace} as shown in the examples above.</p><h4 id="BookInOnePage-Thedescriptionsofthedataformats">The descriptions of the dataformats</h4><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>DataFormat</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>POJO</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>POJOs (Plain old Java objects) are the Java parameters to the method being invoked on the target server. Both Protocol and Logical JAX-WS handlers are supported.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>PAYLOAD</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>PAYLOAD</code> is the message payload (the contents o
f the <code>soap:body</code>) after message configuration in the CXF endpoint is applied. Only Protocol JAX-WS handler is supported. Logical JAX-WS handler is not supported.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MESSAGE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MESSAGE</code> is the raw message that is received from the transport layer. It is not suppose to touch or change Stream, some of the CXF interceptor will be removed if you are using this kind of DataFormat so you can't see any soap headers after the camel-cxf consumer and JAX-WS handler is not supported.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CXF_MESSAGE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New in <strong>Camel 2.8.2</strong>, <code>CXF_MESSAGE</code> allows for invoking the full capabilities of CXF interceptors by converting the message from the transport layer into a raw SOAP message</p></td
></tr></tbody></table></div><p>You can determine the data format mode of an exchange by retrieving the exchange property, <code>CamelCXFDataFormat</code>. The exchange key constant is defined in <code>org.apache.camel.component.cxf.CxfConstants.DATA_FORMAT_PROPERTY</code>.</p><h5 id="BookInOnePage-HowtoenableCXF'sLoggingOutInterceptorinMESSAGEmode">How to enable CXF's LoggingOutInterceptor in MESSAGE mode</h5><p>CXF's <code>LoggingOutInterceptor</code> outputs outbound message that goes on the wire to logging system (Java Util Logging). Since the <code>LoggingOutInterceptor</code> is in <code>PRE_STREAM</code> phase (but <code>PRE_STREAM</code> phase is removed in <code>MESSAGE</code> mode), you have to configure <code>LoggingOutInterceptor</code> to be run during the <code>WRITE</code> phase. The following is an example.</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[
<bean id="loggingOutInterceptor" class="org.apache.cxf.interceptor.LoggingOutInterceptor">
<!-- it really should have been user-prestream but CXF does have such phase! -->
@@ -21639,15 +21603,8 @@ div.rbtoc1395739186506 li {margin-left:
</property>
</bean>
]]></script>
-</div></div></li><li><p>Other than <code>relayHeaders</code>, there are new properties that can be configured in <code>CxfHeaderFilterStrategy</code>.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Required </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>relayHeaders</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> All message headers will be processed by Message Header Filters <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type</em>: <code>boolean</code> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>true</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>re
layAllMessageHeaders</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> All message headers will be propagated (without processing by Message Header Filters) <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type</em>: <code>boolean</code> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>false</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>allowFilterNamespaceClash</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> No </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> If two filters overlap in activation namespace, the property control how it should be handled. If the value is <code>true</code>, last one wins. If the value is <code>false</code>, it will throw an exception <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type</e
m>: <code>boolean</code> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>false</code> </p></td></tr></tbody></table></div>
-
-
-<h3 id="BookInOnePage-ConfiguretheCXFendpointswithSpring">Configure the CXF endpoints with Spring</h3>
-
-<p>You can configure the CXF endpoint with the Spring configuration file shown below, and you can also embed the endpoint into the <code>camelContext</code> tags. When you are invoking the service endpoint, you can set the <code>operationName</code> and <code>operationNamespace</code> headers to explicitly state which operation you are calling.</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[
-<beans xmlns="http://www.springframework.org/schema/beans"
+</div></div></li><li><p>Other than <code>relayHeaders</code>, there are new properties that can be configured in <code>CxfHeaderFilterStrategy</code>.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Required</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>relayHeaders</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>All message headers will be processed by Message Header Filters <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type</em>: <code>boolean</code> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>true</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>relayAllMessage
Headers</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>All message headers will be propagated (without processing by Message Header Filters) <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type</em>: <code>boolean</code> <br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>false</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>allowFilterNamespaceClash</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If two filters overlap in activation namespace, the property control how it should be handled. If the value is <code>true</code>, last one wins. If the value is <code>false</code>, it will throw an exception <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type</em>: <code>boolean</code>
<br clear="none" class="atl-forced-newline"> <em>Default</em>: <code>false</code></p></td></tr></tbody></table></div><h3 id="BookInOnePage-ConfiguretheCXFendpointswithSpring">Configure the CXF endpoints with Spring</h3><p>You can configure the CXF endpoint with the Spring configuration file shown below, and you can also embed the endpoint into the <code>camelContext</code> tags. When you are invoking the service endpoint, you can set the <code>operationName</code> and <code>operationNamespace</code> headers to explicitly state which operation you are calling.</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[<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxf="http://camel.apache.org/schema/cxf"
xsi:schemaLocation="
@@ -21670,19 +21627,7 @@ div.rbtoc1395739186506 li {margin-left:
</camelContext>
</beans>
]]></script>
-</div></div>
-
-<p>Be sure to include the JAX-WS <code>schemaLocation</code> attribute specified on the root beans element. This allows CXF to validate the file and is required. Also note the namespace declarations at the end of the <code><cxf:cxfEndpoint/></code> tag--these are required because the combined {<code>namespace}localName</code> syntax is presently not supported for this tag's attribute values.</p>
-
-<p>The <code>cxf:cxfEndpoint</code> element supports many additional attributes:</p>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Value </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>PortName</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The endpoint name this service is implementing, it maps to the <code>wsdl:port@name</code>. In the format of <code>ns:PORT_NAME</code> where <code>ns</code> is a namespace prefix valid at this scope. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>serviceName</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The service name this service is implementing, it maps to the <code>wsdl:service@name</code>. In the format of <code>ns:SERVICE_NAME</code> where <code>ns</code> is a namespace prefix valid at this scope. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>wsdlURL</c
ode> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The location of the WSDL. Can be on the classpath, file system, or be hosted remotely. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>bindingId</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The <code>bindingId</code> for the service model to use. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>address</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The service publish address. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>bus</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The bus name that will be used in the JAX-WS endpoint. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>serviceClass</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The class name of the SEI (Service Endpoint Interface) class which could have JSR18
1 annotation or not. </p></td></tr></tbody></table></div>
-
-
-<p>It also supports many child elements:</p>
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Value </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cxf:inInterceptors</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The incoming interceptors for this endpoint. A list of <code><bean></code> or <code><ref></code>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cxf:inFaultInterceptors</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The incoming fault interceptors for this endpoint. A list of <code><bean></code> or <code><ref></code>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cxf:outInterceptors</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The outgoing interceptors for this endpoint. A list of <code><bean></co
de> or <code><ref></code>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cxf:outFaultInterceptors</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The outgoing fault interceptors for this endpoint. A list of <code><bean></code> or <code><ref></code>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cxf:properties</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> A properties map which should be supplied to the JAX-WS endpoint. See below. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cxf:handlers</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> A JAX-WS handler list which should be supplied to the JAX-WS endpoint. See below. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cxf:dataBinding</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> You can specify the which <code>Data
Binding</code> will be use in the endpoint. This can be supplied using the Spring <code><bean class="MyDataBinding"/></code> syntax. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cxf:binding</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> You can specify the <code>BindingFactory</code> for this endpoint to use. This can be supplied using the Spring <code><bean class="MyBindingFactory"/></code> syntax. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cxf:features</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The features that hold the interceptors for this endpoint. A list of {{<bean>}}s or {{<ref>}}s </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cxf:schemaLocations</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The schema locations for endpoint to use. A list of {{<schemaLocation>}}s </p></td></tr><
tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cxf:serviceFactory</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The service factory for this endpoint to use. This can be supplied using the Spring <code><bean class="MyServiceFactory"/></code> syntax </p></td></tr></tbody></table></div>
-
-<div></div></li></ul><p>You can find more advanced examples which show how to provide interceptors , properties and handlers here:<br clear="none"> <a shape="rect" class="external-link" href="http://cwiki.apache.org/CXF20DOC/jax-ws-configuration.html">http://cwiki.apache.org/CXF20DOC/jax-ws-configuration.html</a></p><p><strong>NOTE</strong><br clear="none"> You can use cxf:properties to set the camel-cxf endpoint's dataFormat and setDefaultBus properties from spring configuration file.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Be sure to include the JAX-WS <code>schemaLocation</code> attribute specified on the root beans element. This allows CXF to validate the file and is required. Also note the namespace declarations at the end of the <code><cxf:cxfEndpoint/></code> tag--these are required because the combined {<code>namespace}localName</code> syntax is presently not supported for this tag's attribute values.</p><p>The <code>cxf:cxfEndpoint</code> element supports many additional attributes:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Value</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>PortName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The endpoint name this service is implementing, it maps to the <code>wsdl:port@name</code>. In the format of <code>ns:PORT_NAME</code> where <code>ns</code>
is a namespace prefix valid at this scope.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serviceName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The service name this service is implementing, it maps to the <code>wsdl:service@name</code>. In the format of <code>ns:SERVICE_NAME</code> where <code>ns</code> is a namespace prefix valid at this scope.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>wsdlURL</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The location of the WSDL. Can be on the classpath, file system, or be hosted remotely.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bindingId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The <code>bindingId</code> for the service model to use.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>address</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p
>The service publish address.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bus</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The bus name that will be used in the JAX-WS endpoint.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serviceClass</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The class name of the SEI (Service Endpoint Interface) class which could have JSR181 annotation or not.</p></td></tr></tbody></table></div><p>It also supports many child elements:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Value</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cxf:inInterceptors</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The incoming interceptors for this endpoint. A list of <code><bean></cod
e> or <code><ref></code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cxf:inFaultInterceptors</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The incoming fault interceptors for this endpoint. A list of <code><bean></code> or <code><ref></code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cxf:outInterceptors</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The outgoing interceptors for this endpoint. A list of <code><bean></code> or <code><ref></code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cxf:outFaultInterceptors</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The outgoing fault interceptors for this endpoint. A list of <code><bean></code> or <code><ref></code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cxf:properties</code></p></td><td colspan="1" rowspan
="1" class="confluenceTd"><p>A properties map which should be supplied to the JAX-WS endpoint. See below.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cxf:handlers</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A JAX-WS handler list which should be supplied to the JAX-WS endpoint. See below.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cxf:dataBinding</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>You can specify the which <code>DataBinding</code> will be use in the endpoint. This can be supplied using the Spring <code><bean class="MyDataBinding"/></code> syntax.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cxf:binding</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>You can specify the <code>BindingFactory</code> for this endpoint to use. This can be supplied using the Spring <code><bean class="MyBindingFactory"/></code> syn
tax.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cxf:features</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The features that hold the interceptors for this endpoint. A list of {{<bean>}}s or {{<ref>}}s</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cxf:schemaLocations</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The schema locations for endpoint to use. A list of {{<schemaLocation>}}s</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cxf:serviceFactory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The service factory for this endpoint to use. This can be supplied using the Spring <code><bean class="MyServiceFactory"/></code> syntax</p></td></tr></tbody></table></div><div></div></li></ul><p>You can find more advanced examples which show how to provide interceptors , properties and handlers here:<br clear="none"> <
a shape="rect" class="external-link" href="http://cwiki.apache.org/CXF20DOC/jax-ws-configuration.html">http://cwiki.apache.org/CXF20DOC/jax-ws-configuration.html</a></p><p><strong>NOTE</strong><br clear="none"> You can use cxf:properties to set the camel-cxf endpoint's dataFormat and setDefaultBus properties from spring configuration file.</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[<cxf:cxfEndpoint id="testEndpoint" address="http://localhost:9000/router"
serviceClass="org.apache.camel.component.cxf.HelloService"
endpointName="s:PortName"
@@ -22148,7 +22093,13 @@ public static class MyProcessor implemen
}
}
]]></script>
-</div></div><p><strong>Message Mode:</strong> Attachments are not supported as it does not process the message at all.</p><h3 id="BookInOnePage-StreamingSupportinPAYLOADmode">Streaming Support in PAYLOAD mode</h3><p>In 2.8.2, the camel-cxf component now supports streaming of incoming messages when using PAYLOAD mode. Previously, the incoming messages would have been completely DOM parsed. For large messages, this is time consuming and uses a significant amount of memory. Starting in 2.8.2, the incoming messages can remain as a javax.xml.transform.Source while being routed and, if nothing modifies the payload, can then be directly streamed out to the target destination. For common "simple proxy" use cases (example: from("cxf:...").to("cxf:...")), this can provide very significant performance increases as well as significantly lowered memory requirements.</p><p>However, there are cases where streaming may not be appropriate or desired. Due to the streaming nature, invalid incoming XML
may not be caught until later in the processing chain. Also, certain actions may require the message to be DOM parsed anyway (like WS-Security or message tracing and such) in which case the advantages of the streaming is limited. At this point, there are two ways to control the streaming:</p><ul><li>Endpoint property: you can add "allowStreaming=false" as an endpoint property to turn the streaming on/off.</li></ul><ul><li>Component property: the CxfComponent object also has an allowStreaming property that can set the default for endpoints created from that component.</li></ul><ul><li>Global system property: you can add a system property of "org.apache.camel.component.cxf.streaming" to "false" to turn if off. That sets the global default, but setting the endpoint property above will override this value for that endpoint.</li></ul><p></p><h3 id="BookInOnePage-SeeAlso.29">See Also</h3>
+</div></div><p><strong>Message Mode:</strong> Attachments are not supported as it does not process the message at all.</p><h3 id="BookInOnePage-StreamingSupportinPAYLOADmode">Streaming Support in PAYLOAD mode</h3><p>In 2.8.2, the camel-cxf component now supports streaming of incoming messages when using PAYLOAD mode. Previously, the incoming messages would have been completely DOM parsed. For large messages, this is time consuming and uses a significant amount of memory. Starting in 2.8.2, the incoming messages can remain as a javax.xml.transform.Source while being routed and, if nothing modifies the payload, can then be directly streamed out to the target destination. For common "simple proxy" use cases (example: from("cxf:...").to("cxf:...")), this can provide very significant performance increases as well as significantly lowered memory requirements.</p><p>However, there are cases where streaming may not be appropriate or desired. Due to the streaming nature, invalid incoming XML
may not be caught until later in the processing chain. Also, certain actions may require the message to be DOM parsed anyway (like WS-Security or message tracing and such) in which case the advantages of the streaming is limited. At this point, there are two ways to control the streaming:</p><ul><li>Endpoint property: you can add "allowStreaming=false" as an endpoint property to turn the streaming on/off.</li></ul><ul><li>Component property: the CxfComponent object also has an allowStreaming property that can set the default for endpoints created from that component.</li></ul><p>Global system property: you can add a system property of "org.apache.camel.component.cxf.streaming" to "false" to turn if off. That sets the global default, but setting the endpoint property above will override this value for that endpoint.</p><h3 id="BookInOnePage-UsingthegenericCXFDispatchmode">Using the generic CXF Dispatch mode</h3><p>From 2.8.0, the camel-cxf component supports the generic <a shape="re
ct" href="https://cxf.apache.org/docs/jax-ws-dispatch-api.html">CXF dispatch mode</a> that can transport messages of arbitrary structures (i.e., not bound to a specific XML schema). To use this mode, you simply omit specifying the wsdlURL and serviceClass attributes of the CXF endpoint.</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[<cxf:cxfEndpoint id="testEndpoint" address="http://localhost:9000/SoapContext/SoapAnyPort">
+ <cxf:properties>
+ <entry key="dataFormat" value="PAYLOAD"/>
+ </cxf:properties>
+ </cxf:cxfEndpoint>]]></script>
+</div></div><p>It is noted that the default CXF dispatch client does not send a specific SOAPAction header. Therefore, when the target service requires a specific SOAPAction value, it is supplied in the Camel header using the key SOAPAction (case-insensitive).</p><p> </p><p></p><h3 id="BookInOnePage-SeeAlso.29">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>
<h2 id="BookInOnePage-CXFBeanComponent">CXF Bean Component</h2>
@@ -22924,9 +22875,9 @@ To configure Esper via a configuration f
</div>
</div>
<h3 id="BookInOnePage-URIOptions.1">URI Options</h3><h4 id="BookInOnePage-Common">Common</h4><div class="confluenceTableSmall">
[... 911 lines stripped ...]
Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.