Skip to Content

Screen Shot 2014-05-07 at 11.50.53 PM.pngWith today’s update on the trial landscape we have an option to deploy lightweight HTML5 apps on the SAP HANA Cloud Platform. Under the tabs for HANA XS Applications and Java Applications you see now an additional tab called HTML5 Applications.

I’d like to show you in a short video how you can leverage this functionality to create a small sample SAPUI5 app which connects to a public weather API. It’s not intended to be used in productive environments, but rather helps you understand the concepts with a useful application.

While watching the video you can follow all the steps I’ve described below.

But first I’ll explain what this sample app is about I’m using to show you the functionality of the HTML5 Applications on SAP HANA Cloud Platform.

The code for the app

You can find the code for this small app in the listing below for the file index.html. The code for the SAPUI5 app consumes the API of openweathermap to get the current weather of a city. In this case you’ll get the current weather in Lisbon and the city of Neustadt an der Weinstrasse which is defined in row 81 and 85 of this app.

The access to the API is not done. Instead we are using the path /openweathermap (also in line 81 and 85) which is mapped to a destination called openweather. The mapping between the path and the destination is done in a file called neo-app.json.

The neo-app.json file

The neo-app.json file needs to be deployed in the same folder as the index.html file. It creates the connection between the path we want to use to access the API (/openweathermap) and the destination configuration we have to configure in the Destinations panel of your trial account on SAP HANA Cloud Platform Cockpit.

With this file you tell the dispatcher for the HTML5 apps to re-direct all calls on /openweathermap to the destination openweather.

The destination configuration for openweathermap

The destination describes now where the resource is that the application is looking for. The name of the destination needs to map to the name defined in the neo-app.json file above. So in our case it’s openweather. You can find the file content in the listing at the end of this blog post called openweather.txt.
Later on you simply import it as destination in the Destinations panel on your account.

How to deploy the app on SAP HANA Cloud Platform

Creating the HTML5 app in the cockpit

Accessing the Git repo and pushing all files to Git

  • Start Eclipse and switch to the Git perspective
  • Click on “Clone a Git Repository
  • Paste the Git-URL you’ve copied from your cockpit into the URI field of the popped-up window, provide your user name and password of your SAP HANA Cloud Platform trial account into the fields User and Password, click on Next, click on Next again and click on Finish.
  • Now right click on the Git repository and select the command Import Projects
  • Select Import as general project, click on Next and after that on Finish
  • Switch to the Web perspective in Eclipse
  • Create a file called index.html and copy and paste the code from the listing below for the index.html file into that file and save it
  • Do the same for the file neo-app.json. You get the source for that file from the listing below for the neo-app.json file
  • Right-click on your Eclipse project and select Team and Commit
  • Provide your credentials
  • Provide a short commit message and select both files in the box below so that are selected
  • Click on Commit
  • Right-click on your Eclipse project and select Team and Push to Upstream
  • Provide your credentials
  • Click on OK

Creating the destination and deploying the app

  • Now switch back to your cockpit for your trial account on SAP HANA Cloud Platform
  • Select your HTML5 app
  • Click on the tab Development
  • You’ll notice that there is a new commit listed up with the comment you’ve provided before
  • Now create the destination
    • Switch to account level on your cockpit and click on the Destinations tab
    • Click on New Destination
    • Click on Import from File and import the destination as a file with the content of the listing below for the file openweather.txt
    • Save it
  • Click on the tab HTML5 Applications
  • Click on the name of the your app
  • Click on the Development tag
  • Click on the link of the commit message
  • Your app shows up now and should show you the current weather in Walldorf
  • This link is only accessible to you as a developer

Provide others access to your app

If you want to make your app externally accessible you need to create a version of your code, activate it and start your app. This is what you’d have to do:

  • In the list of available commits select the commit that you want and click on the “Create Version” icon at the right end of the line
  • Provide a version name like 0.1 and click on Add
  • Now switch to the tab Version Management
  • You should see the version you’ve just created before
  • Now click on the icon at the right end of the line to Activate this application version
  • You get a message telling you that the version has been activated and that the Changes will be effective after (re)-start of the application. Confirm the question if you really want to do this with by clicking on Yes.
  • Switch to the HTML5 Application Dashboard and click on the Application Url
  • This is the URL under which others can now access your app

In the video you can see a few more things that you can do with HTML5 apps on SAP HANA Cloud Platform as the easy versioning of commits as well as the activation of the different versions of your HTML5 app.

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

Let the party begin

So now that this is working why not adding an additional tile which retrieves information from another source? Add another “route” to the neo-app.json file and an corresponding additional destination. Share your ideas on SCN.

Hope you enjoy using it.

Code for file index.html

<!DOCTYPE HTML>

<html>

<head>

<meta http-equiv=”X-UA-Compatible” content=”IE=edge” />

<title>Lightweight HTML5 apps and Git on SAP HANA Cloud Platform</title>

<script src=”/sapui5/sap-ui-core.js”

    type=”text/javascript” id=”sap-ui-bootstrap”

    data-sap-ui-libs=”sap.ui.commons, sap.suite.ui.commons, sap.m”

    data-sap-ui-theme=”sap_bluecrystal”>

</script>

<script type=”text/javascript”>

    // #####################################

    // Model – Start

    // #####################################

    var getModelFromURL = function(url) {

        var url = url;

        var oModel = new sap.ui.model.json.JSONModel();

        oModel.loadData(url, null, false);

        return oModel;

    };

    // Model – End

    // #####################################

    // Views – Start

    // #####################################

    // builds the main page

    var buildMainPage = function(id, title, content) {

        var page = new sap.m.Page(id, {

            title : title,

            showNavButton : false,

            content : content

        });

        return page;

    };

    // builds the weather tile

    var buildWeatherTile = function(id, oModel) {

        var tile = new sap.m.StandardTile(id, {

            numberUnit : “Celsius”,

            infoState : “Success”,

            press : function() {

                var link = “http://openweathermap.org/city/” + oModel.oData.id;

                window.open(link, “_blank”);

            },

            tap : function() {

                var link = “http://openweathermap.org/city/” + oModel.oData.id;

                window.open(link, “_blank”);

            }

        });

        // Bind weather icon

        tile.bindProperty(“icon”, “/weather/0/icon”, function(bValue) {

            return “http://openweathermap.org/img/w/” + bValue + “.png”;

        });

        tile.setModel(oModel);

        // Bind name of city to the tile title

        tile.bindProperty(“title”, “/name”, function(bValue) {

            var longTitle = “Current weather in ” + bValue;

            return longTitle;

        });

        // Bind weather details to info field of tile

        tile.bindProperty(“info”, “/weather/0/description”);

        // Bind temperature to the number field of the tile

        tile.bindProperty(“number”, “/main/temp”, function(bValue) {

            // We want Celsius

            var degreesCelsius = Math.round(bValue – 273.15);

            // Also add the Celsius sign to the temperature value

            //Switch to Fahrenheit

            //var degreesFahrenheit = Math.round(((bValue – 273.15) * 9/5) + 32);

            //return degreesFahrenheit + “\u00b0”;

            return degreesCelsius + “\u00b0”;

        });

        return tile;

    };

    // Views – End

    // #####################################

    // Main SAPUI5 application – Start

    // #####################################

    var idPageMain = “main”;

    var app = new sap.m.App(“myApp”, {

        initialPage : idPageMain

    }); // page1 should be displayed first

    // Create a tile for the current weather in Lisbon

    var oModelWeatherCity1 = getModelFromURL(“/openweathermap?q=:Lisbon”);

    var weatherTileCity1 = buildWeatherTile(“myWeatherTileCity1”, oModelWeatherCity1);

    // Create another tile for the current weather in another city

    var oModelWeatherOther = getModelFromURL(“/openweathermap?q=Neustadt an der Weinstrasse”);

    var weatherTileOther = buildWeatherTile(“myWeatherTileOther”, oModelWeatherOther);

    // Now create the page and place it into the HTML document

    var mainPage = buildMainPage(idPageMain, “Lightweight HTML5 apps and Git on SAP HANA Cloud Platform”, [weatherTileCity1,weatherTileOther ]);

    app.addPage(mainPage);

    app.placeAt(“content”);

    // Main SAPUI5 application – End

    // #####################################

</script>

</head>

<body class=”sapUiBody”>

    <div id=”content”></div>

</body>

</html>

Code for file neo-app.json

{

      “authenticationMethod”: “none”,

    “routes”: [

        {

            “path”: “/openweathermap“,

            “target”:

            {

                “type”: “destination”,

                “name”: “openweather

            },

            “description”: “OpenWeather System”

        },

        {

                “path”: “/sapui5”,

                “target”: {

                                “type”: “service”,

                                “name”: “sapui5”,

                                “entryPath”:”/resources”

                },

                “description”: “SAPUI5”

        }

    ]

}

Code for the destination file openweather.txt

Name=openweather

URL=http\://api.openweathermap.org/data/2.5/weather

ProxyType=Internet

Type=HTTP

CloudConnectorVersion=1

Authentication=NoAuthentication

UPDATES

June 10th, 2014

You might want to check the blog post from Ankur Kumar around ESPM Webshop on light weight HTML5 applications. Good read and goes far beyond my simple example in this blog post.

Jul 9th, 2014

Based on the feedback of a colleague today (thanks Tobias!) I’ve cleaned-up the code in the index.html a bit and also provided some pattern you can use to create additional weather tiles.

Best,

Rui

To report this post you need to login first.

105 Comments

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

  1. Chris Paine

    Thanks for sharing Rui.

     

    I hope this is the first step to doing real app deploys via git/maven. Would be so much more efficient (not to mention faster) for HCP to do maven build of application from a git url.

     

    Any which way, it’s cool!

     

    What will be the limit on number of HTML5 applications that can be deployed on a trial account?

     

    Cheers,

    Chris

    (0) 
    1. Stefan Lay

      The limitations are:

      – max 100 MB per trial account (summing up all repositories)

      – max file size 20MB (to avoid performance issues with large files)

       

      The number of repositories is unlimited.

      Note that currently deletion of git repositories is not yet possible.

       

      Stefan

      (0) 
  2. DJ Adams

    Great stuff Rui, really nice and clear (btw did you realise the YouTube video still has status “unlisted”?)

     

    This is the perfect storm of tech (at least for me) – hosting, UI5, git and proxying. Thanks to the SAPHCP team!    

    (0) 
    1. Rui Nogueira Post author

      Thanks DJ for the hint. I wasn’t sure whether the audio was good enough, so I could substitute the video in my blog post with a new video with improved audio.

       

      Rui

      (0) 
    2. Rui Nogueira Post author

      I’ve just fixed the sound issue and uploaded a new version of the video which is listed now as “public” on youtube.

      Rui

      (0) 
  3. Robin van het Hof

    This is so utterly cool, I may want to kiss you and the HCP team!

     

    Like Chris, I hope this is a step forward to (full?) Git/Maven integration, and seeing this I am quite hopeful it will eventually happen!

     

    Keep up the good work and progress!

    (0) 
  4. Richard Hirsch

    Pretty cool.

     

    Are there plans to use git for other programming languages as well?

     

    Are there size limits regarding the amount of code that I can store in my git repositories?

     

    D.

    (0) 
    1. Rui Nogueira Post author

      Thx Dick! Not sure about the limitations on the Trial landscape. I’ve asked the colleagues from the development team to add a comment to your question.

       

      Best,

      Rui

      (0) 
    2. Stefan Lay

      The limitations are:

      – max 100 MB per trial account (summing up all repositories)

      – max file size 20MB (to avoid performance issues with large files)

       

      The number of repositories is unlimited.

      Note that currently deletion of git repositories is not yet possible.

       

      Stefan

      (0) 
    1. Rui Nogueira Post author

      Much bigger thanks are going to the team that put this great enhancement on SAP HANA Cloud Platform!

      So thx Martin Hermes, Matthias Sohn, Stefan Lay, Sascha Scholz and all the others to provide this on our great platform. I love it!

       

      WIll also show more details in the new openSAP course ‘Next steps in SAP HANA Cloud Platform’

       

      Rui

      (0) 
    1. Rui Nogueira Post author

      You are welcome. Although I’m pretty busy with the recordings for the new openSAP courses I HAD to write this blog. I really, really like this new feature.

       

      Rui

      (0) 
  5. Gunnlaugur Th Einarsson

    Great feature!

     

    Allthough I’ve imported the destination file I can’t get the destination in html5applicon/development to be available.

     

    Any ideas.

     

    Regards, Gulli

    (0) 
    1. Jason Scott

      Same here…. The destination shows a red square saying: “Required destination is not available. Deploy the required destination to use the application”… There is no “deploy” button or link anywhere for destinations though and I added the neo-app.json file as explained…??

      (0) 
      1. Sascha Scholz

        To “deploy” the destination, navigate back to the account level (by clicking on the account name in the Focus Object area on the left side), then navigate to Destinations.

        (0) 
        1. Jason Scott

          Hi Sascha, I have done that a few times but when you see the destinations window there is no button or capability to “deploy” the destination. I only have edit, clone, export (to file) and delete with the saphcp trial.

          (0) 
            1. Jason Scott

              Have followed both the video and written instructions. Have deleted and re-created the destination twice.

              Have also done this on two diff computers (windows/mac).

               

              There is absolutely, positively no button or link to “deploy” a destination.

              (0) 
            2. Jason Scott

              Just cloned the repo again and checked – the json file is exactly the same as the copy attached to this blog; so its definitely there. I don’t see any “deployment” step in Rui’s video either….   ;-(

              (0) 
      1. Vasil Kurdov

        Hi Rui,

        The issue is with the Destination Editor and affects just some old accounts. We are already providing a hotfix for it and I’ll notify you here when it is available on Trial.

        Regards,

        Vasil

        (0) 
        1. Jason Scott

          Thanks for letting us know… There have been a number of issues over time that have only effected your “old” accounts.. Why is that? Us “old” account holders are your best evangelists of the platform!

          (0) 
        1. Jason Scott

          Thanks Vasil, the fix deleted the existing destination but upon recreating it, all is good. Thanks for sorting it out so quick!

          (0) 
  6. Dibyajyoti Nanda

    Hi Rui,

    Thanks for a excellent blog .

    we have developed one Odata service  which is available in company network .

    we have exposed that service to internet through web dispatcher.

    we have both http and https url for this .

    we are consuming the service through https url in an SAPUI5 application deployed in Hana Cloud Developer Trial instance .

    we are getting cross origin error fro this.

    how ever we have developed one servlet to avoid the cross origin error .

    but while we are trying to call the https url through the servlet we are getting an error

    Target not allowed

    please help us with the issue .

    as well as please let us know ,is there any otherway we can avoid the cross origin error .

    Tanks&Regards

    Dibyajyoti Nanda

    (0) 
    1. Rui Nogueira Post author

      Hi Dibyajyoti, have you added the destination to your Destinations panel of that SAP HANA Cloud Platform account and created the correct routing in the neo-app.json file as I described and showed in the video inside this blog? That should do the trick.

      Best,

      Rui

      (0) 
      1. Dibyajyoti Nanda

        Hi Rui,

        Thanks for your suggestion.

        I have tried all the steps as per your suggestion.

        but I am getting below error.

        Error message: Target service not allowed

        FYI….

        Below is the url i am calling from my code

        var localservice = new sap.ui.model.json.JSONModel(); 

          $.ajax({

                url: “/myservice/ServiceOrderCollection/?$format=json /”,

             contentType: ‘application/json; charset=utf-8’,

             type: ‘GET’,

             dataType: ‘jsonp’,

             error: function (xhr, status) {

          alert(status);

             },

             success: function (result) {

          console.log(result);

          localservice.setData(result);

             }

          });

        json file

        ———–

        {

            “routes”: [

                {

                        “path”: “/myservice”,

                        “target”: {

                                        “type”: “destination”,

                                        “name”: “ZSERVICEDEST”

                        },

                        “description”: “OpenWeather System”

                }

            ]

        }

        I have activated basic authentication for this destination .

        we are trying to replicate below url in which we are getting the data

        the bold section is the configured  destination url

        http://mydomain.com:447/sap/opu/odata/sap/ZSERVICEMANAGER/ServiceOrderCollection/?$format=json /

        please suggest

        Thanks&Regards

        Dibyajyoti Nanda

        (0) 
          1. Dibyajyoti Nanda

            Hi Martin,

            Thanks for your input.

            I have tried by adding the property as per your suggestion on https url .

            I am getting status code

            1. Status Code:403 Forbidden error
            2. FYI we don’t have cloud connector installed on our premises
            3. we are using web dispatcher to expose our services to internet

            4. but while creating destination i have selected

            β–Ό == 

            = 1

            and authentication type =basic authentication

            along with username and password

            so please clarify, Is cloud connector is compulsory to consume url in cloud ?

            please let me know if I am missing any other steps in this development process.

            Thanks & Regards

            Dibyajyoti Nanda

            (0) 
            1. Martin Hermes

              Hi Dibyajyoti,

              If you get a 403 now I would expect that this is send by your backend or web dispatcher, isn’t it? Can you test your service URL directly with a REST client and basic auhentication using the credentials you have provided in your destination?

              Best Regards,

              Martin

              (0) 
              1. Dibyajyoti Nanda

                Hi Martin,

                thanks for your input.

                I am able to get data in rest client by using the https url and basic authentication .

                Thanks&Regards

                Dibyajyoti Nanda

                (0) 
                  1. Dibyajyoti Nanda

                    HI Martin,

                    thanks again for your response.

                    we have checked the dispatcher the request generated from our project is not reaching to web dispatcher .but from rest client it is reaching .


                    here i am attaching one error screenshot FYR

                    i think the cloud server it self blocking the request.

                    please let me know your suggestion on this  ./wp-content/uploads/2014/05/error3_455222.jpg Thanks & Regards

                    Dibyajyoti Nanda

                    (0) 
                    1. Timo Lakner

                      Hi Dibyajyoti,

                      could you please switch on the traces (link) for your application for package org.apache.http.* to ALL and rerun the test?

                      Please download and attach the log file afterwards for analysis.

                      Thanks, Timo

                      (0) 
                      1. Timo Lakner

                        Hi Dibyajyoti,

                        could you please add the externally accessible url to this discussion? I like to make a test on my side to access the URL.

                        Thanks, Timo

                        (0) 
  7. Adesh Sachan

    Hi Rui,

               Thanks for great blog.

               This is my first effort on developing one HTML 5 app on HANA cloud platform.


               however I got stuck on eclipse ->windows->preferences->git window .


               I am using windows 64 bit machine.

               I am putting my SAP I number and SAP machine password.When clicking next it gives an

               error message.


               It says Possible Reasons

                     1. Incorrect URL

                      2. No network connection

                      3. .git is missing

                      4. ssl host could not be verified…


               Can you help me with that please ??





    Thanks


    With Regards

    Adesh

      

    (0) 
    1. Matthias Sohn

      Maybe you are behind a proxy, then you need to configure the proxy in Eclipse preferences click “Window > Preferences” and enter proxy settings under “General > Network Connections” for the https schema. See [1] for details.

      [1] Help – Eclipse Platform

      (0) 
      1. Adesh Sachan

        Thanks Stefen,

        Yes you are absolutely correct , I have given SCN password and then I am able to connect with hana cloud instance as well as with GIT repository.

        Thanks

        With Regards

        Adesh

        (0) 
  8. MIRCO VELTRI

    Great stuff!

    Git integration sounds really good, easy to use and it represents a really good choice.

    Thanks for sharing.

    Mirco

    (0) 
    1. Rui Nogueira Post author

      Happy that you find this useful. I was pretty busy with the recordings for the upcoming openSAP course, but when the HTML5 Apps functionality went live on the trial landscape I simply HAD TO write this blog so that others could also use it right away.

      Best,

      Rui

      (0) 
  9. Krishna Kishor Kammaje

    Wow. Rui. You explained it so simple and to the point. I have a question.  Thanks a lot.

    – If I have to develop a UI5 application, and deploy it through SMP, is this the same way you do it?

    – Why do you call it a lightweight? Is there any alternative approach for heavyweight?

    (0) 
    1. Robert Wetzold

      Yes, the heavyweight way before HTML5 was to wrap your HTML5 sources into a WAR archive and deploy it on a Java VM in the HANA Cloud Platform, take care of scaling yourself, implement proxying yourself etc.

      (0) 
  10. Vladislav Iliev

    Good tutorial, I went through it without any issues.

    I like the check for missing destination and corresponding notification via the red box.

    Wouldn’t be useful if there is a direct link to the destination editor?

    (0) 
  11. Gregor Wolf

    Dear Rui,

    do you know if HTML5 apps support also connections via the SAP Cloud Connector to a on premise system on the HCP trial accounts? I have the connector running and successfully made a connection via a Java application. XS applicaitons unfortunately don’t support it on the trial landscape: Connecting for XS app to an OnPremise service. I get the error message:

    Cannot open tunnel with id account:///sXXXXXXXXtrial

    In the Cockpit the Required Destinations for my HTML5 app show all green lights.

    Best regards

    Gregor

    (0) 
    1. Markus Tolksdorf

      Hi Gregor,

      you can access On-Premise systems via the SAP HANA Cloud connector from HTML5 applications. If it doesn’t work for you, there is obviously some erroreunous situation, that needs to be investigated.

      Best regards,

      Markus

      (0) 
  12. Rolf Hoven

    I’m trying to add an extra tile , by calling the getWeatherTile function, but I only get an exact copy of my “Walldorf tile”…  πŸ˜•

    Anybody that can give me a hint ?

    (0) 
    1. Martin Hermes

      Hi Rolf,

      If you call the method twice, you will just overwrite the model with the data from the second call. As both tiles are bound to the same model they display the same data. So you have to separate the data in the model for each city and bind the tiles to the corresponding entries in the model.

      Best Regards,

      Martin

      (0) 
      1. Rolf Hoven

        Thanks Martin,

        What’s the easiest way of doing that ?

        Sending in the model as a parameter ?  – Where are you DJ ?  πŸ˜‰

        (0) 
        1. Martin Hermes

          Hi Rolf

          Just bind the model to the tile. So remove the line

          sap.ui.getCore().setModel(oModelWeather);

          and add th line

          tile.setModel(oModelWeather);

          after the tile has been created

          Good luck πŸ™‚

          (0) 
  13. Robert Wetzold

    Interesting fact of the day: Today SAP announced its new SAP River Rapid Development Environment. Have you tried it out yet and payed attention to the URL? It will look something like this:

    https://rde-somenametrial.dispatcher.hanatrial.ondemand.com/


    It is actually an HTML5 application running on the new HTML5 infrastructure served from a GIT repository on HANA Cloud Platform πŸ™‚

    SAP Web IDE – Overview

    (0) 
    1. Stefan Lay

      Hi Mithun,

      you need to provide your SCN username and password when you push to the git repository. If you select the check box “Store in Secure Store” you do not need to enter your credentials anymore when you push again.

      Best Regards,

      Stefan

      (0) 
    2. Matthias Sohn

      Use your SCN user for accessing the git server.

      Commit is a local operation creating a new version in your local clone of the repository which resides in your private workspace and does not require authentication to the central git server at https://git.hanatrial.ondemand.com.

      Can you please provide detailed steps to reproduce ?

      (0) 
      1. Ranju Gupta

        Hello Rui, oh it is already out πŸ™‚   thanks…

        we also have SHINE light weight UI5 application now, which we plan to release via GITHUB soon…

        yes of course looking forward to D-code πŸ™‚

        (0) 
  14. Fabian Frick

    Hi Rui,

    thanks for the great tutorial.

    Is it also possible to use the openweather destination in a common xs application, deployed to the cloud (without using the HTML5 Applications feature)? I created a xs project in HANA studio, added your index and neo-app files and configured the destination, but opening the app in a browser results in a 404 error for https://xs<accountid>.hana.ondemand.com/openweathermap?q=walldorf... . Any suggestions?

    Thank you and best regards,

    Fabian

    (0) 
    1. Chris Xu

      I also had 404 issue when I tried to deploy a SAPUI5 to a on-premise HAHA server. It seems that the neo-app.json not work.

      Any idea on this?

      Thanks!

      (0) 
  15. Prashanth Velijala

    Hello Rui, I found this article nice and easy, steps are very convenient as i have some experience in setting up the system ready like installing eclipse, installing sap cloud etc software, creating trial instance etc,

    This is a first Html5 application i created through the sap hana cloud platform.

    I recommend this article which explains all the required steps to configure setup and keep running your first free html5 cloud application.

    I felt that i may not go through git perspective very easily but remembering the personal passwords makes lot of sense.(i made it well because i carefully followed this article)

    For freshers working here also look into the SHINE or some sap hana examples from the eclipse right click in explorer import->sap hana content-> sample applications.

    my html5 cloud application is here below

    Lightweight HTML5 apps and Git on SAP HANA Cloud Platform

    Thanks

    Prashanth.

    (0) 
    1. Stefan Lay

      Hi Vinay,

      this URL is not meant to be used in the browser, it can only be used for accessing it with a git client. Please try to clone your repository using this URL.

      Best Regards,

      Stefan

      (0) 
  16. Daniel Koller

    …great blog!

    Even with an trial account I cannot add/edit a destination after I pushed the app.

    (You can also inspect my account for analysis – D063255)

    Kind regards,

    Daniel

    (0) 
    1. Daniel Koller

      …already solved: I could enter/upload the destination via the cockpit top level …after that the destination get valid (=green) and the API showed the right information from the API.

      (0) 
  17. Sunil Kumar Maurya

    Hi Rui,

    Thanks for the blog, I am learning SAPUI5 and other HANA development technology.

    things are bit new for me.

    I want to understand use of this file I mean how it is working execution time. “neo-app.json”.

    I wrote an SAPUI5 program to consume Odata service, which is hosted in company network, there cloud connector is already installed, I can consume odata service with original url.( it require to disable the chrome web security). but using Cloud connector now I want to consume same virtual URL in our program so that we dont need to disable chrome web security.

    Thanks

    Sunil

    (0) 
      1. Sunil Kumar Maurya

        Thanks Gregor,

        I check that link and I guess you have developed your app in HTML5 with git repository.

        I just want to learn two things

        1. What is this nea-app.json file, and how it work in HTML5 application with git project.

        2. How can I do the same thing/make a connection with cloud connector with simple SAPUI5 application, which I will deploy in HANA account (this is not trial account).

        like I said I can consume odata service with original url, however there is some browser security need to set to work with,  but now how to use cloud connector setting I mean virtual URL to consume odata service in application, so that we dont have to remove browser web security.

        Regards

        Sunil Maurya

        (0) 
  18. THAREESH BOBBA

    Great Blog I did implement for the local weather and city of our corporate headquarters and it worked like a charm. There are few changes to the cloud plaftform cockpit what referenced in the article but it is not that hard to figure out. Thank you. πŸ™‚

    (0) 
  19. sridevi garapati

    Hi,

    Thanks for a great blog.

    By following your blog we created application and deployed in Hana cloud Platform.

    Can you please explain how to subscibe HTML5 application in Hana cloud Platform.

    We have a partner account. We created a consumer account and we can subscribe Java applications using Console Client. When we are doing same thing with HTML5 applications we are  getting Path not found Error.

    Any Idea on this?

    Regards

    Sridevi

    (0) 
      1. sridevi garapati

        Hi Rui Nogueira,

        Thanks for your reply.

        Using Hana cloud Platform we can create both Java and HTML5 applications. Like that we thought there is also a way to subscribe HTML5 applications for Partner account like Java applications.



        Regards

        Sridevi

        (0) 
  20. Edison Lim

    Hello Rui,

    Thanks for the blog (and also for the openSAP courses!) I am now trying to deploy my HTML5 applications.

    I used WebIDE to develop and deploy my app. My app works fine after the first deployment. Later, I found out I needed to modify my XML view. I opened the view and modified it using WebIDE. Then, I deploy the changes into a new version (say version 2).

    Now I have problem. When I run the active version (version 2) from HCP, HCP is showing me contents from version 1. It appears changes done in version 2 never went into HCP.

    Now, I went back to WebIDE and run a test as web application directly from within WebIDE. This time I see the changes I did in version 2.

    Going back to the active application link from HCP, I again see my version 1 even though version 2 is active.

    Any idea on what did I do wrong?

    Thanks and best regards,

    Edi

    (0) 
    1. Martin Hermes

      Hi Edi,

      you can check on the versioning panel in the cockpit whether your commit was deployed to HCP. Please check as well if a version is created on this commit and this version is the active version.

      Martin

      (0) 
  21. Thomas Andreas Muller

    // add appid

        var appid = “&appid=2de143494c0b295cca9337e1e96b00e0”

        // Create a tile for the current weather in Lisbon

        var oModelWeatherCity1 = getModelFromURL(“/openweathermap?q=:Lisbon” + appid);

        var weatherTileCity1 = buildWeatherTile(“myWeatherTileCity1”, oModelWeatherCity1);

        // Create another tile for the current weather in another city

        var oModelWeatherOther = getModelFromURL(“/openweathermap?q=Neustadt an der Weinstrasse” + appid);



    apply this and it should work.

    (0) 
  22. Ross HIghtower

    It works like this:

    var oModel = new sap.ui.model.json.JSONModel();

    oModel.loadData(“/openweathermap”,{“q”:”Singapore”,”APPID”:”YOURID“});

    this.getView().setModel(oModel);

    Replace YOURID with your app id.

    Ross

    (0) 
  23. yasser aoujil

    Hi, thank you for this post, I am very new to the HCP, I am facing a problem that I couldn’t solve, and the other posts saying the same didn’t solve this issue.

    I have copied the same text of the index.html and the neo-app.js showed above, I configured the destination as indicated too, but I get a 404 when calling the weather api because the url of the request is not correct, it makes a call to this url:

    Request URL:https://html5weatherapp-p0000000trial.dispatcher.hanatrial.ondemand.com/openweathermap?q=Lisbon&APPID=111111111

    I see that the destination binding didn’t work but I have no idea how to fix it, I have tried to make the call to the weather api without using the destination config as follows (and it worked):

    var oModelWeatherCity1 = getModelFromURL("http://api.openweathermap.org/data/2.5/weather?q=Lisbon&APPID=1111111111");

    But with the once this one it just gives the 404 error:

    var oModelWeatherCity1 = getModelFromURL("/openweathermap?q=Lisbon&APPID=1111111111");
    (0) 
    1. Jameshed Javed

      When I am using URL like below..

      var oModelWeatherCity1 = getModelFromURL("http://api.openweathermap.org/data/2.5/weather?q=Lisbon&APPID=1111111111");
      

      I am getting error

      Mixed Content: The page at 'https://webidetesting6366445-p1942639940trial.dispatcher.hanatrial.ondemand…ional-url=index.html&sap-ui-appCacheBuster=&sap-ui-xx-componentPreload=off' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.openweathermap.org/data/2.5/weather?q=Lisbon&appid=MyAppId'. This request has been blocked; the content must be served over HTTPS.
      (0) 

Leave a Reply