FileDocCategorySizeDatePackage
TestMiscSample.javaAPI DocApache Axis 1.43057Sat Apr 22 18:57:28 BST 2006test.functional

TestMiscSample

public class TestMiscSample extends TestCase
Test the stock sample code.

Fields Summary
static Log
log
static final String
deployDoc
static final String
undeployDoc
org.apache.axis.client.AdminClient
client
org.apache.axis.utils.Options
opts
Constructors Summary
public TestMiscSample(String name)


         
        super(name);
        client = new AdminClient();
        opts = new Options(new String [] {
            "-lhttp://localhost:8080/axis/services/AdminService" } );
    
Methods Summary
public voiddoDeploy()

        client.process(opts, new ByteArrayInputStream(deployDoc.getBytes()));
    
public voiddoTest()

        String[] args = { "-d" };
        TestClient.main(args);
    
public voiddoUndeploy()

        client.process(opts, new ByteArrayInputStream(undeployDoc.getBytes()));
    
public static voidmain(java.lang.String[] args)

        TestMiscSample tester = new TestMiscSample("tester");
        tester.testService();
    
public voidtestService()

        try {
            log.info("Testing misc sample.");
            doDeploy();
            log.info("Testing service...");
            doTest();
            doUndeploy();
            log.info("Test complete.");
        }
        catch( Exception e ) {
            e.printStackTrace();
            throw new Exception("Fault returned from test: "+e);
        }