|
|
|
I was unable to reproduce the problem with my own client code:
JiraSoapServiceService jiraSoapServiceGetter = new JiraSoapServiceServiceLocator(); URL newURL = new URL("http://jira.atlassian.com/rpc/soap/jirasoapservice-v2"); JiraSoapService jiraSoapService = jiraSoapServiceGetter.getJirasoapserviceV2(newURL); String token = jiraSoapService.login("soaptester", "soaptester"); RemoteIssue blankIssue = new RemoteIssue(); blankIssue.setProject("TST"); blankIssue.setSummary("Test Issue created by TestSoapThingy"); blankIssue.setType("1"); RemoteIssue cIssue = jiraSoapService.createIssue(token, blankIssue); String theNewKey = cIssue.getKey(); String theProject = cIssue.getProject(); System.out.println("Key: " + theNewKey); System.out.println("Project: " + theProject); I used this code in a test class inside the jira-soapclient project. I compiled the SOAP client code by checking out the latest SOAP client code from http://svn.atlassian.com/svn/public/atlassian/jira-soapclient/trunk Is there something I'm missing? I had not tried a standalone java soap client. I download and built the one you referenced above and everything worked as expected (the getKey() method returned a real value). I modified that client to run against my server and everything still worked. I'm not sure what the difference is when executing java from a plugin vs running as a standalone. below is more of the client code from the plugin: JiraSoapServiceService jiraSoapServiceGetter = new JiraSoapServiceServiceLocator();
// this keys off of the Administration->General Configuration->Base URL setting
String srcJiraURL = ManagerFactory.getApplicationProperties().getString(APKeys.JIRA_BASEURL);
String serverURL=jiraURI;
String endPoint="/rpc/soap/jirasoapservice-v2";
JiraSoapService service = jiraSoapServiceGetter.getJirasoapserviceV2(new URL(serverURL + endPoint));
fToken = service.login(userName, password);
RemoteIssue rIssue = new RemoteIssue();
rIssue.setProject("EHD");
rIssue.setPriority("2");
String issueKey = issue.getKey();
rIssue.setSummary("Jira auto-request to open stream for release "+ streams +" on behalf of " + assigneeValue);
rIssue.setDescription(" Jira auto-request from Grant Promote Approval for issue " + issueKey + ". \n\n" + srcUrl +"/browse/" + issueKey);
rIssue.setAssignee(userName);
rIssue.setReporter(assigneeValue);
rIssue.setType("4");
// Add remote compoments
RemoteComponent component = new RemoteComponent();
component.setId("10010");
component.setName("AccuRev.Streams");
rIssue.setComponents(new RemoteComponent[]{component});
// Run the create issue code
RemoteIssue returnedIssue = service.createIssue(fToken, rIssue);
final String rIssueKey = returnedIssue.getKey();
LogUtils.getGeneral().info("CreateRemoteIssue::execute: SOAP: new issue has been created " + rIssueKey);
LogUtils.getGeneral().info("CreateRemoteIssue::execute: SOAP: new issue has been created " + returnedIssue.getKey());
LogUtils.getGeneral().info("CreateRemoteIssue::execute: SOAP: new issue has been created project" + returnedIssue.getProject());
LogUtils.getGeneral().info("CreateRemoteIssue::execute: SOAP: new issue has been created priority" + returnedIssue.getPriority());
Unless I am missing something the plugin client code is doing the correct thing and should work ... and does for everything except the remote key. Hi Lance,
I will resolve this issue as 'Cannot Be Reproduce' for now and will continue to support you via a support request at JSP-21370 Regards, |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I have replicated this issue with 3.12.2 stubs and it does exist. The RemoteIssue object is returned but the getKey() returns null.
Regards,
Timothy