FileDocCategorySizeDatePackage
MarshallTestServiceTestCase.javaAPI DocApache Axis 1.45115Sat Apr 22 18:57:28 BST 2006test.wsdl.marshall3

MarshallTestServiceTestCase

public class MarshallTestServiceTestCase extends TestCase
MarshallTestServiceTestCase.java This file was auto-generated from WSDL by the Apache Axis 1.2RC3 Apr 29, 2005 (10:05:23 EDT) WSDL2Java emitter.

Fields Summary
Constructors Summary
public MarshallTestServiceTestCase(String name)

        super(name);
    
Methods Summary
public voidtest1Marshall3TestPort1ShortArrayTest()

        test.wsdl.marshall3.Marshall3TestPort1SoapBindingStub binding;
        try {
            binding = (test.wsdl.marshall3.Marshall3TestPort1SoapBindingStub)
                          new test.wsdl.marshall3.MarshallTestServiceLocator().getMarshall3TestPort1();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            if(jre.getLinkedCause()!=null)
                jre.getLinkedCause().printStackTrace();
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertNotNull("binding is null", binding);

        // Time out after a minute
        binding.setTimeout(60000);

        // Test operation
        ShortArrayTestResponse value = null;
        value = binding.shortArrayTest(new ShortArrayTest(new short[]{1,2,3}));
        assertEquals(3,value.getShortArray().length);
    
public voidtest2Marshall3TestPort1QnameArrayTest()

        test.wsdl.marshall3.Marshall3TestPort1SoapBindingStub binding;
        try {
            binding = (test.wsdl.marshall3.Marshall3TestPort1SoapBindingStub)
                          new test.wsdl.marshall3.MarshallTestServiceLocator().getMarshall3TestPort1();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            if(jre.getLinkedCause()!=null)
                jre.getLinkedCause().printStackTrace();
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertNotNull("binding is null", binding);

        // Time out after a minute
        binding.setTimeout(60000);

        // Test operation
        QNameArrayTestResponse value = null;
        QName[] qnames= new QName[3];
        qnames[0] = new QName("urn:someNamespaceURI", "localPart");
        qnames[1] = new QName("localPartWithoutNS");
        qnames[2] = null;
        value = binding.qnameArrayTest(new QNameArrayTest(qnames));
        // TBD - validate results
        assertEquals("wrong array size", 3, value.getQnameArray().length);
        assertEquals("qnames[0] not equals", new QName("urn:someNamespaceURI", "localPart"), value.getQnameArray()[0]);
        assertEquals("qnames[1] not equals", new QName("localPartWithoutNS"), value.getQnameArray()[1]);
        assertEquals("qnames[2] not equals", null, value.getQnameArray()[2]);
    
public voidtest2Marshall3TestPort1StringArrayTest()

        test.wsdl.marshall3.Marshall3TestPort1SoapBindingStub binding;
        try {
            binding = (test.wsdl.marshall3.Marshall3TestPort1SoapBindingStub)
                          new test.wsdl.marshall3.MarshallTestServiceLocator().getMarshall3TestPort1();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            if(jre.getLinkedCause()!=null)
                jre.getLinkedCause().printStackTrace();
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertNotNull("binding is null", binding);

        // Time out after a minute
        binding.setTimeout(60000);

        // Test operation
        StringArrayTestResponse value = null;
        value = binding.stringArrayTest(new StringArrayTest(new String[]{"1","2","","4",null,"6"}));
        // TBD - validate results
        assertEquals(6,value.getStringArray().length);
    
public voidtest3Marshall3TestPort1EchoShortListTypeTest()

        test.wsdl.marshall3.Marshall3TestPort1SoapBindingStub binding;
        try {
            binding = (test.wsdl.marshall3.Marshall3TestPort1SoapBindingStub)
                          new test.wsdl.marshall3.MarshallTestServiceLocator().getMarshall3TestPort1();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            if(jre.getLinkedCause()!=null)
                jre.getLinkedCause().printStackTrace();
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertNotNull("binding is null", binding);

        // Time out after a minute
        binding.setTimeout(60000);

        // Test operation
        short[] value = null;
        value = binding.echoShortListTypeTest(new short[]{1,2,3});
        // TBD - validate results
        assertEquals(3,value.length);