On the SharePoint 2010 lists of web service update lists, you cannot complete the "Attempt to use an object that ceases to exist" ... but it exists.
I would like to update the attribute for existing fields. For demonstration purposes, it should be easy to update the description. Using and extending haufe.sharepoint 0.1.9, I can request / update items and delete fields. I am sure that I am referring to the list correctly, observing the changes during the update and deletion. I believe that the field is also precisely addressed, because: a) it can be deleted and b) if I change the "Name" or "Identifier", the error will change to "A field with this name was not found."
By dropping a SOAP message from SUDS, I can show different messages and results. Below are three test cases. The first is failure. The second shows a name mismatch resulting in another error. The third shows how to delete a field by name.
Any ideas on where to go next? Could there be special permission to update the field, besides the ability to delete the same field? Although I own a subsite, I am not a SharePoint administrator or administrator. Thus, finding logs or installing custom code is difficult / absent. This is why I use the Python web service approach. I'm almost completely dumb.
Thanks Rob
Message This should work to update the Description field, but it is not. Besides using the field identifier, Ive tried the name, displayName and StaticName to no avail. MSFT Link: http://msdn.microsoft.com/en-us/library/lists.lists.updatelist%28v=office.12%29.aspx
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns1:UpdateList> <ns1:listName>D538A29D-6DD4-423A-9E7D-2697917BDA78</ns1:listName> <ns1:updateFields> <Fields> <Method ID="1"> <Field ID="08d8fb05-0de8-4e19-988c-e204ade07f47" Description="new desc"/> </Method> </Fields> </ns1:updateFields> </ns1:UpdateList> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
The error is :
<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>
Message Expect not to find a field and not be. Basically, this proves that the wrong name leads to another error.
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns1:UpdateList> <ns1:listName>D538A29D-6DD4-423A-9E7D-2697917BDA78</ns1:listName> <ns1:updateFields> <Fields> <Method ID="1"> <Field ID="q08d8fb05-0de8-4e19-988c-e204ade07f47" Description="new desc"/> </Method> </Fields> </ns1:updateFields> </ns1:UpdateList> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Message : the ability to delete a field like this. It just proves that the field can be successfully processed.
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns1:UpdateList> <ns1:listName>D538A29D-6DD4-423A-9E7D-2697917BDA78</ns1:listName> <ns1:deleteFields> <Fields> <Method ID="3"> <Field Name="myText"/> </Method> </Fields> </ns1:deleteFields> </ns1:UpdateList> </SOAP-ENV:Body> </SOAP-ENV:Envelope>