With so many options available to developers today in the web services space, one of the questions worth asking is why should I use CXF? In no particular order, here are some of the reasons you might want to use CXF:
JAX-WS Support
CXF implements the JAX-WS APIs which make building web services easy. JAX-WS encompasses many different areas:
- Generating WSDL from Java classes and generating Java classes from WSDL
- Provider API which allows you to create simple messaging receiving server endpoints
- Dispatch API which allows you to send raw XML messages to server endpoints
- Much more...
Spring Integration
Spring is a first class citizen with Apache CXF. CXF supports the Spring 2.0 XML syntax, making it trivial to declare endpoints which are backed by Spring and inject clients into your application.
Aegis Databinding
Aegis Databinding (2.0.x) is our own databinding library that makes development of code-first web services incredibly easy. Unlike JAXB, you don't need annotations at all. It also works correctly with a variety of datatypes such as Lists, Maps, Dates, etc. right out of the box. If you're building a prototype web services that's really invaluable as it means you have to do very little work to get up and running (and one of the primary reasons XFire was started a while back)
RESTful services
CXF enables the development of RESTful services via annotations using the HTTP Binding. Using URI templates and annotations you can bind a service operation to arbitrary URL/verb combinations. For instance, you can annotate a getCustom method with @Get @HttpResource("/customers/{id}"). CXF will then listen for GET requests on that URL and using the parameter at the {id} location as a parameter to the service.
WS-* Support
CXF supports a variety of web service specifications including WS-Addressing, WS-Policy, WS-ReliableMessaging and WS-Security.
Apache Licensed
CXF comes under the liberal Apache license, making CXF great for all types of applications.