This is probably teh last hurdle I have to overcome to finish my project, so I am anxious, especially since I have come this far.
I have a form library from which I read all the columns into a repeating table. The user will select, via checkbox, which ones he wants to process. Upon clickign a button, I use some C# code to process all the records in that table. No problem, there. Now, I need to update one of the columns in hte underlying form library, markign the record as "done".
I have searched a whole bunch on the UpdateListItem web service. The CAML I ome up with is:
<Method ID="1" Cmd="Update"><Field Name="ID">3</Field><Field Name="FileRef">[MYURL1]</Field><Field Name="Status">done</Field></Method>
The code I use is like this:
/*Declare and initialize a variable for the Lists Web service.*/sitesWebServiceLists.Lists listServiceU = new sitesWebServiceLists.Lists();
//Authenticate the current user by passing their default
//credentials to the Web service from the system credential cache. listServiceU.Credentials = System.Net.CredentialCache.DefaultCredentials; listServiceU.Url = "[MYURL2]/_vti_bin/lists.asmx";
sRequestGUID =
"Requests";XmlNode ndReturn1 = listServiceU.UpdateListItems(sRequestGUID, elBatchUpdate);if (ndReturn1.FirstChild.FirstChild.InnerText != "0x00000000")
{
thisXDocument.UI.Alert(
"Error Occurred: " + ndReturn1.FirstChild.FirstChild.InnerText);continue;
}
NOTE: I have disguised the URLs with [MY URLX] MYURL1 is the URL to the document I am updating. MYURL2, appended with "_vti_bin/lists.asmx" points to the web service.
I have tried using teh name and GUID for the form library name. I can cut and paste the URL for the web service into a borwser and the web service page comes up. The URL in my CAML brings up teh correct document. Yet it throws the error HTTP 404 Not Found. What am I doing wrong?