[AWS] Problem using wsdl2ada

Pascal Obry pascal at obry.net
Tue Nov 20 07:17:18 CET 2012


Björn,

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

This issue could be an XML/Ada in fact, not sure but to be checked. I
don't remember having done anything specific about this xsd:extension!
Maybe this is recent?

BTW, is this some kind of inheritance?

Does LoginResp contains all fields of APIResponse plus the four
(current, errorCode, minorErrorCode and validUnit) fields? What does
Visual Studio generate?

So even when switching the order wsdl2ada might not generate a proper
definition.

Thanks.

-- 
  Pascal Obry /  Magny Les Hameaux (78)

  The best way to travel is by means of imagination

  http://v2p.fr.eu.org
  http://www.obry.net

  gpg --keyserver keys.gnupg.net --recv-key F949BD3B


More information about the AWS mailing list