Here's a sample code
var sServiceUrl1 = "/sap/opu/odata/namespace/service";
var oModel1 = new sap.ui.model.odata.ODataModel(sServiceUrl1, true);
and in neo-json, we would have a destination "BACKEND" configured as
"routes": [
{
"path": "/sap/opu/odata/namespace",
"target": {
"type": "destination",
"name": "BACKEND",
"entryPath": "/sap"
},
"description": "SAP ECC DEVCLNT100"
}
]
Now, in our HTML5 APP or via REST client, whenever you trigger the service, it would do the route mapping and proxy it to the destination (done by dispatcher in HCP). While the app doesnt know the routing, you still can access the service.
Hope it helps.