Web Services Guide : Appendix A: Insurance Policy Example Workspace Code : Client Workspace Code: Policy Verification
Client Workspace Code: Policy Verification
The Smalltalk expression below uses the Web Services framework. The Insurance Policy web service is deployed into a container. The container can be re-used but the sample creates a new one for each invocation of the web service in order to minimize the objects in the framework.
[
| op aContainer aServiceCollection aService aPolicy |
 
SstWSContainer clearAll.
aContainer := SstWSContainer createContainerNamed: 'ClientContainer'
using: (SstWSContainerConfiguration defaultConfiguration).
aContainer startUp.
 
aServiceCollection := aContainer deploy:
(AbtXmlConfiguration current defaultResourceQualifier),
'SstWSInsurancePolicyClientInterface.xml'.
aService := aServiceCollection first.
"custom handler "
 
" This operation passes the second method argument as a SOAP:Header. The WSDL for the operation contains
header extension descriptions to allow the VAST framework to encode the header automatically "
" (aService getInfoForPolicy: '85496328'
withVerification: 'Acme Insurance' ) inspect."
" (aService invoke: 'getInfoForPolicyWithVerification'
withArguments: #( '85496328' 'Acme Insurance' )) inspect."
 
" (aService getInfoForPolicy: '85496328' withVerification:
'Big Boy Insurance') inspect."
" (aService invoke: 'getInfoForPolicyWithVerification'
withArguments: #( '85496328' 'Big Boy Insurance')) inspect."
 
aService inspect.
] fork.
 
Last modified date: 08/16/2019