Show TOC

Enabling REST Services as OData ServicesLocate this document in the navigation structure

Enabling REST services as OData services using Integration Gateway.

Context

Integration Gateway lets you to expose Representational State Transfer (REST) services (both SAP and non-SAP) as OData services. HTTP, HTTPS protocols and XML, JSON response formats are supported.
Note For handling response type other than XML or JSON, convert the response body in the function ProcessResponseData to an ArrayList of HashMap (contains one entry for REST read and create and multiple entries for REST query). See Custom Script Functions for REST Services for more information.
OData Feature Status
Create Supported
Read Supported
Update Supported
Delete Supported
Simple query (feed) Supported
System query options: $select, $skiptoken and $filter
Note $filter and $skiptoken are supported only via Custom Processor.
Supported
EDM type Supported
Complex types Supported
$batch
Note
  • Multiple ChangeSets are supported in a $batch request however, only one operation (POST, PUT or DELETE) is supported per ChangeSet. One or more entities can be modified by these ChangeSets.
  • The $batch request is ignored when the batch request boundary is preceded by one or more spaces.
Partially supported
Deep insert and $expand
Note Deep insert and $expand are supported only when you create the list of HashMap in the ProcessResponseData function, see Custom Script Functions for REST Services for more details.

Partially supported

System query options: $format, $orderby, $skip, $top, $inlinecount, $value, $count. Not supported
Delta token Not supported
Association/navigation Not supported
Custom query options Not supported
Function imports Not supported

Procedure

  1. Use API toolkit for SAP Mobile Platform to register the service:

    For details of the tasks performed in this step, see API toolkit for SAP Mobile Platform Documentation on https://help.hana.ondemand.com. The relevant topic to refer to is provided in the corresponding sub steps below.

    1. Create an OData implementation project. See Creating an OData Implementation Project.
    2. Select the Rest Service to bind with an entity set. See Selecting a Data Source.
    3. Use the Custom Processor plug-in to write a mapping script from REST to OData format. See Custom Processor.
    4. You can generate integration content or generate and deploy it. See Generating and Deploying Service Implementation Project.
  2. Log in to Management Cockpit. If you chose,
    1. Generate Integration Content while registering the service in API Toolkit for SAP Mobile Platform, deploy the content bundle. See Start of the navigation path SAP Mobile Platform 3.0 Next navigation step  SAP Mobile Platform Server Next navigation step  Administrator Next navigation step Application Administration Next navigation step  Managing Applications  Next navigation step  Managing and Monitoring Applications Next navigation step  Managing OData Services Next navigation step  Deploying a Custom Service  End of the navigation path for more information.
    2. Generate and Deploy Integration Content while registering the service in API Toolkit for SAP Mobile Platform, you should see the registered service under Start of the navigation path OData Services Next navigation step Services End of the navigation path.
  3. Assign an existing destination to the service or entity sets. Otherwise, create a new destination and then assign it. See Start of the navigation path SAP Mobile Platform 3.0 Next navigation step  SAP Mobile Platform Server Next navigation step  Administrator Next navigation step Application Administration Next navigation step  Managing Applications  Next navigation step  Managing and Monitoring Applications Next navigation step  Managing OData Services End of the navigation path for more information.