Package org.apache.type_test.types3

Examples of org.apache.type_test.types3.OccuringChoice2


        // Test 1
        //
        // x: choice occurs twice
        // y: choice doesn't occur
        //
        StructWithOccuringChoice x = new StructWithOccuringChoice();
        x.setVarInteger(2);
        x.getVarIntOrVarString().add(3);
        x.getVarIntOrVarString().add("hello");

        StructWithOccuringChoice yOriginal = new StructWithOccuringChoice();
        yOriginal.setVarInteger(1);

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


        // Test 1
        //
        // x: choice occurs twice
        // y: choice doesn't occur
        //
        StructWithOccuringChoice x = new StructWithOccuringChoice();
        x.setVarInteger(2);
        x.getVarIntOrVarString().add(3);
        x.getVarIntOrVarString().add("hello");

        StructWithOccuringChoice yOriginal = new StructWithOccuringChoice();
        yOriginal.setVarInteger(1);

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

        // Test 1
        //
        // x: sequence occurs twice
        // y: sequence doesn't occur (null holder object)
        //
        StructWithOccuringStruct x = new StructWithOccuringStruct();
        x.setVarInteger(100);
        x.getVarIntAndVarFloat().add(101);
        x.getVarIntAndVarFloat().add(101.5f);
        x.getVarIntAndVarFloat().add(102);
        x.getVarIntAndVarFloat().add(102.5f);

        StructWithOccuringStruct yOriginal = new StructWithOccuringStruct();
        yOriginal.setVarInteger(200);

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

    @Test
    public void testStructWithOccuringStruct2() throws Exception {
        if (!shouldRunTest("StructWithOccuringStruct2")) {
            return;
        }
        StructWithOccuringStruct x = new StructWithOccuringStruct();
        x.setVarInteger(100);
        x.getVarIntAndVarFloat().add(101);
        x.getVarIntAndVarFloat().add(101.5f);
        x.getVarIntAndVarFloat().add(102);
        x.getVarIntAndVarFloat().add(102.5f);

        StructWithOccuringStruct yOriginal = new StructWithOccuringStruct();
        yOriginal.setVarInteger(200);

        Holder<StructWithOccuringStruct> y = new Holder<StructWithOccuringStruct>(yOriginal);
        Holder<StructWithOccuringStruct> z = new Holder<StructWithOccuringStruct>();
        StructWithOccuringStruct ret;

        // Test 3
        //
        // x: sequence occurs once
        // y: sequence occurs twice
View Full Code Here

        // Test 1
        //
        // x: sequence occurs twice
        // y: sequence doesn't occur (null holder object)
        //
        StructWithOccuringStruct x = new StructWithOccuringStruct();
        x.setVarInteger(100);
        x.getVarIntAndVarFloat().add(101);
        x.getVarIntAndVarFloat().add(101.5f);
        x.getVarIntAndVarFloat().add(102);
        x.getVarIntAndVarFloat().add(102.5f);

        StructWithOccuringStruct yOriginal = new StructWithOccuringStruct();
        yOriginal.setVarInteger(200);

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

    }

    @Test
    public void testStructWithOccuringStruct2() throws Exception {
        StructWithOccuringStruct x = new StructWithOccuringStruct();
        x.setVarInteger(100);
        x.getVarIntAndVarFloat().add(101);
        x.getVarIntAndVarFloat().add(101.5f);
        x.getVarIntAndVarFloat().add(102);
        x.getVarIntAndVarFloat().add(102.5f);

        StructWithOccuringStruct yOriginal = new StructWithOccuringStruct();
        yOriginal.setVarInteger(200);

        Holder<StructWithOccuringStruct> y = new Holder<StructWithOccuringStruct>(yOriginal);
        Holder<StructWithOccuringStruct> z = new Holder<StructWithOccuringStruct>();
        StructWithOccuringStruct ret;

        // Test 3
        //
        // x: sequence occurs once
        // y: sequence occurs twice
View Full Code Here

        derivedB.setVarInt(new BigInteger("32"));
        derivedB.setVarString("foo");

        ObjectFactory objectFactory = new ObjectFactory();

        StructWithSubstitutionGroup x = new StructWithSubstitutionGroup();
        JAXBElement<? extends SgBaseTypeA> elementA = objectFactory.createSg01BaseElementA(baseA);
        x.setSg01BaseElementA(elementA);
        StructWithSubstitutionGroup yOrig = new StructWithSubstitutionGroup();
        JAXBElement<? extends SgBaseTypeA> elementB = objectFactory.createSg01DerivedElementB(derivedB);
        yOrig.setSg01BaseElementA(elementB);

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

        derivedC.setVarInt(new BigInteger("32"));
        derivedC.setVarFloat(3.14f);

        JAXBElement<SgDerivedTypeC> elementC = objectFactory.createSg03DerivedElementC(derivedC);

        StructWithSubstitutionGroupAbstract x = new StructWithSubstitutionGroupAbstract();
        x.setSg03AbstractBaseElementA(elementC);
        StructWithSubstitutionGroupAbstract yOrig = new StructWithSubstitutionGroupAbstract();
        yOrig.setSg03AbstractBaseElementA(elementB);

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

    @Test
    public void testStructWithSubstitutionGroupNil() throws Exception {
        if (!shouldRunTest("StructWithSubstitutionGroupNil")) {
            return;
        }
        StructWithSubstitutionGroupNil x = new StructWithSubstitutionGroupNil();
        ObjectFactory objectFactory = new ObjectFactory();
        JAXBElement<? extends SgBaseTypeA> element = objectFactory.createSg04NillableBaseElementA(null);
        x.setSg04NillableBaseElementA(element);
        StructWithSubstitutionGroupNil yOrig = new StructWithSubstitutionGroupNil();
        element = objectFactory.createSg04NillableBaseElementA(null);
        yOrig.setSg04NillableBaseElementA(element);

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

        }
        return true;
    }

    public void testOccuringChoice2() throws Exception {
        OccuringChoice2 x = new OccuringChoice2();
        x.setVarString("x1");
        OccuringChoice2 yOriginal = new OccuringChoice2();
        yOriginal.setVarString("y1");
        Holder<OccuringChoice2> y = new Holder<OccuringChoice2>(yOriginal);
        Holder<OccuringChoice2> z = new Holder<OccuringChoice2>();
        OccuringChoice2 ret;
        if (testDocLiteral) {
            ret = docClient.testOccuringChoice2(x, y, z);
        } else {
            ret = rpcClient.testOccuringChoice2(x, y, z);
        }

        if (!perfTestOnly) {
            assertTrue("testOccuringChoice2(): Incorrect value for inout param",
                       equals(x, y.value));
            assertTrue("testOccuringChoice2(): Incorrect value for out param",
                       equals(yOriginal, z.value));
            assertTrue("testOccuringChoice2(): Incorrect return value",
                       equals(x, ret));
        }

        x = new OccuringChoice2();
        yOriginal = new OccuringChoice2();
        yOriginal.setVarString("y1");
        y = new Holder<OccuringChoice2>(yOriginal);
        z = new Holder<OccuringChoice2>();
        if (testDocLiteral) {
            ret = docClient.testOccuringChoice2(x, y, z);
View Full Code Here

TOP

Related Classes of org.apache.type_test.types3.OccuringChoice2

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.