0 Replies Latest reply on May 5, 2010 11:52 PM by MrRikard

    Generated code from wsdl with Inheritance

    MrRikard

      We are running webservices and are generating code in flashbuilder from the wsdl for these webservices.

       

      We had a problem with flexbuilder 3 which is described here:

      http://forums.adobe.com/message/2767735#2767735

       

      We were recomended to upgrade to flashbuilder 4 which was gonna solve our problem, so we did.

       

      We generated new code in flashbuilder and everything works fine until we added inheritance to the services:

       

       

      Our xsd looks like this (stripped), its very simple:

       

      <

       

      xsd:element name="TSLCQueueResponse">

           <xsd:complexType>

       

                <xsd:sequence>

       

                     <xsd:element name="QueueResponse" type="tslc:QueueResponses" minOccurs="0" maxOccurs="unbounded" />

       

                </xsd:sequence>

           </xsd:complexType>

      </xsd:element>

       

      <xsd:complexType name="QueueResponses">

           <xsd:sequence>

                <xsd:element name="FXEntity" type="tslc:FXEntity" nillable="true" minOccurs="0" maxOccurs="unbounded"

             </xsd:sequence>

      </xsd:complexType>

       

      <xsd:complexType name="FXEntity">

           <xsd:sequence>

                <xsd:element name="ReqId" type="xsd:string" />

                <xsd:element name="DealType" type="xsd:string"/>

           </xsd:sequence>

      </xsd:complexType>

       

      <xsd:complexType name="Quote">

           <xsd:complexContent>

                <xsd:extension base="tslc:FXEntity">

                     <xsd:sequence>

                          <xsd:element name="TimeToLive" type="xsd:string" minOccurs="0"/>

                     </xsd:sequence>

                </xsd:extension>

           </xsd:complexContent>

      </xsd:complexType>

       

      The code generated from the wsdl based on this xsd didnt generate a class for "Quote".

       

       

      We tried to add a dummy which "reference" to a Quote, like this

       

      <xsd:element name="DummyResponse">

           <xsd:complexType>

                <xsd:sequence>

                     <xsd:element name="Quote" type="tslc:Quote" nillable="true" minOccurs="0" maxOccurs="unbounded"/

                </xsd:sequence>

           </xsd:complexType>

      </xsd:element>

       

       

      The code genereated from this xsd (wsdl) now generates a class for "Quote".

      The Quote class does not extend the generated class FXEntity as expected. The Quote has all variables from FXEntity though. But i need to extend FXEntity. I cant be asked to modify it myself after every time I regenerate the code.

       

      Doesnt inheritance work properly for flashbuilder generated code or have i missed something ?

       

      Thankful for all kind of help with this.

      /MR