Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • This plugin only uses POST method by default

  • If capturing a response, the http response status is also required to be received along with the response body

  • The plugin expects to receive an XML response from a SOAP API and allows users to parse this response into a javascript object

  • The Auth field is not yet added to it as some SOAP APIs have different methods of requiring authorization, i.e. from the HTTP header itself, or within the SOAP envelope

  • Only an XML object is accepted by the Body question. XML objects or entries can however be passed by inserting Dynamic Data.

This plugin is compatible to use with conditional low-code steps such as “Check if last step was successful” and any similar custom code usage. See Using conditional steps with the Consume SOAP Web Service Plugin section for more details.

...

Endpoint URL

  • Specify a REST endpoint. Internal endpoint URL's you've defined previously are suggested in the dropdown.

...

  • If the routine is in an API Context, this saves the response into an API output.

Anchor
extract-data
extract-data
Extracting the data from the captured response

...

  • When “Capture Response” is enabled, the response is recorded into a javascript object. To access the response object’s different properties, the following keys can be used:

    • body - for the response body. This value returns a string if “Parse captured SOAP response into Javascript object?” is disabled.

    • code - for the response status

    • headers - for the response headers

  • e.g. if the assigned variable for the response is “soapresponse”, accessing the properties would be as follows:

    • soapresponse[“body”]

    • soapresponse[“code”]

    • soapresponse[“headers”]

  • If “Parse captured SOAP response into Javascript object?” is also enabled, then the body property will also contain a parsed object. Depending on the SOAP request’s XML namespace, the object key name would also vary accordingly.
    e.g. if the Soap request XML used was:

    • <?xml version="1.0" encoding="utf-8"?>
      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> soap:Body
      <NumberToWords xmlns="http://www.dataaccess.com/webservicesserver/">
      <ubiNum>500</ubiNum>
      </NumberToWords>
      </soap:Body>
      </soap:Envelope>
      Then accessing the parsed object would be via:

      • soapresponse[“body”]["soap:Envelope"]

...

Anchor
conditions
conditions
Using conditional steps with the Consume SOAP Web Service Plugin

  • The Consume SOAP Web Service’s generated code includes a try-catch block to capture errors if ever the API call fails or times out. This block of code either fills a variable called “_success” when the call succeeds, or “_error” when it fails or times out:

    chrome_EwfLYoceUt.pngImage Added
  • The “_success” and “_error” variables allow the SOAP plugin to work inside a Conditional Low-code step, such as the “Check if Last Step was successful” step:

    chrome_qDxH7QhnkW.pngImage Added
  • You can also use the same “_success” and “_error” variables if you need to check if the previous consume SOAP step was successful or not in your custom code:
    if (typeof _success !== "undefined" && _success) {
    do code if SOAP call was successful
    }