Appendix B. WAP Gateways and WSP

When visiting a site on the Web, a user’s browser connects directly to the web server to load the page. The browser must perform certain tasks, such as converting server names into numeric server addresses. The server must output the content in exactly the form required by the browser.

WAP puts additional demands on the server side. WML and WMLScript files aren’t transmitted in their original text format but in a compacted, encoded format. This means that some text-to-binary processing is required before data is sent to the browser. WAP also uses a different protocol for the actual data transfer. The standard HTTP protocol used on the Web is quite inefficient in terms of the number of bytes that transmit the message headers. WAP uses a terser protocol, called the Wireless Session Protocol (WSP).

Fortunately, it’s not necessary to modify existing web servers to support these differences. Data from a standard web server is passed through a software filter, called a WAP gateway , which handles both the protocol change and the text-to-binary conversion. This means that any of the normal server-side technologies used on the Web can create WAP content, too—CGI scripts, Java servlets, PHP scripts, and so on.

WSP Headers

If you’ve done any advanced development for the Web, you probably know about HTTP headers. These are pieces of information passed to the browser along with the response content. Since WSP is designed to replace HTTP, you may expect that WSP ...

Get Learning WML, and WMLScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.