Getting soap exception while updating a list.

May 30, 2012 at 10: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>';
        operation: "UpdateList",
        listName: thisLibraryID,
        updateFields: fieldsToUpdate,
        async: false,
        completefunc: function (xData, status) {}

The last function returns the following error:

    <soap:Envelope xmlns:soap="" xmlns:xsi="" xmlns:xsd="">
    <faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.</faultstring>
    <errorstring xmlns="">Attempted to use an object that has ceased to exist. (Exception from HRESULT: 0x80030102 (STG_E_REVERTED))</errorstring>
    <errorcode xmlns="">0x80030102</errorcode>

What am I doing wrong?

May 30, 2012 at 8:49 PM

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