Try OpenEdge Now
skip to main content
Administration
Command and Utility Reference : RESTGEN
 

RESTGEN

Generates a Web application (WAR) or Web services (PAAR) file for a REST Web application.

Syntax

Operating system
Syntax
UNIX
Windows

restgen
   -proj location-of-the-REST/Mobile-project
   {
     [-restSvcNames REST-service-name-1:
                     REST-service-name-2:
                     REST-service-name-3
...]|
     [-MobSvcNames  Mobile-service-name-1:
                     Mobile-service-name-2:
                     Mobile-service-name-3
...] |
     [-MobApps Mobile-application-name-1:
               Mobile-application-name-2:
               Mobile-application-name-3
...]|
     [-MobSvcNames  Mobile-service-name-1:
                     Mobile-service-name-2:
                     Mobile-service-name-3
...
      -MobApps Mobile-application-name-1:
               Mobile-application-name-2:
               Mobile-application-name-3
...]
   }
   -target location-for-the-generated-war/zip-file]
   [-includeJars {true | false}]
   {genPaar | genMobPaar | genRESTWar | genMobWar |
    genMobAppWar | genOnlyMobApp}
-proj location-of-the-REST-project
The location of the REST or Mobile project folder.
-restSvcNames REST-service-name-1:REST-service-name-2...
Colon-delimited names of the REST services to be generated in a REST project.
-MobSvcNames Mobile-service-name-1:Mobile-service-name-2...
Colon-delimited names of the Mobile services to be generated in a REST project.
-MobApps Mobile-application-name-1:Mobile-application-name-2...
Colon-delimited names of the Mobile Web application to be generated in a REST project.
-target location-for-the-generated-war/zip-file
The location where the RESTGEN generates the REST Web application (WAR) file or a REST/Mobile Web Service (PAAR). In case of REST/Mobile Web Service, the PAAR file is generated as a ZIP file. If unspecified, the RESTGEN utility generates the output in %WRKDIR%.
-includeJars{true|false}
Specifies whether all the REST/Mobile Application library files must be regenerated or not. If unspecified, the library files are regenerated, that is, -includeJars is set to true.
{ genPaar | genMobPaar | genRESTWar | genMobWar | genMobAppWar | genOnlyMobApp }
The following section describes how and when to use the above parameters:
*genPaar: Generates a ZIP file that contains REST services—specified in the -restSvcNames parameter—for a REST project.
The ZIP file maintains the REST project folder structure. Typically, the ZIP file's folder structure for a REST service is WEB-INF/adapter/rest-service/rest-service.paar.
*genMobPaar: Generates a ZIP file that contains Mobile services, specified in the -MobSvcNames parameter, for a Mobile project.
The ZIP file maintains the Mobile project folder structure. Typically, the ZIP file contains WEB-INF/adapter/mobile-service/mobile-service.paar and the catalog files for each mobile service, static/catalog-name.json.
*genRESTWar: Generates a deployable Web application for a REST project.
The Web application consists of the REST services that are specified in the -restSvcNames parameter.
*genMobWar: Generates a deployable Mobile Web application for a mobile project.
The Mobile Web application consists of the Mobile services that are specified in the -mobSvcNames parameter.
The generated mobile application does not contain the Mobile UI App.
*genOnlyMobAppWar: Generates a Mobile Web application for a mobile project.
The Mobile Web application consists of the Mobile Apps that are specified in the -mobApps parameter.
The generated mobile application contains only the Mobile UI Apps.
*genMobAppWar: Generates a Mobile Web application for a mobile project.
The Mobile Web application consists of both the Mobile services that are specified in the -mobSvcNames parameter, and the Mobile apps that are specific in the -mobApps parameter.

Notes

*You can use the RESTGEN utility to generate a ZIP file with REST or Mobile services, and then use the ZIP file as an input file in the RESTMAN republish utility. For more information on republishing a REST Web application, see Republishing a REST Web application.
*The following examples show how the different WAR and PAAR generation options in RESTGEN utility work:
In the following example, a RESTProject.zip is created in the location C:/OpenEdge. The ZIP file contains the REST services, ServiceA and ServiceB, of a REST Web application, RESTProject:
restgen -proj C:/RESTProject -restSvcNames ServiceA:ServiceB -target
C:/OpenEdge/RESTProject.zip -genPaar
In the following example, a MobileProject.zip is created in the location C:/OpenEdge. The ZIP file contains the Mobile services, ServiceA and ServiceB, of a Mobile Web application, MobileProject:
restgen -proj C:/MobileProject -MobSvcNames ServiceA:ServiceB -target
C:/OpenEdge/MobileProject.zip -genMobPaar
In the following example, a REST Web application, RESTProject.war, is created in the location C:/OpenEdge. The WAR file contains the REST services, ServiceA and ServiceB:
restgen -proj C:/RESTProject -restSvcNames ServiceA:ServiceB -target
C:/OpenEdge/RESTProject.war -genRESTWar
In the following example, a Mobile Web application, MobileProject.war, is created in the location C:/OpenEdge. The WAR file contains the Mobile services, ServiceA and ServiceB:
restgen -proj C:/MobileProject -MobSvcNames ServiceA:ServiceB -target
C:/OpenEdge/MobileProject.war -genMobWar
In the following example, a Mobile Web application, MobileProject.war, is created in the location C:/OpenEdge. The WAR file contains the Mobile apps, MobAppA and MobAppB:
restgen -proj C:/MobileProject -MobApps MobAppA:MobAppB -target
C:/OpenEdge/MobileProject.war -genOnlyMobApp
In the following example, a Mobile Web application, MobileProject.war, is created in the location C:/OpenEdge. The WAR file contains the Mobile apps, MobAppA and MobAppB, and the Mobile services, ServiceA and ServiceB:
restgen -proj C:/MobileProject -MobSvcNames ServiceA:ServiceB -MobApps
MobAppA:MobAppB -target C:/OpenEdge/MobileProject.war -genMobAppWar