SetImGroup 操作SetImGroup operation

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

SetImGroup操作更改即时消息(IM)组的显示名称。The SetImGroup operation changes the display name of an instant messaging (IM) group.

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

使用 SetImGroup 操作Using the SetImGroup operation

SetImGroup操作仅采用一个显示名称参数。The SetImGroup operation only takes a single display name argument.

SetImGroup 操作 SOAP 标头SetImGroup operation SOAP headers

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

SetImGroup 操作请求示例SetImGroup operation request example

以下示例的SetImGroup操作请求显示如何将 IM 组显示名称更改为 "MyNewGroupName"。The following example of a SetImGroup operation request shows how to change an IM group display name to "MyNewGroupName".

备注

已缩短 Exchange 存储标识符以保持可读性。The Exchange store identifier 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:SetImGroup>
         <m:GroupId Id="AAMkAGQ1MjJjMTBkQoTbWAAAAAAQRAAA="
                    ChangeKey="EgAAAA=="/>
         <m:NewDisplayName>MyNewGroupName</m:NewDisplayName>
      </m:SetImGroup>
   </soap:Body>
</soap:Envelope>

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

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

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

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

SetImGroup 操作错误响应SetImGroup operation error response

下面的示例演示对SetImGroup操作请求的错误响应。The following example shows an error response to a SetImGroup operation request. 当尝试将组显示名称更改为现有的组显示名称时,将发生以下错误响应。The following error response occurs when an attempt is made to change the group display name to the existing group display name.

<?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">
      <SetImGroupResponse ResponseClass="Error" 
                          xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
         <MessageText>An IM group with the specified display name already exists.</MessageText>
         <ResponseCode>ErrorImGroupDisplayNameAlreadyExists</ResponseCode>
         <DescriptiveLinkKey>0</DescriptiveLinkKey>
      </SetImGroupResponse>
   </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.

另请参阅See also