AddImGroup 操作

AddImGroup EWS 操作に関する情報を確認します。

AddImGroup Exchange Web Services (EWS) 操作により、新しいインスタント メッセージング (IM) グループがメールボックスに追加されます。

この操作は Exchange Server 2013 で導入されました。

AddImGroup 操作の使用

AddImGroup 操作は、1 つの表示名引数のみを受け取ります。

この操作は、新しいグループの表示名、グループの種類、Exchange ストア識別子を返します。

AddImGroup 操作では、次の表に示す SOAP ヘッダーを使用できます。

表 1. AddImGroup 操作 SOAP ヘッダー

ヘッダー名 要素 説明
偽装
ExchangeImpersonation
クライアント アプリケーションが偽装しているユーザーを識別します。 これは要求に適用されます。
MailboxCulture
MailboxCulture
RFC 3066 で定義されている "言語の識別用タグ" で定義されているカルチャを識別し、メールボックスにアクセスするために使用します。 これは要求に適用されます。
RequestVersion
RequestServerVersion
操作要求のスキーマ バージョンを識別します。 これは要求に適用されます。
ServerVersion
ServerVersionInfo
要求に応答したサーバーのバージョンを識別します。 これは応答に適用されます。

AddImGroup 操作要求の例: 新しい IM グループを作成する

次の AddImGroup 操作要求の例は、MyCustomerGroup という名前の IM グループを作成する方法を示しています。

<?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:AddImGroup>
         <m:DisplayName>MyCustomGroup</m:DisplayName>
      </m:AddImGroup>
   </soap:Body>
</soap:Envelope>

要求 SOAP 本文には、次の要素が含まれています。

AddImGroup 操作の応答が成功しました

次の例は、 AddImGroup 操作要求に対する正常な応答を示しています。

<?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">
      <AddImGroupResponse ResponseClass="Success"
                          xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
         <ResponseCode>NoError</ResponseCode>
         <ImGroup>
            <DisplayName xmlns="https://schemas.microsoft.com/exchange/services/2006/types">MyCustomGroup</DisplayName>
            <GroupType xmlns="https://schemas.microsoft.com/exchange/services/2006/types">IPM.DistList.MOC.UserGroup</GroupType>
            <ExchangeStoreId Id="AAMkAGQ1MjJjMTBkLTc4Y2UtNDA5Ny04ZjU5LWI3MAAA="
                             ChangeKey="EgAAAA=="
                             xmlns="https://schemas.microsoft.com/exchange/services/2006/types"/>
         </ImGroup>
      </AddImGroupResponse>
   </s:Body>
</s:Envelope>

応答 SOAP 本文には、次の要素が含まれています。

AddImGroup 操作エラー応答

次の例は、 AddImGroup 操作要求に対するエラー応答を示しています。 これは、表示名で使用できない文字を含む要求に対する応答です。 これは SOAP エラーであり、スキーマ ベースのエラー メッセージではないことに注意してください。 要求で送信された表示名は ~!@#$%^& で、& 文字でエラーが発生します。 & 文字は、要求ペイロードの 11 行目と 33 番目の文字で発生しました。 応答は HTTP 500 コードで返されました。

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <s:Fault>
         <faultcode xmlns:a="https://schemas.microsoft.com/exchange/services/2006/types">a:ErrorSchemaValidation</faultcode>
         <faultstring xml:lang="en-US">The request failed schema validation: An error occurred while parsing EntityName. Line 11, position 33.</faultstring>
         <detail>
            <e:ResponseCode xmlns:e="https://schemas.microsoft.com/exchange/services/2006/errors">ErrorSchemaValidation</e:ResponseCode>
            <e:Message xmlns:e="https://schemas.microsoft.com/exchange/services/2006/errors">The request failed schema validation.</e:Message>
            <t:MessageXml xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">
               <t:LineNumber>11</t:LineNumber>
               <t:LinePosition>33</t:LinePosition>
               <t:Violation>An error occurred while parsing EntityName. Line 11, position 33.</t:Violation>
            </t:MessageXml>
         </detail>
      </s:Fault>
   </s:Body>
</s:Envelope>

関連項目