Steven E. Harris wrote:

I generated a client stub from my WSDL and am testing it against an
existing service of mine. It was amazing to see a default SOAP client
rise to the occasion when I first tried to run my test; it took a
moment to realize that this was not CXF's implementation, as I had not
yet added the proper CXF dependencies to my class path. Once I added
those, several things changed, and I'm still sorting through it all.

First, though, I need WS-Addressing. My service is expecting clients
to provide WS-Addressing headers. I've seen some mention of
WS-Addressing support being ready in CXF, and see some types in the
source that look related, but I haven't found sufficient documentation
to clarify how to enable WS-Addressing for a client.

Please advise.

Hi Steven,

There several ways to do this:
1. Using WS-Policy:
Enable the policy framework (by setting the "enabled" attribute of the PolicyEngine to true) and making sure that a Policy with an Addressing assertion is attached to the WSDL service, port, portType or interface (see cfg file addr.xml for system test org.apache.cxf.systest.ws.policy.AddressingPolicyTest)
2. Using CXF Features:
This is relatively new, and I don't know much about them, but see cfg file addr-inline-policy.xml for system test org.apache.cxf.systest.ws.policy.AddressingInlinePolicyTest 3. By manually adding the addressing interceptors (MAPCodec and MAPAggregator) See cfg file wsa_interceptors.xml for system test org.apache.cxf.systest.ws.addr.MAPTest (this also shows how to configure the http transport for non-anonymous responses). When not using an addressing assertion, a UsingAddressing element should be attached to the port element to 'activate' the addressing interceptors.

Cheers,
Andrea.


Reply via email to