when I'm getting all the lists with my Client program from a specific SharePoint server, I'm getting quite a lot of them, but I'd like to present to the user only the Document Libraries. How can I do this? I saw that a Library can be named anything, not only "Shared Documents", so there must be another possibility? I'm currently using WSS/SOAP and talking to the _vti_bin/lists.asmx service with GetListsCollection method, but any clue will be helpful.
my code
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);
})