This tutorial shows you how to expose an existing SOAP service and transform the XML data that is returned by it into specified JSON data.
About this tutorial
In
API Manager, you will create a REST API that accesses a SOAP service.
Note: The Sandbox catalog must be configured to use either a
DataPower® Gateway (v5
compatible) or a
DataPower API
Gateway or both. See
Creating and configuring Catalogs.
Setting up a REST API definition
To set up a REST API, complete the following steps:
- Download the SOAP WSDL file AccountServicing.txt.
Rename this file AccountServicing.wsdl.
- Log in to API Manager.
- Click the Develop APIs and Products tile.
- Click .
- Select From existing WSDL service (REST proxy). Click Next.
- Click Browse. Select the AccountServicing.wsdl
file from your filesystem. The file uploads and is parsed by API Connect. You see a confirmation.
Click Next.
- On the Select Service screen, click Next.
- On the Info screen, leave the inputs unchanged.
Click Next.
- On the Secure screen, check Limit API calls on a per key
basis. In the Activate API section, check Activate API. Click Next.
- The screen now displays progress through the steps to create and publish the new API.
When this process completes, you see a summary of results, including the API Endpoint URl of the new API and the credentials of the
Application automatically subscribed to the new API. Click Edit API.
- The Design tab for the draft of your API definition opens. Click Assemble.
Test your API definition
Note: Due to Cross-Origin Resource Sharing (CORS)
restrictions, the assembly test tool cannot be used with the Chrome or Safari browsers on the macOS
Catalina platform.
To test your API definition by using the API Manager test tool, complete the following steps:
- Click the Test icon . The test tool opens.
- In the Operation field, select post
/getBalance.
- In the request field, click Generate. A sample request fills the field.
- Click Invoke. The response is displayed.
Note: If you are using a self-signed certificate, you might be prompted to visit a provided URL. Click the link and then accept the certificate before returning to API Manager and clicking Invoke again.
What you did in this tutorial
In this tutorial, you completed the following activities:
- Set up a REST API definition
- Configured an API to invoke an existing web service and return its output
- Tested your API definition