Lately I have started messing with Apache’s CXF Web Services framework. Now I must admit, I have held a bias for a long time for market share. Products, frameworks, packages, etc. that have the highest market adoption usually (not always) do for a reason. Working with a niche product is fine, but in my opinion the benefits of the product should significantly outweigh the risks and effort of swimming against the current. Maybe that makes me sound like a lemming, but I find that there are relatively few cases where the special benefits of a fringe product can really be brought to bear.

Anyway, with CXF being in Apache’s incubator, I am hardpressed to find many good reasons to use it in a production product over the more mature Axis, also from Apache. According to some reports, CXF is less proprietary than Axis — CXF has support for JAX-WS, JAXB, etc. while Axis uses proprietary API’s, packaging, deployment, etc. Personally, I don’t find this terribly compelling. People who go on about compliance with standards and then in the same paragraph talk about how they work with Spring and Hibernate (neither of which are a standard — well, they are de facto standards, but…) defeat their own argument. If compliance to standards is critical, then many of the best products out there are not available for use, since many of the best and most pervasive tools and technologies have no official standard.

So, I started out messing with it. My IDE of choice is Eclipse, which incidentally has built-in Axis support and integration in its SOA and WTP distributions. Getting CXF to work inside Eclipse was not trivial, even with their instructions. CXF required the use of JDK 5.0 for my installation (I was using 6), and required several new features to be added to Eclipse before the installation of CXF’s plugins would even show up. From there, I tried using the WSDL2JAVA feature on an existing WSDL file I had from another WS project. It spit out an awful lot of code, all of it reasonable. It would have been nice if in the implementation classes the generator had put in //TODO entries to mark where actual business code needs to go — although I was able to find it rather easily, markers would have been thoughtful.

So, at this point, CXF looks perfectly viable to me. It worked fine, although I had to do a little work setting it up (big deal). But it really raised the question for me — why this when Axis is so well established and so well supported, and isn’t in an incubator status? Maybe I’m missing something.

Leave a Reply