Getting soap exception while updating a list.

May 30, 2012 at 11:28 AM

I'm using the following code to set a couple of default values in sharepoint using SPServices.

    var thisLibraryID = $().SPServices.SPListNameFromUrl();
   
    // Update default values of the metadata fields
    var fieldsToUpdate = '<Fields>';
    fieldsToUpdate += '<Method ID="1"><Field Name="ProjectName2"><Default>' + projectName + '</Default></Field></Method>';
    fieldsToUpdate += '<Method ID="2"><Field Name="ProjectID3"><Default>' + projectID + '</Default></Field></Method>';
    fieldsToUpdate += '</Fields>';
   
    console.log("fields");
    $().SPServices({
        operation: "UpdateList",
        listName: thisLibraryID,
        updateFields: fieldsToUpdate,
        async: false,
        completefunc: function (xData, status) {}
    });


The last function returns the following error:

    <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">
    <soap:Body>
    <soap:Fault>
    <faultcode>soap:Server</faultcode>
    <faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.</faultstring>
    <detail>
    <errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">Attempted to use an object that has ceased to exist. (Exception from HRESULT: 0x80030102 (STG_E_REVERTED))</errorstring>
    <errorcode xmlns="http://schemas.microsoft.com/sharepoint/soap/">0x80030102</errorcode>
    </detail>
    </soap:Fault>
    </soap:Body>
    </soap:Envelope>



What am I doing wrong?

Coordinator
May 30, 2012 at 9:49 PM

I don't see anything obvious, but make sure that you are using the InternalName for each column, and not the DisplayName.

M.