我想从某个特定日期(我有发生日期和重复出现的主事件数据)的定期主日历事件中检索事件(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‘属性无效-根据其数据类型(类型:UnindexedFieldURIType),值'item:RecurringMasterItemId’无效-枚举约束失败。
(我也知道定期约会的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月
发布于 2013-01-14 23:50:02
看起来这是不可能的。
我现在求助于使用GetItem,一次检索50个匹配项。
这将返回包含以下任一内容的GetItemResponseMessages列表:
real responsecode Succesful retrievals
所以我只是循环,直到我找到合适的日期,达到ErrorCalendarOccurrenceIndexIsOutOfRecurrenceRange,或达到我代码中设置的最大调用次数。
https://stackoverflow.com/questions/14122601
复制相似问题