Add Web Service Methods¶
Methods of configured Web Services are available to tasks as “Processors”. To add a method to a task, select the task, locate the SOAP Connector under “Available Processors”, and drag the desired method onto the task builder panel.
In the example above, the “AddNumbers” method is added to the task. The method has inputs “Trigger”, “a” and “b”, and output “AddNumbersResult”.
Input values “a” and “b” are arguments of the “AddNumbers” method which returns the sum of “a” and “b” whenever any of the input values change.
Each Web Service method also has a “Trigger” input value. The “Trigger” value may be used to call a method repeatedly without any of the other input values changing. In case of the “AddNumbers” method the “Trigger” value is not required. For a different method “GetLatestData”, for example, the “Trigger” input may be used to call the method in regular intervals by connecting a time signal to the “Trigger” input.
The following example shows a configured task that receives inputs from two constants, sends the constant values to the “AddNumbers” method, and stores the result into a database.
The following example shows a task that stores weather data into a database. The “GetWeatherData” Web Service method has only a “Trigger” input. The “Hour” time signal is used to call the method every hour.
Please see the task documentation for further details on how to configure tasks.
The SOAP connector will attempt to convert input values to the type expected by the method. For example, if the method is expecting an integer value but a floating point value of, for example, “3.45” is sent to the method then the floating point value is first converted to integer value “3” before the web service method is called.