GetItemsXMLData Method

The GetItemsXMLData method of the Imaging service returns the metadata of all the items in the specified list on the current Web site.

Parameters

strListName   The name of the list within the current Web site.

strFolder   The relative path from the root of the list to the target folder.

itemFileNames   An array of the names of the files (items) for which you need the data.

Return Value

A Microsoft.SharePoint.SoapServer.SoapXml object that contains the following:

<results xmlns="http://schemas.microsoft.com/sharepoint/soap/ois/">
  <result item="filename1" lastmodified="true"/>
  <result item="filename2" found="false"/>
  .
  .
  .
</results>

Error Values

The following table shows errors that may be returned by the GetItemsXMLData method.

Error Code Description
0x1 ListNotFound: The requested list is not found.
0x2 IsNotLibrary: The requested list, although found, is not a picture library.
0x3 ItemNotFound: The requested list item is not found.
0x4 FolderNotFound: The requested folder is not found.
0x5 InvalidArgument: One or more arguments are not valid.
0x6 FileExists: The file already exists, and the user doesn't specify the overwrite option.

Example

The following example shows how to get the metadata of the items in the folder "1", which is automatically created when you create a picture library.

Note  This code assumes that the site and the picture library already exist and that you have permissions on the server. The list also should have an item called 'Red Figure2.gif".

SOAP Request Format

The following is a sample SOAP request. The placeholders shown need to be replaced with actual values.

POST /_vti_bin/imaging.asmx HTTP/1.1
Host: Server_Name
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://schemas.microsoft.com/sharepoint/soap/ois/GetItemsXMLData"

<?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/">
  <soap:Body>
    <GetItemsXMLData xmlns="http://schemas.microsoft.com/sharepoint/soap/ois/">
      <strListName>string</strListName>
      <strFolder>string</strFolder>
      <itemFileNames>
        <string>string</string>
        <string>string</string>
      </itemFileNames>
    </GetItemsXMLData>
  </soap:Body>
</soap:Envelope>

SOAP Response Format

The following is a sample SOAP response. The placeholders shown will be replaced with actual return values.

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?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/">
  <soap:Body>
    <GetItemsXMLDataResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/ois/">
      <GetItemsXMLDataResult>
        <xsd:schema>schema</xsd:schema>xml</GetItemsXMLDataResult>
    </GetItemsXMLDataResponse>
  </soap:Body>
</soap:Envelope>

Requirements

Platforms: Microsoft Windows Server 2003

Web Reference: http://Server_Name/[sites/][Site_Name/]_vti_bin/Imaging.asmx