wap (1)
TRANSCRIPT
w Z
eala
ndN
ew
Wi l A li ti P t lWireless Application Protocol
“The reports of my death are greatly exaggerated.”
Auc
klan
dU
nive
rsity
of A
The
U
WAP: Internet for Mobile Devices
Wireless Application Protocol but used synonymous toWireless Application Protocol, but used synonymous to Internet for mobile devices
What HTML is to the Internet, WML to WAPWhat HTML is to the Internet, WML to WAPWhat JavaScript™ is to the Internet, WML Script to WAP
What HTTP is to the Internet, WSP to WAP
New
Zea
land Wireless Session Protocol: HTTP/1.1 functionality and semantics
in a compact binary encoding + extensionsWAP 2 0 ll HTTP th i l & I t t
land
N WAP 2.0 allows HTTP across the wireless & Internet domains.
ersi
ty o
f Auc
klTh
e U
nive
A WML Example
<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www wapforum org/DTD/wml13 dtd">http://www.wapforum.org/DTD/wml13.dtd >
<wml>
New
Zea
land
wml<card id="MainCard" title="My First WML Card">
<p>
land
N
<img src="hello.wbmp" alt="Hello"/> <br/>Hello World! <br/>
ersi
ty o
f Auc
kl <a href="click.wml">Click Me here…</a><br/></p>
</card>
The
Uni
ve </card></wml>
Challenges
Internet technology was designed for desktop and largerInternet technology was designed for desktop and larger computers and medium to high bandwidth, generally reliable data networks. Mass-market, hand-held wireless devices have a constrained computing environment compared to desktop
New
Zea
land computers.
land
Ner
sity
of A
uckl
The
Uni
ve
Device Comparison
Desktop Laptop Mobile
CPUs Powerful Less powerful
New
Zea
land Memory Large Small
Power Mains Battery
land
N
Display Large Small
Input Keyboard, Mice Keypad, stylus, t h
ersi
ty o
f Auc
kl touch
The
Uni
ve
Network Comparison
Desktop Laptop MobileDesktop Laptop Mobile
Bandwidth More Less
New
Zea
land
Latency Less MoreConnection Good Not so good
land
N Connection stability
Good Not so good
Availability Good Less predictable
ersi
ty o
f Auc
kl
y p
The
Uni
ve
Main Goals of WAP
Support a wide range of devicesSupport a wide range of devicesEnable device personalization and customization, content delivery and content presentationdelivery, and content presentation.
New
Zea
land
land
Ner
sity
of A
uckl
The
Uni
ve
Main Goals of WAP
Provide an application model for wireless data services thatProvide an application model for wireless data services that utilizes the telephony, mobility, and other unique functions of wireless devices and networks.Leverage existing standards where possible, especially existing and evolving Internet standards.
New
Zea
land
land
Ner
sity
of A
uckl
The
Uni
ve
A WML Example
<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www wapforum org/DTD/wml13 dtd">http://www.wapforum.org/DTD/wml13.dtd >
<wml>
New
Zea
land
wml<card id="MainCard" title="My First WML Card">
<p>
land
N
<img src="hello.wbmp" alt="Hello"/> <br/>Hello World! <br/>
ersi
ty o
f Auc
kl <a href="click.wml">Click Me here…</a><br/></p>
</card>
The
Uni
ve </card></wml>
WML Structure
WML applications use a card and deck metaphorWML applications use a card and deck metaphorA user interaction is represented by a card, while a complete task is represented by a deckcomplete task is represented by a deckA deck is the smallest unit of WML a web server can send to a WAP browser, and it contains one or more cards
New
Zea
land
,The browser displays one card at a time
land
N
CardCardCard
ersi
ty o
f Auc
kl CardCard
The
Uni
ve
WML
Unlike HTML WML is XML Why is this important?Unlike HTML, WML is XML. Why is this important?
XHTML is XML Is this important?XHTML is XML. Is this important?
New
Zea
land
land
Ner
sity
of A
uckl
The
Uni
ve
Simple Web Architecture
HTTP request
New
Zea
land HTTP
response
land
N
Origin server
Client/user agent
ersi
ty o
f Auc
klTh
e U
nive
The WAP Architecture
WSP request
HTTP request
New
Zea
land
WSP response
HTTP response
land
N
WAP user agent
Origin server
WAP gateway*
INTERNET
response p
ersi
ty o
f Auc
kl
WIRELESS DOMAIN:WAP
Protocols
INTERNET DOMAIN:Internet
The
Uni
ve ProtocolsProtocols
* WAP 2.0 does not require the gateway, thus enabling the client to talk directly to the server.
The WAP Workflow
1 The user requests a URL through the WAP browser1. The user requests a URL through the WAP browser2. The browser passes the request to the WAP gateway
using the WAP protocolusing the WAP protocol3. The WAP gateway creates a normal HTTP request for
the URL and passes to the origin server
New
Zea
land
the URL and passes to the origin server.4. The origin servers returns the (possibly WML) content
of the URL to the WAP gateway.
land
N g y5. The WAP gateway encodes the HTTP headers and the
content (where applicable) into binary format (e.g.,
ersi
ty o
f Auc
kl
( pp ) y ( gcompiled WML), and transmits on to the WAP browser
6. The WAP browser displays the content (e.g. the first
The
Uni
ve card of the deck)
WSP/WML EncodingN
ew Z
eala
ndla
ndN
WSP/WML encoding allows the information to be transferred in a narrow pipe (i.e. small bandwidth network) without adding extra latency.
ersi
ty o
f Auc
kl
y
The
Uni
ve
The WAP Protocol Stack Revisited
WAP Device WAP Gateway Web Server
WAE WAE
WSP WSP HTTP HTTP
WTP WTP
WTLS WTLS TLS (SSL) TLS (SSL)
New
Zea
land WTLS WTLS TLS (SSL) TLS (SSL)
WDP WDP TCP TCP
Bearers Bearers IP IP
land
N Bearers Bearers IP IP
ersi
ty o
f Auc
klTh
e U
nive WSP is essentially a binary-formatted tokenized version of HTTP
designed to operate on low-bandwidth high-latency networks
Sample WAP Request I
If-None-Match: "0-6f-3e6cf51a"Accept: image/gif, text/x-vCalendar, image/vnd.wap.wbmp, application/vnd.wap.wmlscriptc, text/x-vCard, application/vnd.wap.wmlc, application/vnd.wap.wbxml, text/vnd.wap.wml, text/vnd wap wmlscript text/plaintext/vnd.wap.wmlscript, text/plainAccept-Language: enAccept-Charset: US-ASCII, ISO-8859-1, UTF-8, ISO-10646-UCS-2profile: http://wap.sonyericssonmobile.com/UAprof/T200.xml
New
Zea
land
p p p y pUser-Agent: SonyEricssonT200/R101bearer-indication: 0accept-application: 1,2X Nokia CONNECTION MODE: CMODE
land
N X-Nokia-CONNECTION_MODE: CMODEX-Nokia-BEARER: GPRSX-Nokia-gateway-id: NAWG/3.1/Build52Via: WTP/1.1 Vodafone wap FTC (Nokia WAP Gateway 3.1/ECD9/3.1.52), 1.1 vlsp1:9010
ersi
ty o
f Auc
kl
p ( y ) p(squid/2.5.STABLE3)X-Forwarded-For: 172.27.9.3
The
Uni
ve
Sample WAP Request II
Accept: application/vnd.wap.coc,application/vnd.wap.wmlc; Type=4360, image/gif, p pp p , pp p ; yp , g g ,application/vnd.phonecom.im,application/*, application/vnd.wap.slc,application/vnd.wap.sic, application/vnd.wap.multipart.related,application/vnd.phonecom.mmc-wbxml; Type=4364, audio/iMelody, text/x-vCalendar, application/octet-stream, audio/midi, application/vnd.wap.multipart.mixed, application/vnd.wap.wmlc; Level=1.3, application/vnd.openwave.pp,image/vnd.wap.wbmp, pp p ; , pp p pp, g p p,application/vnd.wap.wmlscriptc, application/vnd.uplanet.bearer-choice-wbxml, application/vnd.wap.wmlc; Type=1108,text/x-vCard, application/x-up-device, application/vnd.phonecom.mmc-wbxml, image/vnd.wap.wbmp; Type=0, application/vnd.wap.wmlc, application/vnd.wap.wmlc; Type=4365, text/vnd.wap.wml, text/vnd.wap.co, text/vnd.wap.wmlscript, text/x-wap-wta-wml, text/vnd.wap.sl,
New
Zea
land
p , p , p p , p , p ,text/vnd.wap.si, text/vnd.wap.connectivity-xml, text/vnd.wap.channel, text/vnd.wap.co, text/vnd.wap.sl, text/vnd.wap.si, text/vnd.wap.wmlscript, text/plain, text/vnd.wap.wml, text/plainUser-Agent: Alcatel-BG3/1.0 UP.Browser/5.0.3.3.11Accept-Language: en
land
N p g gAccept-Charset: UTF-8profile: http://www-ccpp-mpd.alcatel.com/files/ALCATEL-BG3_1.0.rdfX-Nokia-CONNECTION_MODE: CMODEX-Nokia-BEARER: GPRS
ersi
ty o
f Auc
kl X-Nokia-gateway-id: NAWG/3.1/Build52Via: WTP/1.1 Vodafone wap LDV (Nokia WAP Gateway 3.1/ECD9/3.1.52), 1.1 vlsp1:9010 (squid/2.5.STABLE3)X-Forwarded-For: 172.26.9.3
The
Uni
ve
Sample WAP Request III
Accept-Language: enAccept: application/vnd.wap.xhtml+xml, application/vnd.wap.wml, application/xhtml+xml, multipart/mixed, application/vnd.wap.multipart.mixed, image/gif, */*, text/x-vcard, text/x-vcalendar image/vnd wap wbmpvcalendar, image/vnd.wap.wbmpAccept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JISUser-Agent: SonyEricssonV600i/R2K Browser/SEMC-Browser/4.2 Profile/MIDP-2.0 Configuration/CLDC-1.1
New
Zea
land
gx-wap-profile: "http://wap.sonyericsson.com/UAprof/V600iR101-3G.xml"Content-Length: 0X-Nokia-CONNECTION_MODE: TCPX Nokia BEARER: GPRS
land
N X-Nokia-BEARER: GPRSX-Nokia-gateway-id: NWG/4.1/Build89Via: WTP/1.1 Vodafone wap2FTC (Nokia WAP Gateway 4.1/CD13/4.1.89), 1.1 vlsp1:9010 (squid/2.5.STABLE10)
ersi
ty o
f Auc
kl
( q )X-Forwarded-For: 172.27.71.132
The
Uni
ve
Sample WAP Request IV
Accept: application/vnd.wap.wmlc, application/vnd.wap.wmlscriptc, text/html, text/css, application/xhtml+xml, application/vnd.wap.xhtml+xml, application/vnd.wap.multipart.related, application/vnd.wap.multipart.mixed, multipart/mixed, application/vnd.wap.sic, application/vnd.oma.drm.message, application/vnd.phonecom.mmc-wbxml, application/motorola-pp g , pp p , ppmmstemplate, image/gif, image/bmp, image/vnd.wap.wbmp, image/png, image/jpeg, image/ems.userdefined.picture, image/ems.userdefined.animation, image/ems.predefined.animation, audio/bas, audio/imelody, audio/mid, audio/midi, audio/mp3, audio/mpeg, audio/mpeg3, audio/mpg, audio/x-mp3, audio/x-mpeg, audio/x-mpeg3, audio/x-mpg, audio/x-wav, audio/wav, audio/amr, audio/3gpp,
New
Zea
land
p , p g, p g , pg, , , , gpp,video/mp4, video/3gpp, application/mtf, application/vnd.oma.drm.message, application/vnd.oma.drm.rights+xml, text/x-vcard, text/x-vcalendar, text/uri-list, text/vnd.sun.j2me.app-descriptor, application/java-archive, application/octet-stream, application/vnd.wap.mms-message, text/plain, text/vnd.wap.wmlscript, text/vnd.wap.wml
land
N p , p p , paccept-application: 2,4Accept-Charset: UTF-8User-Agent: MOT-V600i/0E.65.23R MIB/2.2.1 Profile/MIDP-2.0 Configuration/CLDC-1.0Accept-Language: en
ersi
ty o
f Auc
kl
p g gX-Nokia-CONNECTION_MODE: CMODEX-Nokia-BEARER: GPRSX-Nokia-gateway-id: NWG/4.1/Build89Via: WTP/1.1 Vodafone wap2LDV (Nokia WAP Gateway 4.1/CD13/4.1.89), 1.1 vlsp1:9010
The
Uni
ve
p ( y ) p(squid/2.5.STABLE10)X-Forwarded-For: 172.26.71.132
Sample WAP Request V
Accept: text/css, text/x-vcard, text/x-vcalendar, image/gif, image/vnd.wap.wbmpAccept-Charset: ISO-8859-1, US-ASCII, UTF-8; q=0.8, ISO-10646-UCS-2; q=0.6Accept-Language: enCookie2: $Version "1"Cookie2: $Version="1"Accept-Encoding: gzip, deflateUser-Agent: Nokia6822/2.0 (4.48) Profile/MIDP-2.0 Configuration/CLDC-1.1x-wap-profile: "http://nds1.nds.nokia.com/uaprof/N6822r100.xml"
New
Zea
land
p p p pContent-Length: 0X-Nokia-CONNECTION_MODE: TCPX-Nokia-BEARER: GPRSX Nokia gateway id: NWG/4 1/Build89
land
N X-Nokia-gateway-id: NWG/4.1/Build89Via: WTP/1.1 Vodafone wap2FTC (Nokia WAP Gateway 4.1/CD13/4.1.89), 1.1 vlsp1:9010 (squid/2.5.STABLE10)X-Forwarded-For: 172.27.71.132
ersi
ty o
f Auc
klTh
e U
nive
Sample WAP Request VI
User-Agent: SonyEricssonP990i/R100 Mozilla/4.0 (compatible; MSIE 6.0; Symbian OS; 306) Opera 8.60 [en]Accept: text/html, application/xml, application/xhtml+xml, multipart/mixed, image/png, image/jpeg image/gif image/x xbitmap */* text/x vcard text/x vcalendarimage/jpeg, image/gif, image/x-xbitmap, */*, text/x-vcard, text/x-vcalendar, image/vnd.wap.wbmpAccept-Charset: windows-1252, utf-8, utf-16, iso-8859-1;q=0.6, *;q=0.1Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
New
Zea
land
p g , g p, g p, y, ;qPragma: no-cacheX-Wap-Profile: "http://wap.sonyericsson.com/UAProf/P990iR100.xml"Content-Length: 0X Nokia CONNECTION MODE: TCP
land
N X-Nokia-CONNECTION_MODE: TCPX-Nokia-BEARER: GPRSX-Nokia-gateway-id: NWG/4.1/Build89Via: WTP/1.1 Vodafone wap2FTC (Nokia WAP Gateway 4.1/CD13/4.1.89), 1.1 vlsp1:9010
ersi
ty o
f Auc
kl
p ( y ) p(squid/2.5.STABLE10)X-Forwarded-For: 172.27.71.132
The
Uni
ve
Serving WAP Content
File extension MIME Type
wml text/vnd.wap.wmltext/vnd.wap.wml
wmls text/vnd.wap.wmlscript
l li ti / d l
New
Zea
land wmlc application/vnd.wap.wmlc
wmlsc application/vnd.wap.wmlscriptc
land
N
wbmp image/vnd.wap.wbmp
ersi
ty o
f Auc
kl
When the server sees these file extensions, it sets the Content-Typeentity header to the corresponding MIME type
The
Uni
ve entity header to the corresponding MIME type.
The WAP 2.0 Protocol Stack
WAP Device Web Server
WAE WAP Gateway WAE
HTTP HTTP HTTP HTTP
TLS (SSL) TLS (SSL) TLS (SSL) TLS (SSL)
New
Zea
land TCP TCP TCP TCP
IP IP IP IP
land
N
WIRELESS DOMAIN WIRED DOMAIN
ersi
ty o
f Auc
kl
WAP 2.0 provides support for both WAP 2.0 and WAP 1.x stacks. The two stacks would operate independently; i.e., there won’t be any
The
Uni
ve mixing and matching of protocols in accomplishing an end-to-end transaction.
Further Reading
Wireless Application Protocol Architecture SpecificationWireless Application Protocol Architecture Specification. www.WAPForum.org. Wireless Application Environment Defined Media TypeWireless Application Environment Defined Media Type Specification.WAP overview on Wikipedia:
New
Zea
land
phttp://en.wikipedia.org/wiki/WAP
land
Ner
sity
of A
uckl
The
Uni
ve
Resources
Nokia Mobile Internet Toolkit This includes a WAP browser and aNokia Mobile Internet Toolkit. This includes a WAP browser and a WAP Gateway simulator.Sony Ericsson WAP browser emulator for T68.yOpenWave SDK. This includes an OpenWave WAP browser.SlowView. A free image viewer that supports WBMP images.
New
Zea
land
land
Ner
sity
of A
uckl
The
Uni
ve
Exercises
Write a WapEchoServer that echoes the received HTTPWrite a WapEchoServer that echoes the received HTTP request back to the client.
If you have a WAP-capable phone, study the headers it sends.If you have a WAP capable phone, study the headers it sends. Describe the setup required to capture the headers.You want to capture the headers Nokia mobile browser simulator sends to an arbitrary WAP site How can you do it with the
New
Zea
land sends to an arbitrary WAP site. How can you do it with the
WapEchoServer?
land
Ner
sity
of A
uckl
The
Uni
ve