사이트에 연결되는 Lists.asmx를 사용하여 특정 사이트의 문서 라이브러리 하위 폴더에있는 문서를 가져 오는 데 큰 문제가 있습니다. 문서 라이브러리의 GUID를 전달하고 그 아래의 폴더 및 파일 목록을 가져올 수 있지만 문서 라이브러리 아래의 폴더 내에서 파일을 가져올 수 없습니다.SharePoint Webservices GetLists
Lists lists = new Lists();
lists.Credentials = System.Net.CredentialCache.DefaultCredentials;
// string listName = "{8F6C3E9B-3160-4EC9-94CB-763DCAE966CB}";
// string listName = "{FA20F595-A568-4FFA-AAAD-C81EFCBD3C42}";
// string listName = "{12B07CC9-9391-49BA-93A3-9C385F21ABD1}";
string listName = "Document%20Library";
string viewName = "";
string tbDetails = "";
// Instantiate an XmlDocument object
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
System.Xml.XmlNode query = xmlDoc.CreateNode(XmlNodeType.Element, "Query", "");
System.Xml.XmlNode viewFields = xmlDoc.CreateNode(XmlNodeType.Element, "ViewFields", "");
System.Xml.XmlNode queryOptions = xmlDoc.CreateNode(XmlNodeType.Element, "QueryOptions", "");
/*Use CAML query*/
queryOptions.InnerXml = @"<QueryOptions><ViewAttributes Scope='RecursiveAll'/> </QueryOptions> ";
// Get Items related to Customers
XmlNode ndListItems = lists.GetListItems(listName, "", query, viewFields, null, queryOptions, null);
내가 ndListItems 내부보고 난 단지 폴더를보고하고 유지가 아니라 그 안에 무엇을 :
여기 내 코드의 일부이다. 또한 내부에보고 싶은 폴더의 GUID를 사용해 보았습니다. 오류로 인해 실패합니다.
목록이 존재하지 않습니다. 선택한 페이지에 존재하지 않는 목록이 있습니다. 다른 사용자가 삭제했을 수 있습니다. 0x82000006
아이디어가 있으십니까?
나는 이것을 시도해 보았습니다. No Joy :( – gcoleman0828
@ user479323 웹은 올바른 것입니까? ? –
@ user479323 목록 웹 서비스가 'Http : // siteurl.com/site1/_vti_bin/Lists.asmx'를 참조하는 경우 문서 라이브러리는'site1'에 있어야합니다 –