Invoking the Web Service
For the purposes of this example, you need to create a deployment descriptor for the client. For specific information, see Using Document Literal Style: Invoking a Web Service.
Edit the client deployment descriptor file’s mapping spec url tag to include the mapping spec file as well:
After making the edits necessary for the previous example, edit the mapping specUrls tag in the deployment descriptor file to include the mapping specification file:
<mappingSpecUrls>VASTInsuranceExample.map</mappingSpecUrls>
 
The client VA Smalltalk installation must have the following five files in its resource qualifier directory usually <vas>/xml:
SstWSInsurancePolicyClientInterface.xml (deployment descriptor)
VASTInsuranceExample.map (mapping specification)
SstWSInsurancePolicyInterface.xsd (schema)
SstWSInsurancePolicyInterface.wsdl (wsdl file specifiying the implementation details)
SstWSInsurancepolicyInterface-interface.wsdl (wsdl file defining the operation specifics)
The schema and mapping specification files that are shipped with VA Smalltalk may be found in the <vas>\samples\sstws\common directory. Copy them to the <vas>\xml directory.
Next, invoke the web service from the client image.
The Smalltalk expression to invoke the Insurance Policy web service is found in Appendix A: Client Workspace Code.
Explanation
The message name can be determined by looking in the file ‘SstWSInsurancePolicyInterface-interface.wsdl’. The following lines are from a document literal style web service definition:
<types> …
<xsd:import namespace="http://www.SstWSInsurancePolicyInterface.com/SstWSInsurancePolicyInterface"
schemaLocation="SstWSInsurancePolicyInterface.xsd" />
<xsd:element name="ratePolicy" type=" tin:SstWSInsurancePolicy"/> <!-- updated -->
<xsd:element name="ratePolicyResponse" type="xsd:float"/> </types>
….
<message name="ratePolicy">
<part name="body" element="swsipi:ratePolicy"/>
</message>
<message name="ratePolicyResponse">
<part name="body" element="swsipi:ratePolicyResponse"/>
</message>
SstWSInsurancePolicy is defined in the schema SstWSInsurancePolicyInterface.xsd
If the name of the service being called takes more than two parameters, the method name in the VA Smalltalk image differs slightly from the name used when calling the service. For example if the method name is doCheck:quantity: then the name used when calling the service is doCheck_quantity:with:.
Last modified date: 08/16/2019