I try use jira soap api on c#:
http://jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl
write next code:
static void Main(string[] args)
{
var jiraLogin = "soaptester";
var jiraPassword = "soaptester";
var jiraClient = new JiraTest.JiraSoapServiceClient();
var projects = jiraClient.getProjects();
}
But this code throw exepition that I'm not autentificate yet.
I try find login
method, but it have next signature:
public void login();
Where are no loginname and password parameters. When I use this login method code throw exeption that login or password invalid. And I don't known where I must set my credentials.
How I can login with jira soap api before call needed method?
Added: see https://developer.atlassian.com/display/JIRADEV/Creating+a+JIRA+SOAP+Client
To authorise access to the Jira API, you need to provide the base URL of your Jira instance. If you're a Jira Cloud user, the base URL is the part that ends with atlassian.net e.g. https://mycompany.atlassian.net. When using Jira Cloud, you have to authenticate with Jira API by using the API token instead of password.
The Jira Software and Jira Service Management applications have REST APIs for their application-specific features, like sprints (Jira Software) or customer requests (Jira Service Management). If you haven't used the Jira REST APIs before, make sure you read the Atlassian REST API policy.
I had the same problem and found the answer. You need to add it as a Web Reference. It will bring in the parameters but as they appear in the WSDL so login(string username, string password) become login(string in0, string in1) but atleast it's usable.
So steps:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With