【发布时间】:2016-03-10 10:42:35
【问题描述】:
当我使用我的客户端程序从特定的 SharePoint 服务器获取所有列表时,我会获取很多列表,但我只想向用户展示文档库。我怎样才能做到这一点?我看到图书馆可以命名任何东西,而不仅仅是“共享文档”,那么肯定还有另一种可能性?我目前正在使用 WSS/SOAP 并使用 GetListsCollection 方法与 _vti_bin/lists.asmx 服务通信,但任何线索都会有所帮助。
我的代码
var getSharepointDocumentLibrary = '' + '' + '' + '' + '' + '';
try {
$.ajax({
url: url,
type: "POST",
dataType: "xml",
data: getSharepointDocumentLibrary,
username: domainName + "\\" + userName,
password: passWord,
crossDomain: true,
headers: {
//"SOAPAction": "http://schemas.microsoft.com/sharepoint/soap/GetList",
"SOAPAction": "http://schemas.microsoft.com/sharepoint/soap/GetListCollection",
"Content-Type": "text/xml; charset=utf-8",
"Origin": "*",
"Access-Control-Request-Method": "POST",
"Access-Control-Request-Headers": "accept, authorization, origin, X-Custom-Header",
"Authorization": 'Basic ' + window.btoa(unescape(encodeURIComponent(domainName + "\\" + userName + ':' + passWord)))
},
}).done(function (xmlDoc, status, responseObj) {
alert('success');
//alert(responseObj.responseText);
//// addOptionInSelectize("serverNames", serverName, serverName);
//// changeSelectionByValue("serverNames", serverName);
// changeSelectionByValue("serverNames", serverName);
addServerInDropDownList(serverName,domainName);
navigate('indexPage', 'homePage');
})
.fail(function (xmlDoc, status, responseObj) {
alert('failure');
alert(xmlDoc.status);
alert(xmlDoc.message);
$("#loginPopup2").show();
//alert(responseObj.responseText);
})
【问题讨论】:
标签: sharepoint