new services are registered in wsbuild
[jabaws.git] / webservices / compbio / ws / client / Jws2Client.java
index 1fc2a68..ec3cf65 100644 (file)
@@ -164,7 +164,7 @@ public class Jws2Client {
                        if (service.getServiceType() == SequenceAnnotation.class) {\r
                                Map<String, HashSet<Score>> result = analize(inputFile,\r
                                                ((SequenceAnnotation<T>) msaws), preset, customOptions);\r
-                               assert result != null && !result.values().isEmpty() : "No Result reported!";\r
+                               assert !result.values().isEmpty() : "No Result reported!";\r
                                IOHelper.writeOut(outStream, result);\r
                        } else {\r
                                alignment = align(inputFile, (MsaWS<T>) msaws, preset,\r
@@ -212,6 +212,7 @@ public class Jws2Client {
                HashMap<String, HashSet<Score>> scores = null;\r
                try {\r
                        fastalist = SequenceUtil.openInputStream(file.getAbsolutePath());\r
+                       assert !fastalist.isEmpty() : "Input is empty!";\r
 \r
                        String jobId = null;\r
                        if (customOptions != null && preset != null) {\r
@@ -223,11 +224,14 @@ public class Jws2Client {
                        } else if (preset != null) {\r
                                jobId = wsproxy.presetAnalize(fastalist, preset);\r
                        } else {\r
+                               System.out.println("\n\ncalling analise.........");\r
                                jobId = wsproxy.analize(fastalist);\r
                        }\r
                        Thread.sleep(2000);\r
+\r
                        scores = wsproxy.getAnnotation(jobId);\r
-                       assert scores != null && !scores.values().isEmpty() : "Scores are NULL";\r
+                       assert scores != null && !scores.values().isEmpty() : "Scores are NULL for job: "\r
+                                       + jobId;\r
 \r
                } catch (IOException e) {\r
                        System.err\r
@@ -292,11 +296,12 @@ public class Jws2Client {
                        }\r
                }\r
                if (serv == null) {\r
-                       System.err.println("Could not connect to " + url);\r
+                       System.err.println("Could not connect to " + url\r
+                                       + " the server is down?");\r
                        // FIXME\r
                }\r
                JABAService serviceIF = service.getInterface(serv);\r
-               log.log(Level.FINE, "Connected successfully!");\r
+               log.log(Level.INFO, "Connected successfully!");\r
 \r
                return serviceIF;\r
        }\r