SOAP APIs (legacy)
This is a legacy documentation page for the previous interface.
For the latest page, see SOAP APIs.
RapidAPI supports SOAP over HTTP APIs on the API Hub.
To view what a SOAP-based API looks like on the RapidAPI Hub, you can refer to the sample Number Conversion Service.
Presentation of SOAP-based APIs
SOAP APIs look similar to their REST counterparts, with a few distinctions:
- Instead of seeing REST endpoints, users will see the SOAP operations. The operation is named NumberToWords in the example below.
- Instead of seeing the parameters for the endpoints, users will see an editor with the SOAP envelope. This XML is sent as the body of the request.
![soap-playground.png 2800](https://files.readme.io/7e1e1af-soap-playground.png)
Adding SOAP APIs
To add SOAP-based APIs to the Hub, start by creating an API as you normally would. After adding the API and Base URL, add a transformation to add a Content-Type header to the API, as most SOAP services will reject any request where this header isn't explicitly set to text/xml
or application/soap+xml
:
![content-type.png 3180](https://files.readme.io/98e446c-content-type.png)
Adding operations
To add operations:
- From the Provider Dashboard (My APIs), click the Definition tab for the API in the sidebar.
- Click the API Specs header, then click the Endpoints subheader.
- Click Create REST Endpoint (or Create Endpoint).
- Enter the endpoint Name andDescription.
- Select POST as the endpoint operation.
- To the right of the operation, enter the value for the path.
![add-operations-1.png 2464](https://files.readme.io/de1f82d-add-operations-1.png)
- Click the Body tab.
- For Media Type, select Add application/xml and delete any other media types.
- Under the Body tab, enter a sample envelope and/or a schema. You should see a "Valid example" message if the XML that you enter is valid.
- Click Save to save you endpoint.
- In the Hub, test your endpoint to verify a valid response.
![add-operations-2.png 2668](https://files.readme.io/22c7608-add-operations-2.png)
Updated 5 months ago