FileDocCategorySizeDatePackage
TestTransportSample.javaAPI DocApache Axis 1.42902Sat Apr 22 18:57:26 BST 2006test.functional

TestTransportSample

public class TestTransportSample extends TestCase
Test the stock sample code.

Fields Summary
static Log
log
Constructors Summary
public TestTransportSample(String name)


       
        super(name);
    
Methods Summary
public voiddoTestDeploy()

        String[] args = { "-llocal:", "samples/transport/deploy.wsdd" };
        AdminClient.main(args);
    
public voiddoTestIBM()

        String[] args = { "IBM" };
        try {
            FileTest.main(args);
        } catch (AxisFault e) {
            String fault = e.getFaultString();
            if (fault == null) throw e;
            if (fault.indexOf("java.net.UnknownHost")<0) {
                int start = fault.indexOf(": ");
                log.info(fault.substring(start+2));
            } else if (fault.equals("timeout")) {
                log.info("timeout");
            } else {
                throw e;
            }
        }
    
public voiddoTestXXX()

        String[] args = { "XXX" };
        FileTest.main(args);
    
public static voidmain(java.lang.String[] args)
bogus 'main'

        new TestTransportSample("foo").testService();
    
public voidtestService()

        try {
            log.info("Testing transport sample.");
            log.info("Testing deployment...");
            doTestDeploy();
            log.info("Testing service with symbol IBM...");
            doTestIBM();
            log.info("Testing service with symbol XXX...");
            doTestXXX();
            log.info("Test complete.");
        }
        catch( Exception e ) {
            e.printStackTrace();
            throw new Exception("Fault returned from test: "+e);
        }