on 05-28-2015 5:49 PM
I'm deploying apps that I've created with the template wizard in the WebIDE to the Fiori launchpad in a HCP trial account. Some of the applications work and some do not (the application opens but it doesn't retrieve data). They both use the same destination based on the sample Northwind service at oData.org. I've discovered the problem is the URL used to retrieve the service metadata.
This is the URL that does not work (returns a 404 error).
This is the URL that does work.
https://flpportal-sXXXXXXXXXXtrial.dispatcher.hanatrial.ondemand.com/sap/fiori/northwindorders001/destinations/northwind/V3/Northwind/Northwind.svc/$metadata
Both applications run from the HCP Cockpit successfuly.
I was as consistent as is possible when deploying the application to HCP and registering it with the Fiori launchpad though there doesn't seem to be any step that would cause this difference.
What could cause this difference and is there anything I can do to edit the configuration for the app that doesn't work to fix the URL?
Thanks,
Ross
Turns out when you use the single page template wizard the code in the init function in the Component.js that references the service will not work when you deploy to the launchpad. The generated code is:
// always use absolute paths relative to our own component
// (relative paths will fail if running in the Fiori Launchpad)
var sRootPath = jQuery.sap.getModulePath("Employee_Orders_002");
// The service URL for the oData model
var oServiceConfig = this.getMetadata().getConfig().serviceConfig;
var sServiceUrl = oServiceConfig.serviceUrl;
But it should be:
// always use absolute paths relative to our own component
// (relative paths will fail if running in the Fiori Launchpad)
var sRootPath = jQuery.sap.getModulePath("Employee_Orders_002");
// The service URL for the oData model
var oServiceConfig = this.getMetadata().getConfig().serviceConfig;
var sServiceUrl = sRootPath + oServiceConfig.serviceUrl;
Ross
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ross,
Could you please explain what is "Employee_Orders_002" in
var sRootPath = jQuery.sap.getModulePath("Employee_Orders_002");
Thanks in advance.
Regards,
Gaurav.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.