wap & wml

49
Application Layer By, C.Janani AP / IT, SSMCE

Upload: janani-satheshkumar

Post on 15-Apr-2017

75 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Wap & WML

Application Layer

By, C.Janani AP / IT,

SSMCE

Page 2: Wap & WML

Topics• WAP Model• Mobile Location Based Services• WAP Gateway• WAP Protocol• WAP User Agent Profile• Caching Model• Wireless bearers of WAP• WML• WML scripts• WTA• iMode• SyncML

Page 3: Wap & WML

1. WAP Model• An international standard establishing how

mobile devices can access information on the Internet.

• Providing Internet communications and advanced telephony services on digital mobile phones, pagers, personal digital assistants, and other wireless terminals - WAP Forum

Page 4: Wap & WML

Definition• Wireless: Lacking or not requiring a wire or wires pertaining to radio

transmission.• Application: A computer program or piece of computer software that is

designed to do a specific task.• Protocol: A set of technical rules about how information should be

transmitted and received using computers.

June 26, 1997, Ericsson, Motorola, Nokia, and Unwired Planet took the initiative to start a rapid creation of a standard for making advanced services within the wireless domain a reality.

In December 1997, WAP Forum was formally created and after the release of the WAP 1.0 specifications in April 1998, WAP Forum membership was opened to all.

Page 5: Wap & WML

Need for WAP• Open and secure and well suited for many

different applications including, but not limited to stock market information, weather forecasts, enterprise data, and games.

Page 6: Wap & WML

Benefits• Device Independent• N/W Independent• WML• Optimizing the content and air link protocols• No reduction of the end users

Page 7: Wap & WML

Architecture• Internet Model

Page 8: Wap & WML

WAP Model

Page 9: Wap & WML

Working of WAP Model• The user selects an option on their mobile device that has a URL with Wireless

Markup language (WML) content assigned to it.• The phone sends the URL request via the phone network to a WAP gateway using

the binary encoded WAP protocol.• The gateway translates this WAP request into a conventional HTTP request for

the specified URL and sends it on to the Internet.• The appropriate Web server picks up the HTTP request.• The server processes the request just as it would any other request. If the URL

refers to a static WML file, the server delivers it. If a CGI script is requested, it is processed and the content returned as usual.

• The Web server adds the HTTP header to the WML content and returns it to the gateway.

• The WAP gateway compiles the WML into binary form.• The gateway then sends the WML response back to the phone.• The phone receives the WML via the WAP protocol.• The micro-browser processes the WML and displays the content on the screen.

Page 10: Wap & WML

WAP protocol

Page 11: Wap & WML

• Application LayerWireless Application Environment (WAE).

• Session LayerWireless Session Protocol (WSP).

• Transaction LayerWireless Transaction Protocol (WTP).

• Security LayerWireless Transport Layer Security (WTLS).

• Transport LayerWireless Datagram Protocol (WDP).

Page 12: Wap & WML

WAE• WML- XML compliant mark-up language • WMLScript - ECMAScript based scripting language • WAP Push mechanism • User Agent profiles • WTA - WAP telephony services

Page 13: Wap & WML

WSP• Provides shared state between client and server used

to optimize content transfer • Provides semantics and mechanisms based on HTTP

1.1 • Supports compact encoding of headers • Supports push functionality • Supports capability negotiation

Page 14: Wap & WML

WTP• Provides efficient, reliable data transfer based on

request/reply paradigm • Supports selective-retransmission • Supports segmentation and re-assembly • Message oriented (not stream) • Supports an Abort function • Supports concatenation of PDUs

Page 15: Wap & WML

WAP Security• Transport level security is WTLS, based on TLS.

Provides privacy, integrity, authentication • End-to-end security mechanism defined at the

transport layer • Application layer security provided via WMLScript

crypto library

Page 16: Wap & WML

WDP• Provides a network and bearer independent interface

to higher layers • Provides port level addressing • Provides segmentation and reassembly • For link layers that support IP, UDP is used as the

Wireless Datagram Protocol layer

Page 17: Wap & WML

WAP and Smart Cards• WAP supports use of Smart Cards to enhance security • Wireless Identity Module specification supports

performing security functions & storage of sensitive data

• Smart Card Provisioning specification defines a file structure for secure storage of provisioning data

Page 18: Wap & WML

WAP’s current status• WAP Forum has 200+ members including – 90% of world’s handset manufacturers – Carriers with over 100 million subscribers – Leading infrastructure providers, software developers &

content providers • WAP v1.2 specification suite approved Dec 99 • Commercial services now widely deployed

Page 19: Wap & WML

Changing marketplace• High speed 2.5G technologies - GPRS, EDGE • 3G technologies being developed with data rates of

up to 2Mbps • Multimedia capable devices being developed • Demand for richer content - high quality graphics,

audio, video

Page 20: Wap & WML

WAP next generation• WAP Architecture Convergence group working to

ensure WAP’s architecture converges with the IETF and other protocols

• WPG reviewing the output from the IETF PILC group with a goal of incorporating TCP into the WAP stack

• WAP continually evolving to ensure compatibility with emerging technologies

Page 21: Wap & WML

Mobile Location Based Services

Location Based Information Systems

• Systems that integrate advances in mobile phones, software development platforms, databases, positioning technology, Geographic Information Systems (GIS), and communications

• All combined make possible the creation of Location-Based Information Systems (LBIS) and Location-Based Services (LBS)– Promise to change the way we live• 3.25 billion mobile phone users in 2007– Half the world’s population• LBS subscribers using GPS-enabled cell phones expected to grow from

12 M in 2006 to 315 M in 2011– 20 M from 500 K in North America

Page 22: Wap & WML

LBIS Challenges• Many players and technologies involved, and many issues unsolved

– Databases, GIS systems, positioning, applications• Erroneous and variable information

– Accuracy of GPS fixes depend on positioning system, user location, weather conditions, interferences, etc.

• Cellular communication networks– Wireless transmission problems, such as fading, interferences,

disconnections, low bandwidth, etc.• Cell phones

– Very resource-constrained device in terms of processing power, storage, and energy capabilities

• Operating systems and interoperability

Page 23: Wap & WML

Location-Based Services (LBS)

• An application that provides users with information based on the geographical position of the mobile device

• Main difference from other applications/systems– Availability of the user’s position in real-time– This single difference makes a BIG difference

• Initial LBS systems were subscription-based– Traffic congestion notifications based on roads selected

from a Web site– Received congestion updates about I-75 when on travel in

NYC!

Page 24: Wap & WML

Types of LBS Applications• LBS can be either Reactive (“pull”) or Proactive (“push”)• A Reactive LBS application is triggered by the user who,

based on his current location, queries the system in search of information

• Many examples– Finding restaurants or places of interest– Obtaining directions– Locating people– Obtaining weather information– Sending emergency notifications to police, insurance companies,

roadside assistance companies, etc.

Page 25: Wap & WML

• In Proactive LBS applications, on the other hand, queries or actions are automatically generated by the LBIS once a predefined set of conditions are met

• System needs to continuously know where you are and evaluate the predefined conditions

• Many examples as well– Geofencing, e.g., children outside predefined boundary– Fleet management– Real-time traffic congestion notifications– Location-based advertisement– Real-time friend finding– Proximity-based actuation– Travel assistant device for riding public transportation,

tourism, museum guided visits, etc

Page 26: Wap & WML

Location• In LBIS and LBS applications everything is about

LOCATION• Important to know about different players and

techniques used in the provision of location information

• A location provider may or may not be the same entity providing the location-based service to the user

• According to who provides the location information, the system can be categorized as network-based, mobile-based, and location provider-based

Page 27: Wap & WML

Network-Based Location Provider

Page 28: Wap & WML

Mobile-Based Location Provider

Page 29: Wap & WML

Location Provider-Based

Page 30: Wap & WML

A Complete LBIS Tracking Example

• General real-time tracking application with visualization– Tracking devices, people, etc.

• Uses the mobile-based location provider architecture• Proactive LBS application consisting of the following

components:– Positioning system– Client device– Transport network– Main control station– Servers

• Standard and free software and standard protocols as much as possible

Page 31: Wap & WML

Hardware• Positioning system

– GPS and Assisted GPS (A-GPS)• Client device

– GPS-enabled cell phone or any device with GPS or embedded positioning system• Transport network

– Cellular network with data plan (GPRS or similar) or network connectivity using Wi-Fi or any other IP-based networking technology

• Main control station– PC connected to the system to control service and visualize data, e.g., set up

geofence and Google maps• Servers

– Database, GIS for geocoding and reverse geocoding, application server for processing

Page 32: Wap & WML

Software• Java platform

– Java SE for clients and Java ME for resource-constrained devices

• Sun’s Glassfish as the application server• Google ‘s Web Toolkit for visualization

– Google Maps and Google Earth• Postgres, and object-oriented relational database• PostGIS, Postgres’s add on to support geographic objects• Standard communication protocols

– HTTP, TCP, UDP

Page 33: Wap & WML

WAP User Agent Profile• Fundamental user agent of the WAE• WAE allows the integration of domain-specific user

agents with varying architectures and environments• Existing Markup language contents designed for PC’s

with large displays ans large memory capacities• WAP handset may not able to store and display the

received contents• To resolve this UA profile also known as capability

and preference information (CPI) allows content generation

Page 34: Wap & WML

UA End to End Systems

Page 35: Wap & WML

Components• Client device capable of requesting and rendering WAP

Content• Wireless network employing WAP 1.1 or later protocols• A WAP capable GW capable of translating WAP requests

into corresponding requests over the internet and translating responses from the internet into corresponding responses over the WAPs

• The internet and intranet using TCP / IP based protocols and possibly having one or more protocol GWs and HTPP / Web Proxies.

• A web server can generate request content.

Page 36: Wap & WML

Caching model• A number of extensions and clarifications have

been specified to facilitate the operation of HTTP/1.1 caching on limited function devices

• A time sensitive cached resource is set to “must revalidate”

• Sesitive to Time Synchronization (Time of day Clock)

• Security enhancements (Prefetching)

Page 37: Wap & WML

Wireless Beares of WAP• Short Message Service (SMS)• Circuit Switched Data (USSD) • Unstructured Supplementary Services Data (USSD –

used over GSM) • General Packet Radio Service (GPRS – used over

GSM and TDMA)

Page 38: Wap & WML

WML • WML scripting language is used to design

applications that are sent over wireless devices such as mobile phones

• WML is an application of XML, which is defined in a document-type definition.

• WML pages are called decks• They are constructed as a set of cards, related to each

other with links

Page 39: Wap & WML

Syntax<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML

1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd"> <wml> <card> ... </card> ...more cards... </wml>

Page 40: Wap & WML

WML Commands

Page 41: Wap & WML
Page 42: Wap & WML
Page 43: Wap & WML
Page 44: Wap & WML

WML Script Components• Operators Arithmetic Operators Comparison Operators Logical (or Relational) Operators Assignment Operators Conditional (or ternary) Operators

Page 45: Wap & WML
Page 46: Wap & WML

WML Scripts Standard Libraries• lang: The Lang library provides functions related to the WMLScript language core.

Example Function: abs(),abort(), characterSet(),float(), isFloat(), isInt(), max(),

isMax(), min(), minInt(), maxInt(), parseFloat(), parseInt(), random(), seed()

• Float: The Float library contains functions that help us perform floating-point

arithmetic operations.

Example Function: sqrt(), round(), pow(), ceil(), floor(), int(), maxFloat(),

minFloat()

• Dialogs: The Dialogs library Contains the user interface functions.

Example Function: prompt(), confirm(), alert()

Page 47: Wap & WML

• String: The String library provides a number of functions that help us manipulate

strings.

Example Function: length(), charAt(), find(), replace(), trim(), compare(), format(),

isEmpty(), squeeze(), toString(), elementAt(), elements(), insertAt(), removeAt(),

replaceAt()

• URL: The URL library contains functions that help us manipulate URLs.

Example Function: getPath(), getReferer(), getHost(), getBase(), escapeString(),

isValid(), loadString(), resolve(), unescapeString(), getFragment()

• WMLBrowser: The WMLBrowser library provides a group of functions to control the

WML browser or to get information from it.

Example Function: go(), prev(), next(), getCurrentCard(), refresh(), getVar(), setVar()

Page 48: Wap & WML

WML Scripts Comments• Single-line comment: To add a single-line comment,

begin a line of text with the // characters. • Multi-line comment: To add a multi-line comment,

enclose the text within /* and */.

Page 49: Wap & WML

Sample Program