X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=testsrc%2Fcompbio%2Fws%2Fclient%2FTestAAConWS.java;h=e0b002c3c9d72aca514d7424db62bcc9a0e581d4;hb=6adca61e46b4daf4136621f942f313c74e44e61d;hp=a6affb92d425be43101d63c57ff8114768c24063;hpb=0c69f6b897b652489cdf0e740bb01cef51cc60c1;p=jabaws.git diff --git a/testsrc/compbio/ws/client/TestAAConWS.java b/testsrc/compbio/ws/client/TestAAConWS.java index a6affb9..e0b002c 100644 --- a/testsrc/compbio/ws/client/TestAAConWS.java +++ b/testsrc/compbio/ws/client/TestAAConWS.java @@ -8,21 +8,17 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; import java.util.ArrayList; import java.util.HashSet; import java.util.List; -import javax.xml.namespace.QName; -import javax.xml.ws.Service; - import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import compbio.data.msa.Annotation; +import compbio.data.msa.JABAService; import compbio.data.sequence.FastaSequence; -import compbio.data.sequence.Method; +import compbio.data.sequence.ConservationMethod; import compbio.data.sequence.Score; import compbio.data.sequence.SequenceUtil; import compbio.metadata.JobSubmissionException; @@ -41,18 +37,19 @@ public class TestAAConWS { @BeforeTest void initConnection() { - URL url = null; - try { - url = new URL("http://localhost:8080/jabaws/AAConWS?wsdl"); - } catch (MalformedURLException e) { - e.printStackTrace(); - fail(e.getLocalizedMessage()); - } - String namespace = "http://msa.data.compbio/01/12/2010/"; - QName qname = new QName(namespace, "AAConWS"); - Service serv = Service.create(url, qname); - msaws = serv.getPort(new QName(namespace, "AAConWSPort"), - Annotation.class); + /* + * URL url = null; try { url = new + * URL("http://localhost:8080/jabaws/AAConWS?wsdl"); } catch + * (MalformedURLException e) { e.printStackTrace(); + * fail(e.getLocalizedMessage()); } String namespace = + * "http://msa.data.compbio/01/12/2010/"; QName qname = new + * QName(namespace, "AAConWS"); Service serv = Service.create(url, + * qname); msaws = serv.getPort(new QName(namespace, "AAConWSPort"), + * Annotation.class); + */ + JABAService client = Jws2Client.connect("http://localhost:8080/jabaws", + Services.AAConWS); + msaws = (Annotation) client; } @Test @@ -83,7 +80,7 @@ public class TestAAConWS { HashSet result = msaws.getAnnotation(jobId); assertNotNull(result); assertEquals(result.size(), 1); - assertEquals(result.iterator().next().getMethod(), Method.SHENKIN); + assertEquals(result.iterator().next().getMethod(), ConservationMethod.SHENKIN); List scores = result.iterator().next().getScores(); assertNotNull(scores); assertEquals(scores.size(), 568);