RemoveImGroup 操作RemoveImGroup operation

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

RemoveImGroup操作从邮箱中删除单个即时消息(IM)组。The RemoveImGroup operation removes a single instant messaging (IM) group from a mailbox.

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

使用 RemoveImGroup 操作Using the RemoveImGroup operation

RemoveImGroup操作仅采用单个组标识符参数。The RemoveImGroup operation only takes a single group identifier argument.

RemoveImGroup 操作 SOAP 标头RemoveImGroup operation SOAP headers

RemoveImGroup操作可以使用下表中列出的 SOAP 标头。The RemoveImGroup 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.

RemoveImGroup 操作请求示例RemoveImGroup operation request example

下面的RemoveImGroup操作请求示例演示如何删除 IM 组。The following example of a RemoveImGroup operation request shows how to remove an IM group.

备注

为了保持可读性,组 ID 已缩短。The group ID has 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:RemoveImGroup>
         <m:GroupId Id="AAMkAGQ1MjJjMTBkLTc4Y2UtNDA5hQoTbWAAAAAAQRAAA="
                    ChangeKey="EgAAAA=="/>
      </m:RemoveImGroup>
   </soap:Body>
</soap:Envelope>

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

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

下面的示例演示对RemoveImGroup操作请求的成功响应。The following example shows a successful response to a RemoveImGroup 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">
      <RemoveImGroupResponse ResponseClass="Success" 
                             xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
         <ResponseCode>NoError</ResponseCode>
      </RemoveImGroupResponse>
   </s:Body>
</s:Envelope>

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

RemoveImGroup 操作 ErrorInvalidImGroupId 错误响应RemoveImGroup operation ErrorInvalidImGroupId error response

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

<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">
      <RemoveImGroupResponse ResponseClass="Error" 
                             xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
         <MessageText>The specified Im Group Id is invalid.</MessageText>
         <ResponseCode>ErrorInvalidImGroupId</ResponseCode>
         <DescriptiveLinkKey>0</DescriptiveLinkKey>
      </RemoveImGroupResponse>
   </s:Body>
</s:Envelope>

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

有关对 EWS 通用的其他错误代码以及特定于此操作的错误代码,请参阅ResponseCodeFor additional error codes that are generic to EWS and specific to this operation, see ResponseCode.

RemoveImGroup 操作 ErrorInvalidIdMalformed 错误响应RemoveImGroup operation ErrorInvalidIdMalformed error response

下面的示例演示对RemoveImGroup操作请求的错误响应。The following example shows an error response to a RemoveImGroup operation request. 当尝试删除格式不正确的组标识符时,将发生以下错误响应。The following error response occurs when an attempt is made to remove a group with an incorrectly formatted group identifier.

<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">
      <RemoveImGroupResponse ResponseClass="Error" 
                             xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
         <MessageText>Id is malformed.</MessageText>
         <ResponseCode>ErrorInvalidIdMalformed</ResponseCode>
         <DescriptiveLinkKey>0</DescriptiveLinkKey>
      </RemoveImGroupResponse>
   </s:Body>
</s:Envelope>

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

另请参阅See also