The Web services framework was designed to cover a wide variety of usage scenarios. However, it is unrealistic to expect any framework to cover all use cases. With this in mind, the container architecture was designed to be completely open and customizable by the user. For more information on container customization, see the section entitled Extending/ Customizing the Web service platform.The deployment manager is the entry point for service deployment. It is the object that the container dispatches to when it receives the deploy: API method. The deployment manager has two primary responsibilities. First, it attempts to convert the deployment artifact passed as an argument into a collection of services. Second, it iterates over the collection of managers held onto by the container. Each manager is sent the deploy: method, with the argument being the newly created collection of services.Like much of the framework, the deployment manager's responsibilities are broken down into pluggable pieces. Specifically, there is a collection of deployment strategies that are used to convert various deployment artifacts into a collection of services. These strategies are registered when the image is loaded.The Web services framework makes extensive use of object registration when classes are loaded into the image. One pattern for this is to have the application class invoke the setupAfterLoad method on each of its defined classes. Advanced users may find it interesting to investigate all implementers of this method.A single strategy may be registered in multiple ways. Typically, an extension is used, e.g. xml or wsdl, along with a URI. The URI is the namespace identifier of the type of XML document, e.g. http://schemas.xmlsoap.org/wsdl.
3. If the deployment manager cannot figure out which strategy to invoke, it uses the indeterminate strategy. This strategy is registered under the key WSIndeterminateUrlDeploymentStrategy. The indeterminate strategy is the second attempt at service deployment. It tries to parse the string into a DOM object in order to extract the namespace URL. If successful, the indeterminate strategy then checks to see if a development strategy has been registered under this URL, and if so, delegates deployment responsibilities to it.Because much of the Web services world is defined by XML it was necessary to model some of the more prominent constructs that appear in XML. One of these was namespaces. The class SstNamespaceDictionary is simply a dictionary of dictionaries. This construct is not to be confused with namespace support in VA Smalltalk.Handlers are registered by keys, for example WSGlobalClientInputHandler. This key has a value of wsGlobalClientInputHandler. These keys are located in the pool dictionary SstWSConstants. The Handler Factory attempts to find a handler inside its registry when asked. If no handlers are found, the factory will convert the value of the key into a message selector and perform the method against itself. For an example of this, see the implementors of wsGlobalClientInputHandler. Therefore, as an alternative to utilizing deployment descriptors, the class of the Handler Factory may be extended to include methods specifically designed to meet the requirements of user applications.When service deployment occurs, each object in the containers manager collection is given an opportunity to deploy a collection of services. Each manager in this collection has a distinct, well-defined, responsibility. Although the framework comes populated with a predefined set of managers, specific usage scenarios may require that managers be added or replaced. Details on how to add managers are provided in the 'Extending/ Customizing the Web service platform'of this manual.
• WSActorManager (SstWSActorManager): Specifies which roles the container is playing, as specified by the SOAP Actor attributes.
• WSEngineFactory (SstWSEngineFactory): Determines which message processing engine is to be used when handling incoming or outgoing messages.
• WSPortManager (SstWSPortManager): Responsible for managing the correlation between WSDL port types and network access points.
• WSSerializationManager (SstWSXmlObjectCache): Responsible for maintaining the type and mapping information necessary to automatically convert to and from objects.
• WSServiceDefinitionsManager (SstWSServiceDefinitionsManager): Used as a library type object to hold onto original service definitions parsed in from WSDL.
• WSServiceManager (SstWSServiceManager): Used to control various aspects of the service. This manager is critical in determining how messages are processed.By default, the Actor Manager initializes itself with two roles. The first allows it to behave as a well-formed SOAP node (http://schemas.xmlsoap.org/soap/actor/next) and is required by the SOAP 1.1 specification. The second, is a VA Smalltalk specific URI (vast:anonymous) that indicates it can act as the ultimate receiver of SOAP messages. To create an intermediary, simply remove the vast:anonymous role from the actor manager. If the container behaves as an intermediary it is the responsibility of the user to ensure the SOAP message reaches the ultimate receiver.Thus, there are two primary handlers that serve as message processing engines; SstWSClientEngine, and SstWSServerEngine. It is the responsibility of these engines to control the basic flow of messages through the various handler chains. Being the initial handler invoked, the engine serves as the bridge between the transport, e.g. HTTP, and the invocation framework. Advanced users may wish to investigate SstWSServlet>>basicProcess: to see how transports and handlers are tied together.When a service is deployed into the container, the Port Manager inspects the location of the service, and if applicable, starts listening on the network endpoint. The Port Manager is responsible for synchronizing the WSDL defined ports, with network access points. Exactly how an endpoint is started is the responsibility of a network transport strategy. Like the deployment strategies, these work to isolate a specific set of requirements. Each strategy registers itself under the transport that it supports, which is based upon the scheme defined in the location URL, e.g. HTTP.During service deployment, the Port Manager will dispatch into the proper network transport strategy (currently, HTTP is the only supported transport). This strategy then determines if there is an endpoint already started capable of handling requests at the specified location. For HTTP endpoints, the strategy starts a new endpoint when an existing one is not found. The current implementation assumes the use of a servlet architecture and an SstServletEngine will be started. Unless you are providing your own port manager or HTTP transport strategy, it is recommended that your endpoints conform to this format.The Serialization Manager is responsible for managing rules that are applied during XML serialization and deserialization. The default Serialization Manager, SstWSObjectCache, is a subclass of AbtXmlObjectCache and manages the same types of XML resources. Schemas, mapping specifications, and serialization configurations are among the XML resources that are managed. The Serialization Manager API can be used to access locally specified resources as well as those defined in the globally accessible AbtXmlObjectCache singleton.The container attempts to present a simple API to the user. Service deployment will typically return the collection of services that were described in the provided artifact. Likewise, the method for locating a service inside a container is serviceNamed:inNamespace:. The name and namespace are derived directly from the WSDL document.
![]() |