Variations Web Services

The Variations Web Services are required to run the Variations Web UI and/or the Variations Access Manager.

The instructions below assume you are logged in as root.

Download the Variations Web Services war file.
To download the file,

Installation

First copy the war to tomcat's webapp directory:

cp variations-ws-server.war /usr/share/tomcat6/webapps/

Then copy needed files outside of the webapp directory:

mkdir /usr/share/tomcat6/conf/variations-ws-server/
cp /usr/share/tomcat6/webapps/variations-ws-server/WEB-INF/conf/config.xml /usr/share/tomcat6/conf/variations-ws-server/
cp /usr/share/tomcat6/webapps/variations-ws-server/WEB-INF/conf/accessPolicy-ws.xml /usr/share/tomcat6/conf/variations-ws-server/

Configuration

config.xml

This is the main configuration file for the Variations Web Services.

For each web service, a manager connects to a Variations server as a super-user to read and update data. Configure each manager with the appropriate url to your Variations server and the superuser authentication username (protocol and principal) and password:

<repository>
        <type>variations</type>
        <url>//example.example.edu:1099/EXAMPLE</url>
        <username>superuser@example.edu</username>
        <password>password</password>
</repository>

For the Metadata web service, you also need to supply the prefix to your OPAC (this is the same as the dml.client.url.catalog system property in your /home/dmlserv/conf/server/dmlserver.xml) as well as replace the hostname in the bibinfo url:

<opacurl>http://purl.dlib.indiana.edu/iudl/iucat/</opacurl>
<bibinfourl>http://example.example.edu/variations-ws-server/bibinfo</bibinfourl>

An authentication web service operates to allow restricted access to non-public recordings through the web player and for authentication to the access manager. Configure this authentication proxy by setting the appropriate url to your Variations server along with the realm used by the Variations server:

<authenticationproxy>
        <type>variations</type>
        <url>//example.example.edu:1099/EXAMPLE</url>
        <realm>iu.edu</realm>
</authenticationproxy>

If you have the Variations server installed in a place other than /home/dmlserv or tomcat installed in a place other than /usr/local/tomcat, then you will need to adjust paths for access control policies, access pages, and the variations2.dir system property.

WEB-INF/accessPolicy-ws.xml

This configuration file manages the access policy for the Web Services and only needs to be modified if you want to implement IP-based access.

WEB-INF/web.xml

If you prefer to keep config.xml of the variations-ws-server at a different location, then edit configPath in WEB-INF/web.xml:

<context-param>
       	<param-name>configPath</param-name>
       	<param-value>${catalina.home}/conf/variations-ws-server/config.xml</param-value>
</context-param>

WEB-INF/classes/log4j.properties

If you prefer to keep the log files outside of tomcat's log directory, then edit the following line in WEB-INF/classes/log4j.properties:

log4j.appender.A1.File=${catalina.home}/logs/variations-ws-server.log

Restart and Test

Once all configuration has been done, then restart tomcat: sudo /etc/init.d/tomcat6 restart

Check that the webapp has loaded properly by browsing to http://webserver.example.edu/variations-ws-server/metadata/145587where webserver.example.edu is replaced by the fully-qualified domain name of your Variations web server.

Note that the first time you try this URL, you may have to accept a security certificate and enter the user name and password you specified with the wsconsumer role in /etc/tomcat6/tomcat-users.xml. The URL should return an xml document with metadata for a recording (you may have to view the page source to see the full document depending on how your browser displays xml).