How consume REST service to expose it in oData

1.9k Views Asked by At

I have a REST service that I call from my client app. The service use JSON to manage data.

I want insert SAP NetWeaver Gateway between client and REST server to expose the REST data as oData.

The REST service have get and put methods to read and write data from/to db.

Now I have to decide the way in which starting:

  1. Translate data from/to REST server using ABAP code to serialize data in the two ways (get REST data and create oData in response to a url get oData call and create the REST call in response to a url post oData call)
  2. Use SMP - SAP Mobile Platform (Eclipse plugin) to write integration code (in javascript) to consume REST service in reading and writing exposing this service ad oData. http://scn.sap.com/community/developer-center/mobility-platform/blog/2015/04/08/integration-gateway-rest-data-source-overview-of-blogs

The 2nd solution seems to be the best way (no-require ABAP programming, use js high level language, parse-libs to manage oData and json ...) but i don't know if SMP was created to do this work.

And what is the result of the 2nd method? It seems to be a zip file (similar to a war) that I can push to the SAP Gateway to deploy the integration-logic. Right? How can I test my code without deploy every time the zip on SAP Gateway?

1

There are 1 best solutions below

0
On

The recommended approach is to create a create Odata service in SAP Gateway and consume it in your app using SMP 3 or HCPms (SAP's mobile solution on cloud).

Use SMP SDK to consume the Odata service.