Modifying the REST Definitions for SOAP Operations
You must have the API Gateway's manage APIs functional privilege assigned to perform this task.
To modify the REST definitions for SOAP operation
1. Click APIs in the title navigation bar.
2. Select the required API from the list of available APIs.
The API details page for the selected API appears.
3. Click Edit.
4. Click REST transformation.
A list of SOAP operations already exposed to the consumers as well as to be transformed from SOAP to REST appears.
5. Click to provide the Resource name and Resource path. Alternatively, you can activate the SOAP to REST transformation for multiple SOAP operations simultaneously by clicking the Transform all operations activation toggle button.
6. Select the operation to edit the SOAP operations.
7. Provide the following information:
Field | Description |
Resource name | Name of the resource. The existing name of the SOAP operation automatically appears, you can modify this name. |
Resource path | Path of the resource. The existing path of the SOAP operation automatically appears, you can modify this path. |
8. Click + Add Parameter and provide the following information to add the required resource level parameters:
Field | Description |
Name | Name of the parameter. |
Description | Description of the parameter. |
Type | Specifies the parameter type. Available values - Path, Query-string |
Data type | Specifies the data type. Available values - String, Date, Date time, Integer, Double, Boolean. |
Required | Specifies the parameter is required if selected. |
Repeat | Applicable to parameters of type query. The query parameter value can take comma separated array values. |
Value | Specifies the possible value. |
XPath | XPath. Specifies how the request parameter must be mapped to the SOAP payload that is sent to the native SOAP service. For example, /soapenv:Envelope/soapenv:Body/axis:sayHello/axis:name, or //axis:name ( If the SOAP request has only one element such as name). |
Namespace prefix | Specifies the namespace prefix of the element that appears in the XPath. |
Namespace URI | Specifies the namespace URI for the XPath element. You can add more namespace prefixes and namespace URIs by clicking . |
You can add more parameters by clicking
.
9. Select one of the available methods: GET, POST, PUT, or DELETE. By default, POST is selected.
By default, API Gateway generates the sample JSON request and response based on the XML schema definitions of the SOAP API. Additionally, you can provide a schema and modify the generated sample.
10. Click Add Request and provide the schema and a sample for the content-type.
11. Click Add Response and select the status code from the drop-down and provide a description for the status code selected.
Additionally, to add a content-type to the status code selected, click the status code to which you want to add a content-type and select the Content type. Provide a schema and a sample for the content-type selected. By default, status code 200 is automatically generated by the system.
12. Click REST transformation.
A list of SOAP operations already exposed to the consumers as well as to be transformed from SOAP to REST appears. By default, all the SOAP operations are in inactive state.
13. Click to activate the SOAP to REST transformation for the SOAP operations. Alternatively, you can activate the SOAP to REST transformation for multiple SOAP operations simultaneously by clicking the Transform all operations activation toggle button.
14. Select the operation to edit the SOAP operations.
15. Click Save.
The API details page for the selected API appears.
16. Click REST transformation.
A list of REST resources for the SOAP operations appears. Click on each resource to view the details that are already available as REST definitions.
17. Click Save.