Avner Levy
Avner Levy

Reputation: 6741

Configure CXF JAX-WS service to work with MOXY

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.

Upvotes: 1

Views: 716

Answers (1)

Daniel Kulp
Daniel Kulp

Reputation: 14607

The 3.0.0-milestone2 version of CXF should handle Moxy quite a bit better. That said, there are still bugs in Moxy that have prevented all of the CXF unit and system tests to pass with it so we don't have the same level of confidence with Moxy as we do with the JAXB RI.

(any help with testing 3.0.0 would be greatly appreciated)

Upvotes: 1

Related Questions