From 151d250d28f1a73dc4f5de0f9415d42f38888186 Mon Sep 17 00:00:00 2001 From: RKrom Date: Tue, 20 Nov 2012 15:30:33 +0000 Subject: [PATCH] Fixed issue when the WSDL isn't in the URL git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2296 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- GreenshotJiraPlugin/Jira.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/GreenshotJiraPlugin/Jira.cs b/GreenshotJiraPlugin/Jira.cs index bd8e8030c..ed966020f 100644 --- a/GreenshotJiraPlugin/Jira.cs +++ b/GreenshotJiraPlugin/Jira.cs @@ -26,6 +26,7 @@ using Greenshot.IniFile; using GreenshotJiraPlugin; using GreenshotPlugin.Controls; using GreenshotPlugin.Core; +using GreenshotJiraPlugin.JiraSoap; namespace Jira { #region transport classes @@ -141,7 +142,19 @@ namespace Jira { // This is what needs to be done ThreadStart jiraLogin = delegate { LOG.DebugFormat("Loggin in"); - this.credentials = jira.login(user, password); + try { + this.credentials = jira.login(user, password); + } catch(Exception ex) { + if (!config.Url.EndsWith("wsdl")) { + config.Url = config.Url + "/rpc/soap/jirasoapservice-v2?wsdl"; + jira = new JiraSoapServiceService(); + this.credentials = jira.login(user, password); + IniConfig.Save(); + } else { + throw ex; + } + } + LOG.DebugFormat("Logged in"); this.loggedInTime = DateTime.Now; this.loggedIn = true;