Hi list,
I just tried to enable WS-Addressing in a Jetty-based CXF standalone
service, using the following code:
<snip>
CXFTestService implementor = new CXFTestService();
JaxWsServerFactoryBean svrFactory = new
JaxWsServerFactoryBean();
svrFactory.setServiceClass(ICXFTestService.class);
svrFactory.getFeatures().add(new WSAddressingFeature());
svrFactory.setAddress("http://localhost:9000/path");
svrFactory.setServiceBean(implementor);
svrFactory.create();
</snip>
(this is after the API code here:
http://cwiki.apache.org/CXF20DOC/ws-addressing.html)
However, after starting up the server the behavior of CXF did not
change at all (no WS addressing enabled in the generated WSDL
description). Using the endpoint API like this
<snip>
CXFTestService implementor = new CXFTestService();
EndpointImpl endpoint = (EndpointImpl)
Endpoint.create(implementor);
endpoint.getFeatures().add(new WSAddressingFeature());
endpoint.publish("http://localhost:9000/path");
</snip>
did not help (btw., is there a specific reason why the WSDL generated
by those to code segments is slightly different, i.e., one uses WSDL
imports and the other doesn't?).
Is there something more I need to do in order to set up WS-Addressing?
thanks, philipp