Improved consistency between JPredWS and MsaWS
[jalview.git] / src / jalview / ws / MsaWSClient.java
index 1507c12..876c0c1 100755 (executable)
@@ -16,20 +16,13 @@ import vamsas.objects.*;
 
 
 public class MsaWSClient
+    extends WSClient
 {
-  int jobsRunning = 0;
-  ext.vamsas.MuscleWS server;
-  WebserviceInfo wsInfo;
-  /**
-   * MsaWSClient
-   *
-   * @param msa SequenceI[]
-   */
-
-  String WebServiceName;
-  String WebServiceJobTitle;
-  String WebServiceReference;
-  String WsURL;
+    /**
+     * server is a WSDL2Java generated stub for an archetypal MsaWSI service.
+     */
+    ext.vamsas.MuscleWS server;
+
   private boolean setWebService(String MsaWSName) {
     if (MsaWServices.info.containsKey(MsaWSName)) {
       WebServiceName = MsaWSName;
@@ -43,9 +36,6 @@ public class MsaWSClient
     }
   }
 
-//  public MsaWSClient(String MsaWSName, SequenceI[] msa) {
-//    MsaWSClient(MsaWSName, msa, true);
-//  }
 
   public MsaWSClient(String MsaWSName, String altitle, SequenceI[] msa, boolean submitGaps, boolean preserveOrder)
   {
@@ -62,8 +52,7 @@ public class MsaWSClient
     // TODO: MuscleWS transmuted to generic MsaWS client
     MuscleWSServiceLocator loc = new MuscleWSServiceLocator(); // Default
     try {
-      this.server = (MuscleWS) loc.getMuscleWS(// JBPNote will be set from properties
-      new java.net.URL(WsURL));
+      this.server = (MuscleWS) loc.getMuscleWS(new java.net.URL(WsURL));
     }
     catch (Exception ex) {
       wsInfo.setProgressText("Serious! "+WebServiceName+" Service location failed\nfor URL :"
@@ -213,7 +202,8 @@ public class MsaWSClient
       {
         vamsas.objects.simple.WsJobId jobsubmit = server.align(seqs);
         if (jobsubmit.getStatus()==1) {
-          System.out.println(jobId=jobsubmit.getJobId());
+          jobId=jobsubmit.getJobId();
+          System.out.println(WsURL+" Job Id '"+jobId+"'");
         } else {
           throw new Exception(jobsubmit.getJobId());
         }