架构验证失败xs:date

时间:2017-03-29 09:35:00

标签: wcf xsd schema

我收到"架构验证失败"调用我的WCF服务时从服务器。

返回的错误消息表明验证在类型" date"

的元素上失败

来自服务器的响应

$sql = 'SELECT * FROM my_table WHERE week = '.$week;

请求服务器

<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>

看不到传递给&#34; ExampleDateElement&#34;的日期有什么问题。 即使日期格式相同,模式似乎也会传递上面的日期元素。如果日期完全相同,它甚至会失败。

0 个答案:

没有答案