1 22 package org.jboss.test.webservice.jbws710; 23 24 import junit.framework.Test; 25 import org.jboss.test.webservice.WebserviceTestBase; 26 27 import javax.naming.InitialContext ; 28 import javax.xml.rpc.Service ; 29 30 38 public class JBWS710TestCase extends WebserviceTestBase 39 { 40 private static Hello port; 41 42 public JBWS710TestCase(String name) 43 { 44 super(name); 45 } 46 47 48 public static Test suite() throws Exception 49 { 50 return getDeploySetup(JBWS710TestCase.class, "ws4ee-jbws710.war, ws4ee-jbws710-client.jar"); 51 } 52 53 protected 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/HelloService"); 60 port = (Hello)service.getPort(Hello.class); 61 } 62 } 63 64 public void testOnewayRequest() throws Exception 65 { 66 port.onewayRequest("str1", "str2", "str3"); 67 68 String retObj = null; 69 for (int i = 0; retObj == null && i < 5; i++) 70 retObj = port.onewayResponse(); 71 72 assertEquals("str1str2str3", retObj); 73 } 74 } 75 | Popular Tags |