Escolar Documentos
Profissional Documentos
Cultura Documentos
1. Introduction
1.1 What is WAP? WAP stands for Wireless Application Protocol WAP is an application communication protocol WAP is used to access services and information WAP is inherited from Internet standards WAP is for handheld devices such as mobile phones
WAP is a protocol designed for micro browsers WAP enables the creating of web applications for mobile devices.
1.2. The Wireless Application Protocol The WAP is the leading standard for information services on wireless terminals like digital mobile phones. The WAP standard is based on Internet standards (HTML, XML and TCP/IP).
1.3. History of WAP WAP is published by the WAP Forum, founded in 1997 by Ericsson, Motorola, Nokia, and Unwired Planet.
2.1 Web-Model
2. WAP Model
Client
Server
req. resp.
The content stored on the servers is of various formats, but HTML is the predominant. HTML provides the content developer with a means to
Internet Model
HTML
HTTP
TLS/SSL TCP/IP
The figure above shows how a WWW client request a resource stored on a web server. On the Internet, standard communication protocols, like HTTP and Transmission Control Protocol/Internet Protocol (TCP/IP) are used. The content available at the web server may be static or dynamic. Static content is produced once and not changed or updated very often, for example a company presentation.
Dynamic content is needed when the information provided by the service changes more often, for example timetables, news, stock quotes and account
programming model. Note the similarities with the Internet model. Without the WAP Gateway/Proxy the two models would have been practically identical.
Gateway
Server
req.
Encode & Decode
encoded resp.
resp.
WAP I
WEB
WAP Gateway/Proxy is the entity that connects the wireless domain with the Internet. We should make a 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.
A markup language - the Wireless Markup Language (WML) has been adapted to develop optimized WAP applications. In order to save
2.3 How WAP Model Works? When it comes to actual use, WAP works like this:
The user selects an option on their mobile device that has a URL with Wireless Markup language (WML) content assigned to it. The phone sends the URL request via the phone network to a WAP gateway, using the binary encoded WAP protocol.
The gateway translates this WAP request into a conventional HTTP request for the specified URL, and sends it on to the Internet. The appropriate Web server picks up the HTTP request. The server processes the request, just as it would any other request. If the URL refers to a static WML file, the server delivers it. If a CGI script is requested, it is processed and the content
returned as usual.
The Web server adds the HTTP header to the WML content and returns it to the gateway. The WAP gateway compiles the WML into binary form. The gateway then sends the WML response back to the phone. The phone receives the WML via the WAP protocol. The micro-browser processes the WML and displays the content
on the screen.
3. WAP- Architecture
WAP Architecture
Client
WML
WAP Gateway
WML Encoder
Web Server
CGI Scripts etc. WML Decks with WML-Script
Source: WAP Forum
WSP/WTP
HTTP
Content
Client
WML WMLScript WTAI Etc.
WSP/WTP
WMLScript Compiler
Protocol Adapters
Content
Application (WAE)
Application
Session (WSP)
Transaction (WTP) Security (WTLS) Transport (WDP)
Medium: GSM, CDMA, UMTS ...
HTTP
TCP Security (TLS) IP/UDP
Medium: ...
Session Layer Wireless Session Protocol (WSP). Unlike HTTP, WSP has been designed by the WAP Forum to provide fast
Transaction Layer Wireless Transaction Protocol (WTP). The WTP runs on top of a datagram service such as User Datagram Protocol (UDP) and is part of the standard suite of TCP/IP protocols used to provide a simplified protocol suitable for low bandwidth wireless stations. WTP -- The WAP transaction protocol (WTP) layer provides
WDP -- The WAP datagram protocol (WDP) is the transport layer that sends and receives messages via any available bearer network, including SMS, USSD, CSD, CDPD and GPRS.
Security Layer Wireless Transport Layer Security (WTLS). WTLS incorporates security features that are based upon the established Transport Layer Security (TLS) protocol standard. It includes data integrity checks, privacy, service denial, and authentication services. WTLS -- Wireless transport layer security (WTLS), an optional security layer, has encryption facilities that provide the secure transport service required by many applications, such as e-commerce.
Transport layer Wireless Datagram Protocol (WDP). The WDP allows WAP to be bearer-independent by adapting
Each of these layers provides a well-defined interface to the layer. This means that the internal workings of any layer are transparent or invisible to the layers. The layered architecture allows other applications and services to utilize the features provided by the WAP-stack as well. This makes it possible to use the WAP-stack for services and
The WAP protocol architecture is shown below alongside a typical Internet Protocol stack.
WSP Services
provides shared state between client and server, optimizes content transfer session management (establish, release, suspend, resume) efficient capability negotiation content encoding push
WSP/B (Browsing)
HTTP/1.1 functionality - but binary encoded exchange of session headers push and pull data transfer asynchronous requests
WSP Overview
Session Management
WSP introduces sessions that can be established from a client to a server and may be long lived Sessions can also be released in an orderly manner Capabilities of suspending and resuming a session are important.
WSP Overview
Header Encoding
compact binary encoding of headers, content type identifiers and other well-known textual or structured values reduces the data actually sent over the network
Capabilities negotiation
Clients and servers can agree upon a common level of protocol functionality during session establishment E.g. parameters to negotiate are max client SDU size, max outstanding requests, protocol options and server SDU size
Content encoding
WSP also defines the efficient binary encoding for the content it transfers Offers content typing and composite objects a
WSP Sessions
Session Context and Push
push can take advantage of session headers server knows when client can accept a push
Connection-mode
long-lived communication, benefits of the session state, reliability
Connectionless-mode
stateless applications, no session creation overhead, no reliability overhead
Class 1
Used for confirmed push, method invocation, session resume and session management class 2 The following time sequence charts will give some examples
CH: Client Header RC: Requested Capabilities SH: Server Header NC: Negotiated Capabilities
Source: Schiller
S-Resume.cnf
Source: Schiller
Source: Schiller
S-MethodInvoke.req TR-Invoke.req
TR-Invoke.ind S-MethodInvoke.ind TR-Invoke.res S-MethodInvoke.res S-MethodInvoke.cnf TR-Invoke.cnf
TR-Result.req S-MethodResult.req
S-MethodResult.ind S-MethodResult.res TR-Result.ind TR-Result.res TR-Result.cnf S-MethodResult.cnf
Source: Schiller
S-MethodInvoke_2.ind
S-MethodInvoke_1.ind S-MethodInvoke_3.req S-MethodResult_1.ind S-MethodResult_3.ind S-MethodInvoke_4.req S-MethodInvoke_4.ind S-MethodResult_4.ind S-MethodResult_2.ind S-MethodResult_4.req S-MethodResult_1.req S-MethodInvoke_3.ind S-MethodResult_3.req S-MethodResult_2.req
Source: Schiller
WTP Class 0 transaction client S-SAP S-ConfirmedPush.ind (CPID, PH, PB) S-ConfirmedPush.res (CPID) WTP Class 1 transaction
S-ConfirmedPush.cnf (SPID)
Source: Schiller
S-Unit-MethodResult.ind (CA, SA, TID, S, RH, RB) S-Unit-Push.ind (CA, SA, PID, PH, PB) WDP Unitdata service
Source: Schiller
WAP-Environment
The Wireless Application Environment (WAE) provides an environment that enables a wide range of applications to be used on wireless devices. The main idea behind WAE is to create a general-purpose application environment based mainly on existing technologies and philosophies of www.
Addressing model A syntax suitable for naming resources stored on servers. WAP use the same addressing model as the one used on the Internet. ie: Uniform Resource Locators (URL).
WAE Components
Architecture Application model, Micro browser, Gateway, Server User Agents WML/WTA/Others content formats: vCard, vCalendar, Wireless Bitmap, WML, ... WML XML-Syntax, based on card stacks, variables, ... WMLScript procedural, loops, conditions, ... (similar to JavaScript) WTA telephone services, such as call control, text messages, phone book, ... (accessible from WML/WMLScript) Proxy (Method/Push)
Gateway
Method proxy
encoded response with content
Client
WTA user agent
Push proxy
push content
encoders & decoders request
encoded request
Content (XML)
Takes into account limited display, navigation capabilities of devices XML-based language
describes only intent of interaction in an abstract manner presentation depends upon device capabilities
XSL Processor
WML Stylesheet HTML StyleSheet
WML Browsers
HTTP Browser
WML
The basic unit is a card. Cards are grouped together into Decks Document ~ Deck (unit of transfer) All decks must contain Document prologue XML & document type declaration <WML> element Must contain one or more cards WML File Structure
<?xml version="1.0"?> <!DOCTYPE WML PUBLIC "-//WAPFORUM//DTD WML 1.0//EN" "http://www.wapforum.org/DTD/wml.xml">
WML Example
Navigation <WML> <CARD> <DO TYPE=ACCEPT> <GO URL=#eCard/> </DO Welcome! </CARD> <CARD NAME=eCard> <DO TYPE=ACCEPT> <GO URL=/submit?N=$(N)&S=$(S)/> </DO> Enter name: <INPUT KEY=N/> Choose speed: <SELECT KEY=S> <OPTION VALUE=0>Fast</OPTION> <OPTION VALUE=1>Slow</OPTION> <SELECT> </CARD> </WML>
Card
Variables
Deck
Input Elements
A Deck of Cards
<WML> <CARD> <DO TYPE="ACCEPT" LABEL="Next"> <GO URL="#card2"/> </DO> Acme Inc.<BR/>Directory </CARD> <CARD NAME="card2"> <DO TYPE="ACCEPT"> <GO URL="?send=$type"/> </DO> Services <SELECT KEY="type"> <OPTION VALUE="em">Email</OPTION> <OPTION VALUE="ph">Phone</OPTION> <OPTION VALUE="fx">Fax</OPTION> </SELECT> </CARD> </WML>
The DO Element
Binds a task to a user action
Action type: Label: Task: Destination: Post data: ACCEPT, OPTIONS, HELP PREV, DELETE, RESET Text string or image (optional) GO PREV, REFRESH, NOOP URL if METHOD=POST
Anchored Links
Bind a task to the ACCEPT action, when cursor points to a link
TITLE= sets the label string (default = Link) Links are not allowed in select list options
<CARD> Please visit our <A TITLE="Visit"> <GO URL="home.wml"/>home page</A> for details. </CARD>
Input fields
Enter a string of text or numbers
KEY variables
Set by SELECT and INPUT elements How user input is passed to other cards and the application server
Source: WAP Forum
<CARD> <DO TYPE="ACCEPT"> <GO URL="?get=person" METHOD="POST" POSTDATA="userid=$ssn"/> </DO> Soc Security: <INPUT KEY="ssn" FORMAT="NNN\-NN\-NNNN"/> </CARD>
Soc. Security:
287-33- 7629 ____________ OK
Displaying Images
Insert app images or local icons within display text
1-bit BMP format
<CARD> <DO TYPE="ACCEPT"> <GO URL="#c2"/> </DO> Continue <IMG LOCALSRC="righthand" ALT="forward..."/> </CARD> <CARD NAME="c2"> <IMG SRC="../images/logo.wbmp" ALT="Unwired Planet"/> <BR/>Welcome! </CARD>
wireless devices such as mobile phones. This language takes care of the
small screen and the low bandwidth of transmission. WML is an application of XML, which is defined in a document-type
definition.
WML pages are called decks. They are constructed as a set of cards,
A WML program is typically divided into two parts: the document prolog
and the body. Consider the following code.
<?xml version="1.0"?>
</wml>
Navigation
Variables
Input Elements
<WML> <CARD> <DO TYPE=ACCEPT> <GO URL=#eCard/> </DO Welcome! </CARD> <CARD NAME=eCard> <DO TYPE=ACCEPT> <GO URL=/submit?N=$(N)&S=$(S)/> </DO> Enter name: <INPUT KEY=N/> Choose speed: <SELECT KEY=S> <OPTION VALUE=0>Fast</OPTION> <OPTION VALUE=1>Slow</OPTION> <SELECT> </CARD> </WML>
WAE - WML
Card
Deck
The first line of this text says that this is an XML document and the version
is 1.0.
The second line selects the document type and gives the URL of the document type definition (DTD). This DTD gives the full XML definition of
WML.
The DTD referenced is defined in WAP 1.1, but this header changes with the versions of the WML. The header must be copied exactly so that the
The body of a WML document can consist of one or more of the following:
Deck Card Content to be shown Navigation instructions
Decks and Cards WML pages are often called "decks". A deck contains a set of cards. A card element can contain text, markup, links, input-fields, tasks, images and more. Cards can be related to each other with links. Navigation between the cards is done by the phone computer - inside the phone - without any extra access trips to the server.
WML Commands: The commands used in WML are summarized as follows: Formatting:
Command <p> <b> <big> <em> <I> <small> <strong> <u> <br> Description Paragraph Bold Large Emphasized Italicized Small Strongly Emphasized Underlined Line Break
Inserting images:
<img src="image-path/image - name" alt="Picture not available" />
Using Tables:
Command
Description
<table>
<tr> <td> <Thead>
Definition of a table
Defining a row Defining a column Table header
Variables:
Declared as
<setvar name="x" value="xyz"/>
Used as:
$ defines as identifier
Forms:
Command <select> Description Define single or multiple list
<input>
<option> <fieldset> <optgroup>
Task Elements
Command
Description Represents the action of switching to a new card Says that nothing should be done Represents the action of going back to the previous card Refreshes some specified card
<go>
<noop> <prev>
<refresh>
variables.
Events:
Command <do> <onevent> <postfield> <ontimer> <onenterforward> <onenterbackward> <onpick> Description Defines a do event handler Defines an onevent event handler Defines a postfield event handler Defines an ontimer event handler Defines an onenterforward handler Defines an onenterbackward handler Defines an onpick event handler
<wml>
<p>Hello World!</p>
</card>
</wml>
The result will look something like this in a mobile phone (note that only one card is displayed at a time):
------ Card 1 -----Hello World!
Queries!!!
Why are equipment manufacturers interested in WAP? Being a global open specification suite, WAP has generated the critical mass for manufacturers. This has opened up new product and marketing opportunities in the wireless industry and provides new revenue to participating companies.
Even as bandwidths increase, the cost of that bandwidth does not fall to zero. These costs result from higher power usage in
the terminals, higher costs in the radio sections, greater use of RF spectrum, and increased network loading. In addition, the
Therefore, there is still a need to optimize the device and network resources for wireless environments. We can expect WAP to optimize support for multimedia applications that continue to be relevant. If WAP is very successful in mass-markets on 2.5G networks, 3G networks may be needed purely for
We can only access WAP sites available on WAP server of our service provider.
Ticket purchase
Flight check in Viewing traffic information Checking weather conditions Looking up stock values Looking up phone numbers Looking up addresses Looking up sport results
Enterprise solutions
Email access, Database access, global intranet access Information updates pushed to WAP devices
Financial services
Banking, Bill-paying, Stock trading, Funds transfers
Travel services
Schedules and rescheduling, Reservations
M-Commerce
Shopping on the go Instant comparison shopping Location-based special offers and sales
Major players
www.nokia.com/wap www.ericsson.se/wap phone.com
OpenSource effort
www.wapgateway.org (Kannel WAP gateway project)
Thank You