title: TRemotable Descendant Parent Members are not included in WSDL generated by delphi web services
body: <p>I've made Web Services with Delphi in the past but most were pretty simple that just took a few parameters and returned a single value to the client. A new service I am working on calls for me to be able to send and receive complex types. Consider the following types are defined in my code:</p>
  
  <pre><code>TBaseRequest = Class(TRemotable)
    private
      FUsername: string;
      FPassword: string;
    published
      Property Username: String read FUsername write FUsername;
      Property Password: String read FPassword write FPassword;
  End;
  
  TBaseResponse = Class(TRemotable)
    private
      FStatusMessage: string;
      FStatusCode: integer;
    published
      Property StatusMessage: string read FStatusMessage write FStatusMessage;
      Property StatusCode: integer read FStatusCode write FStatusCode;
  End;
  
  TSepecialRequest = class(TBaseRequest)
  private
    FExtraParam: string;
  published
    Property ExtraParam: String read FExtraParam write FExtraParam;
  end;
  
  TSpecialResponse = class(TBaseResponse)
  private
    FExtraResult: string;
  published
    Property ExtraResult: String read FExtraResultwrite FExtraResult;
  end;
  </code></pre>
  
  <p>All of these classes are registerd with RemClassRegistry.RegisterXSClass.</p>
  
  <p>Now I've also got the following function defined in the interface for this webservice:</p>
  
  <pre><code>function SpecialMethod(request:TSepecialRequest): TSpecialResponse;
  </code></pre>
  
  <p>In the service code I can easily access the parent class properties like Username and Password, but if we look at the WSDL that is generated we see that the TSpecialRequest and TSpecialResponse class members are included in the schema section.</p>
  
  <pre><code>  &lt;xs:complexType name="TSpecialRequest"&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="TBaseRequest"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element name="ExtraParam" type="xs:string"/&gt;
          &lt;/xs:sequence&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
    &lt;xs:complexType name="TSpecialResponse"&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="TBaseResponse"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element name="ExtraResult" type="xs:string"/&gt;
          &lt;/xs:sequence&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  </code></pre>
  
  <p>This schema fragment in the WSDL shows that the TSpecials are extentions of the TBase classes and all is well except that the decription of the TBase classes are not included in the schema. I would expect there to also be a section like this, but it is missing:</p>
  
  <pre><code>  &lt;xs:complexType name="TBaseRequest"&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element name="Username" type="xs:string"/&gt;
        &lt;xs:element name="Password" type="xs:string"/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
    &lt;xs:complexType name="TBaseResponse"&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element name="StatusMessage" type="xs:string"/&gt;
        &lt;xs:element name="StatusCode" type="xs:int"/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  </code></pre>
  
  <p>However this schema fragment is missing from the generated WSDL. This means that any client attempting to use this service will not be able to correctly generate requests or interpret responses. For example, if I attempt to load the geneated WSDL into the WSDL importer in Delphi 2009, I get the following classes:</p>
  
  <pre><code>TSpecialRequest = class(TRemotable)
  private
    FExtraParam: WideString;
  published
    property ExtraParam: WideString read FExtraParam write FExtraParam;
  end;
  
  TSpecialResponse = class(TRemotable)
  private
    FStatusMessage: WideString;
    FStatusCode: Integer;
  published
    property StatusMessag: WideString read FStatusMessage write FStatusMessage;
    property StatusCode: Integer read FStatusCode write FStatusCode;
  end;
  </code></pre>
  
  <p>The result is that the client code is unable to do things like set the username and password members that should be part of TSpecialRequest.</p>
  
  <p>Does anyone have any clue why this is happening or what I can do about it?</p>