| |
Building a Mobile Application with Oracle9iAS
Wireless using the HTTPAdapter
Module Objectives
Purpose
The purpose of this module is to demonstrate how to build a sample mobile
application using Oracle9iAS Wireless. After creating a service for the
sample application, you will be able to test it using a mobile simulator.
Objectives
After completing this module, you should be able to:
 |
List
the steps necessary to create a mobile application |
 |
Use the Service Designer to create a Master Service |
 |
Test the application on a simulator |
Prerequisites
Before starting this module you should have completed the following modules:
Reference Material
The following is a list of useful reference material if you want additional
information about the topics in this module:
Overview
Oracle9i Wireless
Overview
Oracle9iAS Wireless is the wireless component of the Oracle9i
Application Server. In the wireless internet architecture, Oracle9iAS
Wireless occupies the middle tier for developing and deploying wireless
applications. Oracle9iAS
Wireless provides the following features:
 |
Oracle9iAS
Wireless includes pre-built Java content adapters that let you rapidly
enable as wireless any content- databases, existing Web sites, e-mail
systems, enterprise applications, and so on. |
 |
Pre-built XML content transformers that enable your
wireless applications to be accessible on different devices simultaneously. |
 |
It offers a scaleable and open standards platform that
enables carriers, enterprises, and internet companies to rapidly extend
all their existing applications to any wireless Web devices and any
phone through voice recognition and text-to-speech technology. |
 |
It provides a platform that promotes e-businesses to
become mobile e-businesses. |
 |
A framework to create a HTML personalization portal
where users can select the content they wish to access from their
wireless device, as well as save often-used parameters that are called
presets. |
 |
Enables the creation of applications that
push information to any messaging-enabled device (SMS, e-mail, and
so on) based on the user preferences. Comprehensive support for the
development of Location Based Services that personalize information
based on users' locations. |
Building a Mobile Application
Oracle9iAS Wireless
provides an environment for you to design, build, test, and deploy your
mobile applications. It provides the solution for the wireless enablement
of your Web content allowing your content to be accessed by all mobile
devices including phones, PDAs, pagers, and through multiple interfaces
including voice. The four main steps include:
Designing the Application
Go back to List
Before you design and build mobile applications, it is important to understand
the architecture of mobile applications. The developer needs to adopt
a different approach when developing applications for the wireless device
as compared to the traditional desktop applications or the applications
designed for the Web. Some of the important factors to consider when developing
mobile applications include the following:
 |
Mobile devices with limited input and screen capabilities |
 |
The form factor of the target device and the browsing
and navigation features of the mobile device need to be considered |
 |
Diversity of content sources and wireless devices including
issues of different protocols, mark-up languages and portability constraints |
 |
Deploying the application |
Building the Application
Go back to List
One can use your own tools and platform to develop the application. The
application can typically be developed with Java Server Pages, XML, CGI,
or Active Server Pages. The requirement is that the presentation logic
of the application must return content that is compliant with Wireless
XML. Wireless XML consists of device neutral XML tags which are designed
for small screen and voice. For example, JSP is the presentation layer
for Java centric Web applications. In standard Web applications, where
HTML browsers are the client, JSPs generate HTML to these browsers. In
the case of mobile applications, the JSPs need to output Wireless XML
instead of HTML. Perform the following:
| 1. |
In the code snippet below, note that the coding is very similar
to generating HTML. For this example you have a simple program which
displays the address of Oracle in the wireless device. Open wirelessdemo.xml
from your working directory.

|
| 2. |
Save this file (wirelessdemo.xml) on the application server. You
can view this file View the file in a browser by specifiying the
following URL:
http://<hostname.domain>:7778/examples/wirelessdemo.xml

|
| 3. |
To associate the applications business logic with the presentation
layer, invoke the Service Designer tool of Oracle9iAS
Wireless and create the service. You will invoke the Service Designer
tool of Oracle9iAS
Wireless and create the Master Service using the HTTPAdapter. Open
your browser and enter the following URL:
http://<Server Name.Domain>:7778/webtool/login.uix
Select the Service Designer tab. Click on the Create
Master Service at the bottom of the window.

|
| 4. |
The Basic Information window of the Master Service is displayed.
Enter Address Details as the name, select the HTTPAdapter
from the list, and then click Next.

|
| 5. |
The Caching window of the Master Service appears. Caching is an
optional parameter you will leave blank. Click Next.

|
| 6. |
The Init Parameters of the Master Service appears. The Init Parameters
are also optional. Leave this screen blank and click Next.

|
| 7. |
The Input Parameters of the Master Service appears. For the URL
row, the location of the application (in this example, the xml file
at http://<hostname.domain:7778/examples/wirelessdemo.xml)
on the server is placed in the default value field. The other values
of REPLACE_URL, FORM_METHOD and INPUT_ENCODING can be left blank
(the default values are automatically utilized). Click Next.

|
| 8. |
Since the Output Parameters is dependent on the adapter chosen
in the first step, this window may or may not be relevant. In this
example of the HTTPAdapter, it bypasses this window and goes directly
to the Async Agent window. For this example, enabling this application
as asynchronous is not necessary. Leave the box blank and click
Next.

|
| 9. |
The final screen, Result Transformers, appears. Since Result Transformers
are not required for our specific application, click Finish.

|
| 10. |
The new Master Service is listed in the Service Designer.

|
Testing and Deploying the Application
Go back to List
To test the application in the simulator, click on the Test icon
and you see the contents of the XML displayed:

Once you are satisfied with the output, you can deploy the application
on a number of devices depending on your end users.
Module Summary
In this module, you should have learned how to:
 |
Identify
the steps necessary to create a mobile application |
 |
Create a Master Service based on the HTTPAdapter in
the Service Manager webtool |
 |
Test and deploy the application on a simulator |
Copyright © 2002 Oracle Corporation. All Rights Reserved.
Close Window
|