Skip to Content

Introduction

SAP Cloud Platform Integration version 2.47.x comes with addition of OData V4 outbound/receiver adapter. OData V4 version spec comes with lot of enhancements and supporting features. To begin with the initial feature increment, SAP Cloud Platform Integration OData V4 outbound adapter comes basic support for GET, POST and PUT operation. This blog explains usage these basic operations.

OData V4 Service

OData V4 outbound adapter has been explained with a sample service provided by www.odata.org. You need to get a sample instance of the service by visiting https://www.odata.org -> Developers -> Reference Services

 

Click on the TripPin(read/write) service under OData v4 tab.

The URL (which is displayed in the address field of the browser) shall be used in this to demonstrate OData V4 operations.

Query (GET) Operation

Consider the below integration flow project. I have added an HTTP sender adapter such that I get an HTTP endpoint after the deployment and can invoke it via an REST client e.g. POSTMAN application.

The provided address /cpi_odata_v4_get_demo in HTTP sender will be appended to the HTTP service URL endpoint upon the successful deployment of this integration flow.

Now when you connect the End event to the receiver system, the OData adapter will come with option OData V2 and OData V4, OData V4 is of our interest.

Once the OData V4 is selected, the properties of it will be populated. Let us see the properties details.

General Section

The General tab gives you the information about OData V4 under message protocol section.

Connection Section

In the Connection tab, the Address field will have the OData V4 service root URI of the reference service. The service doesn’t require any authentication and hence, None is selected for Authentication.

Processing section

In the Processing tab, operation Query (GET) has been selected and for the Resource name, entity People has been provided.

After the deployment of this integration flow, you will get service endpoint of it from SAP Cloud Platform Integration Web UI monitoring section under Manage Integration Content tile as shown below

 

Invoking the above endpoint in the REST client POSTMAN will fetch you the content of People entity from the service.

 

Create(POST) Operation

The OData V4 outbound adapter Create(POST) operation is used to create the entity in the target OData V4 service. The same integration flow example has been modified to have a different endpoint in HTTP sender adapter and changed the OData V4 operation to Create(POST) under the Processing section as shown below.

After the successful deployment, POST the payload to be created via the REST client application POSTMAN. Upon successful data creation, the response content will be given back as shown in the below sample screenshot.

In similar lines, the Update (PUT) operation is also supported.

Note: Tracing support on processed message for this adapter is not yet available.

 

Summary

SAP Cloud Platform Integration now has support for OData V4 outbound adapter with support of basic operations. In the upcoming releases, we will be supporting some more features and blog for the same will be updated.

 

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply