Friday, October 11, 2019

12c OSB - Get Rest xml to JSON response using rest adapter

Create a service bus project.


Response Payload:
In XML:
<CustomerResponse>
<ID>11</ID>
</CustomerResponse>
In JSON:
{
  "CustomerResponse": { "ID": "11" }
}

Click here www.utilities-online.info-xmltojson to convert from XML to JSON
 Create a REST adapter on left swim lane

 Provide the Resource path

 Create the GET operation with request payload
  Browse for request schema



 Now Response part
 Define Schema for Native Format




 Provide the sample created JSON payload




 Get Rest adapter is ready.
 Now create a pipeline









 Now create a Xquery to map response







 Xquey is ready. Now go to the pipeline
 In the Replace activity, choose the created xquery for response and put the variable xpath


 Now test from SOAP UI:

No comments:

Post a Comment

Featured Post

OIC - How to Retrieve Email Attachments Using Microsoft Graph API: Automating Payment File Processing

Retrieving Email Attachments Using Microsoft Graph API: Automating Payment File Storage in Object Storage Use Case: A finance team needs t...