Although your WML services will probably be scripts or programs that dynamically generate WML, static WML decks are useful for providing help text, menus, and other elements of your service's interface that don't change often. Static WML files are also useful for conducting a "simplest case" test of the UP.Simulator.
To create and test a simple static WML deck:
Use a text editor to create the WML file.
For example, create a file containing the following WML deck:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card>
<p>
Hello, Unwired World!
</p>
</card>
</wml>
Chapter 1, Introduction, provides a line-by-line description of this deck.
Make sure you save the file in text-only format with a .wml extension.
IMPORTANT
Many Windows text editors automatically add a .txt filename extension when you save a text-only file--even if you have already specified another extension, such as .wml. After you save your WML file, make sure it has the .wml extension only (not .wml.txt). If the extension is not correct, use Windows Explorer or a DOS window to change the extension after you have saved the file.
Start the UP.Simulator (see Starting the UP.Simulator).
Type the URL of your WML file in the Go field and press Enter (on your computer keyboard).
For example, if you saved the file to c:\hello.wml, type the following URL in the Go field:
file://c:/hello.wml
The UP.Simulator displays the card shown in Figure 3-4.
If the UP.Simulator does not display the card correctly, you may have a WML error. See the following section for instructions on checking UP.Simulator status messages.
IMPORTANT
Because the UP.Simulator caches decks, you may not see your changes if you edit a deck that you have previously loaded. To force the UP.Simulator to load the modified deck, navigate to the deck and choose Edit>Reload (or press F9). For more information about using the cache, see the UP.SDK Developer's Guide.