1

I have a WSDL/XSD from client and try to import using wsimport, and it complains:

[ERROR] Unexpected <complexType> appears at line 508 column 33

I checked the file and it shows:

   <complexType name="ActionInfo">
    <sequence/>
    <attribute name="action">
     <complexType name="string">
      <simpleContent>
       <extension/>
      </simpleContent>
     </complexType>
    </attribute>
    <attribute name="type">
     <complexType name="string">
      <simpleContent>
       <extension/>
      </simpleContent>
     </complexType>
    </attribute>
   </complexType>

Is this even legal? Apparently this is the xsd I got from their production environment so it somehow works for them.

On the top of their WSDL, it says it is generated by Axis 1.4

SwiftMango
  • 15,092
  • 13
  • 71
  • 136

1 Answers1

0

Absolutely not.

Attributes by their very nature cannot have complex content. The error message is entirely correct: The type definition for an xs:attribute must be a simple type.

See also XML attribute vs XML element

Community
  • 1
  • 1
kjhughes
  • 106,133
  • 27
  • 181
  • 240