Home > Articles

Wireless Programming

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Openwave SDK

Although a complete discussion of WML and WMLS is beyond the scope of this book, it would be a useful exercise for you to create your own WML program and test it on a live Web server. This requires the following two items:

  • Access to a Web server (IIS or Apache both work well)

  • A development tool to test the programming

For the development tool, we recommend that you download and use the latest version of Openwave's SDK, which is freely available to developers at http://www.openwave.com. Once you install this program, you simply need to specify where the files will be stored.

To tune the Web server, you must add the MIME (Multipurpose Internet Mail Extensions) settings. MIME enables your Web server to handle specific file types. If the file extension is not listed, the Web server will reject any requests for a file of that type.

IIS Setup

  1. Click Start[Right Arrow]Settings[Right Arrow]Control Panel[Right Arrow]Administrative Tools[Right Arrow]Internet Information Service.

  2. Right-click on the Web Sites directory and select Properties.

  3. Click the HTTP Headers tab.

  4. Click the File Types button (see Figure 3.7).

  5. Click the New Type button.

  6. Enter wml (or wmls) in the Associated Extension box.

  7. Enter text/vnd.wap.wml (or text/vnd.wap.wmlscript) in the Content Type (MIME) box (see Figure 3.8).

  8. Click OK[Right Arrow]OK[Right Arrow]OK.

  9. Restart IIS.

Figure 3.7Figure 3.7 IIS File Types dialog.

Figure 3.8Figure 3.8 IIS File Type entry dialog box.

Apache Setup

  1. Click Start[Right Arrow]Find[Right Arrow]Files or Folder and search the C:\ drive for mime.types

    This file will typically be located under the C:\Program Files\Apache Group\Apache\conf directory.

  2. Open the file and find the following lines:

      application/vnd.wap.wbxml wbxml
        application/vnd.wap.wmlc  wmlc
        application/vnd.wap.wmlscriptc	wmlsc
        application/vnd.wap.wbxml  wbxml
  3. After the application/vnd.wap.wmlc wmlc line insert the following lines:

        application/vnd.wap.wml    wml
        application/vnd.wap.wmlscript	wmls
  4. You could also edit the existing wmlc and wmlscriptc lines and remove the trailing c.

  5. Restart Apache.

As you can see, it is not difficult to get WML running on a Web server. There is no software or hardware to install. The fun and challenging part for you will be creating the WML pages and testing the Web server with either a real PCS or a virtual PCS device.

  • + Share This
  • 🔖 Save To Your Account