soapRequest ( string urlEndPoint , string xmlns , string soapAction , map entry , string _loginPass ) : string
Send a SOAP request.
Advice
Use SoapUI to test SOAP requests.entry argument
In this argument create associative array of associative array.
In this big array, keys describe tags and values of the array are values innerHTML (generaly values of argument of the webservice)
A key can be a string, if there is a prefix indicate it in, for example "m:myWebService"
A key can be a non associative array (the name of tag and the URI), for example ["m:GetLastTradePrice","http://wombat.ztrade.com"] will be <m:GetLastTradePrice xmlns:m="http://wombat.ztrade.com"> in the SOAP request
Here some traditionnal SOAP entries :
[
["m:GetLastTradePrice","http://wombat.ztrade.com"]:
[
"symbol":"SUNW"
]
]
--------------
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://site.com">
<SOAP-ENV:Body>
<m:GetLastTradePrice xmlns:m="http://site.com">
<symbol>SUNW</symbol>
</m:GetLastTradePrice>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
[
"myWebservice":
[
"argument1":"value1",
"argument2":"value2"
]
]
Example
soapXML=soapRequest("https://portal.xxx.eu/ServicePortal/WebServices/ProductServices.asmx?WSDL","https://portal.xxxx.eu/","https://portal.xxxx.eu/GetProducts",[
"GetProducts":""
],"login:pass")
Parameters
urlEndPoint
the url where you consum the webservice (generaly an amsx/wsdl)
xmlns
the url of namespace (generaly the domain name) for xmlns attribute
soapAction
the url of soapAction (generaly the domain name + the service name) for soap header
entry
body of the SOAP request
_loginPass (optional)
if you have an authentification indicate the string login:pass, for example franck:5rkjfRH4
Return value
If there is just one value returned it returns this value. Else, it return all the SOAPBody and you will must manage it