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

TestElementSample

public class TestElementSample extends TestCase
Test the ElementService sample code.

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


       
        super(name);
    
Methods Summary
public voiddoTestDeploy()

        String[] args = { "samples/encoding/deploy.wsdd" };
        AdminClient.main(args);
    
public voiddoTestElement()

        String thisHost = NetworkUtils.getLocalHostname();
        String thisPort = System.getProperty("test.functional.ServicePort","8080");

        String[] args = {thisHost,thisPort};
        String   xml = "<x:hello xmlns:x=\"urn:foo\">a string</x:hello>";
        System.out.println("Sending : " + xml );
        String res = TestElem.doit(args, xml);
        System.out.println("Received: " + res );
        assertEquals("TestElementSample.doit(): xml must match", res, xml);
    
public voiddoTestUndeploy()

        String[] args = { "samples/encoding/undeploy.wsdd" };
        AdminClient.main(args);
    
public static voidmain(java.lang.String[] args)

        TestElementSample tester = new TestElementSample("tester");
        tester.testElementService();
    
public voidtestElementService()

        log.info("Testing element sample.");
        log.info("Testing deployment...");
        doTestDeploy();
        log.info("Testing service...");
        doTestElement();
        log.info("Testing undeployment...");
        doTestUndeploy();
        log.info("Test complete.");