wap architecture and wml script

7
Mehta Ishani 130040701003 WAP architecture and WML Script INTRODUCTION WAP stands for Wireless Access Protocol.The WAP is the leading standard for information services on wireless terminals like digital mobile phones.The WAP standard is based on Internet standards (HTML, XML and TCP/IP). PURPOSE WAP stands for Wireless Access Protocol, a general term used to describe the multi-layered protocol and related technologies that bring Internet content to mobile devices such as PDAs and cell phones. Such devices are referred to as thin clients because they have one or more constraints in the form of display, input, memory, CPU, or other hardware or usability limitations. The platform constraints and the slower (and more expensive) bandwidth of cellular and related networks make standard Internet protocols difficult to utilize. To enable easy, fast delivery of relevant information and services to mobile users WAP is invented. It consists of a WML language specification, a WML Script specification, and a Wireless Telephony Application Interface (WTAI) specification BACKGROUND As previously stated, WAP refers to a wide range of technologies and protocols, all related to mobile Internet functionality. This functionality has roots dating back to the mid 1990s. At that time, several vendors were working on the mobile Internet problem as mobile device sales skyrocketed, and several competing technologies emerged: WAP is published by the WAP Forum, founded in 1997 by Ericsson, Motorola, Nokia, and Unwired Planet. Forum members now represent over 90% of the global handset market, as well as leading infrastructure providers, software developers and other organizations. HOW IT WORKS? This document will focus on the delivery of WML content to mobile devices over a cellular or related technology network. However, the delivery of many protocols and technologies takes the same route namely, through a proxy server that bridges the gap between the wired Internet and the wireless service provider's network.

Upload: ishmecse13

Post on 13-Dec-2014

160 views

Category:

Engineering


2 download

DESCRIPTION

Wap architecture and wml script

TRANSCRIPT

Page 1: Wap architecture and wml script

Mehta Ishani 130040701003

WAP architecture and WML Script

INTRODUCTION

WAP stands for Wireless Access Protocol.The WAP is the leading standard for information

services on wireless terminals like digital mobile phones.The WAP standard is based on Internet

standards (HTML, XML and TCP/IP).

PURPOSE

WAP stands for Wireless Access Protocol, a general term used to describe the multi-layered

protocol and related technologies that bring Internet content to mobile devices such as PDAs and

cell phones.

Such devices are referred to as thin clients because they have one or more constraints in the

form of display, input, memory, CPU, or other hardware or usability limitations. The platform

constraints and the slower (and more expensive) bandwidth of cellular and related networks

make standard Internet protocols difficult to utilize.

To enable easy, fast delivery of relevant information and services to mobile users WAP is

invented. It consists of a WML language specification, a WML Script specification, and a

Wireless Telephony Application Interface (WTAI) specification

BACKGROUND

As previously stated, WAP refers to a wide range of technologies and protocols, all related to

mobile Internet functionality. This functionality has roots dating back to the mid 1990s. At that

time, several vendors were working on the mobile Internet problem as mobile device sales

skyrocketed, and several competing technologies emerged:

WAP is published by the WAP Forum, founded in 1997 by Ericsson, Motorola, Nokia, and

Unwired Planet. Forum members now represent over 90% of the global handset market, as well

as leading infrastructure providers, software developers and other organizations.

HOW IT WORKS?

This document will focus on the delivery of WML content to mobile devices over a cellular or

related technology network. However, the delivery of many protocols and technologies takes the

same route namely, through a proxy server that bridges the gap between the wired Internet and

the wireless service provider's network.

Page 2: Wap architecture and wml script

Mehta Ishani 130040701003

Figure 1.1 WEB Model of WAP

This proxy server manages the communication between the wireless client and the Internet

server(s), acting as a gateway to the wired Internet. It caches content and in some cases even

translates raw HTML into WAP-compatible protocols such as WML.

Figure 1.2 the WAP Gateway provides wireless networks with Internet access and content

translation.

Page 3: Wap architecture and wml script

Mehta Ishani 130040701003

1. The user selects an option on their mobile device that has a URL with Wireless Markup

language (WML) content assigned to it.

2. The phone sends the URL request via the phone network to a WAP gateway, using the

binary encoded WAP protocol.

3. The gateway translates this WAP request into a conventional HTTP request for the

specified URL, and sends it on to the Internet.

4. The appropriate Web server picks up the HTTP request.

5. 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.

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

7. The WAP gateway compiles the WML into binary form.

8. The gateway then sends the WML response back to the phone.

9. The phone receives the WML via the WAP protocol.

10. The micro-browser processes the WML and displays the content on the screen.

WAP PROTOCOL STACK

There are different layers in WAP Protocol Stack

Page 4: Wap architecture and wml script

Mehta Ishani 130040701003

WAE- (Wireless Application Environment)

It is for device specifications and the content development programming languages,

WML and WML Script.

WSP – (Wireless Session Protocol)

It is lightweight session layer to allow efficient exchange of data between applications.

WTP - (Wireless Transaction Protocol)

It provides transaction support, uses UDP suitable for low bandwidth wireless stations.

WTLS – (Wireless Transport Layer Security)

It has encryption facilities that provide the secure transport service required by many

applications, such as e-commerce. It includes data integrity checks, privacy, service denial, and

authentication services.

WDP – (Wireless Data link Protocol)

The WDP presents a consistent data format to the higher layers of the WAP protocol

stack, thereby offering the advantage of bearer independence to application developers.

WML A markup language - the Wireless Markup Language (WML) has been adapted to

develop optimized WAP applications. In order to save valuable bandwidth in the wireless

network, WML can be encoded into a compact binary format. Encoding WML is one of the tasks

performed by the WAP Gateway/Proxy.

<?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 5: Wap architecture and wml script

Mehta Ishani 130040701003

WMLS

WMLScript (Wireless Markup Language Script) is the client-side scripting language of

WML (Wireless Markup Language). A scripting language is similar to a programming language,

but is of lighter weight. With WMLScript, the wireless device can do some of the processing and

computation. This reduces the number of requests and responses to/from the server.

Syntax

function name (parameters)

{

control statements;

return var;

}

WML Script to implement calculator functionality

Calc.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="card1" title="calc" newcontext="true">

<p>

Enter value of a: <input format="*N" name="a" title="A:"/>

<br/>

Enter value of b: <input format="*N" name="b" title="B:"/>

Operation: <select name="op" value="ADD" title="OP:">

<option value="ADD">Addition</option>

<option value="SUB">Substraction</option>

<option value="MUL">Multiplication</option>

<option value="DIV">Division</option>

</select>

<br/> $(a) $(op) $(b) = <u>$(conversion)</u>

<do type="accept" label="Calculate">

<go href="calc.wmls#convert('conversion','$(op)',$(a),$(b))"/>

</do>

</p>

</card>

</wml>

Page 6: Wap architecture and wml script

Mehta Ishani 130040701003

Calc.wmls

/*

*@param varName - the variable to store the results

*@param a - the value of a

*@param b - the value of b

*@param op - the operation

*@return a string containing the converted amount; or an

error if "op" is not supported.

*/

extern function convert(varName,op,a,b)

{

var returnString = "Not Available";

var result;

if (op == "ADD")

result = a + b;

else if (op == "SUB")

result = a - b;

else if (op == "MUL")

result = a * b;

else if (op == "DIV")

result = a / b;

if (b != 0.0)

{

returnString = String.toString(result);

returnString = String.format("%.2f", returnString);

}

/*

* Return the results to the browser

*/

WMLBrowser.setVar(varName,returnString);

WMLBrowser.refresh();

}

Page 7: Wap architecture and wml script

Mehta Ishani 130040701003

WAP - Core Services

Banking

Finance

Shopping

Ticketing

Entertainment

Weather

E- Messaging

Advantage

The advantages that WAP can offer over these other methods are the following: open

standard, vendor independent network-standard independent transport mechanism optimised for

wireless data bearers application downloaded from the server, enabling fast service creation and

introduction, as opposed to embedded software