call SOAP-WebService()

Calls a web service using SOAP 1.2. Authentication via HTTP authentication is possible. The HTTP request uses the method POST. HTTP response headers are copied into variables VAR_HTTP_<Name_of_header> if these variables are defined. Therefore the value of HTTP header Content-Length will be copied into variable VAR_HTTP_CONTENT-LENGTH (all in upper case).

For the creation of web service request, it is necessary to provide an XML template, that will be filled in with the concrete values of target fields or variables. The results of the request are added to one or more lists that can be accessed using corresponding functions later on.

XML template format


The format of the template being used for web services resembles the format used by the Integration Units producing XML. Because here no loops can exist by design no DataWizardNodes are needed, leaving only placeholders in the form of @placeholdername@.

The template contains the complete SOAP XML that is sent to the server. For further information see the examples.

Parameters


Parameter

Description

a

Endpoint URL of the web service.

b

(optional) User name, if needed.

c

(optional) Password, if needed.

d

Relative path of the XML template file. Must start with ./conf/

e

(optional) MIME type of the outgoing request, e.g. application/soap+xml. Default: text/xml

f

Comma-separated list of target field or variable names to be used for replacing the placeholders in the template file.

g

Comma-separated list of XPath expressions or element names (starting with # if it is an attribute) in the web service response to be added to the result list.

h

The name of the list the values of the response should be added to.

i

If true, the function is aborted with an error if the web service call fails. If false, the function is finished with return value false and the error message of the failed web service call is stored in the system variable VAR_SYS_SOAP_FAULT if it exists.

j

If true is specified, each answer element being defined in g leads to the creation of a single list, containing all values that are received with the given answer element. The name of the list is built by using the name of the list specified in h and the name of the current answer element. E.g. with h = wsResult and answer element from g = ResponseCode, the resulting list name would be wsResult_ResponseCode.

k

(optional) Timeout in seconds. Values smaller than 1 are ignored. Default: 90.

l

(optional) true to use DMZ installation for sending the request. Default: false.

m

(optional) ID of the certificate to be used for SSL connections. Default is 0 (none).

n

(optional) It is also possible to handle the web service response directly with an XML DOM object instead of using parameters g, h, j. To do this you have to define a name for the DOM object in parameter n. The object will be saved with that name and you can handle it with the execute script(a) with optional parameters b-j function afterwards.

o

(optional) HTTP channel ID. If set, parameter b, c and m can be empty and the settings of the given channel will be used.

p

(optional) The name of a map for optional HTTP request headers. An entry in the map (key, value) defines the name of the HTTP request header in the key (used in exactly the same notation) and the value of the HTTP request header in the value. Note: If the map contains an entry with the key UseAuthorizationPreemptive and the value true, then preemptive authentication is used. Important note: The key UseAuthorizationPreemptive does not apply to channels that are entered in parameter o (the channel setting always applies there).

Note: Alternatively see also the following section.


Additional HTTP request headers


Note: Alternatively see also parameter p.

To send additional HTTP request headers, additional XML comment lines must be inserted into the XML template file (parameter d).


XML comment

Sends the HTTP header

Remark

<!-- SOAPAction: http://server.xyz/order -->

SOAPAction: http://server.xyz/order

Please note spelling in upper case.

<!-- addheader: X-Digest = blablubb -->

X-Digest: blablubb


<!-- addheader: key2= value2 -->

key2: value2

General syntax format.


This can also be used to configure preemptive authentication if required.