[AWS] Problem using wsdl2ada

Björn Lundin b.f.lundin at gmail.com
Mon Nov 19 22:48:01 CET 2012


2012/11/19 Pascal Obry <pascal at obry.net>:

> Could you create
> one starting from the .wsdl causing troubles and removing as much wsdl
> pieces as possible?
>
> When the problem will be narrowed down I'll see what could be fixed.

Thanks Pascal.
It seems like the wsdl might be sligthly bad.
I do not know what is allowed or not but these are my findings:

The very first complexType in the wsdl (LoginResp) refers to the
second complexType, via and <extension ..>
as in:
   <xsd:complexType name="LoginResp">
        <xsd:complexContent>
      <xsd:extension base="types:APIResponse">
            <xsd:sequence>
              	<xsd:element name="currency" nillable="true" type="xsd:string"/>
              	<xsd:element name="errorCode" type="types:LoginErrorEnum"/>
              	<xsd:element name="minorErrorCode" nillable="true"
type="xsd:string"/>
              	<xsd:element name="validUntil" type="xsd:dateTime"/>
            </xsd:sequence>
       </xsd:extension>
        </xsd:complexContent>
  </xsd:complexType>

  <xsd:complexType abstract="true" name="APIResponse">
        <xsd:sequence>
          <xsd:element name="header" nillable="true"
type="types:APIResponseHeader"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="APIResponseHeader">
        <xsd:sequence>
          <xsd:element name="errorCode" type="types:APIErrorEnum"/>
          <xsd:element name="minorErrorCode" nillable="true" type="xsd:string"/>
          <xsd:element name="sessionToken" nillable="true" type="xsd:string"/>
          <xsd:element name="timestamp" type="xsd:dateTime"/>
        </xsd:sequence>
      </xsd:complexType>

just by switching their order, ie to put APIResponse before LoginResp,
wsdl2ada seems happy, and generates a ton of files.

So the question becomes if the order in an xml-schema matters, and if
not, if wsdl2ada should take that into account.
It seems like Visual Studio does - right or wrong.

-- 
/Björn


More information about the AWS mailing list