axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/test/functional TestMiscSample.java TestProxySample.java
Date Tue, 11 Dec 2001 21:12:58 GMT
gdaniels    01/12/11 13:12:58

  Modified:    java/test/functional Tag: alpha-3 TestMiscSample.java
                        TestProxySample.java
  Log:
  Remove default deploy of EchoService for alpha-3.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.7.2.1   +42 -2     xml-axis/java/test/functional/TestMiscSample.java
  
  Index: TestMiscSample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestMiscSample.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- TestMiscSample.java	2001/10/30 16:46:42	1.7
  +++ TestMiscSample.java	2001/12/11 21:12:58	1.7.2.1
  @@ -57,19 +57,52 @@
   
   import junit.framework.TestCase;
   import org.apache.axis.AxisFault;
  +import org.apache.axis.utils.Options;
  +import org.apache.axis.deployment.wsdd.WSDDConstants;
  +import org.apache.axis.client.AdminClient;
   import org.apache.log4j.Category;
   import samples.misc.TestClient;
   
  +import java.io.ByteArrayInputStream;
  +
   /** Test the stock sample code.
    */
   public class TestMiscSample extends TestCase {
       static Category category =
               Category.getInstance(TestMiscSample.class.getName());
  +
  +    static final String deployDoc =
  +            "<deployment xmlns=\"http://xml.apache.org/axis/wsdd/\" " +
  +                  "xmlns:java=\"" + WSDDConstants.WSDD_JAVA + "\">\n" +
  +            "  <service name=\"EchoService\" provider=\"Handler\">\n" +
  +            "    <parameter name=\"handlerClass\" " +
  +            "           value=\"org.apache.axis.handlers.EchoHandler\"/>\n" +
  +            "  </service>\n" +
  +            "</deployment>";
  +
  +    static final String undeployDoc =
  +            "<undeployment xmlns=\"http://xml.apache.org/axis/wsdd/\">\n" +
  +            "  <service name=\"EchoService\"/>\n" +
  +            "</undeployment>";
   
  -    public TestMiscSample(String name) {
  +    AdminClient client;
  +    Options opts = null;
  +
  +    public TestMiscSample(String name) throws Exception {
           super(name);
  +        client = new AdminClient();
  +        opts = new Options(new String [] {
  +            "-lhttp://localhost:8080/axis/services/AdminService" } );
       }
  -    
  +
  +    public void doDeploy () throws Exception {
  +        client.process(opts, new ByteArrayInputStream(deployDoc.getBytes()));
  +    }
  +
  +    public void doUndeploy () throws Exception {
  +        client.process(opts, new ByteArrayInputStream(undeployDoc.getBytes()));
  +    }
  +
       public void doTest () throws Exception {
           String[] args = { "-d" };
           TestClient.main(args);
  @@ -78,8 +111,10 @@
       public void testService () throws Exception {
           try {
               category.info("Testing misc sample.");
  +            doDeploy();
               category.info("Testing service...");
               doTest();
  +            doUndeploy();
               category.info("Test complete.");
           }
           catch( Exception e ) {
  @@ -87,6 +122,11 @@
               e.printStackTrace();
               throw new Exception("Fault returned from test: "+e);
           }
  +    }
  +
  +    public static void main(String[] args) throws Exception {
  +        TestMiscSample tester = new TestMiscSample("tester");
  +        tester.testService();
       }
   }
   
  
  
  
  1.7.2.1   +1 -1      xml-axis/java/test/functional/TestProxySample.java
  
  Index: TestProxySample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestProxySample.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- TestProxySample.java	2001/10/30 16:46:42	1.7
  +++ TestProxySample.java	2001/12/11 21:12:58	1.7.2.1
  @@ -88,7 +88,7 @@
               category.info("Testing deployment...");
               
               // deploy the proxy service
  -            String[] args = { "samples/proxy/deploy.xml" };
  +            String[] args = { "samples/proxy/deploy.wsdd" };
               AdminClient.main(args);
               
               category.info("Testing server-side client deployment...");
  
  
  

Mime
View raw message