FileDocCategorySizeDatePackage
InteropTestDocLitServiceTestCase.javaAPI DocApache Axis 1.44973Sat Apr 22 18:57:28 BST 2006test.wsdl.interop3.groupE.client

InteropTestDocLitServiceTestCase

public class InteropTestDocLitServiceTestCase extends TestCase
This file was based on a testcase auto-generated from WSDL by the Apache Axis Wsdl2java emitter.
author
Glyn Normington

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

        super(name);
    
Methods Summary
public voidtestInteropTestDocLitEchoString()

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

        try {
            String input = "a string";
            String value = binding.echoString(input);
            if (!value.equals(input)) {
                throw new AssertionFailedError("String echo failed");
            }
        }
        catch (java.rmi.RemoteException re) {
            throw new AssertionFailedError("Remote Exception caught: " + re);
        }
    
public voidtestInteropTestDocLitEchoStringArray()

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

        try {
            String[] input = {"string 1", "string 2"};
            String[] value = binding.echoStringArray(input);

            boolean equal = true;
            if (input.length != value.length) {
                equal = false;
            } else {
                for (int i = 0; i < value.length; i++) {
                    if (!input[i].equals(value[i])) {
                        equal = false;
                    }
                }
            }
            if (!equal) {
                throw new AssertionFailedError("StringArray echo failed");
            }
        }
        catch (java.rmi.RemoteException re) {
            throw new AssertionFailedError("Remote Exception caught: " + re);
        }
    
public voidtestInteropTestDocLitEchoStruct()

        InteropTestDocLit binding;
        try {
            binding = new InteropTestDocLitServiceLocator().getInteropTestDocLit();        }
        catch (javax.xml.rpc.ServiceException jre) {
            throw new AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertTrue("binding is null", binding != null);

        try {
            SOAPStruct input = new SOAPStruct();
            input.setVarFloat(3.142f);
            input.setVarInt(3);
            input.setVarString("Pi");
            SOAPStruct value = binding.echoStruct(input);
            if (value.getVarFloat() != input.getVarFloat() ||
                value.getVarInt() != input.getVarInt() ||
                !value.getVarString().equals(input.getVarString())) {
                throw new AssertionFailedError("Struct echo failed");
            }
        }
        catch (java.rmi.RemoteException re) {
            throw new AssertionFailedError("Remote Exception caught: " + re);
        }
    
public voidtestInteropTestDocLitEchoVoid()

        InteropTestDocLit binding;
        try {
            binding = new InteropTestDocLitServiceLocator().getInteropTestDocLit();        }
        catch (javax.xml.rpc.ServiceException jre) {
            throw new AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertTrue("binding is null", binding != null);

        try {
            binding.echoVoid();
        }
        catch (java.rmi.RemoteException re) {
            throw new AssertionFailedError("Remote Exception caught: " + re);
        }