【问题标题】:Is it possible to reuse Axis2 beans for a CXF service implementation?是否可以为 CXF 服务实现重用 Axis2 bean?
【发布时间】:2012-07-24 08:51:47
【问题描述】:

我正在向我的 Axis2 Web 应用程序添加一个 CXF 接口,并且想知道是否可以使用所有生成的 Axis2 bean 而不是使用 2 个集合。

现在,我已经对项目进行了足够的操作,使其可以编译(使用 maven),但是在 tomcat 中启动它时,我得到了很多这样的错误:

@XmlAttribute/@XmlValue need to reference a Java type that maps to text in XML.

此错误来自 Axis2 bean,我猜这是因为 Axis2 在其生成的源中添加了 @XmlAttribute 注释。我的问题是,有没有更简单的方法可以将 Axis2 bean 与 CXF 一起使用?甚至可能吗?在编译之前注释掉 @XmlAttribute 行会解决我的问题吗?

【问题讨论】:

    标签: maven cxf axis2


    【解决方案1】:

    添加一个 maven-antrun-plugin 任务来查找 @Xml 并将其替换为 //@Xml 似乎有效。我没有测试独立服务,但它们都运行没有错误。如果有人有更好的解决方案,我会全力以赴。我的似乎有点老套。

    【讨论】:

      猜你喜欢
      • 2015-08-26
      • 2016-04-07
      • 2011-06-15
      • 2018-09-19
      • 1970-01-01
      • 2012-11-14
      • 1970-01-01
      • 2014-09-07
      • 2018-02-16
      相关资源
      最近更新 更多