3.1.4.14 GetAttachmentCollection

The GetAttachmentCollection operation is used to return the list of URLs of attachments associated with a specified list item in a specified list.

 <wsdl:operation name="GetAttachmentCollection">
     <wsdl:input message="GetAttachmentCollectionSoapIn" />
     <wsdl:output message="GetAttachmentCollectionSoapOut" />
 </wsdl:operation>

The protocol client sends a GetAttachmentCollectionSoapIn request message (section 3.1.4.14.1.1) and the protocol server responds with a GetAttachmentCollectionSoapOut response message (section 3.1.4.14.1.2), as follows:

  1. If the specified listName is a valid GUID and corresponds to the identification of a list on the site, use that list.

  2. If the specified listName is not a valid GUID or does not correspond to the identification of a list on the site, check if the listName corresponds to the list title of a list on the site and if so, use that list.

  3. If the specified listName does not correspond to a list from either of these checks, the protocol server SHOULD<53> return a SOAP fault with error code 0x82000006. This indicates that the list does not exist or it might have been deleted by another user.

  4. If the listItemID is a negative value, the server SHOULD<54> return a SOAP fault with error code 0x81020014.

  5. If the listItemID does not correspond to a list item in a specified list on the site, the protocol server MUST return a SOAP fault. There is no error code for this fault.

  6. If the protocol client excludes the listItemID parameter, the protocol server MUST return a SOAP fault with error code 0x82000001.

  7. If the protocol client excludes the listName parameter, the protocol server MUST return a SOAP fault with no error code.

  8. If the protocol client passes valid input parameters, the protocol server MUST return the collection of attachments associated with the list item.

  9. If the protocol client calls the operation on a listItemID containing zero attachments, the protocol server MUST return an empty attachment collection.