Oracle9i Application Server Wireless Edition Developer's Guide Release 1.1 Part Number A86700-01 |
Library | Service | Contents | Index

# 1
Introduction

This guide discusses how you can use the Oracle9i Application Server Wireless Edition to develop and deliver mobile services. It explains how to create adapters and transformers, customize your mobile portals at various levels (JavaServer Pages, Portal API, Data Model API, and Runtime API), extend and customize the functional components in the Wireless Edition, and work with the XML formats that the Wireless Edition uses.

Each section of this document presents a different topic. These sections include:

- Section 1.1, "Creating Adapters"

- Section 1.2, "Creating Transformers"

- Section 1.3, "Rebranding the Wireless Edition Personalization Portal"

- Section 1.4, "The Runtime API"

- Section 1.5, "The Data Model API"

- Section 1.6, "The Location API"

- Section 1.7, "Wireless Edition XML"

## 1.1 Creating Adapters

The Wireless Edition architecture is designed to adapt content from Web sites, Internet applications, and databases, into an XML representation. The XML representation is transformed through the use of XSL stylesheets to a markup language specific to a particular device.

The Wireless Edition provides adapters that retrieve any content. You can also create your own adapters by implementing the `RuntimeAdapter` interface. The newly created adapter can be a self-contained application, or it can invoke external applications. For details on how to create new adapters, see Chapter 2, "Creating Adapters". For information on how an adapter can use the interfaces in the Wireless Edition Runtime API and Data Model API, see Chapter 6, "Using the Runtime API" and Chapter 7, "Using the Data Model API", respectively.

## 1.2 Creating Transformers

Implementing the ServiceContext interface, which contains the input and output parameters of a service in addition to the AdapterResult and SimpleResult, provides the XML input for the transformers. The device transformers convert SimpleResult into the format of the target device.

The implementation of the Transformer interface is public, enabling any level of customization of this process, both for custom and existing adapters. For any custom adapter, it is possible to create a new ResultTransformer, provided that the output from the transformer is Wireless Edition DTD-compliant XML. This XML is then converted by a device transformer to a markup language format that is appropriate for the mobile device.

The Wireless Edition provides generic device transformers for several target formats, such as CHTML, HDML, HTML, MML, VoiceXML, VoxML, and WAP (WML). It is possible to customize specific device transformers or create new ones. This means that device-specific transformations can be implemented. To support a new markup language or a new device type, only the device transformer needs to be modified, but the application itself is unaffected.

As described in Chapter 7, "Using the Data Model API", the implementation of the Device interface enables the definition of the target logical device protocol (for example, WML11, SMS, or EMAIL), as well as the specification of the physical characteristics of the target logical device that can be used by the adapters and the transformers (for example, screen width and height, screen columns and rows, and number of softkeys). There are Runtime system variables that can access this information, as described in Chapter 6, "Using the Runtime API".

For more information on creating transformers, see Chapter 3, "Creating Transformers". For more information on working with Wireless Edition XML, see Chapter 9, "Working with Wireless Edition XML".

## 1.3 Rebranding the Wireless Edition Personalization Portal

The Wireless Edition Personalization Portal is both a framework for the personalization interface and a sample implementation of that framework. The framework consists of JavaServer Pages (JSP) files, JavaBean modules, JavaScript, and such static elements as images, XSL stylesheets, and HTML files. Another element of the framework is the logical sequence in which the elements execute. You can rebrand the Personalization Portal based on the existing framework or, by altering the logic in the JSP files and JavaBeans, restructure the framework itself.

For more information on rebranding the Personalization Portal, see Chapter 4, "Rebranding the Personalization Portal".

## 1.4 The Runtime API

The Runtime API consists of three public Java packages that provide interfaces for the following:

- Examination of the status of the core objects in the Runtime execution (`oracle.panama.rt`).

  The essential Runtime core objects are:

  - Request: the service invocation specification

  - Response: the result of a request execution

  - Session: the duration and context of a connection

  - ServiceContext: the context in which the request is being executed

  - ManagedContext: the private context of an adapter

- Monitoring the Runtime execution sequence, based on the event model (`oracle.panama.rt.event`)

  - RequestListener observes the enabled Request Event.

  - ResponseListener observes the enabled Response Event.

  - SessionListener observes the enabled Session Event.

- Extending the Runtime essential replaceable components (`oracle.panama.rt.hook`) by using hooks and policies

  - Hook is the main extension mechanism.

  - The default implementations of hooks are published as policies.

  - Policies can be reused by the customized hook.

  - The new customized hooks, which implement the respective interfaces and the singleton pattern, are registered in the appropriate entries in the System.properties file.

### 1.4.1 Hooks

One set of the interfaces in the Runtime API, which is contained in the package `oracle.panama.rt.hook`, specifies the hooks that can be used by application developers for their customized plug-in modules. For example, The ListenerRegistrationHook registers listeners. Application developers can implement this hook interface for a customized listener registration module that lets the listeners selectively observe the event sources. A reusable custom listener registration policy may subscribe the listeners only to the requests for the Web Integration Adapter services. Such a listener may add business rules to the Runtime controller.

For more information on how to use hooks, see Chapter 6, "Using the Runtime API".

## 1.5 The Data Model API

You can create, delete, modify, and query Wireless Edition persistent objects by implementing the public Java interfaces in the Data Model API. Developers of services, adapters, and transformers can implement these interfaces to develop stand-alone applications which manipulate a Wireless Edition persistent object.

For example, a User can belong to multiple groups. The actual user can access the services that are accessible to the groups to which the user belongs. However, the implementation of the User interface can access another provisioning system to manage the information about the current actual user and specify only particular services that are available to that user.

Any service can be assigned as accessible to a group. User attributes can use LocationMark and AutoLocate for location-based services.

The Device interface in the Data Model API provides for defining the target logical device protocol (for example, WML11, SMS, or EMAIL), as well as specifying the physical characteristics of the target logical device (logical device attributes) that can be used by the adapters and the transformers (for example, screen width and height, screen columns and rows, and number of softkeys). There are Runtime system variables that can access this information.

For more information about the Data Model API, see Chapter 7, "Using the Data Model API".

## 1.6 The Location API

The Wireless Edition provides a set of location application component APIs that enable developers to include geocoding, location marks, routing, and business directory (yellow pages) components into their Wireless Edition applications. By using these APIs, developers can integrate location services from geocoding, mapping, routing, and yellow page third-party providers into Wireless Edition applications without having to write custom interfaces for each service.

Developers can prioritize services based on quality, availability, or cost. The location application component APIs also include a wrapper function that maps location services providers to the APIs.

For more information on how to use the location API, see Chapter 8, "Using the Location API".

## 1.7 Wireless Edition XML

XML is a markup language for documents containing structured information. In such documents, the role that an element of information plays in that document is significant. Therefore, it is possible in documents that have some structure to separate content (for example, words and pictures) from indications of what role that content plays (for example, the content in a section heading carries a different meaning from the same content in a database table or a footnote). XML is an effective mechanism for identifying structures in a document, which makes it useful for exchanging data between diverse platforms.

In Chapter 9, "Working with Wireless Edition XML", there are descriptions of the Oracle XML parser, the Wireless Edition XML formats -- the SimpleResult format and the AdapterResult format, the XML structure of the Wireless Edition repository, and XML tools, such as LoadXml and upload and download utilities.

Appendix A, "Simple Result DTD Reference" provides a detailed reference for the SimpleResult DTD.

| Copyright © 2001 Oracle Corporation. All Rights Reserved. |
Library | Service | Contents | Index