Hi On Tue, Feb 8, 2011 at 2:40 AM, Tim Clotworthy < tclotwor...@integratedsecure.com> wrote:
> Hello, > I am involved with a project now where we are trying to provide a (JAX-RS) > web services library that allows implementers to write their own classes for > customizing the format of a web service response. > > I am trying to do something like the following: > > LibraryContainerClass > > | > --- ContainedUserClass > > where the JAX-RS - based webservices library can serialize the contained > user class (i.e. ContainedUserClass) without explicitly knowing its > structure. > > Is LibraryContainerClass mapped to a JAX-RS root resource class which returns ContainedUserClass instances on demand ? > Not sure whether this would be a CXF-specific (Aegis?) capability, or a > more general xml-tool (Aegis/jaxb/dom) capability but, as an example, is > there some way to have the CXF capability use reflection to derive the > structure needed by JAX-RS to serialize the output? > > Usually, a custom JAX-RS MessageBodyWriter can serialize the data as needed. CXF JAX-RS has JAXB and Aegis providers. The question is whether you'd like to have a custom provider which can control the format of the output or not. JAXBProvider can be customized a lot... > I tried having an abstract class that the library user's output class must > extend, but it didn't work. > > Can you provide more info please ? Cheers, Sergey > Any response is appreciated (including even perhaps directing me to someone > or something else). Thanks for any reply! >