Export (0) Print
Expand All

2.5.5.5 Protocol-Specific Details

Using remote procedures (ROPs)

Ee178007.f3d036ee-09d7-410a-b53e-e571f615c3d4(en-us,EXCHG.80).jpg

Figure 15: Adding an attachment by using ROPs

Note  The ROPs are sent via RPC or MAPI extensions for HTTP. Several ROPs can be batched into a single request, as described in [MS-OXCROPS].

  1. The client creates a message per the use case described in section 2.5.3.

  2. The client issues a RopCreateAttachment ROP request ([MS-OXCROPS] section 2.2.6.13) to the Exchange server to create a new attachment associated with the message.

  3. Upon success, the Exchange server returns a handle to the attachment.

  4. The client prepares a list of required and optional property-value pairs to be set on the attachment. The attachment data is also set as one of the property values.

  5. The client issues a RopSetProperties ROP request ([MS-OXCROPS] section 2.2.8.6) to the Exchange server to set the list of property-value pairs on the message.

  6. The Exchange server returns the success or failure of the operation.

  7. Using the attachment handle, the client issues a RopSaveChangesMessage ROP ([MS-OXCROPS] section 2.2.6.3) attachment request to the Exchange server to persist the new attachment.

  8. The Exchange server responds with HTTP status code 200 (OK). This operation can fail when any of the required properties for an attachment are not present.

Using WebDAV

Ee178007.ce538e99-8434-4742-adc7-d6827828bdaf(en-us,EXCHG.80).jpg

Figure 16: Adding an attachment by using WebDAV

  1. The client creates a new message per the use case described in section 2.5.3.

  2. The client uses the HTTP PUT request, as described in [RFC2068], to replace the existing message document resource, specifying a new message body (1) that contains the attachment data as embedded MIME body parts.

  3. The Exchange server responds as described in [RFC2068] and Exchange-specific WebDAV extensions.

Using Exchange ActiveSync

Ee178007.f4bd17da-30c2-42ae-b23f-8dd4697b3490(en-us,EXCHG.80).jpg

Figure 17: Adding an attachment by using Exchange ActiveSync

  1. The client creates a new message per the use case described in section 2.5.3.

  2. The client uses the Sync command request ([MS-ASCMD] section 2.2.2.20), with an Add element, as described in [MS-ASCMD] section 2.2.3.7.2, to upload/create new ApplicationData of class "Attachment" on the server. The attachment is added to a collection inside the message.

  3. The Exchange server responds with HTTP status code 200 (OK) and returns a server ID that identifies the uploaded attachment.

Using Exchange Web Services

Ee178007.d0098cdc-466d-41da-b3d9-22f9dc7dc846(en-us,EXCHG.80).jpg

Figure 18: Adding an attachment by using Exchange Web Services

  1. The client creates a new message item as described in section 2.5.3 and notes the value of the ItemId element for the new message.

  2. The client uses the HTTPS/SOAP CreateAttachmentSoapIn request WSDL message, as described in [MS-OXWSATT] section 3.1.4.1.1.1, to create a new attachment. To associate the attachment with the message, the client includes the ItemId element, which sets the new message as the attachment's parent item.

  3. The Client Access server responds with a CreateAttachmentSoapOut response WSDL message, as described in [MS-OXWSATT] section 3.1.4.1.1.2, which includes the ResponseCode element and the AttachmentId element, whose value uniquely identifies the new attachment.

Show:
© 2014 Microsoft