1

EWS ( Exchange Webservice )に問題があります

のリクエストを送信しますFindFolders

<?xml version="1.0"?>
<soap12:Envelope xmlns:soap12="http://schemas.xmlsoap.org/soap/envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:M="http://schemas.microsoft.com/exchange/services/2006/messages" soap12:encodingStyle="http://www.w3.org/2003/05/soap-encoding" xmlns:T="http://schemas.microsoft.com/exchange/services/2006/types">
 <soap12:Body>
  <M:FindFolder>
   <request SOAP-ENC:id="1" xsi:type="M:FindFolder" Traversal="Deep">
    <FolderShape xsi:nil="true"/>
    <IndexedPageFolderView SOAP-ENC:id="2" xsi:type="T:IndexedPageViewType" Offset="0" BasePoint="Beginning"/>
    <ParentFolderIds xsi:nil="true"/>
   </request>
   <Impersonation xsi:nil="true"/>
   <S2SAuth xsi:nil="true"/>
   <MailboxCulture xsi:type="xsd:string">de-DE</MailboxCulture>
   <RequestVersion SOAP-ENC:id="3" xsi:type="T:RequestServerVersion"   Version="Exchange2007_SP1"/>
  </M:FindFolder>
 </soap12:Body>
</soap12:Envelope>

サーバーから次のxmlを取得します

    <?xml version="1.0"?>
    <soap11:Envelope xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/">
     <soap11:Header>
      <t:ServerVersionInfo MajorVersion="8" MinorVersion="3" MajorBuildNumber="245" 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 required attribute 'Traversal' is missing.</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 required attribute 'Traversal' is missing.

        </e:Message>
        <e:Line xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">2
        </e:Line>
        <e:Position xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">446
        </e:Position>
       </detail>
      </soap11:Fault>
     </soap11:Body>
    </soap11:Envelope>

では、なぜサーバーは Traversal が見つからないと言うのでしょうか?

(私はまた 、タイプの名前空間エントリの T: でそれをテストしましたT:Traversal = Deep)

誰かがこの問題で私を助けることができますか?

4

2 に答える 2

1

TraversalFindFolder要素に必要です。から変更してみてください...

<M:FindFolder> 
   <!-- ... -->

これに...

<M:FindFolder Traversal="Deep"> 
   <!-- ... -->

Traversal属性は、次のXSDスキーマに準拠している必要があります

<simpleType name="FolderQueryTraversalType">
   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
     <enumeration value="Shallow"/>
     <enumeration value="Deep"/>
     <enumeration value="SoftDeleted"/>
   </restriction>
 </simpleType>
于 2012-08-29T18:24:58.723 に答える
1

星座を追ってみた

<M:FindFolder M:Traversal="DEEP>
The request failed schema validation: The 'http://schemas.microsoft.com/exchange/services/2006/messages:Traversal' attribute is not declared.

<M:FindFolder T:Traversal="DEEP>
The request failed schema validation: The 'http://schemas.microsoft.com/exchange/services/2006/types:Traversal' attribute is not declared.


<M:FindFolder Traversal="DEEP">

The request failed schema validation: The 'Traversal' attribute is invalid - The value 'DEEP' is invalid according to its datatype 'http://schemas.microsoft.com/exchange/services/2006/types:FolderQueryTraversalType' - The Enumeration constraint failed.
于 2012-08-30T07:22:19.400 に答える