call SOAP-WebService without template()
Calls a web service with URL a using SOAP 1.2.
Parameter d expects the SOAP request as string. See example.
The SOAP response of the web service is written into the XML DOM object f.
The function result is "true" if the web service has been called successfully.
Parameters
Parameter |
Description |
a |
Endpoint URL of the web service. See example. |
b |
(optional) Username, if needed. |
c |
(optional) Password, if needed. |
d |
SOAP request as XML string. See example. |
e |
MIME type of the outgoing request, e.g. "text/xml". |
f |
The name of the XML DOM object, in which the SOAP response is written. |
g |
(optional) 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. |
h |
(optional) Timeout in seconds. |
i |
(optional) "true" if the web service is called via a DMZ server. Default: "false". |
j |
(optional) ID of the certificate to be used for SSL connections. Default: <empty>. |
k |
(optional) HTTP channel ID. If set, parameter b, c and m can be left empty, since the settings of the given channel will be used. |
l |
(optional) The name of the map that contains additional HTTP request headers. The key of an entry in the map is the name of an HTTP request header, and the value to that key is the value of the HTTP request header. |
Additional HTTP request headers
See parameter l.
Example
We use a local web service in the example. This is described in section "Calling SOAP web service with profile in Input Agent".
There you will also find a description of how to get the SOAP request for parameter d.
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<
soapenv
:Envelope
xmlns:wsdw
=
"http://tempuri.org/"
xmlns:soapenv
=
"http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd
=
"http://www.w3.org/2001/XMLSchema"
xmlns:xsi
=
"http://www.w3.org/2001/XMLSchema-instance"
>
<
soapenv
:Header>
</
soapenv
:Header>
<
soapenv
:Body>
<
wsdw
:Add>
<
wsdw
:intA>1</
wsdw
:intA>
<
wsdw
:intB>2</
wsdw
:intB>
</
wsdw
:Add>
</
soapenv
:Body>
</
soapenv
:Envelope>
We call the function with the following parameters.
1) call SOAP-WebService without template(a,b,c,d,e,f,[g,h,i,j,k,l])
a Value: https://localhost:443/dw/Request/addition_web_service
b Value:
c Value:
d Target field: (XML als String wie oben abgebildet)
e Value: text/xml
f Value: my_xml_object
g Value:
h Value:
i Value:
j Value:
k Value:
l Value:
The function returns "true" if all settings are correct.
You can now, for example, use function "dump XML/DOM object()" to read the web service response from the XML DOM object "my_xml_object".
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<
AddResult
>
<
result
>3</
result
>
</
AddResult
>