1 7 package org.jboss.test.webservice.version; 8 9 11 import junit.framework.Test; 12 import org.jboss.test.webservice.WebserviceTestBase; 13 14 import javax.naming.InitialContext ; 15 import javax.xml.rpc.Service ; 16 17 23 public class VersionTestCase extends WebserviceTestBase 24 { 25 27 public VersionTestCase(String name) 28 { 29 super(name); 30 } 31 32 33 public static Test suite() throws Exception 34 { 35 return getDeploySetup(VersionTestCase.class, "ws4ee-version-client.jar"); 36 } 37 38 41 public void testEndpoint() throws Exception 42 { 43 InitialContext iniCtx = getClientContext(); 44 Service service = (Service )iniCtx.lookup("java:comp/env/service/VersionService"); 45 Version port = (Version)service.getPort(Version.class); 46 47 String versionStr = port.getVersion(); 48 System.out.println("Version: " + versionStr); 49 assertNotNull(versionStr); 50 } 51 } 52 | Popular Tags |