1. New Zealand
w
Wireless Application P t
Wi l A li ti Protocoll
“The reports of my death are greatly exaggerated.”
The University of Auckland
U A
2. WAP: Internet for Mobile Devices
Wireless Application Protocol but used synonymous to
Protocol,
Internet for mobile devices
What HTML is to the Internet, WML to WAP
What JavaScript™ is to the Internet, WML Script to WAP
What HTTP is to the Internet, WSP to WAP
N Zealand
Wireless Session Protocol: HTTP/1.1 functionality and semantics
in a compact binary encoding + extensions
New
WAP 2.0 allows HTTP across th wireless & I t
2 0 ll the i l t
Internet
domains.
land
ersity of Auckl
The Unive
3. 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>
wml
New Zealand
<card id="MainCard" title="My First WML Card">
<p>
N
<img src="hello.wbmp" alt="Hello"/> <br/>
Hello World! <br/>
land
ersity of Auckl
<a href="click.wml">Click Me here…</a><br/>
</p>
</card>
The Unive
</wml>
4. Challenges
Internet 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
computers.
New Zealand
N land
ersity of Auckl
The Unive
5. Device Comparison
Desktop Laptop Mobile
CPUs Powerful Less powerful
New Zealand
Memory Large Small
Power Mains Battery
N
Display Large Small
Input Keyboard, Mice Keypad, stylus,
land
ersity of Auckl
touch
t h
The Unive
6. Network Comparison
Desktop Laptop Mobile
Bandwidth More Less
New Zealand
Latency Less More
N
Connection Good Not so good
stability
land
Availability
y Good Less predictable
p
ersity of Auckl
The Unive
7. Main Goals of WAP
Support a wide range of devices
Enable device personalization and customization, content
delivery,
delivery and content presentation
presentation.
New Zealand
N land
ersity of Auckl
The Unive
8. Main Goals of WAP
Provide 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 Zealand
N land
ersity of Auckl
The Unive
9. 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>
wml
New Zealand
<card id="MainCard" title="My First WML Card">
<p>
N
<img src="hello.wbmp" alt="Hello"/> <br/>
Hello World! <br/>
land
ersity of Auckl
<a href="click.wml">Click Me here…</a><br/>
</p>
</card>
The Unive
</wml>
10. WML Structure
WML applications use a card and deck metaphor
A user interaction is represented by a card, while a
complete task is represented by a deck
A deck is the smallest unit of WML a web server can send
to a WAP browser, and it contains one or more cards
,
New Zealand
The browser displays one card at a time
N
Card
Card
land
Card
ersity of Auckl
Card
The Unive
11. WML
Unlike HTML WML is XML Why is this important?
HTML, XML.
XHTML is XML Is this important?
XML.
New Zealand
N land
ersity of Auckl
The Unive
12. Simple Web Architecture
HTTP
request
New Zealand
HTTP
response
N
Client/user Origin
agent server
land
ersity of Auckl
The Unive
13. The WAP Architecture
HTTP
WSP
request
request
New Zealand
WSP HTTP
response p
response
N
WAP user WAP Origin
agent gateway* server
land
INTERNET
ersity of Auckl
WIRELESS DOMAIN:
WAP DOMAIN:
Protocols Internet
The Unive
Protocols
* WAP 2.0 does not require the gateway, thus enabling the client to talk directly to the server.
14. The WAP Workflow
1.
1 The user requests a URL through the WAP browser
2. The browser passes the request to the WAP gateway
using the WAP protocol
3. The WAP gateway creates a normal HTTP request for
the URL and passes to the origin server
server.
New Zealand
4. The origin servers returns the (possibly WML) content
of the URL to the WAP gateway.
g y
N
5. The WAP gateway encodes the HTTP headers and the
content (where applicable) into binary format ( g
( pp ) y (e.g.,
land
ersity of Auckl
compiled WML), and transmits on to the WAP browser
6. The WAP browser displays the content (e.g. the first
The Unive
card of the deck)
15. New Zealand
N
WSP/WML Encoding
WSP/WML encoding allows the information to be transferred in a
narrow pipe (i.e. small bandwidth network) without adding extra
land
latency.
y
ersity of Auckl
The Unive
16. 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 Zealand
WDP WDP TCP TCP
Bearers Bearers IP IP
N land
ersity of Auckl
The Unive
WSP is essentially a binary-formatted tokenized version of HTTP
designed to operate on low-bandwidth high-latency networks
17. 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/vnd wap wmlscript text/plain
Accept-Language: en
Accept-Charset: US-ASCII, ISO-8859-1, UTF-8, ISO-10646-UCS-2
p
profile: http://wap.sonyericssonmobile.com/UAprof/T200.xml
p p y p
New Zealand
User-Agent: SonyEricssonT200/R101
bearer-indication: 0
accept-application: 1,2
N
X-Nokia-CONNECTION_MODE:
X Nokia CONNECTION MODE: CMODE
X-Nokia-BEARER: GPRS
X-Nokia-gateway-id: NAWG/3.1/Build52
land
Via: WTP/1.1 Vodafone wap FTC (
p (Nokia WAP Gateway 3.1/ECD9/3.1.52), 1.1 vlsp1:9010
y ) p
ersity of Auckl
(squid/2.5.STABLE3)
X-Forwarded-For: 172.27.9.3
The Unive
18. 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,
p , p , p p, p , p ,
New Zealand
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/plain
User-Agent: Alcatel-BG3/1.0 UP.Browser/5.0.3.3.11
Accept-Language: en
p g g
N
Accept-Charset: UTF-8
profile: http://www-ccpp-mpd.alcatel.com/files/ALCATEL-BG3_1.0.rdf
X-Nokia-CONNECTION_MODE: CMODE
land
X-Nokia-BEARER: GPRS
ersity of Auckl
X-Nokia-gateway-id: NAWG/3.1/Build52
Via: 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 Unive
19. Sample WAP Request III
Accept-Language: en
Accept: 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.wbmp
vcalendar image/vnd wap wbmp
Accept-Charset: utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS
User-Agent: SonyEricssonV600i/R2K Browser/SEMC-Browser/4.2 Profile/MIDP-2.0
Configuration/CLDC-1.1
g
New Zealand
x-wap-profile: "http://wap.sonyericsson.com/UAprof/V600iR101-3G.xml"
Content-Length: 0
X-Nokia-CONNECTION_MODE: TCP
N
X-Nokia-BEARER:
X Nokia BEARER: GPRS
X-Nokia-gateway-id: NWG/4.1/Build89
Via: WTP/1.1 Vodafone wap2FTC (Nokia WAP Gateway 4.1/CD13/4.1.89), 1.1 vlsp1:9010
land
( q
(squid/2.5.STABLE10) )
ersity of Auckl
X-Forwarded-For: 172.27.71.132
The Unive
20. 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 , pp
mmstemplate, 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,
p , p g, p g , pg, , , , gpp,
New Zealand
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
p , p p, p
N
accept-application: 2,4
Accept-Charset: UTF-8
User-Agent: MOT-V600i/0E.65.23R MIB/2.2.1 Profile/MIDP-2.0 Configuration/CLDC-1.0
land
Accept-Language: en
p g g
ersity of Auckl
X-Nokia-CONNECTION_MODE: CMODE
X-Nokia-BEARER: GPRS
X-Nokia-gateway-id: NWG/4.1/Build89
Via: WTP/1.1 Vodafone wap2LDV (
p (Nokia WAP Gateway 4.1/CD13/4.1.89), 1.1 vlsp1:9010
y ) p
The Unive
(squid/2.5.STABLE10)
X-Forwarded-For: 172.26.71.132
21. Sample WAP Request V
Accept: text/css, text/x-vcard, text/x-vcalendar, image/gif, image/vnd.wap.wbmp
Accept-Charset: ISO-8859-1, US-ASCII, UTF-8; q=0.8, ISO-10646-UCS-2; q=0.6
Accept-Language: en
Cookie2: $Version "1"
$Version="1"
Accept-Encoding: gzip, deflate
User-Agent: Nokia6822/2.0 (4.48) Profile/MIDP-2.0 Configuration/CLDC-1.1
x-wap-profile: "http://nds1.nds.nokia.com/uaprof/N6822r100.xml"
pp p p
New Zealand
Content-Length: 0
X-Nokia-CONNECTION_MODE: TCP
X-Nokia-BEARER: GPRS
N
X-Nokia-gateway-id: NWG/4 1/Build89
X Nokia gateway id: NWG/4.1/Build89
Via: WTP/1.1 Vodafone wap2FTC (Nokia WAP Gateway 4.1/CD13/4.1.89), 1.1 vlsp1:9010
(squid/2.5.STABLE10)
land
X-Forwarded-For: 172.27.71.132
ersity of Auckl
The Unive
22. 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-vcalendar,
image/jpeg image/gif image/x xbitmap */*, text/x-vcard, text/x vcalendar
image/vnd.wap.wbmp
Accept-Charset: windows-1252, utf-8, utf-16, iso-8859-1;q=0.6, *;q=0.1
Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
p g , g p, g p, y, ;q
New Zealand
Pragma: no-cache
X-Wap-Profile: "http://wap.sonyericsson.com/UAProf/P990iR100.xml"
Content-Length: 0
N
X-Nokia-CONNECTION_MODE:
X Nokia CONNECTION MODE: TCP
X-Nokia-BEARER: GPRS
X-Nokia-gateway-id: NWG/4.1/Build89
land
Via: WTP/1.1 Vodafone wap2FTC (
p (Nokia WAP Gateway 4.1/CD13/4.1.89), 1.1 vlsp1:9010
y ) p
ersity of Auckl
(squid/2.5.STABLE10)
X-Forwarded-For: 172.27.71.132
The Unive
23. Serving WAP Content
File extension MIME Type
wml text/vnd.wap.wml
wmls text/vnd.wap.wmlscript
wmlc
l application/vnd.wap.wmlc
li ti / d l
New Zealand
wmlsc application/vnd.wap.wmlscriptc
N
wbmp image/vnd.wap.wbmp
land
ersity of Auckl
When the server sees these file extensions, it sets the Content-Type
entity header to the corresponding MIME type
type.
The Unive
24. 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)
TCP TCP TCP TCP
New Zealand
IP IP IP IP
N
WIRELESS DOMAIN WIRED DOMAIN
land
ersity of Auckl
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 Unive
mixing and matching of protocols in accomplishing an end-to-end
transaction.
25. Further Reading
Wireless Application Protocol Architecture Specification
Specification.
www.WAPForum.org.
Wireless Application Environment Defined Media Type
Specification.
WAP overview on Wikipedia:
p
New Zealand
http://en.wikipedia.org/wiki/WAP
N land
ersity of Auckl
The Unive
26. Resources
Nokia Mobile Internet Toolkit. This includes a WAP browser and a
Toolkit
WAP Gateway simulator.
Sony Ericsson WAP browser emulator for T68.
y
OpenWave SDK. This includes an OpenWave WAP browser.
SlowView. A free image viewer that supports WBMP images.
New Zealand
N land
ersity of Auckl
The Unive
27. Exercises
Write a WapEchoServer that echoes the received HTTP
request back to the client.
If you have a WAP-capable phone, study the headers it sends.
WAP capable
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
site.
New Zealand
WapEchoServer?
N land
ersity of Auckl
The Unive