In December 2014, SAP enabled the HANA Cloud Platform mobile services (HCPms) trial for all hanatrial accounts. HCPms is a real Mobile-as-a-Service offering and it shares some source-code baselines with SMP 3.0 on premise. In consequence, mobile apps written with the SMP 3.0 OData SDK can run on both HCPms and SMP 3.0 on premise with little or no change. In order to understand the differences and similarities visit this blog SAP HANA Cloud Platform mobile services released
If you haven’t done it yet, you can enable your HCPms trial with the steps described in this blogHow to enable HANA Cloud Platform Mobile Services Trial
The process of creating your application configuration is different.john.polus hosted a webinar on this topic Webinar: Getting Started with the HANA Cloud Platform Mobile Services (HCPms) and Using the HANA Clo...and created two guides to help you go through this process.
The good news is all the Android material I have created for SMP 3.0 SDK for SMP3.0 on premise is also valid for HCPms. I have onboarded with HCPms and have accessed both online store and offline store using the projects and guides I published on Mobile Application Development Platform for Developers - Native Apps. No changes required.
In order to onboard with HCPms, you need to enter the values displayed in the following screenshot.
Host: hcpms-<your user>trial.hanatrial.ondemand.com
Login and Password: Your credentials
Port: 443
No need to check the "unsecure connection" checkbox, because HCPms is an HTTPS connection.
Before you run the android apps, I would recommend testing first the configuration of your application definition from a REST Client. I normally use POSTMAN plugin for Chrome, but feel free to use your favorite rest client plugin.
1. Onboard a user from the REST client
If you enter the following values, you should receive a “201 created” response if the application configuration is set up correctly
URL | https://hcpms-<your user>trial.hanatrial.ondemand.com/odata/applications/latest/<your app id>/Connections |
HTTP Operation | POST |
HTTP Header: Content-Type | application/atom+xml |
HTTP POST Body | <?xml version="1.0" encoding="UTF-8"?> <entry xml:base="http://localhost:8080/odata/applications/latest/com.sap.flight.kapsel/Connections" xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"> <content type="application/xml"> <m:properties> </m:properties> </content> </entry> |
Switch to Basic Auth Tab | |
Username | Your username |
Password | Your password |
Click the “Refresh Headers” button |
The result should look like the screenshot below. Please take note of the response and copy the ApplicationConnectionId property available in the response, because you will need it in the second test.
2. GET service document from the REST client
If you enter the following values, you should receive a “200 OK” response if the application configuration is set up correctly
URL | https://hcpms-<your user>trial.hanatrial.ondemand.com/<your app id>/ |
HTTP Operation | GET |
HTTP Header: X-SMP-APPCID | The ApplicationConnectionId you received in the response body from the onboarding exercise. |
Switch to Basic Auth Tab | |
Username | Your username |
Password | Your password |
Click the “Refresh Headers” button |
The test should look like the screenshot below
Cheers
Claudia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
38 | |
19 | |
13 | |
13 | |
11 | |
10 | |
10 | |
10 | |
8 | |
8 |