All of these elements are brought together to provide an
environment that facilitates mobile devices interacting with
applications that reside on remote servers. The WAE is deployed on
the client device to provide an environment in which the user
interface can function. Sessions from the client device through to
the WAP gateway are established and managed using Wireless
Session Protocol (WSP)/Wireless Transport Protocol (WTP)
and the underlying protocol layers.
The WAP gateway itself includes a variety of
functionality, including protocol adapters to allow translation
between WSP and the various protocols that could be used to access
the network services, and encoding and compilation of the WML and
WMLScript from text to binary formats. The binary format is used to
minimize the amount of data that has to be sent over the network,
and also to reduce the amount of processing that the mobile device
needs to perform. Although WSP is used almost exclusively by the
mobile device to request content from the gateway, the protocol
that is used by the back-end service is the one encoded into the
URL. The only protocol supported for access to network services at
the moment is HTTP.
The WAP gateway communicates with an ordinary web server, using
HTTP. What happens from the web server through to the application
is no different from Internet access from fixed-wire devices, so
the content could be static WML pages, or dynamic content generated
using servlets, ASP, CGI, or any other server-side web technology.
All content is referenced using standard URLs.
How Does WAP Stack Up?
The differences between the WAP protocol stack and a
typical Internet protocol stack is the most important part of
enabling wireless access for mobile devices. The WAP protocol stack
does not map directly onto other stacks, although some comparison
is possible. This is illustrated in the diagram below:

The kind of functionality that is provided by HTML and Java in
the Internet world is incorporated in WAP in the WAE and, to some
extent, the WSP. WSP and WTP between them cover the functionality
that is provided by HTTP.
If security is required in the fixed-wire world, Transport Layer
Security (TLS) is usually used, and in the wireless world there is
the Wireless Transport Layer Security (WTLS) equivalent. The
transport layer in the fixed-wire world is usually either TCP or
UDP over IP, and in the wireless world it is UDP over IP where
possible, or the Wireless Datagram Protocol (WDP) is
provided for networks that cannot support IP at the network layer.
Underlying WDP there is a large number of over-the-air bearers that
are supported.