views:

419

answers:

0

What I've Done

  • Inside SharePoint I created a List based on the Project Tasks template
  • I deleted most default columns, and added new custom columns
  • I added data using the new format
  • Then I did a "Save as template" and chose to save the template with the content

What IS Working

Now, when I use that template to create a new List inside of SharePoint it works perfectly. The custom columns are present, and the data is all pre-filled as expected.

What ISN'T Working

However, when I use the AddList or AddListFromFeature methods made available by SharePoint web services the new list is created, but it is simply based off of the original Project Tasks template with the default columns and no data!

What I've Tried

  • I tried following the suggestion in the article from Phase 2 to setup a custom template ID, but that only prevented me from using the template at all (was no longer listed when I do a "Create").
  • I'm still trying to figure out if this article applies - it seems to be a similar issue, but applied to Sites instead of Lists.
  • I found that another person was having the same problem about a year ago.

System Setup

Working with SharePoint 2007 (I think?), using PHP with NuSOAP to connect. The connection is definitely working as I've added items to lists, created lists, and read data.

Code Samples

Request - against Phase 2 Method template above

<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2034="http://tempuri.org"&gt;&lt;SOAP-ENV:Body&gt;
<AddListFromFeature xmlns="http://schemas.microsoft.com/sharepoint/soap/"&gt;
 <listName>2Test Milestone Release</listName>
 <description>Testing this out</description>
 <featureID>{00BFEA71-513D-4CA0-96C2-6A47775C0119}</featureID>
 <templateID>151</templateID>
</AddListFromFeature></SOAP-ENV:Body></SOAP-ENV:Envelope>

Response - fails due to templateID not being recognized

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;soap:Body&gt;&lt;soap:Fault&gt;&lt;faultcode&gt;soap:Server&lt;/faultcode&gt;&lt;faultstring&gt;Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.</faultstring><detail><errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/"&gt;Cannot complete this action.

Please try again.</errorstring><errorcode xmlns="http://schemas.microsoft.com/sharepoint/soap/"&gt;0x81072101&lt;/errorcode&gt;&lt;/detail&gt;&lt;/soap:Fault&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;

I'm stumped! So if you can help - I'd be a very happy person! Thanks, in advance!