Appendix J: SMP Server Cloud Version
The samples written for this guide were developed and tested against the SMP 3.0 server on premise version. This section will demonstrate how Kapsel can be used with the SMP server cloud version and point out some of the differences between the two SMP server versions. One benefit of using the SMP server cloud edition trial is that with just a few clicks, an instance of an SMP server is ready to be used. By comparison the download for the SMP 3.0 server install is over 2 GB and can take a while to download and install. In general a server that is hosted in the cloud will automatically have patches applied to it, have backups taken, handle failover, and have hardware capacity added or removed as needed. When the server is in the cloud, depending on the setup, it can be harder to make changes to configuration files or access log files.
Note, the SMP Server Cloud Version has been replaced by SAP HANA Cloud Platform mobile services. See also http://scn.sap.com/community/developer-center/mobility-platform/blog/2014/12/17/sap-hana-cloud-platform-mobile-services-trial-availibility and note it mentions
Your current SMP Cloud version trial subscription will be available for you until end of January
Follow the below steps to sign up and use the SMP server cloud edition.
- Sign up for an SMP cloud edition instance at https://account.hanatrial.ondemand.com/. There is some documentation also available at SAP Mobile Platform Cloud Documentation.
- Access the created instance at https://account.hanatrial.ondemand.com/cockpit. Click on SAP Mobile Platform in the services box.
- Create a new Application with an application ID of com.mycompany.logon.
Provide an endpoint value of http://services.odata.org/OData/OData.svc.
Select Connect to Internet since this URL is an external URL.
Create a new security profile as shown below. Note since the provided URL does not require authentication any provided user name and password authentication against it will succeed.
- Register against this server in Chrome using register.html from the Logon section. Remember to place a copy of datajs-1.1.2.min.js in the same directory as register.html.
Change the getSMPURL method to use port 443 and HTTPS.
Also change the value for the SMP Host to be the URL for your server instance such as smp-i82xxxxtrial.hanatrial.ondemand.com
A successful registration can be seen under Applications > Application Connections.
- In order to use the Logon plugin to register against an SMP server that uses HTTPS, the mobile device or simulator will have to trust the certificate that the server is using. Note, the GTE CyberTrust Global Root CA is installed by default on Android and iOS devices and emulators.
Note, there was a bug in the Logon plugin for Android using SP02 that would prevent a successful registration. The error Server certificate contained a different Hostname will appear in the LogCat if this error is encountered. It has been fixed in SP03.
- Create a project similar to the one shown in the Logon section and use this index.html file. Modify the serverHost variable to point to point to the name of the server hosting the SMP server.
Note that this sample is similar to register3.html from the Logon plugin section except that it uses port 443, https=true, X-SUP-APPCID rather than X-SMP-APPCID, and an OData provider that uses HTTP so that we do not have to add the certificate used by the SAP Netweaver Gateway demo system to the SMP cloud server. If you do wish to add a certificate follow the instructions in the post HTTPS backend url doesn’t work on SMP cloud.
Deploy and run the project.
- The cloud version server does not appear to support Kapsel AppUpdate or Logger plugins.
- The following is an example of sending a notification to an app that has registered with the SMP server using an application connection ID of d82750f1-311e-4a26-b9c2-0c342739efc5. Note that the URL is https://smp_server_cloud_host:443/Push/appcid v.s. than http://smp_server_onpremise_host:8080/Notification/appcid. Also note the use of X-SUP-DATA rather than X-SMP-DATA.