This project has moved. For the latest updates, please go here.
1
Vote

Inheritance of DataContract classes does not work

description

I want to re-propose the old issue that could be found here:

http://wcfextras.codeplex.com/workitem/4432

If anybody has some hints will be appreciated a lot.
Gianni

comments

crjansen wrote Mar 12, 2013 at 3:06 AM

Hello Gianni,

I spent some time looking at this, and I have been unable to reproduce. If you download the latest source (clone from the code base, not the zip file download), I have added an inherited data contract to WsdlSample like your example. In the resulting WSDL, I see the definition of InheritedContract. The service reference code also includes the reference.
<xsd:complexType name="InheritedContract">
<xsd:annotation>
  <xsd:appinfo />
  <xsd:documentation>&lt;summary&gt;
    A data contract that inherits from DataContractSample.
    &lt;/summary&gt;</xsd:documentation>
</xsd:annotation>
<xsd:complexContent mixed="false">
  <xsd:extension base="tns:DataContractSample">
    <xsd:sequence>
      <xsd:element minOccurs="0" name="Property" nillable="true" type="xsd:string">
        <xsd:annotation>
          <xsd:appinfo />
          <xsd:documentation>&lt;summary&gt;
    Gets or sets the property.
    &lt;/summary&gt;
    &lt;value&gt;The property.&lt;/value&gt;</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:extension>
</xsd:complexContent>
</xsd:complexType>
Are you doing something different than this?

GiannisKhan wrote Mar 20, 2013 at 1:54 PM

crjansen,
neither me was able to reproduce it after cloned the repository with Hg. I was using the source code downloaded by zip file.
Thank you very much for your interesting in that.
Reopening the project I noticed that the cloned source still has this problem:
http://wcfextras.codeplex.com/workitem/5744
So I replicated modifies I written for the old WCFExtras, that you can find attached to the above issue link.

thanks again
Gianni