FileDocCategorySizeDatePackage
Compound1TestCase.javaAPI DocApache Axis 1.45508Sat Apr 22 18:57:28 BST 2006test.wsdl.interop3.compound1

Compound1TestCase

public class Compound1TestCase extends TestCase

Fields Summary
public static URL
url
Constructors Summary
public Compound1TestCase(String name)

        super(name);
    
Methods Summary
public static voidmain(java.lang.String[] args)

        if (args.length == 1) {
            try {
                url = new URL(args[0]);
            } catch (Exception e) {
            }
        }

        junit.textui.TestRunner.run(new junit.framework.TestSuite(Compound1TestCase.class));
    
protected voidsetUp()

    
public voidtestStep3()

        SoapInteropCompound1PortType binding;
        try {
            if (url != null) {
                binding = new Compound1Locator().getSoapInteropCompound1Port(url);
            } else {
                binding = new Compound1Locator().getSoapInteropCompound1Port();
            }
        }
        catch (javax.xml.rpc.ServiceException jre) {
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertTrue("binding is null", binding != null);

        try {
            Document doc = new Document();
            doc.setValue("some value");
            doc.setID("myID");
            Document newDoc = binding.echoDocument(doc);

            assertEquals("Documents didn't match!", newDoc, doc);

            Person person = new Person();
            person.setAge(33);
            person.setMale(true);
            person.setName("Frodo");
            person.setID(2.345F);
            Person newPerson = binding.echoPerson(person);

            assertEquals("Returned Person didn't match!", newPerson, person);
        }
        catch (java.rmi.RemoteException re) {
            throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re);
        }