RE: Playing with XFire

by Tim O'Brien response to Dejan's previous blog post "Playing with XFire". Dejan, Xfire is great, it runs Axis out of town from a performance perspective. from my own experience, Apache Axis (both 1 and 2) has a codebase that will make you never want to use it again. Seriously, check for yourself. If you really want a compelling reason to use XFire, google "JSR 181 XFire" and the "Spring Proxy XFire". XFire is fast as lightning, and, at least, for the work i've been doing lately, you can get something exposed as a SOAP service simply by using the JSR 181 Annotations. plus, it has support for different transports like JMS. Couple something like XFire as a messaging library with ActiveMQ as a JMS provider and ServiceMix and you've got some really interesting tools.

In short, to anyone looking to produce or consume a web service in Java, Use XFire. Couple it with the Spring Framework and you'll be disappointed by how easy it is.


2006-11-17 20:06:35
I agree 110% about XFire. It is also a much MUCH better JSR-181 implementation than Sun's JAX-WS RI. The JAX-WS RI generated WSDLs are horrible and unparsable by a lot of the lesser clients (Flash, .NET, etc). Xfire works exceptionally well. The RI's client generator also does lots of annoying things that most people don't care about. Some element with type="xsd:string" minOccurs="0" nillable="true" becomes a JAXBElement. This is one of those things where correctness (differentiating between there and nill or not there) gets in the way of what people care about, and most of the time this is only done so the XSD is easy to work with -- not there is the same as nill.
2006-11-18 06:29:27
XFire isn't practical for 1.4 - and most corporate development (which is where most of the SOAP work happens) is still stuck there.
Tim O'Brien
2006-11-18 13:23:01
@Ted, Why don't you look at a product before declaring it impractical. One doesn't have to use Java 5 annotations with XFire, that is simply something I use to save myself time.

Have fun resisting change.

Stu Thompson
2006-11-19 00:58:06
Thanks for the tip, Tim & Dejan! About ago I looked into exposing a Spring/Hibernate application via Axis (it seemed a safe move) and was so discouraged with the complexity that I gave up. (SOAP access was a nice to have but not a requirement.) I'll give XFire a try soon.


Dejan Bosanac
2006-11-20 06:19:46
Hi Tim,

I totally agree with you. The more I work with XFire, the more I like it. After my initial post, I used it to expose some services through SOAP and I was really impressed by its Spring integration and support for annotations.


2006-11-21 17:32:05
And it works with XMLBeans!
2006-11-22 08:08:57
XFire does NOT blow Axis performance out of the water. ever try using XMLBeans with Axis? I did and it offers performance equal to XFire, and with more standards support. Axis2 includes support for XMLBeans and other XML Binding methods which offers equally fast performance. Plus Axis2 offers more standards support and has a better architecture.

The performance difference between the two comes down to the XML Bindings you choose. Out of the box, Axis 1 uses Xerces which is SLOW. But, you can replace that with XMLBeans.

2006-11-22 19:57:10

Ok, I have to go to bat for Ted on this one:

While you *can* use Xfire under 1.4, without annotations it is terribly difficult to get the WSDL to come out the way you might want.

Olaf Bergner
2006-11-27 02:25:04
I'm getting a bit tired of all this "XFire is great, forget about Axis2" rants. Yes, if XFire's feature set meets the bill, I too will prefer XFire over Axis2. If, however, as is often the case, I

- need asynchronous web services, client and server,
- need support for advanced WS-*-specs beyond the usual WS-Adressing/WS-Security suspects

what does XFire offer me? Especially asynchronous web services are a must these days (come on, it's 2006 _A.C._) and while it might be _possible_ to write these using XFire, you are almost guaranteed to loose its fabled ease of use.

The upshot: If your requirements are fairly simple and you don't expect them to change substantially in the foreseeable future, go for XFire. It's really easy to use, generates much cleaner code than Axis2 and performs well. If, on the other hand, you need support for advanced WS-*-standards or anticipate to do so, go for Axis2.