|
Mobile commerce and WML
|
 |
The wireless technology has provided a completely new media for service
providers to build new applications upon Internet and an information channel
for consumers to access content in Internet. An ever-increasing number of
Internet-enabled portable phones have created a mass market for service providers
to bring out new mobile applications that serve content in Internet. There
are today roughly 340 million mobile phone users worldwide. It is estimated
that in year 2003 the limit of one billion users will be broken and most of
mobile phones have an Internet connection.
The enabling technology to bring Internet content and services to mobile
phones and other wireless terminals is called
WAP.
The similar technology in Japan is called iMode. The WAP is a global industry
standard published by the WAP Forum. People have compared WAP to the World
Wide Web. It enables the information content to be distributed and displayed
in mobile terminals such as World Wide Web enabled the access to Internet.
This article describes the basics how a person can access Web content
or any knowledge base on Internet using a mobile phone. The basics of the
WML language is also presented.
Mobile commerce
Mobile commerce means markets on wireless service area. These services
are promising and growing all the time. The increase of markets relates to
the number of sold mobile phones. For example, the following characteristics
in Finland may be used to figure out the potential mobile commerce markets:
Characteristics of Finnish mobile phone markets
- About 50-60% of Finnish population has one or more mobile phones
and the number is increasing.
- There are more mobile phone users than Internet users.
- There are more mobile phones than fixed phones.
- It is estimated that within 4 years there are more mobile phones
that are capable to connect to Internet than traditional mobile phones with
no Internet connectivity. Therefore, there will be more wireless Internet
users than fixed users.
Potential markets for wireless services and applications are huge, not
only in Finland. Every Internet service provider could establish a service
platform that serves Web content to mobile users. It is said that every company
will have an own WAP home page as they have now a home page in the Web.
Technology behind mobile commerce
The ever-developing mobile infrastructure is bringing new business possibilities.
The new technologies such as
GPRS
and
UMTS supports increased
data transmission capacity in the enhanced mobile infrastructure. The current
GSM based transmission capacity of 9.6Kbit/s is suitable only for text based
transmissions such as
SMS.
This is not enough for any multimedia data transmission. The GPRS technology
allows 114Kbit/s and UMTS allows up to 2Mbit/s data transmission speed. The
third generation technology supports faster transmission speed and therefore
any multimedia data can be transmitted over wireless network. This technology
enables completely new services for mobile phone users. For example, the Internet
services can be accessed using mobile terminals such as mobile phones or
PDA devices through wireless connections.
Wireless services - what they could be?
Wireless services could be targeted for any kind of user profile, application
or interest area. Mobile phones and mobility enables nowadays something else
than just making calls. The value-added services for consumer utilizes the
data transmission capability of a mobile phone. The decision to purchase a
mobile phone is not based entirely on phone call features but more on value-added
services that the current technology supports. According to a market study
for value-added mobile services
[Market study], the
long-run demand for mobile services can be categorized into entertainment,
infotainment and transaction services and applications (
Table 1):
| bank | dictionary |
| phonebook |
pizza order |
| e-mail | news
items |
| city navigation |
travelling businessman |
| remote control | gambling |
| ringing
tones | stock info |
Table
1
. Favorite value-added services and applications
on mobile phones
What is WAP?
The WAP is an evolving standard that accelerates mobile commerce markets.
With a WAP capable mobile device someone can do business transactions like
shopping, banking operations, reservations in Internet. The WAP stands for
Wireless Application Protocol. WAP is a result of specification work done
in WAP Forum, that is an organization represented by telecommunication and
wireless technology companies that are responsible for developing and specifying
protocols and guidelines to WAP application environment. WAP is an industry
standard developed by a group of telecom manufactures (e.g. Nokia, Ericsson,
Motorola, ...), telecom operators (Deutche Telecom, France Telecom, AT&T,
...), software companies and service providers (Microsoft, IBM, RSA, Unwired
Planet, Symbian, ...). The total number of members in the WAP Forum exceeds
200.
WAP has been developed only for narrow-bandwith applications on wireless
world. It is based on Internet standards such as XML,
SSL, TCP/IP, ... It is not defined to any particular
device or carrier network. At the moment of writing this article, the WAP
specification 1.2 is the latest approved version.
Development of WAP
A couple of years ago WAP was one proposal among many other XML applications.
The technology development has enabled the WAP to become real life. The target
of WAP was to bring out Web content to wireless applications. The content
is encoded with a WML language. The usage of WML on mobile applications is
one of the newest and promising application areas of XML and, a mobile access
to company's information systems offers lots of new business opportunities.
WAP can be seen as a completely new information channel for service providers
and information consumers.
Someone may ask: "We already had an HTML to represent data on the Web.
Why we could not use that for data encoding in WAP applications?" There were
several reasons why not to use HTML:
HTML's weaknesses
- HTML is not a compact format enough for wireless communication due
to limited transmission capacity.
- HTML is too vendor specific presentation format and not so consistently
supported. This means that applying HTML on wireless applications, developers
cannot guarantee that HTML is implemented as it is in a specific Web environment.
This might restrict potential markets of wireless applications.
WAP architecture
How can a mobile phone user access Internet-based services? The information
is transmitted between a WAP client and a WAP server. The WAP server acts
as a gateway to Internet. The client (mobile terminal) and the server (WAP
Server) transmits all the information in a
WML
format. It is an XML conforming application. The WAP client and server encodes
the WML data according to a WML document type definition (DTD). The WML code
may contain WMLScript as HTML code may contain JavaScript. The WMLScript language
is based on the JavaScript language.
The mobile phone user makes a connection between the WAP client and
the server through wireless digital network. The WAP client and server are
responsible for establishing the session. The WAP server is responsible for
managing connection requests, making requests to the Web content servers and
responding to the original requests by returning the requested information
back to a mobile phone user. The Web and WAP server processes, validates,
and transforms the data before it is transmitted to a WAP client. The WAP
client contains a WAP micro-browser that processes the WML data and displays
it on mobile phone's screen. The WAP specifications does not define how the
WML data is processed and rendered, it is up to device vendor's implementation
(
Figure 2).
In addition to standard netcentric stuff like Web servers, Web applications
servers, enterprise application servers, middleware solutions and, data repositories;
WAP architecture needs only an access server to connect mobile network to
Internet. The WAP gateway (synonym to WAP server) acts as an access server.
The WAP architecture describes how WAP clients connect to Internet and how
enterprise systems are accessed through Internet using wireless terminals.
The WAP client makes a request to Web resources by assigning a URL to it.
The request is transmitted through mobile network using WAP
protocols. The WAP client sends the request to teleoperator's
remote access server that forwards the request to company's WAP gateway on
Intranet or the WAP client connects to company's dial-up service that forwards
the request to local WAP gateway. The WAP gateway transforms the URL request
and forwards it to Web server using the HTTP protocol. The Web server interpret
the request and returns the response in WML format via WAP gateway, that transforms
it into binary format to a WAP client.
Company's existing Web application service needs minor changes to support
wireless access. The Web applications should adapt to client type (e.g. Web
browser or WAP device) and serve content as appropriate. There are different
techniques to convert data from HTML or from other legacy system format to
WML. One possible solution is to use XML/XSL processing applications. To put
it simply, the WAP capable environment consists of the following components:
Components of WAP environment
- WAP terminal is a client-side device that accesses specific Web
resources by means of URL requests and processes the responses using software
within the device.
- The WAP gateway is an access point for WAP terminals after the data
signal is transmitted through mobile networkt. The role of WAP gateway is
to receive and resend data between mobile network and Internet. The data in
mobile network is encoded as a compressed binary format and in Internet as
appropriate encoding. The compression and binary transformation on WAP gateway
is done to maximize the use of mobile bandwidth to transmit data.
- The Web application that serves URL access requests from the WAP
gateway and generates content to WAP specific channel. The content is transmitted
through a channel from Web applications to a WAP gateway, that is called also
as a WAP proxy. The URL requests from a WAP gateway to a Web server and WML
encoded content from a Web server to a WAP gateway are transmitted using an
HTTP communication protocol.
WAP protocols
WAP consists of a set of protocols. The protocols are the following
(
Figure 1):
-
WSP is a
session layer protocol to provide a shared state between a client and a server
content transfer.
-
WTP
is a transaction-oriented protocol to provide request and reply based transport
mechanism.
-
WTLS
is a security protocol to provide security services.
-
WDP is
a protocol to provide a connection-less datagram service.
The WAP data transfer happens on native network bearers (SMS,
USSP,
CDMA,
CDPD,
PDC-P, ...). For application developers
and service providers the only things to remember are WML and WMLScript, the
rest of WAP architecture and communication is hidden (
Figure 1).

Figure 1
. WAP protocols
WAP application environment
WAP specifies
WAE
that leverages existing Internet technology and wireless protocols. WAE is
an application development and execution environment. To do that, WAE defines
the following objectives
[WAE specification]:
Main objectives of WAE
- An application architecture model, that allows to build WAP applications
that function on devices with limited capabilities such as memory capacity,
screen size, battery life, user input features and, on narrow-band infrastructure.
- A general application programming model, that uses WWW programming
model (browsing and scripting services) and, enables applications to be run
on any wireless devices regardless of a device vendor.
- Allows teleoperators to extend their network-based services.
WAE consists of WML microbrowser, WMLScript virtual machine, WMLScript
Standard Library,
WTAI and WAP content types. The WML microbrowser acts as a user
agent that interprets WML data including WMLScript and as a WTA user agent
that interprets WTAI commands in WMLScript. WTAI interface allows WAP applications
to access mobile phone's internal features and applications. The WAP application
content types are WML, WMLScript and
WBMP for
raster graphics. The purpose of WAE is to offer a device and a network independent
application environment for narrowband wireless devices.
The logical model of WAE
The logical model of WAE capable environment consists of user agents,
content generators and content encoders/decoders. The processing of WAP data
takes place in WAE user agents. A user agent provides the end-user functionalities
such as rendering data on the screen. WAE does not limit user agents only
for WML and WTAI user agents but allows integration of any domain-specific
agents. Also WAE does not specify the implementation of any user agent, it
is vendor's responsibility. A user agent is a client-side in-device software
in a mobile phone such as a microbrowser that interprets WAP messages that
are constructed from WML and WMLScript. A content generator is an application
on server-side that produces data to the response from a user agent in a content
format that is processable by a user agent. WAE does not specify content generators.
A content encoder/decoder is responsible for encoding compressed WML, bytecoded
WMLScript and, WBMP image format (
Figure 2).

Figure 2
. The logical model of WAE
WML and WMLScript languages
WML is an XML language derived from
HDML specification (version 2) by Unwired Planet. WML is designed
for wireless Web environment and it does not take care of any specific device
type. The language is compact and the user interface model of WML is dedicated
to small screens with few press buttons. WML can be said to be a display language.
WMLScript is a scripting language that can be mixed with WML to provide functionalities
in the WAP application like JavaScript in HTML.
WML language functionalities are used for screen management of text
and graphics, data input control, hyperlinks, navigation and, international
support. The WML data is encoded as card entities (elements) within a one
deck. The deck is said to be WML document's logical root element. It means
that all data is capsulated into card elements and there may be several cards
within a one deck. This card-based metaphor means also that all user interactions
are split into cards and navigation occurs between cards, not between documents
as happens in HTML. User navigates between cards using links between cards
and one card is displayed at a time. The card contains actual data and user
interface elements. The WAP client downloads a deck at a time and therefore,
navigation between cards does not require server access as every HTML page.
One deck with as much as possible cards minimizes the network traffic and
reduce downloads (
Figure 3).

Figure 3
. Card and deck metaphor
Syntax of WML and WMLScript languages
The purpose of this article is not to introduce a WML DTD, but instead
to describe the main functionalities in WML and WMLScript languages. Refer
to
[WML specification] for full description of WML DTD and
[WMLScript specification] for full description of WMLScript. WML syntax follows
mostly the syntax in the XML specification. The syntactical constructs used
in the WML are character entities, elements, attributes, comments, variables
and CDATA sections.
What type of element categories WML language consists of?
The building blocks and functionalities of WML language can be divided
into four categories: formatting, linking, input and, task properties. In
the following subsections, the basics of WML language is described with code
and
MMI examples. MMI is described as
screen captures card by card.
Formatting properties
A WML page consists of a logical deck
entity that has at least one card element.
One card element is displayed at a time and it contains id
attribute for linking and navigating between card elements.
A card element has also a title
attribute that is displayed on the screen.
For text formatting there are elements like: a p
element for paragraphs, a table element for tables,
an img element for graphics, a br
element for line breaks, an em element for italic text,
a strong element for "strong" effect, an i
element for italic text, a u element for underlined
text, a big element for bigger size text and a small
element for smaller size text. See example code and MMI (
Figure 4).
Linking properties
For linking decks, there is an a element and
an anchor element. The semantics of an a
element is similar to HTML, but in an anchor element
you may use either a go (href
attribute defines the destination) or a prev (goes
to previous card element) subelement to define the
link destination. See example code and MMI (
Figure 4).

Figure 4
. Example code and MMI of formatting and
linking properties
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<!-- FILE: Formatting.wml -->
<!-- Text formatting and card linking properties -->
<wml>
<card id="formatting" title="Formatting">
<do type="Next page">
<go href="#table"/>
</do>
<p align="left">
<em>WAP Toolkit</em><br/>
<strong>WAP Toolkit</strong><br/>
<b>WAP Toolkit</b><br/>
<i>WAP Toolkit</i><br/>
<u>WAP Toolkit</u><br/>
<big>WAP Toolkit</big><br/>
<small>WAP Toolkit</small><br/>
</p>
</card>
<!-- Table and card linking properties -->
<card id="table" title="Table">
<do type="Next page">
<go href="#graphics"/>
</do>
<do type="Previous page">
<go href="#formatting"/>
</do>
<p align="center">
<table columns="3">
<tr><td>11</td><td>12</td><td>13</td></tr>
<tr><td>21</td><td>22</td><td>23</td></tr>
<tr><td>31</td><td>32</td><td>33</td></tr>
</table>
</p>
</card>
<!-- Graphics, task and linking properties -->
<card id="graphics" title="Graphics">
<p align="left">
Bitmap image:
<img src="sunny.wbmp" alt="sunny day"/><br/>
<a href="Input.wml">Input properties</a><br/>
<anchor>Variable properties
<go href="Variable.wml"/></anchor>
<anchor>Previous page<prev/></anchor>
</p>
</card>
</wml>
Input and select properties
For enabling user input, there is an input element,
that can be used for user input. A user may also select from a pre-defined
selection list using a select element. The name attribute of input and select
elements can be used as a variable across a deck or it can be given as a parameter
to a link destination definition in a or go
elements. The input formatting properties can be modified with various input
element's attributes like type, format and maxlength.
A different look and feel is possible with a fieldset
element. See example code and MMI (
Figure 5).

Figure 5
. Example code and MMI of input and select
properties
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<!-- FILE: Input.wml -->
<!-- Input and linking properties -->
<wml>
<card id="input1" title="Input">
<do type="Next input properties">
<go href="#input2"/>
</do>
<do type="Task properties">
<go href="Task.wml"/>
</do>
<p align="left">
CD: <input name="Cd" size="12"/><br/>
Artist: <input name="Artist" size="12"/><br/>
Price: <input name="Price" size="12"/><br/>
</p>
</card>
<!-- Input, card and deck linking and select properties -->
<card id="input2" title="Input">
<do type="Previous input properties">
<go href="#input1"/>
</do>
<do type="Variable properties">
<go href="Variable.wml"/>
</do>
<p align="left">
Artist: <input name="Artist" title="Artist:" size="12"/><br/>
Type: <select name="type" value="double" title="Type:">
<option value="single">Single CD</option>
<option value="double">Double CD</option>
</select>
</p>
</card>
</wml>
Task properties
The task properties are used when a certain event occurs like entering
a new card or selecting a link. Typical task-type elements are go, prev, refresh (current card element is reread) and noop
(means that nothing is done). With a timer element
or card element's ontimer
attribute, the page can be frozed for a defined period before further actions.
Common tasks to a certain card element is defined in
a do element and common tasks to a whole deck is defined
in a template element. See example code and MMI (
Figure 6).

Figure 6
. Example code and MMI of a task property
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<!-- FILE: Variable.wml -->
<!-- Variable properties -->
<wml>
<card id="variable" title="Variable" ontimer="WMLScript.wml">
<timer value="5"/>
<p align="left">
Wait for 5 seconds ...
</p>
</card>
</wml>
Example of WMLScript
The following WAP application uses WMLScript to convert currency (
Figure 7).

Figure 7
. Example code and MMI of currency convertor
application
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<!-- FILE: WMLScript.wml -->
<!-- A WMLScript example -->
<wml>
<card id="wmlscript" title="Currency convertor">
<p>
Amount: <input format="*N" name="amount" title="Amount:"/>
From: <select name="from" value="USD" title="From:">
<option value="DEM">German Mark</option>
<option value="FRF">French Franc</option>
<option value="USD">US Dollar</option>
</select>
To: <select name="to" value="FRF" title="To:">
<option value="DEM">German Mark</option>
<option value="FRF">French Franc</option>
<option value="USD">US Dollar</option>
</select><br/>
= <u>$(conversion)</u>
</p>
<do type="accept" label="Calculate">
<go href="currency.wmls#convert('conversion','$(from)',
'$(to)',$(amount))"/>
</do>
</card>
</wml>
/* FILE: Currency.wmls
* Calculate the exchange rate
* @param varName - the variable to store the results
* @param amount - the amount to convert
* @param from - the original currency
* @param to - the currency to convert to
* @return a string containing the converted amount
*/
extern function convert(varName,from,to,amount) {
var multiplier = 0.0;
var returnString = "Not Available";
var result;
if (from == "DEM") {
var DEM_FRF = 0.298331;
var DEM_USD = 1.653500;
if (to == "DEM")
multiplier = 1.0;
else if (to == "FRF")
multiplier = DEM_FRF;
else if (to == "USD")
multiplier = DEM_USD;
} else if (from == "FRF") {
var FRF_DEM = 3.351981;
var FRF_USD = 5.542500;
if (to == "FRF")
multiplier = 1.0;
else if (to == "DEM")
multiplier = FRF_DEM;
else if (to == "USD")
multiplier = FRF_USD;
} else if (from == "USD") {
var USD_DEM = 0.604778;
var USD_FRF = 0.180424;
if (to == "USD")
multiplier = 1.0;
else if (to == "FRF")
multiplier = USD_FRF;
else if (to == "DEM")
multiplier = USD_DEM;
}
if (multiplier != 0.0) {
/* Make the calculation*/
result = amount / multiplier;
returnString = String.toString(result);
returnString = String.format("%.2f", returnString);
}
/*Return the results to the browser*/
WMLBrowser.setVar(varName,returnString);
WMLBrowser.refresh();
}
Conclusions
The success of WAP is based on available working applications, low cost
WAP devices and, services that are not high-charged. Before consumers decide
to purchase a WAP phone, there should be interesting services available at
a low cost to serve as add-on-value services to traditional mobile phones
services. It seems to that corporations should first adapt WAP technology
in their business. Corporations could build mobile portals that enable employees
to access corporate applications and knowledge bases anytime and anywhere.
The corporate portal solutions could satisfy communication needs such
as e-mail services, news services and, directory services. The user may connect
to content services to request specific content or information about stock
markets, weather, traffic schedules or news. Company employees may access
corporate knowledge bases to find information in maintenance, sales and, training
support duties.
The WAP services can be argued with the following benefits:
Benefits of WAP services
- The requested information is being received with no considerable
delays and it is precise.
- WAP services are easy and convenient to access anytime and anywhere.
- WAP services can act also as syndicating services where a user pre-defines
what information and, when it is needed by setting triggers that are launched
when a certain condition is satisfied, e.g. a stock value has reached the
target.
Usability issues
WAP devices have a limited capacity and performance in memory, bandwidth
and CPU processing, but there are applicable if application developers are
aware the technical limitations. The technology is evolving and new improved
solutions in mobile phones as well as WAP services platform area are coming.
Some tips for developing WAP applications
- Due to a relatively small screen in WAP devices, the data rendering
should be designed so that it is easy to read and limit the "page size" to
4-5 screens of data.
- For faster navigation and content decision, prefer selection lists,
not direct inputting.
- Due to limited memory, avoid graphics on a page.
- The application should be design to work within a deck, because
the whole deck is downloaded at a time. This minimizes the interaction between
a server and a client. All service requests to other deck opens a new connection
to a server and it's setup takes time because WAP uses connection-less communication
metaphor.
The WAP standard does not say anything how WML data should be located
or rendered in a MMI. Some mobile device may process WML data differently;
either not supporting certain structures such as tables or rendering same
elements differently. WAP specifications do not define certain MMI link properties
such as back, forward
and home as Web browsers do. The programmer
should implement that.
The WAP protocol is limited. For example, once a user has connected
to a WAP service (compare to a Web home page), he/she cannot move to an another
WAP service without closing the current session and establishing a new connection
manually to an another WAP service. In practis,e this means that WAP services
provided by teleoperators and companies are isolated from each other and,
cannot be accessed such like Web home pages.
Some notes about WAP applications
- All WAP user agents do not implement all standard features and,
in some cases they have been enhanced that makes them incompatible with other
WAP user agents in other WAP devices.
- Some WAP devices interpret WAP application (WML data) differently
that makes WAP application development device-type specific.
- There are available WAP SDKs
that are more or less vendor specific; the rapid development has caused that
SDKs do not support all features on actual WAP device.
Bibliography
| [Market study] | The demand for mobile value-added services. Study
of smart messaging. Market study. Nokia Telecommunications Oy. 1999. 22 p. |
| [WML specification] | Wireless Application Protocol, Wireless Markup
Language specification, version 1.2. WAP Forum. November 4th, 1999. 84 p. |
| [WAE specification] | Wireless Application Protocol, Wireless Application
Environment Overview, version 1.2. WAP Forum. November 4th, 1999. 26 p. |
| [WMLScript specification] | Wireless Application Protocol, WMLScript
Language Specification, version 1.1. WAP Forum. November 4th, 1999. 135 p. |