Interessting problem with property "Adjust casing"

Nov 30, 2010 at 3:06 PM

If i generate my server stub and use "Adjust casing" on execution of my service i recive the following message. With out "Adjust casing" on true it wors fine:

Type WcfService2.ItemChoiceType is missing enumeration value 'http://myurl.to/account_v1.0.xsd:Item' for element 'Item' from namespace 'http://myurl.to/account_v1.0.xsd'.

WSDL:

<definitions name="positionCallBack_v1.wsdl"
  targetNamespace="http://myurl.to/positionCallBack_v1.wsdl"
  xmlns="http://schemas.xmlsoap.org/wsdl/"
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns:soap12="http://schemas.xmlsoap.org/wssdl/soap12/"
  xmlns:tns="http://myurl.to/positionCallBack_v1.wsdl"
  xmlns:v1_0="http://myurl.to/positionCallBack_v1.0.wsdl"
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <types>
    <schema targetNamespace="http://myurl.to/positionCallBack_v1.0.wsdl"
      xmlns="http://www.w3.org/2001/XMLSchema"
      xmlns:position="http://myurl.to/position_v1.0.xsd">

      <import namespace="http://myurl.to/position_v1.0.xsd"
        schemaLocation="Position_v1.xsd"/>

      <element name="getPosition">
        <complexType>
          <sequence>
            <element name="positionIdentifier" type="position:positionIdentifier" />
            <element name="parameter" type="xsd:string" minOccurs="0" />
          </sequence>
        </complexType>
      </element>
      <element name="getPositionResponse">
        <complexType>
          <sequence>
            <element name="position" type="position:position" />
          </sequence>
        </complexType>
      </element>
      <element name="positionNotFoundFault">
        <complexType>
          <sequence/>
        </complexType>
      </element>
    </schema>
  </types>

  <message name="getPosition">
    <part element="v1_0:getPosition" name="parameters"/>
  </message>
  <message name="getPositionResponse">
    <part element="v1_0:getPositionResponse" name="parameters"/>
  </message>
  <message name="positionNotFoundFault">
    <part element="v1_0:positionNotFoundFault" name="fault"/>
  </message>

  <portType name="positionCallBack_v1_0">
    <operation name="getPosition">
      <input message="tns:getPosition" name="getPosition"/>
      <output message="tns:getPositionResponse" name="getPositionResponse"/>
      <fault message="tns:positionNotFoundFault" name="positionNotFoundFault"/>
    </operation>
  </portType>

  <binding name="positionCallBack_v1_0_SOAP11Binding" type="tns:positionCallBack_v1_0">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    <operation name="getPosition">
      <soap:operation style="document" soapAction="http://myurl.to/positionCallBack_v1/getPosition"/>
      <input name="getPosition">
        <soap:body use="literal"/>
      </input>
      <output name="getPositionResponse">
        <soap:body use="literal"/>
      </output>
      <fault name="positionNotFoundFault">
        <soap:fault use="literal" name="positionNotFoundFault"/>
      </fault>
    </operation>
  </binding>


  <service name="positionCallBack_v1_0">
    <port binding="tns:positionCallBack_v1_0_SOAP11Binding" name="SOAPOverHTTP">
      <soap:address location="http://myurl.to/positionCallBack_v1"/>
    </port>
  </service>

</definitions>

 

Fault.xsd:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 targetNamespace="http://myurl.to/fault_v1.0.xsd" xmlns="http://myurl.to/fault_v1.0.xsd"
 elementFormDefault="qualified">

 <xsd:complexType name="fault">
  <xsd:sequence>
   <xsd:element name="messageI" type="xsd:string" />
   <xsd:element name="messageD" type="xsd:string" />
   <xsd:element name="code" type="xsd:int" />
  </xsd:sequence>
 </xsd:complexType>

</xsd:schema>

Position xsd:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns="http://myurl.to/position_v1.0.xsd"
 targetNamespace="http://myurl.to/position_v1.0.xsd"
 xmlns:account="http://myurl.to/account_v1.0.xsd">

  <xsd:import schemaLocation="Account_v1.xsd" namespace="http://myurl.to/account_v1.0.xsd"></xsd:import>

  <xsd:complexType name="positionIdentifier">
    <xsd:annotation>
      <xsd:documentation>
        Object to uniquely identify a position instance
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="code" type="xsd:string" />
      <xsd:element name="account" type="account:accountIdentifier" />
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="positionContent">
    <xsd:choice>
      <xsd:element name="contentText" type="contentText" />
      <xsd:element name="contentList" type="contentList" />
      <xsd:element name="contentCustomTable" type="contentCustomTable" />
      <xsd:element name="contentOnlineFormsTable" type="contentOnlineFormsTable" />
    </xsd:choice>   
  </xsd:complexType>
 
  <xsd:element name="contentIT" type="positionContent" />
  <xsd:element name="contentDE" type="positionContent" />

  <xsd:complexType name="position">
    <xsd:annotation>
      <xsd:documentation>The position instance</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="positionIdentifier">
        <xsd:sequence>
          <xsd:element name="contentIT" type="positionContent" />
          <xsd:element name="contentDE" type="positionContent" />
          <xsd:element name="messageIT" type="xsd:string" />
          <xsd:element name="messageDE" type="xsd:string" />
          <xsd:element name="messageType" type="positionMessageType" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:simpleType name="positionMessageType">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Normal"></xsd:enumeration>
      <xsd:enumeration value="Alert"></xsd:enumeration>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name="contentText">
    <xsd:sequence>
      <xsd:element name="paragraph" type="xsd:string"
    minOccurs="1" maxOccurs="5" />
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="contentList">
    <xsd:sequence>
      <xsd:element name="paragraph" type="xsd:string"
    minOccurs="0" maxOccurs="1" />
      <xsd:element name="item" type="xsd:string" minOccurs="1"
    maxOccurs="8" />
      <xsd:element name="bottomParagraph" type="xsd:string"
    minOccurs="0" maxOccurs="2" />
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="fourColumnTableRow">
    <xsd:sequence>
      <xsd:element name="column1" type="xsd:string"/>
      <xsd:element name="column2" type="xsd:string"/>
      <xsd:element name="column3" type="xsd:string"/>
      <xsd:element name="column4" type="xsd:string"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="contentCustomTable">
    <xsd:sequence>
      <xsd:element name="paragraph" type="xsd:string"
    minOccurs="0" maxOccurs="1" />
      <xsd:element name="header" minOccurs="1"
    maxOccurs="1" type="fourColumnTableRow"/>
      <xsd:element name="rows" minOccurs="1"
    maxOccurs="6" type="fourColumnTableRow"/>
      <xsd:element name="bottomParagraph" type="xsd:string"
    minOccurs="0" maxOccurs="2" />
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="contentOnlineFormsTable">
    <xsd:sequence>
      <xsd:element name="paragraph" type="xsd:string"
    minOccurs="0" maxOccurs="1" />
      <xsd:element name="rows" minOccurs="1"
    maxOccurs="5">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="date" type="xsd:dateTime"
       minOccurs="1" maxOccurs="1" />
            <xsd:element name="transactionCode" type="xsd:string"
             minOccurs="1" maxOccurs="1" />
            <xsd:element name="transactionDesc" type="xsd:string"
       minOccurs="1" maxOccurs="1" />
            <xsd:element name="status" type="xsd:string"
       minOccurs="1" maxOccurs="1" />
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="bottomParagraph" type="xsd:string"
    minOccurs="0" maxOccurs="2" />
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="positionDefinition">
    <xsd:annotation>
      <xsd:documentation>
        Object used to define a position
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="code" type="xsd:string" />
      <xsd:element name="nameIT" type="xsd:string" />
      <xsd:element name="nameDE" type="xsd:string" />
      <xsd:element name="serviceUrlIT" type="xsd:string" />
      <xsd:element name="serviceUrlDE" type="xsd:string" />
      <xsd:element name="allowedTemplates" type="xsd:string" />
    </xsd:sequence>
  </xsd:complexType>

  <xsd:element name="ciccio" type="contentCustomTable"></xsd:element>
</xsd:schema>

Account xsd:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns="http://myurl.to/account_v1.0.xsd"
  targetNamespace="http://myurl.to/account_v1.0.xsd">
    
    <xsd:complexType name="accountIdentifier">
  <xsd:choice>
   <xsd:element name="fiscalCode" type="xsd:string" />
   <xsd:element name="iamAccountId" type="xsd:string" /> 
  </xsd:choice>
 </xsd:complexType>
 
</xsd:schema>

Thx

christoph