I now have a trivial prototype using JAXRS. I now want to investigate adding some elements of realism :) , by adding schema-driven bindings, even from fake schemas. My current prototype uses a hand-written "@XmlRootElement" annotation on the class that represents the root of the response message. I'd like to investigate how to define the root element and bindings in Spring and associated configuration files. I see some scattered pieces of how to do this, but I'm having some trouble figuring out how these pieces fit together. I know that CXF uses JAXB by default, although XMLBeans is an option. Why would someone choose one over the other?
I see examples of a "jaxws:dataBinding" element in various samples, but the "jaxrs" samples don't do anything like that. Can I simply have a "jaxws:dataBinding" element inside the "jaxrs:server" element? I see the documentation briefly mentions (with no examples) that specifying a "jaxbElementClassNames" property is how you could use element classes that you can't add "@XmlRootElement" annotations to (like, if they were generated). There's barely any mention of that property name in the entire CXF distribution.
