2 questions of REST services deployment - Forum - OpenEdge Deployment - Progress Community

2 questions of REST services deployment

 Forum

2 questions of REST services deployment

This question is answered

Hi,

1. Exporting REST service in PDSOE there are 2 options: export WAR or zip incrementially? Is it any guideline which one use in what case?

2. In WAR (ZIP) file there are no source files (.cls, .i). What to do to deploy the service on the other machine?

I'd appreciate your help...

Verified Answer
  • Hi Marekk,
     
    You would export as a WAR file when you have finished the development of the REST Application in PDS OE and want to deploy it in a production environment.
     
    The WAR file thus exported is a full web application that can be deployed in Tomcat’s webapp folder.
     
    If you export as a .zip file, it just contains the .paar files for selected services that can be deployed in an existing web application that’s already deployed in a Tomcat. And thus the name ‘incremental’.
     
    The WAR(ZIP) contains artefacts that you deploy in the Tomcat, and thus there are no .cls, .i files in it. You can export a .WAR, make copies of it and deploy it Tomcat running of other machines.
     
    HTH,
    Navneet
     
  • In 11.6.3+ we do add ABL artifacts into the WAR from WEB-INF/openedge.
     
    The intent when generating a WAR is that it’s a prod/deployment archive and you don’t really want to be running off source code in production.
     
  • Hello Marek,
     
    What Peter is mentioned is applicable only to ABL Web App projects, i.e. if you are using PAS OE server for your deployment, then you can create business logic files under either “<prj>/AppServer” or “<prj>/PASOEContent/WEB-INF/openedge” folders. If you create under “AppServer” folder, business logic won’t be part of exported WAR file. If you create under “openedge” folder business logic will be part of exported WAR file.
     
    If you are using classic servers (OE Web Server) then business logic won’t be part of your war file. You need to deploy it manually.
     
    Hope this helps,
    Sanjeev.
     
All Replies
  • Hi Marekk,
     
    You would export as a WAR file when you have finished the development of the REST Application in PDS OE and want to deploy it in a production environment.
     
    The WAR file thus exported is a full web application that can be deployed in Tomcat’s webapp folder.
     
    If you export as a .zip file, it just contains the .paar files for selected services that can be deployed in an existing web application that’s already deployed in a Tomcat. And thus the name ‘incremental’.
     
    The WAR(ZIP) contains artefacts that you deploy in the Tomcat, and thus there are no .cls, .i files in it. You can export a .WAR, make copies of it and deploy it Tomcat running of other machines.
     
    HTH,
    Navneet
     
  • Hi Navneet,

    Thank you for comprehensive and fast explanation!

    Kind regards,

    Marek

  • In 11.6.3+ we do add ABL artifacts into the WAR from WEB-INF/openedge.
     
    The intent when generating a WAR is that it’s a prod/deployment archive and you don’t really want to be running off source code in production.
     
  • Hi Peter. I am using 11.6.3. Does it mean in earlier versions WAR contained .r codes?

  • Hello Marek,
     
    What Peter is mentioned is applicable only to ABL Web App projects, i.e. if you are using PAS OE server for your deployment, then you can create business logic files under either “<prj>/AppServer” or “<prj>/PASOEContent/WEB-INF/openedge” folders. If you create under “AppServer” folder, business logic won’t be part of exported WAR file. If you create under “openedge” folder business logic will be part of exported WAR file.
     
    If you are using classic servers (OE Web Server) then business logic won’t be part of your war file. You need to deploy it manually.
     
    Hope this helps,
    Sanjeev.
     
  • Hi Sanjeev,

    Thanks a lot for your explanation. I have one more question regarding naming convention.

    In case I am using PAS OE the folder must be  “<prj>/AppServer”? In demo:

    www.progress.com/.../making-a-progress-openedge-application-available-as-a-rest-service

    the folder is  “<prj>src/AppServer”.

    Kind regards,

    Marek

  • Hi Marek,
     
    While creating project, If you choose “use separate src and r-code directories” option in “Select AVM and layout options” page then AppServer folder will be created under src folder. Otherwise AppServer folder will be created under project folder. In both the cases, files under AppServer folder will be published to instance’s OpenEdge folder.
     
    Hope this helps,
    Sanjeev.
     
  • Thanks again!

    Let me ask another question if you are so kind.

    If I want to expose ABL resources as REST service I must do that from ABL Web App project type or I can create OpenEdge project then add AppService folder, place classes there and do the rest (annotations, mapping etc)?

    Marek

  • Marek,
     
    You can rename the “AppServers” folder in the wizards. The field you care about is the “AppServer source folder” field. You can change that to be whatever you want.
     
     
  • Yes, Peter but when I create OpenEdge project the AppServer folder is not created automatically, right?

    It is created for ABL Web App, Dat Object, AppServer, REST project types...

    So, if I have OpenEdge Project of type: OpenEdge with ABL class and then I want to expose that class as REST service - can I just add AppServer folder and do the rest: annotations, mapping etc...

  • Hi Marek,
     
    Just adding AppServer folder won’t be sufficient. Required facets needs to be added to the normal OpenEdge project to convert it as Data Object/REST or ABL Web App. Each facet will give specific functionality to the project. There are different approaches to convert existing OpenEdge project to ABL Web App. Here are the different possibilities:

    -          By adding a Business Entity

    -          By adding Data Object Annotations

    -          By adding required facets manually from Project Properties (Required facets: ABL AppServer, ABL Data Object Service, ABL REST Service, ABL WebApp, OpenEdge , Progress Adapters)

     
    You can convert OpenEdge project to Data Object project by adding required Project Facets from Project Properties page. Here are the required facets for Data Object Project: AppServer, Data Object, JavaScript, OpenEdge, Progress Adapters, REST, Static Web Module.
     
    The AppServer facet will give the facility to deploy the code under AppServer module to servers.
     
    Hope this helps,
    Sanjeev.
     
  • Thanks Sanjeev. Such information is missing in the the demo, I mentioned above.

    (www.progress.com/.../making-a-progress-openedge-application-available-as-a-rest-service#sthash.AxHb5PKv.dpuf).

    In this demo it seems it is enough to expose the service by Define Service Interface for particular class file.

    Thanks again,

    Marek