Adjust casing error and List<T> exception

Nov 2, 2010 at 1:44 PM

Hi!

First of all I want to say that WSFC.blue is doing a great job. I was able to solve most of my issues consuming a couple of java web services I can't solve using svcutil.exe.

But I have a minor problem when generating my data contract classes with the “Adjust casing” option set. Please take a look at the following type declaration snippets:

 <xs:simpleType name="productionOrderState">
    <xs:restriction base="xs:string">
      <xs:enumeration value="ENTERED_MANUAL" />

    </xs:restriction>
  </xs:simpleType>

 

  <xs:complexType name="productionOrderFilterCriterionTO">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="setOfProductionOrderStates" nillable="true" type="tns:productionOrderState" />
    </xs:sequence>
  </xs:complexType>

 

WSCF.blue generates the following code snippets:

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml""4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://production.ws.web.service.client.cms.fnc.com/", TypeName="productionOrderState")]
    [System.Xml.Serialization.XmlRootAttribute(Namespace="http://production.ws.web.service.client.cms.fnc.com/", IsNullable=false, ElementName="productionOrderState")]
    public enum ProductionOrderState
    {

         }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml""4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://production.ws.web.service.client.cms.fnc.com/", TypeName="productionOrderFilterCriterionTO")]
    [System.Xml.Serialization.XmlRootAttribute(Namespace="http://production.ws.web.service.client.cms.fnc.com/", IsNullable=true, ElementName="productionOrderFilterCriterionTO")]
    public partial class ProductionOrderFilterCriterionTO : object, System.ComponentModel.INotifyPropertyChanged
    {
        private System.Nullable<productionOrderState>[] setOfProductionOrderStatesField;
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("setOfProductionOrderStates", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true, Order=17)]
        public System.Nullable<productionOrderState>[] SetOfProductionOrderStates
        {
            get
            {
                return this.setOfProductionOrderStatesField;
            }
            set
            {
                this.setOfProductionOrderStatesField = value;
                this.RaisePropertyChanged("SetOfProductionOrderStates");
            }
        }
       }

 

The problem is that the casing of the type ProductionOderState is not correctly refactored in the code of the ProdcutionOrderFilterCriterionTO class. It is still Camel Case.

Also using this Schema and selecting the List<T> or Collection<T> option will cause an System.ArgumentNullException in the MakeGenericType method during code generation. If I remove the nillable=”true” from the setOfProductionOrderStates declaration everything works fine (beside the error described obove).
From my point of view of course a nillable array does make no sense, but I’m not the developer of the schema.

Best regards,

Carsten