Examples of TypeCode


Examples of org.omg.CORBA.TypeCode

        // build the object holder
        StructMember[] exceptMembers = new StructMember[2];
        exceptMembers[0] = new StructMember("code", orb.get_primitive_tc(TCKind.tk_short), null);
        exceptMembers[1] = new StructMember("message", orb.get_primitive_tc(TCKind.tk_string), null);
        TypeCode exceptTC = orb.create_exception_tc("IDL:org.apache.yoko.TestException/1.0", "TestException",
                                                    exceptMembers);
        CorbaExceptionHandler obj = new CorbaExceptionHandler(new QName("TestException"), exceptIdlType,
                                                              exceptTC, exceptType);
        obj.addMember(
                new CorbaPrimitiveHandler(new QName("code"), shortIdlType, exceptMembers[0].type, null));
View Full Code Here

Examples of org.omg.CORBA.TypeCode

        enumType.getEnumerator().add(enumBlue);
       
        // These values don't matter to the outcome of the test but are needed during construction
        QName enumName = new QName("TestEnum");
        QName enumIdlType = new QName("corbatm:TestEnum");
        TypeCode enumTC = orb.create_enum_tc("IDL:TestEnum:1.0", enumName.getLocalPart(), enums);
        CorbaEnumHandler obj = new CorbaEnumHandler(enumName, enumIdlType, enumTC, enumType);
       
        reader.readEnum(obj);
        assertTrue(obj.getValue().equals(enums[1]));
    }
View Full Code Here

Examples of org.omg.CORBA.TypeCode

        fixedType.setScale(2);
       
        // These values don't matter to the outcome of the test but are needed during construction
        QName fixedName = new QName("TestFixed");
        QName fixedIdlType = new QName("corbatm:TestFixed");
        TypeCode fixedTC = orb.create_fixed_tc((short)fixedType.getDigits(), (short)fixedType.getScale());
        CorbaFixedHandler obj = new CorbaFixedHandler(fixedName, fixedIdlType, fixedTC, fixedType);
       
        reader.readFixed(obj);
       
        assertTrue(obj.getValue().equals(new java.math.BigDecimal("12345.67")));
View Full Code Here

Examples of org.omg.CORBA.TypeCode

    static void testOps(ORB orb, DynAnyFactory factory, TypeCode tc,
            boolean hasComponents) {
        try {
            Any badAny = orb.create_any();
            DynAny d1 = null, d2 = null, d3 = null, copy = null;
            TypeCode origTC = getOrigType(tc);

            //
            // Create an any having a TypeCode that will not match tc
            //
            if (tc.kind() != TCKind.tk_short)
                badAny.insert_short((short) 0);
            else
                badAny.insert_ushort((short) 0);

            //
            // Test: type()
            //
            d1 = factory.create_dyn_any_from_type_code(tc);
            TypeCode tcv = d1.type();
            TEST(tc.equal(tcv));
            d1.destroy();

            //
            // Test: assign() TypeMismatch exception
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.