I play with Apache CXF, in particular the various data bindings it supports: JAXB (default), MTOM, Aegis, and XMLBeans. Since they are all supported, I believe that each of them has its own merits. I figured it out:
- Obviously, MTOM is preferable if large investments are involved.
- JAXB is dependent on annotations, so it is less suitable when class modifications are limited.
- Aegis does not have the
wsdl2java tool, so it is less suitable for contract-first development, i.e. starts with WSDL and generates your Java code from this. - Aegis seems to provide a bit more control over the mapping between Java and XML classes through its declarative syntax in the Class.aegis.xml files. On the other hand, I could not develop any scenarios where JAXB did not perform the trick.
I found this question by comparing JAXB and XMLBeans, but it does not provide an exhaustive overview:
JAXB vs Apache XMLBeans
Besides these naive, a priori considerations, do you have any problems with blood and guts that will support the use of any binding other than JAXB? I ask from the point of view of CXF, but if other options come to mind (like Castor), please feel free to clarify.
web-services jaxb xmlbeans cxf aegis
László van den hoek
source share