Package org.omg.CORBA

Examples of org.omg.CORBA.Any.type()


        Exception ex = request.env().exception();
        if (ex != null) {
            if (ex instanceof UnknownUserException) {
                UnknownUserException userEx = (UnknownUserException) ex;
                Any except = userEx.except;
                RaisesType raises = exceptions.get(except.type());
                if (raises == null) {
                    throw new CorbaBindingException("Couldn't find the exception type code to unmarshall");
                }
                QName elName = new QName("", raises.getException().getLocalPart());
                CorbaObjectHandler handler =
View Full Code Here


    }

    public Object readAny(org.omg.CORBA.portable.InputStream in)
            throws org.omg.CORBA.SystemException {
        Any any = in.read_any();
        TypeCode typecode = any.type();

        switch (typecode.kind().value()) {

        case TCKind._tk_null:
        case TCKind._tk_void:
View Full Code Here

                break;

            default:
                try {
                    Any a = orb.create_any();
                    a.type(tc);
                    d1 = factory.create_dyn_any_from_type_code(tc);
                    d1.from_any(a);
                    TEST("from_any() should not have succeeded" == null);
                } catch (org.omg.DynamicAny.DynAnyPackage.InvalidValue ex) {
                    // expected
View Full Code Here

        boolean boolValue = false;
        any.insert_boolean(boolValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:boolean";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_boolean);
        boolean boolResult = result.extract_boolean();
        assertTrue(boolResult == boolValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));
View Full Code Here

        char charValue = 'c';
        any.insert_char(charValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:byte";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_char);
        char charResult = result.extract_char();
        assertTrue(charResult == charValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));
View Full Code Here

        char wcharValue = 'w';
        any.insert_wchar(wcharValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:string";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_wchar);
        char wcharResult = result.extract_wchar();
        assertTrue(wcharResult == wcharValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));
View Full Code Here

        byte octetValue = (byte)8;
        any.insert_octet(octetValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:unsignedByte";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_octet);
        byte octetResult = result.extract_octet();
        assertTrue(octetResult == octetValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));
View Full Code Here

        short shortValue = (short)-123;
        any.insert_short(shortValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:short";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_short);
        short shortResult = result.extract_short();
        assertTrue(shortResult == shortValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));
View Full Code Here

        short ushortValue = (short)123;
        any.insert_ushort(ushortValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:unsignedShort";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_ushort);
        short ushortResult = result.extract_ushort();
        assertTrue(ushortResult == ushortValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));
View Full Code Here

        int longValue = -12345;
        any.insert_long(longValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:int";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_long);
        int longResult = result.extract_long();
        assertTrue(longResult == longValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));
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.