Package org.apache.type_test.types1

Examples of org.apache.type_test.types1.MixedArray


    }

    //org.apache.type_test.types1.EmptyStruct
   
    public void testEmptyStruct() throws Exception {
        EmptyStruct x = new EmptyStruct();
        EmptyStruct yOrig = new EmptyStruct();
        Holder<EmptyStruct> y = new Holder<EmptyStruct>(yOrig);
        Holder<EmptyStruct> z = new Holder<EmptyStruct>();
        EmptyStruct ret = client.testEmptyStruct(x, y, z);

        if (!perfTestOnly) {
            assertTrue("testEmptyStruct(): Null value for inout param",
                       notNull(x, y.value));
            assertTrue("testEmptyStruct(): Null value for out param",
View Full Code Here


        xs.setVarString("NESTED Hello There");
        NestedStruct x = new NestedStruct();
        x.setVarFloat(new BigDecimal("3.14"));
        x.setVarInt(42);
        x.setVarString("Hello There");
        x.setVarEmptyStruct(new EmptyStruct());
        x.setVarStruct(xs);

        SimpleStruct ys = new SimpleStruct();
        ys.setVarFloat(10.414);
        ys.setVarInt(new BigInteger("130"));
        ys.setVarString("NESTED Cheerio");

        NestedStruct yOrig = new NestedStruct();
        yOrig.setVarFloat(new BigDecimal("1.414"));
        yOrig.setVarInt(13);
        yOrig.setVarString("Cheerio");
        yOrig.setVarEmptyStruct(new EmptyStruct());
        yOrig.setVarStruct(ys);

        Holder<NestedStruct> y = new Holder<NestedStruct>(yOrig);
        Holder<NestedStruct> z = new Holder<NestedStruct>();
        NestedStruct ret = client.testNestedStruct(x, y, z);
View Full Code Here

        NestedStruct x = new NestedStruct();
        x.setVarFloat(new BigDecimal("3.14"));
        x.setVarInt(42);
        x.setVarString("Hello There");
        x.setVarEmptyStruct(new EmptyStruct());
        x.setVarStruct(xs);

        NestedStruct yOrig = new NestedStruct();
        yOrig.setVarFloat(new BigDecimal("1.414"));
        yOrig.setVarInt(13);
        yOrig.setVarString("Cheerio");
        yOrig.setVarEmptyStruct(new EmptyStruct());
        yOrig.setVarStruct(ys);
        Holder<NestedStruct> y = new Holder<NestedStruct>(yOrig);
        Holder<NestedStruct> z = new Holder<NestedStruct>();

        NestedStruct ret;
View Full Code Here

    @Test
    public void testEmptyStruct() throws Exception {
        if (!shouldRunTest("EmptyStruct")) {
            return;
        }
        EmptyStruct x = new EmptyStruct();
        EmptyStruct yOrig = new EmptyStruct();
        Holder<EmptyStruct> y = new Holder<EmptyStruct>(yOrig);
        Holder<EmptyStruct> z = new Holder<EmptyStruct>();
        EmptyStruct ret;
        if (testDocLiteral) {
            ret = docClient.testEmptyStruct(x, y, z);
        } else if (testXMLBinding) {
            ret = xmlClient.testEmptyStruct(x, y, z);           
        } else {
View Full Code Here

        xs.setVarString("NESTED Hello There");
        NestedStruct x = new NestedStruct();
        x.setVarFloat(new BigDecimal("3.14"));
        x.setVarInt(42);
        x.setVarString("Hello There");
        x.setVarEmptyStruct(new EmptyStruct());
        x.setVarStruct(xs);

        SimpleStruct ys = new SimpleStruct();
        ys.setVarFloat(10.414);
        ys.setVarInt(new BigInteger("130"));
        ys.setVarString("NESTED Cheerio");

        NestedStruct yOrig = new NestedStruct();
        yOrig.setVarFloat(new BigDecimal("1.414"));
        yOrig.setVarInt(13);
        yOrig.setVarString("Cheerio");
        yOrig.setVarEmptyStruct(new EmptyStruct());
        yOrig.setVarStruct(ys);

        Holder<NestedStruct> y = new Holder<NestedStruct>(yOrig);
        Holder<NestedStruct> z = new Holder<NestedStruct>();
        NestedStruct ret;
View Full Code Here

    @Test
    public void testExtColourEnum() throws Exception {
        if (!shouldRunTest("ExtColourEnum")) {
            return;
        }
        ExtColourEnum x = new ExtColourEnum();
        x.setAttrib1(new Integer(1));
        x.setAttrib2("Ax");
        x.setValue(ColourEnum.fromValue("RED"));

        ExtColourEnum yOrig = new ExtColourEnum();
        yOrig.setAttrib1(new Integer(10));
        yOrig.setAttrib2("Ay");
        yOrig.setValue(ColourEnum.fromValue("GREEN"));

        Holder<ExtColourEnum> y = new Holder<ExtColourEnum>(yOrig);
        Holder<ExtColourEnum> z = new Holder<ExtColourEnum>();
        ExtColourEnum ret;
        if (testDocLiteral) {
            ret = docClient.testExtColourEnum(x, y, z);
        } else if (testXMLBinding) {
            ret = xmlClient.testExtColourEnum(x, y, z);
        } else {
View Full Code Here

    @Test
    public void testExtendsSimpleContent() throws Exception {
        if (!shouldRunTest("ExtendsSimpleContent")) {
            return;
        }
        ExtendsSimpleContent x = new ExtendsSimpleContent();
        x.setValue("foo");

        ExtendsSimpleContent yOriginal = new ExtendsSimpleContent();
        yOriginal.setValue("bar");
        Holder<ExtendsSimpleContent> y = new Holder<ExtendsSimpleContent>(yOriginal);
        Holder<ExtendsSimpleContent> z = new Holder<ExtendsSimpleContent>();
        ExtendsSimpleContent ret;
        if (testDocLiteral) {
            ret = docClient.testExtendsSimpleContent(x, y, z);
        } else if (testXMLBinding) {
            ret = xmlClient.testExtendsSimpleContent(x, y, z);
        } else {
            ret = rpcClient.testExtendsSimpleContent(x, y, z);
        }
        if (!perfTestOnly) {
            assertEquals(x.getValue(), y.value.getValue());
            assertEquals(yOriginal.getValue(), z.value.getValue());
            assertEquals(x.getValue(), ret.getValue());
        }
    }
View Full Code Here

    }
   
    //org.apache.type_test.types1.FixedArray
   
    public void testFixedArray() throws Exception {
        FixedArray x = new FixedArray();
        x.getItem().addAll(Arrays.asList(Integer.MIN_VALUE, 0, Integer.MAX_VALUE));

        FixedArray yOrig = new FixedArray();
        yOrig.getItem().addAll(Arrays.asList(-1, 0, 1));

        Holder<FixedArray> y = new Holder<FixedArray>(yOrig);
        Holder<FixedArray> z = new Holder<FixedArray>();
        FixedArray ret = client.testFixedArray(x, y, z);

        if (!perfTestOnly) {
            for (int i = 0; i < 3; i++) {
                assertEquals("testFixedArray(): Incorrect value for inout param",
                             x.getItem().get(i), y.value.getItem().get(i));
                assertEquals("testFixedArray(): Incorrect value for out param",
                             yOrig.getItem().get(i), z.value.getItem().get(i));
                assertEquals("testFixedArray(): Incorrect return value",
                             x.getItem().get(i), ret.getItem().get(i));
            }
        }
    }
View Full Code Here

        //override so we can test some bad validation things
        public FixedArray testFixedArray(
                                         FixedArray x,
                                         Holder<FixedArray> y,
                                         Holder<FixedArray> z) {
            z.value = new FixedArray();
            z.value.getItem().addAll(y.value.getItem());
            y.value = new FixedArray();
            y.value.getItem().addAll(x.getItem());
            if (x.getItem().get(0) == 24) {
                y.value.getItem().add(0);
                z.value.getItem().remove(0);
            }
View Full Code Here

        initClient(AbstractTypeTestClient5.class, SERVICE_NAME, PORT_NAME, WSDL_PATH);
    }

    @Test
    public void testValidationFailureOnServerOut() throws Exception {
        FixedArray x = new FixedArray();
        FixedArray yOrig = new FixedArray();
       
        x.getItem().addAll(Arrays.asList(24, 42, 2008));
        yOrig.getItem().addAll(Arrays.asList(24, 0, 1));

        Holder<FixedArray> y = new Holder<FixedArray>(yOrig);
        Holder<FixedArray> z = new Holder<FixedArray>();
        try {
            docClient.testFixedArray(x, y, z);
View Full Code Here

TOP

Related Classes of org.apache.type_test.types1.MixedArray

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.