cancel
Showing results for 
Search instead for 
Did you mean: 

FLP@HCP - wrong routing of OData calls after first one

former_member190457
Contributor
0 Kudos

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:

  • /igwj/odata/GSSLS/PROJECT_SRV (Integration Gateway Java)
  • /igwj/odata/GSSLS/PRJ_HELPER_SRV (Integration Gateway Java)
  • /bpmodata/startprocess.svc/... (BPM OData service)


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

Accepted Solutions (1)

Accepted Solutions (1)

former_member199536
Active Participant
0 Kudos

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

former_member190457
Contributor
0 Kudos

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

former_member190457
Contributor
0 Kudos

Any idea on why this happens?

Maybe there's some guideline about the location of Component.js in the project structure, but I'm not really aware of it.

Thanks, regards

Vincenzo

Answers (0)