This section offers a more in-depth look at the insurance example shipped with the product. If you are unfamiliar with the basic functioning of web services in VA Smalltalk, we recommend that you read Getting Started: Web services in an Hour and the associated links before you begin.This section shows how to host and invoke a web service using two different smalltalk images. A complete example is shown for document literal, rpc literal and rpc encoded WSDL styles. The domain classes are an insurance policy, a person, and an address. The SstWSInsurancePolicyInterface class is the glue between the domain and the web service framework; for the purposes of demonstration, this class stores a small dataset of insurance policies.The SstWSInsurancePolicyInterface class is in the application SstWebServicesInsuranceExample. Notice the five methods in @Ws-API category. These are the methods which will be exposed as a web service.The sample web service was tested on a single machine with two Smalltalk images. If these two images access the same repository, they must be configured for team use using emsrv. See the Installation Guide for details.
•
• Passing complex data types to and from your service
1. Create a Smalltalk class which performs the duties to be supplied by the service. The class SstWSInsurancePolicyInterface is used as the sample web service. It is available in the shipped product repository.
5. The default resource qualifier is <varoot>/xml where <varoot> is the installation directory. A problem occurs on UNIX, and Windows Vista and later with UAC enabled, if a web service attempts to write into this directory since normally this directory can only be written into by the root user. The solution is to use the Environments tool to copy the <varoot>/xml directory to your working environment and update the .INI file for your working environment to point to the new location.
![]() |