SoapRequest
The SoapRequest() function retrieves data from a URL that requires SOAP formatted requests and, when applicable, authentication. It constructs a SOAP envelope, attaches optional headers or certificates, and returns the response from the specified web service.
Related functions: WebRequest
Syntax:
Qx.SoapRequest(URL, [Data], [Action], [Certificate], [Password], [Header Options])- In Excel with Quintessence addin versions prior to 25.1, use:
SoapRequest() - In the Quintessence Editor (Studio) using Quintessence language, use:
SoapRequest() - In the Quintessence Editor (Studio) using Python language, use:
Qx.SoapRequest()
ⓘ See parameter descriptions
| URL | The web API endpoint to query. |
| Data (optional) | The SOAP body content to include in the request. |
| Action (optional) | The SOAPAction header value that indicates the intention of the request. |
| Certificate (optional) | An encrypted client certificate used for SSL (HTTPS) communication. |
| Password (optional) | A password for the certificate, if required. |
| Header Options (optional) | A dictionary of additional HTTP headers to include with the request. |
Remarks:
- If no optional parameters are provided, a basic SOAP request using only the URL is performed.
- The Certificate and Password parameters are required only for services that require mutual TLS authentication.
- The Header Options dictionary allows you to include additional metadata (for example: custom tokens, content type overrides, or alternate SOAP namespaces).
Examples:
The examples provided below are based on fictitious data for illustrative purposes only.
> Example 1: POST request with body and headers
Suppose the URL is http://localhost:808/GetData. The request body is:
{"factor":"price", "date":"2000-01-01"}The headers are defined as:
content-type#application/json;transaction#00Convert the header string into a key–value pair array using the StringToArray function. The data can then be retrieved using the function as follows:
=Qx.SoapRequest("http://localhost:808/GetData", "{'factor':'price', 'date':'2000-01-01'}",,,, Qx.StringToArray("content-type#application/json;transaction#00", ";", "#"))