Progress
Open Client
Developer’s Guide


Validating and Generating the Proxy

ProxyGen allows you to generate and validate a proxy in one step or validate the proxy definition without generating the proxy. At almost any point during proxy definition, but before proxy validation or generation, you can specify options for proxy generation. These options specify such information as an Application Service name for the AppServer connection and compiler options for proxy generation.

Specifying Proxy Generation Preferences

You can specify proxy generation options at the default or AppObject level. You can specify the same options at each level as follows:

  1. Default — Default settings for all proxies that you define. Choose Options Preferences from the menu bar, and select the Default tab folder in the displayed Preferences dialog box. ProxyGen initializes these settings from and saves them to the Progress-Install-Directory\properties\ProxyGen.preferences file.
  2. AppObject — Specific settings for the AppObject you are defining. ProxyGen provides two ways to access this information:
    1. Choose Options Preferences from the menu bar, and select the AppObject tab folder in the displayed Preferences dialog box.
    2. Choose File Generate from the menu bar or choose the Generate button from the toolbar. This displays the Generate dialog box for the current AppObject before you generate the proxy.
    3. ProxyGen initializes these settings for a new AppObject from the ProxyGen.preferences file. Thereafter (for an existing AppObject), ProxyGen initializes these settings from and saves them to the project file for the proxy.

Setting the Proxy Directory

ProxyGen places both the proxy files (.class and .dll) and the activity log (AppObject-name.log) in a proxy directory. You can set the proxy directory to a different path by changing the Proxy Dir option in the Preferences dialog box or the Generate dialog box.

NOTE: ProxyGen does not clean the proxy directory. If there are existing files in the directory with the same name as a generated file, ProxyGen overwrites the existing files. Similarly, ProxyGen ignores any obsolete proxy files, which you can remove manually from the directory.

Specifying the Compiler

ProxyGen uses two default compilers, JavaSoft’s javac (installed by Progress) and Microsoft’s jvc. You can also specify an alternate compiler for proxy generation.

For Java proxies, you can choose from the following compilers:

For ActiveX proxies, you can choose from the following compilers:

Specifying Compiler Options

You can use the Advanced Compiler Options dialog box to specify the following compiler options for both Java and ActiveX compilers:

Proxy Validation and Generation

Once a project file is saved, you can generate the proxy by choosing File Generate from the menu bar or the Generate button from the toolbar (which displays the Generate dialog box), then choosing the OK button. During generation, the list of procedures is validated against the r-code files available on disk. If any procedure is deleted, ProxyGen automatically removes the procedure from the AppObject definition and records this action in an activity log file (AppObject-name.log). ProxyGen picks up all prototype changes and reconciles these changes (such as new or removed parameters) with existing customizations. ProxyGen records all such significant reconciliations in the activity log. This continues until all the procedures have been validated. For the available r-code files, the proxy is then generated with any specified customizations.

CAUTION: On Windows platforms, a compiler error might result if you generate a Java proxy, change the case of an AppObject, SubAppObject, or ProcObject name, and then regenerate the proxy without first deleting the old proxy files.
Proxy Validation Without Generation

If you want, you can also validate the proxy before any attempt to generate the code by choosing File Validate from the menu bar or the Validate button from the toolbar. This causes ProxyGen to complete the same validation procedure that occurs during code generation without generating any code. Similarly, any significant validation actions appear in the activity log.

For more information on proxy validation and generation, see the "Proxy Validation and Generation Rules" section.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095