Tech Stack: Java 1.6, JPA (Hibernate 3), Spring 3, Oracle 11g
Hello,
We are currently refactoring our code to move away from SOAP based web-services to REST. I've got loads of XSD, these were used for SOAP based WS. And there are tons of JAXB classes generated using these schema files.
My question is can I use the same JAXB classes for REST (in and out) or not. I've no experience with REST.
It's better than you might think. Just take your JAXB object that you used previously for SOAP endpoints and return them from controllers:
Spring, seeing JAXB annotations, will automatically marshall them to XML and JSON. This should be a good starting point, not to mention your REST services will have similar structure to SOAP.