cancel
Showing results for 
Search instead for 
Did you mean: 

Cloud Foundry - Consuming Document Management Integration Option (sdm) in UI5 (mta) app

shubhamd_27
Participant

Hello Experts,

I am trying to consume Document Management, integration option (sdm) in UI5 application deployed on Cloud Foundry.

I referred the following answer by Ivan Mirisola -
https://answers.sap.com/answers/13155008/view.html

And I am successfully getting the token using Postman. PFB -

However the same is not working using UI5 application.

1) As per my understanding, the origin of my application and the origin of the call to retrieve token is different, so to avoid cross origin policy issue I have created a destination using the destination service

2) xs-app.json and mta file

3) sdm service instance

4) Using the sdm service instance uri, client secret, client id I am triggering AJAX call but I am facing 404 Not Found error.

Is there something wrong with the destination or the usage of that destination.

Please share pointers.

Thanks & Regards,
Shubham

0 Kudos

Hello Shubham,

Could you please add more specifics to explain how do you do next, for uploading a document by using the document management integration options on that repository, please?

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

shubhamd_27
Participant

Hello Experts,

Instead of making an Ajax call with authorization, I have configured the authentication in Destination instead.

Now it's working.

1) Destination

2) Network call and xs-app.json

Thanks & Regards,
Shubham

Answers (1)

Answers (1)

0 Kudos

Hello shubham_27d94,

Could you please add more specifics to explain how do you do next, for uploading a document by using the document management integration options on that repository, please?

Regards.

shubhamd_27
Participant

Hello Pablo,

After the repository is set, as per my understanding there are 2 ways you can upload/download files

1) CMIS
2) REUSE UI

https://help.sap.com/viewer/f6e70dd4bffa4b65965b43feed4c9429/Cloud/en-US/b861cb263b4e4c8f94135136863...

I have successfully consumed using the CMIS way.

1) View -> Create a file uploader

<u:FileUploader 
 name="myFileUpload"
 tooltip="Upload your file to the document server"
 change="fnFileUpload" />

2) Controller ->

a) POST

b) READ

var sObjectURL = "/comfcreateic/docMng/c48c-48f7-875a-1192d65997b0/root?objectId=" + oObj.DocID;
window.open(sObjectURL); 

3) xs-app.json

{
 "authenticationType": "none",
 "csrfProtection": false,
 "source": "^/rest/",
 "destination": "DocSrvApiSdm"
 }, 
{
 "authenticationType": "none",
 "csrfProtection": false,
 "source": "^/docMng/",
 "target": "/browser/",
 "destination": "DocSrvApiSdm"
 },

Thanks & Regards,

Shubham