X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=testsrc%2Fcompbio%2Fws%2Fclient%2FTestAAConWS.java;h=19cd0b2c33429fbc004028386e1161651c10fde4;hb=45154567757138fa61f345bee3429246a98f1969;hp=68b59870ec691d1680582228e0d3bdeb6b535bb9;hpb=c6a81e764710c10a6ee8b6c9fbac287d2abd2dfa;p=jabaws.git diff --git a/testsrc/compbio/ws/client/TestAAConWS.java b/testsrc/compbio/ws/client/TestAAConWS.java index 68b5987..19cd0b2 100644 --- a/testsrc/compbio/ws/client/TestAAConWS.java +++ b/testsrc/compbio/ws/client/TestAAConWS.java @@ -8,8 +8,11 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; +import java.net.ConnectException; import java.util.List; +import javax.xml.ws.WebServiceException; + import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; @@ -45,10 +48,17 @@ public class TestAAConWS { * 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 = (SequenceAnnotation) client; + */try { + JABAService client = Jws2Client.connect( + "http://localhost:8080/jabaws", Services.AAConWS); + msaws = (SequenceAnnotation) client; + } catch (ConnectException e) { + e.printStackTrace(); + fail(e.getMessage()); + } catch (WebServiceException e) { + e.printStackTrace(); + fail(e.getMessage()); + } } @Test(groups = {AllTestSuit.test_group_webservices})