sitan wei zhiyuan lu zhongmin shi yang xiaowei song

74
Sitan Wei Zhiyuan Lu Zhongmin Shi Yang

Upload: veronica-sparks

Post on 13-Dec-2015

228 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

Sitan Wei Zhiyuan LuZhongmin ShiYang YangXiaowei Song

Page 2: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

Agenda

• Introduction to WAP

• WAE and WAP Gateway

• WML Introduction and Implementation

• WMLScript and Dynamic WML Page

• WAP Solution-Success,Challenges, Future

Page 3: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

Part 1: Introduction to WAP

• What is WAP?

• WAP Overview

• WAP protocol layer

Page 4: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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.

Page 5: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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.

Page 6: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

WAP Device Manufacturers

Page 7: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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.

Page 8: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

WAP Wireless Operators

Page 9: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

WAP Software Companies

CCL

SOFTLINE

Page 10: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

WAP Example

• http://www.mobilewap.com/mobile/index.html

Page 11: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

WAP Features

• Low bandwidth

• Long latency

• Small screen size

• Mobile client

Page 12: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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

Page 13: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

WAP Protocol Stack

Page 14: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

• 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

Page 15: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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

Page 16: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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)

Page 17: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

GatewayClientNetwork

Application

WSP/HTTP Request {URL}

WSP/HTTP Reply {Content}

WAE Abstract Network Architecture

Page 18: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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

Page 19: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

Application Example

Page 20: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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

Page 21: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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

Page 22: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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

Page 23: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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

Page 24: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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

Page 25: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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)

Page 26: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

Content Format Example

Image Element

<WML><CARD> Hello World!<BR/> <IMG SRC=“/world.wbmp” ALT=“[Globe]” /></CARD></WML>

Example Use of an Image:

Page 27: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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/

Page 28: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

Part 3: WML Introduction and Implementation

- Make and display WML page

Page 29: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

How to Make WML page

• 1. Write your own code– Write code directly– From a CGI script

• 2. Convert from HTML

• 3. Visual tools

Page 30: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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>

Page 31: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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

Page 32: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

<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

Page 33: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

<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

Page 34: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

<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

Page 35: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

• <img src=“logo.wbmp" alt=“Logo"/>

• WBMP File Generator – JPG, GIF,BMP -> WBMP– http://amazingvb.latinaddress.com

Write your own code Add Image

Page 36: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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

Page 37: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

– 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

Page 38: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

Converting HTML to WML User-based Converter• WapTools: http://www.argogroup.com

Page 39: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

• 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

Page 40: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

Visual Tools Example

Page 41: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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/

Page 42: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song
Page 43: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

Online Test

• online utility for code errors, common mistakes, and valid links

– The Wireless Internet Lab of www.AnywhereYouGo.com

Page 44: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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.

Page 45: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

• 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

Page 46: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

Part 4: WMLScript & Dynamic WML Page

Page 47: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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.

Page 48: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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 

Page 49: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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);

}

Page 50: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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

Page 51: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

WMLScript Interpreter

Page 52: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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()

Page 53: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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()

Page 54: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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

Page 55: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

Dynamic WML Page

• Server Side Tools– CGI

• Perl

• C/C++

– ASP – JSP – Java Servlet

Page 56: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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>"

Page 57: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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

Page 58: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

Part 5: WAP Solutions

• Success• Challenges• Future

Page 59: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

Available Wireless Services

• Voice

• SMS – Short Message Service

• Data (over voice)

• WAP – simplistic and expensive

Page 60: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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

Page 61: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

WAP: Scalable and Comprehensive

• Any mobile phone

• Any existing or planned wireless service

• Any mobile network standard

• Multiple input terminals

Page 62: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

Fast Growing of WAP

• WAP Forum Limited• Over 450 members

device manufacturersnetwork operatorsSMS center suppliersSMS software suppliers

• Other vendors

Page 63: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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

Page 64: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

WAP Achievement: Examples• Web browsing • WAP email• WAP conference• WAP search• Document sharing• Collaborative working• Still images

Page 65: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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

Page 66: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

WAP: Challenges - Commercial

• End-to-end security

• Client identification

• Encryption/Authentication

Page 67: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

WAP Challenges - Network

• Less bandwidth (300 bps to 9600 bps)

• More latency

• Less connection stability

• Less predictive availability

Page 68: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

WAP Challenges - Usability

• Screen size

• Advanced applications

• Data input

• Integration with voice

                                                                                                  

Page 69: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

WAP Challenges - Legal Issues

• Privacy: Location information

• Eavesdropping                                  

Page 70: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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/

Page 71: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

New Era of Wireless

• Next release of WAP

• WSG work area

• WTLS services

• WDP datagram protocol

Page 72: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

Competition for WAP

• Subscriber identity module (SIM) toolkit

• Windows CE

• JavaPhone™

Page 73: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

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

Page 74: Sitan Wei Zhiyuan Lu Zhongmin Shi Yang Xiaowei Song

?WAP or NOT WAP