just an update here:
I've noticed if I hard code values in the xml file, it does do the update, it just doesnt update when i try updating the fields.
i've also been trying to get this to work via code following the example from here:
http://msdn.microsoft.com/en-us/library/ms440289(v=office.12).aspx
Unfortunately it blows up on the last line (go figure!), and says:
"Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
my code is as follows:
'Declare and initialize a variable for the Lists Web service.Dim listService As New spWeb.Lists()
'Authenticate the current user by passing their default
'credentials to the Web service from the system credential cache.
listService.Credentials = System.Net.CredentialCache.DefaultCredentials
'Set the Url property of the service for the path to a subsite.
listService.Url =
"http://server.com/Dev/_vti_bin/lists.asmx"
'Get Name attribute values (GUIDs) for list and view.
' Dim ndListView As System.Xml.XmlNode = listService.GetListAndView("WirelessDev", "")
Dim strListID As String = "{F5BBD9F7-7FA5-41C3-A7BE-9D83B0E939FA}"
Dim strViewID As String = "{903EC723-BAF9-4021-9BF0-FC031B430AFF}"
'Create an XmlDocument object and construct a Batch element and its 'attributes. Note that an empty ViewName parameter causes the method 'to use the default view. Dim doc As New System.Xml.XmlDocument()
Dim batchElement As System.Xml.XmlElement = doc.CreateElement("Batch")batchElement.SetAttribute("OnError", "Continue")
batchElement.SetAttribute(
"ListVersion", "1")batchElement.SetAttribute("ViewName", strViewID)
'Specify methods for the batch post using CAML. To update or delete, 'specify the ID of the item, and to update or add, specify
'the value to place in the specified columns.Dim strBatch As String = "<Method ID='1' Cmd='Update'>" + _
"<Field Name='ID'>1</Field>" + _"<Field Name='FirstName'>Josh</Field>" + _
"</Method>"
batchElement.InnerXml = strBatch
'Update list items. This example uses the list GUID, which is recommended, but the list display name will also work.
listService.UpdateListItems(strListID, batchElement)
I hard coded the listID and viewIDs in, and I'm pretty confident they're correct as I got them from the URL directly in SP. From my understanding, the viewID is optional, isnt it? if none is specified, doesnt it use the default view?