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.
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) | URL defined in the Web Service Connection |
| 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) connectTimeout defaults to the timeout. The HTTP socket connect timeout (in milliseconds). | 60000 |
| String | tls* | (optional) the TLS version to override value from HTTPS connections. Options: []. | null |
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>