1 22 package org.jboss.test.webservice.jbws424; 23 24 import junit.framework.Test; 25 import org.jboss.test.webservice.WebserviceTestBase; 26 27 import javax.naming.InitialContext ; 28 import javax.xml.rpc.Service ; 29 30 38 public class JBWS424TestCase extends WebserviceTestBase 39 { 40 42 public JBWS424TestCase(String name) 43 { 44 super(name); 45 } 46 47 48 public static Test suite() throws Exception  49 { 50 return getDeploySetup(JBWS424TestCase.class, "ws4ee-jbws424.war, ws4ee-jbws424-client.jar"); 51 } 52 53 public void testEndpoint() throws Exception  54 { 55 InitialContext iniCtx = getClientContext(); 56 Service service = (Service )iniCtx.lookup("java:comp/env/service/TestService"); 57 TestSEI port = (TestSEI)service.getPort(TestSEI.class); 58 59 try 60 { 61 port.doStuff("A more appropiate test string"); 62 fail("Expected Exception2"); 63 } 64 catch (Exception2 ex) 65 { 66 assertEquals("Some exception description", ex.getDescription()); 67 assertEquals("bang", ex.getShortDescr()); 68 } 69 } 70 71 } 72 | Popular Tags |