* @return The set of child sites
*/
public Set<String> getDirectChildsites() {
final Set<String> allWebsList = new TreeSet<String>();
final GetWebCollectionResponseGetWebCollectionResult webcollnResult =
Util.makeWSRequest(sharepointClientContext, websWS,
new Util.RequestExecutor<
GetWebCollectionResponseGetWebCollectionResult>() {
public GetWebCollectionResponseGetWebCollectionResult
onRequest(final BaseWS ws) throws Throwable {
return ((WebsWS) ws).getWebCollection();
}
public void onError(final Throwable e) {
LOGGER.log(Level.WARNING,
"Unable to get the child webs for the web site.", e);
}
});
if (webcollnResult != null) {
final MessageElement[] meWebs = webcollnResult.get_any();
if ((meWebs != null) && (meWebs[0] != null)) {
Iterator<?> itWebs = meWebs[0].getChildElements();
if (itWebs != null) {
while (itWebs.hasNext()) {
// e.g. <ns1:Web Title="ECSCDemo"