COMPUTER NETWORKS CSC 8560

advertisement
COMPUTER NETWORKS CSC 8560
PROJECT 1: WAP MOBILE WEB BROWSER
Instructor: Dr. Lillian N. Cassel
Submitted by:
SATISH-MURAHARISETTI
satish.muraharisetti@villanova.edu
Index
Introduction……………………………………………………………..
Discussing design…………………………………..………………...
Technology……..……………………………………………………….
Implementation………………..………………………………………
Operations……………………………..………………………………..
How to Run the Project………………………………..……………
Screen Shots………………………………..………………………….
Causes for failure………………………………..……………………
Enhancements………………………….……………………………..
Bibliography….…….…………………………………………………..
Code……………..………………………………………………………..
Objective:
To build a Mobile web browser (Gateway), this responds to the users request
with appropriate information. The implementations gives a clear idea about WAP and
a program written and tested on the below environment is ready to use by a
commercial WAP server where a browser can interpret it.
Discussing design:
Over all diagram of WAP network
The above figure shows the overall diagram of the WAP Service. In the above
diagram we see a WAP Gateway, Web Server, mobile device, Wireless network and
computer network. The wireless network may be analog or digital network. The
computer network may be LAN or WAN. The WAP gateway receives the request form
the mobile device and it converts in to HTTP request and then send over LAN or WAN
to get the appropriate service. The reply is again converted in to WAP and
transmitted to the device. In the device we have micro web browser where we view
the message. We call it as micro browser because it can only display few lines say 5
to 6 per display and generally 12 characters per line. These specifications might vary
depending up on manufacture, but are more commonly used ones. The detail
architecture (protocol stack) is discussed in the next section.
WAP – Wireless application Protocol
LAN – Local Area Network
HTTP – Hypertext Transfer Protocol
IP
– Internet Protocol
WAN – Wide Area Network
PROTOCOL STACK
The above diagram is a representation of WAP protocol stack. It has 5 layers, listing
them sequentially Presentation Layer (Binary Representation Layer is also combined with
presentation layer), Session Layer, Transaction Layer, Security Layer, Transaction
Layer. Let us see in detail what does each layer mean.
1) Presentation Layer
WML: It is a Wireless Mark-up Language. It is more discussed in detail in the next session.
WMLScript: It is Scripting language based on ECMA script. We can just think and compare
with VBScript or java Script for browser side validations. So as to decrease trips from browser
to server back and forth, thus by reducing the network traffic.
WBMP: It a WAP bit-map Image. The main advantage is it takes less time to down load the
image there by decreasing the download time of the card (a card is nothing but like a page in
HTML). Because images have less importance on small screen and less powers full CPU’s.
2) The Binary Presentation Formats:
WBXML: The binary WML an encoded format of WML.
WMLScriptc: WMLScriptc, binary encoded form of the WMLScript language.
The main reason for the Binary representation is it reduces the overhead (parsing or
compiling) at the browser side there by reducing the workload on the mobile device CPU.
3) The Session Layer:
WSP/B: It is simple stateless, request-response pairing just like HTTP. No state information
is maintained. It is also called WAP connectionless mode. WSP uses the WAP Datagram
protocol directly for communication with WAP clients.
WSP : Unlike WSP/B WSP is stateful binary protocol. We can just think of WSP is a superset
of WSP/B. WSP also defines additional protocol formats to support session’s initiation,
suspension, and resumption and to maintain session state information. WSP sessions can be
suspended and resumed and can even switch WDP bearers mid-stream.
4) The Transaction Layer
WTP: The WAP Transaction Protocol, WTP, is a confirmed transaction protocol used in
conjunction with WSP. WTP is loosely based on a relatively unknown Internet protocol called
TCP/IP. Three different WTP transaction classes are defined in the protocol. The simplest
transaction class, class 0, is basically not a transaction at all. It is a non-confirmed simple
push of information in one direction. This transaction class is used for basic information
exchange. Transaction class 1 is used for WAP 1.1 push transactions and is a simple sendacknowledge exchange. Transaction class 2 is a three-way handshake used for most
WSP/WTP information exchange. This handshake is a send-acknowledge-response trio sent
from the initiator to the responder and back again. WTP also has an optional capability to
segment and reassemble data. This is similar to the part of the capability built into TCP/IP.
WTP class 1 or class 2 transactions use a timeout and resend mechanism when packets are
unacknowledged. The recommended timeouts and maximum resend attempts vary depending
on the WDP bearer used. For example, the WAP Forum recommends that fairly low timeout
and resend values are used with UDP, while much higher values are recommended with SMS.
5) The Security Layer:
WTLS : The WAP Transaction Layer Security, WTLS, is a session oriented, secure protocol
layer patterned after the web's Secure Session Layer (SSL) and Transaction Layer Security
(TLS) protocols. The WTLS layer is optional and is independent of the layers above and below
it. One unique feature of WTLS is the ability of both client and server to independently
recalculate encryption key information based on an embedded sequence number. WTLS is
thus optimized to minimize information exchange between client and server. There are 3
levels of WTLS secure sessions. Level 1 is anonymous encryption where neither client nor
server is authenticated. Level 2 supports server certificates where clients authenticate the
server. Level 3 supports client certificates where the server can authenticate the client. WTLS
supports three certificate types: x.509, WTLS, and x.968. The WTLS certificate format is
unique to WAP and is designed to minimize information transfer. The x.509 certificate is the
same format as that used on the web in SSL and TLS transactions. And the x.968 format is
currently not fully specified, but will be supported in the future. WTLS is compatible with both
WSP/B and WSP with WTP and can is activated as an additional protocol layer between either
of these higher layers and the WDP protocol.
6) The Data Transport Layer
WDP: UDP is a member in the TCP/IP protocol, UDP is a simple and “best effort” data delivery
protocol. On the network where UDP is not available WAP defines a UDP equivalent. The UDP
equivalents are known as mappings. One thing we should note is like UDP, WDP does not
confirm the message delivery. The error correction and lost packets are handled by higher
layer protocols.
Technology:
ASP (Active Server Pages):
As we know that static web pages have became absolute. Now people are dealing with
creating dynamic web pages. Micro soft solution for dynamic web is ASP (Active Server
Pages). The ASP contains two parts programming code & embedded HTML. ASP page can
contain embedded HTML. This allows for existing static web pages to be easily converted into
dynamic ASP pages. The ASP page files contain .asp extension. A web server is a computer
that contains all the web pages for a particular web site and has special software installed to
send these web pages to web browser that request them.
To execute ASP pages on our computer, we need to be running a web server. Free
products are available from Microsoft that allows us to run a web server. The web server
capable for handling ASP pages process the requested ASP pages before it is sent to the
client. The programmatic code in the ASP page is interpreted by the web server. The web
Server informs the browser that it is sending HTML information, at which point the web server
sends the output of the ASP page. The browser, receiving this raw HTML, renders it for the
user.
XML (Extended Markup Language):
XML was designed primarily for storing and delivering information on the web. XML is
a special purpose subset of SGML. A benefit of this feature is that SGML software tool are
easily adaptable for working with XML. The XML processing programs not only easy to write,
but also XML documents themselves must be easy to create. Apart form using XML for server
browser programs it is also used for distributing and updating software, and for writing voice
scripts, exchanging information among financial programs. The
XML specifications are written in a formal language used for defining computer language,
which is known as Extended Backus-Naur Form (EBNF). This formal language, although
difficult to read casually, resolves ambiguities and unlimitedly makes it easier to write XML
documents and especially XML processing software, further encouraging XML’s adoption. The
above reasons made to select XML for my application.
WML (Wireless Markup Language):
Wireless Markup Language is just like HTML. In WML we will arrange in form of decks
where as in HTML we make pages. Learning WML is very easy if we know HTML and what tags
are and their definitions. It is easy to learn XML by looking at a code and understanding the
tags.
XSL (Extensible Stylesheet Language):
This allows to create us a powerful document style using XML syntax. XSL is an
application of XML. That is an XSL style sheet is a well-formed XML document that conforms
to the XSL rules. Just like an XML document, an XSL style sheet consists of plain text, and we
can create it using our favorite text editor. Though you use XML to create both the XML
document and the XSL Stylesheet, we keep them in a separate file. We link the XSL style
sheet to the XML document by including in this document which has the following general
form.
<xml-stylesheet type = ”text/xsl” href=XSLFilePath>
Implementation:
The below diagram shows the implementation of the WAP browser. The .asp,
.xml, .xsl files are in cgi-bin directory of the PWS (Personnel web server). The mobile
device contacts .asp file which in turn contacts the XML file where we have defined
our own tags but the style in which we want to present is written is .xsl file. The xml
tags are also define in the xsl file.
M
O
B
I
L
E
ASP
XML
XSL
Device
Wireless
Network
The over view of how the file contact each other
Example of a mobile device is a cellular phone.
Operations:
The operation we can perform is browsing the required information on the
web. That is, the server responds to the browsers request. It can be view as
requesting a web page form a web server in HTTP request.
How to Run the Project:
Step 1: Start the Personnel web server.
Step 2: Now place all your files in the inetpub/wwwroot/cgi-bin.
Step 3: Now open the internet explorer and then try to run the xml and XSL files so
that we make sure there are no errors.
Step 4: Now open the open wave WAP browser and in the URL location direct the
path using the IP-address (to the web server on which the files are located) just like
http server request.
Note: If cgi-bin is not created while installing the web server we have to create one
and share the folder properties. I did not try on IIS server and probably it should
work fine there too.
Note: when we are asked an option to choose the directory where we wish to have
PWS we choose a directory and inetpub is created in that directory.
Note: I used SDK 4.1 and now SDK 5.0 is also available. I don’t know what the
additional facilities available in SDK5.0 are and I hope the project runs on that SDK
5.0 (I did not try it).
The buttons on the simulator shown perform the actions like wise to a mobile cellular
phone. And few buttons on the device are mad compatible to the web browser. These
depend on the device vendor.
Screen Shots
Causes for failure :
Personnel Web Server may be stopped (Make sure it is running).
Make sure you have specified right file path for all the .xml and .asp files.
How to install PWS: Start browsing windows 98. Then select add-ons and there we find
PWS file and then double click on it and then a dialog window appears and it guides you to
the rest of the process. Secret the directory in which we want to install. If we don’t find
cgi-bin then create on and share its (folder) properties.
Enhancements :
These are the few enhancements we can do for this project.
 Extending this project in to full application providing facilities like web
registration.
 Implementing alerts.
 Providing security by encrypting.
 Conformation of the messages.
These are few questions striking in my mind:
What happens if user wants o use a PDA web browser instead of cellular
device?
The solution is the server should have different XSL file for a kind of device
where we edit the display tags depending on the browser. But the XML file can still
contain all the tags.
What about thinking of storing the name as 1* and address as 2* etc?
I guess by doing so, if a form is to be filled at the mobile device the user can
fill his personnel details (he can do this off line which are stored in the local cash of
mobile device) and the user can access them with minimum key strokes when he
need to fill a form. The WML script first converts the 1* by mapping it to the name
and so on, then builds a correct request and which is then sent to the server. It is
secured because in rare instance only users share (lend) a mobile device with other
user. This approach might even save the air time (money) of the user.
The above two questions are mine own doubts and my own solutions for them.
Bibliography :
www.wirelessdevnet.com/channels/wap/training/wml.html
www.wap-uk.com/Developers/Tutorial.htm
www.thozie.de/english/wap/wml.htm
www.openwave.com
www.wapforum.org
http://developer.openwave.com/download/license_41.html (SDK4.1 can be downloaded here)
CODE
Download