on 2015 Apr 30 3:25 PM
Hi all,
I've a custom HTML5 application which works great when launched standalone without FLP.
Three OData services from an on premise system are used:
the on premise system is configured with Principal Propagation and works nicely i.e. also destinations are configured correclty
I integrated the application in Fiori Launchpad and I get a really weird behavior.
From the Chrome developer tools, I can see that the first call is done towards the url
http://...../sap/fiori/createmarket/igwj/odata/GSSLS/PROJECT_SRV and it works ok
while the subsequent calls don't have the /sap/fiori/createmarket prefix (part of it is the name of the app) and thus I get a HTTP 404 error
What's really strange is that whatever call is executed first, it gets done with proper prefix, all the others fail.
The calls are started just by (for instance):
var oModelProjectHelper = new sap.ui.model.odata.ODataModel(sProjectHelperServiceUrl, true);
this.setModel(oModelProjectHelper, "projectHelper");
I tried to exclude all most trivial errors through the debugger and to me it looks like the FLP is doing something wrong in the routing.
Can anyone please share some insight on this?
Thanks, regards
Vincenzo
Hi Vincenzo,
One of the steps required in order to integrate your app in a Fiori Launchpad Site on Cloud is to modify the service URLs the app uses as described in the SAP HANA Cloud Documentation - Integrating Apps in the Launchpad .
Generally, in order to overcome cross domain issues the client side service URLs in the app should be "proxified" by using the Launchpad's proxy.
This is achieved by adding the following prefix to your service URLs:
jQuery.sap.getModulePath("< app id >") + "< service url >"
In your case:
jQuery.sap.getModulePath("createmarket") + "/igwj/odata/GSSLS/PROJECT_SRV"
This generates the URL you see in the developer tools:
/sap/fiori/createmarket/igwj/odata/GSSLS/PROJECT_SRV
Regards,
Ido
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ido,
thanks for your help.
I've been trying to do exactly what you suggest, but I get something strange.
The prefix that correctly works in the URLs in FLP is:
/sap/fiori/createmarket
At runtime I've tried to run:
jQuery.sap.getModulePath("<name of my component>")
where name of my component is the one in
sap.ui.core.UIComponent.extend("<name of my component>.Component")
However, I get:
/sap/fiori/createmarket/app
the additional path segment might be caused by the directory structure:
createmarket (root)
-- index.html
---- app (folder!)
----- Component.js
----- view
----- i18n
----- model
Thus, index.html and Component.js are not in the same directory, but I'm not aware of this requirement.
Could you please help me understand this?
Thanks, regards
Vincenzo
User | Count |
---|---|
81 | |
11 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.