cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Cloud Platform Cloud Foundry Document Management help

johnmurray
Participant
0 Likes
5,498

Hi,

I've started using the Cloud Foundry Document Management (repository and integration options) and I can't work out what I'm doing wrong. Any help at all would be really appreciated.

I've created and onboarded a repository as per the instructions at help.sap.com, and I've also hooked the Reuse UI into my application for testing purposes. When using the API in Postman or my own code, even just trying to create a folder returns me with a "500 Internal Server Error". When using the Reuse UI all of the buttons are disabled so I cannot add anything there either. In the network panel for the Reuse UI I can see it is reaching my endpoint and finding my repository so it's not an error with my app router or destinations.

My main questions are:

  1. Is there any logging available anywhere to help with the unhelpful 500 Internal server error messages?
  2. Are there any guides anywhere that contain working examples of code and not just snippets?
  3. What should the "objectId" be for the Reuse UI if I'm just working at the root level?

Thanks

John

View Entire Topic
0 Likes

ivan.mirisola , jmurray91, how do you get the content of the documents by using JavaScript?

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert

Hi pcostantini_bbt,

What are you trying to do exactly? SAP provides documentation on how to create a proxy bridge service in Neo so you can implement the call to the CMIS repository via Web Service (browse). In that sense, one could develop an HTML5 front-end application that performs the calls to this API via a destination without any Java or NodeJS development at all. The service allows you to perform all of the HTTP methods like PUT, DELETE, GET on the connected repository. All you need to do is to make the necessary calls to the API to do this:

https://help.sap.com/viewer/b0cc1109d03c4dc299c215871eed8c42/Cloud/en-US/ee63e43b719e4e5e94ad3fdbe84...

Once you get the proxy bridge going, your deployed application will implement the following endpoints to interact with your repository:

AtomPub: https://<cmis_proxy_bridge+account_ID>.hana.ondemand.com/cmisproxy/cmis/1.1/atom
Browser: https://<cmis_proxy_bridge+account_ID>.hana.ondemand.com/cmisproxy/cmis/json

On the other hand, openCMIS provides other client libraries that allows you to code whatever you want with your repository - usually in Java, but there are other languages supported as well.

However, on the majority of use cases, the proxy bridge will do most of the common tasks.

If plan on coding everything from scratch using a client library and you have any doubts on how to do any interaction with your CMIS repo, please install the Workbench as I mentioned above. You can check the console and fiddle with its scripts menu to find out how to interact with your file/folders/metadata/etc. The same is valid for repository calls made by HTTP - just look at the trace

You could use this open source project that implements a swagger api documentation so you can test the REST API against your repository:

https://github.com/PogeyanOSS/cmis-swagger

Best regards,
Ivan

former_member210955
Active Participant

Hi Pablo,

If you are using CmisJS then you can use getContentStream [1] to get the content .

If you are not using CmisJS then you have to form the HTTP request yourself and get the content by calling the API[2]

I have written a sample JS[3] on how to connect to SDM using CmisJS and execute the APIs.

Java Examples are here[4], you can similarly follow for JS

Best Regards,

Saurav

[1] https://agea.github.io/CmisJS/classes/cmis.cmissession.html#getcontentstream

[2] http://docs.oasis-open.org/cmis/CMIS/v1.1/errata01/os/CMIS-v1.1-errata01-os-complete.html#x1-2650001...

[3] https://gist.github.com/saurav28/3f8e073946d7f3482ce1258264ec717c

[4] https://chemistry.apache.org/docs/cmis-samples/samples/content/index.html#getting-content