ICAT Clients Installation

Note that the setup script only installs the Python client as there is no standard place to install jar files.

Installation of python client using the setup script

The setup script makes use of the pip program. Recent versions of the pip program will, if you don't run as root, install to a local area. Typically you will want to install for everyone so you should normally run the script as root. Please follow the generic installation instructions If you have problems then try running pip install *.whl from the unpacked distribution directory.

Compatibility

For full functionality you need an icat.server version 4.8.0 or greater. The restful clients will work with earlier releases of the icat.server except that individual calls will fail if not supported by the server. The SOAP interface will work with icat.server 4.7.0 and 4.8.0

Prerequisites

  • The icat client distribution: icat.client-4.9.0-SNAPSHOT-HIDE-distro.zip
  • A deployed icat server. This is not necessary for deployment but it will be required subsequently to use the client.
  • Python (version 2.4 to 2.7)
  • pip. It is suggested that you use the pip version provided by your OS distribution though it's unlikely to be the latest.

Check that it works

If the server is secure then the following, after possibly produce a warning message about an unverified https request, will print a version string for the server:

echo 'import icat;print icat.ICAT("https://<hostname>:8181", False).getVersion()' | python

If insecure then the following should produce the version string.

echo 'import icat;print icat.ICAT("http://<hostname>:8080").getVersion()' python

In case of problems look in the server.log and the icat.log in the logs directory of your icat server.

Java clients

There are two files that should be made available to those wishing to use the ICAT client:

icat.client-4.9.0-SNAPSHOT-HIDE.jar
the client library which the user should add to the classpath.
icat.client-4.9.0-SNAPSHOT-HIDE-sources.jar
the source code of the client, which is especially useful when developing within an IDE.

Using the Java client from maven

It is expected that most people will express their dependency upon the icat.client by means of a maven pom file. To do this the user needs to define the repository and express the dependency as indicated in the snippet below:

<repositories>
   <repository>
      <id>ICAT Repo</id>
      <url>http://www.icatproject.org/mvn/repo</url>
      <snapshots>
         <enabled>false</enabled>
      </snapshots>
   </repository>
   ...
</repositories>

<dependencies>
   <dependency>
      <groupId>org.icatproject</groupId>
      <artifactId>icat.client</artifactId>
      <version>4.9.0-SNAPSHOT-HIDE</version>
   </dependency>

   <dependency>
      <groupId>org.glassfish</groupId>
      <artifactId>javax.json</artifactId>
      <version>1.0.4</version>
   </dependency>
   ...
</dependencies>