Creating Rest API for File Provider for On-Premises
The source code of the SampleRestAPI is delivered in Primavera Gateway to enable you to use it as a template to create a rest api for the XML format of the File provider that supports the requirements of your organization. It is an alternative option to using the delivered SampleRestAPI.
Use the source code as a starting point to build a new REST API as follows:
- Download and install Primavera Gateway from the Oracle E-delivery Software Cloud.
- Go to <Primavera_Gateway_home>/providers/fileprovider/samplerestapi folder
- Locate the build.xml file.
- Execute:
ant clean warA new SampleRestAPI.war file is created in the <Primavera_Gateway_home>/providers/fileprovider/samplerestapi/output folder.
- Modify the source code in the XmlDataResource.java file as necessary, located in the <Primavera_Gateway_home>/providers/fileprovider/samplerestapi/projects/sampleapi/src/com/oracle/pgbu/sample/resources folder.
- Rebuild, deploy, and test the customized REST API.