Try OpenEdge Now
skip to main content
Online Help
Overview of Progress Application Server for OpenEdge : References : Using Apache Ant tasks : Generating a Data Object Service Catalog file
 
Generating a Data Object Service Catalog file
You can write a CatalogGeneration task to generate a Catalog file for a Data Object Service in an ABL Web App project.
Task-level properties and elements:
Name
Description
srcdir
Specifies the location of the ABL Web App project.
dlc
Specifies the location of your OpenEdge installation.
verbose
(Optional) Enables the verbose mode. The valid values are true, false, on, off, yes, and no.
Note: By default, the value is set to false.
serviceName
Specifies the name of the service.
resources
Specifies a comma-separated list of resources (classes and procedures) associated with the Data Object Service.
Note: Make sure to specify at least one resource and the resources must be accurately annotated.
destdir
(Optional) Specifies the destination directory where the Catalog file is generated.
resources element
Contains a set of ABL source files that are required to generate the Catalog file. You can configure this element using pathelement or fileset elements.
Note: For more information on pathelement or fileset elements, refer to the Apache Ant documentation.
dbinfo element
Contains the database connection details that the catalog generation task depends on. Each dbinfo element is considered a single database connection information.
Name
Description
name
Specifies the name of the database or the database file with its full path, for example, sports2000 or C:\OpenEdge\WRK114\sports2000.db.
host
(Optional) Specifies the host name, for example, localhost.
port
(Optional) Specifies the server port or service name.
userId
(Optional) Specifies the user ID that you use to log in to the database.
password
(Optional) Specifies the password that you use to log in to the database.
Note: Make sure that the server and database is running when you run the ANT task.
Here is a sample build.xml file for Data Object Service catalog generation:
<?xml version="1.0" encoding="UTF-8"?>
<project name="ABLWebApp" default="main" basedir=".">

<property name="dlc.dir" value="C:\Progress\OpenEdge117" />
<property name="dlc.java.dir" value="${dlc.dir}/java" />

<!-- property name="src.dir" value="C:\ablwebapp\src\ABLWebAppAllSrvs" /-->
<!--property name="dest.dir" value="C:\ablwebapp\dst\ABLWebAppAllSrvs" /-->

<property name="src.dir" value="C:\ablwebapp\src\CatalogAnt\test" />
<property name="dest.dir" value="C:\ablwebapp\src\CatalogAnt\cat" />

<property name="build.dir" value="C:\OfficeWork\streams\psajja_OE_117_pdsoe\vobs_oeide\nt" />
<property name="dlc.home" value="${build.dir}/dlc/" />

<!-- Copy the jars from latest build -->
<target name="copy">
<copy todir="${dlc.java.dir}/ant-libs" overwrite="true">
<fileset dir="${build.dir}/ant-libs" />
</copy>
<copy file="${build.dir}/ant_webapps/dist/ant-ablwebapp.jar" todir="${dlc.java.dir}" overwrite="true" />
</target>

<!-- Target for defining 'taskdef' -->
<target name="taskdef" depends="copy">
<echo>Task Definitions</echo>

<taskdef resource="com/progress/openedge/pdt/ant/ablwebapp/ablwebapps.properties">
<classpath>
<pathelement location="${dlc.java.dir}/ant-ablwebapp.jar" />

<!-- ABLWebApp Dependencies -->
<pathelement location="${dlc.java.dir}/ant-libs/ablwebapp.jar" />
<pathelement location="${dlc.java.dir}/ant-libs/ablwebapp-dependencies.jar" />

<!-- CodeModel Dependencies -->
<pathelement location="${dlc.java.dir}/ant-libs/codemodel-dependencies.jar" />

<!-- AST and its Dependencies -->
<pathelement location="${dlc.java.dir}/ant-libs/ast.jar" />
<pathelement location="${dlc.java.dir}/ant-libs/ast-dependencies.jar" />

<!-- Additional deps -->
<pathelement location="${dlc.java.dir}/ant-libs/velocity-1.7.jar" />
<pathelement location="${dlc.java.dir}/ant-libs/velocity-1.7-dep.jar" />
<pathelement location="${dlc.java.dir}/ant-libs/1padapters-restExpose.jar" />
<pathelement location="${dlc.java.dir}/1padapters-idl.jar" />
<pathelement location="${dlc.java.dir}/ext/jettison-1.2.jar" />
</classpath>
</taskdef>
</target>

<!-- Copy task -->
<target name="copytsk">
<copy todir="${dlc.home}/oeide">
<fileset dir="${build.dir}">
<exclude name="Architect_repo/plugins/com.progress.openedge.pdt.ablwebapp_*" />
<include name="Architect_*/**" />
<include name="eclipse/**" />
</fileset>
</copy>
</target>

<!-- Main task -->
<target name="main" depends="taskdef">

<mkdir dir="${dest.dir}" />

<CatalogGeneration srcdir="${src.dir}" dlc="${dlc.dir}" verbose="true" resources="${src.dir}\AppServer\tst.cls"
serviceName="dorest" destdir="${dest.dir}">

<!-- Configure Database Info -->
<dbinfo name="sports2000" host="localhost" port="4546" />

</CatalogGeneration>

</target>
</project>