When a CXF service offers JAX-RS, some CXF-specific configuration is involved, no? So, could we not have some properties at the service level which the ProviderFactory consumes-if-provided? Aegis in particular has a set of configuration options, it would be very cumbersome to force those to be configured per-MessageBodyProvider.
My proposal is that the JAXRSServerFactoryBean could be given DataBinding objects, and the ProviderFactory would use them. If there aren't any, it would do what it does now. On a more detailed note, how would you propose that the ProviderFactory arbitrate between using JAXB and Aegis? They support the same annotations on the code. Isn't this another reason to have a Server Factory configuration, to specify which data binding to use by default? Or is some other mechanism at work here that I haven't comprehended? On Thu, Jul 31, 2008 at 10:23 AM, Sergey Beryozkin < [EMAIL PROTECTED]> wrote: > Hi > > If I'm reading the JAX-RS code correctly, which I'm probably not, it >> doesn't >> use the JAXB DataBinding object. It interacts class-by-class with JAXB. >> > > At the moment yes, and this is a reson I excluded a jaxb-databinding > module, just to minimize the size of the cxf-jaxrs bundle. I think jaxb api > is picked up recursively from some other module, I actually didn't check > from which one. > > >> I think I can do likewise for Aegis, sort of, but it could get ugly. >> > > If you'd like to do an Aegis Provider and a jaxb binding module would help > you then please do include it in the pom again. > > Does >> JAX-RS give us no ability to configure a data binding at the level of the >> entire service? >> >> > In JAX-RS, it's individual MessageBodyProviders which are responsible for > (un)marshalling. So probably, not... > Perhaps the default JAXBProvider can be updated to reuse some of the code > from a jaxb binding, not sure > > Cheers, Sergey > > ---------------------------- > IONA Technologies PLC (registered in Ireland) > Registered Number: 171387 > Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland >