Skip to content

Commit

Permalink
Made the webserver URL configurable (closes #17)
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Nov 7, 2018
1 parent 868f8ba commit 3e98954
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!)
Expand Down
2 changes: 2 additions & 0 deletions org.wikipathways.client/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<property name="build.dir" value="build"/>

<property name="version" value="3.2.3"/>
<property name="wp.webserver" value="https://webservice.wikipathways.org"/>

<target name="prepare">
<delete dir="${build.dir}"/>
Expand Down Expand Up @@ -81,6 +82,7 @@
</javac>
<junit printsummary="on" haltonfailure="false" fork="true" dir=".">
<formatter type="xml" usefile="true"/>
<sysproperty key="wp.webserver" value="${wp.webserver}"/>
<classpath>
<pathelement path="${build.dir}"/>
<path refid="project.class.path"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 3e98954

Please sign in to comment.