The conversion sample policy takes a REST-style request and converts it into a SOAP call. This topic describes the REST to SOAP policy, and explains how to run this sample.
The REST to SOAP policy is as follows:
The REST to SOAP policy performs the following tasks:
-
Extracts the information from the request (a message attribute is created for each query string and/or HTTP header).
-
Creates a SOAP message using the Set Message filter.
-
Sends the request to the
StockQuote
demo service. -
Extracts the value of the stock from the response using XPath.
-
Creates a plain text response.
-
Sets the HTTP status code to 200.
You can call the sample service using the send request (sr
) command
or the API Gateway Explorer GUI:
Enter the following command:
sr http://HOSTNAME:8081/rest2soap?symbol=ABC
For more details, see the topic on Stress test with send request (sr).
Perform the following steps:
-
Specify the following URL in the Request Settings:
http://HOSTNAME:8081/rest2soap?symbol=ABC
-
Select
GET
as the verb. -
Click the Run button.
For more details, see the topic on Send a request with API Gateway Explorer.