Skip to Content

/wp-content/uploads/2014/05/sap_logo_333927.png

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.
    image1.PNG
  • 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.
    image2.PNG
  • 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. 
    image3.PNG
  • 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.
    image4.PNG

Back to Getting Started With Kapsel

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

    1. Daniel Van Leeuwen Post author

      Good point.  It appears to be called

      SAP Mobile Platform, enterprise edition, cloud version.

      I removed references to 3.0.  Thanks for the catch.

      (0) 
  1. Adérito Brinca

    Thanks for this blog Daniel,

    I am trying to register against this server in Chrome using register.html from the Logon Section. I place a copy of datajs-1.1.2.min.js in the same directory as register.html

    When I press the button “Register” on the screen “Register Sample” with SMP 3.0 Host 10.7.171.129; User ID S0009547801; and Password equal to my account password, I am getting the following error message:

    “An error occurred in register.html (at line #50): ReferenceError: OData is not defined”

    Can you help me to find what am I doing wrong?

    Regards

    Aderito

    (0) 
    1. Daniel Van Leeuwen Post author

      That error indicates that the datajs library was not loaded.  I would double check that the name on the import exactly matches the name of the file.

      In Chrome you can open the debugger by pressing Ctrl Shift i.  The JavaScript console may include some additional error messages.

      (0) 
  2. Adérito Brinca

    Many thanks for your hint Daniel, it made me have a look at the register.html file, and I realized that I didn’t change the getSMPURL method to use port 443 and HTTPS, and also not changed the value for the SMP Host to be the URL of my server instance, as described in your Appendix J above (in my case smp-S0009547801trial.hanatrial.ondemand.com).

    I can see the Connection as well as the User on the SAP Mobile Platform Administration and Monitoring, but when I try to use this server instance on Eclipse Kepler under Window-Preferences-SAP Mobile Platform Tools-Server as described below (please see connection settings), I am getting error message after pressing button “Test Connection”

    “Authorization problem

    Reason: User not authorized”

    my connection settings are:

    URL: https://smp-s0009547801trial.hanatrial.ondemand.com:443

    User: smpAdmin

    Password: se3Admin

    Any idea about what could be the source of the error?

    Regards

    Aderito

    (0) 

Leave a Reply