This topic covers how to set up the WCP and WCP-WS web services. This is section 3 of the overall setup process covered in: FDA MyStudies: Technical Setup Document.
Prior to installation, the following setup is required:
The link below gives instructions for installing the JDK and JRE on Oracle Solaris, Windows, Linux, and OS X computers.
The link below will help you download and install Apache Tomcat and use many of the Apache Tomcat features
The link below explains how to install MySQL or upgrade an existing MySQL version to a newer version.
The link below will assist you in installing Maven
Source code for WCP application and Web Services is available at:
HPHC_My_Studies_DB_Create_Script.sql: This script file should be executed in MySQL. It is found inside the sqlscript folder at this path:
hphcAuditLogs: This folder should be created inside the server and the path should be configured inside application.properties for fda.logFilePath parameter.The template_application.properties file should be downloaded from the WCP folder of the GitHub MyStudies repository and renamed to application.properties and stored in the system/server. Make necessary changes in the file based on your application configuration. The file path is given below:
Changes in Tomcat Configuration File:Below are the changes required to the Tomcat context.xml file which can be found at:
<Parameter name="property_file_location_prop" value="/usr/local/" override="1"/>
<Parameter name="property_file_name" value="application" override="1"/>
<Parameter name="property_file_location_config" value="file://usr/local/application.properties" override="1"/>
<Parameter name="property_file_location_path" value="/usr/local/application.properties" override="1"/>
messageResource.properties: This file for web application is available at /src/main/resources folder inside the project directory. Make necessary changes in the file based on your application configuration.
authorizationResource.properties file for web services application can be found at /studyMetaData/src/main/resources folder inside project directory. These are the changes required:
{Unique Identifier}=android.apptoken #Unique Android identifier.
{android bundleid}=android.bundleid
{Unique Identifier}=ios.apptoken #Unique iOS identifier.
{iOS bundleid}=ios.bundleid
{Unique Identifier}=labkey.apptoken #unique LabKey response server identifier.
{LabKey Unique String}=labkey.bundleid
bundleID and AppToken are the security parameters used for communication between WCP-WS and other applications.
HPHC_My_Studies_DB_Create_Script.sql file can be found at https://github.com/FDA-MyStudies/WCP/tree/develop/sqlscript and update "your email address" text in HPHC_My_Studies_DB_Create_Script.sql file with the email id that you want to keep as super admin for WCP application. Use forgot password functionality to set a password.
To build the application(s), run the command given below from the project root folder(s):
mvn clean install
Once the build is successful, the .war files will be generated in the target folder. To deploy, copy these .war files and paste them inside the ‘webapps’ folder of the Tomcat installation path and restart the server.
If your StudyMetaData project is created with StudyMetaData-0.0.1-SNAPSHOT.war name, change the file name to StudyMetaData.war before deploying to the Tomcat webapps.
After deploying the builds, hit the following URLs to verify the application status:
Web application:
http://localhost:8080/fdahpStudyDesigner # NOTE: In place of localhost:8080, use your configuration.
Web services:
http://localhost:8080/StudyMetaData/ping # NOTE: In place of localhost:8080, use your configuration.
This will display “It Works!”
Continue with setup in the main document