You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by st...@apache.org on 2015/02/23 16:37:03 UTC

[03/49] incubator-taverna-server git commit: taverna-* module names

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/resources/static/ui-bg_diagonals-small_25_c5ddfc_40x40.png
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/resources/static/ui-bg_diagonals-small_25_c5ddfc_40x40.png b/taverna-server-webapp/src/main/resources/static/ui-bg_diagonals-small_25_c5ddfc_40x40.png
new file mode 100644
index 0000000..c664c51
Binary files /dev/null and b/taverna-server-webapp/src/main/resources/static/ui-bg_diagonals-small_25_c5ddfc_40x40.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/resources/static/ui-bg_diagonals-thick_20_e69700_40x40.png
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/resources/static/ui-bg_diagonals-thick_20_e69700_40x40.png b/taverna-server-webapp/src/main/resources/static/ui-bg_diagonals-thick_20_e69700_40x40.png
new file mode 100644
index 0000000..6aed97a
Binary files /dev/null and b/taverna-server-webapp/src/main/resources/static/ui-bg_diagonals-thick_20_e69700_40x40.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/resources/static/ui-bg_diagonals-thick_22_1484e6_40x40.png
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/resources/static/ui-bg_diagonals-thick_22_1484e6_40x40.png b/taverna-server-webapp/src/main/resources/static/ui-bg_diagonals-thick_22_1484e6_40x40.png
new file mode 100644
index 0000000..43ba34e
Binary files /dev/null and b/taverna-server-webapp/src/main/resources/static/ui-bg_diagonals-thick_22_1484e6_40x40.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/resources/static/ui-bg_diagonals-thick_26_2293f7_40x40.png
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/resources/static/ui-bg_diagonals-thick_26_2293f7_40x40.png b/taverna-server-webapp/src/main/resources/static/ui-bg_diagonals-thick_26_2293f7_40x40.png
new file mode 100644
index 0000000..68306d1
Binary files /dev/null and b/taverna-server-webapp/src/main/resources/static/ui-bg_diagonals-thick_26_2293f7_40x40.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/resources/static/ui-bg_flat_0_e69700_40x100.png
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/resources/static/ui-bg_flat_0_e69700_40x100.png b/taverna-server-webapp/src/main/resources/static/ui-bg_flat_0_e69700_40x100.png
new file mode 100644
index 0000000..f567c28
Binary files /dev/null and b/taverna-server-webapp/src/main/resources/static/ui-bg_flat_0_e69700_40x100.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/resources/static/ui-bg_flat_0_e6b900_40x100.png
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/resources/static/ui-bg_flat_0_e6b900_40x100.png b/taverna-server-webapp/src/main/resources/static/ui-bg_flat_0_e6b900_40x100.png
new file mode 100644
index 0000000..5c5494f
Binary files /dev/null and b/taverna-server-webapp/src/main/resources/static/ui-bg_flat_0_e6b900_40x100.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/resources/static/ui-bg_highlight-soft_100_f9f9f9_1x100.png
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/resources/static/ui-bg_highlight-soft_100_f9f9f9_1x100.png b/taverna-server-webapp/src/main/resources/static/ui-bg_highlight-soft_100_f9f9f9_1x100.png
new file mode 100644
index 0000000..9a46d19
Binary files /dev/null and b/taverna-server-webapp/src/main/resources/static/ui-bg_highlight-soft_100_f9f9f9_1x100.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/resources/static/ui-bg_inset-hard_100_eeeeee_1x100.png
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/resources/static/ui-bg_inset-hard_100_eeeeee_1x100.png b/taverna-server-webapp/src/main/resources/static/ui-bg_inset-hard_100_eeeeee_1x100.png
new file mode 100644
index 0000000..f811f30
Binary files /dev/null and b/taverna-server-webapp/src/main/resources/static/ui-bg_inset-hard_100_eeeeee_1x100.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/resources/static/ui-icons_0a82eb_256x240.png
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/resources/static/ui-icons_0a82eb_256x240.png b/taverna-server-webapp/src/main/resources/static/ui-icons_0a82eb_256x240.png
new file mode 100644
index 0000000..755fe99
Binary files /dev/null and b/taverna-server-webapp/src/main/resources/static/ui-icons_0a82eb_256x240.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/resources/static/ui-icons_0b54d5_256x240.png
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/resources/static/ui-icons_0b54d5_256x240.png b/taverna-server-webapp/src/main/resources/static/ui-icons_0b54d5_256x240.png
new file mode 100644
index 0000000..98705f9
Binary files /dev/null and b/taverna-server-webapp/src/main/resources/static/ui-icons_0b54d5_256x240.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/resources/static/ui-icons_5fa5e3_256x240.png
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/resources/static/ui-icons_5fa5e3_256x240.png b/taverna-server-webapp/src/main/resources/static/ui-icons_5fa5e3_256x240.png
new file mode 100644
index 0000000..3f67eca
Binary files /dev/null and b/taverna-server-webapp/src/main/resources/static/ui-icons_5fa5e3_256x240.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/resources/static/ui-icons_fcdd4a_256x240.png
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/resources/static/ui-icons_fcdd4a_256x240.png b/taverna-server-webapp/src/main/resources/static/ui-icons_fcdd4a_256x240.png
new file mode 100644
index 0000000..de76ce2
Binary files /dev/null and b/taverna-server-webapp/src/main/resources/static/ui-icons_fcdd4a_256x240.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/resources/static/ui-icons_ffffff_256x240.png
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/resources/static/ui-icons_ffffff_256x240.png b/taverna-server-webapp/src/main/resources/static/ui-icons_ffffff_256x240.png
new file mode 100644
index 0000000..42f8f99
Binary files /dev/null and b/taverna-server-webapp/src/main/resources/static/ui-icons_ffffff_256x240.png differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/resources/version.properties
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/resources/version.properties b/taverna-server-webapp/src/main/resources/version.properties
new file mode 100644
index 0000000..7ddb7d3
--- /dev/null
+++ b/taverna-server-webapp/src/main/resources/version.properties
@@ -0,0 +1,5 @@
+# What is the version of the server? Bind this in automatically.
+tavernaserver.version=${project.version}
+tavernaserver.revision.describe=${git.commit.id.describe}
+tavernaserver.branch=${git.branch}
+tavernaserver.timestamp=${git.build.time}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/resources/welcome.html
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/resources/welcome.html b/taverna-server-webapp/src/main/resources/welcome.html
new file mode 100644
index 0000000..f80da4a
--- /dev/null
+++ b/taverna-server-webapp/src/main/resources/welcome.html
@@ -0,0 +1,122 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Taverna Server %{VERSION}</title>
+</head>
+<body>
+<h1>Taverna Server %{VERSION}</h1>
+<div style="text-align;center">
+	<p>
+		<i>Note that this is a pre-release version. Significant known
+			issues remain open and it is not guaranteed that the service API
+			will be stable.</i>
+	</p>
+</div>
+<p>For a full list of operations, see the <a
+    href="%{BASEURL}/services">service listing</a> generated by Apache
+CXF, which indicates where to access the WSDL and WADL descriptions of
+the T2Server interface.</p>
+<p>What follows below is a simple guide to using the server. It does
+<i>not</i> cover all the features; a much more extensive guide is available on
+<a href="http://www.mygrid.org.uk/dev/wiki/display/taverna/Taverna+Server+2.4"
+>the myGrid website</a>.</p>
+<h2>5 Minute Guide to Using the REST API</h2>
+<p>Taverna Server %{VERSION} supports both REST and SOAP APIs; you may use either API
+to access the service and any of the workflow runs hosted by the service. This
+simple guide just discusses the REST API.</p>
+<ol>
+  <li>
+  <p>The client starts by creating a workflow run. This is done by POSTing a
+  T2flow document to the service at the address <tt>%{BASEURL}/rest/runs</tt>
+  with the content type <tt>application/vnd.taverna.t2flow+xml</tt>.</p>
+  <p>The result of the POST is an <tt>HTTP 201 Created</tt> that gives the
+  location of the created run (in a <tt>Location</tt> header),
+  <tt>%{BASEURL}/rest/runs/<b>UUID</b></tt> (where <tt><b>UUID</b></tt> is a
+  unique string that identifies the particular run; this is also the name of
+  the run that you would use in the SOAP interface). Note that the run is not
+  yet actually doing anything.</p>
+  </li>
+  <li>
+  <p>Next, you need to set up the inputs to the workflow ports. To set the
+  input port, <tt><b>FOO</b></tt>, to have the value <tt><b>BAR</b></tt>, you
+  would PUT a message like this to the URI
+  <tt>%{BASEURL}/rest/runs/<b>UUID</b>/input/input/<b>FOO</b></tt>
+  </p>
+  <blockquote><pre>&lt;t2sr:runInput xmlns:t2sr=&quot;http://ns.taverna.org.uk/2010/xml/server/rest/&quot;&gt;
+    &lt;t2sr:value&gt;<b>BAR</b>&lt;/t2sr:value&gt;
+&lt;/t2sr:runInput&gt;</pre></blockquote>
+  </li>
+  <li>
+  <p>Now you can start the file running. This is done by using a PUT to set
+  <tt>%{BASEURL}/rest/runs/<b>UUID</b>/status</tt> to the plain text value
+  <tt>Operating</tt>.</p>
+  </li>
+  <li>
+  <p>Now you need to poll, waiting for the workflow to finish. To discover the
+  state of a run, you can (at any time) do a GET on
+  <tt>%{BASEURL}/rest/runs/<b>UUID</b>/status</tt>; when the workflow has
+  finished executing, this will return <tt>Finished</tt> instead of
+  <tt>Operating</tt> (or <tt>Initialized</tt>, the starting state).</p>
+  </li>
+  <li>
+  <p>Every workflow run has an expiry time, after which it will be destroyed
+  and all resources (i.e., local files) associated with it cleaned up. By
+  default in this release, this is 20 minutes after initial creation. To see
+  when a particular run is scheduled to be disposed of, do a GET on
+  <tt>%{BASEURL}/rest/runs/<b>UUID</b>/expiry</tt>; you may set the time when
+  the run is disposed of by PUTting a new time to that same URI. Note that
+  this includes not just the time when the workflow is executing, but also
+  when the input files are being created beforehand and when the results are
+  being downloaded afterwards; you are advised to make your clients regularly
+  advance the expiry time while the run is in use.</p>
+  </li>
+  <li>
+  <p>The outputs from the workflow are files created in the <tt>out</tt>
+  subdirectory of the run's working directory. The contents of the
+  subdirectory can be read by doing a GET on
+  <tt>%{BASEURL}/rest/runs/<b>UUID</b>/wd/out</tt> which will return an XML
+  document describing the contents of the directory, with links to each of the
+  files within it. Doing a GET on those links will retrieve the actual created
+  files (as uninterpreted binary data).</p>
+  <p>Thus, if a single output <tt><b>FOO.OUT</b></tt> was produced from the
+  workflow, it would be written to the file that can be retrieved from
+  <tt>%{BASEURL}/rest/runs/<b>UUID</b>/wd/out/<b>FOO.OUT</b></tt> and the
+  result of the GET on <tt>%{BASEURL}/rest/runs/<b>UUID</b>/wd/out</tt> would
+  look something like this:</p>
+  <blockquote><pre>&lt;t2sr:directoryContents xmlns:xlink="http://www.w3.org/1999/xlink"
+        xmlns:t2sr="http://ns.taverna.org.uk/2010/xml/server/rest"
+        xmlns:t2s="http://ns.taverna.org.uk/2010/xml/server/"&gt;
+    &lt;t2s:file xlink:href="%{BASEURL}/rest/runs/<b>UUID</b>/wd/out/<b>FOO.OUT</b>"
+            t2sr:name="<b>FOO.OUT</b>"&gt;out/<b>FOO.OUT</b>&lt;/t2s:file&gt;
+&lt;/t2sr:directoryContents&gt;</pre></blockquote>
+  </li>
+  <li>
+  <p>The standard output and standard error from the T2 Command Line Executor
+  subprocess can be read via properties of the special I/O listener. To do
+  that, do a GET on
+  <tt>%{BASEURL}/rest/runs/<b>UUID</b>/listeners/io/properties/<b>stdout</b></tt>
+  (or <tt>.../<b>stderr</b></tt>). Once the subprocess has finished executing,
+  the I/O listener will provide a third property containing the exit code of
+  the subprocess, called <tt>exitcode</tt>.</p> <p>Note that the supported set
+  of listeners and properties will be subject to change in future versions of
+  the server, and should not be relied upon.</p>
+  </li>
+  <li>
+  <p>Once you have finished, destroy the run by doing a DELETE on
+  <tt>%{BASEURL}/rest/runs/<b>UUID</b></tt>. Once you have done that, none of
+  the resources associated with the run (including both input and output
+  files) will exist any more. If the run is still executing, this will also
+  cause it to be stopped.</p>
+  </li>
+</ol>
+<p>All operations described above have equivalents in the
+<a href="%{BASEURL}/soap?wsdl">SOAP service interface</a>.</p>
+
+<div>
+<hr>
+<p><small>Copyright &copy; 2010&ndash;2014. The University of Manchester.</small></p>
+<p><small>Software Release ID: ${project.version} (commit: ${git.branch})</small></p>
+</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/webapp/META-INF/MANIFEST.MF
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/webapp/META-INF/MANIFEST.MF b/taverna-server-webapp/src/main/webapp/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..5e94951
--- /dev/null
+++ b/taverna-server-webapp/src/main/webapp/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/webapp/META-INF/cxf/org.apache.cxf.Logger
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/webapp/META-INF/cxf/org.apache.cxf.Logger b/taverna-server-webapp/src/main/webapp/META-INF/cxf/org.apache.cxf.Logger
new file mode 100644
index 0000000..4fd9372
--- /dev/null
+++ b/taverna-server-webapp/src/main/webapp/META-INF/cxf/org.apache.cxf.Logger
@@ -0,0 +1 @@
+org.apache.cxf.common.logging.Log4jLogger

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/webapp/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/webapp/META-INF/persistence.xml b/taverna-server-webapp/src/main/webapp/META-INF/persistence.xml
new file mode 100644
index 0000000..afd640a
--- /dev/null
+++ b/taverna-server-webapp/src/main/webapp/META-INF/persistence.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="1.0"
+	xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd ">
+	<persistence-unit name="TavernaServer">
+		<class>org.taverna.server.master.WebappState</class>
+		<class>org.taverna.server.master.identity.User</class>
+		<class>org.taverna.server.master.localworker.PersistedState</class>
+		<class>org.taverna.server.master.notification.atom.Event</class>
+		<class>org.taverna.server.master.usage.UsageRecord</class>
+		<class>org.taverna.server.master.worker.RunConnection</class>
+		<exclude-unlisted-classes>true</exclude-unlisted-classes>
+	</persistence-unit>
+</persistence>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/webapp/WEB-INF/beans.xml
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/webapp/WEB-INF/beans.xml b/taverna-server-webapp/src/main/webapp/WEB-INF/beans.xml
new file mode 100644
index 0000000..73990a7
--- /dev/null
+++ b/taverna-server-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -0,0 +1,518 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2010-2011 The University of Manchester See the file "LICENSE" 
+	for license terms. -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
+	xmlns:task="http://www.springframework.org/schema/task" xmlns:util="http://www.springframework.org/schema/util"
+	default-lazy-init="false"
+	xsi:schemaLocation="http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd
+		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
+		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+
+	<bean id="webapp" class="org.taverna.server.master.TavernaServer">
+		<property name="policy" ref="worker.policy" />
+		<property name="runStore" ref="worker.rundb" />
+		<property name="fileUtils" ref="fileUtils" />
+		<property name="contentsDescriptorBuilder" ref="contentsDescriptorBuilder" />
+		<property name="notificationEngine" ref="notificationFabric" />
+		<property name="support" ref="webapp.support" />
+		<property name="eventSource" ref="dispatch.atom" />
+		<property name="interactionFeed" value="${taverna.interaction.feed_path}" />
+		<lookup-method name="makeRunInterface" bean="run.coreView.prototype" />
+		<lookup-method name="getPolicyDescription" bean="webapp.policyView" />
+	</bean>
+
+	<bean id="webapp.support" class="org.taverna.server.master.TavernaServerSupport">
+		<property name="policy" ref="worker.policy" />
+		<property name="listenerFactory" ref="localworker.factory" />
+		<property name="runFactory" ref="localworker.factory" />
+		<property name="fileUtils" ref="fileUtils" />
+		<property name="runStore" ref="worker.rundb" />
+		<property name="stateModel" ref="webapp.state" />
+		<property name="idMapper" ref="IdentityMapper" />
+		<property name="invocationCounter" ref="webapp.invocationCounter" />
+		<property name="webapp" ref="webapp" />
+		<property name="contentTypeMap">
+			<map key-type="java.lang.String" value-type="java.lang.String">
+				<description>Maps suffixes (post '.') to content types.</description>
+				<entry key="baclava" value="application/vnd.taverna.baclava+xml" />
+				<entry key="robundle.zip" value="application/vnd.wf4ever.robundle+zip" />
+			</map>
+		</property>
+		<property name="capabilitySource" ref="capabilities" />
+	</bean>
+
+	<bean id="capabilities" class="org.taverna.server.master.utils.CapabilityLister" />
+
+	<bean id="webapp.policyView" class="org.taverna.server.master.PolicyREST">
+		<property name="support" ref="webapp.support" />
+		<property name="policy" ref="worker.policy" />
+		<property name="listenerFactory" ref="localworker.factory" />
+		<property name="notificationEngine" ref="notificationFabric" />
+	</bean>
+
+	<bean id="contentsDescriptorBuilder" class="org.taverna.server.master.ContentsDescriptorBuilder">
+		<property name="uriBuilderFactory" ref="webapp" />
+		<property name="fileUtils" ref="fileUtils" />
+	</bean>
+
+	<bean id="webapp.state" class="org.taverna.server.master.ManagementState">
+		<description>The initial state of the webapp.</description>
+		<property name="logIncomingWorkflows" value="${default.logworkflows}" />
+		<property name="allowNewWorkflowRuns" value="${default.permitsubmit}" />
+		<property name="logOutgoingExceptions" value="${default.logexceptions}" />
+		<property name="persistenceManagerBuilder" ref="pmb" />
+		<property name="self" ref="webapp.state" />
+	</bean>
+
+	<bean id="webapp.invocationCounter" class="org.taverna.server.master.utils.InvocationCounter" />
+	<bean id="webapp.perfLogger" class="org.taverna.server.master.utils.CallTimeLogger">
+		<property name="threshold" value="${calltime.logthreshold:4000000}" />
+	</bean>
+
+	<bean id="run.coreView.prototype" scope="prototype"
+		class="org.taverna.server.master.RunREST">
+		<property name="support" ref="webapp.support" />
+		<property name="cdBuilder" ref="contentsDescriptorBuilder" />
+		<lookup-method name="makeSecurityInterface" bean="run.securityView.prototype" />
+		<lookup-method name="makeInputInterface" bean="run.inputView.prototype" />
+		<lookup-method name="makeListenersInterface" bean="run.listenersView.prototype" />
+		<lookup-method name="makeDirectoryInterface" bean="run.directoryView.prototype" />
+		<lookup-method name="makeInteractionFeed" bean="run.interactionFeed.prototype" />
+	</bean>
+
+	<bean id="run.directoryView.prototype" scope="prototype"
+		class="org.taverna.server.master.DirectoryREST">
+		<property name="support" ref="webapp.support" />
+		<property name="fileUtils" ref="fileUtils" />
+	</bean>
+
+	<bean id="run.listenersView.prototype" scope="prototype"
+		class="org.taverna.server.master.ListenersREST">
+		<property name="support" ref="webapp.support" />
+		<lookup-method name="makeListenerInterface" bean="run.singleListenerView.prototype" />
+	</bean>
+
+	<bean id="run.singleListenerView.prototype" scope="prototype"
+		class="org.taverna.server.master.SingleListenerREST">
+		<lookup-method name="makePropertyInterface" bean="run.propertyView.prototype" />
+	</bean>
+
+	<bean id="run.propertyView.prototype" scope="prototype"
+		class="org.taverna.server.master.ListenerPropertyREST">
+		<property name="support" ref="webapp.support" />
+	</bean>
+
+	<bean id="run.inputView.prototype" scope="prototype"
+		class="org.taverna.server.master.InputREST">
+		<property name="support" ref="webapp.support" />
+		<property name="cdBuilder" ref="contentsDescriptorBuilder" />
+		<property name="fileUtils" ref="fileUtils" />
+	</bean>
+
+	<bean id="run.securityView.prototype" scope="prototype"
+		class="org.taverna.server.master.RunSecurityREST">
+		<property name="support" ref="webapp.support" />
+	</bean>
+
+	<bean id="run.interactionFeed.prototype" scope="prototype"
+		class="org.taverna.server.master.InteractionFeed">
+		<property name="interactionFeedSupport" ref="interactionFeed" />
+	</bean>
+
+	<bean id="feed" class="org.taverna.server.master.notification.atom.AtomFeed">
+		<property name="eventSource" ref="dispatch.atom" />
+		<property name="support" ref="webapp.support" />
+		<property name="feedLanguage" value="${atom.language}" />
+		<property name="abdera" ref="abdera" />
+	</bean>
+
+	<bean id="admin" class="org.taverna.server.master.admin.AdminBean">
+		<property name="adminHtmlFile" value="/admin.html" />
+		<property name="counter" ref="webapp.invocationCounter" />
+		<property name="factory" ref="localworker.factory" />
+		<property name="localWorkerModel" ref="localworker.state" />
+		<property name="runDB" ref="worker.rundb" />
+		<property name="state" ref="webapp.state" />
+		<property name="usageRecords" ref="usageRecordSink" />
+		<property name="userStore" ref="userStore" />
+	</bean>
+
+	<bean id="IdentityMapper" class="org.taverna.server.master.identity.CompositeIDMapper">
+		<property name="identityMappers">
+			<list>
+				<bean id="AuthorityBased"
+					class="org.taverna.server.master.identity.AuthorityDerivedIDMapper">
+					<description>Derives the local user identity to use for execution
+						from the LOCALUSER_* Spring Security authority. Thus, if the user
+						has &quot;LOCALUSER_foo&quot;, they will be executing as the local
+						user id &quot;foo&quot;.</description>
+				</bean>
+				<bean id="SelfAccess"
+					class="org.taverna.server.master.identity.WorkflowInternalAuthProvider.WorkflowSelfIDMapper">
+					<description>Handles the case where a workflow is accessing itself for
+						the purpose of publishing interactions.</description>
+					<property name="runStore" ref="worker.rundb" />
+				</bean>
+				<bean id="Extracting" class="org.taverna.server.master.identity.NameIDMapper">
+					<description>An alternate mechanism for mapping users. This tries
+						to use an RE to extract the user name from the principal name.
+					</description>
+					<property name="regexp" value="${localusernameregexp}">
+						<description>An optional regexp to extract the local user name
+							from the principal's string description. The first capturing
+							group will be the result of the mapping operation.
+						</description>
+					</property>
+				</bean>
+				<bean id="Constant" class="org.taverna.server.master.identity.ConstantIDMapper">
+					<description>How to map web principals to local users. This one
+						maps everyone to the same user, "taverna".
+					</description>
+					<property name="constantId" value="${default.localusername}" />
+				</bean>
+			</list>
+		</property>
+	</bean>
+
+	<bean id="passwordEncoder"
+		class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder" />
+	<bean class="org.taverna.server.master.identity.UserStore" id="userStore">
+		<property name="persistenceManagerBuilder" ref="pmb" />
+		<property name="baselineUserProperties">
+			<util:properties location="/WEB-INF/security/users.properties" />
+		</property>
+		<property name="defaultLocalUser" value="${default.localusername}" />
+		<property name="encoder" ref="passwordEncoder" />
+	</bean>
+
+	<!-- <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> 
+		<property name="dataSource" ref="dataSource" /> <property name="hibernateProperties"> 
+		<props> <prop key="hibernate.dialect">org.hibernate.dialect.DerbyDialect</prop> 
+		<prop key="hibernate.hbm2ddl.auto">create</prop> </props> </property> <property 
+		name="annotatedClasses"> <list> </list> </property> </bean> -->
+	<bean id="pmb" class="org.taverna.server.master.utils.JDOSupport.PersistenceManagerBuilder">
+		<property name="persistenceManagerFactory">
+			<bean id="pmf" class="org.datanucleus.api.jdo.JDOPersistenceManagerFactory"
+				destroy-method="close">
+				<property name="connectionFactory" ref="dataSource" />
+				<property name="nontransactionalRead" value="true" />
+				<property name="persistenceProperties">
+					<props>
+						<prop key="datanucleus.storeManagerType">rdbms</prop>
+						<prop key="datanucleus.autoCreateTables">true</prop>
+						<prop key="datanucleus.autoCreateTables">true</prop>
+						<prop key="datanucleus.validateTables">true</prop>
+						<prop key="datanucleus.autoCreateColumns">true</prop>
+						<prop key="datanucleus.autoCreateConstraints">true</prop>
+						<prop key="datanucleus.validateConstraints">true</prop>
+						<prop key="datanucleus.autoCreateSchema">true</prop>
+						<prop key="datanucleus.PersistenceUnitName">TavernaServer</prop>
+						<prop key="datanucleus.rdbms.datastoreAdapterClassName"
+							>org.taverna.server.master.utils.LoggingDerbyAdapter</prop>
+					</props>
+				</property>
+			</bean>
+		</property>
+	</bean>
+	<bean id="transactionAspect"
+		class="org.taverna.server.master.utils.JDOSupport.TransactionAspect" />
+
+	<bean id="systemPrereqs" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
+		<description>http://stackoverflow.com/questions/3339736/set-system-property-with-spring-configuration-file</description>
+		<property name="targetObject" value="#{@systemProperties}" />
+		<property name="targetMethod" value="putAll" />
+		<property name="arguments">
+			<util:properties>
+				<prop key="derby.stream.error.field">org.taverna.server.master.utils.DerbyUtils.TO_LOG</prop>
+				<prop key="derby.stream.error.logSeverityLevel">30000</prop>
+			</util:properties>
+		</property>
+	</bean>
+	<!-- TODO: control the location of the database properly, or move to JNDI 
+		TODO: review whether what we are doing now is correct! -->
+	<bean id="dataSource" class="org.taverna.server.master.utils.WebappAwareDataSource">
+		<property name="driverClassName" value="org.apache.derby.jdbc.EmbeddedDriver" />
+		<property name="url"
+			value="jdbc:derby:directory:%{WEBAPPROOT}tavernaserver;create=true" />
+		<!-- Needed for Derby... -->
+		<property name="shutdownUrl"
+			value="jdbc:derby:directory:%{WEBAPPROOT}tavernaserver;shutdown=true" />
+		<property name="username" value="taverna" />
+		<property name="password" value="" />
+		<property name="contextualizer" ref="contextualizer" />
+	</bean>
+
+	<bean id="contextualizer" class="org.taverna.server.master.utils.Contextualizer" />
+
+	<bean id="usageRecordSink" class="org.taverna.server.master.usage.UsageRecordRecorder">
+		<property name="state" ref="webapp.state" />
+		<property name="contextualizer" ref="contextualizer" />
+		<property name="persistenceManagerBuilder" ref="pmb" />
+		<property name="self" ref="usageRecordSink" />
+		<property name="disableDB" value="${usage.disableDB}" />
+		<property name="logFile" value="${usage.logFile}" />
+	</bean>
+
+	<context:property-placeholder
+		ignore-unresolvable="true" order="2" properties-ref="default-factory-properties" />
+	<util:properties id="default-factory-properties">
+		<prop key="backEndFactory">org.taverna.server.master.localworker.IdAwareForkRunFactory</prop>
+	</util:properties>
+
+	<!-- This bean configuration replaced with org.taverna.server.master.localworker.LocalWorkerFactory -->
+	<!-- <bean id="localworker.factory" scope="singleton" lazy-init="false" 
+		class="${backEndFactory}"> <description> The simple policy manager and factory 
+		for the baseline localworker case. </description> <property name="state" 
+		ref="localworker.state" /> <property name="runDB" ref="worker.rundb" 
+		/> -->
+	<!-- Handled by autowiring to make type-resilient. -->
+	<!-- <property name="idMapper" ref="IdentityMapper" /> -->
+	<!-- <property name="securityContextFactory" ref="worker.securityContext" 
+		/> <property name="usageRecordSink" ref="usageRecordSink" /> <property name="URProcessorPool" 
+		ref="URThreads" /> </bean> -->
+
+	<!-- <task:executor id="URThreads" pool-size="${pool.size}" /> -->
+
+	<bean id="worker.securityContext"
+		class="org.taverna.server.master.worker.SecurityContextFactory">
+		<property name="runDatabase" ref="worker.rundb" />
+		<property name="filenameConverter" ref="fileUtils" />
+		<property name="x500Utils" ref="x500Utils" />
+		<property name="httpRealm" value="${http.realmName}" />
+		<property name="uriSource" ref="webapp" />
+		<property name="certificateFetcher" ref="certificateChainFetcher" />
+		<property name="passwordIssuer" ref="passwordIssuer" />
+	</bean>
+
+	<bean id="passwordIssuer" class="org.taverna.server.master.worker.PasswordIssuer">
+		<!-- <property name="length" value="8" /> -->
+	</bean>
+
+	<bean id="certificateChainFetcher" class="org.taverna.server.master.utils.CertificateChainFetcher">
+		<property name="secure" value="${fetchCertificateChain}" />
+	</bean>
+
+	<bean id="localworker.state" class="org.taverna.server.master.localworker.LocalWorkerState"
+		scope="singleton" lazy-init="false">
+		<description>
+			The state of the simple factory for the identity-aware
+			local worker.
+		</description>
+		<property name="defaultLifetime" value="${default.lifetime}">
+			<description>How long the run lasts for by default, in seconds.
+			</description>
+		</property>
+		<property name="maxRuns" value="${default.runlimit}">
+			<description>The maximum simultaneous number of runs.</description>
+		</property>
+		<property name="operatingLimit" value="${default.operatinglimit}">
+			<description>
+				The maximum number of runs that are in the Operating state,
+				i.e., actually running with a process consuming resources.
+			</description>
+		</property>
+		<property name="extraArgs">
+			<description>Any extra arguments (memory control, etc.) to pass to
+				the spawned subprocesses.
+			</description>
+			<list>
+			</list>
+		</property>
+		<property name="waitSeconds" value="40">
+			<description>An upper bound (in seconds) on the time to wait for a
+				subprocess to start before failing it.
+			</description>
+		</property>
+		<property name="sleepMS" value="1000">
+			<description>The time to wait (in milliseconds) between polling for
+				the subprocess to complete its registration.
+			</description>
+		</property>
+		<property name="persistenceManagerBuilder" ref="pmb" />
+		<!-- <property name="javaBinary"> <description>The name of the java executable 
+			used to run the server worker. Defaults to the executable used to run the 
+			hosting environment.</description> </property> -->
+		<!-- <property name="serverWorkerJar"> <description>The full path to the 
+			executable JAR file containing the implementation of the server worker.</description> 
+			</property> -->
+		<!-- <property name="executeWorkflowScript"> <description>The full path 
+			to the executeworkflow.sh in either the Taverna 2 Workbench distribution 
+			or the Taverna 2 Command Line distribution.</description> </property> -->
+		<property name="self" ref="localworker.state" />
+		<property name="defaultExecuteWorkflowScript" value="${executeWorkflowScript:NONE}" />
+	</bean>
+
+	<bean id="worker.policy" class="org.taverna.server.master.worker.PolicyImpl">
+		<description>
+			The implementation of the access control policy supported
+			by the localworker run engine.
+		</description>
+		<property name="limits" ref="localworker.state" />
+		<property name="runDB" ref="worker.rundb" />
+	</bean>
+	<bean id="worker.rundb" class="org.taverna.server.master.worker.RunDatabase">
+		<property name="notifier" ref="worker.notifier" />
+		<property name="typeNotifiers">
+			<list>
+				<ref bean="cn.email" />
+				<ref bean="cn.sms" />
+				<ref bean="cn.twitter" />
+				<!-- <ref bean="cn.xmpp"/> -->
+			</list>
+		</property>
+		<property name="notificationEngine" ref="notificationFabric" />
+		<property name="dao" ref="worker.runDAO" />
+	</bean>
+	<bean id="cn.email"
+		class="org.taverna.server.master.worker.VelocityCompletionNotifier">
+		<property name="name" value="email" />
+		<property name="subject" value="Workflow run finished executing" />
+		<property name="velocityEngine" ref="velocity" />
+		<property name="uriBuilderFactory" ref="webapp" />
+	</bean>
+	<bean id="cn.sms"
+		class="org.taverna.server.master.worker.VelocityCompletionNotifier">
+		<property name="name" value="sms" />
+		<property name="subject" value="Run finished" />
+		<property name="velocityEngine" ref="velocity" />
+		<property name="uriBuilderFactory" ref="webapp" />
+	</bean>
+	<bean id="cn.twitter"
+		class="org.taverna.server.master.worker.VelocityCompletionNotifier">
+		<property name="name" value="twitter" />
+		<property name="subject" value="Run finished" />
+		<property name="velocityEngine" ref="velocity" />
+		<property name="uriBuilderFactory" ref="webapp" />
+	</bean>
+	
+	<bean id="worker.runDAO" class="org.taverna.server.master.worker.RunDatabaseDAO">
+		<description>
+			The implementation of the catalog of workflow runs
+			supported by the localworker run engine.
+		</description>
+		<property name="persistenceManagerBuilder" ref="pmb" />
+		<property name="facade" ref="worker.rundb" />
+	</bean>
+	<task:scheduled-tasks scheduler="taskScheduler">
+		<task:scheduled ref="worker.rundb" method="cleanNow"
+			fixed-delay="${purge.interval}" />
+		<task:scheduled ref="worker.rundb" method="checkForFinishNow"
+			fixed-delay="${finish.interval}" />
+		<task:scheduled ref="dispatch.atom" method="deleteExpiredEvents"
+			fixed-delay="${atom.cleaninterval}" />
+	</task:scheduled-tasks>
+
+	<bean id="notificationFabric"
+		class="org.taverna.server.master.notification.NotificationEngine">
+		<property name="dispatchers">
+			<list>
+				<ref bean="dispatch.email" />
+				<ref bean="dispatch.twitter" />
+				<ref bean="dispatch.xmpp" />
+				<ref bean="dispatch.sms" />
+			</list>
+		</property>
+		<property name="universalDispatchers">
+			<list>
+				<ref bean="dispatch.atom" />
+			</list>
+		</property>
+	</bean>
+
+	<bean id="dispatch.email" class="org.taverna.server.master.notification.EmailDispatcher">
+		<property name="from" value="${email.from}" />
+		<property name="messageContentType" value="${email.type}" />
+		<property name="cooldownSeconds" value="${message.cooldown}" />
+		<property name="smtpHost" value="${email.host}" />
+		<property name="sender">
+			<bean class="org.springframework.mail.javamail.JavaMailSenderImpl"
+				id="javamail">
+				<property name="host" value="${email.host}" />
+			</bean>
+		</property>
+	</bean>
+	<bean id="dispatch.twitter"
+		class="org.taverna.server.master.notification.TwitterDispatcher">
+		<property name="cooldownSeconds" value="${message.cooldown}" />
+		<property name="accessToken" value="${twitter.oauth.accessToken}" />
+		<property name="accessSecret" value="${twitter.oauth.accessTokenSecret}" />
+	</bean>
+	<bean id="dispatch.xmpp" class="org.taverna.server.master.notification.JabberDispatcher">
+		<property name="resource" value="${xmpp.resource}" />
+		<property name="host" value="${xmpp.service}" />
+		<property name="username" value="${xmpp.user}" />
+		<property name="password" value="${xmpp.password}" />
+	</bean>
+	<bean id="dispatch.sms" class="org.taverna.server.master.notification.SMSDispatcher">
+		<property name="usernameField" value="${sms.userfield}" />
+		<property name="passwordField" value="${sms.passfield}" />
+		<property name="destinationField" value="${sms.destfield}" />
+		<property name="messageField" value="${sms.msgfield}" />
+		<property name="cooldownSeconds" value="${message.cooldown}" />
+	</bean>
+
+	<bean id="dispatch.atom" class="org.taverna.server.master.notification.atom.EventDAO">
+		<property name="expiryAgeDays" value="${atom.lifespan}" />
+		<property name="persistenceManagerBuilder" ref="pmb" />
+		<property name="uriBuilderFactory" ref="feed" />
+		<property name="self" ref="dispatch.atom" />
+	</bean>
+
+	<bean id="worker.notifier"
+		class="org.taverna.server.master.worker.SimpleFormattedCompletionNotifier">
+		<property name="subject" value="${message.termination.subject}" />
+		<property name="messageFormat" value="${message.termination.body}" />
+		<property name="name" value="fallback"/>
+	</bean>
+
+	<bean id="fileUtils" class="org.taverna.server.master.utils.FilenameUtils" />
+	<bean id="x500Utils" class="org.taverna.server.master.utils.X500Utils" />
+	<task:scheduler id="taskScheduler" pool-size="${pool.size}" />
+
+	<bean class="org.taverna.server.master.utils.JCECheck" id="JCECheck" />
+
+	<bean class="org.taverna.server.master.interaction.InteractionFeedSupport"
+		id="interactionFeed" scope="singleton">
+		<property name="abdera" ref="abdera" />
+		<property name="support" ref="webapp.support" />
+		<property name="uriBuilder" ref="webapp" />
+		<property name="utils" ref="fileUtils" />
+	</bean>
+	<bean class="org.taverna.server.master.rest.handler.FeedHandler" id="atomFeedHandler">
+		<property name="abdera" ref="abdera" />
+	</bean>
+	<bean class="org.taverna.server.master.rest.handler.EntryHandler" id="atomEntryHandler">
+		<property name="abdera" ref="abdera" />
+	</bean>
+
+	<bean id="authProvider" class="org.taverna.server.master.identity.StrippedDownAuthProvider">
+		<property name="passwordEncoder" ref="passwordEncoder" />
+		<property name="userDetailsService">
+			<bean class="org.taverna.server.master.identity.UserStore.CachedUserStore">
+				<property name="realStore" ref="userStore" />
+			</bean>
+		</property>
+	</bean>
+	<bean id="workflowInternalAuthProvder"
+		class="org.taverna.server.master.identity.WorkflowInternalAuthProvider">
+		<property name="dao" ref="worker.runDAO" />
+		<property name="cacheBound" value="${default.runlimit}" />
+	</bean>
+	<bean id="velocity" class="org.apache.velocity.app.VelocityEngine"
+		init-method="init" lazy-init="false">
+		<constructor-arg>
+			<props>
+				<prop key="input.encoding">UTF-8</prop>
+				<prop key="output.encoding">UTF-8</prop>
+				<prop key="runtime.log.logsystem.class">org.apache.velocity.runtime.log.Log4JLogChute</prop>
+				<prop key="runtime.log.logsystem.log4j.logger">org.taverna.server.master.worker.VelocityCompletionNotifier</prop>
+				<prop key="resource.loader">class</prop>
+				<prop key="class.resource.loader.description">Velocity Classpath Resource Loader</prop>
+				<prop key="class.resource.loader.class">org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader</prop>
+			</props>
+		</constructor-arg>
+	</bean>
+	<bean id="abdera" class="org.apache.abdera.Abdera"/>
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/webapp/WEB-INF/insecure.xml
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/webapp/WEB-INF/insecure.xml b/taverna-server-webapp/src/main/webapp/WEB-INF/insecure.xml
new file mode 100644
index 0000000..92c0b03
--- /dev/null
+++ b/taverna-server-webapp/src/main/webapp/WEB-INF/insecure.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2010-2012 The University of Manchester See the file "LICENSE" 
+	for license terms. -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:security="http://www.springframework.org/schema/security"
+	xmlns:context="http://www.springframework.org/schema/context"
+	xmlns:util="http://www.springframework.org/schema/util"
+	xsi:schemaLocation="http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
+		http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
+		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
+		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
+
+	<description>
+		The Taverna Server bean, plus supporting configuration.
+		THIS IS AN INSECURE CONFIGURATION!
+	</description>
+
+	<import resource="webappBeans.xml" />
+
+	<context:property-placeholder order="0" ignore-unresolvable="true"
+		 properties-ref="security.override.properties" />
+	<util:properties id="security.override.properties">
+		<prop key="backEndFactory">org.taverna.server.master.localworker.ForkRunFactory</prop>
+		<prop key="fetchCertificateChain">false</prop>
+		<prop key="suppressRewriteEngine">true</prop>
+		<prop key="requiredChannel">any</prop>
+	</util:properties>
+
+	<!-- No JMX support; assume too unsafe. -->
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/webapp/WEB-INF/lib/org.taverna.server.master.worker.VelocityCompletionNotifier_email.vtmpl
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/webapp/WEB-INF/lib/org.taverna.server.master.worker.VelocityCompletionNotifier_email.vtmpl b/taverna-server-webapp/src/main/webapp/WEB-INF/lib/org.taverna.server.master.worker.VelocityCompletionNotifier_email.vtmpl
new file mode 100644
index 0000000..d706fed
--- /dev/null
+++ b/taverna-server-webapp/src/main/webapp/WEB-INF/lib/org.taverna.server.master.worker.VelocityCompletionNotifier_email.vtmpl
@@ -0,0 +1,15 @@
+Your workflow, $name, has #if( $prop_exitcode == 0)finished#{else}failed#{end}.
+
+It started execution at ${startTime}.
+It finished execution at ${finishTime}.
+
+For further information, go to $uriBuilder.build() before the run is
+automatically deleted (currently scheduled to happen at ${expiryTime}).
+
+#if( $prop_exitcode == 0)
+Exit code: $prop_exitcode
+Standard error:
+$prop_stderr
+#end
+
+(This message was automatically generated by Taverna Server ${serverVersion}.)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/webapp/WEB-INF/lib/org.taverna.server.master.worker.VelocityCompletionNotifier_sms.vtmpl
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/webapp/WEB-INF/lib/org.taverna.server.master.worker.VelocityCompletionNotifier_sms.vtmpl b/taverna-server-webapp/src/main/webapp/WEB-INF/lib/org.taverna.server.master.worker.VelocityCompletionNotifier_sms.vtmpl
new file mode 100644
index 0000000..b595931
--- /dev/null
+++ b/taverna-server-webapp/src/main/webapp/WEB-INF/lib/org.taverna.server.master.worker.VelocityCompletionNotifier_sms.vtmpl
@@ -0,0 +1 @@
+Taverna Server ${serverVersion}: Workflow "$name" from ${startTime} has #if( $prop_exitcode == 0)finished#{else}failed#{end}.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/webapp/WEB-INF/lib/org.taverna.server.master.worker.VelocityCompletionNotifier_twitter.vtmpl
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/webapp/WEB-INF/lib/org.taverna.server.master.worker.VelocityCompletionNotifier_twitter.vtmpl b/taverna-server-webapp/src/main/webapp/WEB-INF/lib/org.taverna.server.master.worker.VelocityCompletionNotifier_twitter.vtmpl
new file mode 100644
index 0000000..cd920a7
--- /dev/null
+++ b/taverna-server-webapp/src/main/webapp/WEB-INF/lib/org.taverna.server.master.worker.VelocityCompletionNotifier_twitter.vtmpl
@@ -0,0 +1 @@
+Your workflow, $name, has #if( $prop_exitcode == 0)finished#{else}failed#{end}. $uriBuilder.build() #TavernaServer ${serverVersion}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/webapp/WEB-INF/partsecure.xml
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/webapp/WEB-INF/partsecure.xml b/taverna-server-webapp/src/main/webapp/WEB-INF/partsecure.xml
new file mode 100644
index 0000000..2e27b81
--- /dev/null
+++ b/taverna-server-webapp/src/main/webapp/WEB-INF/partsecure.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2011-2012 The University of Manchester See the file "LICENSE" 
+	for license terms. -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:context="http://www.springframework.org/schema/context"
+	xmlns:util="http://www.springframework.org/schema/util"
+	xmlns:security="http://www.springframework.org/schema/security"
+	xsi:schemaLocation="http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
+		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
+		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
+
+	<description>
+		The Taverna Server bean, plus supporting configuration.
+		THIS IS THE CONFIGURATION FOR SEMI-SECURE OPERATION ON WINDOWS.
+	</description>
+
+	<import resource="webappBeans.xml" />
+
+	<!-- This is all the same as the secure config *EXCEPT* for this override. -->
+	<context:property-placeholder order="0" ignore-unresolvable="true"
+		 properties-ref="security.override.properties" />
+	<util:properties id="security.override.properties">
+		<prop key="backEndFactory">org.taverna.server.master.localworker.ForkRunFactory</prop>
+		<prop key="fetchCertificateChain">true</prop>
+		<prop key="suppressRewriteEngine">false</prop>
+		<prop key="requiredChannel">https</prop>
+	</util:properties>
+
+	<bean id="MBeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
+		<property name="locateExistingServerIfPossible" value="true" />
+	</bean>
+	<context:mbean-export server="MBeanServer"
+		default-domain="${my.domain}" registration="ignoreExisting" />
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/webapp/WEB-INF/providers.xml
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/webapp/WEB-INF/providers.xml b/taverna-server-webapp/src/main/webapp/WEB-INF/providers.xml
new file mode 100644
index 0000000..43531ab
--- /dev/null
+++ b/taverna-server-webapp/src/main/webapp/WEB-INF/providers.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2010-2011 The University of Manchester See the file "LICENSE" 
+	for license terms. -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:util="http://www.springframework.org/schema/util"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
+
+	<import resource="beans.xml" />
+
+	<bean id="ExceptionProvider.BadInputPortName" class="org.taverna.server.master.rest.handler.BadInputPortNameHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.BadPropertyValue" class="org.taverna.server.master.rest.handler.BadPropertyValueHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.BadStateChange" class="org.taverna.server.master.rest.handler.BadStateChangeHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.FilesystemAccess" class="org.taverna.server.master.rest.handler.FilesystemAccessHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.GeneralFailure" class="org.taverna.server.master.rest.handler.GeneralFailureHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.IllegalArgument" class="org.taverna.server.master.rest.handler.IllegalArgumentHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.ImplementationProblem"
+		class="org.taverna.server.master.rest.handler.ImplementationProblemHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.InvalidCredential" class="org.taverna.server.master.rest.handler.InvalidCredentialHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.NoCreate" class="org.taverna.server.master.rest.handler.NoCreateHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.Overloaded" class="org.taverna.server.master.rest.handler.OverloadedHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.NoCredential" class="org.taverna.server.master.rest.handler.NoCredentialHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.NoDestroy" class="org.taverna.server.master.rest.handler.NoDestroyHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.NoDirectoryEntry" class="org.taverna.server.master.rest.handler.NoDirectoryEntryHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.NoListener" class="org.taverna.server.master.rest.handler.NoListenerHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.NoUpdate" class="org.taverna.server.master.rest.handler.NoUpdateHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.NotOwner" class="org.taverna.server.master.rest.handler.NotOwnerHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.UnknownRun" class="org.taverna.server.master.rest.handler.UnknownRunHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.JAXBException" class="org.taverna.server.master.rest.handler.JAXBExceptionHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+	<bean id="ExceptionProvider.AccessDenied" class="org.taverna.server.master.rest.handler.AccessDeniedHandler">
+		<property name="managementModel" ref="webapp.state" />
+	</bean>
+    <bean id="ExceptionProvider.NegotiationFailed" class="org.taverna.server.master.rest.handler.NegotiationFailedHandler">
+    </bean>
+	<bean id="MessagingProvider.File" class="org.taverna.server.master.rest.handler.FileMessageHandler">
+		<property name="maxChunkSize" value="${default.messageSize}" />
+	</bean>
+	<bean id="MessagingProvider.FileConcatenation" class="org.taverna.server.master.rest.handler.FileConcatenationHandler">
+		<property name="maxChunkSize" value="${default.messageSize}" />
+	</bean>
+	<bean id="MessagingProvider.FileSegment" class="org.taverna.server.master.rest.handler.FileSegmentHandler">
+		<property name="maxChunkSize" value="${default.messageSize}" />
+	</bean>
+	<bean id="MessagingProvider.InputStream"
+		class="org.taverna.server.master.rest.handler.InputStreamMessageHandler">
+	</bean>
+	<bean id="MessagingProvider.T2flow" class="org.taverna.server.master.rest.handler.T2FlowDocumentHandler">
+	</bean>
+	<bean id="MessagingProvider.Permission" class="org.taverna.server.master.rest.handler.PermissionHandler">
+	</bean>
+
+	<bean id="Provider.RuntimeExceptionRemapping" class="org.taverna.server.master.utils.RuntimeExceptionWrapper" />
+	<bean id="MessagingProvider.ZipStream" class="org.taverna.server.master.rest.handler.ZipStreamHandler" />
+	<bean id="MessagingProvider.URIList" class="org.taverna.server.master.rest.handler.URIListHandler" />
+	<bean id="Interceptor.FlushThreadLocalCache"
+		class="org.taverna.server.master.utils.FlushThreadLocalCacheInterceptor"
+		lazy-init="false">
+	</bean>
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/webapp/WEB-INF/secure.xml
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/webapp/WEB-INF/secure.xml b/taverna-server-webapp/src/main/webapp/WEB-INF/secure.xml
new file mode 100644
index 0000000..cf08083
--- /dev/null
+++ b/taverna-server-webapp/src/main/webapp/WEB-INF/secure.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2010-2012 The University of Manchester See the file "LICENSE" 
+	for license terms. -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:context="http://www.springframework.org/schema/context"
+	xmlns:util="http://www.springframework.org/schema/util"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:security="http://www.springframework.org/schema/security"
+	xsi:schemaLocation="
+	http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+	http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
+	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
+	http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">
+
+	<description>
+		The Taverna Server bean, plus supporting configuration.
+		THIS IS THE CONFIGURATION FOR SECURE OPERATION.
+	</description>
+
+	<import resource="webappBeans.xml" />
+
+	<context:property-placeholder order="0" ignore-unresolvable="true"
+		 properties-ref="security.override.properties" />
+	<util:properties id="security.override.properties">
+		<prop key="fetchCertificateChain">true</prop>
+		<prop key="suppressRewriteEngine">false</prop>
+		<prop key="requiredChannel">https</prop>
+	</util:properties>
+
+	<bean id="MBeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
+		<property name="locateExistingServerIfPossible" value="true" />
+	</bean>
+	<context:mbean-export server="MBeanServer"
+		default-domain="${my.domain}" registration="ignoreExisting" />
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/webapp/WEB-INF/security/users.properties
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/webapp/WEB-INF/security/users.properties b/taverna-server-webapp/src/main/webapp/WEB-INF/security/users.properties
new file mode 100644
index 0000000..03f8436
--- /dev/null
+++ b/taverna-server-webapp/src/main/webapp/WEB-INF/security/users.properties
@@ -0,0 +1,48 @@
+# This is a Java properties file that defines the default users supported by
+# Taverna Server. The keys are the user names, and the values are comma-
+# -separated lists of values: the first is the password (which must not have
+# any spaces or commas in) and the last is "enabled" or "disabled" to indicate
+# whether this user is actually allowed to log in or not. The values between
+# are the authorities associated with the user: these are either roles (which
+# describe a particular set of permissions for the user) or user mappings.
+#
+# The supported set of authorities are:
+#
+#   ROLE_tavernauser      - may use the standard Taverna Server interfaces
+#
+#   ROLE_tavernasuperuser - may use the admin interfaces and see *all*
+#                           workflow runs irrespective of permissions
+#
+#   LOCALUSER_*           - map the server user to the given local system
+#                           account (i.e., the account name is in place of the
+#                           "*" in the authority); don't grant two of these
+#                           authorities at once, or confusion will reign
+#
+# Note that it is usually better to define accounts via the administrative
+# interface or through the JMX interface because those can then be modified
+# without restarting the server; anything in this file is fixed until the
+# next server restart. This file exists mainly to allow permissions for the
+# admin interface to be boot-strapped.
+
+# ---------------------------------------------------------------------
+
+# A normal user. Must have given role (ROLE_tavernauser) to use Taverna Server.
+# The user has password "taverna" and is enabled. The default mapping to user
+# accounts - using the user name - will be used.
+
+taverna: taverna,ROLE_tavernauser,enabled
+
+# Another normal user (username: "taverna_alt"). Will be mapped to the system
+# account called "taverna", but the user is currently disabled.
+
+taverna_alt: qwerty,ROLE_tavernauser,LOCALUSER_taverna,disabled
+
+# The default admin user, who has password "admin". You should change this!
+# Admin users also have ROLE_tavernasuperuser, which grants access to the
+# server's /admin pages and allows all workflow runs to be seen (if the
+# ROLE_tavernauser is also assigned, as below; one does not imply the other).
+# If you don't have any enabled admin users, you'll need to use JMX to do
+# management operations (JMX is only accessible from the local host and by
+# the overall container user or the system administrator).
+
+admin: admin,ROLE_tavernauser,ROLE_tavernasuperuser,LOCALUSER_taverna,enabled

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/webapp/WEB-INF/tavernaserver.properties
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/webapp/WEB-INF/tavernaserver.properties b/taverna-server-webapp/src/main/webapp/WEB-INF/tavernaserver.properties
new file mode 100644
index 0000000..9616a45
--- /dev/null
+++ b/taverna-server-webapp/src/main/webapp/WEB-INF/tavernaserver.properties
@@ -0,0 +1,77 @@
+# Override the hostname, port and webapp; leave at 'NONE' if no override
+# desired. If set, set it to something like:
+#      foo.example.com:8000/tav-serv
+default.webapp:			NONE
+# User name to use if nothing else specified
+default.localusername:	taverna
+# How to pick a user name out of a global identity
+localusernameregexp:	^TAVERNAUSER=(.*)$
+# General defaults
+default.logworkflows:	false
+default.logexceptions:	false
+default.permitsubmit:	true
+default.lifetime:		1440
+default.runlimit:		100
+default.operatinglimit:	10
+default.messageSize:	65536
+#taverna.preferredUserUri:	https://some.host:8443/tavernaserver/rest/
+http.realmName:         tavernaserver
+
+rmi.localhostOnly:		true
+helio.cis.enableTokenPassing:	false
+log.security.details:	false
+
+#executeWorkflowScript:	/usr/taverna/executeworkflow.sh
+#secureForkPasswordFile:	/usr/local/tomcat6.0/conf/sudopass.txt
+
+# Usage Record handling
+usage.logFile:		none
+usage.disableDB:	no
+
+# Delays used in the task executor 
+purge.interval:		30000
+finish.interval:	10000
+
+# Static configuration of messaging
+
+### Email
+email.from:		taverna.server@localhost
+email.type:		text/plain
+#email.host:	localhost
+
+### Jabber
+#xmpp.server:	xmpp://some.host:5222
+xmpp.resource:	TavernaServer
+#xmpp.user:		taverna
+#xmpp.password:	*******
+
+### Atom/RSS; lifespan in days, cleaninterval in milliseconds
+atom.language:	en
+atom.lifespan:	7
+atom.cleaninterval:	3600000
+
+### SMS
+#sms.service:	https://www.intellisoftware.co.uk/smsgateway/sendmsg.aspx
+sms.userfield:	username
+sms.passfield:	password
+sms.destfield:	to
+sms.msgfield:	text
+#sms.user:		taverna
+#sms.pass:		*******
+
+### Twitter
+#twitter.oauth.accessToken:			...
+#twitter.oauth.accessTokenSecret:	...
+
+### General; cooldown in seconds
+message.cooldown:				300
+message.termination.subject:	Taverna workflow run finished
+message.termination.body:		Your job with ID={0} has finished with exit code {1,number,integer}.
+
+# Thread pool sizing
+pool.size:	2
+
+taverna.interaction.host:			none
+taverna.interaction.port:			none
+taverna.interaction.webdav_path:	none
+taverna.interaction.feed_path:		none

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/webapp/WEB-INF/web-nosec.xml
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/webapp/WEB-INF/web-nosec.xml b/taverna-server-webapp/src/main/webapp/WEB-INF/web-nosec.xml
new file mode 100644
index 0000000..d6c6ee7
--- /dev/null
+++ b/taverna-server-webapp/src/main/webapp/WEB-INF/web-nosec.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE web-app
+    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+    "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<!-- Copyright (C) 2010-2011 The University of Manchester See the file "LICENSE" 
+	for license terms. -->
+<web-app id="TAVSERV-2.5.4">
+	<display-name>Taverna 2.5.4 Server</display-name>
+	<description>This is the front-end engine for Taverna 2.5.4 Server.</description>
+	<context-param>
+		<param-name>contextConfigLocation</param-name>
+		<param-value>WEB-INF/insecure.xml</param-value>
+		<description>Where Spring is to load its bean definitions from. DO NOT
+			CHANGE WITHOUT CONSULTING DOCUMENTATION.</description>
+	</context-param>
+	<context-param>
+		<param-name>log4jExposeWebAppRoot</param-name>
+		<param-value>false</param-value>
+		<description>
+			THIS IS STUPID! We have to do this so that Tomcat webapps do not
+			leak their configurations into each other via the log4j support
+			trying to be "smart".
+			http://javacolors.blogspot.co.uk/2010/08/tomcat-and-webxmls-webapprootkey.html
+			If you change this, good luck hunting down the weird crashes.
+		</description>
+	</context-param>
+
+	<filter>
+		<filter-name>springSecurityFilterChain</filter-name>
+		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+	</filter>
+	<filter-mapping>
+		<filter-name>springSecurityFilterChain</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+	<listener>
+		<listener-class>
+			org.springframework.web.context.request.RequestContextListener
+		</listener-class>
+	</listener>
+	<listener>
+		<listener-class>
+			org.springframework.web.util.Log4jConfigListener
+		</listener-class>
+	</listener>
+	<listener>
+		<listener-class>
+			org.springframework.web.context.ContextLoaderListener
+		</listener-class>
+	</listener>
+
+	<servlet>
+		<servlet-name>CXFServlet</servlet-name>
+		<display-name>CXF Servlet</display-name>
+		<servlet-class>
+			org.apache.cxf.transport.servlet.CXFServlet
+		</servlet-class>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>CXFServlet</servlet-name>
+		<url-pattern>/*</url-pattern>
+	</servlet-mapping>
+
+	<resource-ref>
+		<description>
+			Resource reference to a factory for javax.mail.Session
+			instances that may be used for sending electronic mail
+			messages, preconfigured to connect to the appropriate
+			SMTP server.
+		</description>
+		<res-ref-name>mail/Session</res-ref-name>
+		<res-type>javax.mail.Session</res-type>
+		<res-auth>Container</res-auth>
+		<res-sharing-scope>Shareable</res-sharing-scope>
+	</resource-ref>
+</web-app>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/webapp/WEB-INF/web-partsec.xml
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/webapp/WEB-INF/web-partsec.xml b/taverna-server-webapp/src/main/webapp/WEB-INF/web-partsec.xml
new file mode 100644
index 0000000..a2b545e
--- /dev/null
+++ b/taverna-server-webapp/src/main/webapp/WEB-INF/web-partsec.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE web-app
+    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+    "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<!-- Copyright (C) 2010-2011 The University of Manchester See the file "LICENSE" 
+	for license terms. -->
+<web-app id="TAVSERV-2.5.4">
+	<display-name>Taverna 2.5.4 Server</display-name>
+	<description>This is the front-end engine for Taverna 2.5.4 Server.</description>
+	<context-param>
+		<param-name>contextConfigLocation</param-name>
+		<param-value>WEB-INF/partsecure.xml</param-value>
+		<description>Where Spring is to load its bean definitions from. DO NOT
+			CHANGE WITHOUT CONSULTING DOCUMENTATION.</description>
+	</context-param>
+	<context-param>
+		<param-name>log4jExposeWebAppRoot</param-name>
+		<param-value>false</param-value>
+		<description>
+			THIS IS STUPID! We have to do this so that Tomcat webapps do not
+			leak their configurations into each other via the log4j support
+			trying to be "smart".
+			http://javacolors.blogspot.co.uk/2010/08/tomcat-and-webxmls-webapprootkey.html
+			If you change this, good luck hunting down the weird crashes.
+		</description>
+	</context-param>
+
+	<filter>
+		<filter-name>springSecurityFilterChain</filter-name>
+		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+	</filter>
+	<filter-mapping>
+		<filter-name>springSecurityFilterChain</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+	<listener>
+		<listener-class>
+			org.springframework.web.context.request.RequestContextListener
+		</listener-class>
+	</listener>
+	<listener>
+		<listener-class>
+			org.springframework.web.util.Log4jConfigListener
+		</listener-class>
+	</listener>
+	<listener>
+		<listener-class>
+			org.springframework.web.context.ContextLoaderListener
+		</listener-class>
+	</listener>
+
+	<servlet>
+		<servlet-name>CXFServlet</servlet-name>
+		<display-name>CXF Servlet</display-name>
+		<servlet-class>
+			org.apache.cxf.transport.servlet.CXFServlet
+		</servlet-class>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>CXFServlet</servlet-name>
+		<url-pattern>/*</url-pattern>
+	</servlet-mapping>
+
+	<resource-ref>
+		<description>
+			Resource reference to a factory for javax.mail.Session
+			instances that may be used for sending electronic mail
+			messages, preconfigured to connect to the appropriate
+			SMTP server.
+		</description>
+		<res-ref-name>mail/Session</res-ref-name>
+		<res-type>javax.mail.Session</res-type>
+		<res-auth>Container</res-auth>
+		<res-sharing-scope>Shareable</res-sharing-scope>
+	</resource-ref>
+</web-app>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/webapp/WEB-INF/web-sec.xml
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/webapp/WEB-INF/web-sec.xml b/taverna-server-webapp/src/main/webapp/WEB-INF/web-sec.xml
new file mode 100644
index 0000000..9a5395a
--- /dev/null
+++ b/taverna-server-webapp/src/main/webapp/WEB-INF/web-sec.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE web-app
+    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+    "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<!-- Copyright (C) 2010-2011 The University of Manchester See the file "LICENSE" 
+	for license terms. -->
+<web-app id="TAVSERV-2.5.4">
+	<display-name>Taverna 2.5.4 Server</display-name>
+	<description>This is the front-end engine for Taverna 2.5.4 Server.</description>
+	<context-param>
+		<param-name>contextConfigLocation</param-name>
+		<param-value>WEB-INF/secure.xml</param-value>
+		<description>Where Spring is to load its bean definitions from. DO NOT
+			CHANGE WITHOUT CONSULTING DOCUMENTATION.</description>
+	</context-param>
+	<context-param>
+		<param-name>log4jExposeWebAppRoot</param-name>
+		<param-value>false</param-value>
+		<description>
+			THIS IS STUPID! We have to do this so that Tomcat webapps do not
+			leak their configurations into each other via the log4j support
+			trying to be "smart".
+			http://javacolors.blogspot.co.uk/2010/08/tomcat-and-webxmls-webapprootkey.html
+			If you change this, good luck hunting down the weird crashes.
+		</description>
+	</context-param>
+
+	<filter>
+		<filter-name>springSecurityFilterChain</filter-name>
+		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+	</filter>
+	<filter-mapping>
+		<filter-name>springSecurityFilterChain</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+	<listener>
+		<listener-class>
+			org.springframework.web.context.request.RequestContextListener
+		</listener-class>
+	</listener>
+	<listener>
+		<listener-class>
+			org.springframework.web.util.Log4jConfigListener
+		</listener-class>
+	</listener>
+	<listener>
+		<listener-class>
+			org.springframework.web.context.ContextLoaderListener
+		</listener-class>
+	</listener>
+
+	<servlet>
+		<servlet-name>CXFServlet</servlet-name>
+		<display-name>CXF Servlet</display-name>
+		<servlet-class>
+			org.apache.cxf.transport.servlet.CXFServlet
+		</servlet-class>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>CXFServlet</servlet-name>
+		<url-pattern>/*</url-pattern>
+	</servlet-mapping>
+
+	<resource-ref>
+		<description>
+			Resource reference to a factory for javax.mail.Session
+			instances that may be used for sending electronic mail
+			messages, preconfigured to connect to the appropriate
+			SMTP server.
+		</description>
+		<res-ref-name>mail/Session</res-ref-name>
+		<res-type>javax.mail.Session</res-type>
+		<res-auth>Container</res-auth>
+		<res-sharing-scope>Shareable</res-sharing-scope>
+	</resource-ref>
+</web-app>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-webapp/src/main/webapp/WEB-INF/webappBeans.xml
----------------------------------------------------------------------
diff --git a/taverna-server-webapp/src/main/webapp/WEB-INF/webappBeans.xml b/taverna-server-webapp/src/main/webapp/WEB-INF/webappBeans.xml
new file mode 100644
index 0000000..22e74b3
--- /dev/null
+++ b/taverna-server-webapp/src/main/webapp/WEB-INF/webappBeans.xml
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2010-2012 The University of Manchester See the file "LICENSE" 
+	for license terms. -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:context="http://www.springframework.org/schema/context"
+	xmlns:aop="http://www.springframework.org/schema/aop"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:jaxrs="http://cxf.apache.org/jaxrs"
+	xmlns:jaxws="http://cxf.apache.org/jaxws"
+	xmlns:cxf="http://cxf.apache.org/core"
+	xmlns:security="http://www.springframework.org/schema/security"
+	xmlns:util="http://www.springframework.org/schema/util"
+	xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
+		http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
+		http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+		http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
+		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
+		http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
+		http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
+		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
+
+	<description>
+		The Taverna Server bean, plus supporting configuration.
+	</description>
+
+	<import resource="classpath:META-INF/cxf/cxf.xml" />
+	<import resource="providers.xml" />
+
+	<context:annotation-config />
+	<context:component-scan base-package="org.taverna.server" />
+	<bean id="servletContextPropertyConfigurer"
+		class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
+		<property name="ignoreUnresolvablePlaceholders" value="true" />
+		<property name="localOverride" value="true" />
+		<property name="order" value="0" />
+		<property name="location" value="/WEB-INF/tavernaserver.properties" />
+	</bean>
+
+	<jaxws:server id="master_SOAP"
+		serviceClass="org.taverna.server.master.TavernaServer" address="/soap">
+		<jaxws:serviceBean>
+			<ref bean="webapp" />
+		</jaxws:serviceBean>
+		<jaxws:properties>
+			<entry key="mtom-enabled" value="true" />
+		</jaxws:properties>
+		<!-- <jaxws:dataBinding><ref bean="addStylesheet"/></jaxws:dataBinding> -->
+	</jaxws:server>
+
+	<jaxrs:server id="root_REST" address="/">
+		<jaxrs:serviceBeans>
+			<ref bean="root_facade" />
+		</jaxrs:serviceBeans>
+		<jaxrs:properties>
+			<entry key="org.apache.cxf.endpoint.private" value="true" />
+		</jaxrs:properties>
+	</jaxrs:server>
+
+	<jaxrs:server id="master_REST" address="/rest"
+		staticSubresourceResolution="true">
+		<jaxrs:serviceBeans>
+			<ref bean="webapp" />
+		</jaxrs:serviceBeans>
+		<jaxrs:features>
+			<!-- <cxf:logging /> --><!-- NOISY! -->
+		</jaxrs:features>
+		<jaxrs:providers>
+			<ref bean="ExceptionProvider.AccessDenied" />
+			<ref bean="ExceptionProvider.BadInputPortName" />
+			<ref bean="ExceptionProvider.BadPropertyValue" />
+			<ref bean="ExceptionProvider.BadStateChange" />
+			<ref bean="ExceptionProvider.FilesystemAccess" />
+			<ref bean="ExceptionProvider.GeneralFailure" />
+			<ref bean="ExceptionProvider.IllegalArgument" />
+			<ref bean="ExceptionProvider.ImplementationProblem" />
+			<ref bean="ExceptionProvider.InvalidCredential" />
+			<ref bean="ExceptionProvider.JAXBException" />
+			<ref bean="ExceptionProvider.NegotiationFailed" />
+			<ref bean="ExceptionProvider.NoCreate" />
+			<ref bean="ExceptionProvider.NoCredential" />
+			<ref bean="ExceptionProvider.NoDestroy" />
+			<ref bean="ExceptionProvider.NoDirectoryEntry" />
+			<ref bean="ExceptionProvider.NoListener" />
+			<ref bean="ExceptionProvider.NoUpdate" />
+			<ref bean="ExceptionProvider.NotOwner" />
+			<ref bean="ExceptionProvider.Overloaded" />
+			<ref bean="ExceptionProvider.UnknownRun" />
+			<ref bean="MessagingProvider.File" />
+			<ref bean="MessagingProvider.FileConcatenation" />
+			<ref bean="MessagingProvider.FileSegment" />
+			<ref bean="MessagingProvider.InputStream" />
+			<ref bean="MessagingProvider.T2flow" />
+			<ref bean="MessagingProvider.Permission" />
+			<ref bean="MessagingProvider.URIList" />
+			<ref bean="MessagingProvider.ZipStream" />
+			<ref bean="jsonProvider" />
+			<ref bean="atomEntryHandler" />
+			<ref bean="atomFeedHandler" />
+			<bean class="org.apache.cxf.jaxrs.model.wadl.WadlGenerator">
+				<property name="addResourceAndMethodIds" value="true"/>
+			</bean>
+		</jaxrs:providers>
+		<jaxrs:outInterceptors>
+			<ref bean="Interceptor.FlushThreadLocalCache" />
+		</jaxrs:outInterceptors>
+ 	</jaxrs:server>
+
+	<jaxrs:server id="AtomFeed" address="/feed">
+		<jaxrs:serviceBeans>
+			<ref bean="feed" />
+		</jaxrs:serviceBeans>
+		<jaxrs:properties>
+			<entry key="org.apache.cxf.endpoint.private" value="true" />
+		</jaxrs:properties>
+		<jaxrs:providers>
+			<ref bean="atomEntryHandler" />
+			<ref bean="atomFeedHandler" />
+		</jaxrs:providers>
+	</jaxrs:server>
+
+	<jaxrs:server id="AdministrationInterface" address="/admin"
+		staticSubresourceResolution="true">
+		<jaxrs:serviceBeans>
+			<ref bean="admin" />
+		</jaxrs:serviceBeans>
+		<jaxrs:providers>
+			<ref bean="jsonProvider" />
+		</jaxrs:providers>
+	</jaxrs:server>
+
+	<bean id="jsonProvider" class="org.apache.cxf.jaxrs.provider.json.JSONProvider">
+		<property name="ignoreNamespaces" value="true" />
+		<property name="namespaceMap" ref="jsonNamespaceMap" />
+	</bean>
+	<util:map id="jsonNamespaceMap" key-type="java.lang.String"
+		value-type="java.lang.String">
+		<entry key="http://www.w3.org/1999/xlink" value="" />
+		<entry key="http://www.w3.org/2000/09/xmldsig#" value="" />
+		<entry key="http://schema.ogf.org/urf/2003/09/urf" value="" />
+		<entry key="http://ns.taverna.org.uk/2010/xml/server/" value="" />
+		<entry key="http://ns.taverna.org.uk/2010/xml/server/rest/" value="" />
+		<entry key="http://ns.taverna.org.uk/2010/xml/server/soap/" value="" />
+		<entry key="http://ns.taverna.org.uk/2010/xml/server/feed/" value="" />
+		<entry key="http://ns.taverna.org.uk/2010/xml/server/admin/" value="" />
+		<entry key="http://ns.taverna.org.uk/2010/port/" value="" />
+		<entry key="http://ns.taverna.org.uk/2010/run/" value="" />
+	</util:map>
+
+	<bean id="root_facade" class="org.taverna.server.master.facade.Facade">
+		<property name="file" value="/welcome.html" />
+		<property name="contextualizer" ref="contextualizer" />
+	</bean>
+
+	<bean class="org.taverna.server.master.common.Uri.Rewriter"
+		autowire="byType" id="URI-Rewriter-Thunk">
+		<property name="suppressSecurity" value="${suppressRewriteEngine}" />
+		<property name="rewriteTarget" value="${default.webapp}" />
+	</bean>
+	<security:authentication-manager>
+		<security:authentication-provider ref="workflowInternalAuthProvder" />
+		<security:authentication-provider ref="authProvider" />
+	</security:authentication-manager>
+
+	<bean id="WSDLHeadOptionsInterceptor"
+		class="org.taverna.server.master.utils.WSDLHeadOptionsInterceptor" />
+	<cxf:bus>
+		<cxf:inInterceptors>
+			<ref bean="WSDLHeadOptionsInterceptor" />
+		</cxf:inInterceptors>
+	</cxf:bus>
+
+	<aop:aspectj-autoproxy proxy-target-class="true" />
+	<security:global-method-security
+		jsr250-annotations="enabled" />
+
+	<security:http realm="${http.realmName}" create-session="never"
+		use-expressions="true">
+		<security:http-basic />
+		<security:intercept-url pattern="/"
+			requires-channel="any" access="permitAll" />
+		<security:intercept-url pattern="/rest"
+			requires-channel="${requiredChannel}" access="permitAll" />
+		<security:intercept-url pattern="/rest/"
+			requires-channel="${requiredChannel}" access="permitAll" />
+		<security:intercept-url pattern="/rest/policy"
+			requires-channel="${requiredChannel}" access="permitAll" />
+		<security:intercept-url pattern="/rest/policy/"
+			requires-channel="${requiredChannel}" access="permitAll" />
+		<security:intercept-url pattern="/services/**"
+			requires-channel="${requiredChannel}" access="permitAll" />
+		<security:intercept-url pattern="/soap/**" method="GET"
+			requires-channel="${requiredChannel}" access="permitAll" />
+		<security:intercept-url pattern="/soap/**" method="POST"
+			requires-channel="${requiredChannel}"
+			access="hasRole('ROLE_tavernauser')" />
+		<security:intercept-url pattern="/admin"
+			requires-channel="${requiredChannel}"
+			access="hasRole('ROLE_tavernasuperuser')" />
+		<security:intercept-url pattern="/admin/**"
+			requires-channel="${requiredChannel}"
+			access="hasRole('ROLE_tavernasuperuser')" />
+		<security:intercept-url pattern="/rest/**"
+			requires-channel="${requiredChannel}"
+			access="hasAnyRole('ROLE_tavernauser','ROLE_tavernaworkflow')" />
+		<security:intercept-url pattern="/feed"
+			requires-channel="${requiredChannel}"
+			access="hasRole('ROLE_tavernauser')" />
+		<security:intercept-url pattern="/feed/**"
+			requires-channel="${requiredChannel}"
+			access="hasRole('ROLE_tavernauser')" />
+	</security:http>
+</beans>