Integrate OpenWave Simulator in Microsoft Visual Studio .NET

zhaozj2021-02-16  94

Summary: This article describes how to use the OpenWave Simulator in the Visual Studio .NET environment during the development process.

Suitable for: ASP.NET Mobile Control (formerly NOSOFT Mobile Internet Toolkit). This article contains the screen of the English.

table of Contents

Requires Integrated OpenWave Simulator in Visual Studio .NET to test using the OpenWave Simulator to use the OpenWave Simulator for debugging Simulator for running using Visual Studio .NET

Introduction

If you are using ASP.NET (for example, using an ASP.NET Move Control) to develop mobile web applications, you can use the OpenWave mobile browser simulator to test content in the Microsoft Visual Studio .NET (English) environment. This is achieved by configuring Visual Studio .NET, using the command line parameters supported by OpenWave SDK 4.1.1 and OpenWave SDK 6.1. These OpenWave SDK can be available free of charge from the OpenWave Developer Web site (English).

OpenWave SDK 4.1.1 includes an OpenWave mobile browser 4.1 simulator that complies with WAP 1.1 standard and can display WML content. OpenWave SDK 6.1 contains OpenWave mobile browser 6.1, which complies with WAP 2.0 standard and can display XHTML mobile configuration files and CSS content. You can use one of the simulators or both depending on your needs and target devices on the market. For more information on browser features and device deployment, see the OpenWave Developer Web site (English).

For more information on integrated simulators in Visual Studio .NET, see MSDN Mobile Internet Toolkit Article Working With emulators and browsers (English).

Claim

Visual Studio .NET (English) ASP.NET Mobile Control (English) (original Microsoft Mobile Internet Toolkit) OpenWave SDK 4.1.1 and / or OpenWave SDK 6.1

Integrate OpenWave Simulator in Visual Studio .NET

Install the OpenWave Simulator as an application browser into the Visual Studio .NET.

Start Visual Studio .NET. Open or create a mobile web project. Select Browse with from the FILE (File) menu. In the Browse With (Browse) dialog box, click Add. In the Program Name field of the Add Program dialog, enter the path name of the SDK simulator application, or click Browse to browse to the program. If the SDK is installed in the default location, the path name is: "C: / Program Files / OpenWave / SDK 6.1 / Program / HTTP / OSDK61HTTP.exe" in the Friendly Name "field of the Add Program dialog , Enter the appropriate name, such as OpenWave SDK 6.1. Only for SDK 4.1.1: SDK 4.1.1 in the Add Program dialog, you must add -RLOAD% URL after the path name of the file. Make sure to create a user's path to the application's path, and additional command line parameters are added outside the quotation. Click OK. Only for SDK 4.1.1: When you click OK (OK), I will receive a message: "File Name Does Not Exist, IS Invalid, or Contains Parameters That Cannot Be Validated.do You Want To Change Your Entry?" (The file name does not exist, invalid or contain invalid parameters. Do you want to change the input? Content?) You can click NO to make a response. In the Browse With dialog box, click SET AS Default Setting OpenWave Simulator to Test the Default Browser. Click Close. Test with the OpenWave Simulator

To use the OpenWave Simulator test application in Visual Studio .NET, select File> Build and Browse (File> Generate and Browse) or File> Browse.

The OpenWave Simulator is started and displayed two windows: Phone Information window and the main simulator window. These two windows may appear in the form of minimization, or appear in the background, so it may be necessary to display it at the front desk.

When debugging and change, you can select File> Build and Browse again to update the running simulator and pass the current URL to it. Thus test the current page or move between the page.

You can also browse using the OpenWave Simulator itself, and the method is to select a link or enter the URL in the "Go" field of the simulator.

Commissioning using the OpenWave Simulator

To use the OpenWave Simulator and the Visual Studio .NET debugger to debug the application, simply select Debug> Start (Debug> Start) or Debug> Start WitHout Debugging command. The OpenWave Simulator will launch and display the running application, while the Visual Studio .NET debugger can be used to view variables, single-step execution code, and perform other debug tasks. However, if you are using OpenWave SDK 4.1.1, you must first change the debug configuration of the project.

In the Solution Explorer (Solution Explorer), use the right-click project and select the Properties command. In the ProPerty Pages dialog box, select the debugging under the Configuration Properties folder. Set the Debug Mode property to Program. Set the Start Application property to the full path to the OpenWave SDK 4.1.1 executable. If the SDK is installed in the default location, the path name is: c: / program files / openwave / upsdk411 / upsim411.exe Sets the Command Line Arguments property to -Reload plus the absolute URL of the application start page. Click OK to close the dialog. The project's configuration has been completed, you can use the OpenWave 4.1.1 simulator to debug it.

Control the running simulator using Visual Studio .NET

You can create a menu item in Visual Studio, send command line parameters to the running OpenWave Simulator.

The simulator can use many command line parameters, for example: -clearcache, used to clear the simulator cache; -pho, used to change the simulator configuration file (ie, appearance); - LANG, used to simulate in the ACCEPT header Change the language, character set, and related localization settings sent to the web server. For a complete list and description of the simulator command line parameters, see the OpenWave SDK version description.

Select Tools> External Tools (Tools> External Tools) and click Add in the External Tools dialog box. Replace [NEW TOOL 1] in the Title field is replaced with the name of the new menu item. In the Command field, enter the application path name of the SDK simulator, or click the ingredient button (...) to browse the application. If the SDK is installed in the default location, the path name is: c: / program files / openwave / sdk 6.1 / program / http / osdk61http.exe

Note:

Add Program in the Add Program dialog

The Program name is different, and this path name does not need to be quoted on both sides.

In the Arguments field, enter the OpenWave Simulator command line argument. Since the simulator can only receive a parameter at runtime, you need to create a Visual Studio menu item for each command line parameter to be passed to the simulator. Click the arrow on the INITIAL DIRECTORY field and select Target Directory. Click OK. This menu item is added to the Tools menu. Description

When starting the OpenWave Simulator, you can only use some command line parameters, and you may also need to set some command line parameters to default parameters, such as the default language or default emulator configuration file (ie, appearance). In these cases, you can use a batch file with all the required parameters to start the simulator. One way to achieve this is that editing Batch file C: / Program Files / OpenWave / SDK 6.1 / Program / OSDK61HTTP.cmd is called when the Simulator is started by "Start" menu item. For more information, see the OpenWave SDK version description.

If SDK 4.1.1 and Mmit are used, the -reload parameter cannot be properly processed when the simulator is started for the first time. Simple solution is to call Browse again, or start the simulator using the Start menu item or batch file. In the future, all reloading tasks can be implemented correctly.

转载请注明原文地址:https://www.9cbs.com/read-11483.html

New Post(0)