0% found this document useful (0 votes)
385 views12 pages

Cpi Odata: Integration Flow

OData is an open standard protocol that allows defining access to resources in a standardized way. It uses URIs to identify resources (Entity Sets) and defines them in an abstract data model. This document provides steps to configure an integration flow in CPI to make a GET request to a public OData service, using the Northwind sample, and retrieve data based on parameters like filtering and sorting. It describes configuring the communication channels, content modifier, and OData adapter to call the service and get a response payload.

Uploaded by

sumit thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
385 views12 pages

Cpi Odata: Integration Flow

OData is an open standard protocol that allows defining access to resources in a standardized way. It uses URIs to identify resources (Entity Sets) and defines them in an abstract data model. This document provides steps to configure an integration flow in CPI to make a GET request to a public OData service, using the Northwind sample, and retrieve data based on parameters like filtering and sorting. It describes configuring the communication channels, content modifier, and OData adapter to call the service and get a response payload.

Uploaded by

sumit thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

CPI ODATA

OData is an open standard protocol that allows service providers to define


access to their resources in a standardized manner. OData is synchronous
based service.The service definition is available via the service metadata
document (EDMX). EDMX stands for Entity Data Model XML.

EDMX: An .edmx file is an XML file that defines a conceptual model, a storage
model, and the mapping between these models. It is used for database
operations.

OData allows resources (Entity Sets) to be identified using Uniform Resource


Identifiers (URIs) and defined in an abstract data model.

Let’s start with Demo on ODATA Adapter.

Integration Flow:

Configure the below steps to complete above scenario.

1. Open CPI tenant and create an Iflow with meaningful name(Here I am


using Odata_Demo)
2. Configure the communication channel from Sender(POSTMAN) to start with
HTTPS adapter as below.

General Tab

1
Connection Tab

The value in the Address should be unique across the tenant for
identification of this iFlow.
Keep Conditions tab as it is.

2
CPI ODATA

3. Now choose the Content modifier from design Palette

Now configure the Message Header of Content Modifier as below:

Note: There are two ways you can configure XPATH for XML

First way ((Header Value for OrderNo: //OrderID)

3
CPI ODATA

Second Way (Header Value for OrderNo:


/salesOrder/salesOrderType/OrderID)

4. Now choose the Request-Reply from design palette

5. Now connect the Request Reply to the Receiver of the integration flow using
Odata Adapter

4
CPI ODATA

6. Configuration of Odata Channel/Adapter.

General Tab:

Connection Tab:
For testing purpose, we have publicly available Odata service Northwind

Processing Tab:

5
CPI ODATA

i. Select the Operation details as Get query as we are going to read


details from Northwind service.
ii. Now click on Select to maintain the resource path, follow the below
steps:
Step 1: Connect to System- It is configured by default as soon as we
maintain the Address in connection tab.

Step 2: Select Entity & Define Operation- Click on step 2 -> Operation
Query (GET) automatically gets selected as we selected it already in
Operation details -> Select Entity as Orders -> You can select the
fields from Odata Northwind service as per your requirement.

Top: It shows first n rows.


E.g. if we select Top = 5, then first 5 rows will be selected from odata
service.

Skip: It skips first n rows.


E.g. if we select Skip = 5, then first 5 rows will be skipped from odata
service and will return rest of the rows.

Query: It gets automatically build once you select the required fields or
Top or skip.

6
CPI ODATA

Step 3: Configure Filter & Sorting-


You can read your data from Odata service applying filter and sorting.
Here I am filtering the Data based on the Order Number sent from
request data from Sender system. Sorting is done based on Order
Number.

Query: Whole query gets build which will be actually seen on Query
Options of Processing tab.

Click on Finish.

7
CPI ODATA

Once you click on finish, you get two files EDMX and XSD under
resources tab.

EDMX: This contains the whole structure of Northwind Odata service.


XSD: This contains the structure of only those fields for which you
performed Get query. This is basically a response structure from OData
Service which can be used further in mapping as per our requirement.

iii. Content Type: Atom/Json (This is the type which can be used to send
data to odata service).
iv. Page Size: To read number of rows/records per fetch. By default, it is
200, you can customize as per your requirement. It is usually useful
when there are bulk of records and you need chunk the records per
fetch.

7. Design of iFlow is done. Now, save and deploy the iFlow

Once you deploy then go to Operations view -> Manage Integration Content ->
All
You can find your iflow here, it comes in Starting mode first and once validation
is done and iflow is error free then it comes in Started mode.

8. Testing using Postman:


Please use below sample xml file in POSTMAN tool under Body tab as request
message to CPI.

8
CPI ODATA

Odata_sampleXML.txt

Message Processing in CPI as below:

Once you click on Send button in Postman tool. Please check your message
under Monitor Message Processing.

9
CPI ODATA

You can use “Trace” option to view each and every step of iFlow. To use trace
functionality, it should be switched on before message is triggered from Sender
system.

Manage Integration Content ->All

Monitor Message Processing - >All-> Select your iFlow -> Trace

10
CPI ODATA

Below is the response payload from Northwind service which you requested via
Get Query.

Similarly, same response can be viewed in Postman Tool as well.

Here we complete our Demo on OData service.

Happy Learning 😊

11

You might also like