3.1.4.4 AddListFromFeature

The AddListFromFeature operation<36> 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<37> 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.