Skip to Content
0
Former Member
Apr 23, 2015 at 11:46 PM

Unable to open Online/Offline store - using Getting Started with Kapsel - Part 15

15 Views

Hello,

I am just following the exercise to create offline scenario. I was able to do READ, but when I tried to open the online store, I am keep getting the error ( screenshot attached).

I am using the standard code from excersie but wonering what's is wrong. I tried to increase the log level on SMP to DEBUG, but no entries are found in log related offline.

Please help. Here is the piece of code I am using to open the store

function openStore() {

if (!haveAppId()) {

return;

}

var authStr = "Basic " + btoa(applicationContext.registrationContext.user + ":" + applicationContext.registrationContext.password);

updateStatus2("store.open called");

startTime = new Date();

var properties = {

"name": "ProductsOfflineStore",

"host": applicationContext.registrationContext.serverHost,

"port": applicationContext.registrationContext.serverPort,

"https": applicationContext.registrationContext.https,

//"serviceRoot" : "http://hcpms-p1zzxxxxxtrial.hanatrial.ondemand.com/com.xyz.test", //appId,

"serviceRoot": applicationContext.applicationEndpointURL,

// "serviceRoot": "com.slb.mobile",

"customHeaders" : {

"X-SMP-APPCID" : applicationContext.applicationConnectionId

},

"streamParams" : "custom_header=Authorization: Basic " + authStr + ";",

"definingRequests" : {

"ProductsDR" : "/Products"

}

};

store = sap.OData.createOfflineStore(properties);

store.open(openStoreSuccessCallback, errorCallback/*, options*/);

}