0% found this document useful (0 votes)
53 views169 pages

FINAL

Uploaded by

seccsiku703
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views169 pages

FINAL

Uploaded by

seccsiku703
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 169

Wireless Application Protocol

Unit I

Introduction

WAP

Background

WAP- The Wireless Service Enabler

Why Using the Internet?

The Internet Model

The WAP Model

Motivations for WAP

Roles and Benefits

Services using WAP

WAE – An Overview

1.0 Introduction
The desktop PC has dominated the internet as the browser of choice for most
people. A few years ago browsing spread to laptops as digital mobile phones took over
from their analogue predecessors, and now most palmtop computers contain web
browsers with varying degrees of sophistication. But all of this to date has required the
user to connect their computer to a phone line, whether that phone line is a fixed line or a
mobile connection over GSM. The next generation of phones, for instance the Nokia
7110, include portable web browsers so that they don't need to be connected to a
computer to browse the Internet. However, this new breed of web browsers does have
some restrictions.

First, because they are built into mobile phones, they generally have limited
processing power, and are therefore unable to deal with the multimedia presentations that
desktop computers can handle. In addition, the screens are generally a lot smaller, and
therefore there are limitations on the amount of information that can be displayed.
Second, whereas most desktop computers are connecting to the Internet at speeds of at
least 33.6 Kbs and much faster speeds are possible), the mobile phone is currently

Page 1
Wireless Application Protocol

restricted to a maximum connection speed of 9.6 Kbs. This means that even if the phone
had the processing power to cope with complex web pages, it could not download them
in a reasonable time. And remember, mobile calls cost considerably more than calls from
a fixed line, and therefore download times become even more relevant.

Mobile networks of today do not often provide desired flexibility when value
added services are about to be introduced. This since it often is a rather complicated and
lengthy task to launch such services. The Wireless Application Protocol (WAP) addresses
this issue by introducing the concept of the Internet as a wireless service platform. The
Internet has proven to be an easy and efficient way of delivering services to millions of
"wired" users. In 1997, Ericsson, Motorola, Nokia, and Unwired Planet took the initiative
to found WAP Forum, which mission is to bring the convenience of the Internet into the
wireless community as well. WAP Forum has today gained great credence in the wireless
industry all over the world; more than 90 of the world's leading companies in the business
of wireless telecommunication are members as of February 1999.

By addressing the constraints of a wireless environment, and adapt existing Internet


technology to meet these constraints, the WAP Forum has succeeded in developing a
standard that scales across a wide range of wireless devices and networks. Re-use of
concepts found on the Internet enables a quick introduction of WAP based services since
both service developers and manufacturers are familiar with these concepts today Key
features offered by WAP are:
Wireless Markup Language (WML)
A markup language used for authoring services, fulfilling the same purpose as the
HyperText Markup Language (HTML) does on the World Wide Web (WWW). In
contrast to HTML, WML is designed to fit small handheld devices.
 WMLScript
WMLScript can be used to enhance the functionality of a service, just as for
example JavaScript may be utilised in HTML. It makes it possible to add e.g.
procedural logic and computational functions to WAP based services.
 Wireless Telephony Application (WTA)
The WTA framework defines a set of features that provides a means to create
telephony services. This is accomplished by introducing an in-client interface to
the mobile network, handling of network events, a repository that allows real-time
handling of services, and a mechanism supporting server initiated services.
 Optimised protocol stack
The protocols used in WAP are based on well-known Internet protocols such as
HyperText Transport Protocol (HTTP) and Transmission Control Protocol (TCP),
but have been optimised to address the constraints of a wireless environment,
such as low bandwidth and high latency.

Page 2
Wireless Application Protocol

The opportunity of creating wireless services on a global basis will attract


operators as well as third party service providers, resulting in both co-operations and
competition that do not exist today. WAP provides a means to create not only services
that we are used to from the World Wide Web today, but also telephony services.

1.1 Objective
The objective of this lesson is to understand the fundamentals of WAP, which
include a wide range of topics from fundamentals of WAP and Internet model to WAE.
The fundamental concepts include WAP model, motivations for WAP and Roles and
benefits. At the end of the lesson you learn about basic concepts of WAP.

1.2 Content

1.2.1 Wireless Application Protocol (WAP)


The Wireless Application Protocol (WAP) is a result of joint efforts taken by
companies teaming up in an industry group called WAP Forum. The objective of the
forum is to create a license-free standard that brings information and telephony services
to wireless devices. To access these services WAP utilises the Internet and the World
Wide Web (WWW) paradigm. WAP scales across a broad range of wireless networks,
implying that it has the potential to become a global standard and those economies of
scale thus can be achieved. In order to provide wireless access to the information space
offered by the WWW, WAP is based on well-known Internet technology that has been
optimised to meet the constraints of a wireless environment.

Background
Wireless Application Protocol (WAP) could roughly be described as a set of
protocols that has inherited its characteristics and functionality from Internet standards
and standards for wireless services developed by some of the world's leading companies
in the business of wireless telecommunications. In 1995 Ericsson initiated a project
which purpose was to develop a general protocol, or rather a concept, for value added
services on mobile networks. The protocol was named Intelligent Terminal Transfer
Protocol (ITTP), and handles the communication between a service node, where the
service application is implemented, and an intelligent mobile telephone. The ambition
was to make ITTP a standard for value added services in mobile networks.

During 1996 and 1997 Unwired Planet, Nokia, and others, launched additional
concepts in the area of value added services on mobile networks. Unwired Planet
presented Handheld Device Markup Language (HDML) and Handheld Device Transport
Protocol (HDTP). Just as HyperText Markup Language (HTML) used on the WWW,
HDML is used for describing content and user interface, but optimised for wireless
Internet access from handheld devices with small displays and limited input facilities. In
the same manner HDTP could be considered to be a wireless equivalent of the standard
Internet HyperText Transport Protocol (HTTP), i.e. a lightweight protocol to perform
client/server transactions.
Page 3
Wireless Application Protocol

In March 1997 Nokia officially presented the Smart Messaging concept, an


Internet access service technology specially designed for handheld GSM devices. The
communication between the mobile user and the server containing Internet information
uses Short Message Service (SMS) and a markup language called Tagged Text Markup
Language (TTML). Just like HDML, this language is adapted for wireless
communication, i.e. narrowband connections. With a multitude of concepts there was a
substantial risk that the market could become fragmented, a development that neither of
the involved companies would benefit from. Therefore, the companies agreed upon
bringing forth a joint solution. WAP was born.

WAP Forum
On June 26 1997 Ericsson, Motorola, Nokia, and Unwired Planet took the
initiative to start a rapid creation of a standard for making advanced services within the
wireless domain, a reality. In December 1997 WAP Forum was formally created, and
after the release of the WAP 1.0 specifications in April 1998, WAP Forum membership
was opened to all. Today more than 90 companies are members of the WAP Forum.
Among these companies many of the world's leading terminal and infrastructure
manufacturers, software companies, operators, and service providers are engaged. The
handset manufacturers in WAP Forum represent over 90% of the world market across all
technologies, and the network operators are representing about 100 million subscribers.
The main objectives of the WAP Forum are:

 Independent of wireless network standard


 Open to all
 Will be proposed to the appropriate standards bodies
 Applications scale across transport options (GSM, IS-95, IS-136, PDC, etc)
 Applications scale across device types (mobile phones, PDAs, etc)
 Extensible over time to new networks and transports (e.g. 3G systems)

WAP- The Wireless Service Enabler


The following sections discuss why the Internet is a suitable platform for wireless
value added services and the tight coupling between the Internet and WAP programming
models.

Why Using the Internet?


During the last couple of years we have become used to the wide variety of
services offered by the Internet and the WWW. Not only the services themselves attract
us, but also the convenient way of accessing them via an Internet browser. We can access
the same services all over the world as long as we have access to a computer and the
Internet. Nobody can deny that the Internet has scored a tremendous success; nearly 150
million users cannot be wrong.
Service providers do also benefit from the WWW paradigm since their services
can be deployed independent of the location of the users. The services are created and

Page 4
Wireless Application Protocol

stored on a server, meaning that it becomes very easy to change them according to the
needs of the customers. By using off-the-shelf authoring-tools services are created with
minimum effort which, combined with the fast and convenient way of launching them,
enables an extremely short time-to-market. The reduced service development time does
of course also imply reduced costs compared to conventional service development in
wireless networks. As users become more and more dependent on services offered by the
Internet, one shortcoming becomes increasingly evident - the need for a wire to get
connected to the Internet. This shortcoming makes itself actually felt by the millions of
users that spend a substantial amount of their time on the move.

The last few years' attempts to overcome this shortcoming has not made the
Internet crossing the chasm as a wireless service platform, only the early adopters has
accepted the technologies provided so far. One of the main reasons for this is the lack of a
widely accepted standard, a problem being addressed by the WAP Forum. The wide
support for WAP will most probably enable the Internet as a means to provide services to
wireless devices within a foreseeable future. This includes both services that we
recognise from the WWW, and services like telephony services. The two next sections
show how the Internet and WAP relate to each other.

1.2.2 The Internet Model


The Internet model makes it possible for a client to reach services on a large
number of origin servers; each addressed by a unique Uniform Resource Locator (URL).
The content stored on the servers is of various formats, but HTML is the predominant.
HTML provides the content developer with a means to describe the appearance of a
service in a flat document structure; i.e. the entire content of a page is shown
simultaneously. If more advanced features like procedural logic are needed, scripting
languages such as JavaScript or VB Script may be utilised.

As mentioned above, a resource on the Internet is identified by a unique URL,


that is, a text string constituting an address to that resource. In the example below, the
resource is an HTML document. On the Internet, standard communication protocols, like
HTTP and Transmission Control Protocol/Internet Protocol (TCP/IP) are used. The
content may be static or dynamic. Static content is produced once and not changed or
updated very often, for example a company presentation. Dynamic content is needed
when the information provided by the service changes more often, for example
timetables, news, stock quotes and account information. Technologies such as Active
Server Pages (ASP), Common Gateway Interface (CGI), and Servlets allow content to be
generated dynamically.

1.2.3 The WAP Model


WAP does also make use of the Internet paradigm to provide a flexible service
platform. In order to accommodate wireless access to the information space offered by
the WWW, WAP is based on well-known Internet technology that has been optimised to
meet the constraints of a wireless environment. Services created using HTML would not

Page 5
Wireless Application Protocol

fit very well on small handheld devices since they are intended for use on desktop
computers with big screens. Low bandwidth wireless bearers would neither be suitable
for delivering the rather extensive information that HTML pages often consist of.
Therefore a markup language adapted to these constraints has been developed - the
Wireless Markup Language (WML).

Wireless Markup Language WML offers a navigation model designed for devices
with small displays and limited input facilities (no mouse and limited keyboard). In order
to save valuable bandwidth in the wireless network, WML can be encoded into a compact
binary format. Encoding WML is one of the tasks performed by the WAP
Gateway/Proxy, which is the entity that connects the wireless domain with the Internet.
WAP does also provide a means for supporting more advanced tasks, comparable to
those solved by using for example JavaScript in HTML. The solution in WAP is called
WML Script. The Figure below shows the WAP programming model. Note the
similarities with the Internet model. Without the WAP Gateway/Proxy the two models
would have been practically identical.

Figure1.1

The observant reader may note that the request that is sent from the wireless client to the
WAP Gateway/Proxy uses the Wireless Session Protocol (WSP). In its essence, WSP is a
binary version of HTTP. WAP is designed to scale across a broad range of wireless
networks, like GSM, IS-95, IS-136 and PDC. Finally, the WAP protocol stack is
designed in a layered fashion, meaning that it becomes extensible and future proof.

1.2.4 Motivations for WAP


During recent years, both the Internet and wireless voice communication have
undergone wide and rapid acceptance. The unification of these two technologies, the
wireless Internet, has however not enjoyed the same development even though the
Internet provides a means for rapid service development, short time-to-market, ease-of-
use, and convenient manageability.

Why a new Standard?


A legitimate question is why the use of wireless data capabilities, in this context
wireless Internet access, has not followed the trends of neither the wireless voice

Page 6
Wireless Application Protocol

communication nor the Internet. Just as with many other things in life, expectations
matter very much. Anyone who has tried to access the Internet by using a laptop and a
cellular phone, knows that the expectations we have created by using the Internet at the
office or at home are not fulfilled; as a matter of fact it is usually a quite tiresome
experience. WAP addresses this issue by being designed to meet the constraints of a
wireless environment. Both limitations in the network and in the client are taken into
consideration. The following sections outline some of the motivations behind WAP, often
with parallels to existing Internet technology.

Adapting to the Bounds of the Wireless Network


WAP scales across a broad range of wireless networks and bearers. Hence it is
designed to allow access to services via the Internet using simple SMS as well as fast
packet-data networks such as General Packet Radio Service (GPRS). The most important
issues in the network addressed by WAP are summarised below:

Low Bandwidth:
The problem with poor performance when using wireless bearers with low
bandwidth becomes especially valid if the user is not well aware of what services to
access. This since the service must not consume much bandwidth if it should be suitable
for wireless access. The larger portions of the mass market, as well as many advanced
users, are not aware of this. And besides, the users should simply not have to care about
how the services they access are designed in order to have their expectations fulfilled.

WAP addresses this issue by minimising the traffic over the air-interface. WML
and WMLScript are binary encoded into a compact form when sent over the air in order
to minimise the number of bits and bytes. WSP, WAP's equivalent to HTTP on the
Internet, is also binary for the same reason. Moreover, it supports long-lived sessions,
that can be suspended and resumed, and header caching; saving valuable bandwidth since
session establishment can then be done rather seldom. The Wireless Transaction Protocol
WTP, the analogy to the Internet's TCP, is not only designed to minimise the amount of
data in each transaction, but also the number of transactions.

High Latency:
Wireless networks have high latency compared to wired networks. This constraint
is relevant in all of today's wireless networks, even for those providing high bandwidth.
This is addressed in WAP by minimising the roundtrips between the wireless device and
the wireless network. An asynchronous request/response model is also used. In wired
networks the low latency implies that requests and responses can be handled
synchronously since the time between them most often do not affect the user experience.
In wireless networks with high latency this is not a feasible approach, especially when
using high latency bearers like SMS. This issue is among other features addressed by
WSP by allowing requests and responses to be handled asynchronously, that is, a new
request can be sent before the response to an earlier request has been received.

Page 7
Wireless Application Protocol

The application environment in WAP uses the concept of scripting, meaning that
roundtrips between a client and a server can be avoided when it comes to e.g. validation
of user input. The Wireless Telephony Application environment addresses latency (and
low bandwidth) by introducing the repository, which is a persistent storage container
used for housing services that should be started in response to an event in the mobile
network (e.g. an incoming call). Since these services are available immediately, no
roundtrips to the WTA server are needed and thereby real-time handling is made
possible. Compared to TCP, WTP needs a smaller number of transactions for each
method invoked, i.e. keeps the number of roundtrips down.

Less Connection Stability/Unpredictable Bearer Availability: Wired network


access provides a more or less reliable connection to the network. That is not the case in
wireless networks where bearers might be inaccessible for shorter or longer periods of
time due to fading, lost radio coverage, or deficient capacity. As already mentioned, the
sessions supported by WSP are assumed to be long-lived. The problem mentioned above
is in WSP addressed by allowing lost sessions to be resumed, even when dynamically
assigned IP addresses are used.

The transaction layer in WAP, WTP, has been kept simple compared to TCP used
on the wired Internet. Since no connection is set up, the effects of lost bearer and times of
inactivity are minimised. The nature of a wireless connection implies that small segments
of a message often are lost. WTP supports selective retransmission of data, meaning that
only the lost segments are retransmitted, not the entire message as in TCP.

Adapting to the Bounds of the Wireless Device


WAP is targeted at hand-held devices of various kinds. Services should be
accessible from a Handheld PC as well as from a small phone. WAP addresses this fact
by taking the following issues into consideration:

Small Display:
When accessing a service from a desktop computer, the size of the screen does
not limit the user experience. Wireless devices might also have "big" displays, for
example a Personal Digital Assistant (PDA). But many devices will have smaller
displays, for example mobile phones, to provide larger portability. No matter how good
these displays will be in the future, the size of the human hand will always limit the size
of them. Try to imagine what the experience would be like when accessing a service
designed for a device with a big display on a small phone. The result would in most cases
be very bad performing services far from what was originally intended. The information
the user really wants would probably be drowned in undesired information due to the low
perspicuity that the small display of such a device offers.

Instead of using the flat document structure HTML provides, WML structures its
document in decks and cards. A card is a single unit of interaction with the end-user, for
instance a text-screen, a selection list, an input field, or a combination of them. A card is

Page 8
Wireless Application Protocol

typically small enough to be displayed even on a small screen. When a service is


executed the user navigates through a series of cards. The series of cards used for making
a service is collected in a deck.

Limited Input Facilities:


Wireless devices do most often not have the same input facilities as their wired
equivalents, that is, they lack QWERTY keyboards and have mouse-less interfaces.
WML addresses this issue as well. The elements that are used in WML can easily be
implemented so that they make very humble requirements on the keyboard. The use of
decks and cards provides a navigation model that calls for minimum inter-page
navigation since the user is guided trough a series of cards instead of having to scroll up
and down on a large page. Further, soft-buttons are supported by WML in order to
provide the service developer with a means to couple desired actions to vendor specific
keys.

Limited Memory and CPU:


Wireless devices are usually not equipped with amounts of memory and
computational power (CPU) comparable to desktop computers. The memory restriction is
valid for RAM as well as for ROM. Even though the trend indicates that more memory
and more powerful CPUs will be available in a foreseeable future, the relative difference
will most probably remain. WAP addresses these restrictions by defining a lightweight
protocol stack adapted to its purpose. The limited set of functionality provided by WML
and WMLScript makes it possible to implement browsers that make small claims on
computational power and ROM resources. When it comes to RAM, the binary encoding
of WML and WMLScript helps keeping the RAM as small as possible.

Limited Battery Power:


The stumbling block in wireless communication devices today is the operating
time, i.e. the battery power restricts its usage. Even though batteries become better and
better, and the radio interfaces are tuned to consume less power, there is still a lot to
accomplish in this area. Access to wireless services will increase the utilisation of bearers
(radio interface), and thus will the power consumption also increase. This issue is solved
by minimising the bandwidth needed (see above) and thus keeping the bearer utilisation
as low as possible.

1.2.5 Roles and Benefits


The operator that runs a mobile network traditionally controls almost the entire
value chain for mobile Value Added Services (VAS). Third party alliances are, if existing
at all, in most cases restricted to providing the operator with information that it can use as
a basis for serving its customers with mobile VAS. Typically, this information can be
weather information from the national meteorological office, or stock quote information
from a stockbroker. The network operator then conveys this information to the user,
either automatically or when the users make an explicit request for it.

Page 9
Wireless Application Protocol

This scenario will most probably change when WAP enters the scene. Using the
Internet as a service platform opens new possibilities for third party service providers to
take part of the value chain at different stages. Third party service providers will be able
to create WAP services, put them on the Internet, and thereby making them available to
millions of subscribers. They will even be able to create complete suites of services and
thus also affect the operator's role in bundling services. In co-operation with the operator,
third party providers can seize the opportunity to take part of service and access
provisioning as well.

However, this requires that they make certain investments in network technology.
The operators must make important decisions about their role in providing mobile VAS
when WAP is rolled out since the role of third party service providers is about to change
rather dramatically. With the magnitude of new services that WAP will make available,
network operators are unlikely to be able to serve all of its customers with self-made
services that attract each and every one of them.

Therefore they have to decide how they should position themselves in the value
chain, in order to be able to differentiate themselves from their competitors and have
flexibility enough to respond to new preferences among its customers and changes on the
market for mobile VAS in general.

No matter to what degree the operator decides to co-operate with third party
providers, it will still enjoys an increase in network utilisation, which of course will
increase the revenues. Third party co-operation should be considered in order to
maximise that utilisation and to provide a well-adapted mix of services that allows the
operator to differentiate itself from its competitors and attract new or underdeveloped
market segments. This will likely reduce churn and improve customer loyalty, and
thereby enable increased average revenue per user.

There is a possible risk of competition between the operator and third party
providers when it comes to providing services. This since there is no hindrance for either
of them to provide similar services. However, when services like telephony services are
considered, i.e. services that require some level of integration with the wireless network,
WAP provides the operator with a means to control how these services can be deployed.
The following sections outline how various groups may gain from WAP.

Subscribers
It is crucial that the subscribers will benefit from using WAP based services,
otherwise there will be no incentive neither for WAP as a whole nor for any of the other
groups mentioned below. The key-benefits can be summarised as:
 Portability
 Easy to use
 Access to a wide variety of services on a competitive market

Page 10
Wireless Application Protocol

 The possibility of having personalised services


 Fast, convenient, and efficient access to services
 To fulfil as many customer’s needs as possible, WAP devices will be available in
various form factors, e.g. pagers, handheld PCs, and phones

Operators
As described in the introduction to this chapter, the network operator can cover the
value chain to various degrees. Therefore, many of the advantages mentioned under
"Service Providers" are applicable to operators as well. The operator's benefits may
include:
 Address new market segments of mobile users by enabling a wider range of
mobile VAS
 Deploy telephony services that in contrast to traditional telephony services are
easy to create, update, and personalise
 Use the flexibility of WAP as a tool to differentiate from competitors
 Attractive interface to services will increase usage
 Increased revenues per user due to higher network utilisation
 Convenient service creation and maintenance, including short time-to-market
 Replace expensive customer care centres with WAP based services (E-care)
 WAP services are designed to be independent of the network, implying that an
operator who runs different types of networks only have to develop its services
once
 An open standard means that equipment will be provided by many manufacturers

Service Providers
WAP opens new possibilities for service and content providers since they not
necessarily have to come to an agreement with a specific operator about providing
services to their customers. The gains are for example:
 Create a service once; make it accessible on a broad range of wireless networks.
 Address new market segments by launching innovative mobile VAS.
 Keep old customers by adapting existing Internet services to WAP.
 Convenient service creation and maintenance.
 Creating a WAP service is no harder than creating an Internet service today since
WML and WMLScript are based on well-known Internet technology.
 Use standard tools like ASP or CGI to generate content dynamically.

Page 11
Wireless Application Protocol

 Utilise existing investments in databases etc that are the basis of existing Internet
services

Manufacturers
Mobile devices supporting WAP will be available in many different form factors, e.g.
cellular phones, pagers, and handheld PCs. Hardware manufacturers will also need to
supply operators etc with equipment, such as WAP Gateway/Proxys and WTA servers.
According to WAP Forum, there will be 10's of millions of WAP enabled devices by the
end of year 2000. Manufacturer benefits are for example:

 WAP scales across a broad range of mobile networks, meaning that WAP
implementations can be used in devices supporting different types of networks
 The expected wide adoption of WAP implies that economies of scales can be
achieved, meaning that the huge mass-market can be addressed
 The fact that WAP is designed to consume minimal amount of memory, and that
the use of proxy technology relieves the CPU, means that inexpensive
components can be used in the handsets
 Reuse the deep knowledge about wireless network infrastructure to develop
advanced servers that seamlessly integrates mobile VAS with telephony
 Seize the opportunity to introduce new innovative products

Tools Providers
Today there is a large amount of tools available for creating applications for the web.
Content developers have become used to the convenience that tools like FrontPage and
DreamWeaver provides. The knowledge of how to develop these tools may be leveraged
for developing tools supporting WAP as well. Tools providers will be able to:

 Reuse and modify existing products to support WAP, or even integrate WAP
support in existing tools
 Address a new customer base in the wireless community

1.2.6 Services using WAP


When using the Internet from a desktop computer, it is very easy to find new and
hopefully interesting services by using search engines, clicking on links and banners,
typing in URLs recommended by a friend, etc. This is primarily a fact due to the
attractive user-interface (a big screen, a full-sized keyboard, and a mouse). We simply sit
down and "surf the net"...

Page 12
Wireless Application Protocol

With WAP it is different. While we are on the move, we do not want to go and
look for the services we want. We just want the utility they provide, wherever we are.
This requires a mindset different to what we are used to from the WWW today. Instead of
using advanced search engines and full-fledged portal sites, users will most likely want
small portals providing access to the services they really are interested in, no matter if it
comes to business or pleasure. This will lead the way to new opportunities for companies
that either understand the customers’ needs very well, or can personalise such portal sites
to meet the demands of each and every customer.

So, what kind of services do users want? Of course, most of the services we are
used to today can be of interest in the wireless community as well. As indicated above,
the key to successfully launching these services is "utility". If the utility is not high
enough it is quite unlikely that the services will be widely used. However, one must
remember that the utility of, for example, a game might be very high in certain situations.
Do also keep in mind that simple-to-use services often are needed to open the door for
more advanced ones since the vast majority of the market is not very familiar even with
basic mobile value added services today.

Some examples of such services are:


 Banking
Account statements, paying bills, transfer money between accounts...
 Finance
Stock quotes, buy and sell stocks, interest rates, exchange rates...
 Shopping
Buy everyday commodities, books, records...
 Gambling
Lottery, horse-race betting, poker...
 Ticketing
Book and/or buy air tickets, cinema tickets, concert tickets...
 Weather
Weather forecasts, weather on other locations...

In addition, WAP enables a new category of services that we do not find on the Internet
today - telephony services. These services will not only bring utility to the user, which
she presumably is willing to pay for, they will also increase the operator's revenues due to
increased voice traffic if designed correctly. Examples are:

 Call management
A wide variety of services including:
¾ Incoming call selection Allow the user to choose how an incoming call should
be handled. Options could be: answer, reject, forward to assistant, forward to
voice mail, etc ¾ Multiparty Provide a comprehensive user interface to multiparty
Page 13
Wireless Application Protocol

call handling ¾ Call waiting Handle waiting calls with an attractive user interface
¾ Forwarding rules Set and view forwarding rules.
 Voice mail
Provide a menu driven user interface to existing voice mail systems
 Unified Messaging
Handle e-mail, faxes, voice mails, etc in a unified manner
 Enhanced support of legacy SMS services
Allows seamless migration from existing text based services into WAP
 Attractive interface to DTMF services
Increase usage of existing DTMF services by providing a better user interface
 Advanced phonebook management
Allows the user to update her phonebook, for example, download a corporate
phonebook or the personal phonebook managed via a common WWW browser on
a desktop computer.

In addition, operators will be able to drastically reduce their costs for customer care.
Today substantial amounts of money are spent on voice call centres, where people get
questions about their bill, features of a service, etc answered. Many operators have today
successfully launched WWW based customer care services as well, allowing the users to
access support data on-line. These services can also be designed to speed up the process
at traditional call centres by, for example, making the user fill out a questionnaire to pin
down the problem before the customer care operator is contacted. This approach however
does not solve the problem entirely since customers do not often have access to the
WWW when they are on the move, and hence they need to call the call centre anyway to
find help. With a WAP based customer care service the customers would be able to get
help whenever they want, without having to spend a substantial amount of time waiting
for their call to be answered.

WAP Forum is today conducting work in several areas that will facilitate mobile VAS,
such as persistent storage, use of smartcards, provisioning, external interfaces, billing,
data synchronisation, user-agent profiles, etc. Two areas that will have direct impact on
the services we will see in the future are push and telematics.

1.2.7 WAP- Internal Structure


Let us take a look at the internal structure of WAP; we will start by taking a look at the
definition of protocols and Layers.

Page 14
Wireless Application Protocol

Protocols
A protocol defines the type and the structure of messages that two devices have to use
when they are communication with each other.

Layers
The protocols are physically framed into layers, each protocol providing a specific
service to the next layer. One layer may provide methods to send bits down a physical
cable; another may supply methods to establish a connection. The set of layers that
compose the set of protocols is called protocol stack.

WAP Protocol Stack


To design WAP applications, there is no much knowledge of WAP stack is necessary,
because developing will be dealt with WML and WMLScript only.

Application Layer (WAE)

Session Layer (WSP)

Transaction Layer (WTP)

Security Layer (WTLS)

Transport Layer (WDP)

Bearers (SMS, CSO, USSD, CDMA, CDPD..)

Figure 1.2

The WAP stack in the above diagram has 5 different layers

 Application Layer: WAE (Wireless Application Environment) provides an


application environment intended for the development and execution of portable
applications and services.
 Session Layer: WSP (Wireless Session Protocol) supplies methods for the
organized exchange of content between client and server applications.
 Transaction Layer: WTP (Wireless Transaction Protocol) provides different
methods for performing transactions to a varying degree of reliability.

Page 15
Wireless Application Protocol

 Security Layer: WTLS (Wireless Transport Layer Security) is an optional


layer that provides, when present, authentication, privacy and secure connections
between applications.
 Transport Layer: WDP (Wireless Datagram Protocol) is the bottom layer of
the WAP stack, which shelters the upper layers from the bearer services offered
by the operator.

The WAP stack was derived from, and inherited most of the characteristics of the ISO
OSI reference model. The main difference between the two is the number of layers:
WAP has just five layers, while the OSI model has seven of them.

1.2.8 Wireless Application Environment (WAE)


This application layer of WAP provides an environment that includes all the
elements related to the development and execution of applications. The Wireless
Application Environment (WAE) allows the developer to specific formats and services,
created and optimized for presenting and interacting with limited capability devices.
WAE consists of different user agents located on the WTA user agent.

The main building blocks of the WAE are the following


 A lightweight markup language WML
 A lightweight scripting language: WMLScript
 An interface to local services and advanced telephony services: WTA

1.2.8.1 Wireless Markup Language – WML


WML has been designed mainly to display text-based pages. It is a tag based,
shares elements of HTML4 and HTML2 and is defined as an XML document type. Each
WML document is a single deck, which is made up of one or more cards. When the user
access a Wap site it sends back a deck; the user is shown the first card reads the content
possibly can enter some information and then moves to another card the choice of which
is dependent on the user’s actions the display is dependent on the browser.

WML has a wide range of features.

 Support for text: When including text in a card the programmer can use
emphasis elements line breaks and tables.

 Support for images: A new format has been created for displaying images,
called WBMP. Images compliant with this new standard are currently black and
white.
 User Input: Cards can contain input elements. The browser decodes inout tags
and then decides the best way to prompt the user for the input requested. WML
specifies tags for allowing the user to submit text entries, choose among a list of
options, and start a navigation or history management task.

Page 16
Wireless Application Protocol

 Variables: Variables can be included in the WML code, to keep track of hidden
information and to manipulate user input.

 Navigation and history stack: Common navigation and history functionalities


are included.

 International support: The WML character set is UNICODE, which uses


16bits to represent each character.

 Optimization for narrow-band: WML has been designed to adapt to the


high-latency and narrow-band characteristics of wireless networks. The
specifications say that connections with the origin server should be avoided unless
absolutely necessary

1.2.8.2 WML Script


WML script is a light weight procedural scripting language which is based on
ECMA script the standardized version of JAVA script it adds intelligence to the clients
providing a set of libraries for mathematical operations, field manipulation etc. In general
WML script supplies the programmer with :

 The capability of checking and validating the inputs submitted by the user
before it is sent to the server, thus preventing the transmission of invalid data
to the server.
 Access to the device facilities, such as the phonebook, calendar, and list of
messages (WTA)
 Methods of interacting to the user without the help of the content server, such
as methods for displaying error and warning messages.

Wireless Session Layer – (WSP)


The wireless session protocol enables services to exchange data between
applications in an organized way. It includes two different protocols:

 Connection oriented Session Services – operates over the wireless


transaction protocol (WTP)
 Connection Less Session Services - operates directly over the wireless
transport layer (WDP)

Session Services are those functionalities that help to setup a connection between a
client and a server. A service is delivered through the use of the primitives it

Page 17
Wireless Application Protocol

provides. Primitives are defined messages that a client send to a server to request a
service facility.

The Connection –oriented session service provides facilities used to manage a


session and to transmit reliable data between a client and a server.

The Connection less session service provides only not – confirmed services; In
particular only unreliable method invocation and unconfirmed push are available. In
this case client can use the request primitives and servers are only able to use the
indication primitive.

Wireless Transaction Layer (WTP)


The wireless transaction protocol provides services to accomplish reliable and non
reliable transaction and operates over the WDP layers are over the optional security layer,
WTLS. WTP, as all the other layers in WAP, is optimized to adapt to the small
bandwidth of the radio interface, trying to reduce the total amount of replayed transaction
between the client and server. In general three different classes of transaction services are
supplied to the upper layers:

 Unreliable requests
 Reliable requests
 Reliable request with one result message.

Wireless Transport Layer Security – WTLS


WTLS is the solution to the solution to the security issue, provided by WAP Forum.
WTLS is an optional layer and is based on TLS (Transport Layer Security) which is
based on SSL. WTLS operates over the transport layer. It provides services that ensure
privacy, server authentication, client authentication and data integrity.
o Privacy guarantees that the data sent between the server and the client is not
accessible to anyone else. No one can read the unencrypted message, although
they can see the encrypted message.
o Server authentication ensures that the server really is who it claims to be, and
that is not an imposter.
o Client authentication provides a way for the origin server to limit the access to
the content it provides. Just those subscribers that are recognized as trusted ones,
can gain access to the site.
o Data integrity takes care that no one can alter the content of the message being
transmitted between server and client without one of them noticing.

Wireless Datagram Protocol –WDP


WDP is a bottom layer of a WAP stack and is one of the elements that make WAP,
the extremely portable protocol that it is, operable on extremely different mobile
Page 18
Wireless Application Protocol

networks. WDP shields the upper layer from the bearer services provided by the
network, allowing the applications a transparent transmission of data over the different
bearers. Bearer services are the nitty-gritty of communication between the mobile phone
and base station. They include SMS, CSD, USSD, DECT and CDMA. The physical
layer prepares the data to be sent from the mobile device over the air interface, and sends
the data using the bearer service implementing in the network that the device is operating
in.

1.2.9 Wireless Application Environment Overview


The WAE architecture includes all elements of the WAP architecture related to
application specification and execution. At this point, the WAE architecture is
predominately focused on the client-side aspects of WAP's system architecture, namely
items relating to user agents. Specifically, the WAE architecture is defined primarily in
terms of networking schemes, content formats, programming languages and shared
services. Interfaces are not standardized and are specific to a particular implementation.
This approach allows WAE to be implemented in a variety of ways without
compromising interoperability or portability. This approach has worked particularly well
with a browser (a class of user agents) model such as that used in the World-Wide-Web
(WWW). The Internet and the WWW are the inspiration and motivation behind
significant parts of the WAE specification, and consequently, a similar approach is used
within WAE.

1.2.9.1 The WWW Model


The Internet's World Wide Web (WWW) provides a very flexible and powerful
logical model. Applications present content to a client in a set of standard data formats
that are browsed by client-side user agents known as Web browsers (or simply browsers).
Typically, a user agent sends requests for one or more named data objects (or content) to
an origin server. An origin server responds with the requested data expressed in one of
the standard formats known to the user agent (e.g., HTML)

Figure1.3

Page 19
Wireless Application Protocol

The WWW standards include all of the mechanisms necessary to build a general-purpose
environment:
 All resources on the WWW are named with Internet-standard Uniform Resource
Locators (URLs).
 All classes of data on the WWW are given a specific type allowing the user agent to
correctly distinguish and present them appropriately. Furthermore, browser user
agents. These include the Hypertext Mark-up Language (HTML), the JavaScript
scripting language and a large number of other formats (e.g., bitmap image formats).
 The WWW also defines a set of standard networking protocols allowing any browser
to communicate with any origin server. One of the most commonly used protocols on
the WWW today is the Hypertext Transport Protocol (HTTP).
The WWW infrastructure and model has allowed users to easily reach a large number of
third party content and applications. It has allowed authors to easily deliver content and
services to a large community of clients using various user agents (e.g., Netscape
Navigator ™ and Microsoft Internet Explorer ™.).

1.2.9.2 The WAE Model


WAE adopts a model that closely follows the WWW model. All content is
specified in formats that are similar to the standard Internet formats. Content is
transported using standard protocols in the WWW domain and an optimized HTTP-like
protocol in the wireless domain. WAE has borrowed from WWW standards including
authoring and publishing methods wherever possible. The WAE architecture allows all
content and services to be hosted on standard Web origin servers that can be incorporate
proven technologies (e.g., CGI). All content is located using WWW standard URLs.

WAE enhances some of the WWW standards in ways that reflect the device and
network characteristics. WAE extensions are added to support Mobile Network Services
such as Call Control and Messaging. Careful attention is paid to the memory and CPU
processing constraints that are found in mobile terminals. Support for low bandwidth and
high latency networks are included in the architecture as well.

WAE assumes the existence of gateway functionality responsible for encoding


and decoding data transferred from and to the mobile client. The purpose of encoding
content delivered to the client is to minimise the size of data sent to the client over-the-air
as well as to minimise the computational energy required by the client to process that
data. The gateway functionality can be added to origin servers or placed in dedicated
gateways as illustrated in Figure1.4.

Page 20
Wireless Application Protocol

Figure 1.4

 WAE User Agents:


Client-side in-device software that provides specific functionality (e.g., display content)
to the end-user. User agents (such as browsers) are integrated into the WAP architecture.
They interpret network content referenced by a URL. WAE includes user agents for the
two primary standard contents: encoded Wireless Markup Language (WML) and
compiled Wireless Markup Language Script (WMLScript.)
 Content Generators:
Applications (or services) on origin servers (e.g., servlets) that produce standard content
formats in response to requests from user agents in the mobile terminal. WAE does not
specify any standard content generators but expects that there will be a great variety
available running on typical HTTP origin servers commonly used in WWW today.
 Standard Content Encoding:
A set of well-defined content encoding, allowing a WAE user agent (e.g., a browser) to
conveniently navigate web content. Standard content encoding includes compressed
encoding for WML, bytecode encoding for WMLScript, standard image formats, a multi-
part container format and adopted business and calendar data formats.
 Wireless Telephony Applications (WTA):
A collection of telephony specific extensions for call and feature control mechanisms that
provide authors (and ultimately end-users) advanced Mobile Network Services.
The resulting WAE architecture fits within a model:
1. That leverages the Internet (i.e., the model takes advantage of standards,
technology and infrastructure developed for the Internet),

Page 21
Wireless Application Protocol

2. That leverages thin-client architecture advantages (e.g., service deployment has


significantly lower cost per device due to the device independent nature of WAE
and the centralised management of the services at the origin servers),
3. That provides end user advanced Mobile Network Services through Network
Operator controlled telephony value-added services,
4. That provides the means for vendors to build differentiating user-friendly services
that can take advantage of WWW and Mobile Network Services and
5. That provides an open extensible framework for building wireless services.
Typically, a user agent on the terminal initiates a request for content. However, not all
content delivered to the terminal will result from a terminal-side request. For example,
WTA includes mechanisms that allow origin servers to deliver generated content to the
terminal without a terminal's request.
In some cases, what the origin server delivers to the device may depend on the
characteristics of the device. The user agent characteristics are communicated to the
server via standard capability negotiation mechanisms that allows applications on the
origin server to determine characteristics of the mobile terminal device. WAE defines a
set of user agent capabilities that will be exchanged using WSP mechanisms. These
capabilities include such global device characteristics as WML version supported,
WMLScript version supported, floating-point support, image formats supported and so
on.
URL Naming
WAE architecture relies heavily on WWW's URL and HTTP semantics. WAE assumes:
 The existence of a generalised architecture for describing gateway
behaviour for different types of URLs and · support for connection to at
least one WAP gateways.
 In particular, the URL naming mechanisms used in WAE are motivated by
the following scenarios:
 A secure service (e.g., banking or brokerage), where an end-to-end secure
connection using WTLS [WTLS] is necessary mandating a secure
gateway controlled by the content provider.
 A content provider who wants to provide a caching gateway that will
cache the encoded content in order to improved performance.
 A specialised service with a built-in server that will be accessible only to
WAP devices and, therefore, wants to use WSP natively rather than incur
the higher overhead of processing HTTP sessions.

Page 22
Wireless Application Protocol

WAE is based on the architecture used for WWW proxy servers. The
situation where a user agent (e.g., a browser) must connect through a proxy to reach an
origin server (i.e., the server that contains the desired content) is very similar to the case
of a wireless device accessing a server through a gateway.
Most connections between the browser and the gateway use WSP, regardless
of the protocol of the destination server. The URL, used to distinguish the desired
content, always specifies the protocol used by the destination server regardless of the
protocol used by the browser to connect to the gateway. In other words, the URL refers
only to the destination server's protocol and has no bearing on what protocols may be
used in intervening connections.
In addition to performing protocol conversion by translating requests from
WSP into other protocols and the responses back into WSP, the gateway also performs
content conversion. This is analogous to HTML/HTTP proxies available on the Web
today. For example, when an HTTP proxy receives an FTP or Gopher directory list, it
converts the list into an HTML document that presents the information in a form
acceptable to the browser. This conversion is analogous to the encoding of content
destined to WAE user agents on mobile devices. Currently only one scheme is expected
to be supported by WAE user agents:
1. http: The browser, in this case, communicates with the gateway using WSP. The
gateway in turn would provide protocol conversion functions to connect to an
HTTP origin server.
As an example, a user, with a WAP-compliant telephone, requests content using a
specific URL. The telephone browser connects to the operator-controlled gateway with
WSP and sends a GET request with that URL. The gateway resolves the host address
specified by the URL and creates an HTTP session to that host. The gateway performs a
request for the content specified by the URL. The HTTP server at the contacted host
processes the request and sends a reply (e.g., the requested content). The gateway
receives the content, encodes it, and returns it to the browser.

1.2.9.3 Components of WAE


As illustrated in Figure1.5, WAE is divided into two logical layers:
1. User agents, which includes such items as browsers, phonebooks, message
editors, etc; and
2. Services and Formats, which include common elements and formats accessible to
user agents such as WML,
WMLScript, image formats, vCard and vCalendar formats, etc.
WAE separates services from user agents and assumes an environment with multiple user
agents. This logical view, however, does not imply or suggest an implementation. For
Page 23
Wireless Application Protocol

example, WAE implementations may choose to combine all the services into a single
user agent. Others, on the other hand, may choose to distribute the services among
several user agents. The resulting structure of a WAE implementation is determined by
the design decisions of its implementers and should be guided by the specific constraints
and objectives of the target environment.

Figure 1.5
WAE User Agents
The WML user agent 3 is a fundamental user agent of the WAE. However, WAE
is not limited to a WML user agent. WAE allows the integration of domain-specific user
agents with varying architectures and environments. In particular, a Wireless Telephony
Application (WTA) user agent has been specified as an extension to the WAE
specification for the mobile telephony environments. The WTA extensions allow authors
to access and interact with mobile telephone features (e.g., call control) as well as other
applications assumed on the telephones, such as phonebooks and calendar applications.
WAE does not formally specify any user agent. Features and capabilities of a user agent
are left to the implementers. Instead, WAE only defines fundamental services and
formats that are needed to ensure interoperability among implementations. An overview
of those services and formats is included in subsequent sections.

WAE Services and Formats


The WAE Services and Formats layer includes the bulk of technical contribution
of the WAE effort. The following section provides an overview of the major components
of WAE including the Wireless Markup Language (WML), the Wireless Markup
Scripting language (WMLScript), WAE applications and WAE supported content
formats.

Page 24
Wireless Application Protocol

WML is a tag-based document language. In particular, it is an application of a


generalised mark-up language. WML shares a heritage with the WWW's HTML
[HTML4] and Handheld Device Markup Language [HDML2]. WML is specified as an
XML [XML] document type. It is optimised for specifying presentation and user
interaction on limited capability devices such as telephones and other wireless mobile
terminals.

WML and its supporting environment were designed with certain small narrow-
band device constraints in mind including small displays, limited user-input facilities,
narrow band network connections, limited memory resources and limited computational
resources. Given the wide and varying range of terminals targeted by WAP, considerable
effort was put into the proper distribution of presentation responsibility between the
author and the browser implementation.

WML is based on a subset of HDML version 2.0 [HDML2]. WML changes some
elements adopted from HDML and introduces new elements, some of which have been
modelled on similar elements in HTML. The resulting WML implements a card and deck
metaphor. It contains constructs allowing the application to specify documents made up
of multiple cards. An interaction with the user is described in a set of cards, which can be
grouped together into a document (commonly referred to as a deck). Logically, a user
navigates through a set of WML cards. The user navigates to a card, reviews its contents,
may enter requested information, may make choices, and then moves on to another card.
Instructions imbedded within cards may invoke services on origin servers as needed by
the particular interaction. Decks are fetched from origin servers as needed. WML decks
can be stored in 'static' files on an origin server, or they can be dynamically generated by
a content generator running on an origin server. Each card, in a deck, contains a
specification for a particular user interaction.
WML is specified in a way that allows presentation on a wide variety of
devices yet allows for vendors to incorporate their own MMIs. For example, WML does
not specify how implementations request input from a user. Instead, WML specifies the
intent in an abstract manner. This allows WML to be implemented on a wide variety of
input devices and mechanisms. Implementations may, for example, choose to solicit user
input visually like many WWW user agents, or it may choose to use a voice-based
interface. The user agent must decide how to best present all elements within a card
depending on the device capabilities. For example, certain user agents on devices with
larger displays may choose to present all the information in a single card at once. Others,
on the other hand, with smaller displays may break the content up across several units of
displays. WML has a wide variety of features, including:
1. Support for Text and Images
WML provides the authors with means to specify text and images to be presented
to the user. This may include layout and presentation hints. As with other mark-up
languages, WML requires the author to specify the presentation in very general terms and
Page 25
Wireless Application Protocol

gives the user agent a great deal of freedom to determine exactly how the information is
presented to the end user. WML provides a set of text mark-up elements including
various emphasis elements (e.g., bold, italic, big, etc.); various line breaks models (e.g.,
line wrapping, line wrapping suppression, etc.); and tab columns that supports simple
tabbing alignment.
2. Support for User Input
WML supports several elements to solicit user input. The elements can be
combined into one or more cards. All requests for user input are made in abstract terms,
allowing the user agent the freedom to optimise features for the particular device. WML
includes a small set of input controls. For example, WML includes a text entry control
that supports text and password entry. Text entry fields can be masked preventing the end
user from entering incorrect character types. WML also supports client-side validation by
allowing the author to invoke scripts at appropriate times to check the user's input. WML
includes an option selection control that allows the author to present the user with a list of
options that can set data, navigate among cards, or invoke scripts. WML supports both
single and multiple option selections. WML also includes task invocation controls. When
activated, these controls initiate a navigation or a history management task such as
traversing a link to another card (or script) or popping the current card off of the history
stack. The user agent is free to choose how to present these controls. It may for example,
bind them to physical keys on the device, render button controls in a particular region of
the screen (or inline within the text), bind them to voice commands, etc.
3. Navigation and History Stack
WML allows several navigation mechanisms using URLs. It also exposes a first-
class history mechanism. Navigation includes HTML-style hyperlinks, inter-card
navigation elements, as well as history navigation elements.

International Support
The document character set for WML is the Universal Character Set of ISO/IEC-
10646 ([ISO10646]). Currently, this character set is identical to Unicode 2.0
[UNICODE]. There is no requirement that WML decks be encoded using the full
Unicode encoding (e.g., UCS-4). Any character encoding ("charset") that contains a
proper subset of the logical characters in Unicode may be used (e.g., US-ASCII, ISO-
8859-1, UTF-8, Shift_JIS, etc.).

MMI Independence
WML's abstract specification of layout and presentation enables terminal and
device vendors to control the MMI design for their particular products.

Narrow-band Optimisation

Page 26
Wireless Application Protocol

WML includes a variety of technologies to optimise communication on a narrow-


band device. This includes the ability to specify multiple user interactions (cards) in one
network transfer (a deck). It also includes a variety of state management facilities that
minimise the need for origin server requests. WML includes other mechanisms to help
improve response time and minimise the amount of data exchanged over-the-air. For
example, WML allows the author to parameterise (or pass variables to) a subsequent
context. It supports variable substitution and provides out-of-band mechanisms for client-
side variable passing without having to alter URLs. The out-of-band passing of variables
without changing the way URLs appear attempts to improve client-side cache hits.
State and Context Management
WML exposes a flat context (i.e., a linear non-nested context) to the author. Each WML
input control can introduce variables. The state of the variables can be used to modify the
contents of a parameterised card without having to communicate with the server.
Furthermore, the lifetime of a variable state can last longer than a single deck and can be
shared across multiple decks without having to use a server to save intermediate state
between deck invocations.

1.2.9.4 WMLScript
WMLScript is a lightweight procedural scripting language. It enhances the
standard browsing and presentation facilities of WML with behavioural capabilities,
supports more advanced UI behaviour, adds intelligence to the client, provides a
convenient mechanism to access the device and its peripherals, and reduces the need for
round-trips to the origin server.
WMLScript is loosely based on a subset of the JavaScript WWW scripting
language. It is an extended subset of JavaScript™ and forms a standard means for adding
procedural logic to WML decks. WMLScript refines JavaScript for the narrow-band
device, integrates it with WML, and provides hooks for integrating future services and in-
device applications.
WMLScript provides the application programmer with a variety of interesting
capabilities:
1. The ability to check the validity of user input before it is sent to the content
server.
2. The ability to access device facilities and peripherals.
3. The ability to interact with the user without introducing round-trips to the
origin server (e.g., display an error message).
Key WMLScript features include:
1. JavaScript -based scripting language:
WMLScript starts with an industry standard solution and adapts it to the narrow-band
environment. This makes WMLScript very easy for a developer to learn and use.
Page 27
Wireless Application Protocol

2. Procedural Logic:
WMLScript adds the power of procedural logic to WAE.
Event-based:
WMLScript may be invoked in response to certain user or environmental events.
Compiled implementation:
WMLScript can be compiled down to a more space efficient bytecode that is transported
to the client.
Integrated into WAE:
WMLScript is fully integrated with the WML browser. This allows the author to
construct their services using both technologies, using the most appropriate solution for
the task at hand 5. WMLScript has access to the WML state model and can set and get
WML variables. This enables a variety of functionality (e.g., validation of user input
collected by a WML card).
International Support
WMLScript source text is represented as a sequence of characters representable using the
Universal Character set of ISO/IEC-10646 ([ISO10646]). Currently, this character set is
identical to Unicode 2.0 ([UNICODE]). There is no requirement that WMLScript
documents be encoded using the full Unicode encoding (e.g. UCS-4). Any character
encoding ("charset") that contains an inclusive subset of the characters in Unicode may
be used (e.g. US-ASCII, ISO-8859-1, Shift_JIS, etc.).
Efficient extensible library support:
WMLScript can be used to expose and extend device functionality without changes to the
device software.
One objective in designing the WMLScript language was to be close to core
JavaScript™. In particular, WMLScript was based on the ECMA-262 Standard
"ECMAScript Language Specification". The originating technologies for the ECMA
Standard include many technologies most notably JavaScript™ and JScript™.
WMLScript is not fully compliant with ECMAScript. The standard has been used only as
the basis for defining WMLScript language. The resulting WMLScript is a weakly typed
language. Variables in the language are not formally typed in that a variable's type may
change throughout the lifecycle of the variable depending on the data it contains. The
following basic data types are supported: boolean, integer, floating-point, string and
invalid. WMLScript attempts to automatically convert between the different types as
needed. In additions, support for floating-point data types may vary depending on the
capabilities of the target device. WMLScript supports several categories of operations
such as assignment operations, arithmetic operations, logical operations and comparison
operations. WMLScript supports several categories of functions including Local script

Page 28
Wireless Application Protocol

functions (i.e., script functions defined inside the same script that the calling expression is
in), External script functions (i.e., script functions defined in another script not containing
the calling expression) and Standard library functions (i.e., functions defined in a library
that is part of the WAE specification.) WMLScript defines several standard libraries
including a language library, a string library, a browser library, a floating point library
and a dialog library.
URLs
WAE assumes a rich set of URL services that user agents can use. In particular, WAE
relies heavily on HTTP and HTML URL semantics. In some cases, WAE components
extend the URL semantics, such as in WML, where URL fragments has been extended to
allow linking to particular WMLScript functions.

1.2.9.5 WAE Content Formats


WAE includes a set of agreed upon content formats that facilitate interoperable
data exchange. The method of exchange depends on the data and the targeted WAE user
agents. The two most important formats defined in WAE are the encoded WML and the
WMLScript bytecode formats. WAE defines WML and WMLScript encoding formats
that make transmission of WML and WMLScript more efficient as well as minimises the
computational efforts needed on the client. In addition, WAE defines and adopts other
formats for data types including:
Images:
WAE assumes visual environments that support images will support several
image formats. The selection of formats was an attempt to meet several competing
requirements including: support of multiple choices of pixel depth, support of colorspace
tables, small encoding, very low CPU and RAM decoding and presentation demands and
availability of common tools and other developer support.
Multipart Messages:
WAE leverages a multipart-encoding scheme optimised for exchanging multiple typed
content over WSP.
User Agent-Specific Formats:
WAE adopts two additional content formats specific to exchanging data among user
agents suitable for both client-server communication and peer- to-peer communication:
electronic business cards (vCard.2.1) and electronic calendaring and scheduling exchange
format (vCalendar 1.0) specified by the IMC.

Page 29
Wireless Application Protocol

WML and WMLScript Exchanges


The following figure, Figure1.6, presents the different parts of the logical architecture
assumed by a WML user agent:

Figure 1.6

Origin servers provide application services to the end user. The service
interaction between the end user and the origin server is packaged as standard WML
decks and scripts. Services may rely on decks and scripts that are statically stored on the
origin server, or they may rely on content produced dynamically by an application on the
origin servers.
Several stages are involved when origin servers and WML user agents
exchange WML and WMLScript. In particular, a user, wishing to access a particular
service from an origin server, submits a request to the origin server using a WML user
agent. The user agent requests the service from the origin server on behalf of the user
using some URL scheme operation (e.g., HTTP GET request method.)

The origin server honouring the user's request replies by sending back a single deck.
Presumably this deck is initially in a textual format. On their way back to the client,
textual decks are expected to pass through a gateway where they are converted into
formats better suited for over-the-air transmission and limited device processing. In
principle, once the gateway receives the deck from the origin server, the gateway does all
the necessary conversions between the textual and binary formats. A WML encoder (or
tokeniser) in the gateway converts each WML deck into its binary format.
Encoded content is then sent to the client to be displayed and interpreted.
Some optimisation may be done at the gateway based on any negotiated features with the
client. The user agent may submit one or more additional requests (using some URL
scheme) for WMLScript as the user agent encounters references to them in a WML deck.
On its way back, a WMLScript compiler takes the script as input and compiles it into
Page 30
Wireless Application Protocol

bytecode that is designed for low bandwidth and thin mobile clients. The compiled
bytecode is then sent to the client for interpretation and execution.

The existence of a gateway is not mandatory as illustrated in Figure1.7. In


particular, the location where the actual encoding and compilation is done is not of
particular concern to WAE. It is conceivable that some origin servers will have built-in
WML encoders and WMLScript compilers. It may also be possible, in certain cases, to
statically store (or cache) particular services in tokenised WML and WMLScript
bytecode formats eliminating the need to perform any on-the-fly conversion of the deck.

Figure 1.7

Internationalisation
The WAE architecture is designed to support mobile terminals and network
applications using a variety of languages and character sets. This work is collectively
described as internationalisation (referred to as I18N). It is a design goal of WAE to be
fully global in its nature in that it supports any language.
WAE models a significant amount of its I18N architecture based on WWW and, in
particular, on SGML and HTTP technologies. For example, it is assumed that HTTP
headers are used to specify the current character encoding and language of any content
delivered to the user agent.
The WAE architecture makes the following assumptions regarding I18N:
1. WAE user agents will have a current language and will accept content in a set
of well-known character encoding sets.
2. Origin server-side applications can emit content in one or more encoding set
and can accept input from the user agent in one or more encoding set.

Page 31
Wireless Application Protocol

WAE has adopted the [ISO10646] (Unicode 2.0) standard as the basis for all character
data. Unicode contains the majority of the characters and symbols present in human
languages and is widely supported in the Internet community.
WAE does not mandate which character encoding a user agent must support.
Most components of WAE contain I18N-specific support.
Security and Access Control
WAE leverages WTLS where services require authenticated and/or secure exchanges. In
addition, both WML and WMLScript include access control constructs that communicate
to the client URL-based access restrictions. In particular, the constructs allow the authors
of WML decks and WMLScript to grant public access to the content (i.e., the deck or
script can be referenced from other content) or restrict access to the content to set of
"trusted" decks or scripts. WAE also supports HTTP 1.1 basic authentication where a
server can authenticate the client based on a username and password.

1.2.10 WTA Architecture Overview


WTA is a collection of telephony specific extensions for call and feature control
mechanisms that make advanced Mobile Network Services available to authors and end-
users. WTA merges the features and services of data networks with the services of voice
networks. It introduces mechanisms that ensure secure access to important resources
within mobile devices. The WTA framework allows real-time processing of events
important to the end-user while browsing. Within the WTA framework, the client and
server co-ordinate the set of rules that govern event handling via an event table.
The Wireless Telephony Application Framework has four main goals:
 Enable Network Operators to provide advanced telephony services that are
well integrated and have consistent user interfaces.
 Enable Network Operators to create customized content to increase demands
and accessibility for various services in their Networks.
 Enable Network Operators to reach a wider range of devices by leveraging
generic WAE features that allow the operator to create content independent of
device specific characteristics and environments.
 Enable third party developers to create network-independent content that
access basic features (i.e., non-privileged).
Most of the WTA functionality is reserved for the Network Operators, as in-depth
knowledge and access to the mobile network are needed to fully take advantage of the
mobile network's features. Nevertheless, a limited set of basic WTA functions, such as
initiating phone calls, is available to all WTA experts.

Page 32
Wireless Application Protocol

WTA Framework Components


The following sections describe the key components of the WTA framework.
WTA Libraries
WTA exposes its services to content authors as a set of libraries and interfaces.
WTA functionality is divided across several libraries according to its sensitivity and
applicability. WTA defines three classes of WTA services:
Common Network Services
WTA services that are available independent of network type. They are common
to all networks (e.g., answering an incoming call.) Access to these services is restricted to
content running within a WTA user agent.
Network Specific Services
WTA services that target a specific type of network. These services are
extensions to Common Network Services that expose unique and common features of a
particular type of network (e.g., IS-136 includes a Send Flash service.) Like Common
Network Services, these services are restricted to content running in a WTA user agent.
Public Services
WTA services are available to any anonymous or third party content (e.g., initiate
call set-up.) There are no access restrictions on such services. Any user agent is free to
access Public Services. Classifying and separating services enables secure and reliable
execution of content. It limits functions available to authors and developers at-large.
Access to WTA services can be done directly from either the WML language, using the
WTAI URL scheme or from WMLScript functions by calling WTAI library functions.
WTA URL Scheme
WTA introduces a URL scheme that allows authors to invoke library services.
The services may reside on the device or may be delegated to a server. Using this
scheme, authors can pass data to a service and receive data back from the services
without having to leave the current browsing context.
WTA Event Handling
The WTA framework provides a variety of means for authors to deal with
telephony-based events in real-time and pseudo-real-time manners. Fundamentally,
telephony-based events can be sent to the WTA agent along with any required event-
specific parameters and content. This allows Network Operator to deploy content (e.g.,
decks) with call control and network event handling aspects. Clients can maintain event
tables that describe how a user agent should deal with incoming events. This event table
is co-ordinated with a WTA origin server controlled by the network operator.

Page 33
Wireless Application Protocol

For the most part, content sent with the event (or content already residing on the
client) will be sufficient to handle most events. However, the framework does not prevent
more advanced scenarios that require additional content to be retrieved from an origin
server based on end-user demand. How a Network Operator chooses to handle events
depends largely on the type of events, reliability and latency requirements and quality
desired.
WTA Network Security
The Operator is assumed to have control as to what resources are made accessible
to any anonymous or third party content in both the mobile network and the client. The
integrity of the mobile network and the client are enforced because of a restricted WTA
content delivery. In particular, content with privileged WTA services can only be
executed when it is delivered to the WTA user agent through a dedicated WTA port
running WTLS protocols. This allows network operators to use standard network security
elements to protect their networks. For example, origin servers, delivering content, can be
identified, by the operator, as either trusted WTA content servers that are under the
control of the device's operator, or as entrusted third party content servers, which may
include any public origin server on the Internet. Network operators can then use standard
firewall technologies to regulate access to a mobile's ports. Port access, can then be used
to determine the credentials given to content, which determines its access privileges to
WTA services in both the network and the client.
Telephony-Specific Exchanges
WTA user agents, defined by WAE as telephony-specific extensions, use similar
exchange constructs as a WML user agent. However, WTA user agents rely on additional
and extended interactions needed to deliver meaningful telephony-based services.
The elements of the logical WTA network, presented in the following figure, are:
 Content and Content Generators
 Firewalls (optional)
 Mobile Switching Framework
WTA Origin Server

Page 34
Wireless Application Protocol

Figure 1.8

The WTA user agent is connected to the mobile network using dedicated
signalling connections. The WTA Server (an origin server) communicates with the client
using the WAP protocol stack. The WTA server may be connected to the mobile network
and is responsible for deploying content to its clients. In the case of call handling, for
example, the mobile network sets up the call to the client, the server delivers the event-
handling content, and the user agent invokes the event-handler content and manages the
presentation of the call handling service to the user.
The WTA user agent is a content interpreter that extends a typical WML user
agent. It supports extended libraries and executes WML decks and WMLScript similar to
a WML user agent. However, unlike a typical WML user agent, the WTA user agent has
a very rigid and real-time context management component. For example, the user agent
drops outdated (or stale) events, does not place intermediate results on the history stack,
and typically terminates after the event is handled.
WTA Origin Servers
The WTA Origin Server is assumed to be under the control of the Network
Operator and is therefore to be regarded as a "Trusted Content Server". The operator's
server is assumed to control, in varying degrees, the Mobile Network Switch. The success
of the WTA content (e.g., handling Call Control) is, to some extent, dependent on the
operator's ability to access and control the features and characteristics of the Mobile
Network.
The operator has information about latency, capacity and reliability for the different
bearers in the Mobile Network. Since the operator is able to provide the WTA services
without needing to rely on the Internet, the operator can have. More control over the
Page 35
Wireless Application Protocol

behaviour of the services than a third party service provider can, and can better optimise
their services to achieve good real-time characteristics.
Third Party Origin Servers
Content from third party providers does not handle any extensive set of WTA functions.
Developing advanced WTA applications requires, in most cases, in-depth knowledge of
the mobile network. Due to the limitations imposed by the operator as to which third
party is granted access to the mobile network resources and WTA services, third party
content providers are limited to handling WAE content using the subscriber's standard
WML user agent.

Mobile Network
The network operator controls the mobile network. The mobile network
handles switching and call set-up to the mobile subscribers (or terminals). The mobile
network connects with the client using in-band or out-of-band signaling connections. The
mobile network-to-client signaling is exposed to the content running in a user agent using
WTA network events. Even though the mobile network-to-client messaging uses
network-level system-specific signaling, at the content level, signaling is converted to
more generic and abstract WTA network events.
Although the mobile network is involved in the execution of the WTA network
services, operations and services in the mobile network are not within the scope of the
WAP effort. WTA services only make assumptions on the availability of basic network
features like call set-up, call accept, etc. Call control features in the mobile network are
made available to the WTA user agent through the device's WTA interface.
]
Terminology
Bytecode – Content encoding where the content is typically a set of low-level opcodes
(i.e., instructions) and operands for a targeted hardware (or virtual) machine.
Client - A device (or application) that initiates a request for connection with a server.
Client Server Communication – Communication between a client and a server.
Typically the server performs a task (such as generating content) on behalf of the client.
Results of the task are usually sent back to the client (e.g., generated content.)
Content - synonym for data objects.
Content Encoding – When used as a verb, content encoding indicates the act of
converting a data object from one format to another. Typically the resulting format
requires less physical space than the original, is easier to process or store, and/or is
encrypted. When used as a noun, content encoding specifies a particular format or
encoding standard or process.
Content Format - actual representation of content.

Page 36
Wireless Application Protocol

Content Generator – a service that generates or formats content. Typically content


generators are on origin servers.
Device – a network entity that is capable of sending and receiving packets of information
and has a unique device address.
A device can act as both a client and a server within a given context or across multiple
contexts. For example, a device can service a number of clients (as a server) while being
a client to another server.
Origin Server - the server on which a given resource resides or is to be created. Often
referred to as a web server or an HTTP server.
Resource - A network data object or service that can be identified by a URL. Resources
may be available in multiple representations (e.g., multiple languages, data formats, size,
and resolutions) or vary in other ways.
Server - a device (or application) that passively waits for connection requests from one
or more clients. A server may accept or reject a connection request from a client.
Terminal - a device typically used by a user to request and receiving information. Also
called a mobile terminal or mobile station.
User - a user is a person who interacts with a user agent to view, hear, or otherwise use a
resource.
User Agent - a user agent is any software or device that interprets WML, WMLScript or
other content. This may include textual browsers, voice browsers, search engines, etc.
WML - The Wireless Markup Language is a Hypertext Markup language used to
represent information for delivery to a narrowband device, e.g., a phone.
WMLScript - A scripting language used to program the mobile device. WMLScript is an
extended subset of the JavaScript scripting language.
XML - the Extensible Markup Language is a World Wide Web Consortium (W3C)
proposed standard for Internet Markup languages, of which WML is one such language.
XML is a restricted subset of SGML.

WAE Specification
The following sections provide a specification for the core components of
Wireless Application Environment (WAE), including the Wireless Markup Language
(WML), the Wireless Markup Scripting language (WMLScript), WAE User Agents and
WAE supported media types.
General WAE Features
Session Layer Interface

Page 37
Wireless Application Protocol

The WML and the Wireless Telephony Application (WTA) user agents communicate
using the Wireless session Protocol (WSP) over one or more WSP sessions per user
agent. This network communication is in the form of WSP/HTTP 1.1 headers and
content. The WSP session is created and controlled by the Session Management Entity.
The Session Management Entity is not defined within the WAP specification framework,
and is implementation specific.
URL Schemes
The following standard URL scheme is defined for WAP User Agents:
http: This scheme identifies a particular URL syntax suitable for naming resources stored
on HTTP origin servers (see [RFC2396]). The specification of an http scheme does not
imply the use of a particular communication protocol between a phone and network
gateway. The origin server specified by the URL may be accessed via a WSP-to-HTTP
gateway (or proxy). Alternatively, the URL may specify a network server, which
combines the function of WSP gateway and origin server into one entity. In this case, the
resource is accessed directly across the WSP protocol.
Additional, non-standard URL schemes are defined to access client/terminal specific
content within the WTAI specification. Since these schemes are specific to a particular
WAE user agent, they are not included in this section.
User Agent Characteristics
In order to optimise the WAE client-server model, a number of characteristics are sent
from the user agent to the WAP origin server. These characteristics allow the origin
server to avoid sending inappropriate content to the user agent. They also provide the
server and gateway with a means of customising the response for a particular user agent.
The WSP layer provides typed data transfer for the WAE layer (see reference [WSP]).
The WSP/HTTP 1.1 content headers are used to perform content negotiation and define
character set encoding and language settings.
The origin server or WAP gateway may need or want to modify responses based on
characteristics of the user agent. For each WAP-defined media type included in the
WSP/HTTP Accept header, the user agent should include a parameter, named uaprof,
specifying the URI for a profile specifying the user agent characteristics. The syntax and
semantics of this profile will be specified in a separate document.
An example of an Accept header would be:
Accept:
application/x-wap.wmlc;uaprof=http://www.vendor.com/phone1,application/x-
wap.wmlscriptc;uaprof=http://www.vendor.com/phone1, text/x-vcard, text/x-vcal.
For WAP-defined media types, the uaprof parameter, combined with the WSP/ HTTP
Accept, Accept-Language and Accept-Charset headers, should completely describe all

Page 38
Wireless Application Protocol

negotiable characteristics of the content. The combination of these three items henceforth
is collectively referred to as the "characteristic headers."
Gateways which receive a request using characteristic headers must preserve the headers
in any requests to origin servers on behalf of that user agent, and also insert the uaprof
parameter on any media types that will be converted into a type specified with the
parameter. For example, if the user agent's Accept header specifies that it accepts
application/x-wap. wmlc and a gateway requests media of type text/x-wap.wml from an
origin server, then the gateway must copy the user agent's uaprof parameter to its Accept
header.
Some gateways may cache content received from origin servers. If a user agent requests
content that a gateway has cached and the request contains characteristic headers, the
gateway must not provide cached content to a user agent unless at least one of the three
following conditions is true:
1. The characteristic headers specified in the request are identical to the ones used
when the gateway initially retrieved the content.
2. The characteristic headers specified in the request are identical to the ones used
when the gateway initially retrieved the content except for the uaprof parameter,
and the profile specified by the URI in the uaprof header is semantically
equivalent to the profile specified by the URI in the uaprof header of the request
when the gateway initially retrieved the content.
3. The gateway was able to guarantee through other mechanisms (e.g., analysis of
HTTP metadata) that a new request to the origin server using the user agent's
Accept header would result in the same content that the gateway has cached.

WAE User Agents


The WML User Agent is a fundamental component of the WAE. However, WAE is not
limited to WML user Agents. WAE allows the integration of domain specific user agents
with varying architectures and environments. In particular, a WTA (Wireless Telephony
Application) User Agent and a WTAI (Wireless Telephony Application Interface)
programming interface have been specified as part of the WAE specification for the
mobile telephony environment. The WTAI functions allow authors to access and interact
with mobile phone features (e.g., call control) as well as other user agents such as phone
book user agents not specified by WAE.

WTA User Agent


[WTA] specifies an application framework for telephony services. This framework relies
on a dedicated WTA User Agent.

Page 39
Wireless Application Protocol

The WTA user agent extends a WML User Agent by adding capabilities for interfacing
with mobile network services, which interacts with the defined WTA framework
components. These components are:
 a persistent storage mechanism, the Repository, for storing content that
executes WTA services in the client,
 an event handling mechanism for providing network event (e.g. incoming call)
driven services,
 and an interface to local, telephony related functions (e.g. set up call, access to
phonebook) in the client.
The generic interface to the telephony-related functions, applicable to all known
mobile networks, is specified as the Wireless Telephony Application Interface [WTAI].
A part of this interface is also referred to as public WTAI, to be used by non-WTA User
Agents. Added to this specification are a number of network specific interfaces that are
not applicable to all networks, but can be used for a limited number of networks.

WML User Agent


The WML User Agent is not fully specified as part of the WAP Standards
specification. A number of requirements and guidelines are provided as part of the WML
language specification and the WMLScript language specification.

WAE Media Types


WAE specifies or adopts a number of content formats that facilitate inter-operable
exchange of data. The most important formats are the encoded WML and the WMLScript
bytecode formats. The encoding of WML and WMLScript makes transmission of WML
and WMLScript more efficient and minimises the computational efforts needed to
execute them on the client.
A user agent in WAE handles pushed content based on its content type. Each
content type specifies both data structure and its semantics and the user agent is
responsible for interpreting the content according to the rules specified for each content
type.
If neither the definition of the content type itself nor the user agent specify
any particular push behaviour for that content type, the device SHOULD NOT take any
other actions than discarding the content or placing it in cache. In particular this applies
to WML and WML Script pushed to the WML user agent.
WAE adopts an additional class of media types to facilitate the exchange of data
objects between client and server or between two clients. These are currently limited to
electronic business cards and electronic calendar objects.

Page 40
Wireless Application Protocol

Such objects may be exchanged using WDP datagram’s or through a WSP session. In
case of exchange over datagram’s, a set of well-defined ports has been reserved for the
exchange to allow interoperability between different implementations.
Other content formats include the WAE image exchange format and application specific
formats. In general the method of data exchange depends on the data type and the user
agent involved.
WAE provides a visual environment that is designed to address several competing
requirements, including support for multiple pixels depths, support for colourspace
tables, small encoding, very low CPU and RAM decoding and presentation demands and
allowance for commonly available tools and support.
WAE meets these unique requirements by:
1. Supporting standard WSP/HTTP media types for commonly used image formats,
e.g., image/png.
2. Introducing an optimised bitmap format, the Wireless BitMaP (WBMP)
(WSP/HTTP media type image/vnd.wap.wbmp).
WBMP is an encapsulation format, i.e., a WBMP object is a wrapper object which maps
the verbose headers of the full image format to an identification (or typing) of the
contents. The actual image contents contain all other information, e.g., colour table (if
any), image bit planes, etc.
The WBMP specification is thus divided into two parts:
1. The generic header contains the following information, which is common
to all image formats.
 Type
 Width and height
 WBMP version number
The type identifier denotes the format of the embedded image. Type
0 is currently specified
2. The type-specific formats specification, indicating the data format for a
particular WBMP type.
The WBMP format supports the definition of compact image formats suitable for
encoding a wide variety of image formats and provides the means for optimisation steps
such as stripping of superfluous headers and special purpose compression schemes. This
leads to efficient communication to and from the client and for efficient presentation in
the client display.
A WBMP image has the following characteristics:

Page 41
Wireless Application Protocol

 Compact binary encoding


 Scalability, i.e., future support for all image qualities and types (colour
depths, animations, stream data, etc.)
 Extensibility (unlimited type definition space)
 Optimised for low computational costs in the client.
Multipart Messages
WAE includes a multipart encoding specification, suitable for exchanging multiple typed
entities over WSP. WSP translates the MIME multipart entity (see [RFC2045], [RFC
2046], [RFC 2387]) into a compact binary form, which is optimised for narrowband
environments. When the WML user agent receives multipart messages the following
behaviour is required:
 Application/vnd.wap.multipart.mixed is decomposed into its elements. The
elements are processed in the order in which they are in the multipart
message. The processing for each element is the same as it would be when the
element is received individually in a push.
 application/vnd.wap.multipart.related is retained as a single composite entry,
e.g. it would be placed as such into cache.
 application/vnd.wap.multipart.alternative is retained as a single composite
entity
When WAP gateway receives multipart messages the following behaviour is required:
 application/vnd.wap.multipart.form-data is decoded into multipart/form-data
before transferred to the origin server.
Channels
WTA defines a separate content type and encoding for delivering channels from the
WTA server/WAP gateway to the WTA User Agent. A channel is the format in which
content that executes WTA services is delivered to and stored in the client. See [WTA]
for details on the channel content type.
Service Indication
The Service Indication content type is defined in [WSI]. A WML user agent MUST
support the Service Indication content type if WAP Push is supported..

Page 42
Wireless Application Protocol

Wireless Bitmap Format


The WBMP format enables graphical information to be sent to a variety of handsets. The
WBMP format is terminal independent and describes only graphical information.
WBMP Type Identifiers
The WBMP format is configured according to a type field value (TypeField below),
which maps to all relevant image encoding information, such as:
 Pixel organisation and encoding
 Palette organisation and encoding
 Compression characteristics
 Animation encoding
For each TypeField value, all relevant image characteristics are fully specified as part of
the WAP documentation. Currently, a simple compact, monochrome image format is
defined within the WBMP type space. Image Type Identifier, multi-byte integer Image
Format description 0 B/W, no compression
Multi-byte Integer format
The WBMP image encoding uses a multi-byte representation for integer values. A multi-
byte integer consists of a series of octets, where the most significant bit is the
continuation flag, and the remaining seven bits are a scalar value. The continuation flag is
used to indicate that an octet is not the end of the multi-byte sequence. A single integer
value is encoded into a sequence of N octets. The first N-1 octets have the continuation
flag set to a value of one (1). The final octet in the series has a continuation flag value of
zero. The remaining seven bits in each octet are encoded in a big-endian order, i.e., most
significant bit first. The octets are arranged in a big-endian order, i.e., the most significant
seven bits are transmitted first. In the situation where the initial octet has less than seven
bits of value, all unused bits must be set to zero (0).
For example, the integer value 0xA0 would be encoded with the two-byte sequence 0x81
0x20. The integer value 0x60 would be encoded with the one-byte sequence 0x60.
Data Transmission
There are currently two available methods for exchanging vCard and vCalendar data:
 Using WDP datagrams -- enables clients to communicate using vCard and
vCalendar without the use of a WAP Gateway or other network proxy.
 Issuing WSP-based requests to a network server or receiving data via WAP
Push -- enables clients and servers to communicate with each other using
vCard and vCalendar.

Page 43
Wireless Application Protocol

WDP Datagram Data Exchange


To accurately identify data exchanged in a WDP datagram packet, a well-known port
number is used. This allows the user agent to presume that any data received on the port
is in a particular format. All data must be sent to the correct port number, and data
received on that port should be assumed to be of the associated type. For the vCard and
vCalendar port number assignments please refer to the [WDP] specification. When
datagram’s are received at the given WDP port, the information can be provided to a
standard vCard or vCard reader, or it can be accessed by another application, such as the
WML user agent. The method of display is implementation dependent.

1.3 Revision Points


WAP
Wireless Application Protocol (WAP) is a world wide standard for providing internet
communications and advanced telephony services on digital mobile phones, pagers,
personal digital assistants and other smart wireless terminals. It is designed to efficiently
deliver web content to mobile users, although the content is limited to the small screen
size, memory size and other constraints of mobile devices.

Internet
The Internet is a global web of interconnected computer networks. The Internet is based
on TCP/IP (Transmission Control Protocol/Internet Protocol), an open internetwork
communication protocol. TCP/IP networks consist of router-connected subnetworks that
are located all over the world. Packet-switching techniques are used to move packets
from one subnetwork to another.

URL
A URL is the address of an object that is normally typed in the Address field of a Web
browser. The URL is basically a pointer to the location of an object. A resource is an
object on the Internet or an intranet that resides on a host system.

HTML
HTML is the language used to create Web pages. Files are created using simple text with
embedded codes. These files are stored on Web servers. When a Web client accesses a
Web site, a default or home Web page in the HTML format is transmitted to the user.

HTTP
The Hypertext Transfer Protocol (HTTP) is an application-level protocol with the
lightness and speed necessary for distributed, collaborative, hypermedia information
systems. It is a generic, stateless, object-oriented protocol which can be used for many
tasks, such as name servers and distributed object management systems, through
extension of its request methods (commands).

Page 44
Wireless Application Protocol

1.4 Intext Questions


1. List the key features offered by Wireless Application Protocol.
2. What are the main objectives of the WAP forum?
3. What are the similarities and differences between Internet and WAP model?
1.5 Summary

 The Internet has proven to be an easy and efficient way of delivering services
to millions of "wired" users.
 WMLScript can be used to enhance the functionality of a service, just as for
example JavaScript may be utilised in HTML.
 The WTA framework defines a set of features that provides a means to create
telephony services.
 A Markup language used for authoring services, fulfilling the same purpose as
the HyperText Markup Language (HTML) does on the World Wide Web
(WWW).
 The Wireless Application Protocol (WAP) is a result of joint efforts taken by
companies teaming up in an industry group called WAP Forum.
 The Internet model makes it possible for a client to reach services on a large
number of origin servers; each addressed by a unique Uniform Resource
Locator (URL).
 The operator that runs a mobile network traditionally controls almost the
entire value chain for mobile Value Added Services (VAS).
 The WAE architecture includes all elements of the WAP architecture related
to application specification and execution.
 WAE architecture relies heavily on WWW's URL and HTTP semantics.

1.6 Terminal Exercises


1. List and explain the network issues addressed by WAP.
2. What are the issues addressed by WAP considering the compactness of the
devices used?
3. List and explain the services that can give through WAP.

Page 45
Wireless Application Protocol

1.7 Supplementary Materials


1. http://www.linktionary.com/w/wap.html
2. http://www.wapforum.org/
3. http://www.wap.com/
4. http://www.openwave.com/
5. http://www.wlana.com

1.8 Assignments
1. What characteristics of a wireless LAN present unique security challenges not
found in wired LANs?
2. Discuss in detail about WAP protocol stack.

1.9 Suggested Reading/Reference Books/Set Books

1. “Charles Arehart, Nirmal Chidambaram, S.Guruprasad, A.Howell,


S.Kasipillai “, “Professional WAP with WML, WML Script, ASP, JSP, XML,
XSLT, WTA, Push and VoiceXML”, SPD, Mumbai, 2000.
2. Martin Frost, “Learning WML & WML Script”, SPD, Mumbai, 2000.

1.10 Learning Activities

1. Collect information on WAP (not covered in this lesson) from the Internet.
2. Collect information on Wireless Telephony Application (WTA).
1.11 Keywords
Wireless Application Protocol (WAP)
Wireless Markup Language (WML)
Wireless Telephony Application (WTA)
HyperText Markup Language (HTML)
HyperText Transport Protocol (HTTP)
Transmission Control Protocol (TCP)

Page 46
Wireless Application Protocol

World Wide Web (WWW)


Handheld Device Transport Protocol (HDTP)
Handheld Device Markup Language (HDML)
Active Server Pages (ASP)
Common Gateway Interface (CGI)

Page 47
Wireless Application Protocol

Unit II

Introduction to WAP

 Developing WML
 Cards and Decks
 Changing the look of text with text formatting elements
 Creating hyperlinks to other pages
 Content formatting using tables
 Responding to browser events and user actions
 The do element
 The onevent element
 Navigational commands in WML
 The go element
 prev
 Using WML variables
 Passing values from pages using POST and GET
 Adding images to a page and changing the display with a timer
 Simple text input
 Special Characters

2.0 Introduction
WAP - the Wireless Application Protocol - is a suite of network protocols that
specify ways of sending data across the airwaves. As with such protocol suites, they are
organised hierarchically. At the bottom there are low-level protocols that are concerned
with establishing connections, coding alphanumeric characters, etc. At the top there are
the high-level protocols such as WML - the Wireless Markup Language - which is
concerned with passing page information.
WAP as a whole has been designed to take into account various limitations in
handsets and networks. Because the networks are slow, and the handsets unable to carry
much memory or power, an effort has been made to make all of the elements as efficient
as possible. It is not clear at present whether any of this efficiency has been gained at the

Page 48
Wireless Application Protocol

cost of functionality - if so, and then WAP will be under threat when the fast mobile
networks are commonplace and handset technology has improved. But if other things
remain equal, then WAP's efficiency will continue to contribute towards its success.

2.1 Objective
The objective of this chapter is to understand the fundamentals of WML, which
include a wide range of topics from fundamentals of developing WML to special
characters. At the end of the chapter you learn about basic concepts of WML.

2.2 Content

2.2.1 Developing WML


WAP protocols are not the same as web (HTTP) protocols. However, WML
content can be stored on web servers. WML content is served up to mobile phones (and
other portables) by passing through 'gateways' which stand at the borders of WAP and
web networks. These gateways provide the appropriate translation between the two types
of network. Even better, the gateways are provided by one's mobile phone network
provider, so a WML developer doesn't have to worry about personally installing any
gateway software.

Unfortunately, in order to host WML content one's web server does need to be set
up to output five unusual MIME types. Supporting these MIME types ought to be an easy
task, but it is interesting how few commercial ISPs have got round to doing it.

WML - the Wireless Markup Language - is the language now used to write content
for WAP phones. The alternative, HDML (Handheld Device Markup Language), can be
taken to be obsolete. WML is a 'markup' language. This means that WML pages are
written and saved as text files, using 'tags' like those found in HTML. Anyone familiar
with HTML should find learning WML fairly easy. There are, however, some important
general differences between HTML and WML. These stem from the fact that WML is
specified in XML (the eXtensible Markup Language). XML specifies a general way to
define different types of markup languages, and has the following quirks:

 XML-specified languages are case sensitive. So, for instance, a tag <Wml> is
different from a tag <wml>. This is unlike HTML, where case is generally
ignored.
 XML-specified languages are strict. Most HTML editors are very forgiving about
badly coded HTML pages, and do their best to show some content. WML editors,
however, will just report an error if given a badly coded WML page.
 All the attributes of elements must be contained within either double (") or single
(') quotes. This is slightly different from HTML where attributes need not be
contained within quotation marks for most browsers.

Page 49
Wireless Application Protocol

 One way in which WML is strict is that all tags crave closure. For instance, an
opening <wml> tag must have a closing </wml> tag. Some tags don't come in
pairs and are allowed to close themselves; these must have a forward slash at the
end of their text, like <br/>
The following script doesn't contain any viewable content, but demonstrates the
elements that every WML page should have. The line numbers are given just for our
benefit, and shouldn't be included in an actual script.

1. <?xml version="1.0"?>
2. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
3. <wml>
4. </wml>

Line 1 identifies that the document is written in the finalised version of XML.

Line 2 states that the document is a WML document of version 1.1, which is the current
standard. Until the newer versions of WAP are introduced, you can just copy lines 1 and
2 for each WML document you produce.

Lines 3 and 4 contain the opening <wml> tag, and the closing </wml> tag. There can
only be one such pair of tags in any single WML document, and everything else in your
WML document must be placed between these tags.

Cards and Decks - creating individual pages and groups of pages


In HTML, a single file (myPage.html) will generally correspond to just one
viewable page. In WML, however, a single file (myPage.wml) can hold the details of
more than one page. WML makes use of the metaphor of playing-cards to describe this
relationship. Each viewable page specified in a WML document is termed a 'card'. And
all cards specified in the same WML document are part of the same 'deck'.

The details describing a single card are placed between <card> </card> tags.
Cards should be given an identifying name, and can also be given a title. These details are
placed within the initial <card> tag like this:

<card id="myIdentifier" title="myTitle">

The identifier attribute is used to distinguish this card from any others in the deck.
The title attribute is used by some microbrowsers (as the browsers embedded in mobile
phones are called) as a heading for the card. The following script illustrates the
specification for a card named 'card1'. Note that indentation in the script can be used to
make it more readable; whitespace in WML documents should be ignored by
microbrowsers.

Page 50
Wireless Application Protocol

1. <?xml version="1.0"?>
2. <!DOCTYPE wml PUBLIC"-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
3. <wml>
4. <card id="card1" title="Welcome">
5. <!-- This is a Comment -->
6. </card>
7. </wml>

As yet card1 contains no viewable content. This content will go where there is
currently a comment. As with HTML, any information placed within comment identifiers
<!- anyText --> will be ignored by the microbrowser.

Adding text and other content to WML pages

Our first working WML file is the standard 'Hello World!' example.

1. <?xml version="1.0"?>
2. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
3. <wml>
4. <card id="card1" title="Welcome">
5. <p align="center" mode="wrap">
6. Hello World.
7. </p>
8. </card>
9. </wml>

The new element in the script above is the tag-pair <p> </p>. These tags hold the details
of a paragraph, and it should be noted that any text that you want to show on the screen
must be wrapped in paragraph tags. Paragraph alignment is handled by giving a value to
the 'align' attribute in the initial <p> tag. The following comprise the accepted values:
align="left" [default]
align="right"
align="center"

The paragraph element also has a mode attribute, which specifies how the paragraph text
is to be displayed on the screen. There are two possible values for the attribute:
mode="wrap" [default]
mode="nowrap"

When mode is set to nowrap, the paragraph text is forced to display on one line. On some
phones horizontal scrolling is possible; others use a blinking system moving along the
information.

Page 51
Wireless Application Protocol

Changing the look of text with text formatting elements


The following section introduces the tags used to change the style and layout of
text. It should be noted that the style tags are supported to different degrees by different
types of micro browser. With each of the following pairs of tags, the text is affected by
placing it within the tags. It does not seem possible to apply more than one text style to a
single piece of text.

<b></b> - makes the text bold

<big></big> - makes the text big

<em></em> - emphasises the text (as the browser chooses)

<i></i> - italicises the text

<small></small> - makes the text small

<strong></strong> - strong emphasis (the effect is open to the browser)

<u></u> - underlines the text

The <br/> tag is one of the tags that doesn't come in a pair. It forces a line-break. The
following code shows the use of a number of the tags above, as well as the <br/> tag:

1. <?xml version="1.0"?>
2. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
3. <wml>
4. <card id="card1" title="Welcome">
5. <p>
6. Text Formating Examples:<br/>
7. <big>Big Text</big><br/>
8. <em>Emphasised Text</em><br/>
9. <strong>Strong Text</strong><br/>
10. <b>Bold Text</b><br/>
11. </p>
12. </card>
13. </wml>

The following pictures demonstrate how this script is displayed in the phone.com
emulator and the Nokia blueprint WAP 1.2 phone emulator:

Page 52
Wireless Application Protocol

Figure 2.1 phone.com emulator

Figure 2.2 Nokia Emulator

2.2.2 Creating hyperlinks to other pages


This section covers navigation between WML cards. As with HTML, navigation is
supported by the a tags
<a></a>

The main attribute of these a tags is the 'href' attribute, which specifies the hyperlink
target of the anchors. For example:
<a href="target">text</a>

When navigating between cards in the same deck, targets are specified using a '#' before
the card's id value. The following script provides an example of two cards which link to
each other in this way.
1. <?xml version="1.0"?>
2. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
3. <wml>
4. <card id="card1" title="Welcome">
5. <p>
6. Here is a link to<br/>
7. <a href="#card2" title="Card2">Card 2</a>
8. </p>
9. </card>
10. <card id="card2" title="Card 2">

Page 53
Wireless Application Protocol

11. <p>
12. Here is a link back to the<br/>
13. <a href="#card1">Welcome Page.</a><br/> (Card1)
14. </p>
15. </card>
16. </wml>

As can be seen from this script, anchors can also take a value for the 'title' attribute (the
value defaults to 'link'). Devices use this attribute in different ways; for instance, the
Phone.com device makes it the value of the 'accept' key. Note that to ensure compatibility
with different browsers, the title value should be a maximum of 5 characters. The pictures
below demonstrate how this code looks in the development kit browsers from Phone.com
and Nokia.

Figure 2.3

To navigate from a card to another card outside its deck, one gives the URL of the deck,
plus '#' plus the card's id. For instance, the following code describes a link to the card
named 'card1', found in the local file 'example7.wml'.

<a href="example7.wml#card1" title="ex7">example 7</a>

The next example describes a link to a card named 'card2', found in a remote file:

<a href="http://wap.example.com/files/index.wml#card2">link</a>

If no id specification is given after a URL, the browser pulls out the first card in the given
deck.

2.2.3 Content formatting using tables


WML tables are similar in look and operation to HTML tables. The main tag pair
is

Page 54
Wireless Application Protocol

<table></table>

The opening table tag must also specify how many columns there are in the table, by
setting a 'columns' attribute. It may also take an alignment attribute, 'align'. This works
differently from the paragraph alignment attribute. The alignment of each column in the
table is specified by one of the three letters 'R', 'L' or 'C' (for right, left and centre). The
following tags describe a table that has two columns, the first of which is aligned to the
centre, the second of which is aligned to the right.

<table columns="2" align="CR"></table>

The <tr></tr> tags specify the table's rows, whereas the <td></td> tags hold the data for
each cell. If more cells are given than the table has columns for, the excess data seems to
be placed into the rightmost cell.

Because of the idiosyncratic behavior, as well as the small display area, tables tend not to
look very good in microbrowsers. In the following example, the mode value of the
paragraph tag is set to 'nowrap', so the table takes its full length.

1. <?xml version="1.0"?>
2. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
3. <wml>
4. <card id="card1" title="Welcome">
5. <p mode="nowrap">
6. <table title="demo" align="LL" columns="2">
7. <tr>
8. <td> Column 1, row 1</td>
9. <td> Column 2, row 1</td>
10. </tr>
11. <tr>
12. <td> Column 1, row 2</td>
13. <td> Column 2, row 2</td>
14. </tr>
15. </table>
16. </p>
17. </card>
18. </wml>

The pictures below demonstrate how this code looks in the development kit browsers.

Page 55
Wireless Application Protocol

Figure 2.4

Note that when we remove the mode attribute, the table formatting in the Nokia browser
looks fine, but the formatting disappears in the Phone.com browser.

Figure 2.5

2.2.4 Responding to browser events and user actions

The do element
The 'do' element is used to specify responses to certain types of user action. It has
one required attribute 'type', which holds the kind of user action. The specified response
to this action, which we cover in later sections, is placed between the opening and closing
tags of the do element.
A do element can be given an optional 'name' attribute. In the later sections we
cover a situation in which this attribute proves useful. However, a reader has pointed out
another reason why you might want to get in the habit of providing names for your do
elements.
The WML 1.0 specification says the following about the name attribute of the do
element: "It is an error to specify two or more DO elements with the same NAME in a
single card or in the TEMPLATE element. A NAME with an empty value is equivalent to
an unspecified NAME attribute. An unspecified NAME defaults to the value of the TYPE
attribute."

Page 56
Wireless Application Protocol

What follows from this passage is that you can't specify two do elements of the
same type in a card without giving these elements different names. For in this case the
names of the elements would default to the same string (the string specifying their type),
and two do elements with the same name in a card constitutes an error. It is important that
such errors be avoided, as gateways may be unable to compile pages with errors. To
avoid this kind of problem, therefore, it is probably a good idea to provide names for do
elements generally. The basic markup of the do element can thus be taken as the
following:

<do name="unique_name" type="some_type">


some_action
</do>

The extra, optional attributes of the do element are:

label - a text string for labeling purposes

optiona - either "true" or "false" ; by setting this to true, the microbrowser


l is told that it can safely ignore the element

The type attribute takes one of the following values. Note that it is up to the browser to
decide what kinds of user actions on a particular handset correspond to these generic
types of action:

accept - something has been accepted or agreed - on a


mobile phone this usually corresponds to a press of
the left softkey, which may be labeled 'OK' or 'Yes'.

prev - the 'back' button has been pressed, to make the


microbrowser go back one step in its navigation. On
a mobile phone this is usually the right softkey.

help - a request for some sort of help

options - a context sensitive request for other options

delete - the deletion of an item

reset - the pushing of the device's reset button

Page 57
Wireless Application Protocol

unknown - open to be mapped by the browser to any key

vnd* (where * is - reserved for vendor specific tasks


any sequence of
letters)

The onevent element


The 'onevent' element is used to specify certain kinds of responses to browser
events (this is related to, but different from the actions that might cause these events).
Like the do element the onevent element has one required attribute - 'type' - but it takes
no other attributes. Again, the response to the event is specified by code inside its
opening and closing tags; the form of the onevent element is thus:

<onevent type="some_type">
some_action
</onevent>

The type attribute takes one of the following values:

onenterforward - this occurs when the card is entered in a 'forward'


direction, i.e. when following a link from a card or
typing the URL.

onenterbackwar - this occurs when the card is entered in a 'backwards'


d direction, i.e. when navigating back to previously seen
cards.

ontimer - an event triggered after a number of tenths of a second


specified by the user.

2.2.5 Navigational commands in WML

The go element
The 'go' element is used to tell the browser to navigate to a particular location. Go
elements can be placed inside either 'anchor' elements, or the 'do' elements covered in the
previous section.
The 'anchor' element specifies a hypertext anchor. It has a single, optional,
attribute 'title'. At the simplest level, the anchor and go elements can be used to emulate
the <a></a> tags introduced in previous sections, by making use of the 'href' attribute of
the go element. For example, the following sets of code are functionally equivalent:

Page 58
Wireless Application Protocol

<a href="#card2">
card2
</a>
and
<anchor title="the_same">
card2
<go href="#card2"/>
</anchor>

The additional benefit of the go element, however, is that it can be used like an HTML
form, to pass data from one card to another, or back to the server.

prev
The <prev/> tag is used to force backwards navigation. As one navigates through
WAP cards, the browser keeps a list of those visited, and the prev command makes the
browser go back to the card just visited. The prev command must be enclosed by an
'anchor' element or a 'do' element. The following example associates the prev command
with an anchor on the words 'go back':

<anchor>
go back
<prev/>
</anchor>

It is very important when writing WML to remember to allow backwards


navigation from all of your cards (with a few exceptions described below). Many
microbrowsers do not support a 'back' function unless explicitly specified in the WML
code. This means that people can get 'stuck' in a site - an annoying experience which may
keep them away in future.

1. <?xml version="1.0"?>
2. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
3. <wml>
4. <template>
5. <do name="goback" type="prev">
6. <prev/>
7. </do>
8. </template>
9. <card id="card1" title="Welcome">
10. <onevent type="onenterforward">
11. <refresh>
12. <setvar name="details" value="you entered forwards"/>

Page 59
Wireless Application Protocol

13. </refresh>
14. </onevent>
15. <onevent type="onenterbackward">
16. <refresh>
17. <setvar name="details" value="you entered backwards"/>
18. </refresh>
19. </onevent>
20. <p align="center">
21. $(details:n).
22. </p>
23. <p>
24. goto <a href="#card2"> card 2 </a>
25. </p>
26. </card>
27. <card id="card2" title="return">
28. <p>
29. return to the previous <a href="#card1"> card </a> to reset the variable
30. </p>
31. </card>
32. </wml>

When entered normally When entered using back link

Figure 2.6
2.2.6 Using WML variables
Unlike HTML, WML supports a limited use of variables (note that this has
nothing to do with the scripting language WMLScript - these variables can be used in
WML proper). The following section covers how one uses WML variables.

Variable names
A variable name must begin with either a letter or an underscore ( _ ) character.
For instance, the following two names are valid:
myVar
_myVar
Subsequent characters in the variable name can consist of any combination of letters,
digits and underscores. For instance, the following two names are valid:

Page 60
Wireless Application Protocol

___123
a1_2_3

As with WML generally, variable names are case-sensitive.

Setting variables
WML variables hold string values only. The scope of all WML variables is global
to the browser environment. So cards from completely different domains can overwrite
each other's variables. To set a variable in a WML page, the <setvar/> tag is used. This
tag takes a 'name' and a 'value' attribute, both of which are required. For example, the
following code sets the variable called 'us' to the value 'Annamalai':

<setvar name="us" value=" 'Annamalai "/>

There are, however, strict rules on where the <setvar/> tag can be used. It should
only be included inside either the 'go' element that we covered in the previous section, or
(more usually) the 'refresh' element. The refresh element is just used to specify the
change in value of a variable, and to update the browser screen in respect of the change.
There are rules in turn about where one can place the refresh element, these being only
inside 'onevent' or 'do' elements. So, for instance, one might set a greeting variable on the
user navigating backwards to a card using the following piece of code

1. <do type=prev>
2. <refresh>
3. <setvar name="greeting" value="welcome back">
4. </refresh>
5. </prev>
6. </do>

Using variables
Once a variable has been set, it can be used by writing its name, prefixed by a
dollar sign, into the WML code. When the browser comes across such a term, it replaces
it with the value of the named variable. For example, given the variable assignment
above, the line of code
<p>Hello from $us</p>
will appear on the browser as
Hello from Annamalai
Alternatively, one can wrap the variable name in brackets. The following gives just the
same output as before:
<p>Hello from $(us)</p>

Using these brackets is better than not. With the variable name in brackets the
browser can never be unsure as to what in the code part of the variable name is, and what
is just plain text.

Page 61
Wireless Application Protocol

In addition, one can also specify a 'conversion' for one's variable. Such a
conversion relates to the use of variables in URLs (Uniform Resource Locators). Because
some string characters are not allowable in URLs, to include a variable value in a URL
one should 'escape' the string - this replaces the disallowed characters with alternatives.

Turning the escaped string back into its original format is called 'unescaping'. To
specify a conversion for a variable, one appends the variable name with a colon and adds
a conversion literal. The following terms show our variable 'us' with conversions:

$(us:escape) or $ - escapes the value of 'us'


(us:e)

$(us:unesc) or $ - unescapes the value of 'us'


(us:u)

$(us:noesc) or $ - specifies that the variable should not be escaped (this


(us:n) stops any browser escaping the variable by default).

It is probably best always to specify a conversion wherever variables are used.


This gives one complete control over how the variable value is interpolated, and
overrides any browser defaults.

Passing values from pages using POST and GET


As stated in the previous sections data to be passed using the go command are
given as variables in special 'postfield' elements. These postfield elements are always
empty (i.e. they don't take a separate closing tag) and have two required attributes: 'name'
and 'value'. To take an example of these attributes: the following postfield element
specifies the value 'hello' for the datum 'greeting'.
<postfield name="greeting" value="hello"/>

The postfield elements are held within opening and closing 'go' tags, and the
'method' attribute of the go element specifies the manner in which the elements are sent.
The following code sends the password value 'hi', using the 'get' method, to deck2.wml.

1. <go href="deck2.wml" method="get">


2. <postfield name="password" value="hi"/>
3. </go>

There are two possible method used to pass data in this way. One is 'get', as used above,
the other is 'post'. Using the 'get' method, the data passed actually piggy-backs on the
address (URL) of the recipient. The following URL shows how the datum specified
above would be passed to deck2.wml:
deck2.wml?password=hi

Page 62
Wireless Application Protocol

The get method has two weaknesses. The first is that it is easier for an external
person to capture data sent in this way. The second is that there is a tight limit to the
amount of information sent (typically 127 characters).

Using the alternative 'post' method, the data are sent in the body of the message.
This is more secure than the 'get' method, and more data can be sent in this way.
However, at the time of writing 'get' is more widely supported by gateways than 'post'.
Note that because of the way in which 'get' variables are actually sent, one can also send
these variables by appending them manually to the end of the url specified in the 'href'
attribute of the go element. For instance, the following code sends two pieces of data,
dataOne and dataTwo, and each via the 'get' method.

1. <go href="deck2.wml?dataOne=one" method="get">


2. <postfield name="dataTwo" value="two"/>
3. </go>

Using templates to provide common content for groups of pages


The initial WAP-enabled devices have to work on low bandwidth systems (on
GSM these go at a maximum of 9.6kb, whereas even the modems built into standard PCs
can - at least theoretically - operate at 56kb/s). Because of this, WML has been designed
with features which allow one to cut down the amount of bytes sent.
One of these features is the support for 'templates'. When multiple cards are sent
in one pack, you can specify a template containing code to be read into each card. This
cuts down on duplication of code.
The following piece of code shows two cards. Navigation between these cards is
supported by the template code. This provides a button for the user to get from the first
card (the home page) to the second (which has been called the 'index'), as well as a back
button for him to return.

1. <?xml version="1.0"?>
2. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
3. <wml>
4. <!-- The template for the deck -->
5. <template>
6. <do type="prev" name="backbtn" label="back">
7. <prev/>
8. </do>
9. <do type="accept" name="indexbtn" label="index">
10. <go href="#card2"/>
11. </do>
12. </template>
13. <!-- the first card in the deck -->

Page 63
Wireless Application Protocol

14. <card id="card1" title="Welcome">


15. <p align="center">
16. Hello from Chid Solutions
17. </p>
18. </card>
19. <!-- The Second card in the deck -->
20. <card id="card2" title="index">
21. <p>This card is empty</p>
22. </card>
23. </wml>

There may be occasions, however, on which you want to override template code.
For instance, it may be that you want all but one of many cards to contain navigation
back to the home page. Here it would be more efficient to specify a template and allow
one card to 'opt out', rather than requiring each of the standard cards to implement its own
navigation.
To override template code - known as 'shadowing' - one makes use of an
element's 'name' attribute. The general idea is that a card's element can have the same
name as that of an element in its template, and in this circumstance the former is allowed
to overrule the latter.
The following code shows how one could disable the backwards navigation in the
'index' card in the example given above. The relevant 'do' command already has a name
(backbtn), so the index card just needs to implement an overriding do command which
does nothing, viz:

1. <card id="card2" title="index">


2. <do type="prev" name="backbtn" label="back">
3. <noop/>
4. </do>
5. </card>

The <noop/> tag forces the browser to do nothing. Again, it must be enclosed by
an anchor or a do element. The following example associates the noop command with the
prev action (as opposed to the prev command):

1. <do name="null" type="prev">


2. </noop>
3. </do>

One reason that one might ever want use this code is that some browsers do
support a 'back' function even when it is not explicitly coded into a WML page. However,
sometimes it is best to disable this function. For example, it is a good idea to close off
backwards navigation immediately following a successful online purchase, so as to stop
the user repeating the order by mistake.

Page 64
Wireless Application Protocol

Adding images to a page and changing the display with a timer


In this section we cover WML's support for images, and how to make events
occur after a specified amount of time. These two features are often found together, as it
is common for sites to have image-heavy site entrances, followed by automatic entry into
the site proper.

Most WAP microbrowsers currently support just one image format, 'wireless
bitmap format', or WBMP. WBMP only gives black and white images. Since converting
colour images directly into WBMP format gives patchy results, it is probably best to use
a paint tool to produce a distinct black and white image prior to converting it to WBMP.
The markup for images is very similar to that used in html. The base element is the empty
tag

<img/>

The main two attributes for the img element are 'src', which takes the URI
(location) of the image, and 'alt', which provides an alternative text string for the image.
Because some browsers are still not happy about showing pictures, it is best always to
provide an alternative text string.

In the example code below you will see that we also specify 'height' and 'width'
attributes for our image. These are less well-supported than the attributes above - as are
'vspace' [white space above and below], 'hspace' [white space left and right], and 'align'
[top, middle or bottom].

WBMP editors can be found in various places, including the WAP development
toolkits provided by phone manufacturers. In addition, a plugin for paint shop pro and
PhotoShop to allow these programs to save files in a .wmbp format is available.
Making use of timer events involves two parts - setting the timer, and specifying
something to happen once the timer counts down to zero. The first part of this procedure
involves giving a number to the 'value' attribute of the 'timer' element, as in:
<timer value="10"/>
Note that the value attribute is measured in tenths of a second, so this code sets a
timer to count down from one second. Once the timer has counted down, an 'ontimer'
event is generated. One can specify an action to occur given this event with the following
kind of code (this tells the browser to load the second card ):

1. <onevent type="ontimer">
2. <go href="#card2"/>
3. </onevent>

There is a shorter way of writing this command, however, which has been included in the
example code below (see line 4). This code shows our logo for 1 second and then moves

Page 65
Wireless Application Protocol

on to more important things. Notice, though, that a static navigation element has been
included from the first card. This is to account for the number of micro browsers which
don't currently support the timer event.

1. <?xml version="1.0"?>
2. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
3. <wml>
4. <card id="card1" title="Welcome" ontimer="#card2">
5. <!-- wait 1 seconds (10 tenths of a second) -->
6. <timer value="10"/>
7. <p align="center">
8. <img src="logo.wbmp" alt="our logo" width="50" height="49"/>
9. </p>
10. <do name="accpt" type="accept">
11. <go href="#card2"/>
12. </do>
13. </card>
14. <card id="card2" title="return">
15. <p>
16. This is the second page.
17. </p>
18. </card>
19. </wml>

A worked example of image changing, illustrating the atypical behaviour of WML


variables

The following example code demonstrates some of the ways in which you can get tasks
and variables working together. The browser starts off by showing a picture of the logo.
Then, when the user successively performs an 'accept' action, the picture rotates through
showing this and two other pictures.

1. <?xml version="1.0"?>
2. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
3. <wml>
4. <card id="card1" title="Welcome">
5. <onevent type="onenterforward">
6. <refresh>
7. <setvar name="img1" value="logo.wbmp"/>
8. <setvar name="img2" value="ghost.wbmp"/>
9. <setvar name="img3" value="cube.wbmp"/>
10. <setvar name="alt1" value="Globe"/>

Page 66
Wireless Application Protocol

11. <setvar name="alt2" value="Ghost"/>


12. <setvar name="alt3" value="Cube"/>
13. </refresh>
14. </onevent>
15. <p align="center">
16. <img src="$(img1:e)" alt="$(alt1:n)"/>
17. </p>
18. <do name="accpt" type="accept" label="$(alt2:n)">
19. <refresh>
20. <setvar name="img1" value="$(img2:n)"/>
21. <setvar name="img2" value="$(img3:n)"/>
22. <setvar name="img3" value="$(img1:n)"/>
23. <setvar name="alt1" value="$(alt2:n)"/>
24. <setvar name="alt2" value="$(alt3:n)"/>
25. <setvar name="alt3" value="$(alt1:n)"/>
26. </refresh>
27. </do>
28. </card>
29. </wml>

When the user first enters the card, six variables - img1, img2, img3, alt1, atl2,
alt3 - are given initial values (lines 5 - 14). The browser then shows the image at the URI
held by img1, with the alternative text held by alt1 (lines 15 - 17). Lines 18-27 specify a
task to occur when the user performs an 'accept' action - on our emulator, this consists in
pressing the left softkey. The task rotates the values of variables, so that img1 takes the
value of img2, img2 the value of img3, and img3 the value of img1 (and equivalently for
the alt variables).

Note that in normal, sequential programming the code in lines 20 - 25 would be


buggy. By the time img3 is told to take the value of img1, img1 will already have been
changed to have the value of img2. But in WML new variable values do not take effect
until the end of the task, so the code works as it should. In some browsers one can use an
ontimer event to switch between images in a card, allowing rudimentary animations.
Unfortunately, some browsers will not reinitialise a timer following a refresh task. On
these browsers, therefore, the animation would stall at the second picture.

Figure 2.7

Page 67
Wireless Application Protocol

2.2.7 Simple text input

This section covers user input into text boxes. The basic element for text boxes is the
empty tag
<input />

It can take various attributes (most of which are universally supported) to define its initial
status and range of possible variables. These are:

name the name of the variable to hold the value of the user input. If
this variable has already been set, the text box displays this
value initially.

type - defines what type of data this element is to accept. It can


either be "text" (the default) or "password". If the latter, the
text is obscured in some appropriate way.

value - provides an optional default value for the element. This value
only has effect when the variable given in the name attribute is
not set.

size - specifies how many characters wide the input box should be.
Note that this value has no effect on the maximum number of
characters that can be entered.

maxlengt - specifies the maximum number of characters that can be


h entered.

title - gives a title to the element that some microbrowsers may use
in presentation.

tabindex - specifies the order in which this text box receives the focus
when the user presses the 'tab' key. The value used are whole
numbers and they are visited in ascending order. Used when
there are a number of different text boxes.

emptyok - "true" allows an empty string as a valid input; "false" will not
allow this. Note that the 'format' attribute takes precedence if it
is set.

Page 68
Wireless Application Protocol

forma - Gives an optional specification of the type of data this element


t can take. This can be any number or combination of the following
legal codes (illegal codes being ignored):
A - any uppercase letter or symbol

a - any lowercase letter or symbol

N - any numeric digit

X - any uppercase letter

x - any lowercase letter

M - any character, but expecting an uppercase letter

m - any character, but expecting a lowercase letter

*f - any number (zero or more) of characters matching


format code f, where f is one of the seven given
above. E.g., *N matches any number of numeric
digits

nf - exactly n characters matching format code f

\c -makes character c compulsory, so the browser can


fill it in. E.g., given the code \(NNNNN\)
NNNNNN, the brackets would be automatically
filled in for a telephone number like (01234)
567890

The following code gives an example of a couple of input boxes.

1. <?xml version="1.0"?>
2. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
3. <wml>
4. <card id="card1" title="Welcome">
5. <onevent type="onenterforward">

Page 69
Wireless Application Protocol

6. <refresh>
7. <setvar name="sec" value="Hi"/>
8. </refresh>
9. </onevent>
10. <p>
11. Number
12. <input format="N*N" name="first" title="Number:" value="12"/>
13. Text:
14. <input format="M*M" name="sec" title="Text:"/>
15. </p>
16. </card>
17. </wml>

Figure 2.8 Input Boxes

Further user input - selections and option groups

This section covers user input by selection from options. All such selection functionality
is coded using outermost select tags, thus:

1. <select>
2. ... some_markup ...
3. </select>

Inside the select tags one places any combination of 'option' and 'optgroup' elements. The
simplest type of selection element just contains several option elements, e.g.:

1. <select>
2. <option>Choice 1</option>
3. <option>Choice 2</option>
4. </select>

Although browsers differ in how they present these options, basically the user will be
given a list of the strings 'Choice 1' and 'Choice 2', from which he can select one. The
option elements can take a number of attributes:

value - a string which can be important in reference to some attributes of


the select object (see below)

Page 70
Wireless Application Protocol

onpic - allows you to specify the id of a card to navigate to when you


k pick this option

title - gives a title to this option , which some browser may use to
display the option

To provide more complicated actions than available via onpick, such as passing variables
to the server or altering the value of variables, we need to embed an <onevent> element
inside the option:

1. <onevent type="onpick">
2. <go href="#card2"/>
3. </onevent>

One can provide more complicated select elements by using the 'optgroup' element
(though this is not supported by the Microsoft microbrowser). It is used to collect
together a number of different option elements. When the user is first presented with the
selection object, he is shown a list of the titles of the optgroup elements (along with any
option elements not enclosed in optgroups). Choosing one of these optgroup titles then
takes him to the list of options held by the chosen optgroup element. Such a selection
element may be coded something like this:

1. <select>
2. <optgroup title="first_choices">
3. <option>Choice 1</option>
4. <option>Choice 2</option>
5. </optgroup>
6. <optgroup title="second_choices">
7. <option>Choice 3</option>
8. <option>Choice 4</option>
9. </optgroup>
10. </select>

The select element takes a number of attributes that govern its behaviour:

title - used by some browsers for presentation purposes.

name - used in association with the 'value' attribute of option elements.


Specifies a variable which gets assigned the value string of the
option chosen.

Page 71
Wireless Application Protocol

iname - specifies a variable which has the index number of the option
chosen (the index number of the ith option element specified is
i).

value - the option which has this value string is set as the default choice

ivalue - the option with this index number is set as the default choice

multiple - either "true" or "false" (the default). If true, the user can make
multiple selections

tabinde - specifies the order in which select element receives the focus
x when the user presses the 'tab' key

The following code provides examples of the use of select elements.

1. <?xml version="1.0"?>
2. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
3. <wml>
4. <card id="card1" title="Welcome">
5. <p>
6. Selection 1:
7. <select iname="option1" ivalue="1">
8. <option>meat</option>
9. <option>vegetables</option>
10. <option>Dairy products</option>
11. </select>
12. Pizza Toppings
13. <select name="option2" value="pep" multiple="true">
14. <optgroup title="Meat">
15. <option value="pep">Pepperoni</option>
16. <option value="chi">Chicken</option>
17. <option value="bee">Beef</option>
18. <option value="por">Pork</option>
19. </optgroup>
20. <optgroup title="vegetables">
21. <option value="oni">Onions</option>
22. <option value="per">Peppers</option>
23. <option value="chi">Chillies</option>
24. <option value="mus">Mushrooms</option>
25. </optgroup>
26. </select>
Page 72
Wireless Application Protocol

27. </p>
28. </card>
29. </wml>

Figure 2.9
2.2.8 Special Characters
Since the dollar sign $ is used to identify variables by prefixing variable names,
one needs some other way of showing the dollar character in one's WML output. What
one does is to write double dollar signs $$ in place of single dollar signs. Note that the
pair cannot be mistaken for a variable, as variable names cannot start with $.

There are various other special characters which, because they are part of the
WML syntax, must be specified in an alternative way. The following table gives a list of
characters with their alternative notations (nb. a nonbreaking space is use to stop the
microbrowser breaking between some text which you wish to keep on the same line, and
a soft hyphen marks a place in a long word where you will allow the microbrowser to
create a break).

& &amp;

" &quot;

' &apos;

< &lt;

> &gt;

Nonbreaking space &nbsp;

Soft hyphen &shy;

The characters given above are unusual in having quasi-readable alternative notations. A
more general solution is to give the character number (the ASCII number or, if the
handset supports it, the Unicode number) in either a decimal or hexadecimal format. For
instance, the 'greater than' sign > can be coded as the decimal &#62;, or the hexadecimal

Page 73
Wireless Application Protocol

&#x3e;. One can't, however, use this trick to output a dollar sign - we still have to use the
notation given in the first paragraph (ie $$ to represent $). The reason for this is that the
microbrowser converts special characters before it replaces any variables.

2.3 Revision Points

WML
Wireless Markup Language (WML) is a version of HTML that is designed to display the
web content on small devices such as cellular phones and handheld devices. WML is
being is developed as part of Wireless Application Protocol (WAP).

HDML
It is a mark up language similar to HTML, designed for developing applications and
services for cellular devices. It is compatible with all web servers, uses little memory,
makes efficient use of wireless network transmissions, and supports integrated phone
features like voice.

XML
XML allows developers to create more functional documents for exchanging structured
information across the Internet. It creates a framework for documents in which data has
meaning as defined by tags.

Go element
The 'go' element is used to tell the browser to navigate to a particular location. Go
elements can be placed inside either 'anchor' elements.

Do element
The 'do' element is used to specify responses to certain types of user action.

2.4 Intext Questions


1. What is WAP?
2. Explain Cards and Decks.
3. Explain any four formatting tags in WML.
4. How can you create hyperlinks in WML?
5. Explain the do element.

2.5 Summary
 WAP - the Wireless Application Protocol - is a suite of network protocols that
specify ways of sending data across the airwaves.

Page 74
Wireless Application Protocol

 WML - the Wireless Markup Language - is the language now used to write
content for WAP phones.
 Each viewable page specified in a WML document is termed a 'card'.
 WML tables are similar in look and operation to HTML tables.
 The 'do' element is used to specify responses to certain types of user action.
 The 'onevent' element is used to specify certain kinds of responses to browser
events
 The 'go' element is used to tell the browser to navigate to a particular location.
 Most WAP microbrowsers currently support just one image format, 'wireless
bitmap format', or WBMP.

2.6 Terminal Exercises


1. List the attributes of the onevent element and explain their functionalities.
2. What are navigational elements? Explain.
3. How can you add images in WML?
4. Explain the select element and its attributes.
5. Explain how special characters can be embedded in WML?

2.7 Supplementary Materials

6. http://www.linktionary.com/w/wap.html
7. http://www.wapforum.org/
8. http://www.wap.com/
9. http://www.openwave.com/
10. http://www.wlana.com

2.8 Assignments

1. What are the functional areas supported by WML?


2. Why has a scripting language been added to WML? How can this language
help saving bandwidth and reducing delay?

Page 75
Wireless Application Protocol

2.9 Suggested Reading/Reference Books/Set Books

3. “Charles Arehart, Nirmal Chidambaram, S.Guruprasad, A.Howell,


S.Kasipillai “, “Professional WAP with WML, WML Script, ASP, JSP, XML,
XSLT, WTA, Push and VoiceXML”, SPD, Mumbai, 2000.
4. Martin Frost, “Learning WML & WML Script”, SPD, Mumbai, 2000.

2.10 Learning Activities

1. Name mechanisms to improve web access for handheld devices? What is their
common problem and what led finally to the development of WAP?
2. What is the fundamental difference of WML compared to HTML? Why can
this difference be important for handheld devices? What is specified in
addition to save bandwidth?

2.11 Keywords

Wireless Application Protocol (WAP)


Wireless Markup Language (WML)
eXtensible Markup Language (XML)
HyperText Transport Protocol (HTTP)
HyperText Markup Language (HTML)
Handheld Device Markup Language (HDML)
Handheld Device Transport Protocol (HDTP)

Page 76
Wireless Application Protocol

Unit III

Wireless Mark-Up Language Script

 Operators
 Variables
 Control Structures
 Library functions
 The Lang Library
 String Library
 Float Library
 URL Library
 WML Browser Library
 Dialogs Library
 Console Library

3.0 Introduction
Wireless is a new and hot technology that made the transition from "pipe dream"
to reality in 1999. As a first approximation, you could say that WMLScript is to WML, as
JavaScript is to HTML. Another approximation is that WMLScript is a highly simplified
version of JavaScript. However, it is best both to treat and think of WMLScript as its own
unique language. WMLScript has a core group of six standard libraries. Each of the
various libraries contains from three to seventeen functions that perform useful tasks
related in concept to the library name. For example, the URL Standard Library contains
fourteen functions that allow you to manipulate URL addresses. Also of particular
interest is the WMLBrowser Standard Library which offers functions that provide an
interface between WMLScript code and the associated WML code. The six standard
libraries are:

 Dialogs Library
 Float Library
 Lang Library
 String Library
 URL Library
 WMLBrowser Library
Page 77
Wireless Application Protocol

The language is also composed of several statements, such as for, if, and while,
and an extensive suite of operators. The language is case sensitive. It is important to
understand that both the WML and WMLScript languages are rather restricted in term of
coding possibilities. Both languages are small in scope and diversity. This is required by
the current technological limitations of the wireless protocol (constraints include memory
size, processing power, and download time). Programmers accustomed to the unlimited
possibilities allowed by ASP, HTML, Visual Basic, and various other technologies
commonly used by developers on the wired web may find that programming in WML
and WMLScript for wireless application will require a bit more forethought.

3.1 Objective
The objective of this lesson is to understand the fundamentals of WML script,
which include a wide range of topics from fundamentals of developing operators to
console library. At the end of the lesson you learn about basic concepts of WML script.

3.2 Content

3.2.1 Operators

Arithmetic operators
The following table gives information over the arithmetic operators possible in
WMLScript.

Operator Function
x+y Addition of numbers/appendices of character strings
x-y Subtraction
x*y Multiplication
x/y Division
x%y Remainder of the division (modulo)
x div y integral division
x negatively
+x positively
x Pre Decrement
x -- Post office Decrement
++x Pre Increment
x++ Post office Increment

Logical operators

Page 78
Wireless Application Protocol

The following table gives information over the logical operators possible in
WMLScript.

Operator Function
x && y Logical and
x||y Logical or
!g Negation

Bit operators
The following table gives information over bits possible in WMLScript to
operators.

Operator Function
x << n pushing bit by bit to the left
x>>n pushing bit by bit to the right, retention of the sign
x>>>n pushing bit by bit to the right, filling up with 0
x&y bit by bit and
x|y bit by bit or
x^y exclusive OR bit by bit
~x negation bit by bit

Comparison operators
The following table gives information over the comparison operators possible in
WMLScript.

Operator Function
x>y more largely
x<y smaller
x>=y more largely directly
x <= y smaller directly
x == y directly
x! = y unequally

3.2.2 Variables
Before one can use variables in WMLScript, one must define it. Since variables in
WMLScript do not have a certain data type, they must only be preceded with the
keyword var. No keywords exist as int or float, as one knows it from other programming
languages. The declaration can be accomplished in arbitrary place in a function.
The name for a variable must follow certain conventions:

Page 79
Wireless Application Protocol

1. The name should begin with a small or a capital letter.


2. The name should not include special characters as _,! Etc...
3. The name should not represent a word from WMLScript, already reserved.
4. The name should not be used twice within a function.

Variable can be initialized with the declaration with a value. If a variable has not been
initialized but defined, then it contains the empty character string.
Several variables can be defined in one var instruction, and even they can be initialized.
The range of validity of a variable extends to the entire function, in which it is defined.
Example:
var x; variable declaration without initialization
var y = 100; variable declaration with initialization
var x, y = 100,; repeated variable declaration (with initialization)

Data type Integer (integer)

The data type Integer declares a positive or negative integer. The range of integer values
can vary between -2147483648 to 2147483647. Integers with a number sequence from
the range 0 to 9 are noted, whereby prominent 0 is not permitted.

Data type float (floating point number)

Under the data type float floating point numbers are declared. The range of float values
can vary between -1.1754943Ë-38 to 3.40282347E+38.

Data type character string

By the data type character string one understands the lining up of indications after the
UNICODE coding. Such character strings are included into simple inverted commas '' or
quotation marks "".

Data type Boolean (logical value)

The data type Boolean knows two constants, which again-reflect the logical value. The
value may either true or false.

Data type invalid


This data type represents a special data type. It has the constant value invalid , which can
represent invalid values for variables or operations. Thus for example the division by 0 is
evaluated as invalid.

Data type determination with typeof(...)

Page 80
Wireless Application Protocol

Variable do not have a firm data type in WMLScript. It depends on the contents of the
variables. However at run-time in order to determine, from which data type a variable is,
typeof(... ) can be used. The return value of typeof(...) is a code, which is representative
of a data type.

The allocation can be seen from the following table:

Code Data type


0 Integer (integer)
1 Float (floating point number)
2 Character string
3 Boolean (logical value)
4 invalid

Validation with isvalid(...)

At run-time it can be examined whether an expression is valid or invalid. The return


value of isvalid(...) can be either true or false which gives information over the validity
of the expression.

3.2.3 Control Structures


Like in other scripting languages WMLScript also has various control structures
to alter the course of a program with loops, like the for or while loop, program sections
can be repeated several times. A decision can be made by the IF condition, which
program section is implemented.

if condition

The general syntax of the if condition is as follows:

if (condition) perform code1 else perform code2

The keyword if introduces one if condition. The following, in parentheses included,


condition is evaluated as a logical value. If the logical value is perform code1 is executed
and if the logical value is false perform code2 is executed. The second branch ( else
branch) is however optional. If several instructions are to be implemented, then these
must be enclosed in a block with { and }.

while loop

The general syntax of the while loop is as follows:


Page 81
Wireless Application Protocol

while (condition) instruction

The keyword while introduces a while loop. The following, in parentheses included,
condition is evaluated as a logical value. As long as the condition is fulfilled, i.e. the
logical value is true, the instruction is implemented. If several instructions are to be
implemented, then these must be enclosed in a block with { and }. The following
example illustrates a while loop.

var x = 10;
var sum = 0;
while (x > 0)
{ sum = sum + x; x; }

for loop

The general syntax of the for loop is as follows:

for (initialization; Condition; Incrementation) instruction

The keyword for introduces one for loop. In the following round parentheses ( and ) are
initialization, condition and incrementation separated by a semicolon in each case. Before
the instruction of the for loop is executed for the first time, the initialization is
accomplished. This happens only once. Afterwards the condition is examined; It is
interpreted as logical value. As long as the condition is fulfilled, i.e. the logical value is
true, the instruction is executed. If all instructions are executed within the for loop, then
the incrementation instruction is executed and again the condition is examined.

BREAK and continue

With BREAK and continue the execution can be controlled within for and while loops. It
can be arranged that a loop is broken off prematurely and/or a cycle run is jumped over.
The instruction BREAK within for or while loops, terminates the complete cycle run
immediately. With the instruction continue one force the next cycle run immediately.
Following instructions (after occurrence of continue) within the loop are not executed in
the current cycle.
3.2.4 Functions
By functions one can summarize several instructions in a block. Functions can be
called by other program sections, whereby delivery of values over parameters to the
function is possible. With respect to WMLScript one can differentiate between 3 different
kinds of function calls (local, external and library function calls). In WMLScript a value
is always returned by a function. One can let a certain value return by an instruction
within the function, or if this is not particularly indicated, the function returns an empty
character string. The general syntax of a function in WMLScript:

Page 82
Wireless Application Protocol

[externally] function function name ([parameter list]) { };

The optional keyword externally marks a function, which can also be called by other
programs outside of the own Compilation unit. The keyword function is absolutely
necessary for the declaration of a function in WMLScript. Functions in WMLScript
cannot be interlocked. The function name must also be indicated. The function name
must be clear in its Compilation unit. The indication of a parameter list is optional.

Library functions

A function call of library functions refers to the standard libraries of WMLScript. The
call of a library function has the following syntax:

FunctionsName([ parameter list ])

The library name is the name of a standard library (lang, float, string, URL,
WMLBrowser, dialog) of WMLScript. The function name is a special name of a
function, which is placed in the indicated standard library from WMLScript to the order.
Library name and function name are separated by one point (.).

3.2.4.1 The Lang Library


The lang library puts a collection of functions at the disposal, which can be very
helpful with programming to the WMLScript programmer. An allocation of the functions
to a certain topic area cannot be made with this library.

 abort

lang.abort(errorDescription)

Aborts the interpretation of the WMLScript 1.1 bytecode and returns the control to the
caller of the WMLScript 1.1 interpreter with the return errorDescription. This function
can be used to perform an abnormal exit in cases where the execution of the WMLScript
1.1 should be discontinued because of serious errors detected by the calling function. If
the type of the errorDescription is invalid, the string "invalid" is used instead.

Parameters
errorDescription = String

Return Value
None (this function aborts the interpretation)

Examples
Lang.abort("Error: " + errVal); //Error value is a string
Page 83
Wireless Application Protocol

 abs

lang.abs(value)

Returns the absolute value of the given number. If the given number is of type integer, an
integer value is returned. If the given number is of type floating-point, a floating-point
value is returned.

Parameters
value = Number

Return Value
Number or invalid

Examples
var a = -3;
var b = Lang.abs(a); //b = 3

 characterSet

lang.characterSet()

Returns the character set supported by the WMLScript 1.1 interpreter. The return value is
an integer that denotes a MIBEnum value assigned by the Internet Assigned Numbers
Authority (IANA) for all character sets.

Return Value
Integer

Examples
var charset = Lang.characterSet();
// charset = 4 for latin1

 exit

lang.exit(value)

Page 84
Wireless Application Protocol

Ends the interpretation of WMLScript 1.1 bytecode and returns the control to the caller of
the WMLScript 1.1 interpreter with the given return value. This function can be used to
perform a normal exit from a function in cases where the execution of the WMLScript
1.1 bytecode should be discontinued.

Parameters
value = Any

Return Value
None (this function ends the interpretation)

Examples
Lang.exit("Value: " + myVal); // Returns a string
Lang.exit(invalid); // Returns invalid

 float

lang.float()

Returns true if floating-points are supported, and false if not.

Return Value
Boolean

Examples
var floatsSupported = Lang.float();

 isFloat

lang.isFloat(value)
Returns a boolean value that is true if the given value can be converted into a floating-
point number using parseFloat(value). Otherwise false is returned.

Parameters
value = Any

Return Value
Boolean or invalid

Exceptions
If the system does not support floating-point operations, an invalid value is returned.
Page 85
Wireless Application Protocol

Examples
var a = Lang.isFloat (" -123"); // true
var b = Lang.isFloat (" 123.33"); // true
var c = Lang.isFloat ("string"); // false
var d = Lang.isFloat ("#123.33"); // false
var e = Lang.isFloat (invalid); // invalid

 isInt

lang.isInt(value)

Returns a boolean value that is true if the given value can be converted into an integer by
using parseInt(value). Otherwise false is returned.

Parameters
value = Any

Return Value
Boolean or invalid

Examples
var a = Lang.isInt(" -123"); // true
var c = Lang.isInt("string"); // false
var d = Lang.isInt("#123"); // false
var e = Lang.isInt(invalid); // invalid

 max

lang.max(value1, value2);

Returns the maximum value of the given two numbers. The value and type returned is
the same as the value and type of the selected number. The selection is done in the
following way:

1. WMLScript 1.1 operator data type conversion rules for integers and floating-
points must be used to specify the data type (integer or floating-point) for
comparison.
2. Compare the numbers to select the larger one.
3. If the values are equal, the first value is selected.

Parameters
Page 86
Wireless Application Protocol

value1 = Number
value2 = Number

Return Value
Number or invalid

Examples
var a = -3;
var b = Lang.abs(a);
var c = Lang.max(a, b); // c = -3
var d = Lang.max(45.5, 76); // d = 76(integer)
var e = Lang.max(45.0, 45); // e = 45.0

 maxInt

lang.maxInt()

Returns the maximum integer value.

Return Value
Integer 2147483647

Examples
var a = Lang.maxInt();

 min

lang.min(value1, value2)

Returns the minimum value of the given two numbers. The value and type returned is
the same as the value and type of the selected number. The selection is done in the
following way:
1. WMLScript 1.1 operator data type conversion rules for integers and floating-
points must be used to specify the data type (integer or floating-point) for
comparison.
2. Compare the numbers to select the smaller one.
3. If the values are equal, the first value is selected.

Parameters
value1 = Number
value2 = Number

Return Value
Page 87
Wireless Application Protocol

Number or invalid

Examples

var a = -3;
var b = Lang.abs(a);
var c = Lang.min(a, b); // c = -3
var d = Lang.min(45, 76.3); // d = 45 (integer)
var e = Lang.min(45, 45.0); // e = 45 (integer)

 minInt

lang.minInt()

Returns the minimum integer value.

Return Value

Integer -2147483648

Examples

var a = Lang.minInt();

 parseFloat

lang.parseFloat(value)

Returns a floating-point value defined by the string value. The legal floating-point syntax
is specified by the WMLScript 1.1 numeric string grammar for decimal floating-point
literals with the following additional parsing rule:

1. Parsing ends when the first character is encountered that cannot be parsed as
being part of the floating-point representation.

The result is the parsed string converted to a floating-point value.

Parameters
value = String

Return Value
Floating-point or invalid
Page 88
Wireless Application Protocol

Exceptions
In case of a parsing error, an invalid value is returned. If the system does not support
floating-point operations, an invalid value is returned.

Examples
var a = Lang.parseFloat("123.4"); // a = 123.4
var b = Lang.parseFloat(" +7.34e2 Hz") // b = 7.34e2
var f = Lang.parseFloat("Number: 5.5"); // f = invalid
var g = Lang.parseFloat("7.3e meters"); // g = invalid
var h = Lang.parseFloat("7.3e- m/s"); // h = invalid

 parseInt

lang.parseInt(value)

Returns an integer value defined by the string value. The legal integer syntax is specified
by the WMLScript 1.1 numeric string grammar for decimal integer literals with the
following additional parsing rule:

1. Parsing ends when the first character is encountered that is not a leading `+' or `-'
or a decimal digit.

The result is the parsed string converted to an integer value.

Parameters
value = String

Return Value
Integer or invalid

Exceptions
In case of a parsing error, an invalid value is returned.

Examples
var i = Lang.parseInt ("1234"); // i = 1234
var j = Lang.parseInt (" 100 m/s"); // j = 100
var k = Lang.parseInt("The larch") // k = invalid

 random

lang.random(value)

Page 89
Wireless Application Protocol

Returns an integer value a with positive value that is greater than or equal to 0 but less
than or equal to the given value. The return value is chosen randomly or pseudo-
randomly with approximately uniform distribution over that range, using an
implementation-dependent algorithm or strategy. If the value is of type floating-point,
Float.int() is first used to calculate the actual integer value.

Parameters
value = Integer

Return Value
Integer or invalid

Exceptions
If value is equal to zero (0), the function returns zero.
If value is less than zero (0), the function returns invalid.
Examples
var a = 10;
var b = Lang.random(5.1)*a; // b = 0..50
var c = Lang.random("string"); // c = invalid

 seed

lang.seed(value)
Initializes the pseudo-random number sequence and returns an empty string. If the value
is zero or a positive integer then the given value is used for initialization, otherwise a
random, system-dependent initialization value is used. If the value is of type floating-
point, Float.int() is first used to calculate the actual integer value.

Parameters
value = Integer

Return Value
String or invalid

Examples
var a = Lang.seed(123); // a = ""
var b = Lang.random(20); // b = 0..20
var c = Lang.seed("seed");
// c = invalid (random seed left unchanged)

3.2.4.2 String Library

Page 90
Wireless Application Protocol

The String library contains a set of string functions. A string is an array of


characters. Each of the characters has an index. The first character in a string has an index
zero (0). The length of the string is the number of characters in the array.

The user of the String library can specify a special separator by which elements in a
string can be separated. These elements can be accessed by specifying the separator and
the element index. The first element in a string has an index zero (0). Each occurrent of
the separator in the string separates two elements; no escaping of separators is allowed.

A white-space character is one of the following characters:

TAB Horizontal tabulation


VT Vertical tabulation
FF Form feed
SP Space
LF Line feed
CR Carriage return
 charAt

string.charAt(string, index)

Returns a new string of length one containing the character at the specified index of the
given string. If the index is of type floating-point, Float.int() is first used to calculate the
actual integer index.

Parameters
string = String
index = Number (the index of the character to be returned)

Return Value
String or invalid.

Exceptions
If index is out of range, an empty string ("") is returned.

Examples
var a = "Monday, May 24";
var b = String.charAt(a, 0); // b = "M"
var e = String.charAt(a, "first"); // e = invalid

Page 91
Wireless Application Protocol

 compare

string.compare(string1, string2)

The return value indicates the lexicographic relation of string1 to string2. The relation is
based on the relation of the character codes in the native character set. The return value is
-1 if string1 is less than string2, 0 if string1 is identical to string2, or 1 if string1 is greater
than string2.

Parameters
string1 = String
string2 = String

Return Value
Integer or invalid

Examples
var a = "Hello";
var b = "Hello";
var c = String.compare(a, b); // c = 0
var d = String.compare("Jon", "Bye"); // e = 1

 elementAt

string.elementAt(string, index, separator)

Search string for the element enumerated by index, elements being separated by
separator, and return the corresponding element. If the index is less than 0, the first
element is returned. If the index is larger than the number of elements, the last element is
returned. If the string is an empty string, an empty string is returned. If the index is of
type floating-point, Float.int() is first used to calculate the actual index value.

Parameters
string = String
index = Number (the index of the element to be returned)
separator = String (the first character of the string used as separator)

Return Value
String or invalid.

Exceptions
Returns invalid if the separator is an empty string ("")

Page 92
Wireless Application Protocol

Examples
var a = "My name is Joe; Age 50;";
var b = String.elementAt(a, 0, " "); // b = "My"
var c = String.elementAt(a, 14, ";"); // c = ""
var d = String.elementAt(a, 1, ";"); // d = " Age 50"

 elements

string.elements(string, separator)

Returns the number of elements in the given string separated by the given separator.
Empty string ("") is a valid element (thus, this function can never return a value that is
less than or equal to zero).

Parameters
string = String
separator = String (the first character of the string used as separator)

Return Value
Integer or invalid.

Exceptions
Returns invalid if the separator is an empty string ("")

Examples
var a = "My name is Joe; Age 50;";
var b = String.elements(a, " "); // b = 6
var c = String.elements(a, ";"); // c = 3
var d = String.elements(""; ";"); // d = 1

 find

string.find(string, subString)

Returns the index of the first character in the string that matches the requested subString.
If no match is found, integer value -1 is returned. Two strings are defined to match when
they are identical. Characters with multiple possible representations match only if they
have the same representation in both strings. No case folding is performed.

Parameters
string = String
subString = String
Page 93
Wireless Application Protocol

Return Value
Integer or invalid

Examples
var a = "abcde";
var b = string.find(a, "cd"); // b = 2
var c = string.find(34.2, "de"); // c = -1

 format

string.format(format, value)

Converts the given value to a string by using the given formatting provided as a format
string. The format string can contain only one format specifier, which can be located
anywhere inside the string. If more than one is specified, only the first one (leftmost) is
used and the remaining specifiers are replaced by an empty string. The format specifier
has the following form:

% [width] [.precision] type

The width argument is a non-negative decimal integer controlling the minimum number
of characters printed. If the number of characters in the output value is less than the
specified width, blanks are added to the left until the minimum width is reached. The
width argument never causes the value to be truncated. If the number of characters in the
output value is greater than the specified width or, if width is not given, all characters of
the value are printed (subject to the precision argument).

The precision argument specifies a non-negative decimal integer, preceded by a period


(.), which can be used to set the precision of the output value. The interpretation of this
value depends on the given type:

d Specifies the minimum number of digits to be printed. If the number of digits in


the value is less than precision, the output value is padded on the left with
zeroes. The value is not truncated when the number of digits exceeds precision.
Default precision is 1. If precision is specified as 0 and the value to be converted
is 0, the result is an empty string ("").
f Specifies the number of digits after the decimal point. If a decimal point appears,
at least one digit appears before it. The value is rounded to the appropriate
number of digits. Default precision is 6; if precision is 0 or if the period appears
without a number following it, no decimal point is printed. When the number of
digits after the decimal point in the value is less than the precision, letter O
should be padded to fill columns. For example, the result of
Page 94
Wireless Application Protocol

String.format("%2.3f", 1.2) will be " 1.200".


s Specifies the maximum number of characters to be printed. By default, all
characters are printed. When the width is larger than the precision, the width
should be ignored.

Unlike the width argument, the precision argument can cause either truncation of the
output value or rounding of a floating-point value. The type argument is the only required
format argument; it appears after any optional format fields. The type character
determines whether the given value is interpreted as integer, floating-point or string. The
supported type arguments are:

d Integer The output value has the form [-]dddd, where dddd is one or more
decimal digits.
f Floating- he output value has the form [-]dddd.dddd, where dddd is one or
point more decimal digits. The number of digits before the decimal point
depends on the magnitude of the number, and the number of digits
after the decimal point depends on the requested precision.
s String Characters are printed up to the end of the string or until the
precision value is reached.

Percent character (%) in the format string can be presented by preceding it with another
percent character (%%).

Parameters
format = String
value = Any

Return Value
String or invalid.

Exceptions
Illegal format specifier results in an invalid return value

Examples
var a = 45;
var b = -45;
var c = "now";
var d = 1.2345678
var e = String.format("e: %6d", a); // e = "e: 45"
var f = String.format("%6d", b); // f = " -45"

 insertAt
Page 95
Wireless Application Protocol

string.insertAt(string, element, index, separator)

Returns a string with the element and the corresponding separator (if needed) inserted at
the specified element index of the original string. If the index is less than 0, then 0 is used
as the index. If the index is larger than the number of elements, then the element is
appended at the end of the string. If the string is empty, the function returns a new string
with the given element. If the index is of type floating-point, Float.int() is first used to
calculate the actual index value.

Parameters
string = String (original string)
element = String (element to be inserted)
index = Number (the index of the element to be added)
separator = String (the first character of the string used as separator)

Return Value
String or invalid.

Exceptions
Returns invalid if the separator is an empty string ("")

Examples
var a = "B C; E";
var s = " ";
var b = String.insertAt(a, "A", 0, s); // b = "A B C; E"
var c = String.insertAt(a, "X", 3, s) // c = "B C; E X"

 isEmpty

string.isEmpty(string)

Returns a boolean true if the string length is zero; otherwise returns a boolean false.

Parameters
string = String

Return Value
Boolean or invalid

Examples
var a = "Hello";
var b = "";
var c = String.isEmpty(a); // c = false
Page 96
Wireless Application Protocol

var d = String.isEmpty(b); // d = true

 length

string.length(string)

Returns the length (number of characters) of the given string.

Parameters
string = String

Return Value
Integer or invalid

Examples
var a = "ABC";
var b = String.length(a); // b = 3
var c = String.length("") // c = 0
var d = String.length(342); // d = 3

 removeAt

string.removeAt(string, index, separator)

Returns a new string where the element and the corresponding separator (if existing) with
the given index are removed from the given string. If the index is less than 0 then the first
element is removed. If the index is larger than the number of elements, the last element is
removed. If the string is empty, the function returns a new empty string. If the index is of
type floating-point, Float.int() is first used to calculate the actual index value.

Parameters
string = String
index = Number (the index of the element to be deleted)
separator = String (the first character of the string used as separator)

Return Value
String or invalid.

Exceptions
Returns invalid if the separator is an empty string ("")

Examples
Page 97
Wireless Application Protocol

var a = "A B C D";


var s = "";
var b = String.removeAt(a, 1, s); // b = "A B C D"

 replace

string.replace(string, oldSubString, newSubString)

Returns a new string resulting from replacing all occurrences of oldSubString in this
string with newSubString. Two strings are defined to match when they are identical.
Characters with multiple possible representations match only if they have the same
representation in both strings. No case folding is performed.

Parameters
string = String
oldSubString = String
newSubString = String

Return Value
String or invalid

Examples
var a = "Hello Christina. What is up Christina?";
var newName = "Marie"
var oldName = "Christina"
var c = String.replace(a, oldName, newName);
// c = "Hello Marie. What is up Marie?"

 replaceAt

string.replaceAt(string, element, index, separator)

Returns a string with the current element at the specified index replaced with the given
element. If the index is less than 0, the first element is replaced. If the index is larger than
the number of elements, the last element is replaced. If the string is empty, the function
returns a new string with the given element. If the index is of type floating-point,
Float.int() is first used to calculate the actual index value.

Parameters
string = String
element = String
index = Number (the index of the element to be replaced)
separator = String (the first character of the string used as separator)
Page 98
Wireless Application Protocol

Return Value
String or invalid.

Exceptions
Returns invalid if the separator is an empty string ("")

Examples
var a = "B C; E";
var s = "";
var b = String.replaceAt(a, "A", 0, s); // b = "A C; E"
var c = String.replaceAt(a, "F", 5, ";"); // c = "B C;F"

 squeeze

string.squeeze(string)

Returns a string where all consecutive series of white spaces within the string are reduced
to one.

Parameters
string = String

Return Value
String or invalid

Examples
var a = "Hello";
var b = " Bye John . See you! ";
var c = String.squeeze(a); // c = "Hello";
var d = String.squeeze(b) // d = " Bye John . See you! "

 subString

string.subString(string, startIndex, length)

Returns a new string that is a substring of the given string. The substring begins at the
specified startIndex and its length (number of characters) is the given length. If the
startIndex is less than 0, then 0 is used for the startIndex. If the length is larger than the
remaining number of characters in the string, the length is replaced with the number of
remaining characters. If the startIndex or the length is of type floating-point, Float.int() is
first used to calculate the actual integer value.

Page 99
Wireless Application Protocol

Parameters
string = String
startIndex = Number (the beginning index, inclusive)
length = Number (the length of the substring)

Return Value
String or invalid.

Exceptions
If startIndex is larger than the last index, an empty string ("") is returned.
If length <= 0, an empty string ("") is returned.

Examples
var a = "ABCD";
var b = String.subString(a, 1, 2); // b = "BC"
var c = String.subString(a, 2, 5); // c = "CD"

 toString

string.toString(value)

Returns a string representation of the given value. This function performs exactly the
same conversions as supported by the WMLScript 1.1 language (automatic conversion
from boolean, integer, and floating-point values to strings) except that invalid value
returns the string "invalid".

Parameters
value = Any

Return Value
String

Examples
var a = String.toString(12); // a = "12"
var b = String.toString(true) // b = "true"

 trim

string.trim(string)

Page 100
Wireless Application Protocol

Returns a string where all trailing and leading white spaces in the given string have been
trimmed.

Parameters
string = String

Return Value
String or invalid

Examples
var a = "Hello";
var b = " Bye John . See you! ";
var c = String.trim(a); // c = "Hello";

3.2.4.3 Float Library


The Float library contains a set of typical floating-point functions that are
frequently used by applications. The implementation of these library functions is optional
and implemented only by devices that can support floating-point operations. If floating-
point operations are not supported, all functions in this library must return invalid.

 ceil
float.ceil(value)

Returns the smallest integer value that is not less than the given value. If the value is
already an integer, the result is the value itself.

Parameters
value = Number

Return Value
Integer or invalid

Examples
var a = 3.14;
var b = Float.ceil(a); // b = 4
var c = Float.ceil(-2.8); // c = -2

 floor

float.floor(value)
Returns the greatest integer value that is not greater than the given value. If the value is
already an integer, the result is the value itself.
Page 101
Wireless Application Protocol

Parameters
value = Number

Return Value
Integer or invalid

Examples
var a = 3.14;
var b = Float.floor(a); // b = 3
var c = Float.floor(-2.8); // c = -3

 int

float.int(value)
Returns the integer part of the given value. If the value is already an integer, the result is
the value itself.

Parameters
value = Number

Return Value
Integer or invalid

Examples
var a = 3.14;
var b = Float.int(a); // b = 3
var c = Float.int(-2.8); // c = -2

 maxFloat

float.maxFloat()

Returns the maximum floating-point value supported by single-precision floating-point


format.

Return Value
Floating-point 3.40282347E+38

Examples
var a = Float.maxFloat();

Page 102
Wireless Application Protocol

 minFloat

float.minFloat()

Returns the smallest nonzero floating-point value supported by single-precision floating-


point format.

Return Value
Floating-point 1.17549435E-38

Examples
var a = Float.minFloat();

 pow

float.pow(value1, value2)

Returns an implementation-dependent approximation to the result of raising value1 to the


power of value2. If value1 is a negative number, then value2 must be an integer.

Parameters
value1 = Number
value2 = Number

Return Value
Floating-point or invalid.

Exceptions
If value1 == 0 and value2 < 0, then invalid is returned.
If value1 < 0 and value2 is not an integer, then invalid is returned.

Examples
var a = 3;
var b = Float.pow(a, 2); // b = 9
var c = 2.78
var d = float.pow(c, 3) // d = 2.783
 round

float.round(value)

Page 103
Wireless Application Protocol

Returns the number value that is closest to the given value and is equal to a mathematical
integer. If two integer number values are equally close to the value, the result is the
largest number value. If the value is already an integer, the result is the value itself.

Parameters
value = Number

Return Value
Integer or invalid

Examples
var a = Float.round(3.5); // a = 4
var b = Float.round(-3.5); // b = -3
var c = Float.round(0.5); // c = 1

 sqrt

float.sqrt(value)

Returns an implementation-dependent approximation to the square root of the given


value.

Parameters
value = Floating-point

Return Value
Floating-point or invalid.

Exceptions
If value is a negative number then invalid is returned.

Examples
var a = 4;
var b = Float.sqrt(a); // b = 2.0
var c = Float.sqrt(5); // c = 2.2360679775

3.2.4.4 URL Library


The URL library contains a set of functions for handling absolute URLs and
relative URLs. The general URL syntax is:
<scheme>://<host>:<port>/<path>;<params>?<query>#<fragment>

 escapeString

Page 104
Wireless Application Protocol

url.escapeString(string)

This function computes a new version of a string value in which special characters have
been replaced by a hexadecimal escape sequence; a two-digit escape sequence of the
form %xx must be used.

The characters to be escaped are:

Control characters <US-ASCII coded characters 00-1F and 7F>


Space <US-ASCII coded character 20 hexadecimal>
Reserved ; / ? : @ & = + $ ,
Unwise ( ) | \ ^ [ ] '
Delims < > # % "

The given string is escaped as such. No URL parsing is performed.

Parameters
string = String

Return Value
String or invalid.

Exceptions
If string contains characters that are not part of the US-ASCII character set, an invalid
value is returned.

Examples
var a = URL.escapeString("http://w.h.com/dck?x=\u007f#crd");
// a = "https%3a%2f%2ffanyv88.com%3a443%2fhttp%2fw.h.com%2fdck%3fx%3d%7f%23crd"

 getBase

url.getBase()

Returns an absolute URL (without the fragment) of the current WMLScript 1.1 file.

Return Value
String

Page 105
Wireless Application Protocol

Examples
var a = URL.getBase();
// a = "http://www.host.com/test.scr"

 getFragment

url.getFragment(url)

Returns the fragment used in the given url. If no fragment is specified, an empty string is
returned. Both absolute and relative URLs are supported. Relative URLs are not resolved
into absolute URLs.

Parameters
url = String

Return Value
String or invalid.

Exceptions
If an invalid URL syntax is encountered while extracting the fragment, an invalid value is
returned.

Examples

var a = URL.getFragment("http://w.h.com/cont#frag");
// a = "frag"

 getHost

url.getHost(url)
Returns the host specified in the given url. Both absolute and relative URLs are
supported. Relative URLs are not resolved into absolute URLs.

Parameters
url = String

Return Value
String or invalid.

Exceptions
If an invalid URL syntax is encountered while extracting the host part, an invalid value is
returned.

Page 106
Wireless Application Protocol

Examples
var a = URL.getHost("http://w.h.com/path#frag");
// a = "w.h.com"
var b = URL.getHost("path#frag");
// b = ""

 getParameters

url.getParameters(url)

Returns the parameters used in the given url. If no parameters are specified, an empty
string is returned. Both absolute and relative URLs are supported. Relative URLs are not
resolved into absolute URLs.

Parameters
url = String

Return Value
String or invalid.

Exceptions
If an invalid URL syntax is encountered while extracting the parameters, an invalid value
is returned.

Examples
a = URL.getParameters("http://w.h.com/script;3;27x=1&y=3");
// a = "3;2"
b = URL.getParameters("../script;3;2?x=1&y=3");
// b = "3;2"

 getPath

url.getPath(url)

Returns the path specified in the given url. Both absolute and relative URLs are
supported. Relative URLs are not resolved into absolute URLs.

Parameters
url = String

Return Value
Page 107
Wireless Application Protocol

String or invalid.

Exceptions
If an invalid URL syntax is encountered while extracting the path, an invalid value is
returned.

Examples
a = URL.getPath("http://w.h.com/home/sub/comp#frag");
// a = "3;2"
b = URL.getParameters("../script;3;2?x=1&y=3");
// b = "3;2"
// b = "../home/sub/comp"

 getPort

url.getPort(url)

Returns the port number specified in the given url. If no port is specified, an empty string
is returned. Both absolute and relative URLs are supported. Relative URLs are not
resolved into absolute URLs.

Parameters
url = String

Return Value
String or invalid.
Exceptions
If an invalid URL syntax is encountered while extracting the port number, an invalid
value is returned.

Examples
var a = URL.getPort("http://w.h.com:80/path#frag");
// a = "80"
var b = URL.getPort("http://w.h.com/path#frag");
// b = ""

 getQuery

url.getQuery(url)

Returns the query part specified in the given url. If no query part is specified, an empty
string is returned. Both absolute and relative URLs are supported. Relative URLs are not
resolved into absolute URLs.
Page 108
Wireless Application Protocol

Parameters
url = String

Return Value
String or invalid.

Exceptions
If an invalid URL syntax is encountered while extracting the query part, an invalid value
is returned.

Examples
a = URL.getParameters("http://w.h.com/home;3;2?x=1&y=3");
// a = "x=1&y=3"
var base = URL.getBase();
// base = "http://www.host.com/current.scr"

 getReferer

url.getReferer()

Returns the smallest relative URL (relative to the base URL of the current file) to the
resource that called the current file. Local function calls do not change the referer. If the
current file does not have a referer, an empty string ("") is returned.

Return Value
String

Examples
var referer = URL.getReferer();
// referer = "app.wml"

 getScheme

url.getScheme(url)

Returns the scheme used in the given url. Both absolute and relative URLs are supported.
Relative URLs are not resolved into absolute URLs.

Parameters
url = String

Page 109
Wireless Application Protocol

Return Value
String or invalid.

Exceptions
If an invalid URL syntax is encountered while extracting the scheme, an invalid value is
returned.

 isValid

url.isValid(url)

Returns true if the given url has the right URL syntax, otherwise returns false. Both
absolute and relative URLs are supported. Relative URLs are not resolved into absolute
URLs.

Parameters
url = String

Return Value
Boolean or invalid

Examples
var a = URL.isValid("http://w.hst.com/script#func()");
// a = true
var b = URL.isValid("../common#test()");
// b = true
var c = URL.isValid("experimental?://www.host.com/cont");
// c = false

 loadString

url.loadString(url, contentType)

Returns the content denoted by the given absolute url and the content type. The given
content type is erroneous if it does not comply with the following rules:
1. Only one content type can be specified. The whole string must match with only
one content type and no extra leading or trailing spaces are allowed.

2. The type must be text but the subtype can be anything. Thus, the type prefix must
be "text/".

The behavior of this function is the following:

Page 110
Wireless Application Protocol

1. The content with the given content type and url is loaded. The rest of the
attributes needed for the content load are specified by the default settings of the
user agent.

2. If the load is successful and the returned content type matches the given content
type, the content is converted to a string and returned.

3. If the load is unsuccessful or the returned content is of wrong content type, a


scheme-specific error code is returned.

Parameters
url = String
contentType = String

Return Value
String, integer, or invalid.

Exceptions
Returns an integer error code that depends on the used URL scheme in case the load fails.
If HTTP or WSP schemes are used, HTTP error codes are returned. If an erroneous
content type is given, an invalid value is returned.

Examples
var myUrl = "http://www.host.com/vcards/myaddr.vcf";
myCard = URL.loadString(myUrl, "text/x-vcard");

 resolve

url.resolve(baseUrl, embeddedUrl)

Returns an absolute URL from the given baseUrl and the embeddedUrl. If the
embeddedUrl is already an absolute URL, the function returns it without modification.

Parameters
baseUrl = String
embeddedUrl = String

Return Value
String or invalid.

Exceptions
If an invalid URL syntax is encountered as part of the resolution an invalid value is
returned.
Page 111
Wireless Application Protocol

Examples
var a = URL.resolve("http://foo.com/","foo.vcf");
// a = "http://foo.com/foo.vcf"

 unescapeString

url.unescapeString(string)

The unescape function computes a new version of a string value in which each escape
sequence of the sort that might be introduced by the URL.escapeString() function is
replaced with the character that it represents. The given string is unescaped as such. No
URL parsing is performed.

Parameters
string = String

Return Value
String or invalid.

Exceptions
If string contains characters that are not part of the US-ASCII character set, an invalid
value is returned.

Examples
var a = "https%3a%2f%2ffanyv88.com%3a443%2fhttp%2fw.h.com%2fdck%3fx%3d12%23crd";
var b = URL.unescapeString(a);
// b = "http://w.h.com/dck?x=12#crd"

3.2.4.5 WMLBrowser Library


The WMLBrowser library contains functions by which WMLScript 1.1 can
access the associated WML context. These functions must not have any side effects, and
they must return invalid in the following cases:
1. The system does not support the WML browser.
2. The WMLScript 1.1 interpreter is not invoked by the WML browser.

 getCurrentCard

WMLBrowser.getCurrentCard()

Returns the smallest relative URL (relative to the base of the current file) specifying the
card (if any) currently being processed by the WML browser. The function returns an

Page 112
Wireless Application Protocol

absolute URL if the WML deck containing the current card does not have the same base
as the current file.

Return Value
String or invalid.

Exceptions
Returns invalid if there is no current card

Examples
var a = WMLBrowser.getCurrentCard();
// a = "deck#input"

 getVar

WMLBrowser.getVar(name)

Returns the value of the variable with the given name in the current browser context.
Returns an empty string ("") if the given variable does not exist. Variable name must
follow the syntax specified by WML.

Parameters
name = String

Return Value
String or invalid.

Exceptions
If the syntax of the variable name is incorrect, an invalid value is returned.

Examples
var a = WMLBrowser.getVar("name");
// a = "Jon" or whatever value the variable has.

 go

WMLBrowser.go(url)

Specifies the content denoted by the given url to be loaded. This function has the same
semantics as the GO task in WML. The content is loaded only after the WML browser
receives control from the WMLScript 1.1 interpreter after the WMLScript 1.1 invocation
is finished. No content is loaded if the given url is an empty string (""). Go () and prev ()
library functions override each other. Both of these library functions can be called
Page 113
Wireless Application Protocol

multiple times before returning control to the WML browser. However, only the settings
of the last call stay in effect. In particular, if the last call to go() or prev() set the URL to
an empty string (""), all requests are effectively cancelled. This function returns an empty
string ("").

Parameters
url = String

Return Value
String or invalid

Examples
var card = "http://www.host.com/loc/app.dck#start";
WMLBrowser.go(card);

 newContext

WMLBrowser.newContext()

Clears the current WML browser context and returns an empty string (""). This function
has the same semantics as the NEWCONTEXT attribute in WML.

Return Value
String or invalid

Examples
WMLBrowser.newContext();

 prev

WMLBrowser.prev()

Signals the WML browser to go back to the previous WML card. This function has the
same semantics as the PREV task in WML. The previous card is loaded only after the
WML browser receives control from the WMLScript 1.1 interpreter after the
WMLScript 1.1 invocation is finished.

prev() and go() library functions override each other. Both of these library functions can
be called multiple times before returning the control back to the WML browser.
However, only the settings of the last call stay in effect. In particular, if the last call to
go() or prev() set the URL to an empty string (""), all requests are effectively cancelled.
This function returns an empty string ("").

Page 114
Wireless Application Protocol

Return Value
String or invalid

Examples
WMLBrowser.prev();

 refresh

WMLBrowser.refresh()

Forces the WML browser to update its context and returns an empty string. This function
has the same semantics as the REFRESH task in WML. The function returns an absolute
URL if the WML deck containing the current card does not have the same base as the
current file.

Return Value
String or invalid.

Exceptions
Returns invalid if there is no current card

Examples
Following is sample code that uses the WMLBrowser.refresh function call.
function convert2Peso(){
var dollars = WMLBrowser.getVar("amount");
var dol2peso = 10.2;
var newAmt = dollars*dol2peso;
WMLBrowser.setVar("amount", newAmt);
WMLBrowser.refresh();
}

 setVar

WMLBrowser.setVar(name, value)

Returns true if the variable with the given name is successfully set to contain the given
value in the current browser context; false otherwise. Variable name and its value must
follow the syntax specified by WML. Variable value must be legal XML CDATA.

Parameters
name = String
value = String
Page 115
Wireless Application Protocol

Return Value
Boolean or invalid.

Exceptions
If the syntax of the variable name or its value is incorrect, an invalid value is returned.

Examples
var a = WMLBrowser.setVar("name", "Mary"); // a = true

3.2.4.6 Dialogs Library


The Dialogs library contains a set of typical user-interface functions.
 confirm
dialogs.confirm(message, ok, cancel)

Displays the given message and two reply alternatives: ok and cancel. Waits for the user
to select one of the reply alternatives and returns true for ok and false for cancel.

Parameters
message = String
ok = String (text, empty string results in the default implementation-dependent text)
cancel = String (text, empty string results in the default implementation-dependent text)

Return Value
Boolean or invalid

Examples
function onAbort() {
return Dialogs.confirm("Are you sure?","Well...","Yes");
};
The example code displays as:

Figure 3.1

 prompt

Page 116
Wireless Application Protocol

dialogs.prompt(message, defaultInput)

Displays the given message and prompts for user input. The defaultInput parameter
contains the initial content for the user input. Returns the user input.

Parameters
message = String
defaultInput = String

Return Value
String or invalid

Examples
var a = "234-1234";
var b = Dialogs.prompt("Phone number: ",a);

The example code displays as:

Figure 3.2

3.2.4.7 Console Library


The Dialogs library contains a set of typical user-interface functions.

 Print

Console.print(string)

Used for debugging. Converts any value to a string and prints it to the SDK Phone
Information window.

 Println

Console.println(string)

Page 117
Wireless Application Protocol

Used for debugging. Converts any value to a string and prints it to the SDK Phone
Information window. This call is the same as console. Print except that it adds a new line
to the end of the string.

3.3 Revision Points

Functions
Functions can summarize several instructions in a block. Functions can be called by other
program sections, whereby delivery of values over parameters to the function is possible.

String library
The String library contains a set of string functions. A string is an array of characters.
Each of the characters has an index. The first character in a string has an index zero (0).
The length of the string is the number of characters in the array.

Float library
The Float library contains a set of typical floating-point functions that are frequently used
by applications.

3.4 Intext Questions


1. List the libraries available in WML Script.
2. What are the conventions that have to be followed while assigning variable
names in WMLScript?
3. Explain the control structures available in WMLScript.
4. Explain the parseInt() and random() functions.
5. Explain the difference between charAt() and elementAt() functions.

3.5 Summary
 WMLScript has a core group of six standard libraries.
 WMLScript language is case sensitive.
 Since variables in WMLScript do not have a certain data type, they must only
be preceded with the keyword var.
 If a variable has not been initialized but defined, then it contains the empty
character string.
 The lang library puts a collection of functions at the disposal, which can be
very helpful with programming to the WMLScript programmer.
 The user of the String library can specify a special separator by which
elements in a string can be separated.

Page 118
Wireless Application Protocol

 The Float library contains a set of typical floating-point functions that are
frequently used by applications.
 The URL library contains a set of functions for handling absolute URLs and
relative URLs.
 The WMLBrowser library contains functions by which WMLScript 1.1 can
access the associated WML context.
 The Dialogs library contains a set of typical user-interface functions.

3.6 Terminal Exercises


1. What does minFloat() and maxFloat() functions do?
2. What does the confirm() function do?
3. Explain the prompt() function.
4. Describe the functions in the Console Library.

3.7 Supplementary Materials


11. http://www.linktionary.com/w/wap.html
12. http://www.wapforum.org/
13. http://www.wap.com/
14. http://www.openwave.com/
15. http://www.wlana.com

3.8 Assignments
1. Discuss in detail about various operators used in WML script with examples.
2. Write a brief note on functions used in WML script.

3.9 Suggested Reading/Reference Books/Set Books

5. “Charles Arehart, Nirmal Chidambaram, S.Guruprasad, A.Howell,


S.Kasipillai “, “Professional WAP with WML, WML Script, ASP, JSP, XML,
XSLT, WTA, Push and VoiceXML”, SPD, Mumbai, 2000.
6. Martin Frost, “Learning WML & WML Script”, SPD, Mumbai, 2000.

3.10 Learning Activities

Page 119
Wireless Application Protocol

1. Collect information on functions (not covered in this lesson) from Internet.


2. Collect information on control structures with examples.
3.11 Keywords
BREAK
abort
abs
exit
float
max
min
random
seed
compare
find
format
length

Page 120
Wireless Application Protocol

Unit IV

 What Security is About


 The Importance of Security
 The Role of Security
 The Basic Issues
 Concepts
 Protocol Stacks
 Encryption
 Certificates
 WTLS
 Communication Models
 Internet Communication Model
 Wireless Communication Model
 WAP Security Issues
 The Gateway
 WIM

4.0 Introduction
Security of applications and computer systems is an issue that, quite rightly, many
IT professionals are concerned about. As corporations have utilized technologies, such as
remote access, Java and component technologies, and infrastructural advances like the
Internet, to facilitate new ways of working, new ways of doing business with clients,
partners and suppliers, and even to create entirely new products, services and business
models, the need for mechanisms to secure applications, networks and systems has
become more and more important.
WAP is another technology that extends the reach of communication networks,
provides new opportunities for innovative corporations, and adds to the complexity of the
environment within which applications need to be designed, built and deployed. There is

Page 121
Wireless Application Protocol

a set of concerns over how secure WAP is as a technology, and whether it is robust
enough to implement mobile commerce applications, and other applications with
stringent security requirements.
Before beginning this investigation of WAP security, it is worth noting that there
is no such thing as a secure system. The phrase 'secure system' means one that cannot be
compromised or accessed without authorization. Considering that hackers who set out to
compromise or penetrate systems are resourceful and always target unexpected aspects of
the systems, it would be a brave fool who declared a system to be immune to attack.
What can be said is that a particular system meets certain predefined security criteria in
that it can withstand attacks of a known type, and is therefore considered secure enough
for its intended purpose.
It is only feasible to make the assertion that WAP is or is not 'secure enough' for a
particular application when you understand the security requirements of that application,
the environment in which that application is to be deployed, the likelihood that the
application will be subject to attempts to compromise its security, and the nature of the
attempts that are likely to be made. Even then the statement is only valid until something
changes in the environment, or someone discovers a new security exposure in the
network, the environment, the technologies used or the platform on which the application
is deployed.

4.1 Objective
At the end of this unit you will have an understanding of:
 Protocol Stacks
 Encryption
 Certificates
 WTLS
 Communication Models
 WAP Security Issues
 WIM
4.2 Content

4.2.1 What Security is about?


We are going to begin the investigation of the topic of security with a discussion
of what security is about and why it matters. In this section we will investigate:

 The importance of security in mobile applications


 The role of security in protecting data and systems
 The basic issues which security solutions of all types need to address

Page 122
Wireless Application Protocol

Importance of Security
Security has an obvious role to play with regard to m-commerce and the ability to
secure transactions. Most people are aware of the need for securing information such as
credit card numbers, but the need for security in both the wired and wireless
environments is much broader than that.
At the moment, information often has a commercial value. Many dot-com
organisations make money through the sale or re-sale of information. This is not a new
phenomenon — newspapers have been doing it for centuries — but the new channels for
this kind of commercial activity have lowered the barriers to entry and increased the
amount (and hence the value) of the information available.
Information can also be sensitive. There are many reasons why this may be the
case, ranging from a justifiable desire for privacy to information that is sensitive on a
national security level. Sometimes the sensitivity comes from the content of the
information, at other times the timing of the information. For example, it is unacceptable
to allow some stock market investors to become aware of an impending profits warning
from a company before others, so the information is regarded as sensitive until it is
published formally to all investors.
The power associated with information must also not be underrated. Some
organizations have legal obligations to safeguard certain items of information. In some
cases divisions within organizations are subject to similar constraints. There are many
examples of information that are intrinsically powerful, for example, information about
military weapons.
Along with all of the sensitivity that naturally accompanies information, there is a
growing need to communicate digitally, because of the speed and convenience of doing
so. However, in certain ways these digital communications are more vulnerable to
compromise. Two major weaknesses in digital communications arise from the fact that it
is notoriously easy to intercept digital messages, and the fact that it is notoriously
difficult to establish identity conclusively in an online environment.
All of this leads us to two inevitable conclusions that drive the need for robust
security implementations: computer systems are critical to the operation of almost every
society on earth; and computer systems are very vulnerable to abuse.

The Role of Security


Security is both an enabling and disabling technology. Its purpose is to enable
communications and transactions to take place in a secure environment without fear of
compromise, while at the same time disabling non-legitimate activities and access to
information and facilities. Non-legitimate activities include eavesdropping, pretending to
be another party (also known as impostering or spoofing), or tampering with data during
transmission. In general these activities are either unacceptable or illegal outside of the
digital environment, so security simply helps to enforce the status quo in that sense.

Page 123
Wireless Application Protocol

4.2.2 The Basic Issues


There are a number of basic issues around security that have to be addressed.
Almost all of these have parallels in the real world, and often the solutions are based on,
or similar to, real-world solutions. These basic issues are:
 Authentication – being able to validate that the other party participating in a
transaction is who the party claims to be, or a legitimate representative of that
party.
 Confidentiality – being able to ensure that the content and meaning of
communications between two parties do not become known to third parties.
 Integrity – being able to ensure that messages received are genuine and have not
been tampered with or otherwise compromised.
 Authorization – being able to ascertain that a party wanting to perform some
action is entitled to perform that action within the given context.
 Non-repudiation – being able to ensure that once a party has voluntarily
committed to an action it is not possible to subsequently deny that the
commitment was given by that party.
4.2.3 Concepts
Familiarity with some concepts relating to digital communications and to security
are required in order to understand the points made later in this chapter, and the place
within the communications process of the existing security solutions.

Protocol Stacks
There is an industry standard theoretical protocol stack that was developed by the
Open Systems Initiative (OSI) many years ago, in part to facilitate a common
understanding of the functionality provided by a protocol stack and to facilitate
comparisons between different vendor's implementations. This stack is shown in the
diagram below.

Page 124
Wireless Application Protocol

Figure 4.1
The 'bottom most' layer of the OSI stack, Layer 1 or the physical layer, defines the
properties of the physical medium through which communications are transmitted and the
characteristics of electrical transmission through that medium.
Above that is Layer 2, the data link layer. The data link layer is responsible for the
transmission of data over the physical medium and also for the addressing of devices on
the network. The third layer is the network layer, which is responsible for network
addressing and for the routing of data between networks. The transport layer is the fourth
layer and is responsible for preparing data for transmission across the data-link. This
includes such functions as segmentation and reassembly of packets of information, and
also sequencing of packets and retransmission of packets that get lost or corrupted.
Layer 5 is the session layer, which is responsible for establishing and maintaining
sessions between two devices across a network. What exactly this entails depends on the
protocols involved.
Above layer 5 is the presentation layer, which is responsible for translation and
reformatting of data that is transmitted or received over the network. This helps to
facilitate communication between computers that are based on different architectures and
which utilize different information representation schemes.
The last layer, layer 7, is the application layer, which is responsible for identifying
requests for remote resources and for the reformatting of those requests as remote
requests. This allows applications to operate independently of the location of the services
that they utilize.
Although the details of the actual protocol stack will vary depending on a whole host
of factors (such as the type of network, where the client or server device resides) in
general in the wired world certain participants in the stack are more common and more
typical than others. The mapping of the wired protocol stack onto the OSI model is as
follows:
 Physical layer — UTP or co-axial cable
 Data link Layer — Ethernet, Token-ring, FDDI or PPP
 Network layer — IP
 Transport layer – TCP or UDP
 Session layer — TCP
 Presentation — varies, but could be NetBIOS or XDR
 Application layer — depends on the service being invoked; a typical example is
HTTP

In the wireless world a similar kind of mapping exists, although with different
protocols at each layer. The mapping of both the fixed-wire and WAP protocol stacks is
shown in the diagram below:

Page 125
Wireless Application Protocol

Figure 4.2

The WAP protocol stack contains the following elements:

 Physical and Data link layers — depends in part on the type of wireless
network, but with WAP it will be PPP over one or more over-the air bearer
protocols.

 Network layer — IP is the network layer protocol of choice, although not all
wireless networks are capable of transmitting IP, so SMS or some other non-
packet network protocol may be used.

 Transport layer — the transport layer protocol of choice is UDP, but it may not
be feasible over non-IP networks. For this and other reasons, WAP defines an
additional transport layer protocol, WDP, which can be used where UDP cannot.

 Session layer — In the wireless world some of the functionality of the session
layer is incorporated into WTP, while other aspects are included with WSP.

 Presentation layer — this functionality is included in WSP.

 Application layer — some aspects of application layer functionality are taken


care of by WSP, whereas others are implemented in the Wireless Application
Environment.

Page 126
Wireless Application Protocol

4.2.4 Encryption
Cryptography is the study of encryption, or the science of encoding data into
another format that cannot easily be decoded or understood, using some sort of
mathematical algorithm. The mathematical algorithms are based on an intractable
(difficult to solve) problem. There are two of these problems that are commonly used for
encryption: one is finding the prime factors of a very large integer; the other is finding the
logarithm of a very large number to a known base.
Developing and proving the robustness of an encryption algorithm (called a
cipher) is extremely difficult, so there are relatively few of these algorithms in existence.
If everyone used the same few algorithms their effectiveness at concealing information
would be severely limited, so the algorithms use keys, which are strings of bits, to
'customize' the behavior of the algorithm. What this means, in effect, is that the same
algorithm can be used to encode the same original information twice using two different
keys and produce two completely different encoded forms. This helps to make these
algorithms useful for multiple people from the point of view that in order to decode the
message both the algorithm and the key have to be known.
In general, the strength of the algorithm (usually defined in terms of how much
effort is required to decode an encoded message) depends on the length of the key.
Unfortunately the relationship is not actually that simple, because keys of equivalent
lengths can provide different levels of protection when used with different algorithms.
Therefore there is no general rule about how long a key should be, although some
guidelines do exist for various algorithms. The problem with these guidelines is that as
computer power increases the ease with which algorithms can be cracked also increases,
so it is necessary to be constantly aware of advances in this area.
All cryptographic algorithms, because of their computationally intensive nature
(remember they are dealing with intractable mathematical problems) are computationally
expensive, which is a nice way of saying that they are slow on most computers. This has
implications in most applications, where processing power is not unlimited and where
response times count. However, it is also true that not all algorithms are equally
computationally expensive.
In particular, there is a class of ciphers that are particularly expensive, but which
provide some particularly useful features. These are called asymmetric ciphers. Their
less computationally expensive counterparts are called symmetric ciphers. Symmetric
ciphers make use of the same key to both encode and decode the data. The problem with
these types of ciphers is that both the party encoding the message and the party decoding
the message need to have a copy of the key, and finding a secure way to exchange the
key is an intractable problem in its own right.
Asymmetric ciphers make use of a complex mathematical property of the
underlying algorithms that allows two different keys to be used — one for encryption,
and one for decryption. The key that is used for encryption is known as the public key,
and is derived from the private key, which is used for decryption.
This arrangement means that there is no need to exchange keys, as the public key
cannot be used for decryption, so it doesn't matter if it falls into the wrong hands. The

Page 127
Wireless Application Protocol

private key has to be carefully guarded, but this is relatively easy to achieve, as there is
no need for anyone other than the rightful owner to be given access to the key.
One way that we can address some of the performance issues associated with
encryption, yet still make use of the most robust encryption methods available, is to make
use of symmetric ciphers for most encryption and asymmetric ciphers to facilitate the
exchange of the symmetric keys. In fact it is a little bit more complex than this, because
these mechanisms of key exchange are often not used to exchange the symmetric key
itself, but are instead used to exchange a piece of information called the pre-master
secret, which is exchanged in encrypted format using asymmetric encryption. This pre-
master secret can be used in conjunction with public and private keys to generate a secret
key that is used for the symmetric encryption. The means by which this is achieved is
quite clever, but here there will be no attempt made to explain it because there isn't
enough space to go into all of the mathematics and the detail of how the ciphers work,
which would be required to understand how it is done.

4.2.5 Certificates
Certificates are a convenient place for storing and managing public keys. They
also form the basis of authentication in digital communications, being the digital
equivalent of a passport. Like a passport, they have to be issued by a recognized authority
and contain certain things that allow the subject's identity to be confirmed and the
certificate's validity to be ascertained. The former is achieved by including some
identifying information on the subject, along with the subject's public key. The latter is
achieved by certificates being issued by a recognized Certification Authority, and being
digitally signed by that authority. The Certification Authority's signature is widely and
publicly available for use in validating the certificate.
Digital signatures are based on hash algorithms (also called message digests),
which produce a 'digested' version, called the hash code, of the text that they take as
input. The hash function is deterministic, which means that the hash value that it
produces is dependent on the text that it takes as input in such a way that any alteration in
the text produces a significant change in the hash code. A good hash function is also a
one-way function, meaning that the function cannot be derived from the hash value and
the input text, and it is also collision resistant, which means that no two input values
should produce the same hash value. Digital signatures are based on a special type of
hash function that takes a key as input, as well as the original text. This means that the
hash value is dependent on both the input text and the key, and therefore if A and B both
sign some text using their own keys, the hash value produced will be different. In this
sense digital signatures are slightly unlike real-world signatures, in that they will vary
depending on the content that is being signed, which also makes them almost impossible
to forge.
Certificates are fairly complex documents, and are usually presented and
validated on behalf of the user without any human intervention. This has two
ramifications:

 The certificates end up stored on computer, floppy disks, etc.

Page 128
Wireless Application Protocol

 It is impossible to track down copies of certificates if it becomes necessary to


change or replace one

The first of these issues causes some problems in the wireless-world, which we will
investigate later on. The second is addressed by means of Certificate Revocation Lists
(CRLs). These are lists that are maintained by the Certification Authorities of certificates
that have been issued, but that have become invalid for some reason or another. CRLs
should be consulted before simply accepting a certificate as being valid.
Because of the large universal need for certificates, it is not feasible for a single
organization to be responsible for the administration of all certificates, so there is a
facility whereby certification authority can be delegated to other organizations. Any
organization, theoretically, can act as a certification authority, and many organizations
fulfill that capacity for certificates used internally, for example by employees. However,
certificates that are valid in the public domain have to be certified by a recognized
authority. Certificate chains make this feasible; by chaining certificates to the certificates
that certify their authenticity a trail is built back to some authority that can be deemed to
be acceptable.

4.2.6 WTLS
WTLS is the Wireless Transport Layer Security protocol. As can be
ascertained by the name, it operates at, or more correctly just above, the transport layer in
the OSI protocol stack. It is based on transport layer security (TLS), which is the de facto
security implementation on the Internet. It works by establishing a session between a
client and a server (which in the case of WTLS is the WAP gateway), during which it
negotiates security parameters to be used to protect the session. These include the
encryption protocols to be used, signature algorithms, public keys, pre-master secrets, or
the exchange of certificates, depending on the capabilities of both the client and the
server and the required level of security. The process of establishing a session is called
the handshake. Once a session has been established all communications between the
mobile device and the WAP gateway are encrypted, and therefore should be
unintelligible if they are intercepted.
WTLS includes support for both a full handshake, with negotiation of all security
parameters, and for a 'lightweight' handshake in which the security parameters of another
session are reused. Support is also provided for session suspend and resume, which is
useful in a wireless environment where reception quality is not always that good and
where connections can easily be lost. The sessions can continue to exist despite a
terminated connection and can be resumed on reconnection. Using this facility, it is
possible to have sessions that last for days at a time.
The advantages of sessions that can continue to exist for days at a time must be
weighed against the security implications of this feature. The longer the session remains
valid for, the longer the secret keys remain valid for, and, presumably, the greater the
number of messages exchanged that are encrypted using this key. This all provides
material to someone wanting to crack the security protecting the session and compromise
the messages. To guard against this, WTLS allows keys to be renegotiated periodically

Page 129
Wireless Application Protocol

during a session. Renegotiating keys is not as computationally expensive as establishing


the keys in the first place, so this is still more efficient that tearing down and re-
establishing the session.
Another advantage of WTLS over TLS is that it operates over UDP. TLS requires
a reliable transport protocol, in particular TCP, so it cannot be used over UDP. WTLS
addresses this shortcoming, and also functions over WDP in the absence of UDP.
Certificates, for all of their usefulness, were not really designed with mobile devices in
mind. WAP defines a new format of certificate that is optimised for storage on mobile
devices and for transmission over constrained networks. These certificates still provide
all of the functionality and security of their more heavyweight counterparts, but rely on
the server to perform more of the processing under some circumstances.
WTLS therefore provides a comprehensive, optimised solution for both client and
server based authentication using certificates, secure exchange of symmetric keys,
anonymous and authenticated encryption of data, and support for digital signing of data.
There are three classes of WTLS implementation defined in the WAP specification. They
are:

 Class 1: Anonymous key exchange with no authentication.

 Class 2: Certificate based server authentication. Server key is anonymous or


authenticated, client key is anonymous.
 Class 3: Certificate based client and server authentication. Both client and server
keys are anonymous or authenticated.

4.2.7 Communication Models


The best way to achieve an understanding of the merits of the implementation of
security in the wireless environment is to compare it to the implementation of security in
the fixed-wire world, that is, the Internet.

Internet Communication Model


The Internet communication model assumes that a client PC connects to a server
via an ISP dial-up connection. The client will be connected into the ISP systems over a
PSTN or ISDN link, with PPP usually used as the bearer protocol. The connection point
on the ISP network is to a RAS server, which will perform certain functions on behalf of
the remote client. In particular, the RAS server effectively acts as a proxy for the remote
client, collecting network packets and forwarding them across the dial-up link. The RAS
server is responsible for validating the client that is dialing in, and there are various
means at its disposal to do that. The RAS server is typically on a secure part of the ISP
network and thus provides the illusion to all other devices that the remote client is in fact
also on the local network. The ISP secure network environment is usually isolated from
the Internet by means of a firewall of some sort. This firewall will attempt to regulate
traffic that enters the local network, and protect the devices on the local network from
malicious attacks over the Internet. A typical example of the Internet communication
model is shown in the diagram below:

Page 130
Wireless Application Protocol

Figure 4.3

The ISP may also choose to run one or more web servers and/or other facilities in
a way that is more easily accessible to the public, and by extension also more vulnerable
to attack. This area of the network is referred to as the demilitarized zone (DMZ), and is
usually on a separate network segment from the secure area. Note that this is only one
possible configuration for a network. Any particular implementation is likely to be far
more complex and to be different in any number of ways.
Access to the Internet is typically facilitated by one or more gateway devices,
which are connected both to the ISP network and to some other network, possibly one run
by one of the global Internet backbone providers. Any message entering the network
across the gateway will be forwarded from gateway to gateway across the Internet, until
it arrives at the destination network. It will then cross the gateway and enter the local
network of the target host. In a way similar to the ISP, the host may also have a DMZ
which houses the web server, with traffic entering the secure network filtered through a
firewall. The firewall may only permit traffic originating from the web server to enter the
secure network. On the network behind the firewall will reside any additional
applications required to fulfill the request, and these will be used by the web server as
required.
In examining the Internet model from the perspective of who controls or has the
ability to influence the connection from a security point of view, it is apparent that the
TLS connection exists between the client device and the web server. In effect this forms a
tunnel between the client and server, and anyone penetrating this tunnel would not be
able to decipher any messages intercepted. The ISP retains responsibility for the devices
on its own network and for validating that the client is permitted to connect to the
Page 131
Wireless Application Protocol

network in the first place, but has no ability to influence the TLS session. The extent of
each parties influence is illustrated below.

Figure 4.4

Wireless Communication Model


The wireless communication model is more complex because there are more ways
in which the connection could be achieved. The model that we will examine at this point
in time is one which many, possibly the majority of, connections that take place between
the person-in-the-street and some WAP enabled web site will take place over. That is not
to say that this is necessarily the best model from any particular point of view, just that
many connections will be effected in this manner.
In this model the remote client is a mobile device, but still dials into an RAS
server on some network somewhere. This is likely to be an RAS server hosted and owned
by the network provider, and is therefore likely to be on the network provider's own local
network. The network provider will typically also host the WAP gateway, and a web
server to provide access to the premium rate services that the network provider offers to
their members. If access is required to services hosted on another server somewhere
across the network, then the WAP gateway will act as a proxy for the client mobile
device in establishing the required sessions with the remote host. From the point of view
of security, this scenario has various implications. WTLS is the security protocol that will
be used to secure communications to and from the mobile device, but the mobile device's
session is necessarily with the WAP gateway rather than the remote host's web server. At
the gateway, the secure session terminates and all encrypted material is decrypted. Should
there be a requirement for a secure session for communication with the web server, it will
be established by the WAP gateway on behalf of the mobile device. This model is
illustrated below:

Page 132
Wireless Application Protocol

Figure 4.5

The WAP gateway will use TLS to establish such a secure session. While TLS is
obviously a robust security protocol, it remains a fact that the secure session is not
between the mobile device and the web server. There are actually two secure sessions in
play: one between the mobile device and the WAP gateway and the other between the
WAP gateway and the web server. This means that there is a security gap, in which the
data is not encrypted, at the WAP gateway. This gap, and the span of control of the host
server and network operator are illustrated below.

Figure 4.6
Page 133
Wireless Application Protocol

The host server's span of control is severely compromised in comparison to the Internet
model. In fact, the host has absolutely no control over the security that exists between the
mobile device and the WAP gateway. The host also has limited control over the TLS
session between the WAP gateway and the web server, and will be limited to providing
security that does not exceed a level determined by the network operator. This may or
may not be adequate for the host.

4.2.8 WAP Security Issues


There are two issues with regard to security in the WAP environment. There are
ways of addressing both of these issues, but they both remain issues that need to be
addressed.

The Gateway
We have established that there is a security gap in the WAP model in the form of
the WAP gateway. Because of the way that WAP works it is not feasible to do away with
the gateway, so we need to establish to what extent it actually is a risk and what the
alternative ways of addressing the risk are.
It can be argued that the WAP gateway is not actually a security risk because the
gateway vendors are aware of the issue and therefore take steps to ensure that the process
of decrypting from WTLS and re-encrypting into TLS cannot easily be compromised.
Typical of the steps taken will be to ensure that the decryption and re-encryption takes
place in memory, that keys and unencrypted data are never saved to disk, and that all
memory used as part of the encryption and decryption process is cleared before being
handed back to the operating system.
The first problem with all of this is that there are no standards of guarantees about
these precautions. You have no way of ascertaining how robust your vendor's
implementation actually is, and in the case of a gateway that is hosted by a network
operator you may not even be able to tell whose implementation it is. One can also
questions of the vendor's promises: in a heavily loaded server, how exactly does the
gateway prevent the operating system from swapping memory pages out to swap space?
In a sense, saying that the vendors are aware of the issue and taking steps to
address it is comforting. However, it must also be remembered that Microsoft are aware
of the security exposures of the Internet Explorer browser and the Outlook mail client,
but they continually take flack as a result of a seemingly unending stream of security
loopholes and exposures that are constantly being discovered and exploited. A vendor
that has extremely competent programming staff and designers, and which implements
their product only on a very secure operating system in a thoroughly secured environment
under the control of extremely competent administrators, could provide a reasonably
secure implementation. Still there is an exposure around the gateway and that sooner or
later it will become a target for hackers.
What you need to consider is how much of an exposure it is for the kinds of
applications that you are developing. For some applications the risk-reward ratio, when
compared to the cost of implementing a more secure solution, may be small enough that

Page 134
Wireless Application Protocol

the vendor decides to take the risk. For others, where the risk by far outweighs any
possible reward, there is no question that it is a complete show stopper.
If we accept that there is an exposure at the gateway, no matter how small or how
hard the vendors work to protect the unencrypted data, the real question then becomes:
who hosts the gateway? Whoever hosts the gateway has the responsibility for protecting
it and the data that goes through it, and also has access (potentially, at least) to all of the
data that goes through the gateway in unencrypted form.
The good news is that it is entirely possible for you to host your own gateway,
although before doing so you should consider the implications, in terms of cost and
otherwise, of doing so. There are also two different architectures that can be implemented
to facilitate hosting your own gateway, and each has different characteristics in terms of
security and cost overheads.
The first model, which is shown in the following diagram, is probably only
suitable if you want to provide access to a limited number of people who are not the
general public, possibly employees:

Figure 4.7

Here, security is absolutely paramount. In this scenario you would choose to


establish an environment similar to any other highly secure dial-up environment. You
would establish a bank of dial-up modems connected to one or more RAS servers on your
local network. You would be responsible for establishing, maintaining and administering
the environment, including details such as dial-up security (possibly through RADIUS or
similar). You would then be able to strictly control who has access to the gateway, when

Page 135
Wireless Application Protocol

this access is possible, and via what telephone numbers. You could implement dial-back
to a limited set of numbers, control the IP addresses available, issue and use your own
certificates for authentication, and anything else that would contribute to your secure
environment. All of the relevant servers would be a secure segment of your local
network, and access to and from the Internet may or may not be available. If it is
available it will almost certainly be protected by one or more firewalls. In this
environment, as illustrated below, the network operator's sphere of influence is almost
non-existent:

Figure 4.8

The network operator is restricted to connecting the call and has no influence over
any of the communications between the client and server. The network operator does not
have a gateway that participates in the communication process, and has no role to play
with regard to security. The mobile device establishes a WTLS session that tunnels
through the RAS server to the gateway, and a TLS session from the gateway to the web
server, all on your own secure network.
The second model eliminates the need for the modems and RAS server by making
use of the services provided by an ISP. This model is in fact very similar to the Internet
model, although there are some differences. The remote mobile device will establish a
dial-up connection with the ISP's RAS server through a modem hosted by the ISP. The
network operator is restricted to connecting the call and has no further influence on the
session or the security environment. The RAS server at the ISP acts as a proxy for the
mobile device on the ISPs network, and provides all the services that it would to a fixed
wire dial-up client. The ISP network is connected to the Internet via a gateway and is
protected by a firewall. The diagram below shows this model:

Page 136
Wireless Application Protocol

Figure 4.9

The host's environment would usually be similar to an environment for access by


fixed-wire clients over the network. The major difference would be that the host would
have a WAP gateway available on the network, typically in the DMZ. Any secure
connection from the mobile device would establish a secure session that tunnels through
the ISP's RAS server to the WAP gateway. The WAP gateway would then establish a
secure TLS session through to the web server, which would make use of services on the
application servers hosted on the secure network behind the firewall.
In this scenario we are making use of WTLS in a similar way to a Virtual Private
Network (VPN), in that the mobile device establishes a secure tunnel through to the
target network. In the case of a VPN, the tunnel is typically to the router on the network,
although it doesn't have to be, whereas in this model the 'VPN' tunnels to the WAP
gateway. You will need to examine the security requirements of your application to
determine whether WTLS provides a secure enough 'VPN' for your application.
The other thing to be aware of in this model is that the WAP gateway is typically
on the DMZ, which means that it is not as heavily protected as it would be if it were
behind the firewall on the secure network segment. This makes it more vulnerable to
attack by hackers. If there is little chance of the WAP gateway being targeted then this is
probably not an issue, but for a large retail bank, for example, where the gains to be had
from cracking the gateway may be significant, it may present a temptation. On the other
hand, if you have to provide public access to your WAP gateway then there is little in the
way of feasible alternatives, unless you want to become a network provider in your own

Page 137
Wireless Application Protocol

right. The span of control of the network operator, ISP and host are shown in the diagram
below:

Figure 4.10

For almost all applications that have security requirements that prohibit the use of
a network provider's gateway, one of these two models will almost certainly be sufficient.
The trick is to match the trade-offs, in terms of cost and overheads, against your security
requirements and risk to achieve an optimal solution.

User versus Device


The second issue that is worth considering with mobile devices, and which is not
really a consideration for fixed-wire devices, is the issue of who or what is being
authenticated by the certificate. We have seen previously that a certificate is a reasonably
large and complex thing, certainly too complex to type in each time it is required. The
result is that the certificate usually ends up being held on your computer, often without
you even being aware that it is there, and the system will take card of presenting and
validating certificates as and when required.
While this is very convenient, it does have some security implications, in that
anyone who gains access to your computer can make use of your certificates. The
prerequisite is for the person to gain access to your computer. In many cases this is not
that easy to achieve, requiring breaking and entering or something similar.
Mobile devices are different in that they are mobile and are therefore carried
around. This also leads to them being lost, left on trains, and so on. In 1999, Railtrack,
the company responsible for the rail network in the UK, announced that for the first time
this century the umbrella has been overtaken as the most popular item to leave on a train
— by mobile phones. This gives us a feeling for the magnitude of the problem. Clearly,
where access to data or services has to be strictly controlled it will not be an acceptable
solution to store certificates on the phone if those certificates provide access to data and
services.

Page 138
Wireless Application Protocol

The most immediate way of tackling this problem is to accept that the certificate
is going to be stored on the phone, and the phone may be lost. The certificate is still made
use of to validate that the mobile device is entitled to access the network, which at least
serves to eliminate all of those mobile devices that do not have the required certificate.
Once the mobile device is reported missing the certificate can be placed on a certificate
revocation list to ensure that it does not provide access in the future.
To further validate that the current user of the authenticated device is the rightful
user you can make use of a variety of systems, which vary in their complexity and
robustness from a simple PIN number through to a SecureID token. While it is easy to
dismiss a PIN as being inadequate, pause to remember that almost all of us make use of
automated teller machines, and in doing so daily rely on simple PIN numbers to protect
our financial assets. Of course when asking users to enter PIN numbers on a mobile
device the necessary precautions must be taken, such as masking the numbers with
asterisks, and so on.

Future
It is always difficult and risky to gaze into the future and predict what is coming
down the line, but it is also necessary to make educated assessments of the current
technology and what is likely to be addressed in the near future. WTLS, being based on
an established and stable standard, is unlikely to change significantly or fundamentally
for the foreseeable future. Most of the changes in the next few releases will be oriented
towards clarifying some issues in the specification and general 'housekeeping'. The 1.2
specifications did this, and added some advice about guarding against certain types of
attacks. All of this information is only of relevance to people who are developing their
own WTLS implementation, and also much of the information dates very quickly, so we
can expect it to be refreshed in just about every release. There won’t be any major
changes unless a major security exposure in one of the ciphers is identified.

End-to-End Security
The WAP Forum has made it clear that they are aware of the issues around the
security gap at the WAP gateway. They have also make it clear that they intend to plug
the gap by providing an end-to-end security standard in a subsequent release. There have
been hints that they would attempt to address this through changes to WTLS, but this is
marketing rather than technology speaking. The issue does not arise because of any
weakness in WTLS and is caused solely by the position that the gateway fulfils in the
WAP communications chain. In order to address the issue, either the gateway has to be
eliminated or some other solution has to be implemented, probably at a higher level in the
protocol stack.
The WAP Forum has also indicated that the WMLScript Crypto library may be
extended in the future to include cryptographic functions. At this point in time there is
only a function that supports signing data. To my mind, it seems logical that the way to
implement end-to-end security is by means of encryption functionality at the application
level. A necessary prerequisite for this, however, will be the capability of mobile devices

Page 139
Wireless Application Protocol

to deal with the processing loads associated with encryption functions. Part of the
solution to this problem may actually lie in the WIM.

4.2.9 Wireless Identity Module (WIM)


The Wireless Identity Module specification is new in the WAP 1.2 specification.
It provides a means to offload the storage of keys and of cryptographic functions onto
what is described as a tamper proof device. This is basically a smart card, although it
could also be a SIM. The specification covers only the low level capabilities of a WIM in
the current specification, and doesn't present an API for making use of a WIM when
present, although we can expect that an API and framework will be provided in a future
release. The introduction of the WIM could help to address the issues around
authenticating the device as opposed to the user.
There has been a lot of fuss about security in the WAP world, some of it justified,
but most of it being misinformation and misunderstanding. Often it has been observed
that WAP 1.1 does not include security. This is an example of the misinformation that
has been around in the industry: WTLS was part of WAP 1.1 and is almost unchanged in
WAP 1.2. Security has been there all the time. What is true is that not all vendors have
implemented all parts of the specification, and WTLS has often not been implemented at
all or has only been implemented at class 1. This will be resolved in time, as vendor's
products become more mature and robust, and as the public need for robust security
implementation forces vendors to include security in their product offerings.
Even if your WAP gateway does not include WTLS, a WTLS gateway can be
obtained from some reliable security solution vendors, like Baltimore Technologies,
which will sit on your network between the mobile device and your WAP gateway to
provide a WTLS implementation. This type of solution is only feasible if you are hosting
your own WAP gateway.
WAP can and does provide a robust, secure environment in which an organization
can conduct m-commerce or communicate securely. Attention does need to be paid at this
stage to the specifics of the implementations, so a thorough evaluation before committing
to a particular vendor's implementation is advised. However, there are robust products
our there that you can use to implement a secure environment.

4.3 Revision Points

Protocol stack
Network communication protocols are defined within the context of a layered
architecture, usually called a protocol stack. The protocol stack defines how
communication hardware and software interoperate at various levels. Layering is a design
approach that specifies different functions and services at levels in the protocol stack.

OSI model
It is a set of protocols that would promote open networking environments that would let
multivendor computer systems communicate with one another using internationally
accepted communication protocols.

Page 140
Wireless Application Protocol

Cryptography
Cryptography is concerned with keeping information, usually sensitive information, and
private. Information is encrypted to make it private and decrypted to restore it to human-
readable form.

4.4 Intext Questions


1. What is WIM?
2. What is a cipher?
3. What is the importance of security?
4. What are the basic issues around security?
5. List the layers in OSI model.

4.5 Summary
 Security has an obvious role to play with regard to m-commerce and the
ability to secure transactions.
 The data link layer is responsible for the transmission of data over the
physical medium and also for the addressing of devices on the network.
 The presentation layer, which is responsible for translation and reformatting
of data that is transmitted or received over the network.
 Cryptography is the study of encryption, or the science of encoding data into
another format that cannot easily be decoded or understood, using some sort
of mathematical algorithm.
 Symmetric ciphers make use of the same key to both encode and decode the
data.
 Certificates are a convenient place for storing and managing public keys.
 Digital signatures are based on hash algorithms (also called message digests),
which produce a 'digested' version, called the hash code, of the text that they
take as input.
 WIM provides a means to offload the storage of keys and of cryptographic
functions onto what is described as a tamper proof device.

4.6 Terminal Exercises


1. Explain the functionality of, each of the layers in the OSI model.
2. Explain public and private keys.
3. Explain the WTLS protocol.

Page 141
Wireless Application Protocol

4. Describe the Wireless communication model.


5. What is the security issues involved in WAP?
4.7 Supplementary Materials
1. http://www.linktionary.com/w/wap.html
2. http://www.wapforum.org/
3. http://www.wap.com/
4. http://www.iso.ch
5. http://www.wlana.com
4.8 Assignments

1. List the major disadvantages with the layered approach to protocols.


2. Write a brief note on Cryptography.
4.9 Suggested Reading/Reference Books/Set Books

7. “Charles Arehart, Nirmal Chidambaram, S.Guruprasad, A.Howell,


S.Kasipillai “, “Professional WAP with WML, WML Script, ASP, JSP, XML,
XSLT, WTA, Push and VoiceXML”, SPD, Mumbai, 2000.
8. Martin Frost, “Learning WML & WML Script”, SPD, Mumbai, 2000.
4.10 Learning Activities

Collect information on WIM (not covered in this lesson) from Internet.

4.11 Keywords

Open System Interconnection (OSI)


Integrated Services Digital Network (ISDN)
Transmission Control Protocol (TCP)
User Datagram Protocol (UDP)
Unshielded Twisted Pair (UTP)
Certificate Revocation Lists (CRL’s)
Wireless Transport layer Security Protocol (WTLS)
Wireless Identity Module (WIM)

Page 142
Wireless Application Protocol

Unit V

 GPRS – an introduction

 Features of GPRS

 3G

 The Future

5.0 Introduction
The General Packet Radio Service (GPRS) is a new non-voice value added
service that allows information to be sent and received across a mobile telephone
network. The General Packet Radio Service (GPRS) is a wireless service that is designed
to provide a foundation for a number of data services based on packet transmission.
Customers will only be charged for the communication resources they use. The operator's
most valuable resource, the radio spectrum, can be leveraged over multiple users
simultaneously because it can support many more data users. Additionally more than one
time slots can be used by a user to get higher data rates.

5.1 Objective
The objective of this lesson is to understand the fundamentals of GPRS, which
include a wide range of topics from fundamentals of GPRS to 3G architecture. At the end
of the lesson you learn about basic concepts of General Packet Radio Service and Third
generation mobile phone systems.

5.2 Content

5.2.1 Features of GPRS


General Packet Radio Service (GPRS) facilitates instant connections whereby
information can be sent or received immediately as the need arises, subject to radio
coverage. No dial-up modem connection is necessary. This is why GPRS users are

Page 143
Wireless Application Protocol

sometimes referred to be as being "always connected". Immediacy is one of the


advantages of GPRS (and SMS) when compared to Circuit Switched Data. High
immediacy is a very important feature for time critical applications such as remote credit
card authorization where it would be unacceptable to keep the customer waiting for even
thirty extra seconds.

New/Better Applications
General Packet Radio Service (GPRS) will fully enable the Internet applications
you are used to on your desktop from web browsing to chat over the mobile network.
Other new applications for GPRS, profiled later, include file transfer and home
automation- the ability to remotely access and control in-house appliances and machines.

Service Access
To use GPRS, users specifically need: a mobile phone or terminal that supports
GPRS a subscription to a mobile telephone network that supports GPRS and use of GPRS
must be enabled for that user. Automatic access to the GPRS may be allowed by some
mobile network operators, others will require a specific opt-in knowledge of how to send
and/ or receive GPRS information using their specific model of mobile phone, including
software and hardware configuration (this creates a customer service requirement) a
destination to send or receive information through GPRS. GPRS is designed to make the
Internet fully available to mobile users for the first time. From day one, GPRS users can
access any web page or other Internet applications- providing an immediate critical mass
of uses.

Internet Aware
For the first time, General Packet Radio Service (GPRS) fully enables Mobile
Internet functionality by allowing interworking between the existing Internet and the new
GPRS network. Any service that is used over the fixed Internet today- File Transfer
Protocol (FTP), web browsing, chat, email, telnet- will be as available over the mobile
network because of GPRS. In fact, many network operators are considering the
opportunity to use GPRS to help become wireless Internet Service Providers in their own
right.

Limitations of GPRS
It should already be clear that General Packet Radio Service (GPRS) is an
important new enabling mobile data service which offers a major improvement in
spectrum efficiency, capability and functionality compared with today's non-voice mobile
services. However, it is important to note that there are some limitations with GPRS,
which can be summarized as:

Limited Cell Capacity for All Users


GPRS does impact a network's existing cell capacity. There are only limited radio
resources that can be deployed for different uses- use for one purpose precludes
simultaneous use for another. For example, voice and GPRS calls both use the same

Page 144
Wireless Application Protocol

network resources. The extent of the impact depends upon the number of timeslots, if
any, that are reserved for exclusive use of GPRS. However, GPRS does dynamically
manage channel allocation and allow a reduction in peak time signalling channel loading
by sending short messages over GPRS channels instead. RESULT: NEED FOR SMS as a
complementary bearer that uses a different type of radio resource.

Speeds Much Lower In Reality


Achieving the theoretical maximum GPRS data transmission speed of 172.2 kbps
would require a single user taking over all eight timeslots without any error protection.
Clearly, it is unlikely that a network operator will allow all timeslots to be used by a
single GPRS user. Additionally, the initial GPRS terminals are expected be severely
limited- supporting only one, two or three timeslots. The bandwidth available to a GPRS
user will therefore be severely limited. As such, the theoretical maximum GPRS speeds
should be checked against the reality of constraints in the networks and terminals. The
reality is that mobile networks are always likely to have lower data transmission speeds
than fixed networks.

Support of GPRS Mobile Terminate By Terminals Is Not Ensured


At the time of writing, there has been no confirmation from any handset vendors
that mobile terminated GPRS calls (i.e. receipt of GPRS calls on the mobile phone) will
be supported by the initial GPRS terminals. Availability or not of GPRS MT is a central
question with critical impact on the GPRS business case such as application migration
from other non-voice bearers.
By originating the GPRS session, users confirm their agreement to pay for the
delivery of content from that service. This origination may well be performed using a
Wireless Application Protocol (WAP) session using the WAP microbrowsers that will be
built into GHPRS terminals. However, mobile terminated IP traffic might allow
unsolicited information to reach the terminal. Internet sources originating such
unsolicited content may not be chargeable. A possible worse case scenario would be that
mobile users would have to pay for receiving unsolicited junk content. This is a potential
reason for a mobile vendor NOT to support GPRS Mobile Terminate in their GPRS
terminals.
However, there is always the possibility of unsolicited or unwanted information
being communicated through any media, but that does not mean that we would wish to
preclude the possibility of any kind of communication through that means altogether. A
network side solution such as GGSN or charging platform policing would be preferable
rather than a non-flexible limitation built into all the GPRS handsets.
When we asked Nokia about this issue, it commented: "Details of the Nokia
GPRS terminals are not available at this time. It is too early to confirm whether MT will
be supported in the first Nokia GPRS terminals". The company's policy is not to make
details available about products before they are announced. Readers should contact the
GSM Association; Mobile Life streams Limited and/ or the vendors directly to encourage
them to incorporate support for GPRS MT in their initial terminals. RESULT: GPRS

Page 145
Wireless Application Protocol

usability and therefore business case is threatened if GPRS MT is not supported by GPRS
terminals.

Timescales for GPRS


When a new service is introduced, there are a number of stages before it becomes
established. GPRS service developments will include standardization, infrastructure
development, network trials, contracts placed, network roll out, availability of terminals,
application development, and so on. These stages for GPRS are:

3GSM arrives commercially


Like the GSM standard itself, GPRS will be introduced in phases. Phase 1 is
expected to be available commercially in the year 2000/1. Point to Point GPRS (sending
information to a single GPRS user) will be supported, but not Point to Multipoint
(sending the same information to several GPRS users at the same time). GPRS Phase 2 is
not yet fully defined, but is expected to support higher data rates through the possible
incorporation of techniques such as Enhanced Data rates for GSM Evolution (EDGE), in
addition to Point-to-Multipoint support.

5.2.2 Applications for GPRS


A wide range of corporate and consumer applications are enabled by non-voice
mobile services such as SMS and GPRS. This section will introduce those that are
particularly suited to GPRS.

Chat
Chat can be distinguished from general information services because the source of
the information is a person with chat whereas it tends to be from an Internet site for
information services. The "information intensity"- the amount of information transferred
per message tends to be lower with chat, where people are more likely to state opinions
than factual data. In the same way as Internet chat groups have proven a very popular
application of the Internet, groups of likeminded people- so called communities of
interest- have begun to use non-voice mobile services as a means to chat and
communicate and discuss.
Because of its synergy with the Internet, GPRS would allow mobile users to
participate fully in existing Internet chat groups rather than needing to set up their own
groups that are dedicated to mobile users. Since the number of participants is an
important factor determining the value of participation in the newsgroup, the use of
GPRS here would be advantageous. GPRS will not however support point to multipoint
services in its first phase, hindering the distribution of a single message to a group of
people. As such, given the installed base of SMS capable devices, we would expect SMS
to remain the primary bearer for chat applications in the foreseeable future, although
experimentation with using GPRS is likely to commence sooner rather than later.

Textual and Visual Information

Page 146
Wireless Application Protocol

A wide range of content can be delivered to mobile phone users ranging from
share prices, sports scores, weather, flight information, news headlines, prayer reminders,
lottery results, jokes, horoscopes, traffic, and location sensitive services and so on. This
information need not necessarily be textual- it may be maps or graphs or other types of
visual information.
The length of a short message of 160 characters suffices for delivering
information when it is quantitative- such as a share price or a sports score or temperature.
When the information is of a qualitative nature however, such as a horoscope or news
story, 160 characters is too short other than to tantalize or annoy the information recipient
since they receive the headline or forecast but little else of substance. As such, GPRS will
likely be used for qualitative information services when end users have GPRS capable
devices, but SMS will continue to be used for delivering most quantitative information
services. Interestingly, chat applications are a form of qualitative information that may
remain delivered using SMS, in order to limit people to brevity and reduce the incidence
of spurious and irrelevant posts to the mailing list that are a common occurrence on
Internet chat groups.

Still Images
Still images such as photographs, pictures, postcards, greeting cards and
presentations, static web pages can be sent and received over the mobile network as they
are across fixed telephone networks. It will be possible with GPRS to post images from a
digital camera connected to a GPRS radio device directly to an Internet site, allowing
near real-time desktop publishing.

Moving Images
Over time, the nature and form of mobile communication is getting less textual
and more visual. The wireless industry is moving from text messages to icons and picture
messages to photographs and blueprints to video messages and movie previews being
downloaded and on to full blown movie watching via data streaming on a mobile device.
Sending moving images in a mobile environment has several vertical market
applications including monitoring parking lots or building sites for intruders or thieves,
and sending images of patients from an ambulance to a hospital. Videoconferencing
applications, in which teams of distributed sales people can have a regular sales meeting
without having to go to a particular physical location, is another application for moving
images.

Web Browsing
Using Circuit Switched Data for web browsing has never been an enduring
application for mobile users. Because of the slow speed of Circuit Switched Data, it takes
a long time for data to arrive from the Internet server to the browser. Alternatively, users
switch off the images and just access the text on the web, and end up with difficult to
read text layouts on screens that are difficult to read from. As such, mobile Internet
browsing is better suited to GPRS.

Page 147
Wireless Application Protocol

Document Sharing/ Collaborative Working


Mobile data facilitates document sharing and remote collaborative working. This
lets different people in different places work on the same document at the same time.
Multimedia applications combining voice, text, pictures and images can even be
envisaged. These kinds of applications could be useful in any problem solving exercise
such as fire fighting, combat to plan the route of attack, medical treatment, advertising
copy setting, architecture, journalism and so on. Even comments on which resort to book
a holiday at could benefit from document sharing to save everyone having to visit the
travel agent to make a decision. Anywhere somebody can benefit from having and being
able to comment on a visual depiction of a situation or matter, such collaborative working
can be useful. By providing sufficient bandwidth, GPRS facilitates multimedia
applications such as document sharing.

Audio
Despite many improvements in the quality of voice calls on mobile networks such
as Enhanced Full Rate (EFR), they are still not broadcast quality. There are scenarios
where journalists or undercover police officers with portable professional broadcast
quality microphones and amplifiers capture interviews with people or radio reports
dictated by them and need to send this information back to their radio or police station.
Leaving a mobile phone on, or dictating to a mobile phone, would simply not give
sufficient voice quality to allow that transmission to be broadcast or analyzed for the
purposes of background noise analysis or voice printing, where the speech autograph is
taken and matched against those in police storage. Since even short voice clips occupy
large file sizes, GPRS or other high speed mobile data services are needed.

Job Dispatch
Non-voice mobile services can be used to assign and communicate new jobs from
office-based staff to mobile field staff. Customers typically telephone a call center whose
staffs takes the call and categorize it. Those calls requiring a visit by field sales or service
representative can then be escalated to those mobile workers. Job dispatch applications
can optionally be combined with vehicle positioning applications- such that the nearest
available suitable personnel can be deployed to serve a customer. GSM non-voice
services can be used not only to send the job out, but also as a means for the service
engineer or sales person can keep the office informed of progress towards meeting the
customer’s requirement. The remote worker can send in a status message such as "Job
1234 complete, on my way to 1235".
The 160 characters of a short message are sufficient for communicating most
delivery addresses such as those needed for a sales, service or some other job dispatch
application such as mobile pizza delivery and courier package delivery. However, 160
characters does require manipulation of the customer data such as the use of
abbreviations such as "St" instead of "Street". Neither does 160 characters leave much
space for giving the field representative any information about the problem that has been
reported or the customer profile. The field representative is able to arrive at the customer
premises but is not very well briefed beyond that. This is where GPRS will come in to

Page 148
Wireless Application Protocol

allow more information to be sent and received more easily. With GPRS, a photograph of
the customer and their premises could, for example, be sent to the field representative to
assist in finding and identifying the customer. As such, we expect job dispatch
applications will be an early adopter of GPRS-based communications.

Corporate Email
With up to half of employees typically away from their desks at any one time, it is
important for them to keep in touch with the office by extending the use of corporate
email systems beyond an employee's office PC. Corporate email systems run on Local
Area computer Networks (LAN) and include Microsoft Mail, Outlook, Outlook Express,
Microsoft Exchange, Lotus Notes and Lotus cc: Mail. Since GPRS capable devices will
be more widespread in corporations than amongst the general mobile phone user
community, there are likely to be more corporate email applications using GPRS than
Internet email ones whose target market is more general.

Internet Email
Internet email services come in the form of a gateway service where the messages
are not stored, or mailbox services in which messages are stored. In the case of gateway
services, the wireless email platform simply translates the message from SMTP, the
Internet email protocol, into SMS and sends to the SMS Center. In the case of mailbox
email services, the emails are actually stored and the user gets a notification on their
mobile phone and can then retrieve the full email by dialling in to collect it, forward it
and so on.
Upon receiving a new email, most Internet email users do not currently get
notified of this fact on their mobile phone. When they are out of the office, they have to
dial in speculatively and periodically to check their mailbox contents. However, by
linking Internet email with an alert mechanism such as SMS or GPRS, users can be
notified when a new email is received.

Remote LAN Access


When mobile workers are away from their desks, they clearly need to connect to
the Local Area Network in their office. Remote LAN applications encompasses access to
any applications that an employee would use when sitting at their desk, such as access to
the intranet, their corporate email services such as Microsoft Exchange or Lotus Notes
and to database applications running on Oracle or Sybase or whatever. The mobile
terminal such as handheld or laptop computer has the same software programs as the
desktop on it, or cut down client versions of the applications accessible through
The corporate LAN. This application area is therefore likely to be a
conglomeration of remote access to several different information types- email, intranet,
and databases. This information may all be accessible through web browsing tools, or
require proprietary software applications on the mobile device. The ideal bearer for
Remote LAN Access depends on the amount of data being transmitted, but the speed and
latency of GPRS make it ideal.

Page 149
Wireless Application Protocol

File Transfer
As this generic term suggests, file transfer applications encompass any form of
downloading sizeable data across the mobile network. This data could be a presentation
document for a travelling salesperson, an appliance manual for a service engineer or a
software application such as Adobe Acrobat Reader to read documents. The source of
this information could be one of the Internet communication methods such as FTP (File
Transfer Protocol), telnet, http or Java- or from a proprietary database or legacy platform.
Irrespective of source and type of file being transferred, this kind of application tends to
be bandwidth intensive. It therefore requires a high speed mobile data service such as
GPRS, EDGE or 3GSM to run satisfactorily across a mobile network.

Ranking of Initial GPRS Traffic Generators


With any new service, it is an important part of the business case to estimate what
the applications for that technology will be. We believe that the business case for any
network operator for GPRS is compelling- it confers a huge increase in capability for a
relatively small investment. The more popular applications using GPRS are expected to
be:

Ranking Application Bearer


1 Corporate email GPRS
2 Internet email GPRS/ SMS
3 Information Services Qualitative GPRS
4 Job Dispatch GPRS
5 Remote LAN Access GPRS
6 File Transfer GPRS
7 Web browsing GPRS
8 Still Images GPRS
9 Moving Images GPRS / HSCSD
10 Chat GPRS / SMS
11 Home Automation GPRS
12 Document Sharing/Collaborative Working GPRS
13 Audio GPRS

The first of the applications listed will be popular partly because they are
widespread over fixed telephone networks but have previously not been readily or fully

Page 150
Wireless Application Protocol

available over GSM networks. The Internet and email are already in place today- GPRS
will allow them to be made fully wire free and available everywhere. The applications
ranked further down the list lack current popularity in the fixed communications world
and lack widespread availability of specific software solutions. Whilst these applications
are technically feasible or high speed mobile data services such as GPRS, the volume of
usage is dependent upon commercial factors such as pricing. It is expected that GPRS
will incorporate volume-based charging such that only the data sent will be charged for,
paving the way for widespread usage amongst customers with GPRS capable devices.

GPRS Network Nodes


Enabling GPRS on a GSM network requires the addition of two core modules, the
Gateway GPRS Service Node (GGSN) and the Serving GPRS Service Node (SGSN). As
the word Gateway in its name suggests, the GGSN acts as a gateway between the GPRS
network and Public Data Networks such as IP and X.25. GGSNs also connect to other
GPRS networks to facilitate GPRS roaming. The Serving GPRS Support Node (SGSN)
provides packet routing to and from the SGSN service area for all users in that service
area.
In addition to adding multiple GPRS nodes and a GPRS backbone, some other
technical changes that need to be added to a GSM network to implement a GPRS service.
These include the addition of Packet Control Units; often hosted in the Base Station
Subsystems, mobility management to locate the GPRS Mobile Station, a new air interface
for packet traffic, new security features such as ciphering and new GPRS specific
signalling.

5.2.3 Related GPRS Challenges

Billing
GPRS is a different kind of service from those typically available on today’s
mobile networks. GPRS is essentially a packet switching overlay on a circuit switching
network. The GPRS specifications stipulate the minimum charging information that must
be collected in the Stage 1 service description. These include destination and source
addresses, usage of radio interface, usage of external Packet Data Networks, usage of the
packet data protocol addresses, usage of general GPRS resources and location of the
Mobile Station. Since GPRS networks break the information to be communicated down
into packets, at a minimum, a GPRS network needs to be able to count packets to
charging customers for the volume of packets they send and receive. Today's billing
systems have difficulties handling charging for today's nonvoice services. It is unlikely
that circuit switched billing systems will be able to process a large number of new
variables created by GPRS.
GPRS call records are generated in the GPRS Service Nodes. The GGSN and
SGSN may not be able to store charging information but this charging information needs
to be processed. The incumbent billing systems are often not able to handle real time Call
Detail Record flows. As such, an intermediary charging platform is a good idea to
perform billing mediation by collecting the charging information from the GPRS nodes

Page 151
Wireless Application Protocol

and preparing it for submission to the billing system. Packet counts are passed to a
Charging Gateway that generates Call Detail Records that are sent to the billing system.
However, the crucial challenge of being able to bill for GPRS and therefore earn a
return on investment in GPRS is simplified by the fact that the major GPRS infrastructure
vendors all support charging functions as part of their GPRS solutions. Additionally, a
wide range of other existing non-GSM packet data networks such as X.25 and Cellular
Digital Packet Data (CDPD) are in place along with associated billing systems.
It may well be the case that the cost of measuring packets is greater than their
value. The implication is that there will NOT be a per packet charge since there may be
too many packets to warrant counting and charging for. For example, a single traffic
monitoring application can generate tens of thousands of packets per day. Thus the
charging gateway function is more a policing function than a charging function since
network operators are likely to tariff certain amounts of GPRS traffic at a flat rate and
then need to monitor whether these allocations are far exceeded.
This is not to say that we will end up with the free Internet Service Provider
model that has become established on the fixed Internet in which users pay no fixed
monthly charge and network operators rely on advertising sales on mobile portal sites to
make money. There is a premium for mobility and there is frankly a shortage of mobile
bandwidth that limits the extent to which that bandwidth is viewed as a commodity. And
given the additional customer care and billing complexity associated with mobile.
Internet and nonvoice services, network operators would be ill advised to reduce their
prices in such a way as to devalue the perceived value of mobility.

Tariffing
Decisions on charging for GPRS by packet or simply a flat monthly fee are
contentious but need to be made. Charging different packets at different rates can make
things complicated for the user, whilst flat rates favour heavy users more than occasional
ones. We believe that the optimal GPRS pricing model will be based on two variables-
time and packet. Network operators should levy a nominal per packet charge during peak
times plus a flat rate, no per packet charge during non peak times.
Time and packet related charging will encourage applications such as remote
monitoring, meter reading and chat to use GPRS overnight when spare network capacity
is available. Simultaneously, a nominal per packet charge during the day will help to
allocate scarce radio resources and charge radio heavy applications such as file and image
transfer more than applications with lower data intensity. It has the advantage that it will
automatically adjust customer charging according to their application usage. As such the
optimal charging model could well be a flat rate charge during off-peak times along with
a per packet charge during peak times.

Customer Service
Value-added network services such as mobile data, mobile Internet and unified
messaging all generate certain specific customer problems and requirements, thereby
requiring customer service personnel to be aware of these issues and know how to solve
them.

Page 152
Wireless Application Protocol

Nonvoice services are surprisingly complex- involving unique configurations of


phone types, data cards, handheld computers, subscriptions, operating systems, Internet
service providers and so on. Some network operators require customers to opt into certain
value added services rather than including them as part of the core subscription-
necessitating a customer service process. It is even possible to write a 350 page book
about the SHORT message service (it is called "YES2SMS")! In theory, the need for
dedicated customer service for Circuit Switched Data, SMS and other nonvoice mobile
services will decrease in the future as terminals and services become easier to use and as
the services themselves are used more widely for customer service purposes. The reality
in the short and medium term is that the need for customer support for value-added
services will increase not decrease as awareness of services and their usage increases, and
as new services and terminals come onto the marketplace.
Rather than keeping everything in-house or outsourcing everything, we are a
proponent of an approach that keeps first line support and customer contact in-house,
whilst outsourcing the difficult specific customer service problems arising from
connectivity issues and so on. In this way, the network operator is aware of and in control
of the kinds of questions and problems its customers are asking.
It is well worth incurring the cost to get the customer aware, educated and initially
set up with data services, because, for example, once the PC data card has been
successfully connected to the laptop to the Internet software and so on, the same
configuration can be repeatedly used. The one-off customer requirement leads to ongoing
usage.

The Mobile Value Chain


The Non-voice mobile value chain shows the various parties, along with their
interdependence and activities that are involved in realizing the full potential of nonvoice
mobile services. There will be differences between the voice and nonvoice value chain-
need for IT channels, these parties are network operators, customers, IT/ mobile channels,
terminal and infrastructure vendors and application developers. All of these players in the
value chain are essential to deliver the overall success of the nonvoice services- if any
one is underdeveloped or not present, the entire value chain can break down. Each has a
distinct role to play, which will now be discussed.

Customers
Without customer interest in the nonvoice mobile services, there is little need for
any of the other players in the value chain to be present. If customers don't see a
compelling requirement for a nonvoice service such as GPRS that can be delivered at a
reasonable cost to them, there is little point in network operators offering services, GPRS
terminal vendors manufacturing product, channels for product purchase being established
or applications developed. Customer interest is the business case that supports any
investment in the nonvoice market, as in any other.
Customers tend to interface with network operators to buy service- either directly
or indirectly through designated channels depending on the size of the business and

Page 153
Wireless Application Protocol

importance of the customer to the network operator. Customers may also have links with
application developers if their application requires some specific software.

Terminal/ Infrastructure Vendors


Terminal and infrastructure vendors supply the equipment and technology that
turns a service such as GPRS that has been set down on paper as a standard in theory into
something that can be implemented in practice. Clearly, without network infrastructure to
enable the service in a cost effective way, it cannot be widely implemented in practice.
Equally, availability of terminals in commercial quantities at reasonable prices can hinder
or halt market take up. There is little point in a network supporting a service if the clients
to connect to that network are not available. Delays in widespread terminal availability
have often hindered the successful deployment of new technologies and initiatives- most
recently with SIM Application Toolkit and the Wireless Application Protocol.
Terminal and infrastructure vendors need to have links to the people who buy
their products such as network operators to buy the network infrastructure and mobile
channels that distribute and sell their terminals. Terminal and infrastructure vendors may
well also have links to application developers to encourage applications to be ported to
their infrastructure and terminal solution and interfaces and operating systems. The
vendors may also have direct contact with large corporate end users- helping enable the
nonvoice mobile opportunity in a network independent way.

Application Developers
Application developers- software developers, systems integrators and the like- are
an essential part in the nonvoice mobile value chain. Customers are interested in what the
nonvoice services can be used for- GPRS and other such services are a means to an end
and not and end in themselves- they facilitate applications.
Applications are the end that will generate high usage of nonvoice services. They
will generate regular and ongoing use of the nonvoice mobile services. Even given
standardized elements in the other parts of the mobile value chain, some systems
integration is likely to be necessary to deploy the application, such as integration with the
host systems. However, once deployed, these applications will rapidly become an
indispensable part of the daily life of the user that they will be loath to give up and keen
to use frequently. Because they will make that person's life easier- they will help that
person get their job done well and keep in touch with their family, friends, colleagues and
customers.
Application developers may develop off the shelf shrink-wrapped nonvoice
products such as a chat software program designed for volume sales, customized products
developed specifically to meet one customer's requirement, or a hybrid in which a generic
product such as a database is customized with application specific data. Some products or
services have a "killer application" that is overwhelmingly popular- such as spreadsheets
for PCs or desktop publishing for the Apple Macintosh- or a raft of different applications
that all build on the underlying technology.
Application developers may have links to terminal and infrastructure vendors- in
many cases, these vendors have application development forums and programs such as

Page 154
Wireless Application Protocol

the GPRS Application Alliance from Ericsson and the Nokia Developer's Forum.
Application developers should also have contacts with the network operators since
networks have different levels of tariff plans, hardware and network infrastructure and
services availability. This interface between application developers and network
operators is ideally in the form of a business partners program. Application developers
may also sell their products directly to mobile channels by concluding packaging and
bundling deals with those channels.

IT/ Mobile Channels


The customer needs to be able to find out about and sign up for a service in a
convenient and easy way. The market channels are what facilitate this- different customer
groups prefer to use different channels. For example, if you only sold a product through
Internet channels, you would preclude all those people who are not connected and those
who are unwilling or uncomfortable to purchase online. In some cases, customers for
nonvoice services such as GPRS will contact and contract with the network operator
directly to purchase service- this could be a retail outlet or sales person or telesales type
operation. In other cases, they will buy from an Information Technology (IT) channel
such as a computing magazine or retail outlet. Just as consumer oriented propositions
such as prepay are available from chemists and newsagents, corporate oriented IP based
services such as GPRS are likely to lead to a further evolution in channels for mobile
telephony products. Such smart terminals and other devices will be available from IT
superstores such as Office World, management consultancies such as Anderson
Consulting, business facilities outlets such as Mailboxes Etc., in airline business lounges
and the like.
The channels have links to the customers that buy from them, the vendors who
supply terminals to them and the network operators who try to get them to sell equipment
connected to their particular network. The channels may also connect with application
developers if their customers require a specific software solution.

Network Operators
Clearly, the sum of activities that a network operator carries out is essential in
determining the success of nonvoice services. From fundamental prerequisites such as
deciding to invest in network infrastructure to support nonvoice services to investing
resources in educating customers about their availability and uses, network operators are
an essential part of the process.
Network operators tend to have links with customers that are managed by account
managers and customer service staff, channels such as service providers and retailers,
application developers through business partner programs and network infrastructure and
terminal suppliers who they contract with for the underlying technology. As such, given
its central role and relations with all of the other players in the value chain, network
operators are of central importance and need to systematically and deliberately manage
relations with these different groups through setting up concrete programs and
mechanisms to communicate with them.

Page 155
Wireless Application Protocol

We can therefore see the various parties that make up the nonvoice mobile
services value chain and the importance of each. If any one of the five core elements of
network operators, customers, application developers, terminal and infrastructure vendors
and channels was NOT present, the entire value chain would be damaged and the success
of the nonvoice service delayed or entirely precluded.
GPRS will provide a massive boost to mobile data usage and usefulness. That
much seems assured from its flexible feature set, its latency and efficiency and speed.
The only question is how soon it takes off in earnest and how to ensure that the technical
and commercial features do not hinder its widespread use.

Technology
How the data is transferred?
The most common methods used for data transfer are circuit-switching and
packet-switching. With circuit-switched transmission the dedicated circuit is first
established across a sequence of links and then the whole channel is allocated to a single
user for the whole duration of the call. With packet switched transmission, the data is first
cut in to small parts called packages which are then sent in sequence to the receiver,
which again builds the packages back together. This ensures that the same link resources
can be shared at the same time buy many different users. The link is used only when the
user has something to send. When there is no data to be sent the link is free to be used by
another call. Packet switching is ideal for bursty traffic, e.g. voice. The Technology used
by GPRS and the main objectives to be reached by implementing GPRS are the
following:
 Give support for bursty traffic
 Use efficiently network and radio resources
 Provide flexible services at relatively low costs
 Possibility for connectivity to the Internet
 Provide fast access time
 To have and support flexible co-existence with GSM voice
In order to meet these objectives the following technologies are applied. GPRS
uses a packet-mode technique to transfer data and signalling in a cost-efficient manner
over GSM radio networks and also optimizes the use of radio and network resources. Still
a strict separation between the radio and network subsystems is maintained in order to
allow the network subsystem to be reused with other radio access technologies. New
GPRS radio channels are also defined. The allocation of these timeslots is flexible,
ranging from one to eight timeslots per TDMA frame, and they can be shared by active
users. This allows GPRS to handle bit rates from 9 to even up to 150 kbit/s per user. With
these bit rates all types of transmissions can be handled: from slow-speed short messages
to the higher speeds needed e.g. when browsing Web pages. GPRS will also permit the
user to receive voice calls simultaneously when sending or receiving data calls.

Page 156
Wireless Application Protocol

GPRS will provide a seamless connection to the existing standard data services by
using interfaces to TCP/IP and X.25. GPRS will also provide fast reservation to begin
transmission of packets, typically from 0.5 to 1 second. This means that the data users
will not have to wait for the phone to dial, but instead they will get through immediately.
For example the messages will be delivered direct to the user's phone, without the need
for a full end-to-end connection. When the user switches on their phone, the message will
be downloaded automatically.

5.2.4 Implementation of GPRS


In order to manage the great amount of work required to produce the new
standards, a two phased approach for the introduction of GPRS was adopted. The first
phase will provide a functional service.
Phase 1 supports:

 TCP/IP and X.25 bearer services.


 GPRS identities
 GPRS security, using a new encryption algorithm especially tailored for packet data
 Operator Call Barring and Termination, Operator Call Screening
 Support of SMS over GPRS
 Support for packet charging

Phase 2 GPRS:
Phase 2 of GPRS completes the capabilities to meet GPRS requirements. It will
add support for additional specific point-to-point and point-to-multipoint services, for
applications such as traffic telematics and train control. Support for alternative user and
network interfaces, e.g. ISDN and other packet networks, as well as support for
additional supplementary services, will also be added. The implementation of GPRS
requires also some additional nodes and changes to the now being network structure. The
main structure of the GPRS network architecture implemented on a existing GSM
network is pictured in the following figure.

Page 157
Wireless Application Protocol

Figure 5.1 - GPRS network structure

Meaning for players

Operators
For cellular operators, upgrading networks to some architecture that can handle packet-
based applications means investments but also several commercial
opportunities. Operators face the difficult question of network choices in the next couple
of years. Some form of packet networking capability is needed in advance of the third
generation, but there seems to be no agreement within the players in the operating
business, how and when the infrastructure investment should take place. In addition, the
target market and the potential user groups of the new services enabled by packet-
switched networks are not clear. One view is that investing in GPRS will help operators
learn about new applications, services and user requirements for the third-generation as
well as accommodate users to the coming new services.
The implementation of GPRS requires changes in the operators' network
equipment in the base stations and base station controllers. It means making
modifications to the core network: new routers need to be added so that traffic can be
passed efficiently and the radio network needs to be modified in a way that it works both
in a packet-oriented and circuit-oriented way. Good news for the operators is that GPRS
is being designed to work within the existing GSM infrastructure. It means that GPRS
coverage can be introduced quickly. GSM is the most advanced cellular system for the
implementation of packet switched data transmission.

Page 158
Wireless Application Protocol

GPRS will permit more efficient use of the network than circuit radio data, since packet
architecture offers higher speeds and better use of the radio resource. It also gives a
chance for operators to try new charging methods, that is, charging by data volume
instead of duration, which may lead to offering lower tariffs for users.

Terminal Vendors
For the terminal vendors, adoption of GPRS means upgrading the terminals for
meeting the requirements of packet-based networks and a large variety of applications.
Different terminal types will be required as the applications mix develops. Terminals are
becoming more complex and the variety of them is increasing.

Software Vendors
Software vendors also encounter changes with the introduction of packet-based
networks. It may be assessed that users do not want additional complexity in order to run
wireless data applications but they want seamless integration. Software vendors need to
ensure compatibility between the cellular data and PC desktop environment.

Content Providers
The importance of content providers in the market will increase when more and
more applications are available over cellular networks. When providing content through
the mobile channel, the appropriateness of the content needs to be carefully planned. It
will probably take time to determine what content works well in mobile networks and
what the user preferences are.

5.2.5 Introduction to 3G
Third Generation Wireless, or 3G, is the generic term used for the next generation
of mobile communications systems. 3G systems aim to provide enhanced voice, text and
data services to user. The main benefit of the 3G technologies will be substantially
enhanced capacity, quality and data rates than are currently available. This will enable the
provision of advanced services transparently to the end user (irrespective of the
underlying network and technology, by means of seamless roaming between different
networks) and will bridge the gap between the wireless world and the computing/Internet
world, making inter-operation apparently seamless. The third generation networks should
be in a position to support real-time video, high-speed multimedia and mobile Internet
access. All this should be possible by means of highly evolved air interfaces, packet core
networks, and increased availability of spectrum.
Although ability to provide high-speed data is one of the key features of third
generation networks, the real strength of these networks will be providing enhanced
capacity for high quality voice services. The need for landline quality voice capacity is
increasing more rapidly than the current 2nd generation networks will be able to support.
High data capacities will open new revenue sources for the operators and bring the
Internet more closely to the mobile customer. The use of all-ATM or all-IP based
communications between the network elements will also bring down the operational costs
of handling both voice and data, in addition to adding flexibility.

Page 159
Wireless Application Protocol

On The Way to 3G
As reflected in the introduction above, the drive for 3G is the need for higher
capacities and higher data rates. Whereas higher capacities can basically be obtained by
having a greater chunk of spectrum or by using new evolved air interfaces, the data
requirements can be served to a certain extent by overlaying 2.5G technologies on the
existing networks. In many cases it is possible to provide higher speed packet data by
adding few network elements and a software upgrade.

A Look at GPRS, HCSD, and EDGE


Technologies like GPRS (General Packet Radio Service), High Speed Circuit
Switched Data (HSCSD) and EDGE fulfils the requirements for packet data service and
increased data rates in the existing GSM/TDMA networks. I'll talk about EDGE
separately under the section "Migration to 3G". GPRS is actually an overlay over the
existing GSM network, providing packet data services using the same air interface by the
addition of two new network elements, the SGSN and GGSN, and a software upgrade.
Although GPRS was basically designed for GSM networks, the IS-136 Time Division
Multiple Access (TDMA) standard, popular in North and South America, will also
support GPRS. This follows an agreement to follow the same evolution path towards
third generation mobile phone networks concluded in early 1999 by the industry
associations that support these two network types.

General Packet Radio Service (GPRS)


The General Packet Radio Service (GPRS) is a wireless service that is designed to
provide a foundation for a number of data services based on packet transmission.
Customers will only be charged for the communication resources they use. The operator's
most valuable resource, the radio spectrum, can be leveraged over multiple users
simultaneously because it can support many more data users. Additionally more than one
time slots can be used by a user to get higher data rates. GPRS introduces two new major
network nodes in the GSM PLMN: Serving GPRS Support Node (SGSN) - The SGSN is
the same hierarchical level as an MSC. The SGSN tracks packet capable mobile
locations, performs security functions and access control. The SGSN is connected to the
BSS via Frame Relay. Gateway GPRS Support Node (GGSN) - The GGSN interfaces
with external packet data networks (PDNs) to provide the routing destination for data to
be delivered to the MS and to send mobile originated data to its intended destination. The
GGSN is designed to provide inter-working with external packet switched networks, and
is connected with SGSNs via an IP based GPRS backbone network.
A packet control unit is also required which may be placed at the BTS or at the
BSC. A number of new interfaces have been defined between the existing network
elements and the new elements and between the new network elements. Theoretical
maximum speeds of up to 171.2 kilobits per second (kbps) are achievable with GPRS
using all eight timeslots at the same time. This is about three times as fast as the data
transmission speeds possible over today's fixed telecommunications networks and ten
times as fast as current Circuit Switched Data services on GSM networks. Actually we

Page 160
Wireless Application Protocol

may not see speeds greater than 64 kbps however it would be much higher than the
speeds possible in any 2G network. Also, another advantage is the fact that the user is
always connected and is charged only for the amount of data transferred and not for the
time he is connected to the network.
Packet switching means that GPRS radio resources are used only when users are
actually sending or receiving data. Rather than dedicating a radio channel to a mobile
data user for a fixed period of time, the available radio resource can be concurrently
shared between several users. This efficient use of scarce radio resources means that large
numbers of GPRS users can potentially share the same bandwidth and be served from a
single cell. The actual number of users supported depends on the application being used
and how much data is being transferred. Because of the spectrum efficiency of GPRS,
there is less need to build in idle capacity that is only used in peak hours.
Already many field trials and also some commercial GPRS implementations have
taken place. GPRS is the evolution step that almost all GSM operators are considering.
Also, coupled with other technologies like WAP, GPRS can act as a stepping stone
towards convergence of cellular service providers and the internet service providers.
HSCSD (High speed circuit switched data) is the evolution of circuit switched
data within the GSM environment. HSCSD will enable the transmission of data over a
GSM link at speeds of up to 57.6kbit/s. This is achieved by concatenating, i.e. adding
together, consecutive GSM timeslots, each of which is capable of supporting 14.4kbit/s.
Up to four GSM timeslots are needed for the transmission of HSCSD. This allows
theoretical speeds of up to 57.6 kbps.
This is broadly equivalent to providing the same transmission rate as that
available over one ISDN B-Channel. HSCSD is part of the planned evolution of the GSM
specification and is included in the GSM Phase 2 development. In using HSCSD a
permanent connection is established between the called and calling parties for the
exchange of data. As it is circuit switched, HSCSD is more suited to applications such as
video conferencing and multimedia than 'bursty' type applications such as email, which is
more suited to packet switched data. In networks where High Speed Circuit Switched
Data (HSCSD) is deployed, GPRS may only be assigned third priority, after voice as
number one priority and HSCSD as number two.
In theory, HSCSD can be preempted by voice calls- such that HSCSD calls can
be reduced to one channel if voice calls are seeking to occupy these channels. HSCSD
does not disrupt voice service availability, but it does affect GPRS. Even given
preemption, it is difficult to see how HSCSD can be deployed in busy networks and still
confer an agreeable user experience, i.e. continuously high data rate. HSCSD is therefore
more likely to be deployed in start up networks or those with plenty of spare capacity
since it is relatively inexpensive to deploy and can turn some spare channels into revenue
streams.
An advantage for HSCSD could be the fact that while GPRS is complementary
for communicating with other packet-based networks such as the Internet, HSCSD could
be the best way of communicating with other circuit switched communications media
such as the PSTN and ISDN. But one potential technical difficulty with High Speed
Circuit Switched Data (HSCSD) arises because in a multi-timeslot environment, dynamic

Page 161
Wireless Application Protocol

call transfer between different cells on a mobile network (called "handover") is


complicated unless the same slots are available end-to-end throughout the duration of the
Circuit Switched Data call.
Because of the way these technologies are evolving, the market need for high
speed circuit switched data and the market response to GPRS, the mobile infrastructure
vendors are not as committed to High Speed Circuit Switched Data (HSCSD) as they are
to General Packet Radio Service (GPRS). So, we may only see HSCSD in isolated
networks around the world. HSCSD may be used by operators with enough capacity to
offer it at lower prices, such as Orange. [1] believes that every GSM operator in Europe
will deploy GPRS, and by 2005 GPRS users will almost match the number of voice only
users. Right now there are 300 million wireless phones in the world. By 2005 we expect
one billion. Before I proceed, a quick look at the table below would help you appreciate
and understand clearly the technology characterizations as 2nd generation, 2.5 generation
and 3G. We have looked into 2G and some 2.5G technologies so far.

Figure 5.2

Destination: Third Generation


Standardization of 3G mobile systems is based on ITU (International Telecom
Union) recommendations for IMT 2000. IMT 2000 specifies a set of requirements that
must be achieved 100% for a network to be called 3G. By providing multimedia
capacities and higher data rates, these systems will enhance the range and quality of
services provided by 2G systems. The main contenders for 3G systems are wideband
CDMA (W-CDMA) and cdma2000. The ETSI/ GSM players including infrastructure
vendors such as Nokia and Ericsson backed W-CDMA. Cdma2000 was backed by the
North American CDMA community, led by the CDMA Development Group (CDG)
including infrastructure vendors such as Qualcomm and Lucent Technologies. Universal
Mobile Telephone System (UMTS) is the widely used European name for 3G.
The proposed IMT-2000 standard for third generation mobile networks globally is
a CDMA-based standard that encompasses THREE OPTIONAL modes of operation,

Page 162
Wireless Application Protocol

each of which should be able to work over both GSM MAP and IS-41 network
architectures. The three modes are shown in the following table.

Mode Title Origin Supporters


Direct Sequence Japan's ARIB and
Based on the first operational mode of
FDD (Frequency GSM network
1 ETSI's UTRA (UMTS Terrestrial Radio
Division operators and
Access) RTT proposal.
Duplex) vendors.
Multi-Carrier cdmaOne operators
Based on the cdma2000 RTT proposal
FDD (Frequency and members of the
2 from the US Telecommunications
Division CDMA Development
Industry Association (TIA).
Duplex) Group (CDG).
The second operational mode of ETSI's
UTRA (UMTS Terrestrial Radio Access) Harmonized with
Time Division
3 RTT proposal. An unpaired band China's TD-SCDMA
Duplex (TDD)
solution to better facilitate indoor RTT proposal.
cordless communications.

UMTS is the European designation for 3G systems. The UMTS frequency bands selected
by the ITU are 1,885 MHz - 2,025 MHz (Tx) and 2,110 MHz - 2,2,20 MHz (Rx). Higher
frequency bands could be added in future if need be, for stationary data. There is still
some confusion about all the frequency options as FCC has not given clear indications so
far. The following table should briefly give an idea about the 3G system specifications.

Figure 5.3
3rd Generation Initiatives
Third Generation Partnership Project (3GPP) and 3GPP2 are the two alliances
working towards the specification for the 3G systems. 3GPP partners are ETSI, TTC,
ARIB, TTA, T1 and the 3GPP2 includes TIA, TTC, ARIB, TTA. Although both have
chosen CDMA as the technology behind the 3G systems, the systems advocated by these
two groups are different. The 3GPP organizational partners have agreed to co-operate for
the production of Technical Specifications for a 3rd Generation Mobile System based on

Page 163
Wireless Application Protocol

the evolved GSM core networks and the radio access technologies that the Organizational
Partners support (i.e. UTRA both FDD and TDD modes). 3GPP2 provides global
specifications for ANSI/TIA/EIA-41 network evolution to 3G and global specifications
for the Radio Transmission Technologies (RTT’s) supported by ANSI/TIA/EIA-41. Yet
another group, the Operators Harmonization Group, is dedicated to achieving the
maximum possible level of commonality of technologies to maximize interworking of
different versions. It was as a result of pushing by OHG that led to ITU's mixed solution
to 3G air interfaces with ANSI-41 and GSM MAP networking.

The 3G Market
Wireless internet access is high on the priority lists of major wireless carriers.
NTT DoCoMo's iMode service in Japan, launched just two years ago, is expected to
double the number of subscribers to 10 million by the end of 2000. It is important to
understand that wire line data technologies are advancing very fast and will support very
high data rates at very low costs that would be prohibitive with foreseeable wireless
technology. 3G aim is high data rates, but the focus is mobility!
According to a market study we shall see the 3G wireless subscribers growing
from 1.7 million in 2002 to around 38 million in 2007. Whereas consumers account for
80% of the overall wireless market, they are expected to be only 20% of the 3G wireless
market. Similarly, business-vertical subscribers, estimated to be about 6 percent of the
overall wireless market, are assumed to be 42 percent of the 3G market initially, and
business-horizontal, 38 percent. The penetration of 3G subscribers relative to total
wireless subscribers is expected to grow from 1.3 percent in 2002 to 23 percent in 2007.
Consumer penetration, even by the end of the period, is assumed to have grown to only 9
percent, while business-vertical has reached 91 percent, and business-horizontal, 68
percent. Wireless operator revenue opportunity should also grow from $4.3 billion to $63
billion in the same time. Infrastructure opportunities should also grow from $4 billion to
$34 billion.

3G Timeframes
The actual deployment of 3G will not be a homogeneous occurrence. Japan will
lead with the service in early 2001, followed by Western Europe in mid to late 2003. U.S.
is expected to wait for some time at 2.5G and 2.75G before going in to true 3G. As I have
mentioned earlier, with TDMA based networks like GSM and IS-136, increased capacity
will be the initial driving factors. Therefore these networks will take a comparatively
longer time to true 3G.

Evolving Today's Networks towards 3G


The 3rd Generation Mobile System will most likely grow out of the convergence
of enhanced 2nd generation mobile systems with greater data transfer speed and capacity
and 1st generation satellite mobile systems. Evolution to the current generation mobile
networks to 3G doesn't necessarily mean seamless up gradation to the existing
infrastructure to the 3G. Evolution should also be seen in context of coexistence of the
2G and 3G networks for some time, with users able to roam across the new and the old

Page 164
Wireless Application Protocol

networks, able to access 3G services wherever 3G coverage is available. As mentioned


before, a 3G network can have one of the 3 optional air interfaces supporting one of the
two GSM MAP and IS-41 network architectures. This results in a range of choices for the
existing networks to evolve/migrate towards 3G. Possible convergence of TDMA and
GSM networks with EDGE adds another variable to the overall migration paths. Another
variable that adds complexity to this already complex list of options is the time frames
involved. By the time some of the 2.5 or 2.75G technologies go to field, we may see the
emergence of 3G technologies also. So, a lot of thought regarding the costs involved,
and/or the viability of 2.5G technologies like EDGE could be questioned. The same is
true about the time frames of the so called "4G". Before I talk about evolution/migration
paths of all the existing 2G mobile wireless technologies, let me briefly discuss the 3G
network architecture and other technology factors involved in the migration to 3G.

3G Architecture
The 3G network will have a layered architecture, which will enable the efficient
delivery of voice and data services. Layered network architecture, coupled with
standardized open interfaces, will make it possible for the network operators to introduce
and roll out new services quickly. These networks will have a connectivity layer at the
bottom providing support for high quality voice and data delivery. Using IP or ATM or a
combination of both, this layer will handle all data and voice info. The layer consists of
the core network equipment like routers, ATM switches and transmission equipment.
Other equipment provides support for the core bit stream of voice or data, providing QOS
etc. Note that in 3G networks, voice and data will not be treated separately which could
lead to a reduction in operational costs of handling data separately from voice. The
application layer on top will provide open application service interfaces enabling flexible
service creation. This user application layer will contain services for which the end user
will be willing to pay. These services will include eCommerce, GPS and other
differentiating services. In between the application layer and the connectivity layer, will
run the control layer with MSC servers, support servers, HLR etc. These servers are
needed to provide any service to a subscriber.

Migration Strategies
The migration to 3G is not just based on evolving core networks and the radio
interface to IMT 2000 compliant systems. Migration towards 3G would also be based on
the following steps/technologies: Network upgrades in the form of EDGE, GPRS,
HSCSD, and CDPD, IS-136 +, HDR etc. Evolution to 2.5G basically will provide
support for high-speed packet data. Though these technologies are extensions to 2G
rather than precursors to 3G these will have a major impact either by proving (or not)
demand for specific services. Service trials to test infrastructure, handsets and
applications etc. Introduction of WAP-based services that bring the web to the wireless
phone. In short-term WAP and, in longer term, XML will provide a standard framework
for accessing wireless Internet content, enabled by 2.5G/3G. The development of mobile
web portals
 Development of microbrowsers and operating systems.

Page 165
Wireless Application Protocol

 Wide acceptance of short-range wireless connectivity technologies like Bluetooth,


HomeRF etc.

Third Generation (3G) – An overview


The telecommunications world is changing as the trends of media convergence;
industry consolidation, Internet and Internet Protocol (IP) technologies and mobile
communications collide into one. Significant change will be bought about by this rapid
evolution in technology, with Third Generation mobile Internet technology a radical
departure from that that came before in the first and even the second generations of
mobile technology. Some of the changes include:
People will look at their mobile phone as much as they hold it to their ear. As
such, 3G will be less safe than previous generations- because television and other
multimedia services tend to attract attention to themselves- instead of hands-free kits.
Data ('non-voice') uses of 3G will be as important as and very different from the
traditional voice business. Mobile communications will be similar in its capability to
fixed communications, such that many people will only have a mobile phone.

The Standards for 3G


Third Generation (3G) is the mobile phone systems that will be begin to be
available commercially in the year 2001/2. The idea behind 3G is to unify the disparate
standards that today's second generation wireless networks use. Instead of different
network types being adopted in America, Europe and Japan, the plan is for a single
network standard to be agreed and implemented.
The 3G core network will be an evolution from GPRS or equivalent 2.5G core
network systems. GPRS nodes such as the Serving GPRS Support Node (SGSN) and
Gateway GPRS Support Node (GGSN) are described in detail in 'Data on GPRS' from
Mobile Life streams. Upgrades to the mobile and transit switching systems to deliver
packets will also be needed.

Electronic Agents
Electronic agents is a technology that Mobile Life streams believe will play an
important role for mobile working in the future- as agents are dispatched to carry out
searches and tasks on the Internet and report back to their owners. This is an efficient
way to get things done on the move.
Electronic agents are defined as "mobile programs that go to places in the network
to carry out their owners' instructions. They can be thought of as extensions of the people
who dispatch them." Agents are "self-contained programs that roam communications
networks delivering and receiving messages or looking for information or services."
Certainly, 3G terminals will give their owners much more control over their lives
than today's mobile phones. They will be eAssistants, eSecretaries, eAdvisors and
eAdministrators. This kind of control is what Home Automation applications anticipate.
Indeed Orange in the UK has a vision expects that within ten years, our mobiles will be
waking us up, reading out our emails, ordering our groceries, telling us the best route to
work, reminding us and translating our conference calls. The key question is the extent to

Page 166
Wireless Application Protocol

which these processes are human initiated or computer generated and controlled and the
extent to which devices can 'learn' individual preferences and act accordingly.

Downloading Software
In the twenty-first century, software will increasingly be downloaded
electronically from the Internet rather than purchased as boxed product in stores. This is a
like file transfer applications that involve downloading the software itself. You might for
example need WinZip or Abode Acrobat to read a file- and can download that over the
3G network to your 3G terminal. Downloading software has several advantages because
it is:
 Environmentally friendly: there is no packaging to throw away or store.
 Quick and convenient: downloadable products are delivered direct to your
computing device. It arrives in minutes, not days.
 Value for money: you pay no delivery charges.

5.3 Revision Points

GPRS
General Packet Radio Service (GPRS) is a technology for transmitting data over a Global
System for Mobile Communications (GSM) wireless network. It uses packet switching
and supports IP.

File Transfer Protocol


FTP is an Internet file transfer service that operates on the Internet and over TCP/IP
networks. FTP is basically a client/server protocol in which a system running the FTP
server accepts commands from a system running an FTP client. FTP operates among
heterogeneous systems and allows users on one system to interact with another type of
system without regard for the operating systems in place.

Electronic Agents
Electronic agents are self-contained programs that roam communications networks
delivering and receiving messages or looking for information or services.

5.4 Intext Questions

1. What is GPRS explain its advantages and limitations?


2. Explain the application of GPRS?
3. What is 3G? Explain its significance?
5.5 Summary

Page 167
Wireless Application Protocol

 The General Packet Radio Service (GPRS) is a new non-voice value added
service that allows information to be sent and received across a mobile
telephone network.
 To use GPRS users specifically need a mobile phone or terminal that supports
GPRS a subscription to a mobile telephone network that supports GPRS and
use of GPRS must be enabled for that user.
 Non-voice mobile services can be used to assign and communicate new jobs
from office-based staff to mobile field staff.
 The main objectives to be reached by implementing GPRS are the following:

• give support for bursty traffic


• use efficiently network and radio resources
• provide flexible services at relatively low costs
• Possibility for connectivity to the Internet
• provide fast access time
• To have and support flexible co-existence with GSM voice

 3rd Generation Wireless, or 3G, is the generic term used for the next
generation of mobile communications systems. 3G systems aim to provide
enhanced voice, text and data services to user.

5.6 Terminal Exercises

1. Comment upon the relative challenges faced under GPRS?


2. Where does the telecom industry go from here? Comment upon the future
technological developments expected in this area?
5.7 Supplementary Materials

6. http://www.linktionary.com/w/wap.html
7. http://www.wapforum.org/
8. http://www.linktionary.com/w/wireless_mobile.html
9. http://www.3gpp.org/

5.8 Assignments

1. What are some key characteristics that distinguish third generation cellular
systems from second generation cellular systems?
2. Write short notes on electronic agents.

Page 168
Wireless Application Protocol

5.9 Suggested Reading/Reference Books/Set Books

9. “Charles Arehart, Nirmal Chidambaram, S.Guruprasad, A.Howell,


S.Kasipillai “, “Professional WAP with WML, WML Script, ASP, JSP, XML,
XSLT, WTA, Push and VoiceXML”, SPD, Mumbai, 2000.
10. Martin Frost, “Learning WML & WML Script”, SPD, Mumbai, 2000.

5.10 Learning Activities

Collect information on GPRS (not covered in this lesson) from Internet.

5.11 Keywords

General Packet Radio Service (GPRS)


File Transfer Protocol (FTP)
Global System for Mobile Communications (GSM)
High Speed Circuit Switched Data (HSCSD)
Time Division Multiple Access (TDMA)

Page 169

You might also like