Package org.objectweb.type_test.types2

Examples of org.objectweb.type_test.types2.OccuringStructWithAnyAttribute


        QName xAt1Name = new QName("http://schemas.iona.com/type_test", "at_one");
        QName xAt2Name = new QName("http://schemas.iona.com/type_test", "at_two");
        QName yAt3Name = new QName("http://objectweb.org/type_test", "at_thr");
        QName yAt4Name = new QName("http://objectweb.org/type_test", "at_fou");

        OccuringChoiceWithAnyAttribute x = new OccuringChoiceWithAnyAttribute();
        OccuringChoiceWithAnyAttribute y = new OccuringChoiceWithAnyAttribute();

        List<Serializable> xVarStringOrVarInt = x.getVarStringOrVarInt();
        xVarStringOrVarInt.add("hello");
        xVarStringOrVarInt.add(1);
        x.setAtString("attribute");
        x.setAtInt(new Integer(2000));

        List<Serializable> yVarStringOrVarInt = y.getVarStringOrVarInt();
        yVarStringOrVarInt.add(1001);
        y.setAtString("the attribute");
        y.setAtInt(new Integer(2002));

        Map<QName, String> xAttrMap = x.getOtherAttributes();
        xAttrMap.put(xAt1Name, "one");
        xAttrMap.put(xAt2Name, "two");

        Map<QName, String> yAttrMap = y.getOtherAttributes();
        yAttrMap.put(yAt3Name, "three");
        yAttrMap.put(yAt4Name, "four");

        Holder<OccuringChoiceWithAnyAttribute> yh = new Holder<OccuringChoiceWithAnyAttribute>(y);
        Holder<OccuringChoiceWithAnyAttribute> zh = new Holder<OccuringChoiceWithAnyAttribute>();
        OccuringChoiceWithAnyAttribute ret;
        if (testDocLiteral) {
            ret = docClient.testOccuringChoiceWithAnyAttribute(x, yh, zh);
        } else {
            ret = rpcClient.testOccuringChoiceWithAnyAttribute(x, yh, zh);
        }
View Full Code Here


        QName xAt1Name = new QName("http://objectweb.org/type_test", "at_one");
        QName xAt2Name = new QName("http://objectweb.org/type_test", "at_two");
        QName yAt3Name = new QName("http://objectweb.org/type_test", "at_thr");
        QName yAt4Name = new QName("http://objectweb.org/type_test", "at_fou");

        OccuringStructWithAnyAttribute x = new OccuringStructWithAnyAttribute();
        OccuringStructWithAnyAttribute y = new OccuringStructWithAnyAttribute();
        List<Serializable> xVarStringAndVarInt = x.getVarStringAndVarInt();
        xVarStringAndVarInt.add("x1");
        xVarStringAndVarInt.add(0);
        xVarStringAndVarInt.add("x2");
        xVarStringAndVarInt.add(1);
        x.setAtString("attribute");
        x.setAtInt(new Integer(2000));

        List<Serializable> yVarStringAndVarInt = y.getVarStringAndVarInt();
        yVarStringAndVarInt.add("there");
        yVarStringAndVarInt.add(1001);
        y.setAtString("another attribute");
        y.setAtInt(new Integer(2002));

        Map<QName, String> xAttrMap = x.getOtherAttributes();
        xAttrMap.put(xAt1Name, "one");
        xAttrMap.put(xAt2Name, "two");

        Map<QName, String> yAttrMap = y.getOtherAttributes();
        yAttrMap.put(yAt3Name, "three");
        yAttrMap.put(yAt4Name, "four");

        Holder<OccuringStructWithAnyAttribute> yh = new Holder<OccuringStructWithAnyAttribute>(y);
        Holder<OccuringStructWithAnyAttribute> zh = new Holder<OccuringStructWithAnyAttribute>();
        OccuringStructWithAnyAttribute ret;
        if (testDocLiteral) {
            ret = docClient.testOccuringStructWithAnyAttribute(x, yh, zh);
        } else {
            ret = rpcClient.testOccuringStructWithAnyAttribute(x, yh, zh);
        }
View Full Code Here

        }
        return true;
    }
   
    public void testSequenceWithGroupChoice() throws Exception {
        SequenceWithGroupChoice x = new SequenceWithGroupChoice();
        x.setVarFloat(1.1f);
        x.setVarOtherString("world");
        SequenceWithGroupChoice yOrig = new SequenceWithGroupChoice();
        yOrig.setVarOtherFloat(2.2f);
        yOrig.setVarString("world");

        Holder<SequenceWithGroupChoice> y = new Holder<SequenceWithGroupChoice>(yOrig);
        Holder<SequenceWithGroupChoice> z = new Holder<SequenceWithGroupChoice>();

        SequenceWithGroupChoice ret;
        if (testDocLiteral) {
            ret = docClient.testSequenceWithGroupChoice(x, y, z);
        } else {
            ret = rpcClient.testSequenceWithGroupChoice(x, y, z);
        }
View Full Code Here

            && Float.compare(x.getVarOtherFloat(), y.getVarOtherFloat()) == 0
            && x.getVarOtherString().equals(y.getVarOtherString());
    }
   
    public void testSequenceWithGroupSeq() throws Exception {
        SequenceWithGroupSeq x = new SequenceWithGroupSeq();
        x.setVarInt(100);        
        x.setVarString("hello");
        x.setVarFloat(1.1f);
        x.setVarOtherInt(11);
        x.setVarOtherString("world");
        x.setVarOtherFloat(10.1f);
        SequenceWithGroupSeq yOrig = new SequenceWithGroupSeq();
        yOrig.setVarInt(11);
        yOrig.setVarString("world");
        yOrig.setVarFloat(10.1f);
        yOrig.setVarOtherInt(100);
        yOrig.setVarOtherString("hello");
        yOrig.setVarOtherFloat(1.1f);

        Holder<SequenceWithGroupSeq> y = new Holder<SequenceWithGroupSeq>(yOrig);
        Holder<SequenceWithGroupSeq> z = new Holder<SequenceWithGroupSeq>();

        SequenceWithGroupSeq ret;
        if (testDocLiteral) {
            ret = docClient.testSequenceWithGroupSeq(x, y, z);
        } else {
            ret = rpcClient.testSequenceWithGroupSeq(x, y, z);
        }
View Full Code Here

            && Float.compare(x.getVarFloat(), y.getVarFloat()) == 0
            && x.getVarString().equals(y.getVarString());
    }
   
    public void testSequenceWithGroups() throws Exception {
        SequenceWithGroups x = new SequenceWithGroups();
        x.setVarInt(100);
        x.setVarString("hello");
        x.setVarFloat(1.1f);
        x.setVarOtherFloat(1.1f);

        SequenceWithGroups yOrig = new SequenceWithGroups();
        yOrig.setVarInt(11);
        yOrig.setVarString("world");
        yOrig.setVarFloat(10.1f);
        yOrig.setVarOtherString("world");

        Holder<SequenceWithGroups> y = new Holder<SequenceWithGroups>(yOrig);
        Holder<SequenceWithGroups> z = new Holder<SequenceWithGroups>();

        SequenceWithGroups ret;
        if (testDocLiteral) {
            ret = docClient.testSequenceWithGroups(x, y, z);
        } else {
            ret = rpcClient.testSequenceWithGroups(x, y, z);
        }
View Full Code Here

    protected boolean equals(SequenceWithOccuringGroup x, SequenceWithOccuringGroup y) {
        return equalsFloatIntStringList(x.getBatchElementsSeq(), y.getBatchElementsSeq());
    }
   
    public void testSequenceWithOccuringGroup() throws Exception {
        SequenceWithOccuringGroup x = new SequenceWithOccuringGroup();
        x.getBatchElementsSeq().add(1.1f);
        x.getBatchElementsSeq().add(100);
        x.getBatchElementsSeq().add("hello");

        SequenceWithOccuringGroup yOrig = new SequenceWithOccuringGroup();
        yOrig.getBatchElementsSeq().add(2.2f);
        yOrig.getBatchElementsSeq().add(200);
        yOrig.getBatchElementsSeq().add("world");

        Holder<SequenceWithOccuringGroup> y = new Holder<SequenceWithOccuringGroup>(yOrig);
        Holder<SequenceWithOccuringGroup> z = new Holder<SequenceWithOccuringGroup>();

        SequenceWithOccuringGroup ret;
        if (testDocLiteral) {
            ret = docClient.testSequenceWithOccuringGroup(x, y, z);
        } else {
            ret = rpcClient.testSequenceWithOccuringGroup(x, y, z);
        }
View Full Code Here

        QName xAt1Name = new QName("http://objectweb.org/type_test", "at_one");
        QName xAt2Name = new QName("http://objectweb.org/type_test", "at_two");
        QName yAt3Name = new QName("http://objectweb.org/type_test", "at_thr");
        QName yAt4Name = new QName("http://objectweb.org/type_test", "at_fou");

        SimpleContentExtWithAnyAttribute x = new SimpleContentExtWithAnyAttribute();
        x.setValue("foo");
        x.setAttrib(new Integer(2000));

        SimpleContentExtWithAnyAttribute y = new SimpleContentExtWithAnyAttribute();
        y.setValue("bar");
        y.setAttrib(new Integer(2001));

        Map<QName, String> xAttrMap = x.getOtherAttributes();
        xAttrMap.put(xAt1Name, "one");
        xAttrMap.put(xAt2Name, "two");

        Map<QName, String> yAttrMap = y.getOtherAttributes();
        yAttrMap.put(yAt3Name, "three");
        yAttrMap.put(yAt4Name, "four");

        Holder<SimpleContentExtWithAnyAttribute> yh = new Holder<SimpleContentExtWithAnyAttribute>(y);
        Holder<SimpleContentExtWithAnyAttribute> zh = new Holder<SimpleContentExtWithAnyAttribute>();
        SimpleContentExtWithAnyAttribute ret;
        if (testDocLiteral) {
            ret = docClient.testSimpleContentExtWithAnyAttribute(x, yh, zh);
        } else {
            ret = rpcClient.testSimpleContentExtWithAnyAttribute(x, yh, zh);
        }
View Full Code Here

            assertEqualsStructWithAny(swa, ret);
        }
    }

    public void testStructWithAnyXsi() throws Exception {
        StructWithAny swa = new StructWithAny();
        swa.setName("Name");
        swa.setAddress("Some Address");
        StructWithAny yOrig = new StructWithAny();
        yOrig.setName("Name2");
        yOrig.setAddress("Some Other Address");

        SOAPFactory sf = SOAPFactory.newInstance();
        Name elementName = sf.createName("UKAddress", "", "http://objectweb.org/type_test");
        Name xsiAttrName = sf.createName("type", "xsi", "http://www.w3.org/2001/XMLSchema-instance");
        SOAPElement x = sf.createElement(elementName);
        x.addNamespaceDeclaration("tns", "http://objectweb.org/type_test");
        x.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        x.addAttribute(xsiAttrName, "tns:UKAddressType11");
        x.addTextNode("This is the text of the node for the first struct");

        Name elementName2 = sf.createName("UKAddress", "", "http://objectweb.org/type_test");
        Name xsiAttrName2 = sf.createName("type", "xsi", "http://www.w3.org/2001/XMLSchema-instance");
        SOAPElement x2 = sf.createElement(elementName2);
        x2.addNamespaceDeclaration("tns", "http://objectweb.org/type_test");
        x2.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        x2.addAttribute(xsiAttrName2, "tns:UKAddressType22");
        x2.addTextNode("This is the text of the node for the second struct");

        swa.setAny(x);
        yOrig.setAny(x2);

        Holder<StructWithAny> y = new Holder<StructWithAny>(yOrig);
        Holder<StructWithAny> z = new Holder<StructWithAny>();
        StructWithAny ret;
        if (testDocLiteral) {
            ret = docClient.testStructWithAny(swa, y, z);
        } else {
            ret = rpcClient.testStructWithAny(swa, y, z);
        }
View Full Code Here

    }

    // StructWithInvalidAny
    // XXX - no exception thrown
    public void testStructWithInvalidAny() throws Exception {
        StructWithAny swa = new StructWithAny();
        swa.setName("Name");
        swa.setAddress("Some Address");

        StructWithAny yOrig = new StructWithAny();
        yOrig.setName("Name2");
        yOrig.setAddress("Some Other Address");

        SOAPFactory factory = SOAPFactory.newInstance();
        SOAPElement x = factory.createElement("hello", "foo", "http://some.url.com");
        x.addTextNode("This is the text of the node");

        SOAPElement x2 = factory.createElement("hello2", "foo", "http://some.url.com");
        x2.addTextNode("This is the text of the node for the second struct");

        swa.setAny(x);
        yOrig.setAny(x2);

        Holder<StructWithAny> y = new Holder<StructWithAny>(yOrig);
        Holder<StructWithAny> z = new Holder<StructWithAny>();

        try {
View Full Code Here

            }
        }
    }
   
    public void testStructWithAny() throws Exception {
        StructWithAny swa = new StructWithAny();
        swa.setName("Name");
        swa.setAddress("Some Address");

        StructWithAny yOrig = new StructWithAny();
        yOrig.setName("Name2");
        yOrig.setAddress("Some Other Address");

        SOAPFactory factory = SOAPFactory.newInstance();
        SOAPElement x = factory.createElement("hello", "foo", "http://some.url.com");
        x.addNamespaceDeclaration("foo", "http://some.url.com");
        x.addTextNode("This is the text of the node");

        SOAPElement x2 = factory.createElement("hello2", "foo", "http://some.url.com");
        x2.addNamespaceDeclaration("foo", "http://some.url.com");
        x2.addTextNode("This is the text of the node for the second struct");

        swa.setAny(x);
        yOrig.setAny(x2);

        Holder<StructWithAny> y = new Holder<StructWithAny>(yOrig);
        Holder<StructWithAny> z = new Holder<StructWithAny>();

        StructWithAny ret;
        if (testDocLiteral) {
            ret = docClient.testStructWithAny(swa, y, z);
        } else {
            ret = rpcClient.testStructWithAny(swa, y, z);
        }
View Full Code Here

TOP

Related Classes of org.objectweb.type_test.types2.OccuringStructWithAnyAttribute

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.