Creates a web service proxy object, a reference to a remote webservice. This function is a replacement for createObject("webservice",...)
.
webserviceNew(url)
returns function
Name | Type | Required | Default | Description |
---|---|---|---|---|
url | string | Yes | URL of the Webservice | |
arguments | struct | No | Additional arguments (URL params are not allowed in url itself and must be set here) |
Get country by country code and output country name
ws = webserviceNew('http://www.webservicex.net/country.asmx?wsdl');
country = ws.GetCountryByCountryCode('us');
writeOutput(XMLParse(country).NewDataSet.Table.name.XmlText);