Every once in a while I get some WSDL file and a task to create a Java client (and a service for testing purposes) that will use a defined service. I’ve tried XFire a couple of times before (version was 1.1 in those days). But it never actually managed to create stub client and servers classes from “my” WSDL files. So, without much time left to investigate I usually decided to give it a bit more time and fallback to good old Axis.
But, a few weeks ago everything changed. I got a definition file and decided to try XFire again. This time I found an Eclipse plugin for it, which does exactly what I needed to do. It needs Java 5 and Eclipse 3.2 … checked and checked … I ran the wizard that plugin provides, entered some basic facts (location of the file, package and the location for the generated sources) and that was all. I was up and running in under five minutes. Excellent.
But that is not the end of the story. The real surprise came when I browsed the generated code. It was much more “elegant” (readable) then equivalent Axis stub. With a heavy use of annotations it will be much easier to maintain in the coming years. Also, support for XBeans and Spring definitely makes my life much easier with XFire. I didn’t have time to verify whether it is as efficient as people say, but it doesn’t matter for me at this moment. And with all good coding that has been put into that project, I don’t see how it could be any different.
So with all modern features, elegant stub classes and “probably” good performance, I think that I will stick to the XFire for my future SOAP coding.