Wcf 架构验证失败xs:date

Wcf 架构验证失败xs:date,wcf,xsd,schema,Wcf,Xsd,Schema,调用我的WCF服务时,我从服务器收到“架构验证失败” 返回的错误消息声明对类型为“date”的元素的验证失败 来自服务器的响应 s:VCE1001 架构验证失败。 元素名称:ExampleDateElement,行号:0,行位置:0 对服务器的请求 123456789123 弦123 弦123 2017-03-28 2017-03-29 64bc7ab8-b418-4d23-8d31-47312e838c92 模式 信息在此 信息在这里。 信息在这里。 信息在这里。 信息在这里。 无

调用我的WCF服务时,我从服务器收到“架构验证失败”

返回的错误消息声明对类型为“date”的元素的验证失败

来自服务器的响应


s:VCE1001
架构验证失败。
元素名称:ExampleDateElement,行号:0,行位置:0
对服务器的请求


123456789123
弦123
弦123
2017-03-28
2017-03-29
64bc7ab8-b418-4d23-8d31-47312e838c92
模式


信息在此
信息在这里。
信息在这里。
信息在这里。
信息在这里。
无法看到为“ExampleDateElement”传入的日期有任何错误。
此外,模式似乎传递给上面的日期元素,即使日期格式相同。如果日期完全相同,它甚至会失败。

Element1会使minLength方面失败,但这两个日期看起来没问题…@Sprotty哦,是的,你说得对-我省略了原始请求数据(除了日期元素),但遗漏了那部分。我已经更新了问题,您可以发布导致此故障的服务代码吗?还有进行验证的服务代码?服务上正在验证的架构副本可能与您发布的架构副本不同。@tomredfern奇怪的是,错误消息指出了架构失败的元素。我正在查看服务器模式并将其与代码中的模式进行比较,它们完全相同。我将重新发布所有内容,看看会发生什么情况。Lement1会使minLength方面失败,但这两个日期看起来还行…@Sprotty哦,是的,你是对的-我省略了原始请求数据(除了日期元素),但遗漏了那部分。我已经更新了问题,您可以发布导致此故障的服务代码吗?还有进行验证的服务代码?服务上正在验证的架构副本可能与您发布的架构副本不同。@tomredfern奇怪的是,错误消息指出了架构失败的元素。我正在查看服务器模式并将其与代码中的模式进行比较,它们完全相同。我将重新发布所有内容,看看会发生什么
<s:Fault>
  <s:Code>
    <s:Value>s:VCE1001</s:Value>
  </s:Code>
  <s:Reason>
    <s:Text xml:lang="en-GB">Schema validation failed.</s:Text>
  </s:Reason>
  <s:Detail>
    <FaultDetails xmlns="http://schemas.datacontract.org/2004/07/project.Error_Handler" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <Information>Element Name: ExampleDateElement, Line Number: 0, Line Position: 0</Information>
    </FaultDetails>
  </s:Detail>
</s:Fault>
          <Message xsi:type="q1:Example_OutboundMessage" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:q1="project_messages">
        <q1:Element1>123456789123</q1:Element1>
        <q1:Element2>
          <Nested1>string123</Nested1>
          <Nested2>string123</Nested2>
        </q1:Element2>
        <q1:Element3>2017-03-28</q1:Element3>
        <q1:ExampleDateElement>2017-03-29</q1:ExampleDateElement>
        <q1:Element4>64bc7ab8-b418-4d23-8d31-47312e838c92</q1:Element4>
      </Message>
 <xs:complexType name="Example_OutboundMessage">
    <xs:complexContent>
      <xs:extension base="vct:OutboundMessage_Type">
        <xs:sequence>
          <xs:element name="Element1" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>
                Info here
              </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:minLength value="12" />
                <xs:maxLength value="13" />
              </xs:restriction>
            </xs:simpleType>
          </xs:element>
          <xs:element name="Element2" minOccurs="1" maxOccurs="1" type="vct:Example_Type">
            <xs:annotation>
              <xs:documentation>
                Info here.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="Element3" minOccurs="1" maxOccurs="1" type="xs:date">
            <xs:annotation>
              <xs:documentation>
                Info here.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="ExampleDateElement" minOccurs="1" maxOccurs="1" type="xs:date">
            <xs:annotation>
              <xs:documentation>
                Info here.
              </xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="Element4" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>
                Info here.
              </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:minLength value="1" />
                <xs:maxLength value="255" />
              </xs:restriction>
            </xs:simpleType>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>