配置CXF JAX-WS服务以使用MOXY [英] Configure CXF JAX-WS service to work with MOXY

查看:84
本文介绍了配置CXF JAX-WS服务以使用MOXY的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

虽然我已经在MOXY工厂添加了一个jaxb.properties并且我看到JAXB已切换到moxy,但是在JAXBUtils类中有一个名为createRIContext的方法,它加载了硬编码的sun JAXB实现。

有没有办法覆盖它并使用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);
}

它加载硬编码com.sun.xml.bind.v2。 ContextFactory类并使用它来创建一个JAXB上下文。

It loads hard coded the "com.sun.xml.bind.v2.ContextFactory" class and use it to create a JAXB context.

推荐答案

3.0.0-milestone2版本的CXF应该处理Moxy好一点。也就是说,Moxy中仍然存在阻止所有CXF单元和系统测试通过的错误,因此我们对Moxy没有与JAXB RI相同的置信度。

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.

(非常感谢任何测试3.0.0的帮助)

(any help with testing 3.0.0 would be greatly appreciated)

这篇关于配置CXF JAX-WS服务以使用MOXY的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆