我想從特定日期(具有發生日期和定期主事件數據)的循環主日曆事件中檢索事件(ItemID)。Exchange EWS - 如何從特定日期的主事件中檢索事件?
我試圖的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」屬性無效 - 值「項目:RecurringMasterItemId」是無效的,根據其數據類型(類型: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>
然後,我可能會通過這些檢索起始日期和循環,但沒有辦法,我可以預測可能適用的範圍InstanceIndex。
由於提前,
揚
如果任何人有EWS託管API代碼來做到這一點,也可能幫助我.... –