Describes a Web service routine by providing a URL to a WSDL file.
After the WebDescription method, the routine can be called with the WebCall method.
App.WebDescription(WSDL, Procedure[, Alias])
Newlook Smartclient
Newlook Server
The Web Services Description Language (WSDL) document contains all the relevant information about the Web Service procedure, including the location of the service and the operations (or methods) the service exposes. Declaring a web services via the WebDescription action or method is considered high-level and easy-to-use. If you wish to declare Web services in a more specific and low-level manner, then use WebDeclare.
It is assumed that when the WebDescription method is used, that the parameters and return arguments are known by the user, because they are in the WSDL file. It is therefore the user's responsibility to pass the right number of arguments and return values of the correct type to the subsequent WebCall method.
If you want to use User-Defined types within a web service, then you must use WebDeclare. WebDescription does not support user-defined types.
If you have access to the web service's WSDL file then you can view details about the web service using Newlook's Web Service description tool.
WSDL - (Required)
Specifies the URL that provides the WSDL that describes the routine to be executed.
Procedure - (Required)
Specifies the name of the routine as it is defined in the WSDL. Also called 'Operation' in Web Service terminology.
Alias - (Optional)
Specifies an alternate name that you can use in the Call action. Use "" for none.
In this example we are calling the ConvertWeight service using the WebCall and WebDescription methods and returning the weight specified in Carats. The WebCall method will return a VB array containing the output from the call: VB SCRIPT'Declare variables to store the returned array and converted weight Dim returnWeight Dim convertedWeight
'Define the web service App.WebDescription "http://www.webservicex.net/ConvertWeight.asmx?WSDL", "ConvertWeight", ""
'Make the web service call returnWeight = App.WebCall ("ConvertWeight", 100, 100, "Grams", "Carats")
'Convert the first array element to a string convertedWeight= CStr(returnWeight(0))
app.MsgBox convertedWeight, "Converted Weight in Carats"
In this example we are calling the ConvertWeight web service to return the weight specified in Carats. The WebCall method will return a VB array containing the output from the call, which is then converted to a JScript array: JSCRIPT//Define the web service App.WebDescription ("http://www.webservicex.net/ConvertWeight.asmx?WSDL", "ConvertWeight","");
//Make the web service call var returnWeightinCarats = App.WebCall ("ConvertWeight", 100, 100, "Grams", "Carats"); //Convert to a JS Array and to a String var JSArrayWeight = returnWeightinCarats.toArray(); var itemWeightinCarats = String(JSArrayWeight[0]);
app.MsgBox (itemWeightinCarats, "Converted Weight in Carats", 0, 0);
|
No Returns.
WebCall Method | WebDeclare Method | WebDescription Action | Web Services
© 2004-2021 looksoftware. All rights reserved.