WS-Addressing Configuration

In order to use WS-Addressing in a message exchange, two things are necessary:

  1. The addressing interceptors ( and need to be on the inbound and outbound interceptor chains.
  2. The use of WS-Addressing is indicated by one of the following:
    1. A <UsingAddressing xmlns=""> element is attached to the <wsdl:port>, <wsdl:service> or <wsdl:binding> element.
    2. The (chosen alternative for the) effective policy of the message contains a <Addressing xmlns=""> assertion or a <UsingAddressing> assertion from either one of the following three namespaces:,,
    3. Property in the message context is set to Boolean.TRUE.

Note that for 2.2 to take effect, CXF's policy engine must be enabled, see WS-Policy Framework Configuration.

Using the Addressing Feature

The addressing feature element is defined in namespace It supports two attributes:




A boolean that determines if duplicate MessageIDs are tolerated (default: true)


A boolean that indicates if the presence of the <UsingAddressing> 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 wsdl and hence none of the conditions in 2.1 and 2.2 will be met.

For example, to apply this feature to a JAX-WS server endpoint:

<beans ... xmlns:wsa="" ...>
    <jaxws:endpoint ...>
            <wsa:addressing allowDuplicates="false"/>

Adding the Addressing Interceptors Manually and 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.

<bean id="mapAggregator" class="">
    <property name="allowDuplicates" value="false"/>
<bean id="mapCodec" class=""/>

        <ref bean="mapAggregator"/>
        <ref bean="mapCodec"/>
        <ref bean="mapAggregator"/>
        <ref bean="mapCodec"/>
        <ref bean="mapAggregator"/>
        <ref bean="mapCodec"/>
        <ref bean="mapAggregator"/>
        <ref bean="mapCodec"/>
  • No labels