The Wireless Application Protocol
by
James Ewing
A Brief Overview of the WAP
protocol suite
Several years ago a company called Unwired Planet
developed a micro-browser and a markup language called Handheld Device Markup Language
(HDML). After some initial success with individual vendors in the U.S., Unwired Planet
decided to push for an open standard in order to create the critical mass needed to create
the "next big thing" in information access. They began talking to some of the
bigger players in the mobile world, Ericsson, Nokia and Motorola, about an open, unified
standard. They dubbed the standard the Wireless Access Protocol, and formed a group called
the WAP forum to jointly develop it. While HDML hasn't disappeared entirely, the Wireless
Access Protocol has eclipsed it. WAP has gotten a lot of press the last couple of years
and appears to be on the brink of becoming the standard for handheld, mobile devices.
Unwired Planet changed its name to Phone.com and has successfully marketed its line of
"UP" browsers and servers to most of the WAP vendors in the United States. They
have also made some inroads in Japan.
WAP's growth in Europe is driven by a company that grew up on the banks of a river in
Finland called the Nokia, and by the Swedish telecommunications giant L.M. Ericsson.
WAP's protocols mimic the World Wide Web's to a great degree. The Wireless Markup Language
(WML) is a dialect of XML, and uses the same type of "tag" format as the
HyperText Markup Language (HTML). World Wide Web servers communicate with WWW clients
(i.e. we browsers) using an ASCII based protocol called the HyperText Transport Protocol
(HTTP). HTTP is a very simple protocol consisting of field names and field contents
separated by carriage return and linefeed characters. HTML and HTTP themselves are
transported using the Transaction Control Protocol/Internet Protocol (TCP/IP) whose job is
to make sure that any data sent is properly delivered to its destination. TCP/IP creates
what is known in networking parlance as a "virtual circuit". Any data sent is
either delivered properly or triggers an error condition back to the sender.
HYPERTEXT TRANSPORT PROTOCOL (HTTP)
SECURE SOCKETS LAYER (SSL)
TRANSMISSION CONTROL PROTOCOL/ INTERNET
PROTOCOL (TCP/IP)
Although the WAP protocol mirrors Internet
standards to a great degree, it obstinately manages to be almost completely incompatible
with them. Because of this incompatibility, WAP devices cannot communicate directly with
WWW servers. The WAP protocols must first be translated from their WAP formats to the
protocols used by the WWW. This is why every WAP device needs to communicate with a WAP
gateway in order to request WML pages (or "decks" as they are referred to in
WAP) on a web server. The WAP gateway's job is to translate the WAP binary protocols into
the HTTP text potocol that the World Wide Web servers speak.
WAP SESSION PROTOCOL (WSP)
WAP
TRANSACTION PROTOCOL (WTP)
WAP TRANSACTION LAYER
SECURITY (WTLS)
WAP
DATAGRAM PROTOCOL (WDP)
The WAP protocol suite is built up on
hierarchical series of layers, some of which are optional. The bottom most layer is called
the WAP Datagram Protocol (WDP) and is responsible for moving WAP data from sender to
receiver and back again. WDP is patterned after TCP/IP's little brother the User
Datagram Protocol (UDP). Unlike TCP/IP, the protocol used for WWW data transfers, UDP
makes no guarantees about the delivery of data. It is known as a "best effort"
delivery service. What this means is that packets may be lost or corrupted in transit and
the receiver will never know that the data is missing. UDP is generally used on the
Internet for data that is not affected if a few pieces are missing, like audio or video
streams for example. UDP was chosen as the basis for the WAP transport mainly because of
its compactness and simplicity. Like UDP, WDP is an unreliable, "best effort"
delivery protocol.
WDP is often exactly the same as UDP, though this is not always the case. The rule of
thumb, as expressed in the WAP technical specifications, is that WDP is synonymous with
UDP (i.e. they are the same protocol) if, and only if, the WAP devices are communicating
on a network where Internet protocols are available.
Basically this means that if UDP is present, then WDP equals UDP. But in cases where no
Internet protocols are available, the WAP specifications designate different forms
of UDP "mapping" protocols that create the equivalent of UDP (usually through
some kind of text message exchange). The WDP to UDP "mapping"
protocols specified so far are SMS, SMS CSID, USSD, and ..95.
The next protocol up the ladder is the WAP Transaction Protocol (WTP). WTP is designed to
add back the pieces that UDP lacks compared to its bigger brother TCP/IP. WTP's job is to
make sure that packets sent via WDP actually arrive at their destination. It does this by
waiting for an "ACK" or acknowledgement packet
back from the receiver. Any packet sent the other side must explicitly acknowledge using
WTP. If an acknowledgement packet is not received within a specific time window, WTP will
resend the packet.
Unacknowledged packets will be resent a certain
number of times until an error is generated if no acknowledgment is received. WTP is an
optional protocol, however, and is not present in all WAP communications.
Above WTP, sits the WAP Session Protocol (WSP), which is responsible for two different
types of functionality. The first is to create a "session" between the WAP
client and the WAP gateway. Each session has a unique ID and must be explicitly started,
stopped, resumed, or disconnected. This mode is known as "connected" or
"continuous" mode WSP, and it is always used in conjunction with WTP. A WAP
client must explicitly create a session, and each packet exchange must be sent and
acknowledged via WTP (thus guaranteeing either delivery or an error condition). But,
again, WTP is an optional protocol and so is using WSP connected mode.
The other mode of WSP mirrors the functionality of HTTP. WSP's functionality in this case
is not optional and is present in every WAP exchange. If WAP is operating with just
the WSP protocol then no session is created and communication becomes a simple
request-response pairing. This is very similar to how the WWW functions. When WSP is used
alone in this manner, it is referred to as "connectionless" or
"temporary" WSP.
Connectionless mode WSP is also called WSP/B in some of the documentation available from
the WAP forum.
TOP