Skip to Content
0

SAP UI5 + KAPSEL + Offline + X509 Certificate error

May 03, 2017 at 06:58 AM

85

avatar image

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 (X509) 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 X509 certificate for SAPUI5 Offline Kapsel application but I am always getting "Please check your connection data" when pressing "OK" on the login screen.

I have tried to register via Chrome Advance REST client and registration is working fine with certificate.

Following are my confusions.

1- Does iOS require specific ports to be opened on Reverse proxy server to work with. Currently they are using standard 443 port.

2- While working with Custom Fiori Client, there is an appConfig file where we define the name of certificate "X509FileCertificateProvider". In SAPUI5 Kapsel app i tried to add the same config in devapp.onDeviceReady method like this. Is this correct or do i need to do it at any other location?

var context = {
                              
  appConfig:{
      appID : "com.my.app",
      isForSMP : true,
      certificate : "X509FileCertificateProvider"
  },
                              
  smpConfig : {
     "serverHost": "mobile.offline.com"
     "https": "true",
     "serverPort": "443"
   }
};

Any help is highly appreciated.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Umer Farooq May 26, 2017 at 02:48 PM
0

Any body can help me in this regard?

Application Code for Registration and Certificate selection.


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

After this I got the attached error.

error-after-cert-selection.png

Any guess what am i missing here???


Share
10 |10000 characters needed characters left characters exceeded
Umer Farooq May 26, 2017 at 03:47 PM
0

Xcode error log is also attached for reference.error-log.txt


error-log.txt (115.2 kB)
Share
10 |10000 characters needed characters left characters exceeded