【问题标题】:Cannot make Axis2 run with OSGi无法使 Axis2 与 OSGi 一起运行
【发布时间】:2013-06-28 18:14:15
【问题描述】:

我想用 Axis2 构建一个客户端(只是一个客户端)。我使用 Maven 和 OSGi (Felix)。我设法使用 Maven 成功安装它,但是当我使用 PAX 配置运行它时,出现了一堆错误。这是我在 POM 中的初始配置(加上 AXIOM 和 WSDL4j 的更多依赖项)。

 <dependency>
  <groupId>org.apache.axis2</groupId>
  <artifactId>axis2</artifactId>
  <version>1.6.2</version>
</dependency>
<dependency>
  <groupId>org.apache.axis2</groupId>
  <artifactId>axis2-transport-local</artifactId>
  <version>1.6.2</version>
</dependency>

这构建得很好,但是当我执行 pax:provision 时,我得到了

错误:捆绑axis2-transport-local [33]错误启动文件:bundles/axis2-transport-local_1.6.2.jar(org.osgi.framework.BundleException:捆绑axis2-transport-local [33]中未解决的约束:无法解决 33.0:缺少要求 [33.0] osgi.wiring.package;(osgi.wiring.package=org.apache.axis2))org.osgi.framework.BundleException:捆绑中未解决的约束axis2-transport-local [33 ]:无法解决 33.0:缺少要求 [33.0] osgi.wiring.package; (osgi.wiring.package=org.apache.axis2)

有没有人体验过 Axis2、OSGi 和 Maven 的好处? ;-)

【问题讨论】:

    标签: maven osgi axis2


    【解决方案1】:

    这个axis2 jar已经是osgi bundle了吗?如果不是,您需要创建一个,或者找到一个已经转换的。 CXF怎么样?众所周知,它与 OSGi 配合得很好。 由于您使用 Pax 配置,您可能还尝试使用 wrap 命令将轴 jar 包装为 osgi 包。

    【讨论】:

    • 有 org.apache.axis2.osgi,它似乎是一个 OSGi 包,但也没有成功。是的,我现在正在考虑使用另一个堆栈,例如 CXF
    • 在 OSGi 中使用 CXF 应该有相当多的示例,主要是使用 Karaf 作为容器,使用 Felix 或 Equinox 作为框架。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-31
    • 2013-07-11
    • 2019-03-11
    • 2020-09-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多