Hi,
I am getting following error while creating HANAXS standard session in HCP CMIS. I tried both HANAXSECMSession and Standard session as well, both are giving different errors. Please find error marked with red color.
Getting children for folder '/'
------------------------------------------
Error:
TypeError: repInfo is null
Here is my sample code used in the application, any help is appreciate.
var result = "";
var docService = $.import("sap.bc.cmis", "cmis");
var authParams = {
user : user,
password : pwd
};
var authenticator = new docService.cmis.StandardAuthenticationProvider(authParams);
var hanaParams = {destination : $.net.http.readDestination("cmistestapp","ecm") };
var session = docService.cmis.createHANAXSStandardSession(hanaParams,authenticator);
try
{
var root;
var path = "/";
session.init().then(function(repInfo) {
result += "Getting children for folder \'" + path + "\'";
result += "\n------------------------------------------";
return session.getRootFolder();
}).then(function(folder) {
return folder.getChildren().each(function(child, pos, count) {
if (child.isDocument()) {
result += "\n(" +pos + ") " + child.getName() + " [Document]";
} else if (child.isFolder()) {
result += "\n(" +pos + ") " + child.getName() + " [Folder]";
}
}).then(function(count) {
result += "\n---------------------------------------";
result += "\nRoot Folder has " + count + " children.";
});
});
$.response.contentType = "text/plain";
$.response.setBody(i);
} catch (e) {
$.response.contentType = "text/plain";
$.response.setBody(result + "\n\nError:\n" + e.name + ": " + e.message + "\n\n" + e.stack);
}