If you have a WSDL file that contains two different types with the same name but from different namespaces then you may get different proxy class code when running wsdl.exe against the WSDL file on different machines.
Â
For example if you have a WSDL file that defines two classes named UniqueID_Type from two different namespaces like the example below where the first definition for the type UniqueID_Type is for the namespace of http://www.contoso.com/OTA/CommonTypes, then the second type UniqueID_Type is for the namespace http://www.contoso.com/IATA/SimpleTypes:
Â
Â
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
          xmlns="http://www.contoso.com/OTA/CommonTypes"                                                                                                Â
          targetNamespace="http://www.contoso.com/OTA/CommonTypes"
          elementFormDefault="qualified">
  <xs:complexType name="UniqueID_Type">
     <xs:sequence>
        <xs:element name="CompanyName" type="xs:string" minOccurs="0"></xs:element>
     </xs:sequence>
  </xs:complexType>
</schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
          xmlns="http://www.contoso.com/IATA/SimpleTypes"                                                                                                    Â
          targetNamespace="http://www.contoso.com/IATA/SimpleTypes"
          elementFormDefault="qualified">
  <xs:complexType name="UniqueID_Type">
     <xs:sequence>
        <xs:element name="CompanyName" type="xs:string" minOccurs="0"></xs:element>
     </xs:sequence>
  </xs:complexType>
</schema>
Â
Â
If you generate a proxy class using WSDL.exe on different machines you may get two different results. On one machine your proxy class may define these two types as follows:
Â
Â
   /// <remarks/>
   [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
   [System.SerializableAttribute()]
   [System.Diagnostics.DebuggerStepThroughAttribute()]
   [System.ComponentModel.DesignerCategoryAttribute("code")]
   [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.contoso.com/OTA/CommonTypes")]
   public partial class UniqueID_Type {
      Â
       private string companyNameField;
Â
       /// <remarks/>
       public string CompanyName {
           get {
               return this.companyNameField;
           }
           set {
               this.companyNameField = value;
           }
       }
    }
Â
   /// <remarks/>
   [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
   [System.SerializableAttribute()]
   [System.Diagnostics.DebuggerStepThroughAttribute()]
   [System.ComponentModel.DesignerCategoryAttribute("code")]
   [System.Xml.Serialization.XmlTypeAttribute(TypeName="UniqueID_Type", Namespace="http://www.contoso.com/IATA/SimpleTypes")]
   public partial class UniqueID_Type1 {
      Â
       private string companyNameField;
Â
       /// <remarks/>
       public string CompanyName {
           get {
               return this.companyNameField;
           }
           set {
               this.companyNameField = value;
           }
       }
    }
Â
Â
On the other machine you may see these reversed where UniqueID_Type is from http://www.contoso.com/IATA/SimpleTypes and UniqueID_Type1 is from http://www.contoso.com/OTA/CommonTypes namespace:
Â
Â
   /// <remarks/>
   [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
   [System.SerializableAttribute()]
   [System.Diagnostics.DebuggerStepThroughAttribute()]
   [System.ComponentModel.DesignerCategoryAttribute("code")]
   [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.contoso.com/IATA/SimpleTypes")]
   public partial class UniqueID_Type {
      Â
       private string companyNameField;
Â
       /// <remarks/>
       public string CompanyName {
           get {
               return this.companyNameField;
           }
           set {
               this.companyNameField = value;
           }
       }
    }
Â
   /// <remarks/>
   [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
   [System.SerializableAttribute()]
   [System.Diagnostics.DebuggerStepThroughAttribute()]
   [System.ComponentModel.DesignerCategoryAttribute("code")]
   [System.Xml.Serialization.XmlTypeAttribute(TypeName="UniqueID_Type", Namespace="http://www.contoso.com/OTA/CommonTypes")]
   public partial class UniqueID_Type1 {
      Â
       private string companyNameField;
Â
       /// <remarks/>
       public string CompanyName {
           get {
               return this.companyNameField;
           }
           set {
               this.companyNameField = value;
           }
       }
    }
MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALSâ€) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.