This section will help you to set up an application rapidly. For complete details on possible configuration parameters and settings, see Service List Reference.
When you configure an application, there are many pieces of information that must be provided to the Genero Application Server. However, much of this information is common across a set of applications. Therefore, rather than have you provide all the information each time you configure an application, Genero supports the concept of inheritance. You define abstract applications to hold the basic information that is common across your applications, and then you configure your application to inherit the settings of the abstract application. There is no limit to the levels of inheritance: an application can inherit from another application (abstract or not) that inherits from another application, and so on. To inherit a default configuration from another application, you specify it as the parent of the application.
In general, an abstract application is defined first. This abstract application is not executable, but is intended to provide the baseline default configuration for other applications to inherit. You can create as many abstract applications as you require, and abstract applications can inherit a default configuration from another abstract application.
When configuring an application that is to be an executable, you can provide the configuration details in either the Genero Application Server configuration file, or you can create a separate application-specific configuration file, known as an external application configuration file. If you add the application to the Genero Application Server configuration file, you must stop and restart the Genero Application Server for the application to be recognized. If you create an external application configuration file, you can add the file into a defined GROUP directory and the application is immediately available without having to do a GAS restart.
See also:
Tip: If you use this inheritance mechanism efficiently, you can configure new applications with only a few entries in a configuration file.
To specify an abstract application, set the Abstract attribute to TRUE.
Warning: Abstract applications can only be defined in the application server configuration file, they cannot be defined in an external application configuration file.
In this example,01
<APPLICATION Id="defaultwa" Abstract="TRUE">02
<EXECUTION Using="cpn.wa.execution.local"/>03
<OUTPUT>04
<MAP Id="DUA_GWC" Allowed="FALSE"/>05
<MAP Id="DUA_GJC" Allowed="FALSE"/>06
<MAP Id="DUA_GDC" Allowed="FALSE"/>07
</OUTPUT>08
</APPLICATION>
DUA_GWC
, DUA_GJC
and DUA_GDC
are OutputMap, which indicates the Front End used to display the application.
Note that no OutputMap is enabled as the attribute Allowed
is set to FALSE
.01
<APPLICATION Id="ws.default" Abstract="TRUE">02
<EXECUTION Using="cpn.ws.execution.local"/>03
<TIMEOUT Using="cpn.ws.timeout.set1"/>04
</APPLICATION>
In the following example, the path is a resource. The path can also be an absolute path to your application files. This configures a GWS server that any Web Service Client can connect to.
01
<APPLICATION Id="calculator" Parent="ws.default">02
<EXECUTION>03
<PATH>$(res.path.calculator)/server</PATH>04
<MODULE>calculatorServer.42r</MODULE>05
</EXECUTION>06
</APPLICATION>
ws.default is the parent of any web services application.
Note: Because a DVM can have several services defined in it, the Web Service DVM is an application. The services defined inside are still named service. The published functions are named operations.01
<APPLICATION Id="echo" Parent="ws.default">02
<EXECUTION>03
<PATH>$(res.path.fgldir.demo)/WebServices/echo/server</PATH>04
<MODULE>echoServer</MODULE>05
</EXECUTION>06
</APPLICATION>
To get the WSDL for a specified service:
http://appserver:6394/ws/r/appid/service?WSDL
To access the Web service:
http://appserver:6394/ws/r/appid/service
If the Web service uses a group:
http://appserver:6394/ws/r/groupid/appid/service
Access through a webserver (apache for example):
http://webserver/cgi-bin/fglccgi/ws/r/appid/service
To configure a Web Service application using an external application configuration file, you provide the same code that you would for adding an application directly to the GAS configuration file, except that you store this information in a file whose name matches that of the application. For example, to create a file for a Web Service named echoServer, you would create an external application configuration file with the name echoServer.xcf. You must use the .xcf suffix. You then place this file in a group directory as configured in the GAS configuration file.
A group consists of a group name and a directory in which external application configuration files can be placed. When a front-end starts an application whose configuration information is in an external application configuration file, it must provide the group name to direct the Genero Application Server to the directory where the file resides, and the application name to identify which file to read. A group is specified in the SERVICE_LIST component of the GAS configuration file.
<GROUP Id="groupId" > path </GROUP>
01
<GROUP Id="demo-gws">$(res.path.app)/tutorial/demo-gws</GROUP>
Create a separate .xcf file for each application. Because the application and configuration file share the same name, there is no need to specify the Id attribute. In the following example, if the file was named "echo.xcf, then this configuration file would accomplish the same task as when included in the Genero Application Server configuration file; the only difference between this example and the Example 2 shown above is the lack of the Id attribute.
01
<APPLICATION Parent="ws.default">02
<EXECUTION>03
<PATH>$(res.path.fgldir.demo)/WebServices/echo/server</PATH>04
<MODULE>echoServer</MODULE>05
</EXECUTION>06
</APPLICATION>