<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>clover.license</filename>
    </added>
    <added>
      <filename>src/main/java/org/agilos/jira/service/UserServiceImpl.java</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -16,26 +16,32 @@
 	&lt;name&gt;Zendesk JIRA plugin&lt;/name&gt;
 	&lt;description&gt;Plugin for JIRA providing Zendesk integration&lt;/description&gt;
 	&lt;url&gt;http://agilos.org/display/zen/ZenDesk+JIRA+plugin&lt;/url&gt;
-	
-    &lt;licenses&gt;
+
+	&lt;licenses&gt;
 		&lt;license&gt;
 			&lt;name&gt;Apache License V2.0&lt;/name&gt;
 			&lt;url&gt;http://www.apache.org/licenses/LICENSE-2.0.txt&lt;/url&gt;
 			&lt;distribution&gt;repo&lt;/distribution&gt;
 		&lt;/license&gt;
 	&lt;/licenses&gt;
-	
+
 	&lt;scm&gt;
 		&lt;connection&gt;http://svn.agilos.org/svn/public/zendesk-jira-plugin/&lt;/connection&gt;
 		&lt;developerConnection&gt;http://svn.agilos.org/svn/public/zendesk-jira-plugin/&lt;/developerConnection&gt;
 		&lt;url&gt;http://fisheye.agilos.org/browse/Agilos/zendesk-jira-plugin&lt;/url&gt;
 	&lt;/scm&gt;
-	
+
 	&lt;issueManagement&gt;
 		&lt;system&gt;JIRA&lt;/system&gt;
 		&lt;url&gt;http://jira.agilos.org/browse/ZEN&lt;/url&gt;
 	&lt;/issueManagement&gt;
 
+	&lt;organization&gt;
+		&lt;name&gt;Agilos&lt;/name&gt;
+		&lt;url&gt;http://agilos.org&lt;/url&gt;
+	&lt;/organization&gt;
+
+
 	&lt;developers&gt;
 		&lt;developer&gt;
 			&lt;name&gt;Mikis Seth S&#248;rensen&lt;/name&gt;
@@ -91,23 +97,57 @@
             	&lt;historyDir&gt;${user.home}/history/${project.artifact}&lt;/historyDir&gt;
             	&lt;/configuration&gt;
       		&lt;/plugin&gt;
-      		&lt;plugin&gt;
-      		&lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
-      		&lt;artifactId&gt;axistools-maven-plugin&lt;/artifactId&gt;
-      		&lt;executions&gt;
-      		&lt;execution&gt;
-      		&lt;goals&gt;
-      		&lt;goal&gt;wsdl2java&lt;/goal&gt;
-      		&lt;/goals&gt;
-      		&lt;configuration&gt;
-      		&lt;packageSpace&gt;org.agilos.jira.soapclient&lt;/packageSpace&gt;
-      		&lt;/configuration&gt;
-      		&lt;/execution&gt;
-      		&lt;/executions&gt;
-      		&lt;/plugin&gt;
+	&lt;plugin&gt;
+		&lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
+		&lt;artifactId&gt;axistools-maven-plugin&lt;/artifactId&gt;
+		&lt;executions&gt;
+			&lt;execution&gt;
+				&lt;goals&gt;
+					&lt;goal&gt;wsdl2java&lt;/goal&gt;
+				&lt;/goals&gt;
+				&lt;configuration&gt;
+					&lt;packageSpace&gt;org.agilos.jira.soapclient&lt;/packageSpace&gt;
+					&lt;/configuration&gt;
+			&lt;/execution&gt;
+		&lt;/executions&gt;
+	&lt;/plugin&gt;
+	&lt;plugin&gt;
+                &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
+                &lt;executions&gt;
+                    &lt;execution&gt;
+                        &lt;id&gt;copy-plugin-artifact&lt;/id&gt;
+                        &lt;phase&gt;pre-integration-test&lt;/phase&gt;
+                        &lt;goals&gt;
+                            &lt;goal&gt;run&lt;/goal&gt;
+                        &lt;/goals&gt;
+                        &lt;configuration&gt;
+                            &lt;tasks&gt;
+                                &lt;copy file=&quot;${project.artifact.file}&quot; todir=&quot;${tmp.webapp.dir}/WEB-INF/lib/&quot;/&gt;
+                                &lt;echo file=&quot;${project.build.directory}/test-classes/localtest.properties&quot;&gt;
+                                    jira.protocol=http
+                                    jira.host=localhost
+                                    jira.context=/jira
+                                    jira.tmp=target/test-tmp/
+                                    jira.xml.data.location=src/test/xml/
+                                    jira.port=${http.port}
+                                    jira.edition=enterprise
+                                &lt;/echo&gt;
+					&lt;/tasks&gt;
+					&lt;/configuration&gt;
+				&lt;/execution&gt;
+			&lt;execution&gt;
+			&lt;id&gt;post-integration-test-user-ant-tasks&lt;/id&gt;
+			&lt;configuration&gt;
+				&lt;tasks&gt;
+					&lt;echo message=&quot;Ant task _after_ integration tests.&quot; /&gt;
+				&lt;/tasks&gt;
+			&lt;/configuration&gt;
+		&lt;/execution&gt;
+	&lt;/executions&gt;
+&lt;/plugin&gt;
     &lt;/plugins&gt;
   &lt;/build&gt;
   &lt;properties&gt;  
-      &lt;jira.start&gt;false&lt;/jira.start&gt;
+      &lt;jira.start&gt;true&lt;/jira.start&gt;
   &lt;/properties&gt;
 &lt;/project&gt;</diff>
      <filename>pom.xml</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,9 @@
 package org.agilos.jira.service;
 
+import com.atlassian.jira.notification.type.RemoteUser;
+
 public interface UserService {
 
+	RemoteUser[] getAssignableUsers(String projectKey);
+
 }</diff>
      <filename>src/main/java/org/agilos/jira/service/UserService.java</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,13 @@
 package org.agilos.jira.ws;
 
-import org.agilos.jira.soapclient.RemoteAuthenticationException;
-import org.agilos.jira.soapclient.RemoteException;
-import org.agilos.jira.soapclient.RemotePermissionException;
-import org.agilos.jira.soapclient.RemoteUser;
+import com.atlassian.jira.notification.type.RemoteUser;
+import com.atlassian.jira.rpc.exception.RemoteAuthenticationException;
+import com.atlassian.jira.rpc.exception.RemoteException;
+import com.atlassian.jira.rpc.exception.RemotePermissionException;
 
 public interface AgilosSoapService {
 	/**
-     * Returns an array of all user which can be assigned to a project.
+     * Returns an array of all users which can be assigned to a project.
      *
      * @param token the SOAP authentication token.
      * @param projectKey the key of the requested project</diff>
      <filename>src/main/java/org/agilos/jira/ws/AgilosSoapService.java</filename>
    </modified>
    <modified>
      <diff>@@ -1,15 +1,16 @@
 package org.agilos.jira.ws;
 
 import org.agilos.jira.service.UserService;
-import org.agilos.jira.soapclient.RemoteAuthenticationException;
-import org.agilos.jira.soapclient.RemoteException;
-import org.agilos.jira.soapclient.RemotePermissionException;
-import org.agilos.jira.soapclient.RemoteUser;
 
+import com.atlassian.jira.notification.type.RemoteUser;
 import com.atlassian.jira.rpc.auth.TokenManager;
+import com.atlassian.jira.rpc.exception.RemoteAuthenticationException;
+import com.atlassian.jira.rpc.exception.RemoteException;
+import com.atlassian.jira.rpc.exception.RemotePermissionException;
+import com.opensymphony.user.User;
 
 public class AgilosSoapServiceImpl implements AgilosSoapService {
-	private TokenManager tokenManager;
+	private TokenManager tokenManager; // The TokenManager functionality is very much inspired by the com.atlassian.jira.rpc.auth.TokenManager
 	private UserService userService;
 	
 	public AgilosSoapServiceImpl(TokenManager tokenManager, UserService userService)
@@ -17,11 +18,48 @@ public class AgilosSoapServiceImpl implements AgilosSoapService {
         this.tokenManager = tokenManager;
         this.userService = userService;
     }
-	public RemoteUser[] getAssignableUsers(String token, String projectKey)
-			throws RemotePermissionException, RemoteAuthenticationException,
-			RemoteException {
-		// TODO Auto-generated method stub
-		return null;
-	}
+	public void setTokenManager(TokenManager tokenManager)
+    {
+        this.tokenManager = tokenManager;
+    }
+
+    /**
+     * This ability to resolve a token into a user name is used by the JIRA logging and is not exposed on the SOAP
+     * service interface itself.
+     *
+     * @param token the given out previously via {@link @#login}
+     * @return the user name behind that token or null if the token is not valid
+     * @throws RemotePermissionException 
+     * @throws RemoteAuthenticationException 
+     */
+    public String resolveTokenToUserName(final String token) throws RemoteAuthenticationException, RemotePermissionException
+    {
+            User user = tokenManager.retrieveUserNoPermissionCheck(token);
+            return user == null ? null : user.getName();
+    }
+
+    /**
+     * This is called to work out which parameter the token is given a method name
+     *
+     * @param operationName the name of the SOAP operation
+     * @return the parameter index of the user token
+     */
+    public int getTokenParameterIndex(final String operationName)
+    {
+        return 0;
+    }
+
+    public String login(String username, String password) throws RemoteException, com.atlassian.jira.rpc.exception.RemoteAuthenticationException, com.atlassian.jira.rpc.exception.RemoteException
+    {
+        return tokenManager.login(username, password);
+    }
 
+    public boolean logout(String token)
+    {
+        return tokenManager.logout(token);
+    }
+    
+	public RemoteUser[] getAssignableUsers(String token, String projectKey) {
+		return userService.getAssignableUsers(projectKey);
+	}
 }</diff>
      <filename>src/main/java/org/agilos/jira/ws/AgilosSoapServiceImpl.java</filename>
    </modified>
    <modified>
      <diff>@@ -16,9 +16,9 @@
         &lt;interface&gt;org.agilos.jira.service.UserService&lt;/interface&gt;
     &lt;/component&gt;
 
-    &lt;rpc-soap key=&quot;soap&quot; name=&quot;Zendesk SOAP Services&quot; class=&quot;org.agilos.jira.ws.JiraSoapServiceImpl&quot;&gt;
+    &lt;rpc-soap key=&quot;soap&quot; name=&quot;Zendesk SOAP Services&quot; class=&quot;org.agilos.jira.ws.AgilosSoapServiceImpl&quot;&gt;
         &lt;description&gt;The Zendesk JIRA SOAP services.&lt;/description&gt;
         &lt;service-path&gt;agilossoapservice-v1&lt;/service-path&gt;
-        &lt;published-interface&gt;org.agilos.jira.ws.JiraSoapService&lt;/published-interface&gt;
+        &lt;published-interface&gt;org.agilos.jira.ws.AgilosSoapService&lt;/published-interface&gt;
     &lt;/rpc-soap&gt;
 &lt;/atlassian-plugin&gt;</diff>
      <filename>src/main/resources/atlassian-plugin.xml</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,12 @@ import java.util.Set;
 
 import javax.xml.rpc.ServiceException;
 
-import org.agilos.jira.soapclient.*;
+import org.agilos.jira.soapclient.JiraSoapService;
+import org.agilos.jira.soapclient.JiraSoapServiceService;
+import org.agilos.jira.soapclient.JiraSoapServiceServiceLocator;
+import org.agilos.jira.soapclient.RemotePermissionScheme;
+import org.agilos.jira.soapclient.RemoteProject;
+import org.agilos.jira.soapclient.RemoteProjectRole;
 import org.apache.commons.lang.NotImplementedException;
 
 public class WebserviceFixture {
@@ -23,9 +28,7 @@ public class WebserviceFixture {
 	static final String PROJECT_DESCRIPTION = &quot;This is a Zendesk JIRA plugin integrationtest project &quot; + new Date();
 	static final String PROJECT_LEAD = &quot;bamboo&quot;;
 
-	public WebserviceFixture() throws ServiceException,
-			RemoteAuthenticationException,
-			org.agilos.jira.soapclient.RemoteException, RemoteException {
+	public WebserviceFixture() throws ServiceException, RemoteException {
 		JiraSoapServiceService jiraSoapServiceGetter = new JiraSoapServiceServiceLocator();
 		jiraSoapService = jiraSoapServiceGetter.getJirasoapserviceV2();
 		token = jiraSoapService.login(LOGIN_NAME, LOGIN_PASSWORD);</diff>
      <filename>src/test/java/org/agilos/zendesk_jira_plugin/integrationtest/WebserviceFixture.java</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>src/main/java/org/agilos/zendesk_jira_plugin/integrationtest/ClientConstants.java</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>369040f12d77b7f43dd8f9f8665d20cffe0a9740</id>
    </parent>
  </parents>
  <author>
    <name>mikis</name>
    <email>mikis@f5b5b895-cfb1-4645-b906-73037d8a9abe</email>
  </author>
  <url>http://github.com/zendesk/zendesk-jira-plugin/commit/9bb4b7b8196b1d881a3df4eef2148f65652aa199</url>
  <id>9bb4b7b8196b1d881a3df4eef2148f65652aa199</id>
  <committed-date>2009-04-01T12:15:52-07:00</committed-date>
  <authored-date>2009-04-01T12:15:52-07:00</authored-date>
  <message>ZEN-6: Assignable users WS, Bit of cleaning up</message>
  <tree>dc6d3bd83e50baf7c7299a0c49627fbaab8f0bb5</tree>
  <committer>
    <name>mikis</name>
    <email>mikis@f5b5b895-cfb1-4645-b906-73037d8a9abe</email>
  </committer>
</commit>
