【问题标题】:<Axis2> No extension base type element generated when using wsdl2java<Axis2> 使用 wsdl2java 时未生成扩展基类型元素
【发布时间】:2011-04-12 13:30:34
【问题描述】:

我尝试使用 Axis2 wsdl2java 命令

wsdl2java -uri somefile.wsdl -o src -ss

从 wsdl/xsd 文件生成类并遇到这个问题。

比如说,有一个复杂类型定义如下:

<xs:complexType name="MyType">
  <xs:complexContent>
    <xs:extension base="ctype:IdentifierType">
      <xs:attribute name="id" type="xs:anyURI" use="required"/>
    </xs:extension>
  </xs:complexContent>
</xs:complexType>

其中 anyType 被定义为

<xs:complexType name="IdentifierType">
  <xs:simpleContent>
    <xs:extension base="xs:string">
      <xs:attribute name="scheme" type="xs:anyURI" use="required"/>
    </xs:extension>
  </xs:simpleContent>
</xs:complexType>

生成的 Java 类成功地为 MyType 的命名属性“id”设置了 getter 和 setter。但是既没有本地字段成员,也没有 getter 和 setter 来处理 IdentifierType 的“方案”。

我有什么遗漏吗? 提前致谢。

【问题讨论】:

    标签: axis2 wsdl2java


    【解决方案1】:

    好像ADB绑定不支持复杂类型,我改成xmlbeans,效果不错,虽然实现比较琐碎。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-16
      • 2012-06-05
      • 1970-01-01
      相关资源
      最近更新 更多