From: Charles Ofoegbu Date: Mon, 17 Nov 2014 11:04:24 +0000 (+0000) Subject: JAL-1570 patch to enable adding a webservice which fails validation X-Git-Tag: Release_2_8_2b1^2~32^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=29cb995e1afc60500d32bbe02d5e447a634faafc;p=jalview.git JAL-1570 patch to enable adding a webservice which fails validation --- 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