3.1 Lists Soap Server Details
3.1.4 Message Processing Events and Sequencing Rules
3.1.4.4 AddListFromFeature
The AddListFromFeature operation<27> is used to add a new list to the specified site based on the specified template and feature.
<wsdl:operation name="AddListFromFeature">
<wsdl:input message="AddListFromFeatureSoapIn" />
<wsdl:output message="AddListFromFeatureSoapOut" />
</wsdl:operation>
The protocol client sends an AddListFromFeatureSoapIn request message (section 3.1.4.4.1.1), and the server responds with an AddListFromFeatureSoapOut response message (section 3.1.4.4.1.2), as follows:
1. If the templateID provided is less than zero, the protocol server MUST return a SOAP fault. There is no error code returned for this fault.
2. If the templateID provided is not one of the known list template identifiers or no templateID parameter is provided, the protocol server SHOULD<28> return a SOAP fault with the error string
"Parameter {0} is missing or invalid". This indicates that the list template is missing or invalid.
3. If the templateID provided matches a known template, but a list based on that template already exists and the template is marked as unique, the protocol server MUST return a SOAP fault with error code 0x8102003c. This indicates that templateID provided is marked unique and that a list with the specified templateID already exists.
4. If the featureID tag is specified and the value is not a GUID or is not empty, the protocol server MUST return a SOAP fault. There is no error code returned for this fault.
5. If the provided featureID is {00000000-0000-0000-0000-000000000000} or no featureID is specified, the protocol server MUST do a lookup on the legacy types (see list template identifier) to find the correct feature identifier. If it cannot find a featureID for the provided templateID, the protocol server MUST return a SOAP fault. There is no error code returned for this fault.
6. If the provided templateID cannot be used with the provided featureID, the protocol server MUST return a SOAP fault with error code 0x81072101. This indicates that the SOAP protocol failed to add a list.
7. If the specified featureID is not installed on the site for the specified templateID, the protocol server MUST return a SOAP fault. This indicates that the feature for the provided templateID is not installed on the site.
8. If the listName is already used by another list, the protocol server MUST return a SOAP fault with error code 0x81020012. This indicates that another list has the specified listName.
9. If there are no errors, a new list MUST be created on the site by using the listName,
description, featureID, and templateID specified in the AddListSoapIn request message.
3.1.4.4.1 Messages
The following table summarizes the set of WSDL message definitions that are specific to this operation.
Message Description
AddListFromFeatureSoapIn The request to add a new list to the specified site based on the specified template and feature.
AddListFromFeatureSoapOut The response to a request to add a new list to the specified site based on the specified template and feature.
3.1.4.4.1.1 AddListFromFeatureSoapIn
The AddListFromFeatureSoapIn message is the request to create a new list, named "listName", on the site.
The SOAP action value of the message is defined as follows:
http://schemas.microsoft.com/sharepoint/soap/AddListFromFeature
The SOAP body contains an AddListFromFeature element (section 3.1.4.4.2.1).
3.1.4.4.1.2 AddListFromFeatureSoapOut
The AddListFromFeatureSoapOut message is the response that confirms the addition of a new list after a call to AddList (section 3.1.4.3).
The SOAP action value of the message is defined as follows:
http://schemas.microsoft.com/sharepoint/soap/AddListFromFeature
The SOAP body contains an AddListFromFeatureResponse element (section 3.1.4.4.2.2).
3.1.4.4.2 Elements
The following table summarizes the XML schema element definitions that are specific to this operation.
Element Description
AddListFromFeature The request to add a new list to the specified site based on the specified template and feature.
AddListFromFeatureResponse Contains the response to a request to add a new list to the specified site based on the specified template and feature.
3.1.4.4.2.1 AddListFromFeature
The AddListFromFeature element specifies that a list with the specified name and description be added on the specified site by using the predefined template specified by the templateID parameter.
This request differs from the AddList operation (section 3.1.4.3) in that it utilizes the additional featureID parameter to specify which feature to use.
<s:element name="AddListFromFeature">
<s:complexType>
<s:sequence>
<s:element name="listName" type="s:string"/>
<s:element name="description" type="s:string" minOccurs="0"/>
<s:element name="featureID" minOccurs="0" >
<s:simpleType>
<s:restriction base="s:string">
<s:pattern value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}" />
</s:restriction>
</s:simpleType>
</s:element>
<s:element name="templateID" type="s:int"/>
</s:sequence>
</s:complexType>
</s:element>
listName: The name of the list to create on the site.
description: A string that is the description of the list to be created.
featureID: The GUID for an installed feature to use for creating the new list.
templateID: The list template identifier of a template that is already installed on the site. See section 2.2.4.11.
3.1.4.4.2.2 AddListFromFeatureResponse
The AddListFromFeatureResponse element contains the response that is sent to the protocol client after a successful AddListFromFeature call (section 3.1.4.4).
<s:element name="AddListFromFeatureResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="AddListFromFeatureResult">
<s:complexType mixed="true">
<s:sequence>
<s:element name="List" type="tns:ListDefinitionSchema" />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
AddListFromFeatureResult: Contains information about the properties and schema of the list created by the AddListFromFeature operation. See section 2.2.4.12 for more details.