Calls a web service routine.
In order to call a web service the routine must first have been declared with either the WebDeclare or the WebDescription method.
Procedure - (Required)
The name of the procedure to be executed or its alias as defined in the WebDeclare or WebDescription action.
Arguments - (Optional)
The parameters to be passed to the routine as defined in WebDeclare or WebDescription. Multiple parameters can be passed by using commas to separate each value.
Returns - (Optional)
The variable which will store the value returned from the external routine.
Timeout - (Optional)
The number of seconds Newlook will wait for a connection response from a Web Service before it will fail.
When passing an argument to an external routine that is declared as ByRef, you must pass a variable as the argument and not a constant. A variable is required, because ByRef arguments allow the called routine to return a modified value for the argument. Return variables are always passed as ByRef, therefore you cannot specify constants as return variables.
If the Web service routine that you are calling returns multiple output parameters then you need to use WebDeclare instead of WebDescription.
The following macro code will call a web service that converts the weight from one unit to another. In this example we are converting from grams to carets.
SetValue (ItemWeight, 0) SetValue (returnWeight, 0)
WebDescription (http://www.webservicex.net/ConvertWeight.asmx?WSDL, ConvertWeight) WebCall (ConvertWeight, 100, 100, "Grams", "Carats", returnWeight, 60)
SetValue (ItemWeight, CStr(returnWeight)) MsgBox (return weight, "Weight in Carats is: " & ItemWeight, MsgInformation, MsgOkOnly) StopMacro |
WebDeclare Action | WebDescription Action | WebCall Method | Web Services
© 2004-2021 looksoftware. All rights reserved.