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

InteropTestRpcEncServiceTestCase

public class InteropTestRpcEncServiceTestCase 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 InteropTestRpcEncServiceTestCase(String name)

        super(name);
    
Methods Summary
public voidtestInteropTestRpcEncEchoString()

        InteropTestRpcEnc binding;
        try {
            if (url == null) {
                binding = new InteropTestRpcEncServiceLocator().getInteropTestRpcEnc();
            } else {
                binding = new InteropTestRpcEncServiceLocator().getInteropTestRpcEnc(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 voidtestInteropTestRpcEncEchoStringArray()

        InteropTestRpcEnc binding;
        try {
            if (url == null) {
                binding = new InteropTestRpcEncServiceLocator().getInteropTestRpcEnc();
            } else {
                binding = new InteropTestRpcEncServiceLocator().getInteropTestRpcEnc(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 voidtestInteropTestRpcEncEchoStruct()

        InteropTestRpcEnc binding;
        try {
            if (url == null) {
                binding = new InteropTestRpcEncServiceLocator().getInteropTestRpcEnc();
            } else {
                binding = new InteropTestRpcEncServiceLocator().getInteropTestRpcEnc(url);
            }
        }
        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 voidtestInteropTestRpcEncEchoVoid()

        InteropTestRpcEnc binding;
        try {
            if (url == null) {
                binding = new InteropTestRpcEncServiceLocator().getInteropTestRpcEnc();
            } else {
                binding = new InteropTestRpcEncServiceLocator().getInteropTestRpcEnc(url);
            }
        }
        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);
        }