【发布时间】:2016-07-08 10:24:41
【问题描述】:
我正在寻找比这个答案中给出的更多的细节:Exchange EWS not returning message body for calendar
具体来说,我不确定如何在查询中获取日历消息的正文。
我的 XML 查询是:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<m:FindItem Traversal="Shallow" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ItemShape>
<t:BaseShape>IdOnly</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="item:Body"/>
<t:FieldURI FieldURI="calendar:Start"/>
<t:FieldURI FieldURI="calendar:End"/>
<t:FieldURI FieldURI="calendar:Location"/>
<t:FieldURI FieldURI="item:Attachments"/>
</t:AdditionalProperties>
</m:ItemShape>
<m:CalendarView EndDate="2016-07-08T00:00:00Z" MaxEntriesReturned="999999" StartDate="2016-07-07T00:00:00Z"/>
<m:ParentFolderIds>
<t:DistinguishedFolderId Id="calendar"/>
</m:ParentFolderIds>
</m:FindItem>
</s:Body>
</s:Envelope>
但我似乎遇到了一个错误:
<t:FieldURI FieldURI="item:Body"/>
错误信息
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" MajorVersion="15" MinorVersion="1" MajorBuildNumber="534" MinorBuildNumber="21"/>
</s:Header>
<s:Body>
<m:FindItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:FindItemResponseMessage ResponseClass="Error">
<m:MessageText>Property is not valid for this operation.</m:MessageText>
<m:ResponseCode>ErrorInvalidPropertyForOperation</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
<m:MessageXml>
<t:FieldURI FieldURI="item:Body"/>
</m:MessageXml>
</m:FindItemResponseMessage>
</m:ResponseMessages>
</m:FindItemResponse>
</s:Body>
</s:Envelope>
我在这里查看了 API:
https://msdn.microsoft.com/en-us/library/office/aa494315(v=exchg.150).aspx
而且我想我一定遗漏了一些简单的东西。有没有办法使用基于特定字段的查询来获取日历正文?
谢谢
【问题讨论】:
标签: outlook exchange-server exchangewebservices