Merge duplicate simple type definitions #116

Closed
OlegYch opened this Issue Nov 12, 2011 · 0 comments

Comments

Projects
None yet
2 participants
@OlegYch

OlegYch commented Nov 12, 2011

steps

Compile two files (Service1.wsdl and Service2.wsdl) with the following content

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                  xmlns:ns1="http://schemas.datacontract.org/Entities"
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                  targetNamespace="http://tempuri.org/">
  <wsdl:types>
    <xsd:schema
        attributeFormDefault="unqualified" elementFormDefault="qualified"
        targetNamespace="http://schemas.datacontract.org/Entities">
      <xsd:complexType name="ComplexEntity">
        <xsd:sequence>
          <xsd:element name="test" type="ns1:EntityType"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:simpleType name="EntityType">
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="Account"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:element name="EntityType" nillable="true" type="ns1:EntityType"/>
    </xsd:schema>
  </wsdl:types>
</wsdl:definitions>

problem

Generated code contains duplicated definitions of EntityType

expectation

EntityType definitions are merged the same way ComplexEntity are.

@eed3si9n eed3si9n closed this in 85a330f Nov 13, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment