Exchange Web服务架构验证错误

时间:2017-10-10 08:51:54

标签: xml soap xsd exchange-server exchangewebservices

我向Exchange Web服务发送SOAP请求,但是我从服务器收到错误响应。它似乎指向架构验证问题,我的请求中有问题。但是,此请求在Exchange 2016中运行良好,但似乎无法在Exchange 2007中运行。

这是我对... / EWS / Exchange.asmx的要求:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages">
  <SOAP-ENV:Header>
    <ns1:RequestServerVersion Version="Exchange2007_SP1" />
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <ns2:FindItem Traversal="Shallow">
      <ns2:ItemShape>
        <ns1:BaseShape>AllProperties</ns1:BaseShape>
        <ns1:AdditionalProperties>
          <ns1:ExtendedFieldURI PropertySetId="c2dd7db7-7f7f-42cf-bbf7-7384836b0c89" PropertyName="CRMID" PropertyType="Integer" />
        </ns1:AdditionalProperties>
      </ns2:ItemShape>
      <ns2:Restriction>
        <ns1:Or>
          <ns1:IsEqualTo>
            <ns1:ExtendedFieldURI PropertySetId="c2dd7db7-7f7f-42cf-bbf7-7384836b0c89" PropertyName="CRMID" PropertyType="Integer" />
            <ns1:FieldURIOrConstant>
              <ns1:Constant Value="11290" />
            </ns1:FieldURIOrConstant>
          </ns1:IsEqualTo>
        </ns1:Or>
      </ns2:Restriction>
      <ns2:ParentFolderIds>
        <ns1:DistinguishedFolderId Id="calendar" />
      </ns2:ParentFolderIds>
    </ns2:FindItem>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

这是我得到的回应:

<?xml version="1.0"?>
<soap11:Envelope xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/">
    <soap11:Header>
        <t:ServerVersionInfo MajorVersion="8" MinorVersion="1" MajorBuildNumber="436" MinorBuildNumber="0" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" />
    </soap11:Header>
    <soap11:Body>
        <soap11:Fault>
            <faultcode>soap11:Client</faultcode>
            <faultstring>The request failed schema validation: The element 'Or' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types' has incomplete content. List of possible elements expected: 'SearchExpression' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types'.</faultstring>
            <detail>
                <e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorSchemaValidation</e:ResponseCode>
                <e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">The element 'Or' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types' has incomplete content. List of possible elements expected: 'SearchExpression' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types'.</e:Message>
                <e:Line xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">22</e:Line>
                <e:Position xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">11</e:Position>
            </detail>
        </soap11:Fault>
    </soap11:Body>
</soap11:Envelope>

我无法找到有关http://schemas.microsoft.com/exchange/services/2006/types命名空间的任何信息,而且我也不知道要求其正常工作的更改内容。

有谁知道我如何更改解决错误的请求?

0 个答案:

没有答案