Call SOAP Web Service

The Call SOAP Web Service action sends a SOAP XML request to a web service and returns the web service's SOAP XML response. The response is either presented in XML (or HTML) form as the current page or set as the value of an XML variable.

There are two ways of creating the SOAP request:

Assisted Entry

This mode helps in creating a SOAP request message. It parses the WSDL file, shows operations available for the Web Service and allows entering parameters for those operations.

Working in the Assisted Entry mode is done in the following way:

Manual Entry

Since SOAP requests can be quite complex, you will typically use an external tool to generate the request and paste it into the SOAP XML Request property. The request can be dynamically altered by specifying XML from Expression to create a template SOAP request substituting literal values by expressions.

If the web service returns a SOAP fault, the message is not returned by the action. Instead, the action will generate an error which can be handled using the standard error handling mechanisms.

Properties for Assisted Entry

The Call SOAP Web Service action in the Assisted Entry mode can be configured using the following properties:

WSDL:
Here you specify the WSDL file in a dialog window. The value can be set by using:
Load from URL:
Provide a URL to a valid WSDL file.
Provide custom WSDL:
Input contents of the WSDL file into the text area.
Operation:
A list of operations available for the Web Service associated with the provided WSDL file is presented after specifying the WSDL file . Choose one of the operations.
Parameters:
Shows a list of parameters for the selected operation. An editor for the currently selected parameter is shown below the list. There are two types of parameters:
Validate Against Schema:
If checked, the XML of complex parameter types will be validated against the XML schema specified in the WSDL.
Log Request Message:
If checked, the body of the SOAP request will be logged.
Web Service URL:
The location of the web service operation is specified here. If set to "Automatic" (which is the default option), the web service URL is derived from the WSDL. Alternatively, the value can be specified in several ways using a Value Selector.

Properties for Manual Entry

The Call SOAP Web Service action in the Manual Entry mode can be configured using the following properties:

Web Service URL:
The location of the web service operation is specified here. Web services generally use the HTTP protocol. The value can be specified in several ways using a Value Selector.
SOAP Action:
This property can contain an optional SOAP action. The value can be specified in several ways using a Value Selector. The SOAP action is sent as part of the HTTP headers. The SOAP action is typically, but not always, a URL specifying the requested action.
SOAP Request:
This property must contain a valid SOAP XML request. By default the XML can be specified literally. To dynamically create the SOAP XML request you can choose XML from Expression or XML from Variable.
SOAP Version:
This property specifies which version of the SOAP specification to use for sending the SOAP request. SOAP 1.1 and SOAP 1.2 are supported. When specifying SOAP 1.1 the Content-Type will be set to text/xml and the (optional) SOAP Action will be set using an additional HTTP header. When specifying SOAP 1.2 the Content-Type will be application/soap+xml and the (optional) SOAP Action will be set as the action parameter of the Content-Type HTTP header.

Common Properties

The Call Web Service action can be configured using the following common properties as well:

Output:
Choose whether to output the SOAP response as an XML page or as the value of an XML Variable. In robots created with Kapow Katalyst 7.2 or earlier, this may be Output Result as HTML Page, meaning that the XML will be transformed to an HTML representation.
Options:
The robot's options can be overridden with the step's own options. An option that is marked with an asterisk in the Options Dialog will override the one from the robot's configuration. All other options will be the same as specified for the robot.

Example for Manual Entry

Here is an example that assumes an input variable named Exchange with two attributes country1 and country2:

SOAP Version:SOAP 1.1
Web Service URL:http://myserver.example.com
SOAP Action:http://myserver.example.com
SOAP XML Request (XML from Expression):
>><soap:Envelope
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:n="urn:myserver-CurrencyExchange">
  <soap:Body>
    <n:getRate>
      <n:country1><<+Exchange.country1+>></n:country1>
      <n:country2><<+Exchange.country2+>></n:country2>
    </n:getRate>
  </soap:Body>
</soap:Envelope><<