Wireless Application Protocol WAP
- F. Ricci
Wireless Application Protocol WAP F. Ricci 2009/2010 Content Web - - PowerPoint PPT Presentation
Wireless Application Protocol WAP F. Ricci 2009/2010 Content Web and mobility Problems of HTML in the mobile context Wap 1.x Motivations Features Architecture Examples of WML (Wireless Markup Language) pages Wap
Web and mobility Problems of HTML in the mobile context Wap 1.x Motivations Features Architecture Examples of WML (Wireless Markup Language)
Wap 2.0 XHTML MP Examples Differences with Wap 1.x
Protocol (HTTP, Hypertext Transfer Protocol) and language
Typical transfer sizes HTTP request: 100-350 byte responses avg. <10 kbyte, header 160 byte, GIF
but also many large files that cannot be ignored The Web is not a file system Web pages are not simple files to download static and dynamic content, interaction with servers via
many hyperlinks, automatic loading and reloading,
a single click might have big consequences!
HTML designed for computers with “high” performance, color
typically, web pages optimized for design, not for
Mobile devices
Additional “features” animated GIF, Java AWT, Frames, ActiveX Controls,
many web pages assume true color, multimedia support,
Web pages ignore the heterogeneity of end-systems! e.g., without additional mechanisms, large high-
Characteristics stateless, client/server, request/response needs a connection oriented protocol (TCP), one
primitive caching and security Problems designed for large bandwidth (compared to wireless
big and redundant protocol headers (readable for
uncompressed content transfer using TCP
huge overhead per request (3-way-handshake)
slow-start problematic
DNS lookup by client causes additional traffic.
Aligned with the Web Programming Model, uses the Pull
Add telephony support with WTA (Wireless Telephony
In WAP1.* (1998-2000) a WAP proxy (in the
deliver Internet content and enhanced services to mobile
devices and users (mobile phones, PDAs)
independence from wireless network standards
be proposed to standardization bodies
applications should scale well beyond current transport
media and device types and should also be applicable to future developments
e.g., GSM (900, 1800, 1900), CDMA IS-95, TDMA IS-136, 3rd
generation systems (IMT-2000, UMTS, W-CDMA, cdma2000 1x EV-DO, …)
was: WAP Forum, co-founded by Ericsson, Motorola, Nokia,
Unwired Planet, further information www.wapforum.org
now: Open Mobile Alliance www.openmobilealliance.org
(Open Mobile Architecture + WAP Forum + SyncML + …)
Browser “micro browser”, similar to existing, well-known
Script language similar to Java script, adapted to the mobile
WTA/WTAI Wireless Telephony Application (Interface): access to all
Content formats e.g., business cards (vCard), calendar events
Protocol layers transport layer, security layer, session layer etc.
This service allows content to be sent or "pushed" to
WAP Push messages are specially formatted SMS
Push functionality is especially relevant to real-time
Without push, these applications would require the devices
In wireless environments such polling activities would
Bearers (GSM, CDPD, ...) Security Layer (WTLS) Session Layer (WSP) Application Layer (WAE) Transport Layer (WDP) TCP/IP, UDP/IP, media SSL/TLS HTML, Java HTTP Internet WAP WAE comprises WML (Wireless Markup Language), WML Script, WTAI etc. Transaction Layer (WTP) additional services and applications WCMP A-SAP S-SAP TR-SAP SEC-SAP T-SAP
wireless network fixed network WAP proxy WTA server filter/ WAP proxy web server filter PSTN Internet Binary WML: binary file format for clients Binary WML Binary WML Binary WML HTML HTML HTML WML WML HTML
network independent application environment for low-
bandwidth, wireless devices
integrated Internet/WWW programming model with high
interoperability
device and network independent, international support manufacturers can determine look-and-feel, user interface considerations of slow links, limited memory, low computing
power, small display, simple user interface (compared to desktop computers)
architecture: application model, browser, gateway, server 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)
content formats: vCard, vCalendar, Wireless Bitmap, WML, ...
WML follows deck and card metaphor WML document consists of many cards, cards are
a deck is similar to an HTML page, unit of content
WML describes only intent of interaction in an
presentation depends on device capabilities Features text and images user interaction navigation context management
http://www.developershome.com/examples/wap /wml/helloWorldEg1.wml
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd"> <wml> <card id="card1" title="Font Style"> <p> <b>Bold</b><br/> <i>Italic</i><br/> <u>Underline</u><br/> <small>Small</small><br/> <big>Big</big><br/> <em>Emphasis</em><br/> <strong>Strong</strong> </p> </card> </wml>
http://www.developershome.com/examples/wap/wml/fontStyleEg1.wml
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd"> <wml> <card id="page1" title="Table in WML"> <p> <table columns="3"> <tr> <td>Cell A</td> <td>Cell B</td> <td>Cell C</td> </tr> <tr> <td>Cell D</td> <td>Cell E</td> <td>Cell F</td> </tr> </table> </p> </card> </wml> http://www.developershome.com/examples/wap/wml/tablesEg1.wml
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd"> <wml> <card id="tutorial_tc" title="WML Tutorial"> <p> Hello, welcome to our WML tutorial.<br/><br/> Table of Contents:<br/> <anchor> <go href="linksEg2.wml#tutorial_ch1"/> Chapter 1: WML Introduction </anchor><br/> <anchor> <go href="linksEg2.wml#tutorial_ch2"/> Chapter 2: WML Deck and Card </anchor><br/> <anchor> <go href="linksEg2.wml#tutorial_ch3"/> Chapter 3: WML Document Structure </anchor><br/> <anchor> <go href="linksEg2.wml#tutorial_ch4"/> Chapter 4: WML Generic Metadata </anchor><br/> </p> </card> </wml>
http://www.developershome.com/examples/wap/wml/linksEg1.wml
wml page/deck wml card
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd"> <wml> <card id="tutorial_ch1" title="WML Tutorial Ch1"> <p> <em>Chapter 1: WML Introduction</em><br/><br/> ...<br/><br/> <anchor> <go href="#tutorial_ch2"/> Next chapter: WML Deck and Card </anchor> </p> </card> … <card id="tutorial_ch4" title="WML Tutorial Ch4"> <p> <em>Chapter 4: WML Generic Metadata</em><br/><br/> ...<br/><br/> <anchor> <go href="#tutorial_ch1"/> Back to chapter 1: WML Introduction </anchor> </p> </card> </wml>
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd"> <wml> <card id="card1" title="WML Input Fields"> <p> Hello, welcome to our WML tutorial.<br/> What's your name? <input name="myname" maxlength="16"/> </p> </card> </wml>
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd"> <wml> <card id="card1" title="WML Variable"> <onevent type="onenterforward"> <refresh> <setvar name="var1" value="variable 1"/> </refresh> </onevent> <p> What's your name? <input name="name" maxlength="16"/><br/> Which part of our WML tutorial do you like? <select name="tutorial_part"> <option value="Part 1">Part 1</option> <option value="Part 2">Part 2</option> <option value="Part 3">Part 3</option> </select><br/><br/> <a href="#card2">Next Card</a> </p> </card> <card id="card2" title="WML Variable"> <p> Your name is $(name).<br/><br/> You like $(tutorial_part) of our WML tutorial.<br/><br/> The value of var1 is <i>$(var1)</i>. </p> </card> </wml>
Variable declaration and initialization Variable assignment Variable declaration
Complement to WML Provides general scripting capabilities Features validity check of user input
check input before sent to server
access to device facilities
hardware and software (phone call, address
local user interaction
interaction without round-trip delay
extensions to the device software
configure device, download new
function pizza_test(pizza_type) { var taste = "unknown"; if (pizza_type = "Margherita") { taste = "well... "; } else { if (pizza_type = "Vulcano") { taste = "quite hot"; }; }; return taste; };
Collection of telephony specific extensions Extension of basic WAE application model content push
server can push content to the client
handling of network events
client side there is a table indicating how to react on
access to telephony functions
any application on the client may access telephony
Example calling a number (WML)
calling a number (WMLScript)
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card id="card_one" title="Tele voting"> <do type="accept"> <go href="#card_two"/> </do> <p> Please choose your candidate! </p> </card> <card id="card_two" title="Your selection"> <do type="accept"> <go href="wtai://wp/mc;$dialno"/> </do> <p> Your selection: <select name="dialno"> <option value="01376685">Mickey</option> <option value="01376686">Donald</option> <option value="01376687">Pluto</option> </select> </p> </card> </wml>
associate to the "accept" button the action to go to href="#card_two" associate to the "accept" button the action to dial dialno The mapping between a <do> element and a user interface element depends on the actual wireless device. Often associated to softkeys or items in the options menu that is brought up by pressing a softkey.
XHTML MP (XHTML Mobile Profile) is the markup language
In addition to the WAP stack, adds a stack based on
New applications Color graphics Animation Large file download Location based services Synchronization with PIMs Pop-up/context sensitive menus Goal: integration of WWW, Internet, WAP, i-mode
<?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml- mobile10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>XHTML MP Tutorial</title> </head> <body> <p>Hello world. Welcome to our XHTML MP tutorial.</p> </body> </html>
http://www.developershome.com/examples/wap/xhtmlmp/helloWorldEg1.xhtml
If you are familiar with web technologies such as HTML,
The same development tools can be used to develop
Ordinary web browsers can be used to view your WAP
HTML / XHTML pages on your web site can be converted
XHTML MP supports WAP CSS, which enables the
With XHTML MP and WAP CSS, you have more control over
User Agent Profile (UAProf) – This service provides a
Based on the Composite Capabilities / Preference Profiles
This information permits the servers to adapt their
Recognizing the importance of user's privacy, personal
Data Synchronization – The SyncML messages are
UAProf (User agent profile) is an XML document that
User agent profiles are stored in a server called the profile
The URL that points to the user agent
Example, the UAProf of Nokia
http://nds.nokia.com/uaprof/NN95_8GB-1r100.xml
http://www.developershome.com/