查找有关 RemoveImGroup EWS 操作的信息。
RemoveImGroup 操作从邮箱中删除单个即时消息 (IM) 组。
Exchange Server 2013 中引入了此操作。
使用 RemoveImGroup 操作
RemoveImGroup 操作仅采用单个组标识符参数。
RemoveImGroup 操作 SOAP 标头
RemoveImGroup 操作可以使用下表中列出的 SOAP 标头。
| 标头名称 | 元素 | 说明 | 
|---|---|---|
| 模拟  | 
ExchangeImpersonation  | 
标识客户端应用程序正在模拟的用户。 此标头适用于请求。   | 
| MailboxCulture  | 
MailboxCulture  | 
标识要用于访问邮箱的区域性,如 RFC 3066“标识语言标记”中所述。 此标头适用于请求。   | 
| RequestVersion  | 
RequestServerVersion  | 
标识操作请求的架构版本。 此标头适用于请求。   | 
| ServerVersion  | 
ServerVersionInfo  | 
标识响应请求的服务器版本。 此标头适用于响应。   | 
RemoveImGroup 操作请求示例
下面的 RemoveImGroup 操作请求示例演示如何删除 IM 组。
注意
已缩短组 ID 以保持可读性。
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
               xmlns:m="http://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 正文包含以下元素:
成功的 RemoveImGroup 操作响应
以下示例显示了 对 RemoveImGroup 操作请求的成功响应。
<?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="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">
      <RemoveImGroupResponse ResponseClass="Success" 
                             xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
         <ResponseCode>NoError</ResponseCode>
      </RemoveImGroupResponse>
   </s:Body>
</s:Envelope>
响应 SOAP 正文包含以下元素:
RemoveImGroup 操作 ErrorInvalidImGroupId 错误响应
以下示例显示了 对 RemoveImGroup 操作请求的错误响应。 尝试删除邮箱中不存在的组时,会发生以下错误响应。
<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="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">
      <RemoveImGroupResponse ResponseClass="Error" 
                             xmlns="http://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 正文包含以下元素:
有关 EWS 通用且特定于此操作的其他错误代码,请参阅 ResponseCode。
RemoveImGroup 操作 ErrorInvalidIdMalformed 错误响应
以下示例显示了 对 RemoveImGroup 操作请求的错误响应。 尝试删除具有不正确格式的组标识符的组时,会发生以下错误响应。
<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="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">
      <RemoveImGroupResponse ResponseClass="Error" 
                             xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
         <MessageText>Id is malformed.</MessageText>
         <ResponseCode>ErrorInvalidIdMalformed</ResponseCode>
         <DescriptiveLinkKey>0</DescriptiveLinkKey>
      </RemoveImGroupResponse>
   </s:Body>
</s:Envelope>
错误响应 SOAP 正文包含以下元素: