Skip to content

Latest commit

 

History

History
67 lines (50 loc) · 1.88 KB

step26.md

File metadata and controls

67 lines (50 loc) · 1.88 KB

Walkthrough Step - 26 using the destination

In step 26 An odata model is used. It is mentioned that you can create a destination for connecting to the northwind service, instead of disabling web security.

Using the webide this is quite simple. After you create the destination you can also import it from here

You need to adjust the manifest to use

"invoiceRemote": {
    "uri": "/destinations/northwind/V2/Northwind/Northwind.svc/",

instead of

"invoiceRemote": {
    "uri": "https://services.odata.org/V2/Northwind/Northwind.svc/",

The neo-app.json looks like this:

{
        "path": "/destinations/northwind/",
        "target": {
            "type": "destination",
            "name": "northwind"
        }
},

Because of the uri in the manifest the UI5 model will send the following request to our html5 application to retrieve the invoices.

/destinations/northwind/V2/Northwind/Northwind.svc/Invoices

The neo-app.json will match this request because the requests starts with the "path" defined in there.

The target is our destination with the url

URL=http://services.odata.org/

So the resulting url will be

http://services.odata.org/  + V2/Northwind/Northwind.svc/ + Invoices

The first path comes from the Destination, defined in the cockpit. The second path is defined in the maifest.json The Invoices are defined in the binding of the UI5 view

the path

/destinations/northwind/

is cut out since the neo-app.json routing removes the path from the resulting request uri

For further information browse the documentation of the neo-app.json