1 22 package org.jboss.test.webservice.jbws231; 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 JBWS231TestCase extends WebserviceTestBase 40 { 41 private static TestEndpoint port; 42 43 public JBWS231TestCase(String name) 44 { 45 super(name); 46 } 47 48 public static Test suite() throws Exception 49 { 50 return getDeploySetup(JBWS231TestCase.class, "ws4ee-jbws231.war, ws4ee-jbws231-client.jar"); 51 } 52 53 public void setUp() throws Exception 54 { 55 super.setUp(); 56 if (port == null) 57 { 58 InitialContext iniCtx = getClientContext(); 59 Service service = (Service )iniCtx.lookup("java:comp/env/service/TestService"); 60 port = (TestEndpoint)service.getPort(TestEndpoint.class); 61 } 62 } 63 64 public void testSimple() throws Exception 65 { 66 EyeColorType ret = port.echoSimple(EyeColorType.green); 67 assertEquals(EyeColorType.green, ret); 68 } 69 70 public void testAnonymous() throws Exception 71 { 72 EyeColorType ret = port.echoSimple(EyeColorType.green); 73 assertEquals(EyeColorType.green, ret); 74 } 75 } 76 | Popular Tags |