Skip to Content
avatar image
Former Member

Document Services as Restful service - SAP Cloud Platform

Hello Experts,

We are considering SAP Cloud Platform Document Services for Document Management.

Documents will be uploaded by different means such as - user will login to SAPUI5 application (on SAP Cloud Platform Portal) and upload the documents. And an SAP PI system from on-premise uploads documents to SAP Cloud Platform Document Service (as shown below in picture).

We need to develop API (or restful services in SAP Cloud Platform) and provide them to other parties to be used. Now the question is how do we develop restful services in SAP Cloud Platform and publish it? Should we also need to consider API management for service hosting?

ds-screen.png (15.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 24 at 09:32 PM

    Hi Umapathi,

    Are you talking about "Document Service" that is available to you via SAP Cloud Platform (Neo)? If so, you don't need to develop restful services, nor it will require the usage of API management. Once you have you repository, all you need is to create a Java Proxy Bridge. The overall procedure to access the rest service from an HTML5 application using this bridge is detailed here. It is all based on OpenCMIS protocol - so if you need to tweak the rest interface a bit, its all based on open standards. The UI5 application will use the concept of destinations, so the rest service can be accessed by users that are able to authenticate to your application.

    Regarding PI... you really don't need it to publish a document to your CMIS repository. Once you deploy yout Java Proxy Bridge application to your account, it URL will be publicly available to the internet. So, your application could push the document directly to it via regular web proxy. SAP Cloud Connector will not allow you to open an inbound connection to a cloud service. The tunnel works in the reverse order for HTTP and RFC requests (from cloud to on-premise services). Only for DB connections that the order would be correct in your "image" (architecture). I would never use PI to send a file to a CMIS repository, unless you are saying that PI will monitor a folder on your LAN, pick files it finds there and pushes them to the CMIS repository - but that would imply files will always reside on the same folder structure (local/remote). From what I understand you want a UI to upload files to your CMIS repository and PI is not recommend for that.

    You mention 3rd parties will consume the documents on the repository. You might want to provide them an UI to do that, so they can browse the repository and find what they are looking for. Or you could model an API via API Management so that these 3rd party users can automate some process. That is: their "PI" will call your API to see if there is a file sitting on your repository. Is it finds any, it will download it to their on-premise system. If this is the case, then API management can help you to manage access to your API and possibly charge for its usage. Since the 3rd party will not be authenticating to the service API, they would need an API Key (that you should provide them). This is an automated process in the API Management Service. You could even check for other incoming header variables for additional checks.

    As for the REST service question, any Java application can implement it. You could use your method of choice, and I could recommend using Spring Boot to implement it. But I believe that the Java Proxy Bridge already does that for you. Check that out first and if it is not robust enough, then you may want to investigate the @RestController annotation in Spring.

    Regards,
    Ivan

    Add comment
    10|10000 characters needed characters exceeded