Package org.apache.cxf.binding.corba.wsdl

Examples of org.apache.cxf.binding.corba.wsdl.Sequence


        CorbaType corbaTypeImpl = null;

        //schematypeName = checkPrefix(schematypeName);
        if (!anonymous) {
            // Create a Sequence
            Sequence corbaSeq = new Sequence();
            corbaSeq.setName(name.getLocalPart());
            corbaSeq.setQName(name);
            corbaSeq.setType(schematypeName);
            corbaSeq.setElemtype(arrayType);
            corbaSeq.setElemname(elName);
            corbaSeq.setBound(bound);
            corbaSeq.setRepositoryID(WSDLToCorbaHelper.REPO_STRING
                                     + name.getLocalPart().replace('.', '/')
                                     + WSDLToCorbaHelper.IDL_VERSION);
            corbaTypeImpl = corbaSeq;
        } else {
            // Create a Anonymous Sequence
            Anonsequence corbaSeq = new Anonsequence();
            corbaSeq.setName(name.getLocalPart());
            corbaSeq.setQName(name);
            corbaSeq.setType(schematypeName);
            corbaSeq.setElemtype(arrayType);
            corbaSeq.setElemname(elName);
            corbaSeq.setBound(bound);

            corbaTypeImpl = corbaSeq;
        }
        return corbaTypeImpl;
    }
View Full Code Here


        fixed.setScale(scale);
        return fixed;
    }

    public static CorbaType getOctetCorbaType(QName name, QName stype, int bound) {
        Sequence seq = new Sequence();
        seq.setName(name.getLocalPart());
        seq.setQName(name);
        seq.setType(stype);
        seq.setElemtype(CorbaConstants.NT_CORBA_OCTET);
        seq.setBound(bound);
        seq.setRepositoryID(WSDLToCorbaHelper.REPO_STRING
                            + name.getLocalPart().replace('.', '/')
                            + WSDLToCorbaHelper.IDL_VERSION);
        return seq;
    }
View Full Code Here

            // Sequence
            //

            nextSchemaType = duplicateXmlSchemaComplexType(newScope);

            Sequence oldSequence = (Sequence) oldCorbaType;
            Sequence newSequence = new Sequence();

            newSequence.setQName(newQname);
            newSequence.setType(nextSchemaType.getQName());
            newSequence.setElemtype(oldSequence.getElemtype());
            newSequence.setElemname(oldSequence.getElemname());
            newSequence.setBound(oldSequence.getBound());
            newSequence.setRepositoryID(newScope.toIDLRepositoryID());

            nextCorbaType = newSequence;
        } else if (oldCorbaType instanceof Fixed) {
            // Fixed
            //
View Full Code Here

        String corbaTm = "http://schemas.apache.org/idl/anon.idl/corba/typemap/";

        // p9 is unwrapped, so there's "MixedArrayType.p9-anonymous-unwrapped-non-primitive-sequenceArray" type
        // registered and "MixedArrayType.p9-anonymous-unwrapped-non-primitive-sequence" as type of the element
        // which is Struct
        Sequence p9 = (Sequence)typeMap.getType(
            "MixedArrayType.p9-anonymous-unwrapped-non-primitive-sequenceArray");
        assertEquals(new QName("", "p9-anonymous-unwrapped-non-primitive-sequence"), p9.getElemname());
        assertEquals(
            new QName(corbaTm, "MixedArrayType.p9-anonymous-unwrapped-non-primitive-sequence"),
            p9.getElemtype());
        assertFalse(p9.isQualified());
        assertFalse(p9.isWrapped());
        Struct p9item = (Struct)typeMap.getType("MixedArrayType.p9-anonymous-unwrapped-non-primitive-sequence");
        assertEquals(1, p9item.getMember().size());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p9item.getMember().get(0).getIdltype());
        assertEquals("item", p9item.getMember().get(0).getName());
        Sequence p9q = (Sequence)typeMap.getType(
            "MixedArrayType.p9-anonymous-unwrapped-non-primitive-sequence-qArray");
        assertEquals(
            new QName("http://schemas.apache.org/idltypes/anon.idl",
                      "p9-anonymous-unwrapped-non-primitive-sequence-q"),
            p9q.getElemname());
        assertEquals(
            new QName(corbaTm, "MixedArrayType.p9-anonymous-unwrapped-non-primitive-sequence-q"),
            p9q.getElemtype());
        assertTrue(p9q.isQualified());
        assertFalse(p9q.isWrapped());
        Struct p9qitem = (Struct)typeMap.getType("MixedArrayType.p9-anonymous-unwrapped-non-primitive-sequence-q");
        assertEquals(1, p9qitem.getMember().size());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p9qitem.getMember().get(0).getIdltype());
        assertEquals("item", p9qitem.getMember().get(0).getName());
View Full Code Here

                OperationType corbaOpType = (OperationType)extElement;
                assertEquals(corbaOpType.getName(), "op_h");
                assertEquals(3, corbaOpType.getParam().size());
                assertEquals("Y.H", corbaOpType.getParam().get(0).getIdltype().getLocalPart());
                assertEquals("Y.H", corbaOpType.getReturn().getIdltype().getLocalPart());
                Sequence seq = (Sequence)mapType.get(corbaOpType.getReturn().getIdltype().getLocalPart());
                assertEquals("ElementType is incorrect for Sequence Type", "fixed_1", seq.getElemtype()
                    .getLocalPart());
            }

        }
    }
View Full Code Here

       
    /**
     * @param typeMap
     */
    private void assertMixedArraysMappingEasyTypes(CorbaTypeMap typeMap) {
        Sequence p1 = (Sequence)typeMap.getType("p1-unwrapped-sequenceArray");
        assertEquals(new QName("", "p1-unwrapped-sequence"), p1.getElemname());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p1.getElemtype());
        Sequence p1q = (Sequence)typeMap.getType("p1-unwrapped-sequence-qArray");
        assertEquals(new QName("http://schemas.apache.org/idltypes/anon.idl", "p1-unwrapped-sequence-q"),
            p1q.getElemname());
        assertFalse(p1.isWrapped());

        Sequence p2 = (Sequence)typeMap.getType("UnboundedArray");
        assertEquals(new QName("", "item"), p2.getElemname());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p2.getElemtype());
        assertTrue(p2.isWrapped());

        Array p3 = (Array)typeMap.getType("p3-unwrapped-arrayArray");
        assertEquals(new QName("", "p3-unwrapped-array"), p3.getElemname());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p3.getElemtype());
        Array p3q = (Array)typeMap.getType("p3-unwrapped-array-qArray");
        assertEquals(new QName("http://schemas.apache.org/idltypes/anon.idl", "p3-unwrapped-array-q"),
            p3q.getElemname());
        assertFalse(p3.isWrapped());

        Array p4 = (Array)typeMap.getType("FixedArray");
        assertEquals(new QName("", "item"), p4.getElemname());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p4.getElemtype());
        assertTrue(p4.isWrapped());

        Sequence p5 = (Sequence)typeMap.getType("p5-anonymous-unwrapped-sequenceArray");
        assertEquals(new QName("", "p5-anonymous-unwrapped-sequence"), p5.getElemname());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p5.getElemtype());
        Sequence p5q = (Sequence)typeMap.getType("p5-anonymous-unwrapped-sequence-qArray");
        assertEquals(new QName("http://schemas.apache.org/idltypes/anon.idl", "p5-anonymous-unwrapped-sequence-q"),
            p5q.getElemname());
        assertFalse(p5.isWrapped());

        Anonsequence p6 = (Anonsequence)typeMap.getType("MixedArrayType.p6-anonymous-wrapped-sequenceType");
        assertEquals(new QName("", "item"), p6.getElemname());
        assertEquals(new QName(CorbaConstants.NU_WSDL_CORBA, "string"), p6.getElemtype());
View Full Code Here

                OperationType corbaOpType = (OperationType)extElement;
                assertEquals(corbaOpType.getName(), "op_h");
                assertEquals(3, corbaOpType.getParam().size());
                assertEquals("Y.H", corbaOpType.getParam().get(0).getIdltype().getLocalPart());
                assertEquals("Y.H", corbaOpType.getReturn().getIdltype().getLocalPart());
                Sequence seq = (Sequence)mapType.get(corbaOpType.getReturn().getIdltype().getLocalPart());
                assertEquals("ElementType is incorrect for Sequence Type", "fixed_1", seq.getElemtype()
                    .getLocalPart());
            }

        }
    }
View Full Code Here

            // Sequence
            //

            nextSchemaType = duplicateXmlSchemaComplexType(newScope);

            Sequence oldSequence = (Sequence) oldCorbaType;
            Sequence newSequence = new Sequence();

            newSequence.setQName(newQname);
            newSequence.setType(nextSchemaType.getQName());
            newSequence.setElemtype(oldSequence.getElemtype());
            newSequence.setElemname(oldSequence.getElemname());
            newSequence.setBound(oldSequence.getBound());
            newSequence.setRepositoryID(newScope.toIDLRepositoryID());

            nextCorbaType = newSequence;
        } else if (oldCorbaType instanceof Fixed) {
            // Fixed
            //
View Full Code Here

    }
   
    private IdlType createSequence(CorbaTypeImpl ctype, IdlScopeBase scope,
                                   String local) throws Exception {
        IdlType idlType = null;
        Sequence s = (Sequence)ctype;
        IdlType base = findType(s.getElemtype());       
        int bound = (int)s.getBound();
        idlType = IdlSequence.create(scope, local, base, bound);
        scope.addToScope(idlType);
        return idlType;
    }
View Full Code Here

            // Sequence
            //
           
            nextSchemaType = duplicateXmlSchemaComplexType(newScope);
           
            Sequence oldSequence = (Sequence) oldCorbaType;
            Sequence newSequence = new Sequence();

            newSequence.setQName(newQname);
            newSequence.setType(nextSchemaType.getQName());
            newSequence.setElemtype(oldSequence.getElemtype());
            newSequence.setElemname(oldSequence.getElemname());
            newSequence.setBound(oldSequence.getBound());
            newSequence.setRepositoryID(newScope.toIDLRepositoryID());

            nextCorbaType = newSequence;
        } else if (oldCorbaType instanceof Fixed) {
            // Fixed
            //
View Full Code Here

TOP

Related Classes of org.apache.cxf.binding.corba.wsdl.Sequence

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.