I'm trying to write a little C# Windows app in Visual Studio that will call a web service procedure from a SharePoint site. I have no experience with this.
After reading this tutorial I wrote the following code. I assume it's supposed to return a list of the documents on the site in xNode.Attributes, but it returns zero for xNodes.Attributes.Count.
WebSite site = new WebSite();
Lists.Lists listsWebService = new Lists.Lists();
listsWebService.Url = "http://some sharepoint site url/_vti_bin/lists.asmx";
NetworkCredential creds = new NetworkCredential();
creds .Domain = "some domain";
creds .UserName = "some username";
creds .Password = "some password";
listsWebService.Credentials = creds ;
XmlNode xNodes = listsWebService.GetListCollection();
listBox1.Items.Add(xNodes.Attributes.Count);
label1.Text = "complete";
Did I assign the URL correctly? Where is the list of documents? Is there something else I'm missing?
Thanks to anyone who can help!
After reading this tutorial I wrote the following code. I assume it's supposed to return a list of the documents on the site in xNode.Attributes, but it returns zero for xNodes.Attributes.Count.
WebSite site = new WebSite();
Lists.Lists listsWebService = new Lists.Lists();
listsWebService.Url = "http://some sharepoint site url/_vti_bin/lists.asmx";
NetworkCredential creds = new NetworkCredential();
creds .Domain = "some domain";
creds .UserName = "some username";
creds .Password = "some password";
listsWebService.Credentials = creds ;
XmlNode xNodes = listsWebService.GetListCollection();
listBox1.Items.Add(xNodes.Attributes.Count);
label1.Text = "complete";
Did I assign the URL correctly? Where is the list of documents? Is there something else I'm missing?
Thanks to anyone who can help!