File Attachments

Let’s assume that you have an item in your Mailbox that already has a visible file attachment on it. Call GetItem on this item and see what data is returned. Although you could just use the Default base shape, you should always request only the information that you need. So instead, use the IdOnly base shape and request both the item:Attachments and item:HasAttachments property paths via the AdditionalProperties element. This is shown in Example 12-1.

Example 12-1. GetItem with attachments

<GetItem xmlns=".../messages"
      <t:FieldURI FieldURI="item:Attachments"/>
      <t:FieldURI FieldURI="item:HasAttachments"/>
    </t:AdditionalProperties> </ItemShape> ...

Get Inside Microsoft® Exchange Server 2007 Web Services now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.