1 22 package org.jboss.test.webservice.wsdlimport; 23 24 import junit.framework.Test; 25 import org.jboss.test.JBossTestCase; 26 import org.jboss.test.webservice.WebserviceTestBase; 27 import org.jboss.test.webservice.admindevel.Hello; 28 29 import javax.naming.InitialContext ; 30 import javax.xml.namespace.QName ; 31 import javax.xml.rpc.Call ; 32 import javax.xml.rpc.Service ; 33 import javax.xml.rpc.ServiceFactory ; 34 import java.net.URL ; 35 36 42 public class SchemaImportTestCase extends WebserviceTestBase 43 { 44 public SchemaImportTestCase(String name) 45 { 46 super(name); 47 } 48 49 public static Test suite() throws Exception 50 { 51 return getDeploySetup(SchemaImportTestCase.class, "ws4ee-wsdlimport-schema.war, ws4ee-wsdlimport-schema-client.jar"); 52 } 53 54 public void testHello() throws Exception 55 { 56 InitialContext iniCtx = getClientContext(); 57 Service service = (Service )iniCtx.lookup("java:comp/env/service/HelloService"); 58 Hello helloPort = (Hello)service.getPort(Hello.class); 59 60 String retstr = helloPort.helloString("Tom"); 61 assertEquals("Hello Tom!", retstr); 62 } 63 } 64 | Popular Tags |