简体   繁体   English

OSGi SOAP web 服务客户端

[英]OSGi SOAP web service client

I am trying to get a web service client working from OSGi, I am using Felix as my container.我正在尝试从 OSGi 获取 web 服务客户端,我使用 Felix 作为我的容器。

So far I have tried using Apache CXF.到目前为止,我已经尝试使用 Apache CXF。 This would not work with my web service as it is RPC/encoded and not supported when I try to generate stubs.这不适用于我的 web 服务,因为它是 RPC/编码的,并且在我尝试生成存根时不受支持。 I used apache Axis to generate my stubs and now I am running into issues w/ dependencies in my bundles.我使用 apache Axis 来生成我的存根,现在我在我的包中遇到了与依赖项有关的问题。 As my bundles are deployed I get dependencies w/ dependencies of the the apache bundles.当我的包被部署时,我得到了 apache 包的依赖项。

I have am using maven for my builds and have used the maven-bundle-plugin with a bundleall goal to get the dependency bundles, but still run into issues with the bundle dependencies.我正在使用 maven 进行构建,并使用带有 bundleall 目标的 maven-bundle-plugin 来获取依赖包,但仍然遇到包依赖项的问题。 I would really like to use osgi, as the pluggable nature through bundles is exactly what I need, however I am spending a lot of time chasing down bundle dependencies.我真的很想使用 osgi,因为通过 bundles 的可插拔特性正是我所需要的,但是我花了很多时间来追踪 bundle 依赖项。

Are there any clear cut examples of consuming a SOAP web service from OSGi, including how to resolve the dependencies?是否有使用 OSGi 的 SOAP web 服务的明确示例,包括如何解决依赖关系?

To make your life easier, you might want to try using fuse esb (apache servicemix) or karaf.为了让您的生活更轻松,您可能想尝试使用 fuse esb (apache servicemix) 或 karaf。 Felix is a bare minimum OSGi container whereas Karaf is Felix with many of the most important bundles already deployed. Felix 是一个最小的 OSGi 容器,而 Karaf 是 Felix,已经部署了许多最重要的包。 Fuse (also called servicemix) is karaf with even more bundles. Fuse(也称为 servicemix)是具有更多捆绑包的 karaf。 Fuse comes with cxf so you don't have to mess with it. Fuse 带有 cxf,所以你不必弄乱它。

If you'd really prefer to use felix, please post your maven bundle plugin configuration as well as a list of your bundles running in felix.如果您真的更喜欢使用 felix,请发布您的 maven 包插件配置以及在 felix 中运行的包的列表。 I've been using CXF in Felix/Karaf to serve JAX-RS webservices for quite a while and it's a pretty powerful solution.我在 Felix/Karaf 中使用 CXF 来服务 JAX-RS Web 服务已经有一段时间了,它是一个非常强大的解决方案。

The bundleall goal for the maven-bundle-plugin will generate bundles for all of your dependencies. maven-bundle-plugin 的 bundleall 目标将为您的所有依赖项生成捆绑包。 However, it will not show you the order you have to install them for the dependencies to resolve.但是,它不会显示为解决依赖项而必须安装它们的顺序。 One OSGi implementation that does a great job handling dependencies is the Virgo Web Server from the Eclipse Foundation .一个在处理依赖关系方面做得很好的 OSGi 实现是来自 Eclipse Foundation 的 Virgo Web 服务器 With Virgo, you can simply copy all of the bundles generated by bundleall goal directly into the repository/usr folder, put your service into the pickup folder, and the runtime will handle the dependency resolution for you.使用 Virgo,您可以简单地将 bundleall 目标生成的所有包直接复制到 repository/usr 文件夹中,将您的服务放入pickup文件夹中,运行时将为您处理依赖项解析。 I have used this process with success in the past.我过去成功地使用了这个过程。

On a related note, unless you have a few uncommon dependencies, you should look into adding dependencies from the SrpingSource Enterprise Bundle Repository .在相关说明中,除非您有一些不常见的依赖项,否则您应该考虑从SrpingSource Enterprise Bundle Repository添加依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM