This topic is under construction.

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.

3.1 Installation Required

Prior to installation, the following setup is required:

3.1.1 Java 8

The link below gives instructions for installing the JDK and JRE on Oracle Solaris, Windows, Linux, and OS X computers.

3.1.2 Tomcat 8

The link below will help you download and install Apache Tomcat and use many of the Apache Tomcat features

3.1.3 MySQL 5.6 or 5.7

The link below explains how to install MySQL or upgrade an existing MySQL version to a newer version.

3.1.4 Maven

The link below will assist you in installing Maven

3.1.5 Git Repository

Source code for WCP application and Web Services is available at:

3.2 Configuration

3.2.1 Initial Configuration

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 for fda.logFilePath parameter.
  • Example: fda.logFilePath=/usr/local/hphcAuditLogs/

3.2.2 Properties Files

The file should be downloaded from the WCP folder of the GitHub MyStudies repository and renamed to 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:

  • <tomcat installed path>/tomcat/conf/
Add these parameters in the context.xml file inside <context> tag.
<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/" override="1"/>
<Parameter name="property_file_location_path" value="/usr/local/" override="1"/> 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.

3.2.3 Bundle Id and App Token Settings 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.

  • bundleID: the unique identifier for the authentication of client applications (e.g., Android, iOS, LabKey response server).
  • AppToken: You have to create three AppTokens, one for each application, to communicate with WCP-WS. You need to create an AppToken, one each for Android, iOS, and the Response server, the three applications that communicate with the WCP-WS. Once the AppToken is created, all the communications will take place through this unique token. If a request originates from any other application, the authentication will fail.
  • Mobile web services communication should take place through the bundleID and AppToken.

3.2.4 Set Super Admin Email ID

HPHC_My_Studies_DB_Create_Script.sql file can be found at 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.

3.3 Build

To build the application(s), run the command given below from the project root folder(s):

mvn clean install

3.4 Deployment

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.

3.5 Test the Application(s)

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.
This will redirect you to the login page. Use forgot password to change the password for the email id you have provided in step 3.2.4 and use the new password to login into the application.

Web services:

http://localhost:8080/StudyMetaData/ping	# NOTE: In place of localhost:8080, use your configuration.

This will display “It Works!”

Next Steps

Continue with setup in the main document

Related Topics