1 22 package org.jboss.test.webservice.jbws79; 23 24 import junit.framework.Test; 25 import org.jboss.test.webservice.WebserviceTestBase; 26 27 import javax.naming.InitialContext ; 28 import javax.xml.namespace.QName ; 29 import javax.xml.rpc.Service ; 30 31 39 public class JBWS79TestCase extends WebserviceTestBase 40 { 41 43 public JBWS79TestCase(String name) 44 { 45 super(name); 46 } 47 48 49 public static Test suite() throws Exception  50 { 51 return getDeploySetup(JBWS79TestCase.class, "ws4ee-jbws79.war, ws4ee-jbws79-client.jar"); 52 } 53 54 56 public void testEndpointOne() throws Exception  57 { 58 InitialContext iniCtx = getClientContext(); 59 Service service = (Service )iniCtx.lookup("java:comp/env/service/HelloOneService"); 60 HelloOne hello = (HelloOne)service.getPort(HelloOne.class); 61 62 String in0 = "Kermit"; 63 assertEquals(in0, hello.echoString(in0)); 64 } 65 66 68 public void testEndpointTwo() throws Exception  69 { 70 InitialContext iniCtx = getClientContext(); 71 Service service = (Service )iniCtx.lookup("java:comp/env/service/HelloTwoService"); 72 HelloTwo hello = (HelloTwo)service.getPort(HelloTwo.class); 73 74 QName in0 = new QName ("http://somens", "Kermit"); 75 assertEquals(in0, hello.echoQName(in0)); 76 } 77 } 78 | Popular Tags |