I am using a JAXB, JPA, and RESTful web service connection to transfer objects by cable. My domain objects contain a combination of JPA and JAXB annotations, and I can successfully decouple my domain objects using Spring RestTemplate with a minimal amount of code. I remember that I read something not so long ago (maybe it was an answer to SO, maybe it was a blog), where the author claimed that he would never rely on annotations in the production environment, but always marshalls and cancels according to the scheme. Is this still a necessary practice?
If I have a .jar with annotated beans, which is a dependency in two projects (for example, the RESTful web service and the consumer), would the deployed XSD implement effectively add another dataset requiring maintenance? When using annotated POJO JAXBs, when are schemas required, and what benefits do they provide?
source
share