Below are the steps required to create and deploy a Web service created in VisualAge Smalltalk. In this example you will:
VisualAge manages Web services through the use of a Web services container. The purpose of the container is to facilitate the lifecycle management of a Web service. In addition, the container acts as a 'home' for the different services. Therefore, once a service is deployed, it can be located in the container by utilizing the SstWSContainer API, serviceNamed:inNamespace:.
Another important aspect of the container is the ability to establish and manage a collection of endpoints whose sole responsibility is to facilitate service requests. That is, there is a distinct architectural difference between the endpoint of a SOAP node and an Application server's endpoint. Therefore, a separation has been introduced between the HTTP server and the network endpoints managed by the container. Specifically, it is recommended that a separate HTTP server be started (e.g. SST HTTP Server, IBM HTTP Server, or Apache Tomcat) that will serve up the WSDL documents.
The examples in this guide specify URL resources using a host name of 'vasthost'. You must add a line to your 'hosts' file, or use any hostname valid for your environment in place of 'vasthost', in order to successfully execute the described examples.
ie)
127.0.0.1 vasthost
|server| server := SstHttpServerExample runAt: 'http://:9999' in: (AbtXmlConfiguration current defaultResourceQualifier).
[ | aContainer | SstWSContainer clearAll. aContainer := SstWSContainer createContainerNamed: SciSocketManager default getHostName using: (SstWSContainerConfiguration defaultConfiguration). aContainer startUp. aContainer inspect ] fork
[ | aContainer aServiceCollection| aContainer := SstWSContainer containerNamed: SciSocketManager default getHostName. aServiceCollection := aContainer deploy: 'http://vasthost:9999/SstWSInsurancePolicyInterface.xml'. aServiceCollection inspect ] fork
That's it! After completing the steps above, it is possible to invoke the deployed service via SOAP messages over HTTP. The next section describes how this is done with VisualAge Smalltalk.