I am trying to call a 3rd party REST service from OSB 12C using the REST adapter in the External Service. This service has a single endpoint for multiple operations which are differentiated using the JSON payload. URL: http://3rd.party.com/product/price
Example:
{
"method": "getprice",
"item": "12345"
}
The response would fetch the price of the item.
On the other hand:
{
"method": "setprice",
"item": "12345",
"amount": 123.50
}
would set the price.
I was planning on exposing two services: http://my.osb.com/price/getprice?id=123 and http://my.osb.com/price/setprice?id=123&price=123.50 They would share a common pipeline to convert the request and response payloads.
However, the REST business service requires binding to an operation. Two proxy services would have two operations. So, what value would I give in the Method option in the business service's adapter so that a single resource path would be used by all methods/operations?