WS-Addressing setup
To enable your services to use WS-Addressing you must supply an additional configuration file to the CXF connector to tell it to enable WS-Addressing on your service and/or client.
To configure the connector:
<mule-configuration id="myId" version="1.0">
<description>JAX-WS Test</description>
<connector name="cxf" className="org.mule.providers.soap.cxf.CxfConnector">
<properties>
<property name="configurationLocation" value="your-cxf-config.xml" />
</properties>
</connector>
... your mule descriptors ..
</mule-configuration>
You must then create a configuration file called "your-cxf-config.xml" (it can be named anything, as long as you update the CXF connector to point to the right file!).
This file will look something like this:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:c="http://cxf.apache.org/core"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsa="http://cxf.apache.org/ws/addressing"
xmlns:http="http://cxf.apache.org/transports/http/configuration"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://cxf.apache.org/ws/addressing http://cxf.apache.org/schemas/ws/addressing.xsd
http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd">
<jaxws:server name="{http://example.org/}HelloWorldPort" createdFromAPI="true">
<jaxws:features>
<wsa:addressing usingAddressingAdvisory="true"/>
</jaxws:features>
</jaxws:server>
<jaxws:client name="{http://example.org/}HelloWorldPort" createdFromAPI="true">
<jaxws:features>
<wsa:addressing usingAddressingAdvisory="true"/>
</jaxws:features>
</jaxws:client>
</beans>
CXF looks through this Spring configuration file and applies the properties to your clients and servers. It uses the name attribute of the <server> or <client> to determine which service to apply these properties to. In the above example, its enabling the WS-Addressing feature on any service which has a port name of "{http://example.org/}HelloWorldPort". You can determine your service's port name by looking at the WSDL and looking for the <wsdl:port/> element. The value in the brackets ({}) will be the targetNamespace of your WSDL. The value after the brackets will be the "name" attribute on the <port> element.
Manipulating WS-Addressing headers
To manipulate the WS-Addressing headers inside the messages, you can write a JAX-WS handler or a CXF Interceptor.
We are working on further documentation for this, but in the mean time please examine the WS-Addressing sample inside the CXF distribution!