Apache CXF 2.0 Documentation > Index > Celtix Migration Guide |
Migrating applications from Celtix to CXF is reasonably straightforward; both follow the JAX-WS mapping so the bulk of application code will no require any modification.
Here are some things to look out for:
SpringBusFactory bf = new SpringBusFactory(); Bus bus = bf.createBus("ws_rm.xml"); bf.setDefaultBus(bus);
Later, to get the bus, you can call
Bus bus = bf.getDefaultBus();
HelloWorld helloWorld = helloWorldService.getPort( new QName("http://www.my/wsdl/target/namespace", "SOAPOverHTTPEndpoint"), HelloWorld.class );
In Celtix you could leave the namespace of the port name as an empty string "". However, if you do that in CXF then the call to getPort() will fail. This latter behaviour is more in keeping with the JAX-WS specification (see Section 4.2.3 of the JAX-WS Specification).