RemoveContactFromImList 操作
查找有关 RemoveContactFromImList EWS 操作的信息。
当 Lync 使用 Exchange 作为联系人存储时, RemoveContactFromImList 操作将从 Lync 即时消息 (IM) 列表中删除联系人。
Exchange Server 2013 中引入了此操作。
使用 RemoveContactFromImList 操作
RemoveContactFromImList 操作接受一个参数,该参数标识要从 Exchange 服务器上存储的 Lync 联系人列表中删除的联系人。 此操作面向的联系人列表在 Outlook 2013 中称为 Lync 联系人 。
谨慎
请勿使用 DeleteItem 操作 从联系人列表中删除联系人。 可能需要进行其他服务器端处理,以支持从 Lync 联系人 列表中删除联系人。 请注意, Lync 联系人 列表的概念等效于默认 Lync 联系人 邮箱文件夹。
RemoveContactFromImList 操作 SOAP 标头
RemoveContactFromImList 操作可以使用下表中列出的 SOAP 标头。
标头名称 | 元素 | 说明 |
---|---|---|
模拟 |
ExchangeImpersonation |
标识客户端应用程序正在模拟的用户。 此标头适用于请求。 |
MailboxCulture |
MailboxCulture |
标识要用于访问邮箱的区域性,如 RFC 3066“标识语言标记”中所述。 此标头适用于请求。 |
RequestVersion |
RequestServerVersion |
标识操作请求的架构版本。 此标头适用于请求。 |
ServerVersion |
ServerVersionInfo |
标识响应请求的服务器版本。 此标头适用于响应。 |
RemoveContactFromImList 操作请求示例:从 Lync 联系人列表中删除联系人
下面的 RemoveContactFromImList 操作请求示例演示如何从 Lync 联系人 列表中删除联系人。 RemoveContactFromImList 操作接受单个唯一的联系人标识符,以标识从 Lync 联系人列表中删除的联系人。
注意
为了保持可读性,本文中的所有项标识符和更改键都已缩短。
<?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="Exchange2013" />
</soap:Header>
<soap:Body>
<m:RemoveContactFromImList>
<m:ContactId Id=""/>
</m:RemoveContactFromImList>
</soap:Body>
</soap:Envelope>
请求 SOAP 正文中使用以下元素:
成功的 RemoveContactFromImList 操作响应
以下示例显示了对 RemoveContactFromImList 操作请求的成功响应,请求从 Lync 联系人 列表中删除联系人。
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15"
MinorVersion="0"
MajorBuildNumber="556"
MinorBuildNumber="8"
Version="Exchange2013"
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">
<RemoveContactFromImListResponse ResponseClass="Success"
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<ResponseCode>NoError</ResponseCode>
</RemoveContactFromImListResponse>
</s:Body>
</s:Envelope>
响应 SOAP 正文中使用以下元素:
RemoveContactFromImList 操作错误响应
以下示例显示了 对 RemoveContactFromImList 操作请求的错误响应。 这是对请求在列表中不再存在联系人时从 Lync 联系人 列表中删除联系人的请求的响应。
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15"
MinorVersion="0"
MajorBuildNumber="556"
MinorBuildNumber="8"
Version="Exchange2013"
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">
<RemoveContactFromImListResponse ResponseClass="Error"
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<MessageText>The specified object was not found in the store.</MessageText>
<ResponseCode>ErrorItemNotFound</ResponseCode>
<DescriptiveLinkKey>0</DescriptiveLinkKey>
</RemoveContactFromImListResponse>
</s:Body>
</s:Envelope>
错误响应 SOAP 正文中使用以下元素: