1 22 package org.jboss.test.webservice.jbws484; 23 24 import javax.naming.InitialContext ; 25 import javax.xml.rpc.Service ; 26 27 import junit.framework.Test; 28 29 import org.jboss.test.webservice.WebserviceTestBase; 30 31 39 public class JBWS484TestCase extends WebserviceTestBase 40 { 41 private static TestService_PortType endpoint; 42 43 public JBWS484TestCase(String name) 44 { 45 super(name); 46 } 47 48 public static Test suite() throws Exception 49 { 50 return getDeploySetup(JBWS484TestCase.class, "ws4ee-jbws484.war, ws4ee-jbws484-client.jar"); 51 } 52 53 public void setUp() throws Exception 54 { 55 super.setUp(); 56 if (endpoint == null) 57 { 58 InitialContext iniCtx = getClientContext(); 59 Service service = (Service )iniCtx.lookup("java:comp/env/service/TestService"); 60 endpoint = (TestService_PortType)service.getPort(TestService_PortType.class); 61 } 62 } 63 64 public void testValidAccess() throws Exception 65 { 66 int retObj = endpoint.testMethod("Hello", "Server"); 67 assertEquals("HelloServer".length(), retObj); 68 } 69 } 70 | Popular Tags |