From 62eb845d2933c7f597b38ed1c3151528cbdce5cd Mon Sep 17 00:00:00 2001 From: Charles Ofoegbu Date: Mon, 17 Nov 2014 13:45:23 +0000 Subject: [PATCH] JAL-1043 patch to show warning dialog when webservice exception is thrown --- src/jalview/ws/jws2/JabaWsServerQuery.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/jalview/ws/jws2/JabaWsServerQuery.java b/src/jalview/ws/jws2/JabaWsServerQuery.java index 2eb484b..6cca61b 100644 --- a/src/jalview/ws/jws2/JabaWsServerQuery.java +++ b/src/jalview/ws/jws2/JabaWsServerQuery.java @@ -24,12 +24,15 @@ package jalview.ws.jws2; import jalview.bin.Cache; +import jalview.gui.Desktop; import jalview.ws.jws2.jabaws2.Jws2Instance; import jalview.ws.jws2.jabaws2.Jws2InstanceFactory; import java.util.HashSet; import java.util.Set; +import javax.swing.JOptionPane; + import compbio.data.msa.Category; import compbio.data.msa.JABAService; import compbio.ws.client.Jws2Client; @@ -131,8 +134,13 @@ public class JabaWsServerQuery implements Runnable // svccategories.toString()); } - } catch (Exception ex) + } catch (javax.xml.ws.WebServiceException ex) { + JOptionPane + .showInternalMessageDialog( + Desktop.desktop, + "Exception whilst trying to access the webservice registry:", + "Webservice glitch", JOptionPane.WARNING_MESSAGE); System.err.println("Exception whilst trying to get at registry:"); ex.printStackTrace(); // if that failed, then we are probably working with a JABAWS1 server. @@ -144,6 +152,10 @@ public class JabaWsServerQuery implements Runnable srv_set.add(srv); } } + catch (Exception ex) + { + ex.printStackTrace(); + } for (Category cat : categories) { for (Services srv : cat.getServices()) -- 1.7.10.2