Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

XFire Feature

CXF Analogue

Aegis Binding

Ported.

Configurable Servlet

See the Servlet Transport page.

Eclipse Plugin

Eclipse tooling supported via the SOA Tools projectWTP project and will be included as part of Helios.

HTTP Transport

Ported.

JMS Transport

Ported.

JAX-WS/JSR-181 Annotation Support

Ported and CXF passes the JAX-WS/JWS TCKs.

JAXB

Ported.

MTOM

Ported - Supports fully streaming attachments now.

services.xml

Spring 2 XML will be supported for easy configuration. See the Configuration section.

Spring: XFireClientFactoryBean

See the ClientProxyFactoryBean and JaxWsProxyFactoryBean.

Spring: XFireExporter

Not ported as the *ServerFactoryBeans already enable this functionality. See below.

Spring: ServiceBean

Completed. See ServerFactoryBean and JaxWsServerFactoryBean.

WS-Addressing

CXF has much better WS-Addressing support and its easier to use as well.

WS-Security

Ported.

XMLBeans

Not ported. Will be supported in CXF 2.1 Ported

For more details on how to migrate:

...

There a couple small areas where we haven't replicated all of the XFire functionality yet. Namely the JiBX and XMLBeans databindings. These will be ported for CXF 2.1. databinding. The only other reason not to migrate to CXF that we see is a requirement for Java 1.4. Although, we would encourage users to take a look at using CXF on Java 1. 4 via Retrotranslator (but be sure to read this thread first).

Service Factories

XFire included serveral service factories for building services. CXF also includes service factories, but the concept has been improved somewhat to make them easier to use. CXF now includes the concept of ServerFactoryBeans which produce Servers, ClientFactoryBeans which produce Clients, and ClientProxyFactoryBeans which produce Client proxies.

...

Section
Column
width50%

Here is an example of using the AnnotationServiceFactory in XFire:

Code Block
java
java
AnnotationServiceFactory osf = new AnnotationServiceFactory();
Service service = osf.create(MyServiceInterface.class);
service.setInvoker(new BeanInvoker(new MyServiceImpl());
Column

This would be the CXF equivalent:

Code Block
java
java
JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean ();
sf.getServiceFactory().setDataBinding(new AegisDatabinding());
sf.setServiceClass(MyServiceImpl.class);
sf.setAddress("http://localhost:8080/myservice");
sf.create();

...

  • Many of these attributes are optional, such as the service name
  • You don't need to specify a serviceClass if you are using JAX-WS as your service should be annotated with the @WebService.endpoitnInterface endpointInterface attribute.
  • The equivalent of XFire Handlers is Interceptors inside CXF. They feature a much improved API!

...