RemoveImContactFromGroup 操作RemoveImContactFromGroup operation

查找有关RemoveImContactFromGroup EWS 操作的信息。Find information about the RemoveImContactFromGroup EWS operation.

RemoveImContactFromGroup操作从 im 组中删除单个 im 联系人。The RemoveImContactFromGroup operation removes a single IM contact from an IM group.

Exchange Server 2013 中引入了此操作。This operation was introduced in Exchange Server 2013.

使用 RemoveImContactFromGroup 操作Using the RemoveImContactFromGroup operation

RemoveImContactFromGroup操作采用两个参数:联系人项目标识符,以及从中删除联系人的相应即时消息(IM)组。The RemoveImContactFromGroup operation takes two arguments: a contact item identifier, and the corresponding instant messaging (IM) group from which the contact is removed.

RemoveImContactFromGroup 操作 SOAP 标头RemoveImContactFromGroup operation SOAP headers

RemoveImContactFromGroup操作可以使用下表中列出的 SOAP 标头。The RemoveImContactFromGroup operation can use the SOAP headers that are listed in the following table.

标头名称Header name 元素Element 说明Description
模拟Impersonation
ExchangeImpersonationExchangeImpersonation
标识客户端应用程序模拟的用户。Identifies the user whom the client application is impersonating. 此标头适用于请求。This header is applicable to a request.
MailboxCultureMailboxCulture
MailboxCultureMailboxCulture
确定用于访问邮箱的区域性(如 RFC 3066 中定义的用于标识语言的标记)。Identifies the culture, as defined in RFC 3066, "Tags for the Identification of Languages", to be used to access the mailbox. 此标头适用于请求。This header is applicable to a request.
RequestVersionRequestVersion
RequestServerVersionRequestServerVersion
标识操作请求的架构版本。Identifies the schema version for the operation request. 此标头适用于请求。This header is applicable to a request.
ServerVersionServerVersion
ServerVersionInfoServerVersionInfo
标识响应请求的服务器版本。Identifies the version of the server that responded to the request. 此标头适用于响应。This header is applicable to a response.

RemoveImContactFromGroup 操作请求示例RemoveImContactFromGroup operation request example

下面的RemoveImContactFromGroup操作请求示例演示如何从 im 组中删除 im 联系人。The following example of a RemoveImContactFromGroup operation request shows how to remove an IM contact from an IM group.

备注

组和联系人标识符已缩短,以保持可读性。The group and contact identifiers have been shortened to preserve readability.

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
               xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">
   <soap:Header>
      <t:RequestServerVersion Version="Exchange2013" />
      <t:MailboxCulture>en-US</t:MailboxCulture>
   </soap:Header>
   <soap:Body >
      <m:RemoveImContactFromGroup>
         <m:ContactId Id="AAMkAGQ1MjJjMTBkLTcAAAAvcAAA="
                      ChangeKey="EQAAABYAAABtF8oI7iVOQ"/>
         <m:GroupId Id="AAMkAGQ1MjJjMTBkbWAAAAAAQKAAA="
                    ChangeKey="EgAAAA=="/>
      </m:RemoveImContactFromGroup>
   </soap:Body>
</soap:Envelope>

请求 SOAP 正文包含以下元素:The request SOAP body contains the following elements:

成功的 RemoveImContactFromGroup 操作响应Successful RemoveImContactFromGroup operation response

下面的示例演示对RemoveImContactFromGroup操作请求的成功响应。The following example shows a successful response to a RemoveImContactFromGroup operation request.

<?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="349" 
                           MinorBuildNumber="0" 
                           Version="Exchange2013" 
                           xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types" 
                           xmlns="https://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">
      <RemoveImContactFromGroupResponse ResponseClass="Success" 
                                        xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
         <ResponseCode>NoError</ResponseCode>
      </RemoveImContactFromGroupResponse>
   </s:Body>
</s:Envelope>

响应 SOAP 正文包含以下元素:The response SOAP body contains the following elements:

RemoveImContactFromGroup 操作 ErrorInvalidImContactId 错误响应RemoveImContactFromGroup operation ErrorInvalidImContactId error response

下面的示例演示对RemoveImContactFromGroup操作请求的错误响应。The following example shows an error response to a RemoveImContactFromGroup operation request. 当尝试删除 IM 组中不存在的联系人项时,将发生以下错误响应。The following error response occurs when an attempt is made to remove a contact item that does not exist in the IM group.

<?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="349" 
                           MinorBuildNumber="0" 
                           Version="Exchange2013" 
                           xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types" 
                           xmlns="https://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">
      <RemoveImContactFromGroupResponse ResponseClass="Error" 
                                        xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
         <MessageText>The specified Im Contact Id is invalid.</MessageText>
         <ResponseCode>ErrorInvalidImContactId</ResponseCode>
         <DescriptiveLinkKey>0</DescriptiveLinkKey>
      </RemoveImContactFromGroupResponse>
   </s:Body>
</s:Envelope>

响应 SOAP 正文包含以下元素:The response SOAP body contains the following elements:

另请参阅See also