I have a service layer that I would like to convert into a webservice. However I hate using annotations because they severely limit code reusability in my common base classes. Some webservices use a subset of the objects, and I don’t want things exposed for one service to be exposed for another.
I had the same issue with hibernate, however the hbm xml mappings allow me to share the same domain objects and have different mappings for different services, which works great. Is there any kind of rest webservice framework for java that will allow me to describe my api and scheme objects with xml, and still gain the benefits of converting these objects to json/xml etc?
Note: I’m the EclipseLink JAXB (MOXy) lead and a member of the JAXB 2 (JSR-222) expert group.
EclipseLink JAXB (MOXy) has an extension that allows you to represent the metadata as an XML file. You can leverage this metadata in a JAX-RS environment using a ContextResolver:
For More Information
Related Stack Overflow Questions