cancel
Showing results for 
Search instead for 
Did you mean: 

How to call HCP IoT Dimension in UI5

Former Member
0 Kudos

Hello,

I am new to HCP and was trying out IoT services using the starter kit available. I create hierarchy in devices section of IoT cockpit.

Like -

     Level1 - > Sub-Level1 - > link [Device1, Device2]

     Level2 - > Sub-Level2 - > link [ Device3 , Device4].

Now i wanted to create a UI5 application and show the data pushed through MMS service. Along with that i wanted to organize the output in hierarchy I had created earlier.I found this documentation which gives the service URLs to access these dimension. But when I call them in my controller I get an error "Your browser does not support JS or is turned off .. <form method=""post" https://account.sap.com/saml2....".

While looking for a solution I saw it basically is requesting to revalidate the user again and trying to open the logon screen since the response header has -- "Cache-Control: must-revalidate". Could you please help and let me know how can I read this data in my UI5 application.

>https://help.hana.ondemand.com/iot/frameset.htm?849cddcf18e440d8bb6ee2cf590e0016.html

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi,

Solution to your problem depends on how your UI5 application is hosted. Assuming that your using HTML container in your HCP account for hosting your application, here is a sugestion:

1. Configure an HTTP destination (help) for your DMS service with authentication AppToAppSSO.

Name: iotservices_dms

Type: HTTP

Description: IoT services DMS

URL: https://iotrdmsiotservices-<account>.hanatrial.ondemand.com/com.sap.iotservices.dms/v1/api/

Proxy Type: Internet

Authentication: AppToAppSSO

Replace <account> with your account name like pxxxxxxxtrial

2. Make sure that Authentication is configured (help) for your HTML5 application.

  "authenticationMethod": "saml"

3. Configure a route (help) for your HTML5 application for this destination.

    {

      "path": "/rdms",

      "target": {

        "type": "destination",

        "name": "iotservices_rdms"

      },

      "description": "IoT services RDMS"

    },

4. Access the REST service from HTML5 appliction using the configured route.

   example /rdms/dimensions for accessing dimensions

Regards,

Dinu

Former Member
0 Kudos

Thanks Dinu it worked. Yes I was deploying as HTML5 Application in HCP from WebIDE.

Anyway now I was trying the same thing with odata service created through .xsodata file in HCP and adding that as destination.

Error I get is - HTTP 500 "StatusCode in ResponseMessage != OK; please refer to the database trace for more information". But I guess it might not be possible as per this blog - Accessing HANA XS OData in Web IDE and beyond.

Though it works if i deploy the application directly in SAP Hana web-based Dev Workbench without neo-app config for .xsodata service. But destination will not work there I guess. In short I cannot get both the APIs running together .

Regards,
Mayank

Answers (0)