1

特定の日付の定期的なマスターカレンダーイベントからオカレンス(ItemID)を取得したい(オカレンスの日付と定期的なマスターイベントデータがあります)。

私はこのような制限でFindItemを試していました

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:mes="http://schemas.microsoft.com/exchange/services/2006/messages">
   <soapenv:Header>
      <typ:RequestServerVersion Version="Exchange2007_SP1"/>
   </soapenv:Header>
   <soapenv:Body>
      <mes:FindItem Traversal="Shallow">
         <mes:ItemShape>
            <typ:BaseShape>AllProperties</typ:BaseShape>
         </mes:ItemShape>
         <mes:Restriction>
            <typ:IsEqualTo>
               <typ:FieldURI FieldURI="item:RecurringMasterItemId"/>
               <typ:FieldURIOrConstant>
               <typ:Constant Value="AQMkAD[snip]AAAAA=="/>
               </typ:FieldURIOrConstant>
            </typ:IsEqualTo>
         </mes:Restriction>
         <mes:ParentFolderIds>
           <typ:DistinguishedFolderId Id="calendar"/>
         </mes:ParentFolderIds>
      </mes:FindItem>
   </soapenv:Body>
</soapenv:Envelope>

ただし、次のようになります。'FieldURI'属性が無効です-値'item:RecurringMasterItemId'は、そのデータ型(types:UnindexedFieldURIType)に応じて無効です-列挙型制約が失敗しました。
(私は定期的な予定のChangeKeyも知っていて、同じエラーでそれを試しました)

これを機能させるには、これをどのように修正する必要がありますか?

ところで。GetItemを使用してオカレンスを取得する方法については次のように知っています。

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:mes="http://schemas.microsoft.com/exchange/services/2006/messages">
   <soapenv:Header>
      <typ:RequestServerVersion Version="Exchange2007_SP1"/>
   </soapenv:Header>
   <soapenv:Body>
      <mes:GetItem>
         <mes:ItemShape>
            <typ:BaseShape>IdOnly</typ:BaseShape>
         </mes:ItemShape>
         <mes:ItemIds>
            <typ:OccurrenceItemId RecurringMasterId="AQMkAD[snip]AAAA==" InstanceIndex="1"/>
            <typ:OccurrenceItemId RecurringMasterId="AQMkAD[snip]AAAA==" InstanceIndex="2"/>
            <typ:OccurrenceItemId RecurringMasterId="AQMkAD[snip]AAAA==" InstanceIndex="3"/>
         </mes:ItemIds>
      </mes:GetItem>
   </soapenv:Body>
</soapenv:Envelope>

次に、StartDateを取得してループすることはできますが、適用される可能性のあるInstanceIndexの範囲を予測する方法はありません。

よろしくお願いします、
1月

4

1 に答える 1

0

これが可能ではないようです。

私は今、GetItemを使用して、一度に50回のオカレンスを取得しています。

これにより、次のいずれかを含むGetItemResponseMessagesのリストが返されます。

  • 成功したオカレンスの取得

  • 最後に発生したことを示すErrorCalendarOccurrenceIndexIsOutOfRecurrenceRange応答コード

  • その他の「実際の」エラー

  • 発生が削除されたことを示すErrorCalendarOccurrenceIsDeletedFromRecurrence応答コード

したがって、適切な日付が見つかるか、ErrorCalendarOccurrenceIndexIsOutOfRecurrenceRangeに達するか、コードで設定されている呼び出しの最大数に達するまで、ループします。

于 2013-01-14T15:50:02.393 に答える