To develop WAP applications, you will need the following:
A WAP enabled Web Server: You can enable your Apache or Microsoft IIS to serve all the WAP client request.
A WAP Gateway Simulator: This is required to interact to your WAP server.
A WAP Phone Simulator: This is required to test your WAP Pages and to show all the WAP pages.
You can write your WAP pages using the following languages:
In normal web applications, MIME type is set to text/html, designating normal HTML code. Images, on the other hand, could be specified as image/gif or image/jpeg, for instance. With this content type specification, the web browser knows the data type that the web server returns.
To make your Apache WAP compatible, you have nothing to do very much. You simply need to add support for the MIME types and extensions listed below.
|File Extension||MIME type|
Assuming you have Apache Web server installed on your machine. So now we will tell you how to enable WAP functionality in your Apache web server.
So locate Apache's file httpd.conf which is usually in /etc/httpd/conf, and add the following lines to the file and restart the server:
AddType text/vnd.wap.wml .wml AddType text/vnd.wap.wmlscript .wmls AddType application/vnd.wap.wmlc .wmlc AddType application/vnd.wap.wmlscriptc .wmlsc AddType image/vnd.wap.wbmp .wbmp
In dynamic applications, the MIME type must be set on the fly, whereas in static WAP applications the web server must be configured appropriately.
To configure a Microsoft IIS server to deliver WAP content, you need to perform the following:
There are many WAP Gateway Simulator available on the Internet so download any of them and install on your PC. You would need to run this gateway before starting WAP Mobile simulator.
WAP Gateway will take your request and will pass it to the Web Server and whatever response will be received from the Web server that will be passed to the Mobile Simulator.
You can download it from Nokia web site:
Nokia WAP Gateway simulator - Download Nokia WAP Gateway simulator.
There are many WAP Simulator available on the Internet so download any of them and install on your PC which you will use as a WAP client. Here are popular links to download simulator:
Nokia WAP simulator - Download Nokia WAP simulator.
WinWAP simulator - Download WinWAP browser from their official website.
NOTE: If you have WAP enabled phone then you do not need to install this simulator. But while doing development it is more convenient and economic to use a simulator.
I am giving this section just for your reference, if you are not interested then you can skip this section.
The figure below shows the WAP programming model. Note the similarities with the Internet model. Without the WAP Gateway/Proxy the two models would have been practically identical.
WAP Gateway/Proxy is the entity that connects the wireless domain with the Internet. You should make a note that the request that is sent from the wireless client to the WAP Gateway/Proxy uses the Wireless Session Protocol (WSP). In its essence, WSP is a binary version of HTTP.
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.
When it comes to actual use, WAP works like this:
The user selects an option on their mobile device that has a URL with Wireless Markup language (WML) content assigned to it.
The phone sends the URL request via the phone network to a WAP gateway, using the binary encoded WAP protocol.
The gateway translates this WAP request into a conventional HTTP request for the specified URL, and sends it on to the Internet.
The appropriate Web server picks up the HTTP request.
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.
The Web server adds the HTTP header to the WML content and returns it to the gateway.
The WAP gateway compiles the WML into binary form.
The gateway then sends the WML response back to the phone.
The phone receives the WML via the WAP protocol.
The micro-browser processes the WML and displays the content on the screen.