Salesforce

How to get the .war file without PDSOE export option?

« Go Back

Information

 
TitleHow to get the .war file without PDSOE export option?
URL NameHow-to-get-the-war-file-without-PDSOE
Article Number000178140
EnvironmentProduct: OpenEdge
Version: 11.6.x, 11.7.x
OS: Windows
Other: REST Service
Question/Problem Description
How to to create a war file for REST Service without using PDSOE export option and/or without interacting with PDSOE?
Steps to Reproduce
Clarifying Information
- How to export the project and REST Service from command line?
- How to generate the .war file from command line as PDSOE does with export option?
- How to deploy from command line a REST Service for PASOE?
Error Message
Defect Number
Enhancement Number
Cause
Resolution

Generating a .war file with the PDSOE project won't include all details to deploy a simple REST Service from command line, the next steps will show how to deploy a REST Service from command line after the REST Service is being created using PDSOE:

1) Make sure that REST artifacts are available in PDSOE project. i.e., ABL Web app with a REST Service in it.
 
2) Navigate to project (PASOEContent) directory from Proenv and generate a war file as below (For this example a deployThis PDSOE application and a deplpyThisService  are used:

proenv>%DLC%\jdk\bin\jar -cvf deployThis.war .

** After this step a war file with name deployThis will be created in the directory.

3) Generate .paar file as below:

proenv>restgen -proj C:\workspace\<project name> -restSvcNames <REST Service Name> -target paarFile.war -genPaar

For example: 
restgen -proj C:\workspace\deployThis  -restSvcNames  deployThisService  -target paarFile.war -genPaar
- where the -restSvcNames parameter value is the name of the service as defined in the PDSOE project.

After this step  a .paar file within a .war file is created in specified location (by default is in the working directory)

4) On the server in proenv navigate to oepas1\bin directory and deploy the .war file created in step 2 to PASOE instance as below:

- start PASOE instance:

proenv>tcman start

- Deploy .war file

proenv>tcman deploy -a DeployThisService deployThis.war

** use tcman.bat for Windows ot tcman.sh for Unix/Linux

After this step the .war file gets deployed to oepas1 (or specific PASOE) instance

5) Extract the paar file from the .war file created in step 3 and deploy the paar file.

- Extract it using jar:

proenv> %DLC%\jdk\bin\jar -xvf deploythis.war WEB-INF\adapters\deployThisService\deployThisService.paar

.paar file will be located in folder WEB-INF\adapters\deployThisService

- Copy .paar file to server and deploy it as follows:

proenv>deployREST deplyThisService.paar" deployThis


6) Enable the Web Application using tcman and restart PASOE 

proenv> tcman enable -u user:password <webapp-name>

For example: 
proenv> tcman enable -u tomcat:pwd deployThis

7) Restart PASOE instance 
 



In a Production mode PASOE instance the deployment could be done on-line without restarting the PASOE  instance. The following steps have to be followed:

a)  For deploying the .war  (See Step 4 above), add -l (lowercase L) and -u parameters ot the command described in Step 4. For example::

proenv> tcman deploy -l -u tomcat:tomcat  -a DeployThisService deployThis.war

-u parameter is your tomcat manager user and password. In the example is using the default values.

b) Set  psc.as.autodeploy property to true in PASOE/conf/catalina.properties, the web application and service will be enabled after deploying without restarting. 

psc.as.autodeploy=true

Run tcman to deploy without the -l and -u parameter:

proenv> tcman deploy -a DeployThisService deployThis.war


- After running Step 5 above, in a Production mode PASOE instance, transports are not enabled by default for security. Use oeprop to enable each Transport as shown below:

oeprop.[sh|bat] instance-name.ablwebapp-name.APSV.adapterEnabled = 0|1
oeprop.[sh|bat] instance-name.ablwebapp-name.REST.adapterEnabled = 0|1
oeprop.[sh|bat] instance-name.ablwebapp-name.SOAP.adapterEnabled = 0|1
oeprop.[sh|bat] instance-name.ablwebapp-name.WEB.adapterEnabled   = 0|1

For example:
proenv> oeprop DeployPASOE.RestProject.REST.adapterEnabled=1

- Disable and Enable Web application using tcman enable|disable:

For example: 
proenv> tcman disable -u tomcat:tomcat RestProject
proenv> tcman enable -u tomcat:tomcat RestProject


Notes:

- Step 6 and 7 above don't have to be executed in a Production mode PASOE instance if psc.as.autodeploy property is set to true in PASOE/conf/catalina.properties or if the -l and -u parameters are used with the tcman command, the web application and Service will be enabled after deploying without restarting. 

- The code is not deployed (check article 000060753) and also any required security is not fully configured with the above steps. 

Workaround
Notes
References to Other Documentation:
OpenEdge Application server: Administration, Appendix B: Command and Utility Reference, "RESTGEN".
Overview of Progress Application Server for OpenEdge : References : Using Apache Ant tasks : Packaging an ABL Web App project

Progress Article(s):
 How to deploy ABL application r-code to Progress Appserver PASOE?
 After deploying with tcman a web app in PASOE a FAIL message is reported
Keyword Phrase
Last Modified Date1/20/2021 7:15 AM

Powered by