servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache ServiceMix > servicemix-cxf-bc
Date Tue, 25 May 2010 04:09:01 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1810/9/13/_/styles/combined.css?spaceKey=SM&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="http://cwiki.apache.org/confluence/display/SM/servicemix-cxf-bc">servicemix-cxf-bc</a></h2>
    <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~ffang">Freeman
Fang</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
            <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >[here|http://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/rm/CxfBcRMSequenceTest.java]
<br>h3. More about [Cxf WS-RM|http://cwiki.apache.org/CXF20DOC/ws-reliablemessaging.html]
implementation <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">
<br>h2. Interceptors Configuration <br>Since cxfbc is using [Apache CXF|http://cxf.apache.org/]
internally, so you can configure cxf bc endpoint with inteceptors which follow cxf inteceptor
api. <br>example per as below <br>{code:lang=xml} <br> &lt;cxfbc:consumer
wsdl=&quot;...&quot;&gt; <br>         &lt;cxfbc:inInterceptors&gt;
<br>          &lt;bean class=&quot;org.apache.cxf.interceptor.LoggingInInterceptor&quot;/&gt;
<br>        &lt;/cxfbc:inInterceptors&gt; <br>        &lt;cxfbc:outInterceptors&gt;
<br>          &lt;bean class=&quot;org.apache.cxf.interceptor.LoggingOutInterceptor&quot;/&gt;
<br>        &lt;/cxfbc:outInterceptors&gt; <br>        &lt;cxfbc:inFaultInterceptors&gt;
<br>          &lt;bean class=&quot;org.apache.cxf.interceptor.LoggingInInterceptor&quot;/&gt;
<br>        &lt;/cxfbc:inFaultInterceptors&gt; <br>        &lt;cxfbc:outFaultInterceptors&gt;
<br>          &lt;bean class=&quot;org.apache.cxf.interceptor.LoggingOutInterceptor&quot;/&gt;
<br>        &lt;/cxfbc:outFaultInterceptors&gt; <br>   &lt;/cxfbc:consumer&gt;
<br> <br>{code} <br> <br>Can find document for CXF interceptors [here|http://cwiki.apache.org/confluence/display/CXF20DOC/Interceptors]
<br> <br>h2. Features configuration <br>You can also configure cxf features
directly on cxf bc endpoint. Example per as below <br>{code:lang=xml} <br> &lt;cxfbc:consumer
wsdl=&quot;...&quot;&gt; <br>     &lt;cxfbc:features&gt; <br>
          &lt;bean class=&quot;org.apache.cxf.transport.jms.JMSConfigFeature&quot;&gt;
<br>                &lt;property name=&quot;jmsConfig&quot;&gt; <br>
                   &lt;bean class=&quot;org.apache.cxf.transport.jms.JMSConfiguration&quot;&gt;
<br>                        &lt;property name=&quot;concurrentConsumers&quot;&gt;
<br>                            &lt;value&gt;5&lt;/value&gt; <br>
                       &lt;/property&gt; <br>                        &lt;property
name=&quot;connectionFactory&quot;&gt; <br>                            &lt;ref
bean=&quot;myConnectionFactory&quot; /&gt; <br>                        &lt;/property&gt;
<br>                        &lt;property name=&quot;targetDestination&quot;&gt;
<br>                            &lt;value&gt;test.jmstransport.text&lt;/value&gt;
<br>                        &lt;/property&gt; <br>                   
    &lt;property name=&quot;useJms11&quot;&gt; <br>                
           &lt;value&gt;false&lt;/value&gt; <br>                   
    &lt;/property&gt; <br>                    &lt;/bean&gt; <br>
               &lt;/property&gt; <br>            &lt;/bean&gt; <br>
       &lt;/cxfbc:features&gt; <br>&lt;/cxfbc:consumer&gt; <br>{code}
<br></td></tr>
        </table>
</div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h1><a name="servicemix-cxf-bc-servicemixcxfbc"></a>servicemix-cxf-bc</h1>

<p>ServiceMix ships with a JBI compliant HTTP/SOAP or JMS/SOAP binding component named
servicemix-cxf-bc which use <a href="http://incubator.apache.org/cxf" class="external-link"
rel="nofollow">apache cxf</a> internally.</p>

<p>Here are the main features:</p>
<ul>
	<li>JBI compliant Binding Component</li>
	<li>Usable in a lightweight mode in servicemix.xml configuration files</li>
	<li>SOAP 1.1 and 1.2 support</li>
	<li>MIME attachments</li>
	<li>Support for all MEPs as consumers or providers</li>
	<li>SSL support</li>
	<li>WS-Security support</li>
	<li>WS-Policy support</li>
	<li>WS-RM support</li>
	<li>WS-Addressing support</li>
</ul>


<h2><a name="servicemix-cxf-bc-Installation"></a>Installation</h2>

<p>Installing the servicemix-cxf-bc component can be done in several ways:</p>
<ul>
	<li>drop the installer zip in an hotdeploy directory monitored by ServiceMix</li>
	<li>using <a href="/confluence/display/SM/Ant+Tasks" title="Ant Tasks">ant tasks</a></li>
</ul>


<p>Note that when using ant tasks, the component is not started, you will have to start
it manually using ant tasks or a console.</p>


<h2><a name="servicemix-cxf-bc-XBeandeployment"></a>XBean deployment</h2>

<p>You can deploy Service Units containing a file named xbean.xml for activating consumer
and provider endpoints.<br/>
This xml file should respect the given <a href="http://people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/servicemix/servicemix-cxf-bc/3.2/servicemix-cxf-bc-3.2-schema.html"
class="external-link" rel="nofollow">syntax</a>, though this is a spring based xml
configuration file<br/>
See a full example <a href="http://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/cxf_provider_consumer_bridge.xml"
class="external-link" rel="nofollow">here</a>.&nbsp; Note that you have to define
the http namespace with</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;beans <span class="code-keyword">xmlns:http</span>=<span
class="code-quote">"http://servicemix.apache.org/cxfbc/1.0"</span>&gt;</span>
    ...
<span class="code-tag">&lt;/beans&gt;</span>
</pre>
</div></div>
<p>Any numbers of endpoints can be specified in the xbean.xml file.</p>

<h3><a name="servicemix-cxf-bc-Consumerendpoint"></a>Consumer endpoint</h3>

<p>A consumer endpoint is a server-side cxf endpoint that will consume plain HTTP+SOAP
requests and send them into the NMR to a given JBI endpoint, which is called the proxied endpoint.</p>

<p>Following is an example of an http consumer endpoint.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
&lt;cxfbc:consumer wsdl=<span class="code-quote">"/wsdl/calculator.wsdl"</span>
                      service=<span class="code-quote">"calculator:CalculatorService"</span>
                      endpoint=<span class="code-quote">"CalculatorPort"</span>
                      targetEndpoint=<span class="code-quote">"CalculatorPortProxy"</span>
                      targetService=<span class="code-quote">"calculator:CalculatorService"</span>
                      targetInterface=<span class="code-quote">"calculator:CalculatorPortType"</span>&gt;
          
<span class="code-tag">&lt;/cxfbc:consumer&gt;</span>
</pre>
</div></div>

<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"></td><td><b>Consumer
endpoint attributes</b><br /><div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Name </th>
<th class='confluenceTh'> Type </th>
<th class='confluenceTh'> Description </th>
<th class='confluenceTh'> Required </th>
</tr>
<tr>
<td class='confluenceTd'> wsdl </td>
<td class='confluenceTd'> String </td>
<td class='confluenceTd'> the wsdl will be retrieved from the given location </td>
<td class='confluenceTd'>  yes </td>
</tr>
<tr>
<td class='confluenceTd'> service </td>
<td class='confluenceTd'> QName </td>
<td class='confluenceTd'> the service name of the proxied endpoint </td>
<td class='confluenceTd'> no (required if the WSDL has more than one service) </td>
</tr>
<tr>
<td class='confluenceTd'> endpoint </td>
<td class='confluenceTd'> String </td>
<td class='confluenceTd'> the endpoint name of the proxied endpoint </td>
<td class='confluenceTd'> no (required if the specified service has more than one endpoint)
</td>
</tr>
<tr>
<td class='confluenceTd'> interfaceName </td>
<td class='confluenceTd'> QName </td>
<td class='confluenceTd'> the interface name of the proxied endpoint </td>
<td class='confluenceTd'> no </td>
</tr>
<tr>
<td class='confluenceTd'> targetService </td>
<td class='confluenceTd'> QName </td>
<td class='confluenceTd'> the service name of the target endpoint </td>
<td class='confluenceTd'> no (defaults to the service attribute) </td>
</tr>
<tr>
<td class='confluenceTd'> targetEndpoint </td>
<td class='confluenceTd'> String </td>
<td class='confluenceTd'> the endpoint name of the target endpoint </td>
<td class='confluenceTd'> no (defaults to the endpoint attribute) </td>
</tr>
<tr>
<td class='confluenceTd'> targetInterfaceName </td>
<td class='confluenceTd'> QName </td>
<td class='confluenceTd'> the interface name of the target endpoint </td>
<td class='confluenceTd'> no </td>
</tr>
<tr>
<td class='confluenceTd'> busCfg </td>
<td class='confluenceTd'> String </td>
<td class='confluenceTd'> the spring configuration file used for cxf bus initialization</td>
<td class='confluenceTd'> no </td>
</tr>
<tr>
<td class='confluenceTd'> mtomEnabled </td>
<td class='confluenceTd'> boolean </td>
<td class='confluenceTd'> Enable MTOM / attachment support </td>
<td class='confluenceTd'> no (defaults to false) </td>
</tr>
<tr>
<td class='confluenceTd'> synchronous </td>
<td class='confluenceTd'> boolean </td>
<td class='confluenceTd'> Specifies if the endpoint expects send messageExchange by
sendSync </td>
<td class='confluenceTd'> no (defaults to false) </td>
</tr>
<tr>
<td class='confluenceTd'> useJBIWrapper </td>
<td class='confluenceTd'> boolean </td>
<td class='confluenceTd'>Specifies if the endpoint expects messages to use the JBI wrapper
 for SOAP messages.</td>
<td class='confluenceTd'> no (defaults to true,Ignore the value of useSOAPEnvelope if
useJBIWrapper is true) </td>
</tr>
<tr>
<td class='confluenceTd'> useSOAPEnvelope </td>
<td class='confluenceTd'> boolean </td>
<td class='confluenceTd'> Specifies if the endpoint expects soap messages when useJBIWrapper
is false </td>
<td class='confluenceTd'> no (defaults to true) </td>
</tr>
<tr>
<td class='confluenceTd'> locationURI </td>
<td class='confluenceTd'> String </td>
<td class='confluenceTd'> Specifies the HTTP address to which requests are sent. This
value will overide any value specified in the WSDL. </td>
<td class='confluenceTd'> no (if provided the value will override the URL defined in
the WSDL) </td>
</tr>
<tr>
<td class='confluenceTd'> timeout </td>
<td class='confluenceTd'> long </td>
<td class='confluenceTd'> Specifies the interval for which the endpoint will wait for
a response, This is specified in seconds. </td>
<td class='confluenceTd'> no (defaults to 0 which means wait until response back) </td>
</tr>
<tr>
<td class='confluenceTd'> x509 </td>
<td class='confluenceTd'> boolean </td>
<td class='confluenceTd'> Specifies if the endpoint use X.509 Certificate to do the
authentication. </td>
<td class='confluenceTd'> no (defaults to false),  by default we delegate AA to SMX
JAASAuthenticationService with ws-security UsernameToken, if we set this flag as true, we
can check for X.509 certificate to run authentication with</td>
</tr>
<tr>
<td class='confluenceTd'> delegateToJaas </td>
<td class='confluenceTd'> boolean </td>
<td class='confluenceTd'> Specifies if the endpoint delegate to JAASAuthenticationService
to do the authentication. </td>
<td class='confluenceTd'> no (defaults to true) If we only want ws-security get involved
and don't want to delegate to  SMX JAASAuthenticationService then set this flag as false</td>
</tr>
<tr>
<td class='confluenceTd'> schemaValidationEnabled </td>
<td class='confluenceTd'> boolean </td>
<td class='confluenceTd'> Specifies if the endpoint use schemavalidation for the incoming/outgoing
message. </td>
<td class='confluenceTd'> no (defaults to false) </td>
</tr>
<tr>
<td class='confluenceTd'> properties </td>
<td class='confluenceTd'> Map </td>
<td class='confluenceTd'> Sets arbitrary properties that are added to the CXF context
at the Endpoint level. </td>
<td class='confluenceTd'> no </td>
</tr>
</tbody></table>
</div>
</td></tr></table></div>
<p>The <b>targetService</b>, <b>targetEndpoint</b> and <b>targetInterfaceName</b>
attributes can be used to specify the routing method to use (routing by interface, service
or endpoint) and is also useful to allow several proxy endpoints to be created for the same
JBI endpoint.  </p>
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/warning.gif" width="16" height="16"
align="absmiddle" alt="" border="0"></td><td>We leverage all ws-* features
from apache cxf by means of putting configuration into busCfg which is used for cxf bus initialization</td></tr></table></div>

<h3><a name="servicemix-cxf-bc-Providerendpoint"></a>Provider endpoint</h3>

<p>A provider endpoint is a client-side jbi endpoint which can receive requests from
the NMR and send them to a given url where the service is provided.</p>

<p>Here is an example of an http provider endpoint:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
&lt;cxfbc:provider wsdl=<span class="code-quote">"/wsdl/calculator.wsdl"</span>
                      locationURI=<span class="code-quote">"http://localhost:9001/bridgetest"</span>
                      service=<span class="code-quote">"calculator:CalculatorService"</span>
                      endpoint=<span class="code-quote">"CalculatorPortProxy"</span>
                      interfaceName=<span class="code-quote">"calculator:CalculatorPortType"</span>&gt;

<span class="code-tag">&lt;/cxfbc:provider&gt;</span>
</pre>
</div></div>
<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"></td><td><b>Provider
endpoint attributes</b><br /><div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Name </th>
<th class='confluenceTh'> Type </th>
<th class='confluenceTh'> Description </th>
<th class='confluenceTh'> Required </th>
</tr>
<tr>
<td class='confluenceTd'> wsdl </td>
<td class='confluenceTd'> String </td>
<td class='confluenceTd'> the wsdl will be retrieved from the given location </td>
<td class='confluenceTd'> yes </td>
</tr>
<tr>
<td class='confluenceTd'> service </td>
<td class='confluenceTd'> QName </td>
<td class='confluenceTd'> the service name of the exposed jbi endpoint </td>
<td class='confluenceTd'> yes </td>
</tr>
<tr>
<td class='confluenceTd'> endpoint </td>
<td class='confluenceTd'> String </td>
<td class='confluenceTd'> the endpoint name of the exposed jbi endpoint </td>
<td class='confluenceTd'> yes </td>
</tr>
<tr>
<td class='confluenceTd'> interfaceName </td>
<td class='confluenceTd'> QName </td>
<td class='confluenceTd'> the interface name of the exposed jbi endpoint </td>
<td class='confluenceTd'> no </td>
</tr>
<tr>
<td class='confluenceTd'> locationURI </td>
<td class='confluenceTd'> URI </td>
<td class='confluenceTd'> the http url of the target service </td>
<td class='confluenceTd'> no (if provided the value will override the URL defined in
the WSDL) </td>
</tr>
<tr>
<td class='confluenceTd'> busCfg </td>
<td class='confluenceTd'> String </td>
<td class='confluenceTd'> the spring configuration file used for cxf bus initialization</td>
<td class='confluenceTd'> no</td>
</tr>
<tr>
<td class='confluenceTd'> mtomEnabled </td>
<td class='confluenceTd'> boolean </td>
<td class='confluenceTd'> Enable MTOM / attachment support </td>
<td class='confluenceTd'> no (defaults to false) </td>
</tr>
<tr>
<td class='confluenceTd'> useJBIWrapper </td>
<td class='confluenceTd'> boolean </td>
<td class='confluenceTd'>Specifies if the endpoint expects messages to use the JBI wrapper
 for SOAP messages.</td>
<td class='confluenceTd'> no (defaults to true,Ignore the value of useSOAPEnvelope if
useJBIWrapper is true) </td>
</tr>
<tr>
<td class='confluenceTd'> useSOAPEnvelope </td>
<td class='confluenceTd'> boolean </td>
<td class='confluenceTd'> Specifies if the endpoint expects soap messages when useJBIWrapper
is false </td>
<td class='confluenceTd'> no (defaults to true) </td>
</tr>
<tr>
<td class='confluenceTd'> schemaValidationEnabled </td>
<td class='confluenceTd'> boolean </td>
<td class='confluenceTd'> Specifies if the endpoint use schemavalidation for the incoming/outgoing
message. </td>
<td class='confluenceTd'> no (defaults to false) </td>
</tr>
<tr>
<td class='confluenceTd'> properties </td>
<td class='confluenceTd'> Map </td>
<td class='confluenceTd'> Sets arbitrary properties that are added to the CXF context
at the Endpoint level. </td>
<td class='confluenceTd'> no </td>
</tr>
</tbody></table>
</div>
</td></tr></table></div>
<p>It is important to note that you need to include the classpath element in your xbean.xml
if you are deploying the Cxf Provider in a service unit so that the wsdl can correctly find
the classpath element.&nbsp; Also you need to ensure that the service name and endpoint
match the service and port elements of the WSDL that you wish to use to correctly return WSDL
for the endpoint,&nbsp; remembering that the service name will use the targetNamespace
for the WSDL.</p>



<h2><a name="servicemix-cxf-bc-Lightweightmode"></a>Lightweight mode</h2>

<p>The servicemix-cxf-bc component can also be configured in a spring/xbean configuration
file, for use in an embedded ServiceMix.<br/>
Here is an example of such a configuration:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;sm:activationSpec&gt;</span>
  <span class="code-tag">&lt;sm:component&gt;</span>
    <span class="code-tag">&lt;cxfbc:component&gt;</span>
      &lt;cxfbc:consumer wsdl=<span class="code-quote">"/wsdl/calculator.wsdl"</span>
                      service=<span class="code-quote">"calculator:CalculatorService"</span>
                      endpoint=<span class="code-quote">"CalculatorPort"</span>
                      targetEndpoint=<span class="code-quote">"CalculatorPortProxy"</span>
                      targetService=<span class="code-quote">"calculator:CalculatorService"</span>
                      targetInterface=<span class="code-quote">"calculator:CalculatorPortType"</span>&gt;
          
      <span class="code-tag">&lt;/cxfbc:consumer&gt;</span>
&lt;cxfbc:provider wsdl=<span class="code-quote">"/wsdl/calculator.wsdl"</span>
                      locationURI=<span class="code-quote">"http://localhost:9001/bridgetest"</span>
                      service=<span class="code-quote">"calculator:CalculatorService"</span>
                      endpoint=<span class="code-quote">"CalculatorPortProxy"</span>
                      interfaceName=<span class="code-quote">"calculator:CalculatorPortType"</span>
                     &gt;
      <span class="code-tag">&lt;/cxfbc:provider&gt;</span>
    <span class="code-tag">&lt;/cxfbc:component&gt;</span>
  <span class="code-tag">&lt;/sm:component&gt;</span>
<span class="code-tag">&lt;/sm:activationSpec&gt;</span>


</pre>
</div></div>
<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/forbidden.gif" width="16"
height="16" align="absmiddle" alt="" border="0"></td><td><b>Classpath
issues when embedding servicemix-cxf-bc component</b><br />When using the servicemix.xml
configuration file to create cxfbc endpoints, you must include the servicemix-cxf-bc-xxx.jar
in your classpath.<br/>
You will find this file inside the component installer (./components/servicemix-cxf-bc-xxx.zip).<br/>
Failing this, an IllegalArgumentException will be thrown with the following message:<br/>
 Component name: xxxxxx is bound to an object which is not a JBI component, it is of type:
javax.xml.namespace.QName</td></tr></table></div>

<h2><a name="servicemix-cxf-bc-WSAddressing"></a>WS-Addressing</h2>

<p>When used on a SOAP consumer endpoint, servicemix-http handles the WS-Adressing Action
and To headers.</p>

<h3><a name="servicemix-cxf-bc-wsa%3AAction"></a>wsa:Action</h3>

<p>The wsa:Action header can be used to specify the target interface name and operation
to use for the JBI exchange.</p>

<p>The header uses the following syntax:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
[target namespace][delimiter][<span class="code-keyword">interface</span> name][delimiter][operation
name]
</pre>
</div></div>
<p>where:</p>
<ul>
	<li>[delimiter] is ":" when the [target namespace] is a URN, otherwise "/".</li>
	<li>[target namespace] is the namespace of the interface.</li>
	<li>[interface name] is the name of the interface.</li>
	<li>[operation name] is the name of the operation.</li>
</ul>


<p>For example, the following header</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;wsa:Action&gt;</span>http://example.com/stockquote/StockQuoteInterface/GetLastTradePrice<span
class="code-tag">&lt;/wsa:Action&gt;</span>
</pre>
</div></div>
<p>will be used to address the JBI exchange with the following properties:</p>
<ul>
	<li>interface name: {<a href="http://example.com/stockquote" class="external-link"
rel="nofollow">http://example.com/stockquote\</a>}StockQuoteInterface</li>
	<li>operation name: {<a href="http://example.com/stockquote" class="external-link"
rel="nofollow">http://example.com/stockquote\</a>}GetLastTradePrice</li>
</ul>


<h3><a name="servicemix-cxf-bc-wsa%3ATo"></a>wsa:To</h3>

<p>The wsa:To header specifies the target JBI service name and endpoint name.</p>

<p>The header uses the following syntax:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
[target namespace][delimiter][service name][delimiter][endpoint name]
</pre>
</div></div>
<p>where:</p>
<ul>
	<li>[delimiter] is ":" when the [target namespace] is a URN, otherwise "/".</li>
	<li>[target namespace] is the namespace of the interface.</li>
	<li>[service name] is the name of the service.</li>
	<li>[endpoint name] is the name of the endpoint.</li>
</ul>


<p>For example, the following header</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;wsa:To&gt;</span>urn:example:stockquote:StockQuoteService:JBIEndpoint<span
class="code-tag">&lt;/wsa:To&gt;</span>
</pre>
</div></div>
<p>will be used to address the JBI exchange with the following properties:</p>
<ul>
	<li>service name: {urn:example:stockquote}StockQuoteService</li>
	<li>endpoint name: JBIEndpoint
<h3><a name="servicemix-cxf-bc-YoucanfindaWSAddressingtestcasehere"></a>You
can find a WS-Addressing test case <a href="http://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/addressing/CxfBcAddressingTest.java"
class="external-link" rel="nofollow">here</a></h3>
<h3><a name="servicemix-cxf-bc-MoreaboutCxfWSAddressing"></a>More about
<a href="http://cwiki.apache.org/CXF20DOC/ws-addressing.html" class="external-link" rel="nofollow">Cxf
WS-Addressing</a> implementation</h3></li>
</ul>



<h2><a name="servicemix-cxf-bc-WSPolicy"></a>WS-Policy</h2>
<h3><a name="servicemix-cxf-bc-YoucanfindaWSPolicytestcase"></a>You can
find a WS-Policy test case </h3>
<p><a href="http://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/policy/CxfBCPolicyTest.java"
class="external-link" rel="nofollow">here</a></p>
<h3><a name="servicemix-cxf-bc-MoreaboutCxfWSPolicy"></a>More about <a
href="http://cwiki.apache.org/CXF20DOC/ws-policy.html" class="external-link" rel="nofollow">Cxf
WS-Policy</a> implementation</h3>

<h2><a name="servicemix-cxf-bc-WSSecurity"></a>WS-Security</h2>
<h3><a name="servicemix-cxf-bc-YoucanfindaWSSecuritytestcase"></a>You can
find a WS-Security test case</h3>
<p><a href="http://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBCSecurityTest.java"
class="external-link" rel="nofollow">here</a></p>
<h3><a name="servicemix-cxf-bc-MoreaboutCxfWSSecurity"></a>More about <a
href="http://cwiki.apache.org/CXF20DOC/ws-security.html" class="external-link" rel="nofollow">Cxf
WS-Security</a> implementation</h3>

<h2><a name="servicemix-cxf-bc-WSRM"></a>WS-RM</h2>
<h3><a name="servicemix-cxf-bc-YoucanfindaWSRMtestcase"></a>You can find
a WS-RM test case</h3>
<p><a href="http://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/rm/CxfBcRMSequenceTest.java"
class="external-link" rel="nofollow">here</a></p>
<h3><a name="servicemix-cxf-bc-MoreaboutCxfWSRM"></a>More about <a href="http://cwiki.apache.org/CXF20DOC/ws-reliablemessaging.html"
class="external-link" rel="nofollow">Cxf WS-RM</a> implementation</h3>

<h2><a name="servicemix-cxf-bc-InterceptorsConfiguration"></a>Interceptors
Configuration</h2>
<p>Since cxfbc is using <a href="http://cxf.apache.org/" class="external-link" rel="nofollow">Apache
CXF</a> internally, so you can configure cxf bc endpoint with inteceptors which follow
cxf inteceptor api.<br/>
example per as below</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
 <span class="code-tag">&lt;cxfbc:consumer wsdl=<span class="code-quote">"..."</span>&gt;</span>
         <span class="code-tag">&lt;cxfbc:inInterceptors&gt;</span>
          <span class="code-tag">&lt;bean class=<span class="code-quote">"org.apache.cxf.interceptor.LoggingInInterceptor"</span>/&gt;</span>
        <span class="code-tag">&lt;/cxfbc:inInterceptors&gt;</span>
        <span class="code-tag">&lt;cxfbc:outInterceptors&gt;</span>
          <span class="code-tag">&lt;bean class=<span class="code-quote">"org.apache.cxf.interceptor.LoggingOutInterceptor"</span>/&gt;</span>
        <span class="code-tag">&lt;/cxfbc:outInterceptors&gt;</span>
        <span class="code-tag">&lt;cxfbc:inFaultInterceptors&gt;</span>
          <span class="code-tag">&lt;bean class=<span class="code-quote">"org.apache.cxf.interceptor.LoggingInInterceptor"</span>/&gt;</span>
        <span class="code-tag">&lt;/cxfbc:inFaultInterceptors&gt;</span>
        <span class="code-tag">&lt;cxfbc:outFaultInterceptors&gt;</span>
          <span class="code-tag">&lt;bean class=<span class="code-quote">"org.apache.cxf.interceptor.LoggingOutInterceptor"</span>/&gt;</span>
        <span class="code-tag">&lt;/cxfbc:outFaultInterceptors&gt;</span>
   <span class="code-tag">&lt;/cxfbc:consumer&gt;</span>

</pre>
</div></div>

<p>Can find document for CXF interceptors <a href="http://cwiki.apache.org/confluence/display/CXF20DOC/Interceptors"
class="external-link" rel="nofollow">here</a></p>

<h2><a name="servicemix-cxf-bc-Featuresconfiguration"></a>Features configuration</h2>
<p>You can also configure cxf features directly on cxf bc endpoint. Example per as below</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
 <span class="code-tag">&lt;cxfbc:consumer wsdl=<span class="code-quote">"..."</span>&gt;</span>
     <span class="code-tag">&lt;cxfbc:features&gt;</span>
           <span class="code-tag">&lt;bean class=<span class="code-quote">"org.apache.cxf.transport.jms.JMSConfigFeature"</span>&gt;</span>
                <span class="code-tag">&lt;property name=<span class="code-quote">"jmsConfig"</span>&gt;</span>
                    <span class="code-tag">&lt;bean class=<span class="code-quote">"org.apache.cxf.transport.jms.JMSConfiguration"</span>&gt;</span>
                        <span class="code-tag">&lt;property name=<span class="code-quote">"concurrentConsumers"</span>&gt;</span>
                            <span class="code-tag">&lt;value&gt;</span>5<span
class="code-tag">&lt;/value&gt;</span>
                        <span class="code-tag">&lt;/property&gt;</span>
                        <span class="code-tag">&lt;property name=<span class="code-quote">"connectionFactory"</span>&gt;</span>
                            <span class="code-tag">&lt;ref bean=<span class="code-quote">"myConnectionFactory"</span>
/&gt;</span>
                        <span class="code-tag">&lt;/property&gt;</span>
                        <span class="code-tag">&lt;property name=<span class="code-quote">"targetDestination"</span>&gt;</span>
                            <span class="code-tag">&lt;value&gt;</span>test.jmstransport.text<span
class="code-tag">&lt;/value&gt;</span>
                        <span class="code-tag">&lt;/property&gt;</span>
                        <span class="code-tag">&lt;property name=<span class="code-quote">"useJms11"</span>&gt;</span>
                            <span class="code-tag">&lt;value&gt;</span>false<span
class="code-tag">&lt;/value&gt;</span>
                        <span class="code-tag">&lt;/property&gt;</span>
                    <span class="code-tag">&lt;/bean&gt;</span>
                <span class="code-tag">&lt;/property&gt;</span>
            <span class="code-tag">&lt;/bean&gt;</span>
        <span class="code-tag">&lt;/cxfbc:features&gt;</span>
<span class="code-tag">&lt;/cxfbc:consumer&gt;</span>
</pre>
</div></div>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="http://cwiki.apache.org/confluence/display/SM/servicemix-cxf-bc">View
Online</a>
        |
        <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=72249&revisedVersion=16&originalVersion=15">View
Changes</a>
                |
        <a href="http://cwiki.apache.org/confluence/display/SM/servicemix-cxf-bc?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message