CreateItem 操作 (タスク)

CreateItem 操作では、Exchange ストアにタスク アイテムが作成されます。

タスクの CreateItem 要求

説明

次の CreateItem 要求の例は、メールボックスにタスクアイテムを作成する方法を示しています。

コード

<?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>
    <CreateItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"
                xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" 
                MessageDisposition="SaveOnly">
      <Items>
        <t:Task>
          <t:Subject>My task</t:Subject>
          <t:DueDate>2006-10-26T21:32:52</t:DueDate>
          <t:Status>NotStarted</t:Status>
        </t:Task>
      </Items>
    </CreateItem>
  </soap:Body>
</soap:Envelope>

Comments

定期的なタスクの要求は、クライアント アクセス サーバーの役割がインストールされている 2007 Microsoft Exchange Server実行されているコンピューターによって受信されたときに変更されます。 次の変更が発生します。

  • タスクの 繰り返し範囲の StartDate (Recurrence) プロパティの日付のみが保存されます。 時間部分が切り捨てられます。

  • StartDate (Recurrence) プロパティは、繰り返しパターンに応じて調整できます。 たとえば、定期的なパターンが毎週月曜日として指定され、StartDate が 2006 年 10 月 26 日 (木曜日) に設定されている場合、StartDate は次の月曜日である 2006 年 10 月 30 日に調整されます。

  • タスクの StartDate プロパティが設定されている場合は、繰り返し範囲の StartDate (繰り返し) と一致するように更新されます。 タスクの DueDate プロパティも、新しい StartDate に基づいて更新されます。

  • StartDate が設定されていない場合は、DueDate プロパティのみが、繰り返し範囲の StartDate (繰り返し) と一致するように更新されます。

次の表は、クライアント アクセス サーバーが、毎週月曜日の Task.Recurrence.Pattern を持つ定期的なタスクに対して行う変更を示しています。

定期的なタスクの変更

プロパティ 元の値 更新された値
Task.StartDate
2006 年 1 月 1 日
2006 年 10 月 30 日
Task.DueDate
2006 年 1 月 3 日
2006 年 11 月 1 日
Task.Recurrence.Range.StartDate
2006 年 10 月 26 日
2006 年 10 月 30 日

既定では、移動先フォルダーが指定されていない場合、タスク 項目はタスク フォルダーに作成されます。

要求要素

要求では、次の要素が使用されます。

タスク CreateItem 応答の成功

説明

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

コード

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
               xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Header>
    <t:ServerVersionInfo MajorVersion="8" MinorVersion="0" MajorBuildNumber="653" MinorBuildNumber="0" 
                         xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"/>
  </soap:Header>
  <soap:Body>
    <CreateItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" 
                        xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" 
                        xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
      <m:ResponseMessages>
        <m:CreateItemResponseMessage ResponseClass="Success">
          <m:ResponseCode>NoError</m:ResponseCode>
          <m:Items>
            <t:Task>
              <t:ItemId Id="AAAtAE=" ChangeKey="EwAAABYA"/>
            </t:Task>
          </m:Items>
        </m:CreateItemResponseMessage>
      </m:ResponseMessages>
    </CreateItemResponse>
  </soap:Body>
</soap:Envelope>

成功した応答要素

応答には、次の要素が含まれます。

関連項目

CreateItem 操作

タスクの作成

タスクの更新

タスクの削除