cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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*/);

           

        }

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I just updated SMP SDK version to latest and looks like it is working. I still need to do more testing. I will let you know guys if I encounter any issues. Tune in please.