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

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


        QName seqElementType;
        if (seqType instanceof Anonsequence) {
            Anonsequence anonSeqType = (Anonsequence) seqType;
            seqElementType = anonSeqType.getElemtype();
        } else {
            Sequence type = (Sequence) seqType;
            seqElementType = type.getElemtype();
        }
        return CorbaUtils.isPrimitiveIdlType(seqElementType);
    }
View Full Code Here


        // create an sequence of strings
        QName stringIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "string", CorbaConstants.NP_WSDL_CORBA);
        QName seqIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "sequence", CorbaConstants.NP_WSDL_CORBA);

        Sequence seqType = new Sequence();
        seqType.setBound(data.length);
        seqType.setElemtype(stringIdlType);       
        // name and respoitory ID of the sequence are not needed for this test

        // build the object holder for a sequence.
        TypeCode seqTC = orb.create_sequence_tc(data.length, orb.get_primitive_tc(TCKind.tk_string));
        CorbaSequenceHandler obj = new CorbaSequenceHandler(new QName("Seq"), seqIdlType, seqTC, seqType);
View Full Code Here

    @Test
    public void testCorbaSequenceHandler() {
        objName = new QName("object");
        objIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "sequenceType", CorbaConstants.NP_WSDL_CORBA);
        objTypeCode = orb.create_sequence_tc(5, orb.get_primitive_tc(TCKind.tk_long));
        Sequence sequenceType = new Sequence();
        sequenceType.setName("sequenceType");
        sequenceType.setElemtype(CorbaConstants.NT_CORBA_LONG);
        sequenceType.setBound(5);
        sequenceType.setRepositoryID("IDL:SequenceType:1.0");
        obj = new CorbaSequenceHandler(objName, objIdlType, objTypeCode, sequenceType);
        assertNotNull(obj);

        int sequenceData[] = {2, 4, 6, 8, 10};
        for (int i = 0; i < sequenceData.length; ++i) {
View Full Code Here

        if (seqType instanceof Anonsequence) {
            Anonsequence anonSeqType = (Anonsequence) seqType;
            seqElementType = anonSeqType.getElemtype();
            elementName = anonSeqType.getElemname();
        } else {
            Sequence type = (Sequence) seqType;
            seqElementType = type.getElemtype();
            elementName = type.getElemname();
        }
        CorbaObjectHandler template = CorbaHandlerUtils.initializeObjectHandler(orb,
                                                                                elementName,
                                                                                seqElementType,
                                                                                typeMap,
View Full Code Here

       
        // create an sequence of strings
        QName stringIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "string", CorbaConstants.NP_WSDL_CORBA);
        QName seqIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "sequence", CorbaConstants.NP_WSDL_CORBA);

        Sequence seqType = new Sequence();
        seqType.setBound(data.length);
        seqType.setElemtype(stringIdlType);       
        // name and respoitory ID of the sequence are not needed for this test

        // build the object holder for a sequence.
        TypeCode seqTC = orb.create_sequence_tc(data.length, orb.get_primitive_tc(TCKind.tk_string));
        CorbaSequenceHandler obj = new CorbaSequenceHandler(new QName("Seq"), seqIdlType, seqTC, seqType);
View Full Code Here

                } else {
                    tc = orb.create_interface_tc(objType.getRepositoryID(),
                                                 getTypeCodeName(objType.getName()));
                }
            } else if (obj instanceof Sequence) {
                Sequence seqType = (Sequence)obj;
                tc = orb.create_sequence_tc((int) seqType.getBound(),
                                            getTypeCode(orb, seqType.getElemtype(), typeMap, seenTypes));
            } else if (obj instanceof Struct) {
                Struct structType = (Struct)obj;

                // TODO: check to see if this is a recursive type.
                if (seenTypes.contains(new QName(structType.getName()))) {
View Full Code Here

                } else {
                    tc = orb.create_interface_tc(objType.getRepositoryID(),
                                                 getTypeCodeName(objType.getName()));
                }
            } else if (obj instanceof Sequence) {
                Sequence seqType = (Sequence)obj;
                tc = orb.create_sequence_tc((int) seqType.getBound(),
                                            getTypeCode(orb, seqType.getElemtype(), typeMap, seenTypes));
            } else if (obj instanceof Struct) {
                Struct structType = (Struct)obj;
               
                // TODO: check to see if this is a recursive type.
                if (seenTypes.contains(new QName(structType.getName()))) {
View Full Code Here

        QName seqElementType = null;
        long seqBound = 0;
        CorbaTypeImpl baseType = obj.getType();
        QName elementName;
        if (baseType instanceof Sequence) {
            Sequence seqType = (Sequence)baseType;
            seqElementType = seqType.getElemtype();
            seqBound = seqType.getBound();
            elementName = seqType.getElemname();
        } else {
            Anonsequence seqType = (Anonsequence)baseType;
            seqElementType = seqType.getElemtype();
            seqBound = seqType.getBound();
            elementName = seqType.getElemname();
        }
        if (seqBound == 0) {
            // This is an unbounded sequence.  Store a 'template' object that we can use to create
            // new objects as needed
            CorbaObjectHandler elementObj = null;
View Full Code Here

        QName seqElementType;
        if (seqType instanceof Anonsequence) {
            Anonsequence anonSeqType = (Anonsequence) seqType;
            seqElementType = anonSeqType.getElemtype();
        } else {
            Sequence type = (Sequence) seqType;
            seqElementType = type.getElemtype();
        }
        return CorbaUtils.isPrimitiveIdlType(seqElementType);
    }
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

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.