cancel
Showing results for 
Search instead for 
Did you mean: 

IOT FREE STYLE APPLICATION

Dear helpers, I wanted to ask i'm facing a problem when trying to build iot freestyle application when going to the data source part i hope anyone can help me with this part

Accepted Solutions (0)

Answers (4)

Answers (4)

fvviviani
Participant

Hello Ahmad,

Could you be more specific with the issue you are facing?

Are you getting error in the Web IDE console after launching the build?

Federico

former_member610163
Discoverer
0 Kudos

At the end, I have created a SAPUI5 application, I have declare my destination for the iot service as above. When I test the connection it return 302. Which is not a problem.

After in the Sap Web IDE I add a few line related to the destination in the "neo-app.json"

{
        "path": "/myPath", 
	"target": {
		"type": "destination",
		"name": " **Name of the destination** ",
		"entryPath" : "/"
	},
	"description": ""
},

Then in your controller

var url = "/myPath/the-complete-path-for-your-request";
var oModel = new sap.ui.model.json.JSONModel()
oModel.loadData(url, null, false, "GET", true, false, null);

There are different type of model. Read the doc and pick the one you need

LoadData() Documentation

Now eveything work. Following this model I was able to declare other destination and using it.
Hopefully it will help someone.

fvviviani
Participant
0 Kudos

Hello Lionel,

If you need to develop a Freestyle IoT Applications and need to have destinations configured for it, you can do it directly from Web IDE by selecting Tools -> Update IoT Destinations

former_member610163
Discoverer
0 Kudos

Hello,

I think that I am getting stuck at the same point as you. Then instead of ceating a new topic I will try to give more details about my problem, hopefully it will help you also.
When creating a project it is asking to link a "Data Source" (a service)

As indicated in many source, we have to go to the "Cockpit" -> "Connectivity" -> "Destinations"

If I have understood, it is creating a service that we will be able to use for the app.

My cockpit looks this way

But I am not figuring out which url I have to input to the iot service.

My problem:

The iot service is an API. So it is already a service that I can consume via Ajax or whatever in my Fiori front-end.

Do I have to link a service and how?

Thank you for your attention.