Sie sind auf Seite 1von 18

WAP is designed in a layered fashion so that it can be extensible,flexible, and

scalable. As a result, the WAP protocol stack is divided into five layers:
Application Layer
Wireless Application Environment (WAE. !his layer is of most interest to
content developers because it contains, among other things, device
specifications and the content development programming languages, W"#
and W"#$cript.
Session Layer
Wireless $ession Protocol (W$P. %nlike &!!P, W$P has been designed by the
WAP 'orum to provide fast connection suspension and reconnection.
Transaction Layer
Wireless !ransaction Protocol (W!P. !he W!P runs on top of a datagram
service such as %ser (atagram Protocol (%(P and is part of the standard
suite of !)P*+P protocols used to provide a simplified protocol suitable for lo,
band,idth ,ireless stations.
Security Layer
Wireless !ransport #ayer $ecurity (W!#$. W!#$ incorporates security
features that are based upon the established !ransport #ayer $ecurity (!#$
protocol standard. +t includes data integrity checks, privacy, service denial,
and authentication services.
Transport Layer
Wireless (atagram Protocol (W(P. !he W(P allo,s WAP to be bearer-
independent by adapting the transport layer of the underlying bearer. !he
W(P presents a consistent data format to the higher layers of the WAP
protocol stack, thereby offering the advantage of bearer independence to
application developers.
Each of these layers provides a ,ell-defined interface to the layer above it. !his
means that the internal ,orkings of any layer are transparent or invisible to the
layers above it. !he layered architecture allo,s other applications and services to
utilise the features provided by the WAP-stack as ,ell. !his makes it possible to
use the WAP-stack for services and applications that currently are not specified by
WAP.
!he WAP protocol architecture is sho,n belo, alongside a typical +nternet Protocol
stack.
.ote that the mobile net,ork bearers in the lo,er part of the figure above are not
part of the WAP protocol stack.
!he uppermost layer in the WAP stack, the Wireless Application Environment
(WAE provides an environment that enables a ,ide range of applications to be
used on ,ireless devices. +n the chapter /WAP - the ,ireless service enabler/ the
WAP WAE programming model ,as introduced. !his chapter ,ill focus on the
various components of WAE:
Addressing model
A syntax suitable for naming resources stored on servers. WAP use the same
addressing model as the one used on the +nternet, that is, %niform 0esource
#ocators (%0#.
Wireless Markup Language (WML)
A light,eight markup language designed to meet the constraints of a ,ireless
environment ,ith lo, band,idth and small handheld devices. !he Wireless
"arkup #anguage is WAP.s analogy to &!"# used on the WWW. W"# is based
on the Extensible "arkup #anguage (1"#.
WMLScript
A light,eight scripting language. W"#$cript is based on E)"A$cript, the
same scripting language that 2ava$cript is based on. +t can be used for
enhancing services ,ritten in W"# in the ,ay that it to some extent adds
intelligence to the services, for example procedural logic, loops, conditional
expressions, and computational functions.
Wireless Telephony Application (WTA, WTAI)
A frame,ork and programming interface for telephony services. !he Wireless
!elephony Application (W!A environment provides a means to create
telephony services using WAP.
Hardware and Sotware !e"uirement#
At minimum, developing WAP applications re3uires a ,eb server and a WAP
simulator. %sing simulator soft,are ,hile developing a WAP application is
convenient as all the re3uired soft,are can be installed on the development P).
Although soft,are simulators are good in their o,n right, no WAP application
should go into production ,ithout testing it ,ith actual hard,are. !he follo,ing list
gives a 3uick overvie, of the necessary hard,are and soft,are to test and develop
WAP applications:
a Web server ,ith connection to the +nternet
a W"# to develop WAP application
a WAP simulator to test WAP application
a WAP gate,ay
a WAP phone for final testing
"icrosoft ++$ or Apache on Windo,s or #inux can be used as the ,eb server and
.okia WAP !oolkit version 4.5 as the WAP simulator.
Please have look at WAP - %seful 0esources to find out all the above components.
$onigure We% Ser&er or WA'#
+n the WAP architecture, the ,eb server communicates ,ith the WAP gate,ay,
accepting &!!P re3uests and returning W"# code to the gate,ay. !he &!!P
protocol mandates that each reply must include something called a "ulti-Purpose
+nternet "ail Extensions ("+"E type.
+n normal ,eb applications, this "+"E type is set to text*html, designating normal
&!"# code. +mages, on the other hand, could be specified as image*gif or
image*6peg, for instance. With this content type specification, the ,eb bro,ser
kno,s the data type that the ,eb server returns.
+n WAP applications a ne, set of "+"E types must be used, as sho,n in the
follo,ing table:
(ile type MIM) type
W"# (.,ml text*vnd.,ap.,ml
W"#$cript (.,mls text*vmd.,ap.,mlscript
W7"P (.,bmp image*vnd.,ap.,bmp
+n dynamic applications, the "+"E type must be set on the fly, ,hereas in static
WAP applications the ,eb server must be configured appropriately.
'or more information about configuring "+"E types for your ,eb server, please
consult your ,eb server documentation.
!he topmost layer in the WAP architecture is made up of WAE (Wireless Application
Environment, ,hich consists of W"# and W"# scripting language.
W"# scripting language is used to design applications that are sent over ,ireless
devices such as mobile phones. !his language takes care of the small screen and
the lo, band,idth of transmission. W"# is an application of 1"#, ,hich is defined
in a document-type definition.
W"# pages are called decks. !hey are constructed as a set of cards, related to
each other ,ith links. When a W"# page is accessed from a mobile phone, all the
cards in the page are do,nloaded from the WAP server to mobile phone sho,ing
the content.
W"# commands and syntaxes are used to sho, content and to navigate bet,een
the cards. (evelopers can use these commands to declare variables, format text,
and sho, images on the mobile phone.
WA' 'rogram Structure#
A W"# program is typically divided into t,o parts: the document prolog and the
body. )onsider the follo,ing code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLC "!""#$P%O&U'""DTD #'L 1.(""E)"
"*++,-""www.w.,/or0m.or1"DTD"wml1(.2+2">
<wml>
<3.r2>
...
<"3.r2>
...more 3.r2s...
<"wml>
!he first line of this text says that this is an 1"# document and the version is 8.5.
!he second line selects the document type and gives the %0# of the document type
definition ((!(. !his (!( gives the full 1"# definition of W"#. !he (!(
referenced is defined in WAP 8.8, but this header changes ,ith the versions of the
W"#. !he header must be copied exactly so that the tool kits automatically
generate this prolog.
!he body is enclosed ,ithin a 9,ml:...9*,ml: tag pair as sho,n above. !he body
of a W"# document can consist of one or more of the follo,ing:
(eck
)ard
)ontent to be sho,n
.avigation instructions
WML $ommands#
!he commands used in W"# are summari;ed as follo,s:
Formatting:
$ommand
9p: Paragraph
9b: 7old
9big: #arge
9em: Emphasi;ed
9+: +talici;ed
9small: $mall
9strong: $trongly Emphasi;ed
9u: %nderlined
9br: #ine 7reak
Inserting images:
9img src</image-path*image - name/ alt</Picture not available/ *:
Using Tables:
$ommand
9table: (efinition of a table
9tr: (efining a ro,
9td: (efining a column
9!head: !able header
Variables:
(eclared as:
9setvar name</x/ value</xy;/*:
%sed as:
= identifier or
= (identifier or
= (+dentifier> conversion
Forms:
$ommand *escription
9select: (efine single or multiple list
9input: +nput from user
9option: (efines an option in a selectable list
9fieldset: (efines a set of input fields
9optgroup: (efines an option group in a selectable list
Task Elements
$ommand *escription
9go: 0epresents the action of s,itching to a ne, card
9noop: $ays that nothing should be done
9prev: 0epresents the action of going back to the previous card
9refresh: 0efreshes some specified card variables.
Events:
!he various events are as follo,s:
$ommand *escription
9do: (efines a do event handler
9onevent: (efines an onevent event handler
9postfield: (efines a postfield event handler
9ontimer: (efines an ontimer event handler
9onenterfor,ard: (efines an onenterfor,ard handler
9onenterback,ard: (efines an onenterback,ard handler
9onpick: (efines an onpick event handler
Sample WML 'rogram#
?eep the follo,ing W"# code into info.,ml on your server. +f your server is WAP
enabled then you can access this page using any WAP device.
<?xml version="1.0"?>
<!DOCTYPE wml PUBLC "!""#$P%O&U'""DTD #'L 1.(""E)"
"*++,-""www.w.,/or0m.or1"DTD"wml1(.2+2">
<!!! #'L ,rolo1.2e3l.r.+ion o/ /ile +4,e .n2 version>
<wml>
<!!! De3l.r.+ion o/ +*e #'L 2e35>
<3.r2 i2="in/o" new3on+ex+="+r0e">
<!!! 2e3l.r.+ion o/ . 3.r2 in 2e35>
<, .li1n="3en+er"><6>n/orm.+ion Cen+er<"6><",>
<!!!,.r.1r.,* 2e3l.r.+ion +o 2is,l.4 *e.2in1>
<,>
<!!!,.r.1r.,* 2e3l.r.+ion +o 2is,l.4 lin5s>
<. *re/="'ovie.wml">1. 'ovies in/o.<".>
<. *re/="#e.+*er.wml">(. #e.+*er n/o.<".>
<!!!2e3l.r.+ion o/ lin5s /or we.+*er .n2 movies>
<",>
<"3.r2>
<!!! 3.r2 en2>
<"wml>
<!!! ,ro1r.m en2>
W"#$cript (Wireless "arkup #anguage $cript is the client-side scripting language
of W"# (Wireless "arkup #anguage. A scripting language is similar to a
programming language, but is of lighter ,eight. With W"#$cript, the ,ireless
device can do some of the processing and computation. !his reduces the number
of re3uests and responses to*from the server.
!his chapter ,ill give brief description of all the important W"# $cript components.
WML Script $omponents#
W"# $cript is very similar to 2ava $cript. Almost W"# $cript components have
similar meaning as they have in 2ava $cript. A W"# $cript program components
are summari;ed as follo,s:
WML Script +perators#
W"# $cript supports follo,ing type of operators.
Arithmetic @perators
)omparison @perators
#ogical (or 0elational @perators
Assignment @perators
)onditional (or ternary @perators
WML Script $ontrol Statements#
)ontrol statements are used for controlling the se3uence and iterations in a
program.
Statement *escription
if-else )onditional branching
for "aking self-incremented fixed iteration loop
,hile "aking variable iteration loop
break !erminates a loop
continue Auit the current iteration of a loop
WML Script (unctions#
!he user-defined functions are declared in a separate file having the extension
.,mls. 'unctions are declared as follo,s:
/0n3+ion n.me 7,.r.me+ers8
9
3on+rol s+.+emen+s:
re+0rn v.r:
;
!he functions used are stored in a separate file ,ith the extension .,mls. !he
functions are called as the filename follo,ed by a hash, follo,ed by the function
name:
m.+*s.wmls<s=0.r78
WML Scripts Standard Li%raries#
!here are six standard libraries totally. &ere is an overvie, of them:
Lang# !he #ang library provides functions related to the W"#$cript language
core.
),ample (unction# abs(,abort(, character$et(,float(, is'loat(, is+nt(,
max(, is"ax(, min(, min+nt(, max+nt(, parse'loat(, parse+nt(,
random(, seed(
(loat# !he 'loat library contains functions that help us perform floating-point
arithmetic operations.
),ample (unction# s3rt(, round(, po,(, ceil(, floor(, int(, max'loat(,
min'loat(
String# !he $tring library provides a number of functions that help us
manipulate strings.
),ample (unction# length(, charAt(, find(, replace(, trim(, compare(,
format(, isEmpty(, s3uee;e(, to$tring(, elementAt(, elements(,
insertAt(, removeAt(, replaceAt(
-!L# !he %0# library contains functions that help us manipulate %0#s.
),ample (unction# getPath(, get0eferer(, get&ost(, get7ase(,
escape$tring(, isBalid(, load$tring(, resolve(, unescape$tring(,
get'ragment(
WML.rowser# !he W"#7ro,ser library provides a group of functions to
control the W"# bro,ser or to get information from it.
),ample (unction# go(, prev(, next(, get)urrent)ard(, refresh(,
getBar(, setBar(
*ialogs# !he (ialogs library )ontains the user interface functions.
),ample (unction# prompt(, confirm(, alert(
WML Scripts $omments#
!here are t,o types of comments in W"#$cript:
Single/line comment# !o add a single-line comment, begin a line of text
,ith the ** characters.
Multi/line comment# !o add a multi-line comment, enclose the text
,ithin *C and C*.
!hese rules are the same in W"#$cript, 2ava$cript, 2ava, and )DD. !he W"#$cript
engine ,ill ignore all comments. !he follo,ing W"#$cript example demonstrates
the use of comments:
"" T*is is . sin1le!line 3ommen+.
"> T*is is .
m0l+i!line 3ommen+. >"
"> $ m0l+i!line 3ommen+ 3.n 6e ,l.3e2 on . sin1le line. >"
WML Script $ase Sensiti&ity#
!he W"#$cript language is case-sensitive. 'or example, a W"#$cript function ,ith
the name W"#$criptE'unction is different from ,mlscriptEfunction. $o, be careful
of the capitali;ation ,hen defining or referring to a function or a variable in
W"#$cript.
Whitespaces in WMLScript#
Except in string literals, W"#$cript ignores extra ,hitespaces like spaces, tabs and
ne,lines. &ence, the code in the earlier /&ello World/ example can be typed in the
follo,ing ,ay and the result ,ill remain the same:
WML Script Statement Termination %y Semicolons#
A semicolon is re3uired to end a statement in W"#$cript. !his is the same as )DD
and 2ava. .ote that 2ava$cript does not have such re3uirement but W"# $cript
makes it mandatory.
A vast ma6ority of WAP services are available in the market. Fou may to contact to
some WAP lover to have a big list of all the available services and then you can
start accessing those services from your WAP enabled mobile phone.
&o,ever, some examples of useful mobile services are in the follo,ing fields:
.anking#
Accessing account statements
Paying bills
!ransferring money bet,een accounts
(inance#
0etrieving stock and share prices
7uying and selling stocks and shares
#ooking up interest rates
#ooking up currency exchange rates
Shopping#
7uying everyday commodities
7ro,sing and buying books
7uying )(s
Ticketing#
7ooking or buying airline tickets
7uying concert tickets
7ooking theatre tickets
)ntertainment#
0etrieving restaurant details
#ooking up clubs
'inding out ,hat is playing in ,hat cinemas
Playing solitaire games
Playing interactive games
Weather#
0etrieving local ,eather forecasts
#ooking up ,eather at other locations
)/ Messaging#
Boice mail
%nified "essaging
Enhanced support of legacy $"$ services
Li&e WA' ),amples#
!he follo,ing are some example WAP applications:
0123ump (http#44www50126ump5com) A selection of stock data and
ne,s, all via WAP.
07885com (http#4407885com) WAP*Web development services.
1'L World/Wide Hotel 9uide (http#44wap51pl5com) A ,orld,ide hotel
guide, accessible in multiple languages via a WAP-enabled device.
A)9))/)indho&en (http#44wappy5to4aegee4) A Europe-,ide studentsG
association ,hose goal is to allo, all students to integrate and learn about
each othersG cultures.
A6a,o (http#44www5a6a,o5com) A WAP service for Wireless $tock !rading
from any WAP-enabled device.
Aktiesidan (http#44mmm5aktiesidan5com4ser&lets4aktiesidan4) A
$,edish stock-market monitoring service, all WAP-enabled.
Ama:on5com .ookshop
(http#44www5ama:on5com4phone4) Ama;on.com has launched this WAP
portal (&("#-based for bro,sing books.
Traic Maps (http#44www5we%raska5com4) A 'rench service that
monitors and sho,s the latest in traffic ne,s via maps.
!he follo,ing sections outline ho, various groups may gain from WAP:
Su%scri%ers#
+t is crucial that the subscribers ,ill benefit from using WAP based services,
other,ise there ,ill be no incentive neither for WAP as a ,hole nor for any of the
other groups mentioned belo,. !he key-benefits can be summarised as:
Portability
Easy to use
Access to a ,ide variety of services on a competitive market
!he possibility of having personalised services
'ast, convenient, and efficient access to services
!o fulfil as many customers needs as possible, WAP devices ,ill be available
in various form factors, e.g. pagers, handheld P)s, and phones
+perators#
"any of the advantages mentioned under /$ervice Providers/ are be applicable to
operators as ,ell. !he operatorGs benefits may include:
Address ne, market segments of mobile users by enabling a ,ider range of
mobile BA$.
(eploy telephony services that in contrast to traditional telephony services
are easy to create, update, and personalise
%se the flexibility of WAP as a tool to differentiate from competitors
Attractive interface to services ,ill increase usage
+ncreased revenues per user due to higher net,ork utilisation
)onvenient service creation and maintenance, including short time-to-market
0eplace expensive customer care centres ,ith WAP based services (E-care
WAP services are designed to be independent of the net,ork, implying that an
operator ,ho runs different types of net,orks only have to develop its
services ones
An open standard means that e3uipment ,ill be provided by many
manufacturers
Ser&ice 'ro&iders#
WAP opens ne, possibilities for service and content providers since they not
necessarily have to come to an agreement ,ith a specific operator about providing
services to their customers. !he gains are for example:
)reate a service once, make it accessible on a broad range of ,ireless
net,orks
Address ne, market segments by launching innovative mobile BA$. ?eep old
customers by adapting existing +nternet services to WAP
?eep old customers by adapting existing +nternet services to WAP
)onvenient service creation and maintenance
)reating a WAP service is no harder than creating an +nternet service today
since W"# and W"#$cript are based on ,ell-kno,n +nternet technology
%se standard tools like A$P or )H+ to generate content dynamically
%tilise existing investments in databases etc that are the basis of existing
+nternet services
Manuacturers#
"obile devices supporting WAP ,ill be available in many different form factors, e.g.
cellular phones, pagers, and handheld P)s. &ard,are manufacturers ,ill also need
to supply operators etc ,ith e3uipment, such as WAP Hate,ay*Proxys and W!A
servers. "anufacturer benefits are for example:
WAP scales across a broad range of mobile net,orks, meaning that WAP
implementations can be used in devices supporting different types of
net,orks.
!he expected ,ide adoption of WAP implies that economies of scales can be
achieved, meaning that the huge mass-market can be addressed
!he fact that WAP is designed to consume minimal amount of memory, and
that the use of proxy technology relieves the )P%, means that inexpensive
components can be used in the handsets
0euse the deep kno,ledge about ,ireless net,ork infrastructure to develop
advanced servers that seamlessly integrates mobile BA$ ,ith telephony
$ei;e the opportunity to introduce ne, innovative products
Tools 'ro&iders#
!oday there is a large amount of tools available for creating applications for the
,eb. )ontent developers have become used to the convenience that tools like
'rontPage and (reamWeaver provides. !ools providers ,ill be able to:
0euse and modify existing products to support WAP, or even integrate WAP
support in existing tools.
Address a ne, customer base in the ,ireless community.
!he future of WAP depends largely on ,hether consumers decide to use
WAPdevices to access the Web, and also on ,hether a ne, technology comes
along that ,ould re3uire a different infrastructure than WAP.
@n the consumer side, the factors largely involve the limitations of WAP and
of handheld devices: the lo, band,idth, the limited input ability, and the
small screens all re3uire users to adapt from their regular Web-bro,sing
expectations.
+n the next fe, years, mobile phones ,ill start to benefit from very high
band,idth capabilities. !he 4.IH*JH systems ,ill allo, much higher capacity
and data rates than can be offered by the restricted band,idth currently
available.
!hese ,ireless devices ,ill be supported by a number of emerging
technologies, including HP0$, E(HE, &$)$( and %"!$:
$o ,hat is the future for WAPK +t has been designed to be independent of the
underlying net,ork technology. !he original constraints WAP ,as designed for
- intermittent coverage, small screens, lo, po,er consumption, ,ide
scalability over bearers and devices, and one-handed operation - are still valid
in 4.IH and JH net,orks.
!he bottom line is that WAP is not and can never be the Web on your mobile
phone.WAP is great as long as developers understand that itGs ,hatGs inside
the applications that matters, and the perceived value of the content to the
user. !he bro,ser interface itself, ,hile important, ,ill al,ays be secondary to
the content.

Das könnte Ihnen auch gefallen