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
This commit is contained in:
RKrom 2012-11-20 15:30:33 +00:00
commit 151d250d28

View file

@ -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");
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;