EWS:文件夹的ChangeKey [英] EWS: ChangeKey for folders

查看:98
本文介绍了EWS:文件夹的ChangeKey的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我是新手,我正在尝试使用EWS。

I'm new to exchange and am trying to use EWS.

我无法确定当文件夹发生变化时。

I'm having trouble determining when folders have changed.

我认为这是GetFolder操作返回的ChangeKey属性的目的。

I thought this was the purpose of the ChangeKey attribute returned by the GetFolder operation.

我在做一个GetFolder日历文件夹,但即使在folfder中创建或修改日历事件后,ChangeId也不会更改。

I am doing a GetFolder on the calendar folder but the ChangeId does not change even after creating or modifying calendar events in the folfder.

项目的ChangeId确实会按预期更改。

The ChangeId for an item does change as expected.

 

这是我的SOAP请求:

Here is my SOAP request:


<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
	<S:Header>
		<ns2:MailboxCulture xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns3="http://schemas.microsoft.com/exchange/services/2006/messages">fr-FR</ns2:MailboxCulture>
		<ns2:RequestServerVersion xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns3="http://schemas.microsoft.com/exchange/services/2006/messages" Version="Exchange2010"/>
		<ns2:TimeZoneContext xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns3="http://schemas.microsoft.com/exchange/services/2006/messages">
			<ns2:TimeZoneDefinition Id="UTC"/>
		</ns2:TimeZoneContext>
	</S:Header>
	<S:Body>
		<ns3:GetFolder xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns3="http://schemas.microsoft.com/exchange/services/2006/messages">
			<ns3:FolderShape>
				<ns2:BaseShape>Default</ns2:BaseShape>
			</ns3:FolderShape>
			<ns3:FolderIds>
				<ns2:DistinguishedFolderId Id="calendar"/>
			</ns3:FolderIds>
		</ns3:GetFolder>
	</S:Body>
</S:Envelope><?xml version="1.0" encoding="utf-8"?>


以下是回复:


<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo MajorVersion="14" MinorVersion="0" MajorBuildNumber="682" MinorBuildNumber="1" Version="Exchange2010" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
	</s:Header>
	<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
		<m:GetFolderResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
			<m:ResponseMessages>
				<m:GetFolderResponseMessage ResponseClass="Success">
					<m:ResponseCode>NoError</m:ResponseCode>
					<m:Folders>
						<t:CalendarFolder>
							<t:FolderId Id="AQMkAGUwOTFmOTNiLTlmZDUtNDYyOS1hZWQ5LTY5ZTdjMzcyNjEzYgAuAAADT9ErqlLr4k2ysDhapVkhcwEA57s46BDNKUGLMxP8TBuI0AAAAzAAAAA=" ChangeKey="AgAAABYAAADilSVicXBXQq4nb2sAq6ExAAACjjOO"/>
							<t:DisplayName>Calendrier</t:DisplayName>
							<t:ChildFolderCount>0</t:ChildFolderCount>
						</t:CalendarFolder>
					</m:Folders>
				</m:GetFolderResponseMessage>
			</m:ResponseMessages>
		</m:GetFolderResponse>
	</s:Body>
</s:Envelope>


任何想法??

 

干杯,

Martin

推荐答案

显然修改文件夹的内容与修改文件夹本身不同。

Apparently modifying the content of a folder is not the same as modifying the folder itself.

来自 Inside Microsoft Exchange Server 2007的几个相关引用Web服务


  • "由于对文件夹进行修改是非典型的,因此ChangeKey属性对于可分辨文件夹或文件夹不是很有用一般来说,虽然包含它会提高性能。" (第31页)

  • " ChangeKey属性表示一种不透明的版本控制机制,它实际上并不适用于最终用户。  Exchange存储使用此值来确定您是否正在处理文件夹的过期副本。"  (第38页)

Gary W. MacDonald

Gary W. MacDonald


这篇关于EWS:文件夹的ChangeKey的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆