[Cover] [Previous Section] [Next Section] [Index]

Current chapter: UP.Simulator Reference
Section 10 out of 79 total sections , Section 4 out of 12 sections in this chapter


Accessing HDML services with the UP.Simulator

The UP.Simulator has two principal modes that allow you to access HDML services:

You can also load static HDML files directly from a file system in either mode using:

The following table lists the advantages and limitations of each mode:

Mode  Advantages  Limitations 

File mode 

You don't need a Web server or an UP.Link server to test static HDML files. 

The UP.Simulator displays HDML errors in the Phone Information window. 

Only works with files available on your file system. 

Only works with static files; does not support CGI applications. 

Does not transcode between the character set of the file and the character set the UP.Simulator is configured to use. 

HTTP direct mode 

The UP.Simulator displays HDML errors in the Phone Information window. 

Supports CGI applications. 

You can test local URLs within your corporate firewall. 

You must configure your own Web server to serve your HDML files and run your CGI applications. 

Does not allow you to test notifications, user preference settings, the service registry, faxing, or bookmarks.  

Does not transcode between the character set the HDML service uses and the character set UP.Simulator is configured to use. 

No support for HTTP basic or HTTPS (secure) authentication (password-protected URLs). 

UP.Link mode 

You can test CGI applications, notifications, user preference settings, faxing, bookmarks, and the service registry. 

The UP.Simulator can take advantage of the UP.Link server's transcoding capability: it can access HDML services that use any character set. 

You must register the UP.Simulator on an UP.Link server. 

The UP.Simulator does not display HDML syntax error messages. 

You can't test local URLs that your corporate firewall protects from external access; you can only test URLs that are available over the Internet. 

The following sections describe the modes of accessing HDML services in more detail.



File mode

The UP.Simulator file mode is similar to the file mode supported by most popular Web browsers. To open an HDML file, specify a URL with the following form:

where path is the directory path to the file. The following table provides some examples of the file mode syntax:

URL  UP.Simulator loads ... 
file://c:/deck.hdml  
c:\deck.hdml  
file://h:/mydir/deck.hd ml  
h:\mydir\deck.hdml  
file:///deck.hdml  

\deck.hdml (located in the root directory of the drive where the UP.SDK is installed) 

file://c:deck.hdml  

Error (since c:deck.hdml is not a legal path) 


IMPORTANT     When you use the UP.Simulator in file mode, you can't take advantage of the UP.Link server's transcoding capability. This means that you must configure the UP.Simulator to use the character set used by the files you display on it. For information on configuring the UP.Simulator for specific character sets, see Specifying language, character set, or font.



HTTP direct mode

The following sections describe how to customize your system for HTTP direct mode.


Configuring HTTP direct mode

HTTP direct is the default mode when you first run the UP.Simulator. To specify a custom Home card or switch between HTTP direct and UP.Link modes, do the following:

  1. Choose Settings>UP.Link Settings.
  2. The UP.Link Settings dialog appears (see Figure 1-2). The default settings use a Home card on the Unwired Planet developer server and no proxy server. You can specify a different Home card by entering the URL for the deck in the Home URL field.


IMPORTANT     Unlike entering a URL in the UP.Simulator Go field (where specifying the http:// prefix is optional), you must include it when you specify a Home URL.

FIGURE  1-2.     Specifying HTTP direct mode


Using a proxy server

Some sites require a proxy server to access URLs outside of the local firewall. To determine whether your site uses a proxy server, consult your system administrator.

If your site uses a proxy server and you want to use HTTP direct mode, you must configure the UP.Simulator as follows:

  1. Choose Settings>UP.Link Settings.
  2. Click Proxy and enter the name and port number of the proxy server to use.
  3. For example, Figure 1-3 shows the UP.Simulator configured to use port 8080 on the proxy server zmrzlina.


IMPORTANT     The UP.Simulator does not support SOCKS proxies.

FIGURE  1-3.     UP.Simulator Set UP.Link dialog box configured for Proxy server


Specifying the request timeout

The request timeout determines how long the UP.Simulator waits for a response before generating an error. The default timeout is 30 seconds. You may want to increase this value if your network is very slow or you are submitting a request to a slow-responding service. This setting applies to HTTP direct mode only.

To change the request timeout, do the following:

  1. Choose Settings>UP.Link Settings.
  2. Select a timeout period from the dropdown menu and click OK (or, if desired, you can enter a value (in seconds) directly in the Request Timeout field).


IMPORTANT     When you use the UP.Simulator in HTTP mode, you can't take advantage of the UP.Link server's transcoding capability. This means that you must configure the UP.Simulator to use the character set used by the HDML service you are testing. For information on configuring the UP.Simulator for specific character sets, see Specifying language, character set, or font


Testing services in HTTP direct mode

To test one of your services using HTTP direct mode:

  1. Make sure your Web server is configured to serve HDML file types.
  2. For instructions on configuring your Web server to handle HDML and other UP.Link file types, see the UP.SDK Getting Started Guide guide.

  3. Make sure the URL you want to load is served by your Web server.
  4. For example, you might want to configure the Web server to serve the Examples directory provided with the UP.SDK.

  5. In the UP.Simulator, enter the URL you want to load.
  6. To request a specific URL, type it in the Go field that appears directly below the UP.Simulator menu bar (see Figure 1-1).

    Suppose the domain of your Web server is http://myserver.com and you have configured it to serve the UP.SDK examples directory. To display the HDML Samples menu, you would enter the following URL:

    Note that you must enter the full URL, including index.hdml. The UP.Simulator does not automatically append index.hdml if you specify only a directory path.

  7. When you have finished entering the URL, press Enter.
  8. The UP.Simulator opens the specified URL. Figure 1-4 illustrates the results if you specify the URL for the index.hdml file.

FIGURE  1-4.     UP.Simulator displaying HDML Samples menu



UP.Link mode

To use your phone UP.Simulator in UP.Link mode, you must do the following:


Registering on an UP.Link server

To run your UP.Simulator in UP.Link mode, you must register it on an UP.Link server. Unwired Planet provides an UP.Link server for use by developers who need to test advanced UP.Link functionality, such as faxing and notification.


IMPORTANT     The following procedure describes how to register your UP.Simulator on the devgate2 UP.Link server. The registration procedures for other UP.Link servers might be different; consult with the UP.Link server administrator for details.

To register the UP.Simulator on the devgate2 UP.Link server:

  1. Open the Unwired Planet Developer site in your Web browser:
  2. Register a username and password for access to devgate2.
  3. The username and password you enter will let you provision test subscribers on the UP.Link server and view their pending notifications and faxes.

  4. Click up.phone provisioning in the left frame of the Developer site.
  5. Select the appropriate developer program for your environment.
  6. Enter the username and password you just registered and click OK.
  7. The UP.Link Provisioning Main page appears, with buttons for the tasks you can perform on the left (see Figure 1-5).

    FIGURE  1-5.     UP.Link Provisioning Main Page

  8. Click the Add Subscriber button on the left.
  9. The Subscriber Registration form appears.

    FIGURE  1-6.     Subscriber Registration Form

  10. Fill in the fields, and click Submit.
  11. Use the IP address of the machine where you will run the UP.Simulator as the Device ID. If the IP address has not already been registered, clicking Submit displays the Subscriber Profile form (see Figure 1-7). If it has already been registered, an error message appears. Each IP address can have only one record in the registration database.


IMPORTANT     If you use an Internet Service Provider (ISP) to connect to the Internet, your computer probably does not have a fixed IP address. Enter a dummy IP address when you create the subscriber profile. To use the UP.Simulator, you need to synchronize the UP.Link subscriber profile with the IP address assigned to your computer each time you connect to the Internet. The devgate2 UP.Link server provides a utility that makes it easy to do this. For more information, see Using dynamic IP addresses.

FIGURE  1-7.     Subscriber Profile

The devgate2 UP.Link server allows you to register up to five separate subscribers. This is useful if you are testing on several different computers; you register separately for each computer (using the computer's IP address).


IMPORTANT     When you run the UP.Simulator in UP.Link mode using the devgate2 UP.Link server, you can only test services that are publicly available on the Internet. If your services are protected by your corporate firewall, you can't test them.


Configuring a particular UP.Link server

To configure the UP.Simulator to use the devgate2 UP.Link server:

  1. Choose Settings>UP.Link Settings.
  2. The UP.Link Settings dialog appears. Note that HTTP direct is the default mode.

  3. Click any one of the UP.Link options in the lower portion of the dialog and verify that it specifies the fully-qualified domain name shown in Figure 1-8.
  4. FIGURE  1-8.     Specifying UP.Link mode

  5. Click OK.
  6. The UP.Simulator is now configured to use the devgate2 UP.Link server.

    If you connect to an UP.Link server that requires encryption (devgate2 does not), the UP.Simulator displays the message shown in Figure 1-9.

    FIGURE  1-9.     UP.Simulator security screen

  7. Click Yes to enable security.
  8. This instructs the UP.Simulator to conduct a shared key exchange with the UP.Link server. The key exchange allows the UP.Simulator and the UP.Link server to conduct secure, authenticated communication.

Key exchange normally takes less than a minute. When it is complete, the UP.Link server Home page appears (see Figure 1-10). The devgate2 UP.Link server Home card is slightly different from the UP.Link Developer Home card. It provides options for you to view alerts and view and change settings.

FIGURE  1-10.     The devgate2 UP.Link server Home card


IMPORTANT     If you load an invalid HDML deck when you are running the UP.Simulator in UP.Link mode, you can't view specific information about HDML syntax errors. The UP.Simulator only displays a "Web service problem" message. This is because the UP.Link server verifies the HDML deck before it sends it to the UP.Simulator. To see specific error information, such as line numbers, use the UP.Simulator in HTTP direct mode. For more information on viewing error messages, see Phone Information messages.


Using different ports

The default port for UP.Link communication is port 8502. To use a different port, append a colon followed by the port number to the UP.Link domain name in the UP.Link Settings dialog (Figure 1-8). For example, instead of specifying devgate2.uplanet.com, you could specify devgate2.uplanet.com:8500.


[Cover] [Previous Section] [Next Section] [Index]

Current chapter: UP.Simulator Reference
Section 10 out of 79 total sections , Section 4 out of 12 sections in this chapter


Copyright © 1999, Unwired Planet, Inc. All rights reserved.