call SOAP-WebService(a,b,c,d,e,f,g,h,i,j,k,[l,m,n,o])
Group |
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 destination 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.
Parameter Description
Parameter |
Description |
a |
Endpoint URL of the web service. |
b |
User name, if needed. |
c |
Password, if needed. |
d |
Relative path starting with ./conf/ of the XML template file. |
e |
MIME type to be sent to the server. Default: text/xml. |
f |
Comma-separated list of destination 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 by the DOM object (org.jdom.Document) itself 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. |
Sending Additional HTTP Headers in the Request
To send additional HTTP headers in the POST request, 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 method can also be used to configure the preemptive authentication.