AddDistributionGroupToImList 操作
查找有关 AddDistributionGroupToImList EWS 操作的信息。
AddDistributionGroupToImList Exchange Web Services (EWS) 操作将通讯组添加到统一联系人存储中的即时消息 (IM) 列表中。
Exchange Server 2013 中引入了此操作。
使用 AddDistributionGroupToImList 操作
AddDistributionGroupToImList 操作采用一个参数,用于标识要添加到 IM 列表的通讯组。 此操作不会创建通讯组;通讯组必须已创建。
此操作可以使用下表中列出的 SOAP 标头。
表 1. AddDistributionGroupToImList 操作 SOAP 标头
标头名称 | 元素 | 说明 |
---|---|---|
模拟 |
ExchangeImpersonation |
标识客户端应用程序正在模拟的用户。 这适用于请求。 |
MailboxCulture |
MailboxCulture |
标识要用于访问邮箱的区域性,如 RFC 3066“标识语言标记”中所述。 这适用于请求。 |
RequestVersion |
RequestServerVersion |
标识操作请求的架构版本。 这适用于请求。 |
ServerVersion |
ServerVersionInfo |
标识响应请求的服务器版本。 这适用于响应。 |
AddDistributionGroupToImList 操作请求示例
以下示例显示 AddDistributionGroupToImList 操作请求,演示如何将通讯组添加到 IM 列表。
<?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:AddDistributionGroupToImList>
<m:SmtpAddress>distributionlist1@example.com</m:SmtpAddress>
</m:AddDistributionGroupToImList>
</soap:Body>
</soap:Envelope>
请求 SOAP 正文包含以下元素:
成功的 AddDistributionGroupToImList 操作响应
以下示例显示了 对 AddDistributionGroupToImList 操作请求的成功响应。
成功的响应包含通讯组显示名称、通讯组的 Exchange 存储类和新通讯组的 EWS 标识符。
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="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">
<s:Header>
<t:ServerVersionInfo MajorVersion="15"
MinorVersion="0"
MajorBuildNumber="349"
MinorBuildNumber="0"
Version="Exchange2013"/>
</s:Header>
<s:Body>
<m:AddDistributionGroupToImListResponse ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:ImGroup>
<t:DisplayName>distributionlist1@example.com</t:DisplayName>
<t:GroupType>IPM.DistList.MOC.DG</t:GroupType>
<t:ExchangeStoreId Id="AAMkAGQ1MjJjAA="
ChangeKey="EgAAAA=="/>
</m:ImGroup>
</m:AddDistributionGroupToImListResponse>
</s:Body>
</s:Envelope>
响应 SOAP 正文包含以下元素:
AddDistributionGroupToImList 操作 ErrorInvalidImDistributionGroupSmtpAddress 错误响应
以下示例显示了 对 AddDistributionGroupToImList 操作请求的错误响应。 尝试添加 Exchange 存储中不存在的通讯组时,会发生以下错误响应。
<?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">
<AddDistributionGroupToImListResponse ResponseClass="Error"
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<MessageText>The specified IM distribution group SMTP address is invalid.</MessageText>
<ResponseCode>ErrorInvalidImDistributionGroupSmtpAddress</ResponseCode>
<DescriptiveLinkKey>0</DescriptiveLinkKey>
</AddDistributionGroupToImListResponse>
</s:Body>
</s:Envelope>
错误响应 SOAP 正文包含以下元素: