Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song.
-
Upload
veronica-sparks -
Category
Documents
-
view
223 -
download
3
Transcript of Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song.
Sitan Wei Zhiyuan LuZhongmin ShiYang YangXiaowei Song
Agenda
• Introduction to WAP
• WAE and WAP Gateway
• WML Introduction and Implementation
• WMLScript and Dynamic WML Page
• WAP Solution-Success,Challenges, Future
Part 1: Introduction to WAP
• What is WAP?
• WAP Overview
• WAP protocol layer
What is WAP?
• The Wireless Application Protocol(WAP) is an open, global specification that empowers mobile users with wireless devices to easily access and interact with information and services instantly.
• Composed by a set of communication protocol.
WAP Overview
• What type of devices will use WAP? Handheld digital wireless devices such as mobile
phones, pagers, two-way radios, smartphones and communicators -- from low-end to high-end.
WAP Device Manufacturers
Which Wireless Networks Does WAP Work With?
WAP is designed to work with most wireless networks such as CDPD, CDMA, GSM, PDC, PHS, TDMA, FLEX, ReFLEX, iDEN, TETRA, DECT, DataTAC, Mobitex.
WAP Wireless Operators
WAP Software Companies
CCL
SOFTLINE
WAP Example
• http://www.mobilewap.com/mobile/index.html
WAP Features
• Low bandwidth
• Long latency
• Small screen size
• Mobile client
Why WAP?
• WAP enables any data transport
--TCP/IP,UDP/IP,GUTS,SMS or USSD
• WAP utilizes standard Internet markup language technology (XML)
• The WML UI components map well onto existing mobile phone user interface
• WAP utilizes plain Web HTTP1.1 servers
WAP Protocol Stack
• WAE:main interfaces to the client devices and specify a markup language, a scripting language, and a telephony interface.
• WSP:provide connection-based services to the application layer
• WTLS:optional layer which consists of description devices
• WTP WDP and Bearer Service:They provide reliable transmission of WSP data packets between the client and server over a wireless link.
WAP Layers
Part 2: WAP Application EnvironmentPart 2: WAP Application Environment and WAP Gatewayand WAP Gateway
• Overview
• Architecture
• WAP Gateway
• WML and WMLScript
• Content Formats
• Current Development
WAE Overview• For network applications • On small, narrowband devices
• High degree of interoperability
• WAE defines basics: – For WAP user agents
– For WAP gateways.
• WAE contains:– WML and WMLScript specifications
– Wireless Telephony Application Interface (WTAI)
GatewayClientNetwork
Application
WSP/HTTP Request {URL}
WSP/HTTP Reply {Content}
WAE Abstract Network Architecture
Web Server
Content
CGIScripts
etc.
WM
L D
ecks
wit
h W
ML
-Scr
ipt
WAP Gateway
Encoder,Decoder
WMLScriptCompiler
Protocol Adapters
Client
WML
WML-Script
WTAI
Etc.
Static file or CGI Output WML
Static file or CGI Output WML
WAP HTTP
1Request
Encrypted URL Request
2
HTTP Request xxx wml
34
HTTP Response xxx wml
5
Response Encrypted WML
Content
6
7
How It Works
Application Example
Why Do I Need a WAP Gateway?
• Unable connect directly from current WAP devices to web servers.
• Speak a different language between WAP Devices and the Web Servers
• An extra server to handle translation– WAP Gateway, or WAP Proxy
WAP Gateway• Provides a link between a mobile network and Internet
• Converts the 'WAP' request into a 'Web' request
• Converts the 'Web' response into a 'WAP' response
WAP Gateway (cont’d)
• A particular piece of software located on a server • Handles incoming requests from your WAP phone. • Compiling the WML pages into bytecode (WMLC) • Reduce the size and number of packets• Provide hosting capabilities themselves
– For dynamic Web applications– determine more about your target client's request
• Provide transaction security
WML
• Tag-based browsing language:– Screen management (text, images)– Data input (text, selection lists, etc.)– Hyperlinks & navigation support
• W3C XML-based language
• Inherits technology from HDML and HTML
WMLScript
• Scripting language:– Procedural logic, loops, conditionals, etc.– Optimized for small-memory, small-cpu
devices
• Derived from JavaScript™• Integrated with WML
– Powerful extension mechanism– Reduces overall network traffic
Content Formats
• Common interchange formats
• Promoting interoperability
• Formats:– Business cards: IMC vCard standard– Calendar: IMC vCalendar standard– Images: WBMP (Wireless BitMaP)– Compiled WML, WMLScript (Wmlc, Wmlcs)
Content Format Example
Image Element
<WML><CARD> Hello World!<BR/> <IMG SRC=“/world.wbmp” ALT=“[Globe]” /></CARD></WML>
Example Use of an Image:
Current Development• Push Model
– Alerts or service indications– Pre-caching of datahttp://www-106.ibm.com/developerworks/eeng/library/prowap.htm
• User Agent Profiles (UAProf)– Goal: content personalization– Working with W3C on CC/PP– Efficient transport over wireless links, cachinghttp://www.w3.org/TR/NOTE-CCPP/
Part 3: WML Introduction and Implementation
- Make and display WML page
How to Make WML page
• 1. Write your own code– Write code directly– From a CGI script
• 2. Convert from HTML
• 3. Visual tools
Header
Deck
Card2
Card1Navigation
Variable
SelectElements
Write your own code WML Example
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <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>
Write your own code WML Elements
• Deck/Card Elements wml card template head access meta
•Event Elements Do ontimer onpick onevent postfield onenterforward
onenterbackward
•Tasks Go prev efresh noop
•Variables Setvar
•User input Input select option optgroup fieldset
•Anchors, Images, and Timers a anchor img timer
•Text Formatting br p table tr td
<WML> <CARD> <DO TYPE="ACCEPT" LABEL="Next"> <GO URL="#card2"/> </DO> Dalhousie<BR/>Directory </CARD>
<CARD NAME="card2"> <DO TYPE="ACCEPT"> <GO URL="?send=$type"/> </DO> Services <SELECT KEY="type"> <OPTION VALUE="em">1.Email</OPTION> <OPTION VALUE="ph">2.Phone</OPTION> <OPTION VALUE="fx">3.Fax</OPTION> </SELECT> </CARD></WML>
Write your own code Defining the Navigation Path
DalhousieDirectory_____________Next
Services1. Email2. Phone3. Fax .OK
<CARD> <DO TYPE="ACCEPT" LABEL=“Find"> <GO URL="getcity.cgi?location=$city"/> </DO> Forecast <SELECT KEY="city"> <OPTION VALUE="ber">Berlin</OPTION> <OPTION VALUE="rom">Rome</OPTION> <OPTION TITLE="Find" ONCLICK="find.cgi">New City</OPTION> </SELECT></CARD>
Forecast1 Berlin2 Rome3 New City____________Find
Write your own code The SELECT Element
• Display a list of options– Each option may set the KEY variable
and/or bind a task to the ACCEPT key– TITLE= dynamically sets the label string
<WML> <TEMPLATE> <DO TYPE="OPTIONS" LABEL="Main"> <GO URL="main_menu.wml"/> </DO> </TEMPLATE> <CARD NAME="msg1"> <DO TYPE="ACCEPT" LABEL="Next"> <GO URL="#msg2"/> </DO> First story </CARD> <CARD NAME="msg2"> Second story </CARD></WML>
Write your own code The TEMPLATE Element
• Defines actions & events for all cards in a deck
First story…
_____________Next Main
Second story...
_____________OK Main
• <img src=“logo.wbmp" alt=“Logo"/>
• WBMP File Generator – JPG, GIF,BMP -> WBMP– http://amazingvb.latinaddress.com
Write your own code Add Image
Converting HTML to WML
• How– translates non-complex HTML documents in to
WML – tag-by-tag processing and discard all incompatible
tags and contents
• Significance– Dramatically accelerates wireless content
development by using abundant HTML resources
– Zygo: http://wap.z-y-g-o.com• embedded in the Apache web server via the mod_perl
mechanism.• For internal use. • Download: http://wap.z-y-g-o.com/tools/zygo-html2wml.zip• installing the .pm file in the $APACHEROOT/Zygo/
directory and modify Apache httpd.conf file. • The best option of web sites• Enable server error messages to be displayed in handset• Enable Billions of HTML pages, the major resource of
Internet, to be shared by wireless device.
Converting HTML to WML Server Based Converter
Converting HTML to WML User-based Converter• WapTools: http://www.argogroup.com
• to develop wireless applications using only point-and-click and drag-and-drop approach– DotWAP 1.0
• http://www.inetis.com/english/solutions_dotwap.htm
– XYBO v1.4 • http://www.xybo.com/
– MobileDev 2.0 • http://mobiledev.speedware.com/
Visual Tools
Visual Tools Example
How to Display WML Pages
• PDA or Cell phone
• Emulator• SmartPhone Emulator Developer Edition 1.2
– http://www.yospace.com
• WinWAP v3.0 PRO– http://www.slobtrot.com/winwap/
• M3Gate– http://www.m3gate.com/
Online Test
• online utility for code errors, common mistakes, and valid links
– The Wireless Internet Lab of www.AnywhereYouGo.com
Embedded Browser
• YoSpace JavaBean Edition 1.0 & Handset
Manufacturer Support Put WAP emulation capability into your application software using the SmartPhone as a JavaBean
• 5NINE –an open source development project for creating a WML Browser to work with all types of Linux environments.–make wireless device an attractive alternative for hard-ware manufacturers.
• develop and debug WAP programs with standard Java development tools
– Waba SDK and VM• http://www.wabasoft.com
– UP.SDK 4.2• http://developer.openwave.com
Standard Java Classes for WAP
Part 4: WMLScript & Dynamic WML Page
What Is WMLScript
• WMLScript is the client-side scripting language used for WML pages
• WMLScript is based on ECMAScript, like JavaScript
• WML scripts are not embedded in the WML pages, they are sent separately.
What Is WMLScript Used for ?
• WMLScript is used to calculate or validate user input
• WMLScript is used to generate message boxes and dialog boxes locally
• WMLScript is used to access facilities of the user agent
WMLScript Example
WML source file (check.wml)
<?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="no1" title="Go to URL"> <do type="options" label="Go"> <go href="check.wmls#go_url(‘$
(url)')"/> </do> <p> Enter a URL: <input
type="text" name="url"/> </p> </card> </wml>
WMLScript source file (check.wmls)
extern function go_url (url) {
if (String.find(url,"http://") < 0) { url="http://"+url;
} WMLBrowser.go(the_url);
}
WMLScript File
• WMLScript source files (*.wmls)• For WML browser or WML simulator
• WMLScript compiled files (*.wmlsc)• For WAP device
– Stored on server
– Compiled by WAP gateway automatically
WMLScript Interpreter
Standard Libraries
• Lang Library (WMLScript language core)• E.g. min(), max(), exit(), abort(), random(), seed()
• Float Library (arithmetic floating-point functions)• E.g. pow(), round(), sqrt()
• String Library (string functions)• E.g. length(), trim(), charAt(), subString(), find(),
replace()
Standard Libraries (cont.)
• URL Library (handling both absolute and relative URL)
• E.g. isValid(), getHost(), getPort(), getParameters(), getQuery()
• Browser Library (access the associated WML context)
• E.g. getVar(), setVar(), go(), prev(), refresh()
• Dialogs Library (user interface functions)• E.g. prompt(), confirm(), and alert()
WMLScript vs. JavaScript
WMLScript
– Used for WML
– No objects & array
– Support library
– Separate file (*.wmls)
– Support compiled file
JavaScript
– Used for HTML
– Support objects & array
– No library
– Embedded in HTML file
– No compiled file
Dynamic WML Page
• Server Side Tools– CGI
• Perl
• C/C++
– ASP – JSP – Java Servlet
Perl Example
#!/usr/bin/perl print "Content-Type: text/vnd.wap.wml\n";print "\n"; print "<?xml version=\"1.0\"?>\n" print "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML
1.1//EN\" \n" print "\"http://www.wapforum.org/DTD/wml_1.1.xml\">\n" print "<wml>\n<card id=\"index\" title=\"index\">\n" print "<p>Hello everyone</p>\n" print "</card>\n</wml>"
Web Server Configuration
Apache Serverhttpd.conf
#WML MIME TypeAddType text/vnd.wap.wml .wml
AddType application/vnd.wap.wmlc .wmlc
AddType text/vnd.wap.wmlscript .wmls
AddType application/vnd.wap.wmlscriptc .wmlsc
AddType image/vnd.wap.wbmp .wbmp
Part 5: WAP Solutions
• Success• Challenges• Future
Available Wireless Services
• Voice
• SMS – Short Message Service
• Data (over voice)
• WAP – simplistic and expensive
Attractions of WAP
• WAP combines two of the fastest growing industries: wireless and the Internet IP
• WAP is an attempt to define the standard for how content from the Internet is filtered for mobile communications
• WAP is developed to make readily available content from the Internet easily available to mobile terminals
WAP: Scalable and Comprehensive
• Any mobile phone
• Any existing or planned wireless service
• Any mobile network standard
• Multiple input terminals
Fast Growing of WAP
• WAP Forum Limited• Over 450 members
device manufacturersnetwork operatorsSMS center suppliersSMS software suppliers
• Other vendors
WAP: Major Achievements
• Reduces resources and enriches the functionality of the network
• Generates additional traffic on the network and revenue
• Facilitates migration of applications between networks and bearers
WAP Achievement: Examples• Web browsing • WAP email• WAP conference• WAP search• Document sharing• Collaborative working• Still images
WAP Promises: Examples• Moving images
• Home automation
• Job dispatch
• Remote point of sale
• Customer service
• Remote monitoring (Meters)
• Vehicle positioning
• Remote LAN access
• File transfer
WAP: Challenges - Commercial
• End-to-end security
• Client identification
• Encryption/Authentication
WAP Challenges - Network
• Less bandwidth (300 bps to 9600 bps)
• More latency
• Less connection stability
• Less predictive availability
WAP Challenges - Usability
• Screen size
• Advanced applications
• Data input
• Integration with voice
WAP Challenges - Legal Issues
• Privacy: Location information
• Eavesdropping
WAP: Detractors and Controversies • Difficult to configure for new services• Unlikely in a long time-few mobile phones support• WAP standard is incomplete• WAP gateway vendors competing against each other• Other protocols already widely supported or designed to supercede WAP• WAP services be expensive
• Example of doubt on WAP’s future
http://www.infoworld.com/
New Era of Wireless
• Next release of WAP
• WSG work area
• WTLS services
• WDP datagram protocol
Competition for WAP
• Subscriber identity module (SIM) toolkit
• Windows CE
• JavaPhone™
Reference
• http://www.sce.carleton.ca/wmc/chameleon/wapdoc/wapintro.html
• http://www.iec.org/tutorials/wap/topic04.html
• http://www.anywhereyougo.com/wap/Article.po?type=WAP_Tutorial&page=7402
• http://www.tenetindia.com/Wap/whatswap/Faq/Faq.asp
• http://www.tenetindia.com/Wap/Resources/Software/Software.asp?choice=Resources
• http://www.123wapinfo.com/softwares/
• http://allnetdevices.com/faq/?faqredir=yes
• http://www.palowireless.com/wap/
• http://www-106.ibm.com/developerworks/eeng/library/eeng_wapexpo.htm
• http://www9.org/w9cdrom/228/228.html
?WAP or NOT WAP