This sample demonstrate the access to services from the issue tracking system JIRA. It is the first test (experiment) with the JIRA version 3.2.x.. On the Jira web side you can see the description of a example.
A simple and rapid way to use a JIRA client is to use the class net.sf.crispy.sample.jira.Run
The conrete steps are:
# the user to login crispy.sample.user=soaptester # the password to login crispy.sample.passwd=soaptester # a issue to search crispy.sample.issue=TST-2184 # when the service is a Web-Service crispy.sample.url=http://atlassian01.contegix.com:10083/rpc/soap # OR # when the service is a XML-RPC-Service # crispy.sample.url=http://atlassian01.contegix.com:10083/rpc/xmlrpc
java -classpath [libs] net.sf.crispy.sample.jira.Run
Libs for the JIRA-client:
Properties props = new Properties(); props.put(Property.REMOTE_URL_AND_PORT, http://atlassian01.contegix.com:10083/rpc/soap);
IServiceManager serviceManager = new JiraServiceManager(props, JiraServiceManager.SOAP_SERVICE); JiraService jiraService = (JiraService) serviceManager.createService(JiraService.class);
jiraService.login("user", "passwd");
RemoteUser ru = jiraService.getUser("user"); System.out.println("User: " + ru.getName() + " " + ru.getFullname() + " " + ru.getEmail()); RemoteProject remoteProjects[] = jiraService.getProjects(); for (int i = 0; i < remoteProjects.length; i++) { System.out.println(remoteProjects[i].getId() + " " + remoteProjects[i].getName() + " " + remoteProjects[i].getDescription() + " " + remoteProjects[i].getKey() + " " + remoteProjects[i].getLead() + " " + remoteProjects[i].getProjectUrl()); }
jiraService.logout();