1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
static public string getDocumentsFromLibrary(string Site, string libraryName)
{
SiteData.no.intranet.SiteData data = new SiteData.no.intranet.SiteData();
data.Url = FormatProperURL(Site) + "/_vti_bin/SiteData.asmx";
string username = ConfigurationManager.AppSettings["integration.sharepoint.username"];
string password = ConfigurationManager.AppSettings["integration.sharepoint.password"];
data.Credentials = new NetworkCredential(username, password);
XmlDocument xmlDoc = new System.Xml.XmlDocument();
XmlNode qry = xmlDoc.CreateNode(XmlNodeType.Element, "Query", "");
XmlNode ndViewFields = xmlDoc.CreateNode(XmlNodeType.Element, "ViewFields", "");
string result = data.GetListItems(libraryName, qry.ToString(),ndViewFields.ToString(),0);
return result;
} |
Partager