Skip to Content
0

SAP UI5 + KAPSEL + Offline + SSL Certificate

May 26, 2017 at 03:13 PM

139

avatar image
Former Member

Dear Experts,

I am developing an SAPUI5 Offline application based on Web IDE standard template and all of my Offline/Online features are working fine. This app is currently specific for iOS

Our client has exposed the SMP Server via Reverse proxy URL that requires a certificate (SSL) to access the particular URL.

We have already embedded this certificate in our customized iOS fiori client and its working fine with FIori Client by following this link

https://help.sap.com/saphelp_smp3010sdk/helpdata/en/cf/343e4e138548118b4c895b729e0780/content.htm

Now, I followed the same steps to configure SSL certificate for SAPUI5 Offline Kapsel application.

I am using standard SAP Web IDE Kapsel Offline template and every thing is working fine where no SSL certificate is required.

I am using the following code as referenced in the above documentation. Now, when i run the application, I first see the Certificate selection screen (Please see cert-screen.png) and after pressing submit button, get the following error (Please see error-after-cert-selection.png)

Please let me know what i am missing here??? Any help would be highly appreciated

@MidhunVP

@Jitendra

mycontext = {};

mycontext.appConfig = {
     "appID": "APP_ID", // app id on SMP server
     "isForSMP": true,  //SMP registration
     "certificate": "X509FileCertificateProvider"
},
              
mycontext.operation = {
     "logonView": sap.logon.LogonJsView
},     
              
mycontext.smpConfig = {
     "appName": "APP_NAME",
     "serverHost": "REVERSE_PROXY_URL",
     "https": true,
     "serverPort": 443
};
              
var appDelegate = {};
              
appDelegate.onRegistrationSuccess = function(context) {
              
     if (context) {
     
         that.appContext = context;
         if (that.openStore) {
             that.openAppOfflineStore();
             that.openStore = false;
         } else if (!that.devapp.isLoaded) {
              that.devapp.startApp();
              that.devapp.isLoaded = true;
         }
     }
};
              
appDelegate.onRegistrationError = function(errObj) {   
    if (errObj) {
        MessageBox.alert(JSON.stringify(errObj));
    } else {
        MessageBox.alert("logon failed.");
    }
};
                            
sap.Logon.startLogonInit(mycontext, appDelegate);
10 |10000 characters needed characters left characters exceeded
Former Member

XCode error log is also attached for the reference.

error-log.txt

error-log.txt (115.2 kB)
0
* Please Login or Register to Answer, Follow or Comment.

0 Answers