By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,115 Members | 898 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,115 IT Pros & Developers. It's quick & easy.

Sharepoint Webservice Problem

P: n/a

I am trying to update a list on sharepoint server via calling its standard
built in web service. When ever i call the UpdateListitems() method, I get
the following exception:

System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at SPSWebserviceClient.preston.Lists.UpdateListItems( String listName,
XmlNode updates) in C:\Documents and Settings\Javeed\My Documents\Visual
Studio Projects\WebParts\SPSWebserviceClient\Web
References\preston\Reference.cs:line 239
at SPSWebserviceClient.clientWindow.updateList_Click( Object sender,
EventArgs e) in c:\documents and settings\javeed\my documents\visual studio
projects\webparts\spswebserviceclient\spswebservic eclient.cs:line 145

Can any one help me in this. Preston is the name of my server hosting the
sharepoint webservice. Following is my code:

//Creating an instance of a list on the server. Server is "preston" in
this case where the standard SPS web service resides.
preston.Lists routeList = new preston.Lists();

//Authenticating the user by his default credentials.
routeList.Credentials = System.Net.CredentialCache.DefaultCredentials;

//Setting the url to the subsite for which the clients is requesting the
routeList.Url =

// Create an XmlDocument object and construct a Batch element and its
//The Batch element provides batch processing of commands within HTTP
XmlDocument doc = new System.Xml.XmlDocument();
XmlElement batchElement = doc.CreateElement("Batch");

/* Specify methods for the batch post using CAML. In each method include
the ID of the item to update and the value to place in the specified
batchElement.InnerXml = "<Method ID='1' Cmd='Update'>"+
"<Field Name='ID'>3</Field>"+
"<Field Name='Position'>100</Field>"+
// Update list items.

catch(Exception ex)
Nov 23 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.