SK SKYVVA Documentation

159. How to use OData Adapter ?

OData Adapter Template

{
"OData Service":{
"Request":{
"URL":{
"PATH Parameter":{
//flat Structure
},
"QUERY Parameter":{
//flat Structure
}
},
"Header":{
//flat Structure
},
"Body":{
//flat Structure
//Custom Hierarchical Business Message type
}
}
}
}
Note: Here, the "Google Service" name can be anything. But Node Request, URL, PATH Parameter, QUERY Parameter, Header, Body should be exactly like these.

Test Case 1 : Public OData API

Inbound Interface: Odata_Api_Inbound_Interface

Adapter: OData API test

Here, we perform Select query option with get operation using OData Service Endpoint URL.

Callout:

skyvvasolutions.CallOutControl c = new skyvvasolutions.CallOutControl();
c.returnJSONComplete=true;
c.actionDoIntegrate=true;
c.isCreateMessage=true;
String[] ids= new String[]{'0011X00000tlbs5QAA'};
skyvvasolutions.Iservices.invokeCalloutV3('OData Api Testing','OdataApI Outbound Interface',ids,'SYNC',c);

Here, we selected multiple query options in single request like select, skip, top, orderby, etc.

Open this article in the interactive viewer →