Deploying SampleRestAPI in WebLogic

If you plan to add an File Deployment with XML format in Gateway, and send data using a rest service, you will need to deploy the REST API in WebLogic. A REST API called SampleRestAPI is delivered with Primavera Gateway. For demonstration purposes, deploy SampleRestAPI in WebLogic, preferably in a separate domain.

  1. Ensure the Primavera Gateway domain is running.
  2. Sign in to the WebLogic Administration Server Console for the Gateway domain:
    1. In a browser, enter the following location:

      http://<hostname>:<port>/console

      Where, hostname and port is the hostname and port of your Primavera Gateway domain in WebLogic. The default port is 7001.

    2. Enter the WebLogic administrator user name and password.
  3. In the Change Center pane, select Lock and Edit before you make any changes to the domain.
  4. Create a new WebLogic domain or use an existing domain on an Admin server or a Managed server.
  5. Deploy the SampleRestAPI as follows:
    1. In the Domain Structure pane, select Deployments.
    2. In the Summary of Deployments pane, in the Control tab, select Install.
    3. In the Install Application Assistant pane:
      1. Go to <Gateway_Home>/providers/fileprovider/samplerestapi/output folder.
      2. Select the fileprovidersamplerestapi.ear file.

        Note: Select Next on each screen to advance to the next step.

      3. Select Install this deployment as an application.
    4. Review the configuration settings you have chosen, then select Finish to complete the installation.

      The REST API is now deployed in WebLogic.

  6. Set the system properties for files to read from and to write to as follows:
    1. In the Domain Structure pane, select Servers.
    2. In the Servers pane, select the server where the REST API has been deployed.
    3. Select the Server Start tab.
    4. In the Arguments field, enter the following file locations:
      • -Dapi.data.read.global.path = <folder containing global data>/masterdata.xml
      • -Dapi.data.read.project.path = <folder containing the project data>/projectdata.xml
      • -Dapi.data.write.global.path = <folder containing the global data>/outmasterdata.xml
      • -Dapi.write.read.project.path = <folder containing the global data>/outprojectdata.xml

        Note: Ensure these files have already been created on the server.

    5. Select Save.
  7. In the Settings for <Gateway Domain Name> window, select Save.
  8. In the Domain Structure pane, select Activate Changes.
  9. Start the SampleRestAPI deployment.
  10. Proceed to setup the XML deployment in the Gateway user interface. For more details, see the Online Help.


Legal Notices | Your Privacy Rights
Copyright © 2013, 2021

Last Published Thursday, December 16, 2021