title: Within CXF, why use any other binding than JAXB? (MTOM attachments, Aegis, XMLBeans,...)
body: <p>I have been playing around with Apache CXF, in particular the various data bindings it supports: JAXB (the default), MTOM, Aegis and XMLBeans. Since all of these are supported, I suppose each has its merits. I came up with these:</p>
  
  <ul>
  <li>Obviously, MTOM is to be preferred where large attachments are involved.</li>
  <li>JAXB depends on annotations, so it is less suited when modification of classes is restricted.</li>
  <li>Aegis has no <code>wsdl2java</code> tool, so it is less suited for "contract-first" development, i.e. start with a WSDL and generate your Java code from that.</li>
  <li>It <em>appears</em> that Aegis provides slightly more control over the mapping between Java classes and XML through its declarative syntax in <em>Class</em>.aegis.xml files. On the other hand, I couldn't devise of any scenarios where JAXB did not do the trick.</li>
  </ul>
  
  <p>I found this question juxtaposing JAXB and XMLBeans, but it doesn't give a comprehensive overview:</p>
  
  <p><a href="https://stackoverflow.com/questions/1362030/jaxb-vs-apache-xmlbeans">JAXB vs Apache XMLBeans</a></p>
  
  <p>Besides these naive, a priori considerations, do you have any blood-and-guts experiences that would support the use of any other binding besides JAXB? I'm asking from a CXF point of view, but if any other options come to mind (e.g. Castor) please don't hesitate to elaborate.</p>