Package org.apache.axis2.corba.idl.values

Examples of org.apache.axis2.corba.idl.values.StructValue


            AbstractValue value;
            if (compositeType instanceof ValueType)
                value = new ObjectByValue((ValueType) compositeType);
            else if (compositeType instanceof Struct)
                value = new StructValue((Struct) compositeType);
            else
                throw new CorbaInvocationException("Parameter type not supported");

            value.setMemberValues(compositeValues);
            return value;
View Full Code Here


            case TCKind._tk_wstring: arg.insert_wstring((String) value); break;
            case TCKind._tk_any: arg.insert_any((Any) value); break;
            case TCKind._tk_value: arg.insert_Value((Serializable) value); break;
            case TCKind._tk_objref: arg.insert_Object((org.omg.CORBA.Object) value); break;
            case TCKind._tk_struct:
                StructValue structValue = (StructValue) value;
                org.omg.CORBA_2_3.portable.OutputStream outputStream = (org.omg.CORBA_2_3.portable.OutputStream) arg.create_output_stream();
                arg.type(structValue.getTypeCode());
                structValue.write(outputStream);
                arg.read_value(outputStream.create_input_stream (), structValue.getTypeCode());
                break;
            case TCKind._tk_enum:
                EnumValue enumValue = (EnumValue) value;
                outputStream = (org.omg.CORBA_2_3.portable.OutputStream) arg.create_output_stream();
                arg.type(enumValue.getTypeCode());
View Full Code Here

            case TCKind._tk_value: returnValue = returned.extract_Value(); break;
            case TCKind._tk_objref: returnValue = returned.extract_Object(); break;
            //case TCKind._tk_longdouble :
            case TCKind._tk_struct:
                Struct struct = (Struct) returnType;
                StructValue structValue = new StructValue(struct);
                org.omg.CORBA_2_3.portable.InputStream inputStream = (org.omg.CORBA_2_3.portable.InputStream) returned.create_input_stream();
                structValue.read(inputStream);
                returnValue = structValue;
                break;
            case TCKind._tk_except:
                ExceptionType exceptionType = (ExceptionType) returnType;
                ExceptionValue exceptionValue = new ExceptionValue(exceptionType);
View Full Code Here

            case TCKind._tk_string: return "";
            case TCKind._tk_wstring: return "";
            //case TCKind._tk_any: return new Any();
            case TCKind._tk_value: return "";
            //case TCKind._tk_objref: return new org.omg.CORBA.Object();
            case TCKind._tk_struct: return new StructValue((Struct) type);
            case TCKind._tk_enum: return new EnumValue((EnumType) type);
            case TCKind._tk_union: return new UnionValue((UnionType) type);
            case TCKind._tk_alias: return new AliasValue((Typedef) type);
            case TCKind._tk_sequence: return new SequenceValue((SequenceType) type);
            case TCKind._tk_array:  return new ArrayValue((ArrayType) type);
View Full Code Here

            AbstractValue value;
            if (compositeType instanceof ValueType)
                value = new ObjectByValue((ValueType) compositeType);
            else if (compositeType instanceof Struct)
                value = new StructValue((Struct) compositeType);
            else
                throw new CorbaInvocationException("Parameter type not supported");

            value.setMemberValues(compositeValues);
            return value;
View Full Code Here

            case TCKind._tk_wstring: arg.insert_wstring((String) value); break;
            case TCKind._tk_any: arg.insert_any((Any) value); break;
            case TCKind._tk_value: arg.insert_Value((Serializable) value); break;
            case TCKind._tk_objref: arg.insert_Object((org.omg.CORBA.Object) value); break;
            case TCKind._tk_struct:
                StructValue structValue = (StructValue) value;
                org.omg.CORBA_2_3.portable.OutputStream outputStream = (org.omg.CORBA_2_3.portable.OutputStream) arg.create_output_stream();
                arg.type(structValue.getTypeCode());
                structValue.write(outputStream);
                arg.read_value(outputStream.create_input_stream (), structValue.getTypeCode());
                break;
            case TCKind._tk_enum:
                EnumValue enumValue = (EnumValue) value;
                outputStream = (org.omg.CORBA_2_3.portable.OutputStream) arg.create_output_stream();
                arg.type(enumValue.getTypeCode());
View Full Code Here

            case TCKind._tk_value: returnValue = returned.extract_Value(); break;
            case TCKind._tk_objref: returnValue = returned.extract_Object(); break;
            //case TCKind._tk_longdouble :
            case TCKind._tk_struct:
                Struct struct = (Struct) returnType;
                StructValue structValue = new StructValue(struct);
                org.omg.CORBA_2_3.portable.InputStream inputStream = (org.omg.CORBA_2_3.portable.InputStream) returned.create_input_stream();
                structValue.read(inputStream);
                returnValue = structValue;
                break;
            case TCKind._tk_except:
                ExceptionType exceptionType = (ExceptionType) returnType;
                ExceptionValue exceptionValue = new ExceptionValue(exceptionType);
View Full Code Here

            //case TCKind._tk_any: return new Any();
            case TCKind._tk_value: return "";
            //case TCKind._tk_objref: return new org.omg.CORBA.Object();
            case TCKind._tk_struct:
                Struct struct = (Struct) type;
                StructValue value = new StructValue(struct);
                Member[] members = struct.getMembers();
                Object[] memberValues = new Object[members.length];
                for (int i = 0; i < members.length; i++) {
                    memberValues[i] = getEmptyValue(members[i].getDataType());
                }
                value.setMemberValues(memberValues);
                return value;
            case TCKind._tk_enum: return new EnumValue((EnumType) type);
            case TCKind._tk_union:
                UnionType unionType = (UnionType) type;
                UnionValue unionValue = new UnionValue(unionType);
View Full Code Here

            AbstractValue value;
            if (compositeType instanceof ValueType)
                value = new ObjectByValue((ValueType) compositeType);
            else if (compositeType instanceof Struct)
                value = new StructValue((Struct) compositeType);
            else
                throw new CorbaInvocationException("Parameter type not supported");

            value.setMemberValues(compositeValues);
            return value;
View Full Code Here

            case TCKind._tk_wstring: arg.insert_wstring((String) value); break;
            case TCKind._tk_any: arg.insert_any((Any) value); break;
            case TCKind._tk_value: arg.insert_Value((Serializable) value); break;
            case TCKind._tk_objref: arg.insert_Object((org.omg.CORBA.Object) value); break;
            case TCKind._tk_struct:
                StructValue structValue = (StructValue) value;
                org.omg.CORBA_2_3.portable.OutputStream outputStream = (org.omg.CORBA_2_3.portable.OutputStream) arg.create_output_stream();
                arg.type(structValue.getTypeCode());
                structValue.write(outputStream);
                arg.read_value(outputStream.create_input_stream (), structValue.getTypeCode());
                break;
            case TCKind._tk_enum:
                EnumValue enumValue = (EnumValue) value;
                outputStream = (org.omg.CORBA_2_3.portable.OutputStream) arg.create_output_stream();
                arg.type(enumValue.getTypeCode());
View Full Code Here

TOP

Related Classes of org.apache.axis2.corba.idl.values.StructValue

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.