• No results found

3.1 Lists Soap Server Details

3.1.4 Message Processing Events and Sequencing Rules

3.1.4.25 GetVersionCollection

The listitems element contains attributes that define the namespaces. Inside of this element is the

<rs:data> element, which specifies how many rows of data are being returned, where a row of data corresponds to a list item, and the paging token (if there are more rows in the view than were returned).

3.1.4.25 GetVersionCollection

The GetVersionCollection operation<67> is used to return version information for the specified field of a specified list item within a specified list.

<wsdl:operation name="GetVersionCollection">

<wsdl:input message="GetVersionCollectionSoapIn" />

<wsdl:output message="GetVersionCollectionSoapOut" />

</wsdl:operation>

The protocol client sends a GetVersionCollectionSoapIn request message (section 3.1.4.25.1.1) and the protocol server responds with a GetVersionCollectionSoapOut response message (section 3.1.4.25.1.2), as follows:

1. If the strListItemID is null or an empty string, the protocol server MUST return a SOAP fault with error code 0x82000001. This indicates that the parameter strListItemID is missing or invalid.

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

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

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

5. If the strListItemID does not correspond to a list item in a specified list on the site, the protocol server MUST return a SOAP fault to indicate that the strListItemID parameter is missing or invalid. When strListItemID is a negative value, the error code is 0x81020014. When

strListItemID is zero or a positive value that does not correspond to a list item in a specified list on the site, there is no error code.<69>

6. Check to make sure the specified strFieldName corresponds to a field in the specified list item of a specified list on the site.

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

8. If the protocol client excludes one or more parameters or if the strListID is null, the protocol server MUST return a SOAP fault. There is no error code for this fault.

9. If the protocol client passes valid input parameters, the protocol server MUST return the version collection.

3.1.4.25.1 Messages

The following table summarizes the set of WSDL message definitions that are specific to this operation.

Message Description

GetVersionCollectionSoapIn The request for version information for the specified field of a specified list item within a specified list.

GetVersionCollectionSoapOut The response to a request for version information for the specified field of a specified list item within a specified list.

3.1.4.25.1.1 GetVersionCollectionSoapIn

The GetVersionCollectionSoapIn message is the request of the GetVersionCollection operation (section 3.1.4.25).

The SOAP action value of the message is defined as follows:

http://schemas.microsoft.com/sharepoint/soap/GetVersionCollection

The SOAP body contains a GetVersionCollection element (section 3.1.4.25.2.1).

3.1.4.25.1.2 GetVersionCollectionSoapOut

The GetVersionCollectionSoapOut message is the response of the GetVersionCollection operation (section 3.1.4.25).

The SOAP action value of the message is defined as follows:

http://schemas.microsoft.com/sharepoint/soap/GetVersionCollection

The SOAP body contains a GetVersionCollectionResponse element (section 3.1.4.25.2.2).

3.1.4.25.2 Elements

The following table summarizes the XML schema element definitions that are specific to this operation.

Element Description

GetVersionCollection The request for version information for the specified field of a specified list item within a specified list.

GetVersionCollectionResponse Contains the response to a request for version information for the specified field of a specified list item within a specified list.

3.1.4.25.2.1 GetVersionCollection

The GetVersionCollection element specifies details for the request to return version information for the specified field of a list.

<s:element name="GetVersionCollection">

<s:complexType>

<s:sequence>

<s:element minOccurs="0" maxOccurs="1" name="strlistID" type="s:string" />

<s:element minOccurs="0" maxOccurs="1" name="strlistItemID" type="s:string" />

<s:element minOccurs="0" maxOccurs="1" name="strFieldName" type="s:string" />

</s:sequence>

</s:complexType>

</s:element>

strlistID: The GUID or the list title of the list.

strlistItemID: The identification of the list item.

strFieldName: The case-sensitive name of the field.

3.1.4.25.2.2 GetVersionCollectionResponse

The GetVersionCollectionResponse element contains the response to the request to return version information for the specified field of a list.

If the operation succeeds, the collection of versions MUST be returned for the specified field;

otherwise, the protocol server MUST return a SOAP fault.

<s:element name="GetVersionCollectionResponse">

<s:complexType>

<s:sequence>

<s:element name="GetVersionCollectionResult" minOccurs="0">

<s:complexType mixed="true">

<s:sequence>

<s:element name="Versions">

<s:complexType>

<s:sequence>

<s:element name="Version" minOccurs="0" maxOccurs="unbounded">

<s:complexType>

<s:attribute name="FieldName" type="s:string"/>

<s:attribute name="Modified" type="s:string"/>

<s:attribute name="Editor" type="s:string"/>

</s:complexType>

</s:element>

</s:sequence>

</s:complexType>

</s:element>

</s:sequence>

</s:complexType>

</s:element>

</s:sequence>

</s:complexType>

</s:element>

GetVersionCollectionResult: The container element for the version history of the field that is specified by strFieldName in the request.

Versions: The collection of versions for the specified list item.

Version: Information about a particular version.

Version.FieldName: A placeholder for one or more properties associated with the list item. The attribute Name MUST be the name of the field (2) for which the version has been queried, the Value MUST be the value of the field (2) for which the version has been queried. For example, if Title is associated with the list item, the Name of the attribute is "Title" and the Value of the attribute is the value of the Title field for the specified list item.

Version.Modified: The date and time when this field was modified.

Version.Editor: The user that created the item version.