我必须通过 EWS SOAP 请求去维护 FAI(文件夹关联信息)。
所以我开始试验,尝试以 CategoryList 为例阅读它们(因此不通过 GetUserConfiguration 调用)。
但我没有成功。从我左右阅读的内容来看,FAI 存储在文件夹中,我可以使用带有 Traversal="Associated"的 FindItem 读取“隐藏”项目。
此外,Exchange 2007 中有几项内容不可用,因此我从 2010 开始。
我可以看到 CategoryList 存在于:
<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="Exchange2010"/>
</soapenv:Header>
<soapenv:Body>
<mes:FindItem Traversal="Associated">
<mes:ItemShape>
<typ:BaseShape>AllProperties</typ:BaseShape>
</mes:ItemShape>
<mes:IndexedPageItemView BasePoint="Beginning" MaxEntriesReturned="100" Offset="0"/>
<mes:ParentFolderIds>
<!--typ:DistinguishedFolderId Id="root"/-->
<!--typ:DistinguishedFolderId Id="inbox"/-->
<typ:DistinguishedFolderId Id="calendar"/>
</mes:ParentFolderIds>
</mes:FindItem>
</soapenv:Body>
</soapenv:Envelope>
(所以我在这个例子中读取了区分文件夹'calendar')
这是响应:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15" MinorVersion="0" MajorBuildNumber="1104" MinorBuildNumber="3" Version="V2_22" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="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"/>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:FindItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:FindItemResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:RootFolder IndexedPagingOffset="2" TotalItemsInView="2" IncludesLastItemInRange="true">
<t:Items>
<t:Message>
<t:ItemId Id="AQMk [snip] AATj"/>
<t:ParentFolderId Id="AQMk [snip] AA=="/>
<t:ItemClass>IPM.Configuration.CategoryList</t:ItemClass>
<t:Sensitivity>Normal</t:Sensitivity>
<t:DateTimeReceived>2015-08-06T14:28:25Z</t:DateTimeReceived>
<t:Size>4020</t:Size>
<t:Importance>Normal</t:Importance>
<t:IsSubmitted>false</t:IsSubmitted>
<t:IsDraft>true</t:IsDraft>
<t:IsFromMe>false</t:IsFromMe>
<t:IsResend>false</t:IsResend>
<t:IsUnmodified>false</t:IsUnmodified>
<t:DateTimeSent>2015-08-06T14:28:25Z</t:DateTimeSent>
<t:DateTimeCreated>2015-08-06T14:28:25Z</t:DateTimeCreated>
<t:DisplayCc/>
<t:DisplayTo/>
<t:HasAttachments>false</t:HasAttachments>
<t:Culture>en-US</t:Culture>
<t:EffectiveRights>
<t:CreateAssociated>false</t:CreateAssociated>
<t:CreateContents>false</t:CreateContents>
<t:CreateHierarchy>false</t:CreateHierarchy>
<t:Delete>true</t:Delete>
<t:Modify>true</t:Modify>
<t:Read>true</t:Read>
</t:EffectiveRights>
<t:LastModifiedName>Wendy Bakkertje</t:LastModifiedName>
<t:LastModifiedTime>2015-08-06T14:28:25Z</t:LastModifiedTime>
<t:IsAssociated>true</t:IsAssociated>
<t:ConversationId Id="AAQk [snip] Qn4="/>
</t:Message>
<t:Message>
<t:ItemId Id="AQMk [snip] AATh"/>
<t:ParentFolderId Id="AQMk [snip] AA=="/>
<t:ItemClass>IPM.Configuration.WorkHours</t:ItemClass>
<t:Sensitivity>Normal</t:Sensitivity>
<t:DateTimeReceived>2015-08-06T14:28:24Z</t:DateTimeReceived>
<t:Size>1879</t:Size>
<t:Importance>Normal</t:Importance>
<t:IsSubmitted>false</t:IsSubmitted>
<t:IsDraft>true</t:IsDraft>
<t:IsFromMe>false</t:IsFromMe>
<t:IsResend>false</t:IsResend>
<t:IsUnmodified>false</t:IsUnmodified>
<t:DateTimeSent>2015-08-06T14:28:24Z</t:DateTimeSent>
<t:DateTimeCreated>2015-08-06T14:28:24Z</t:DateTimeCreated>
<t:DisplayCc/>
<t:DisplayTo/>
<t:HasAttachments>false</t:HasAttachments>
<t:Culture>nl-NL</t:Culture>
<t:EffectiveRights>
<t:CreateAssociated>false</t:CreateAssociated>
<t:CreateContents>false</t:CreateContents>
<t:CreateHierarchy>false</t:CreateHierarchy>
<t:Delete>true</t:Delete>
<t:Modify>true</t:Modify>
<t:Read>true</t:Read>
</t:EffectiveRights>
<t:LastModifiedName>Wendy Bakkertje</t:LastModifiedName>
<t:LastModifiedTime>2015-08-06T14:28:24Z</t:LastModifiedTime>
<t:IsAssociated>true</t:IsAssociated>
<t:ConversationId Id="AAQk [snip] Qn4="/>
</t:Message>
</t:Items>
</m:RootFolder>
</m:FindItemResponseMessage>
</m:ResponseMessages>
</m:FindItemResponse>
</s:Body>
</s:Envelope>
但是现在,如何通过此路径获取 IPM.Configuration.CategoryList 内容?
也欢迎任何有关后续步骤的提示:
- 如何创建自己的 FAI 列表?
- 如何将我的(日历)项目与此列表中的条目相关联?
最佳答案
我不完全确定这会有所帮助,但您可能想查看 Henning Krauses['] 在 MasterCategoryList 上的工作以了解更多相关信息。此链接提供下载,或搜索 MasterCategoryList。
我根据他的工作开发了一个 cmdlet 来添加类别,但您可以轻松地将代码转向不同的方向。 (抱歉,我无法在此处共享该代码。)
关于soap - 如何通过 EWS SOAP 请求读取文件夹关联信息 (FAI),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31922283/