我想从特定日期(具有发生日期和定期主事件数据)的循环主日历事件中检索事件(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代码来做到这一点,也可能帮助我.... –