} catch (final Exception e) {
LOGGER.log(Level.WARNING, "Unable to Get Title for web [ " + webURL
+ " ]. Using the default web Title. " + e);
}
} else {
final GetWebResponseGetWebResult resWeb =
Util.makeWSRequest(sharepointClientContext, websWS,
new Util.RequestExecutor<GetWebResponseGetWebResult>() {
public GetWebResponseGetWebResult onRequest(final BaseWS ws)
throws Throwable {
return ((WebsWS) ws).getWeb(webURL);
}
public void onError(final Throwable e) {
LOGGER.log(Level.WARNING, "Unable to get title for web. "
+ "The request to getWeb failed.", e);
}
});
if (null != resWeb) {
final MessageElement[] meArray = resWeb.get_any();
if ((meArray != null) && (meArray.length > 0)
&& (meArray[0] != null)) {
webTitle = meArray[0].getAttribute(SPConstants.WEB_TITLE);
}
}