我有一个Exchange Server包含具有自定义字段的项目(,例如自定义ExtendedProperty值为的联系人和事件)。我正在寻找一种使用Exchange Web服务(EWS)显示这些字段的方法。Exchange Web Services - 获取所有可用的“ExtendedProperty”列表
根据Microsoft documentation,有一种简单的方法可以使用FindItem
方法检索各个ExtendedProperty
值。例如:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010" />
</soap:Header>
<soap:Body>
<m:FindItem Traversal="Shallow">
<m:ItemShape>
<t:BaseShape>AllProperties</t:BaseShape>
<t:AdditionalProperties>
<t:ExtendedFieldURI PropertySetId="c11ff724-aa03-4555-9952-8fa248a11c3e"
PropertyName="Expiration Date" PropertyType="String" />
</t:AdditionalProperties>
</m:ItemShape>
<m:IndexedPageItemView MaxEntriesReturned="10" Offset="0" BasePoint="Beginning" />
<m:ParentFolderIds>
<t:DistinguishedFolderId Id="inbox" />
</m:ParentFolderIds>
</m:FindItem>
</soap:Body>
</soap:Envelope>
然而,这需要与PropertyType
和PropertyName
沿着PropertySetID
。在我的情况下,我不知道什么PropertySetIDs
可用,更不用说PropertyType
和PropertyName
。有没有办法获得所有可用的列表扩展属性?
我认为你正在说明如何枚举给定电子邮件的扩展属性。我想查找给定邮箱/服务器的扩展属性列表,而不必遍历每个电子邮件,联系人,日历约会等。 – Peter 2013-04-20 17:47:12
另外,您能解释一下如何在您的示例中获得扩展属性列表吗?你打了什么网络方法?你用什么参数? – Peter 2013-04-20 18:36:25