Ask a question
Limited-Time Offer: 50% off IBM TechXchange Conference 2025
IBM’s largest technical learning event is back October 6-9 in Orlando, FL
This article explains about creating APIs on webMethods.io Integration that support both JSON and XML Content Types.
REST APIs can be created on webMethods.io Integration using REST API Builder. REST API Builder offers the developers to create APIs using either workflows/integrations. By default, all the APIs created support JSON Content Types. Developers are also allowed create APIs that support XML Content Types. There might be even use cases to support both XML and JSON Content Types at the same time. Integration Flows supports such advanced use cases.
API can be created to support multiple Content Types as shown below.
Integrations can be mapped for each operation – CRUD (POST, RETRIEVE, PUT, DELETE) for each resource as shown below.
For both XML and JSON content handling, for the integrations especially Create (POST) and Update (PUT) operations would require the below additional logic to be implemented.
Step 2 & 3 would only execute when of XML content used to invoke the integration and hence allow developers to create APIs that support both JSON and XML Content-Types.