Web Services Example

Note:  Creating web services requires an understanding of VTS's programming language, SOAP and XML coding.  The following example is intended only to provide a general overview of how this system works, using simplified terms.  It should not be used as a guide for creating your own VTS web service.

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 VTS application.

In order to do this, we require at a minimum:

    A network connection.

    A running application that includes one or more tags with values to be read.

    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 AppMod.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.

 

Our example application is named StationExample and is located in the directory C:\VTS\StationExample.  It contains a single analog input named AI20_1.

 

Next step: Configure the realm

Topics in this section:

Web Service Example: Configuring a Realm

Web Services Example: Creating a WSDL file

Web Services Example: Creating the VTS Module

Web Services Example: Modifying AppMod.src

Web Services Example: Requesting Values from the Service