1 16 17 package test.functional; 18 19 import junit.framework.TestCase; 20 import org.apache.axis.client.AdminClient; 21 import org.apache.axis.components.logger.LogFactory; 22 import org.apache.commons.logging.Log; 23 import samples.misc.TestClient; 24 25 26 28 public class TestProxySample extends TestCase { 29 static Log log = 30 LogFactory.getLog(TestProxySample.class.getName()); 31 32 public TestProxySample(String name) { 33 super(name); 34 } 35 36 public void doTest () throws Exception { 37 String [] args = { "-d" }; 38 TestClient.mainWithService(args, "ProxyService"); 39 } 40 41 public static void main (String [] args) throws Exception { 43 new TestProxySample("foo").doTest(); 44 } 45 46 public void testService () throws Exception { 47 try { 48 log.info("Testing proxy sample."); 49 50 log.info("Testing deployment..."); 51 52 String [] args = { "samples/proxy/deploy.wsdd" }; 54 AdminClient.main(args); 55 56 log.info("Testing server-side client deployment..."); 57 58 String [] args2 = { "samples/proxy/client_deploy.xml" }; 60 AdminClient.main(args2); 61 62 log.info("Testing service..."); 63 doTest(); 64 log.info("Test complete."); 65 } 66 catch( Exception e ) { 67 e.printStackTrace(); 68 throw new Exception ("Fault returned from test: "+e); 69 } 70 } 71 } 72 73 | Popular Tags |