tags:

views:

361

answers:

1

I would like a reliable way to get the root folder address of a list using web services?

Is it possible or do I need to revert to some string manipulation, which is subject to errors?

Here is the object model equivalent:

SPWeb myWeb = SPContext.Current.Web;
Debug.WriteLine("MyWeb lists : ");
foreach (SPList aList in myWeb.Lists)
     {
         Debug.WriteLine("************************************");
         Debug.WriteLine("list Title (Display Name): " + aList);
         Debug.WriteLine("list Title (Display Name): " + aList.Title);
         Debug.WriteLine("list Root Folder Name: " + aList.RootFolder.Name);
         Debug.WriteLine("************************************");
     }
A: 

Its pretty easy

call:

XmlNode node = wsLists.GetList(this.AttachmentsListName);

then you can access the node attributes by name for example:

node.attributes["RootFolder"]
JL