Remove still unsupported methods of RegistryWS
[jabaws.git] / webservices / compbio / ws / client / Jws2Client.java
index dbe999a..cf0cf23 100644 (file)
@@ -56,6 +56,7 @@ import compbio.data.sequence.ScoreManager;
 import compbio.data.sequence.SequenceUtil;\r
 import compbio.data.sequence.UnknownFileFormatException;\r
 import compbio.metadata.JobSubmissionException;\r
+import compbio.metadata.JobStatus;\r
 import compbio.metadata.Option;\r
 import compbio.metadata.Limit;\r
 import compbio.metadata.Preset;\r
@@ -321,10 +322,10 @@ public class Jws2Client {
        private static void listAllServices(String hostname) throws WebServiceException, IOException {\r
                RegistryWS registry = connectToRegistry(hostname);\r
                Set<Services> func_services = Collections.emptySet();\r
-               Set<Services> nonfunc_services = Collections.emptySet();\r
+               //Set<Services> nonfunc_services = Collections.emptySet();\r
                if (registry != null) {\r
                        func_services = registry.getSupportedServices();\r
-                       nonfunc_services = registry.getNonoperatedServices();\r
+                       //nonfunc_services = registry.getNonoperatedServices();\r
                        FileUtil.closeSilently(((Closeable) registry));\r
                } else {\r
                        System.out.println("Failed to connect to the registry! ");\r
@@ -335,11 +336,13 @@ public class Jws2Client {
                        String mess = "\n\rThe list:\n";\r
                        System.out.println(mess + Services.toString(func_services));\r
                }\r
+               /*\r
                if (!nonfunc_services.isEmpty()) {\r
                        System.out.println("There are " + nonfunc_services.size() + " non-available services at " + hostname + ":");\r
                        String mess = "The list (internal tests failed): ";\r
                        System.out.println(mess + Services.toString(nonfunc_services));\r
                }\r
+               */\r
        }\r
 \r
        /**\r
@@ -372,6 +375,8 @@ public class Jws2Client {
                        }\r
                        System.out.println("\n\rcalling predictor.........");\r
                        Thread.sleep(100);\r
+                       JobStatus status = wsproxy.getJobStatus(jobId);\r
+                       System.out.println("\njob " + jobId + " status: " + status);\r
                        scores = wsproxy.getAnnotation(jobId);\r
                } catch (JobSubmissionException e) {\r
                        System.err.println("Exception while submitting job to a web server. Exception details are below:");\r
@@ -460,7 +465,12 @@ public class Jws2Client {
                                jobId = msaws.align(fastalist);\r
                        }\r
                        System.out.println("\ncalling program.........");\r
-                       Thread.sleep(100);\r
+                       long startTime = System.nanoTime();\r
+                       while (JobStatus.RUNNING == msaws.getJobStatus(jobId)) {\r
+                               Thread.sleep(1000);\r
+                               long endTime = System.nanoTime();\r
+                               System.out.println("job " + jobId + " time executing: "+ (endTime - startTime) / 1000000 +" msec, status: " + msaws.getJobStatus(jobId));\r
+                       }\r
                        alignment = msaws.getResult(jobId);\r
                } catch (IOException e) {\r
                        System.err.println("Exception while reading the input file. Check that the input file is a FASTA file! "\r