4 package jalview.ws.jws2;
6 import jalview.bin.Cache;
8 import compbio.data.msa.MsaWS;
9 import compbio.ws.client.Jws2Client;
10 import compbio.ws.client.Services;
16 public class JabaWsServerQuery implements Runnable
19 Jws2Discoverer jws2Discoverer=null;
20 String jwsservers=null;
26 public boolean isRunning()
32 * @param quit the quit to set
34 public void setQuit(boolean quit)
39 public JabaWsServerQuery(Jws2Discoverer jws2Discoverer, String jwsservers)
41 this.jws2Discoverer = jws2Discoverer;
42 this.jwsservers=jwsservers;
46 * @see java.lang.Runnable#run()
54 if (Jws2Client.validURL(jwsservers))
56 boolean noservices=true;
58 for (Services srv : Services.values())
68 service = Jws2Client.connect(jwsservers, srv);
71 System.err.println("Jws2 Discoverer: Problem on "
72 + jwsservers + " with service " + srv + ":\n"
74 if (!(e instanceof javax.xml.ws.WebServiceException))
78 // For moment, report service as a problem.
79 jws2Discoverer.addInvalidServiceUrl(jwsservers);
85 jws2Discoverer.addService(jwsservers, srv, service);
90 jws2Discoverer.addUrlwithnoservices(jwsservers);
95 jws2Discoverer.addInvalidServiceUrl(jwsservers);
96 Cache.log.info("Ignoring invalid Jws2 service url " + jwsservers);
101 Cache.log.warn("Exception when discovering Jws2 services.", e);
102 jws2Discoverer.addInvalidServiceUrl(jwsservers);
105 Cache.log.error("Exception when discovering Jws2 services.", e);
106 jws2Discoverer.addInvalidServiceUrl(jwsservers);