cancel
Showing results for 
Search instead for 
Did you mean: 

SAP WebIDE CORS issue with Cloud-Based SAP Document Center

bonafuwa7678
Explorer
0 Kudos

Hi Experts,

We are trying to access a 3rd Party CMIS compliant repository, through the cloud-based SAP Document Center (SDC) from SAPUI5 applications (no working example or template from SAP on this usage scenario).

We are currently facing the CORS issue each time we run our SAPUI5 from the SAP WebIDE environment and the app tries to interrogate the SDC repository for the folder / file information.

Kindly help us with a solution to this challenge; better still, help us with a working concept for this usage scenario.

Accepted Solutions (0)

Answers (1)

Answers (1)

michal_keidar
Active Contributor
0 Kudos

Have you configured a destination? neo-app.json?

bonafuwa7678
Explorer
0 Kudos

Hello Michal,

Thanks for your response.

We are actually using the guide: Integrating the Fiori Component into a UI5 Application to implement the PoC.

We had to install the plug-in: "Allow-Control-Allow-Origin" in chrome to address the CORS issue (for now).

We have used both the "destination name" and "destination Path" as defined in the neo-app.json file without success. When we put the [NAME_OF_DESTINATION], it throws an exception and thus, we have been using the destinationPath: "/[NAME_OF_DESTINATION_PATH]".

We are currently experiencing the exception below:

The exception is being thrown in one of the controllers in the "mcm" modules (documentlist.controller.js) during the execution of the line: box.addItem(docCenterComponent);

Do kindly help us resolve this issue.

michal_keidar
Active Contributor
0 Kudos

Like you said the exception is being thrown from a controller in the mcm modules, you need to debug it and see why it fails, there's no other way to know simply from the stack.

bonafuwa7678
Explorer
0 Kudos

Hi,

Exception is being thrown in the "load: function()" of the "documentlist.controller.js" within the "mcm" modules.

Because "u = t.getConfigurationProperty("/startId")" is undefined, then "u.displayPopup()" throws the exception.

The reference blog did not indicate what value should be set for "startId" in the call for the "factory.create({........})" function; we have searched unsuccessfully what this key represents.

2. In the "Component.js" within the "mcm" module, we have this initialization being performed:

c.prototype.setStartId = function(n) {

this.setProperty("startId", n);

this.getModel("configuration").setProperty("/startId", n)

};

3. In the "session.js", the function below:

h.prototype.adjustUrl = function c(m) {

var l = m.indexOf("/mcm/");

if (this.destination.path !== null)

{

return this.destination.path + m.substring(l)

}

else {

return m

}

};

always show in the debug console of chrome: https://webidetestingxxxxxx-xxxxxxxxxxxxxtrial.dispatcher.hanatrial.ondemand.com/mcm/mcm/json 404 (Not Found) if we passed the "/mcm" as the "destinationPath" in the create function call of our view controller . The "404 (Not Found)" shows because of "....../mcm/mcm/json"........this we believe is as a result of: "return this.destination.path + m.substring(l)".

We completely stalled right now on this project....

Help Resolve.