Hi, I'm trying to publish a JAXRS service whose parameters and return type are classes that can be extended by third-party bundles.
I've created following project with a test that demonstrates desired behaviour: Project: https://github.com/isartcanyameres/extensibleSerialization Test class: https://github.com/isartcanyameres/extensibleSerialization/blob/master/itest/src/test/java/net/i2cat/seg/itests/ExtendedSerializationTest.java My idea is that when a new bundle with classes extending target types hierarchy is loaded, the JAXBContext gets populated with these classes (or a new JAXBContext is generated and the old one replaced by this new one). I've seen there is a ContextResolver that is used in org.apache.cxf.jaxrs.provider.JAXBElementProvider to get desired JAXBContext: *org.apache.cxf.jaxrs.provider.JAXBElementProvider#setMessageContext(MessageContext mc)* This MessageContext is used in following method: *org.apache.cxf.jaxrs.provider.AbstractJAXBProvider#getJAXBContext(Class<?> type, Type genericType)* How can I specify the MessageContext when creating the service like follows?: *JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean(); sf.setAddress(SERVICE_URL); sf.setResourceClasses(EchoService.class); Server server = sf.create();* Many thanks in advance, -- *Isart Canyameres Giménez Distributed Applications and Networks Area (DANA) i2CAT Foundation, Barcelona, Spain*
