The EPR PPQ Repository MockUp is a SoapUI webservice (mock) that provides Privacy Policy Query Service.
git clone https://gitlab.inria.fr/gazelle/specific-tools/epr/ppq-repository.git $EPR_PPQ_MOCK_DIR
Copy the external jars (esapi, velocity and postgresql)
cp $EPR_PPQ_MOCK_DIR/external_jar/esapi-2.1.0.1.jar $SOAPUI_INSTALL_DIR/lib/
cp $EPR_PPQ_MOCK_DIR/external_jar/velocity-1.7.jar $SOAPUI_INSTALL_DIR/lib/
cp $EPR_PPQ_MOCK_DIR/external_jar/postgresql-9.3-1102.jdbc4.jar $SOAPUI_INSTALL_DIR/lib/
Database is not mandatory, but if not configured, it will raise log errors for each recieving request. The Database is shared with the ADR Provider Mock project. Schema and data import are then in ADR Provider mock project.
psql -U gazelle postgres
> CREATE DATABASE "adr" OWNER gazelle ;
> \q
psql -U gazelle adr < $EPR_ADR_MOCK_DIR/sql/adr_schema_data_1.9.sql
Edit the init.d script $EPR_PPQ_MOCK_DIR/init.d/ppqRepositoryMock
and set the following environment variables
Type the following commands register the init.d script as service
sudo cp $EPR_PPQ_MOCK_DIR/init.d/ppqRepositoryMock /etc/init.d/ppqRepositoryMock
sudo chmod u+x /etc/init.d/ppqRepositoryMock
sudo chmod 775 /etc/init.d/ppqRepositoryMock
If you want the service to start at each machine start up
sudo update-rc.d ppqRepositoryMock defaults
Be careful to allow the service to write logs into your target directory. As example
sudo mkdir /var/log/soapui
sudo chmod 775 /var/log/soapui
To run the mock
sudo /etc/init.d/ppqRepositoryMock start
To stop the mock
sudo /etc/init.d/ppqRepositoryMock stop
To get status of the mock
sudo /etc/init.d/ppqRepositoryMock status
You might need to install those following packets
sudo apt-get install -y libxrender1 libxtst6 libxi6
You might need to resolve errors when starting the mock
sudo mv /root/.soapuios/ /root/.soapuios_old