Build a local uLookup installation - KostasMparmparousis/uLookup GitHub Wiki

  1. Install the required packages.
sudo apt-get install openjdk-11-jdk git tar maven
  1. Download a IDE of your choice ( NetBeans thus far has been the most reliable ).
  2. Clone the uLookup repository.
git clone https://github.com/KostasMparmparousis/uLookup.git
  1. Create the directories where uLookup is meant to look for connectors, authentication tokens, and persistence files.
sudo mkdir -p /etc/v_vd/
sudo mkdir -p /etc/v_vd/conn
sudo mkdir -p /etc/v_vd/tokens
sudo mkdir -p /opt/uLookup/
mkdir -p uLookup/source_code/
mkdir -p uLookup/deployment/
mkdir -p uLookup/testing/
mkdir -p uLookup/source_code/src/main/resources/META-INF
mkdir -p uLookup/source_code/logs/
  1. Untar the compressed folder you were given.
tar xvzf uLookupFiles.tar.gz
  1. Copy and paste the files to their corresponding directory in your filesystem. When its all said and done, your filesystem should look something like this.
/etc/v_vd/

├── conn
│   ├── institution_name.properties (SIS connection file)
│   ├── institution_name_hrms.properties (HRMS connection file)
│   ├── institution_name_hrms2.properties (ELKE connection file)
│   ├── institution_name_ds.properties (DS connection file)

/opt/uLookup/
├── log4j.properties

├── tokens
│   ├── webAccessKey 
│   ├── apiAccessKey 

~/uLookup/souce_code/src/main/resources/META-INF
├── persistence.xml
  1. Open your IDE and load the project.
  2. Right click your project and select the Properties tab.

  1. Make sure that JDK 11 is the Java Platform used for compiling. If it's not already selected, add the jdk that you installed earlier, which will most probably be available at the /usr/lib/jvm/ directory in your filesystem.

  2. You must also include the following parameters to your run.

java -jar uLookup.jar -i institution_name -m local
  1. Before running the application, you should:
  • Clean (deletes the "target" directory, if it has been generated)
  • Build with Dependencies (downloads all the jars necessary for the application to operate. The dependencies/jars needed are defined in the pom.xml file)
  1. Run uLookup. The service will be available to access via its UI with the browser of your choice (http://localhost:4567/) and via the API. The following are some example calls of the API
----------------------------------VALIDATOR---------------------------------------------

No conflicts

curl -H "Content-Type:application/json" -H "Authorization: Basic apiAccessKey" -X POST --data '{"ssn":"12312312312", "ssnCountry":"GR", "tin":"011111111", "tinCountry":"GR", "birthDate":"19770823", "loginName":"gunetdemo", "verbose":true }' "http://localhost:4567/validator/"

Conflicts found

curl  -H "Content-Type:application/json" -H "Authorization: Basic apiAccessKey" -X POST --data '{"ssn":"12312312313", "ssnCountry":"GR", "tin":"011111111", "tinCountry":"GR", "birthDate":"19770823", "loginName":"gunetdemo", "verbose":true }' "http://localhost:4567/validator/"


----------------------------------PROPOSER---------------------------------------------

curl  -H "Content-Type:application/json" -H "Authorization: Basic apiAcessKey" -X POST --data '{ "ssn":"12312312312", "ssnCountry":"GR",  "firstName":"kostas", "lastName":"mparmparousis"  }' "http://localhost:4567/proposer/"


----------------------------------FINDER---------------------------------------------
curl  -H "Content-Type:application/json" -H "Authorization: Basic apiAccessKey" -X POST --data '{ "loginName": "gunetdemo"  }' "http://localhost:4567/finder/"