Chapter 7: Enabling Mobile Web Services
7.2 SOA for S60 Platform Architecture
The architecture implemented in the C++ SDK is illustrated in Figure 7-2 below. Note that the figure only illustrates the C++ perspective.
As the Java support of the SOA for S60 platform is based on the Service Development API, the corresponding Java illustration would be quite similar. The NWSF Java architecture is covered in more detail in chapter 9.
Figure 7-2. The SOA for S60 platform architecture.
Figure 7-2 presents an overview of the SOA for S60 platform architecture.
Starting at the top, the Web Service Consumer (WSC) and Web Service Provider (WSP) applications are considered to be the clients in the framework. They use the Service Development API to access the functionalities provided by the SOA for S60 platform.
The SOA for S60 platform Service Manager is responsible for coordinating connections to services, and for storing identity and service information. The Liberty ID-WSF framework plug-in provides internal client (Web service consumer) applications that are able to connect to a Liberty Discovery Service and a Liberty Authentication Service, in addition to adding the framework-specific SOAP headers to submitted messages. Additionally, the SOA for S60 platform provides APIs for basic XML parsing, the creation of SOAP messages, and WS-Security headers.
The SOA for S60 platform Service Manager runs as a Symbian server application in its own Symbian process space. This provides a robust overall system, where the failure (crashing) of a client application process should not affect other running client applications, or the Service Manager process itself.
Currently, the SOA for S60 platform supports the development of service consumer applications that access Web services. The applications can be used to access many of the popular Web services available today, such as those offered by Google, eBay, and Amazon. Future versions will support the development and running of Web service provider applications by using this same architecture. This is covered in more detail below in section 7.5.
7.2.1 Frameworks
The SOA for S60 platform acts as middleware, located between the application developer and the networking and XML processing features available in the native mobile device platform.
It is often useful to write modular code, allowing each component of a system to be responsible for a specific part of overall processing while functioning relatively independently of other components. SOAs are based on this concept: systems are loosely coupled to each other, and well-defined interfaces specify the interaction between systems and their components.
There are potentially several SOAs, which could take advantage of these features, and could act in similar ways, requiring access to the same features.
For example, many services require authentication. A common framework for authentication could thus be used across several services.
Also other features of systems (such as the way they handle identity) could be delegated to independent components, leaving a software application to handle only application-specific processing.
To cater to other potential service-oriented frameworks, the SOA for S60 platform offers a pluggable interface that allows such frameworks to be added to the SOA for S60 platform.
A framework plug-in implements all functionality needed to establish a connection to the type of service supported by the framework. The SOA for S60 platform Service Manager asks installed frameworks to provide it with a connection to the service requested by the client application, and the framework is then expected to execute all necessary tasks in establishing that connection.
Frameworks are also responsible for the wrapping and unwrapping of messages into framework-specific envelopes. For example, the ID-WSF framework plug-in wraps an XML application message into a SOAP envelope, and adds the required ID-WSF-specified SOAP headers to the message before dispatching it over a transport protocol to the requested service.
The first framework plug-in available for the SOA for S60 platform implements the Liberty ID-WSF framework for identity Web services.
The SOA for S60 platform ID-WSF framework plug-in utilizes the Liberty ID-WSF SOAP Binding Specification and the Liberty ID-WSF Security Mechanisms Specification, which allow it to provide client applications with access to Liberty-compliant services. As part of this framework, the SOA for S60 platform provides two service consumer applications of its own: the Discovery Service (DS) client and the Authentication Service (AS) client. The SOA for S60 platform itself uses these clients to access the Liberty WSF Discovery Service and the Liberty ID-WSF Authentication Service. This means that service consumers are both part of the framework, as well as client applications that use the framework.
The SOA for S60 platform supports the Liberty ID-WSF framework because it enables the support of Web services that exist in dynamic, complex business environments where services are modular, and authentication and other facilities are factored out of application services.
In many cases, the interaction between clients and services demands more than just the basic Web service operations, as they concern issues such as identity and the configuration of authentication and security, which have been addressed in the Liberty ID-WSF specifications.
Although the basic APIs are quite simple, the SOA for S60 platform handles a number of underlying complexities to achieve the desired results, particularly in the process of establishing a connection to a service. This particular process is neatly handled by the service frameworks, which perform the often-complicated steps required in establishing the service connection. This functionality is described in more detail below.
All service consumer and provider applications act as SOA for S60 platform client applications. They request service access from the SOA for S60 platform Service Manager, which is then responsible for turning those requests into service sessions by using the available frameworks.
The SOA for S60 platform maintains the service session to represent a session between one or more client applications and a particular instance of a Web service.