From 3e989543ca7b29842f4c88663b6a9dac3b2bfdf6 Mon Sep 17 00:00:00 2001 From: Egon Willighagen Date: Wed, 7 Nov 2018 11:47:38 +0100 Subject: [PATCH] Made the webserver URL configurable (closes #17) --- README.md | 14 ++++++++++++++ org.wikipathways.client/build.xml | 2 ++ .../client/test/utils/ConnectionSettings.java | 5 +++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b5ad033..8484ae2 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,20 @@ The old SOAP webservice will be discontinued in the near future (spring 2015) an Be aware that update and upload functionality provide special permissions that need to be requested before using those webservice functions. +Compile the code and run the tests with: + +``` +cd org.wikipathways.client +ant test +``` + +If you want to use a different web service, use (for example): + +``` +cd org.wikipathways.client +ant -Dwp.webserver=http://otherservice.wikipathways.org test +``` + ### TODO - [x] set up automated testing framework on Jenkins (https://jenkins.bigcat.unimaas.nl/view/WikiPathways/job/WikiPathways%20REST%20Java%20library/) - [ ] detailed documentation (JavaDoc!) diff --git a/org.wikipathways.client/build.xml b/org.wikipathways.client/build.xml index 109aa44..7551711 100644 --- a/org.wikipathways.client/build.xml +++ b/org.wikipathways.client/build.xml @@ -8,6 +8,7 @@ + @@ -81,6 +82,7 @@ + diff --git a/org.wikipathways.client/test/org/wikipathways/client/test/utils/ConnectionSettings.java b/org.wikipathways.client/test/org/wikipathways/client/test/utils/ConnectionSettings.java index 8bfa73c..03ce69a 100644 --- a/org.wikipathways.client/test/org/wikipathways/client/test/utils/ConnectionSettings.java +++ b/org.wikipathways.client/test/org/wikipathways/client/test/utils/ConnectionSettings.java @@ -22,8 +22,9 @@ public class ConnectionSettings { public static WikiPathwaysClient createClient() throws Exception { - URL url = new URL("https://webservice.wikipathways.org"); -// URL url = new URL("https://rcbranch.wikipathways.org/wpi/webservicetest"); + URL url = new URL( + System.getProperty("wp.webserver", "https://webservice.wikipathways.org") + ); return new WikiPathwaysClient(url); } }