Web Services Example

A relatively straight-forward example of a web service is to use a CGI application running on a remote website to read tag values from a VTScada application.

The following are minimum requirements:

  • A network connection.
  • A running application that includes one or more tags with values to be read.
  • Security is enabled and at least one account possesses the Thin Client Access Privilege.
  • A named realm that makes the application available.
  • A WSDL file in the application directory that describes the service.
  • A module in the application that provides the web service
  • (Optional, but useful to ensure that the service is instantiated at startup:) A line in the application's AppRoot.src module to name the service module above.
  • A program running remotely to call and use the web service.

Assuming the first two items, the network connection and a working application are in place, the following steps will describe the process of setting up a web service to read values from the application from a PHP-enabled web page.

This example uses a fictional application named Station Example which is located in the directory C:\VTScada\StationExample. It contains a single analog input named AI20_1.

It is assumed that you already know how to Configure a VTScada Thin Client Server. For the sake of the example, it is also assumed that you have also completed the steps in Configure a Realm, and have created one named QueryServicesRealm, holding the application Station Example.