Although I've added a jaxb.properties with MOXY factory and I see that the JAXB was switched to moxy, CXF has a method named createRIContext in the JAXBUtils class which loads hard coded the sun JAXB implementation.
Is there a way to override it and use moxy instead?
The problematic code is the following:
// fall back if we're using another jaxb implementation
try {
riContext = JAXBUtils.createRIContext(contextClasses
.toArray(new Class[contextClasses.size()]), tns);
}
It loads hard coded the "com.sun.xml.bind.v2.ContextFactory" class and use it to create a JAXB context.
Provider
mechanism is a standard JAX-WS mechanism to plug in your own binding solution which would allow you to leverage EclipseLink JAXB (MOXy). MOXy is supported by the JAX-WS implementations in WebLogic and GlassFish. – Adriell