The VisualAge support for Web services provides the infrastructure necessary to invoke application behavior in loosely-coupled, heterogeneous computing environments. Creating the application logic for a Web service is no different than creating application logic for any standard server application. In fact, it should be easy to expose the functionality of existing server applications as Web services. The VisualAge Web services support provides a communications layer to manage the interchange of data between clients and servers using the SOAP message format. The key to the successful deployment of an application as a Web service is creating the service definition files required to describe the service. Below is a list of the files used by the VisualAge Web services support.
Table 1. VisualAge Web Service deployment files
File type | File description |
Deployment descriptor | An XML document that describes all program resources required during the
lifecycle of a service:
|
WSDL files | An XML document that describes the public interface for a service. Supported operations, parameter descriptions, and network endpoint information are some of the items that are described by the WSDL document. |
Mapping file | An XML document used to specify rules for mapping XML document elements into Smalltalk classes. |
A simple file generation tool is provided which constructs the necessary web service deployment files using information retrieved from a Smalltalk class. To use the tool, determine which methods are to be exposed as operations in the service interface, and add those methods to the method category '@WS-API'. Run the code below to create generalized deployment files for the service.
SstWSXmlGeneration forClass: SstWSInsurancePolicyInterface
For most cases, the deployment files will require modification prior to usage to reflect the proper settings for a specific installation. The files are named as shown below.
These files will be placed in the directory specified by the key DefaultResourceQualifier located in the XML stanza of the abt.ini file. If this key is not found, then they will be placed in the image startup directory (CfsDirectoryDescriptor startUpDirectoryPath). It is important to remember that these files will be OVERWRITTEN if they exist!
The next section will describe how to go about deploying a web service.