private ListgetLibraries(String site, String username, String password) { List tag = new ArrayList (); try { ListsSoapStub stub = SharePointWSDL.newLists(new URL(site + "/_vti_bin/Lists.asmx"), new ListsLocator()); stub.setUsername(username); stub.setPassword(password); com.microsoft.schemas.sharepoint.soap.GetListCollectionResponseGetListCollectionResult lcr = stub.getListCollection(); if (lcr.get_any().length > 0) { NodeList children = lcr.get_any()[0].getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node node = children.item(i); String baseType = node.getAttributes().getNamedItem("BaseType").getNodeValue(); if (!"1".equals(baseType)) continue; String template = node.getAttributes().getNamedItem("ServerTemplate").getNodeValue(); String title = node.getAttributes().getNamedItem("Title").getNodeValue(); if ("|101|115|109|".indexOf("|" + template + "|") < 0) continue; tag.add(title); } } } catch (Exception e) { logger.error("", e); } return tag; }
Thursday, 13 October 2011
Retrieve list of libraries on SharePoint site
In order to retrieve list of libraries on SharePoint site, please use following code:
Above code use Java WSDL for SharePoint
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2011
(31)
-
▼
October
(11)
- Salesforce DEV 401 Preparation - Day 2
- Salesforce DEV 401 Preparation - Schedule
- Salesforce DEV 401 Preparation - Day 1
- I prepare for Salesforce DEV 401
- Demand for a product increases when the prices of ...
- Retrieve CPU brand by C and Win32 API
- Call JSONP with jQuery
- Upload file to SharePoint site
- Accessing SharePoint web service requires Basic Au...
- Retrieve list of libraries on SharePoint site
- Install java plugin on Ubuntu 10.04.3 LTS
-
▼
October
(11)
No comments:
Post a Comment