如何最好地在RCP应用程序中提供JAXB组件 [英] How best to provide JAXB components in an RCP application

查看:77
本文介绍了如何最好地在RCP应用程序中提供JAXB组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的RCP应用程序调用了SOAP Web服务,并一直在使用Java 1.8中的内置JAXB/JEE组件.我已经建立了强制使用Java 1.8的构建过程,并且运行良好.

My RCP application makes calls to SOAP web services and has been using the built-in JAXB/JEE components in Java 1.8. I have set up the build process to force the use of Java 1.8 and this had been working well.

最近,由于构建器(Tycho)现在具有仅适用于更高版本的Java的组件,因此该构建停止工作.如果使用更高版本进行编译,则会出现100个与JEE相关的错误,例如JaxbElement not found@WebMethod not found.

Recently, the build stopped working because the builder (Tycho) now has a component which only works with later Java versions. If I compile with the later version I get 100's of JEE-related errors such as JaxbElement not found or @WebMethod not found.

在某些时候,我们将不得不放弃Java 1.8,使用不提供那些JEE组件的Java版本,因此,强制使用1.8只是一个短期解决方案.

At some point we will have to move away from Java 1.8 and use a Java version which does not provide those JEE components, so forcing the use of 1.8 can only be a short-term solution.

是否有一个已经提供了那些缺少的组件的eclipse插件? (我已经搜索了但没有找到任何东西)还是需要创建自己的包含必要库的帮助程序插件?也许我可以将JAXB替代品用于SOAP调用吗?

Is there an eclipse plugin which already provides those missing components? (I have searched but not found anything) Or do I need to create my own helper plugin which contains the necessary libraries? Is there perhaps a JAXB alternative which I could use for the SOAP calls?

推荐答案

JAXB插件/捆绑包可在

The JAXB plugins/bundles are available on Eclipse Orbit: the plugins/bundles starting with javax..

在需要它们的插件/捆绑包中,通过Import-PackageMANIFEST.MF文件中添加依赖项(使用Require-Bundle要求这些插件/捆绑包即使在使用Java 8时也可用).

In the plugins/bundles where they are needed, add the dependency in the MANIFEST.MF file via Import-Package (using Require-Bundle would require that these plugins/bundles are available even when using Java 8).

另请参见此答案.

这篇关于如何最好地在RCP应用程序中提供JAXB组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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