qie.callSOAPWebService¶
Signature: qie.callSOAPWebService(connection, binding, operation, soapEnvelope, useMtom, parameters, timeout*, overrideURL*, fullResponse*, encoding*, connectTimeout*, tls*)
Returns: Object wsResponse - the typed result received from the web service call
Call a SOAP web service.
Note
If fullResponse is 'true', HTTP error codes will be inside the returned http response, instead of throwing an exception.
Note
overrideURL is optional. When not specified, {connection url} is the address on the matching WSDL binding, or the Web Service Connection's endpoint URL when it has no WSDL.
Note
connectTimeout is optional. When not specified, the connect timeout is taken from timeout when that is set and less than 60000 milliseconds, and is 60000 milliseconds otherwise.
Parameters¶
| Type | Name | Description | Default |
|---|---|---|---|
| String | connection | the name of the web service connection | |
| String | binding | the name of the web service binding to be used | |
| String | operation | the name of the operation that is being called | |
| String | soapEnvelope | the XML SOAP Envelope to be sent | |
| Boolean | useMtom | use SOAP Message Transmission Optimization Mechanism | |
| Map<String, String> | parameters | a list of parameters to be used by the web service operation | |
| Integer | timeout* | (optional) the HTTP socket timeout (in milliseconds) | 60000 |
| String | overrideURL* | (optional) the endpoint url to use (instead of the default web service endpoint) | {connection url} |
| Boolean | fullResponse* | (optional) returns the full http response with headers instead of just the SOAP envelope response | false |
| String | encoding* | (optional) the character encoding for this message | UTF-8 |
| Integer | connectTimeout* | (optional) the HTTP socket connect timeout (in milliseconds) | 60000 |
| String | tls* | (optional) the TLS version to override value from HTTPS connections. Options: []. |
Example¶
// Example SOAP request (returns the SOAP response body by default)
var useMtom = false;
var parameters = qie.newParameterMap();
var soapEnvelope = `
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.dataaccess.com/webservicesserver/">
<soapenv:Header/>
<soapenv:Body>
<web:NumberToWords>
<web:ubiNum>123</web:ubiNum>
</web:NumberToWords>
</soapenv:Body>
</soapenv:Envelope>
`;
var response = qie.callSOAPWebService(
"Vendor API (SOAP)", // ws connection name
"NumberConversionSoapBinding", // binding
"NumberToWords", // operation
soapEnvelope, // soapEnvelope
useMtom, // useMtom
parameters // parameters
); // <soap response>