1 22 package org.jboss.test.webservice.jbws316; 23 24 26 import javax.naming.InitialContext ; 27 import javax.xml.rpc.Service ; 28 29 import junit.framework.Test; 30 31 import org.jboss.test.webservice.WebserviceTestBase; 32 33 41 public class JBWS316TestCase extends WebserviceTestBase 42 { 43 private static TestBusinessFacadeBF_WS endpoint; 44 45 47 public JBWS316TestCase(String name) 48 { 49 super(name); 50 } 51 52 53 public static Test suite() throws Exception 54 { 55 return getDeploySetup(JBWS316TestCase.class, "ws4ee-jbws316.war, ws4ee-jbws316-client.jar"); 56 } 57 58 public void setUp() throws Exception 59 { 60 super.setUp(); 61 if (endpoint == null) 62 { 63 InitialContext iniCtx = getClientContext(); 64 Service service = (Service )iniCtx.lookup("java:comp/env/service/TestService"); 65 endpoint = (TestBusinessFacadeBF_WS)service.getPort(TestBusinessFacadeBF_WS.class); 66 } 67 } 68 69 72 public void testEndpoint() throws Exception 73 { 74 BinDataDTO inObj = new BinDataDTO(); 75 inObj.setMethodProp("Hello World".getBytes()); 76 inObj.fieldProp = "hidden".getBytes(); 77 BinDataDTO retObj = endpoint.getTestBinData(inObj); 78 assertEquals(new String (inObj.getMethodProp()), new String (retObj.getMethodProp())); 79 assertNull("Null fieldProp expected", retObj.fieldProp); 80 } 81 } 82 | Popular Tags |