[jboss-cvs] JBossAS SVN: r104031 - projects/docs/enterprise/5.0/CXF_User_Guide/en-US.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Apr 15 21:33:11 EDT 2010


Author: rebecca.newton
Date: 2010-04-15 21:33:11 -0400 (Thu, 15 Apr 2010)
New Revision: 104031

Added:
   projects/docs/enterprise/5.0/CXF_User_Guide/en-US/Chapter_Five_WXF_Addressing_Config.xml
Log:
Added Chapter Five

Added: projects/docs/enterprise/5.0/CXF_User_Guide/en-US/Chapter_Five_WXF_Addressing_Config.xml
===================================================================
--- projects/docs/enterprise/5.0/CXF_User_Guide/en-US/Chapter_Five_WXF_Addressing_Config.xml	                        (rev 0)
+++ projects/docs/enterprise/5.0/CXF_User_Guide/en-US/Chapter_Five_WXF_Addressing_Config.xml	2010-04-16 01:33:11 UTC (rev 104031)
@@ -0,0 +1,101 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+
+]>
+<!-- Copyright 2010 Red Hat, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.--> 
+<chapter>
+  <title> Addressing Configuration </title>
+  <para>Two things are necessary in order to use WS-Addressing in a message exchange:
+  
+  <orderedlist>
+    <listitem>
+      <para>
+        The addressing interceptors <classname>org.apache.cxf.ws.addressing.MAPAggregator</classname> and <classname>org.apache.cxf.ws.addressing.soap.MAPCodec</classname> need to be on the inbound and outbound interceptor chains.
+      </para>
+    </listitem>
+    <listitem>
+      <para>
+        WS-Addressing is being used if any of the following elements have a <classname>UsingAddress xmlns="http://www.w3.org/2005/02/addressing/wsdl"</classname> element:
+      </para>
+      <orderedlist>
+         <listitem>
+            <para><varname>&lt;wsdl:port&gt;</varname></para>
+         </listitem>
+         <listitem>
+          <para><varname>&lt;wsdl:service&gt;</varname></para>
+         </listitem>        
+         <listitem>
+            <para><varname>&lt;wsdl:binding&gt;</varname></para>             
+         </listitem>
+       </orderedlist>
+    </listitem>
+  </orderedlist>
+
+<!-- Note that for 2.2 to take effect, CXF's policy engine must be enabled, see WS-Policy Framework Configuration. LINK TO CHAP WHEN BUILT -->
+   </para>
+  <section>
+    <title> Using the Addressing Feature </title>
+  <para>The addressing feature element is defined in <!--namespace http://cxf.apache.org/ws/addressing-->. It supports two attributes:
+
+    <variablelist>
+      <varlistentry> 
+        <term> allowDuplicates </term>
+      <listitem>
+        <para> A boolean that determines if duplicate MessageIDs are tolerated (default: true).</para>
+      </listitem>
+      </varlistentry>
+      <varlistentry> 
+        <term> usingAddressingAdvisory </term>
+      <listitem> 
+        <para> A boolean that indicates if the presence of the <varname> UsingAddressing </varname> 
+        element  in the wsdl is purely advisory, i.e. its absence doesn't prevent the encoding of 
+        WS-A headers. This is especially useful to enable WS-Addressing in the java-first case, where 
+        you have no <varname>wsdl</varname> and hence none of the conditons in 2.1 and 2.2 will be met.</para>
+      </listitem>
+    </varlistentry>
+   </variablelist>
+For example, to apply this feature to a JAX-WS server endpoint: </para>
+
+<programlisting><![CDATA[ <beans ... xmlns:wsa="http://cxf.apache.org/ws/addressing" ...>
+    <jaxws:endpoint ...>
+        <jaxws:features>
+            <wsa:addressing allowDuplicates="false"/>
+        </jaxws:features>
+    </bean>
+</beans>]]> </programlisting>
+</section>
+
+ <section>
+ <title> Adding the Addressing Interceptors Manually </title>
+  <para> <classname> org.apache.cxf.ws.addressing.MAPAggregator</classname> and 
+  <classname> org.apache.cxf.ws.addressing.soap.MAPCodec </classname> must be added to the interceptor 
+    chain  for inbound and outbound messages and faults. On a global level, i.e. applicable to all client 
+    and server endpoints, this can be done as in the example below (see also Bus Configuration). Note 
+    that, as allowDuplicates and usingAddressingAdvisory are actually properties of the 
+    MAPAggregator interceptor, they can also be set using Spring syntax.</para>
+
+<programlisting> <![CDATA[<bean id="mapAggregator" class="org.apache.cxf.ws.addressing.MAPAggregator">
+    <property name="allowDuplicates" value="false"/>
+</bean>
+<bean id="mapCodec" class="org.apache.cxf.ws.addressing.soap.MAPCodec"/>
+
+<cxf:bus>
+    <cxf:inInterceptors>
+        <ref bean="mapAggregator"/>
+        <ref bean="mapCodec"/>
+    </cxf:inInterceptors>
+    <cxf:inFaultInterceptors>
+        <ref bean="mapAggregator"/>
+        <ref bean="mapCodec"/>
+    </cxf:inFaultInterceptors>
+    <cxf:outInterceptors>
+        <ref bean="mapAggregator"/>
+        <ref bean="mapCodec"/>
+    </cxf:outInterceptors>
+    <cxf:outFaultInterceptors>
+        <ref bean="mapAggregator"/>
+        <ref bean="mapCodec"/>
+    </cxf:outFaultInterceptors>
+</cxf:bus>]]> </programlisting>
+</section>
+</chapter>




More information about the jboss-cvs-commits mailing list