From 29cb995e1afc60500d32bbe02d5e447a634faafc Mon Sep 17 00:00:00 2001 From: Charles Ofoegbu Date: Mon, 17 Nov 2014 11:04:24 +0000 Subject: [PATCH] JAL-1570 patch to enable adding a webservice which fails validation --- src/jalview/gui/WsPreferences.java | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/jalview/gui/WsPreferences.java b/src/jalview/gui/WsPreferences.java index 876d157..de89241 100644 --- a/src/jalview/gui/WsPreferences.java +++ b/src/jalview/gui/WsPreferences.java @@ -484,6 +484,7 @@ public class WsPreferences extends GWsPreferences Desktop.desktop, MessageManager.getString("info.validate_jabaws_server"), MessageManager.getString("label.test_server"), JOptionPane.YES_NO_OPTION); + if (validate == JOptionPane.OK_OPTION) { if (jalview.ws.jws2.Jws2Discoverer.testServiceUrl(foo)) @@ -492,10 +493,29 @@ public class WsPreferences extends GWsPreferences } else { - JOptionPane - .showInternalMessageDialog( + int opt = JOptionPane + .showInternalOptionDialog( Desktop.desktop, - MessageManager.getString("warn.server_didnt_pass_validation")); + "The Server '" + + foo.toString() + + "' failed validation, do you want to proceed and add it anyway? ", + "Server Validation Failed", + JOptionPane.YES_NO_OPTION, + JOptionPane.INFORMATION_MESSAGE, null, null, null); + if (opt == JOptionPane.YES_OPTION) + { + return foo.toString(); + } + else + { + JOptionPane + .showInternalMessageDialog( + Desktop.desktop, + MessageManager + .getString("warn.server_didnt_pass_validation")); + } + + } } else -- 1.7.10.2