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.
- Ensure the Primavera Gateway domain is running.
- Sign in to the WebLogic Administration Server Console for the Gateway domain:
- 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.
- Enter the WebLogic administrator user name and password.
- In a browser, enter the following location:
- In the Change Center pane, select Lock and Edit before you make any changes to the domain.
- Create a new WebLogic domain or use an existing domain on an Admin server or a Managed server.
- Deploy the SampleRestAPI as follows:
- In the Domain Structure pane, select Deployments.
- In the Summary of Deployments pane, in the Control tab, select Install.
- In the Install Application Assistant pane:
- Go to <Gateway_Home>/providers/fileprovider/samplerestapi/output folder.
- Select the fileprovidersamplerestapi.ear file.
Note: Select Next on each screen to advance to the next step.
- Select Install this deployment as an application.
- Review the configuration settings you have chosen, then select Finish to complete the installation.
The REST API is now deployed in WebLogic.
- Set the system properties for files to read from and to write to as follows:
- In the Domain Structure pane, select Servers.
- In the Servers pane, select the server where the REST API has been deployed.
- Select the Server Start tab.
- 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.
- Select Save.
- In the Settings for <Gateway Domain Name> window, select Save.
- In the Domain Structure pane, select Activate Changes.
- Start the SampleRestAPI deployment.
- Proceed to setup the XML deployment in the Gateway user interface. For more details, see the Online Help.