CreateAttachment

CreateAttachment 要素は、Exchange ストア内のアイテムへの添付ファイルを作成する要求を定義します。

<CreateAttachment>
   <ParentItemId/>
   <Attachments/>
</CreateAttachment>

CreateAttachmentType

属性と要素

以下のセクションで、属性、子要素、親要素について説明します。

属性

なし。

子要素

Element 説明
ParentItemId
作成された添付ファイルを含む親 Exchange ストア アイテムを識別します。 ParentItemId 要素は、実際の Exchange ストア アイテムの ID を指定する必要があります。 実際のストア項目は 、GetItem 操作を使用して取得できます。添付ファイルは 、GetAttachment 操作を使用して取得されます。 ParentItemId に添付ファイルの ID が渡されると、エラーが発生します。 ParentItemId が既存のアイテム添付ファイルの ID を表す場合、CreateAttachment 操作によって、新しい添付ファイルが既存の添付ファイルに追加されます。
この要素は、 CreateAttachment 操作に必要です。
添付ファイル
Exchange ストア内のアイテムに添付するアイテムまたはファイルを格納します。

親要素

なし。

注釈

アイテムの添付ファイルはストア アイテムとして存在しません。 アイテムまたは別の添付ファイルへの添付ファイルとしてのみ存在します。 アイテムの添付ファイルは、 GetAttachment 要求を使用してのみ取得できます。

次のアイテム添付ファイルを作成できます。

  • アイテム

  • メッセージ

  • CalendarItem

  • Contact

  • タスク

  • MeetingMessage

  • MeetingRequest

この要素を記述するスキーマは、クライアント アクセス サーバーの役割がインストールされている MicrosoftExchange Server 2007 を実行しているコンピューターの EWS 仮想ディレクトリにあります。

次の例は、Exchange ストア内の別のアイテムにアイテムを作成して添付する方法を示しています。

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
  <soap:Body>
    <CreateAttachment xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" 
                  xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
      <ParentItemId Id="ASkAS"/>
      <Attachments>
        <t:ItemAttachment>
          <t:Name>MyAttachment</t:Name>
          <t:Message>
            <t:ItemClass>IPM>Note</t:ItemClass>
            <t:Subject>My attachment subject</t:Subject>
            <t:Body BodyType="Text">My attachment body</t:Body>
          </t:Message>
        </t:ItemAttachment>
      </Attachments>
    </CreateAttachment>
  </soap:Body>
</soap:Envelope>

要素の情報

要素
Namespace
http://schemas.microsoft.com/exchange/services/2006/messages
スキーマ名
メッセージ スキーマ
検証ファイル
Messages.xsd
空に設定可能
False

関連項目

CreateAttachment 操作

DeleteAttachment 操作

GetAttachment 操作