FINAL
FINAL
Unit I
Introduction
WAP
Background
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.
Page 2
Wireless Application Protocol
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
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
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:
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.
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.
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.
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.
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.
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
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
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
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.
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.
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.
Figure 1.2
Page 15
Wireless Application Protocol
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.
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.
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.
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 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.
Unreliable requests
Reliable requests
Reliable request with one result message.
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.
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 ™.).
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.
Page 20
Wireless Application Protocol
Figure 1.4
Page 21
Wireless Application Protocol
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.
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.
Page 24
Wireless Application Protocol
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
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.
Page 29
Wireless Application Protocol
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.
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.
Page 32
Wireless Application Protocol
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
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.
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.
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
Page 42
Wireless Application Protocol
Page 43
Wireless Application Protocol
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
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.
Page 45
Wireless Application Protocol
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. 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
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
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.
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:
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.
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
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
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'.
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.
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.
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
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:
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:
Page 57
Wireless Application Protocol
<onevent type="some_type">
some_action
</onevent>
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>
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>
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
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':
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:
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.
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. <?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
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:
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):
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
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>
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
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).
Figure 2.7
Page 67
Wireless Application Protocol
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.
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.
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
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>
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:
Page 70
Wireless Application Protocol
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:
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
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).
& &
" "
' '
< <
> >
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 >, or the hexadecimal
Page 73
Wireless Application Protocol
>. 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.
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.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.
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
Page 75
Wireless Application Protocol
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
Page 76
Wireless Application Protocol
Unit III
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
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)
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.
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.
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 "".
The data type Boolean knows two constants, which again-reflect the logical value. The
value may either true or false.
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.
if condition
while loop
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 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.
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
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:
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 (.).
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()
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()
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()
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.
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.
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)
Page 90
Wireless Application Protocol
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.
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
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:
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).
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
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
length
string.length(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
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
replace
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
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
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";
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()
Return Value
Floating-point 3.40282347E+38
Examples
var a = Float.maxFloat();
Page 102
Wireless Application Protocol
minFloat
float.minFloat()
Return Value
Floating-point 1.17549435E-38
Examples
var a = Float.minFloat();
pow
float.pow(value1, value2)
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)
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
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.
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/".
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.
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"
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
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);
Figure 3.2
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.
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.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.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.
Page 119
Wireless Application Protocol
Page 120
Wireless Application Protocol
Unit IV
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
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.
Page 123
Wireless Application Protocol
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
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.
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:
Page 128
Wireless Application Protocol
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
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
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.
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
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
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.
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.
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.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.
Page 141
Wireless Application Protocol
4.11 Keywords
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
Page 143
Wireless Application Protocol
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:
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.
Page 145
Wireless Application Protocol
usability and therefore business case is threatened if GPRS MT is not supported by GPRS
terminals.
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.
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
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.
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.
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.
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
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.
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.
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.
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
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.
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
Figure 5.2
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.
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.
Page 164
Wireless Application Protocol
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
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.
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.
Electronic Agents
Electronic agents are self-contained programs that roam communications networks
delivering and receiving messages or looking for information or services.
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:
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.
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.11 Keywords
Page 169