Generating a Universal Display File Web-Service



Generating an Universal Display File web-service using JumpStart is a simple process.  With a few selections, you can have a web-service up and running in a matter of minutes.

To access the JumpStart interface, navigate to http://yourserver:port/profoundui/jumpstart .  You will be presented with a list of options to control the generation of your web-service.

Defining the Application

Application Type and File Selection

  • Application Type - There are currently four options, but only "Webservice" should be chosen when generating Universal Display File programs.

  • Language - This option tells JumpStart what programming language and syntax should be used.  Universal Display File programs only use RPG for the language. The regular templates support both RPG Free (All Specs), and RPG Free (C Specs Only).

    • RPGLE Free (All Specs) - This option will generate an RPG application using the newer full free format syntax introduced in IBM i 7.1.  PTFs for the RPG compiler are required on IBM i 7.1 in order to use this option.  IBM i 7.2 included this functionality at release.

    • RPGLE Free (C Specs Only) - This option will generate and RPG application with free format calculation specs, but all other lines will be fixed format. 

  • Template - Based on this setting, the generation engine chooses a template to build the application.  JumpStart currently ships with several Universal Display File templates, but customers may create their own templates as well.

    • Webservice to do Autocomplete - this Universal Display File template provides customized auto-complete results for a textbox or combo box widget.

    • Webservice to load Dropdown Data - this Universal Display File template provides data for populating a combo-box or select-box widget.

    • Webservice to load Grid Data - this Universal Display File template provides data for populating a grid. Using this may be necessary when the DB-driven or handler-populated grids do not work for a particular set of physical files.

    • Webservice to load Chart Data JSON - this Universal Display File template provides JSON data for use in a Chart widget.

    • Webservice to load Chart Data XML - this Universal Display File template provides XML data for use in a Chart widget.

    • Webservice to perform file maintenance - this Universal Display File template allows you to call web services to perform file maintenance (CREATE, READ, UPDATE, DELETE) on a file.

  • Database File - This is where you tell JumpStart what table you want as source data for the web-service. The templates shipped with JumpStart use embedded SQL for database access. There is also a link next to this option to maintain the library list used by JumpStart.

  • Extra Database Files - You may specify extra files to join with the main file. Only the main, "Database File" is required.

  • Application Title - This will become the description of the generated program and display file objects. This may also be automatically inserted into the generated source code.

Once these options are set, clicking the "Retrieve Fields" button will bring up additional settings.

Field Selection

This section allows you to control which fields become output in the web-service's response data. When you check or uncheck a field, then the SQL Preview will update, showing which fields will be used.

Certain templates expect only 1 or 2 fields to be output. For example, the "dropdown" template expects at most 2 fields, and it will not generate if more than 2 fields are selected. It allows only 2 fields because the combo-box and select-box expect 1 or 2 fields in the AJAX response data.

  • Use Field - allows you to choose which fields are output in the web-service response data.

  • Field - This value is used in the RPG source code and the Universal Display File field binding. If extra files are joined and have the same column names, then the "Field" name must be changed to avoid duplicates. Some stock templates also include this value in the response data.

  • Description - this value is only output in the Display File source member. A customer may include this in a custom template's response data.

  • Coalesce Value - when a file contains null-capable fields by definition, then a coalesce value helps avoid RPG runtime errors for null values. If an extra file is RIGHT or LEFT joined, then coalesce values must be used to avoid null runtime errors.

Code Generation

When generating an RPG application, this section is used to specify where to store the generated source and compiled objects for your application.

Building the Application

Once all of your settings are entered, just click the Generate Application button and JumpStart will begin the process of building the application.  While the generation engine runs, you will see status messages to allow you to track the progress. 

Once the process is finished, an alert box will display.

At this point, your application has been generated and compiled.  You will run the application in the same manner as any other Universal Display File application. Read here for setting up the Web Connector.

The source for the application will be found in the location you specified during the setup process.  You can open this source and make modifications just like any other application.

Note:  JumpStart is intended be used as an initial step in building your application.  Running JumpStart again with the same settings will overwrite any manual modifications you may have made.