Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<Axis2> No extension base type element generated when using wsdl2java

I was trying to use the Axis2 wsdl2java command

wsdl2java -uri somefile.wsdl -o src -ss

to generate classes from wsdl/xsd files and running into this problem.

say, there's a complex type defined as follows:

<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>

where anyType is defined as

<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>

The generated Java class has a getter and setter for the named attribute "id" of MyType, successfully. But there was neither local field member nor getter and setter to handle the "scheme" of IdentifierType.

Is there anything I am missing? Thanks in advance.

like image 227
Gnavvy Avatar asked Jun 11 '26 17:06

Gnavvy


1 Answers

It seems that ADB binding does not support complex type, I've changed to xmlbeans, and it worked well, though the implemention are more trivial.

like image 122
Gnavvy Avatar answered Jun 18 '26 20:06

Gnavvy