Package org.omg.CORBA_2_3.portable

Examples of org.omg.CORBA_2_3.portable.OutputStream


            return Utility.autoConnect(obj,orb,true);
        }

        OutputStream out = (OutputStream)orb.create_output_stream();
        out.write_value((Serializable)obj);
        InputStream in = (InputStream)out.create_input_stream();
        return in.read_value();
    }
View Full Code Here


    {
        EncapsOutputStream os =
            sun.corba.OutputStreamFactory.newEncapsOutputStream(orb);
        os.write_long( getId() ) ;
        write( os ) ;
        InputStream is = (InputStream)(os.create_input_stream()) ;
        return org.omg.IOP.TaggedProfileHelper.read( is ) ;
    }
View Full Code Here

        org.omg.IOP.TaggedComponent comp )
    {
        EncapsOutputStream os =
            sun.corba.OutputStreamFactory.newEncapsOutputStream((ORB)orb);
        org.omg.IOP.TaggedComponentHelper.write( os, comp ) ;
        InputStream is = (InputStream)(os.create_input_stream() ) ;
        // Skip the component ID: we just wrote it out above
        is.read_ulong() ;

        return (TaggedComponent)create( comp.tag, is ) ;
    }
View Full Code Here

    public org.omg.IOP.TaggedProfile getIOPProfile()
    {
        EncapsOutputStream os =
            sun.corba.OutputStreamFactory.newEncapsOutputStream(orb);
        write( os ) ;
        InputStream is = (InputStream)(os.create_input_stream()) ;
        return org.omg.IOP.TaggedProfileHelper.read( is ) ;
    }
View Full Code Here

    {
        Method javaMethod = null ;
        DynamicMethodMarshaller dmm = null;

        try {
            InputStream in = (InputStream) _in;

            javaMethod = classData.getIDLNameTranslator().getMethod( method ) ;
            if (javaMethod == null)
                throw wrapper.methodNotFoundInTie( method,
                    target.getClass().getName() ) ;
View Full Code Here

    {
        // Note that the exception ID is present in both ae
        // and in the input stream from ae.  The exception
        // reader must actually read the exception ID from
        // the stream.
        InputStream is = (InputStream)ae.getInputStream() ;
        String excName = ae.getId() ;
        int index = findDeclaredException( excName ) ;
        if (index < 0) {
            excName = is.read_string() ;
            Exception res = new UnexpectedException( excName ) ;
            res.initCause( ae ) ;
            return res ;
        }
View Full Code Here

    public org.omg.IOP.IOR getIOPIOR() {
        EncapsOutputStream os =
            sun.corba.OutputStreamFactory.newEncapsOutputStream(factory);
        write(os);
        InputStream is = (InputStream) (os.create_input_stream());
        return org.omg.IOP.IORHelper.read(is);
    }
View Full Code Here

                    parameterTypes[i] = loadClass(types[i]);
                }
                returnType = loadClass(methodInfo.getReturnType());
            }

            InputStream in = null;
            try {
                OutputStream out = (OutputStream)stub._request(operation, true);

                for (int i = 0; i < parameterTypes.length; i++) {
                    // Object arg = (args.length < i) ? null : args[i];
View Full Code Here

            for (int i = 0; i < types.length; i++) {
                parameterTypes[i] = loadClass(types[i]);
            }
            Class returnType = loadClass(methodInfo.getReturnType());

            InputStream in = null;
            try {
                OutputStream out = (OutputStream)stub._request(operation, true);

                for (int i = 0; i < types.length; i++) {
                    // Object arg = (args.length < i) ? null : args[i];
                    writeValue(out, args[i], parameterTypes[i]);
                }
                if (returnType == void.class) {
                    // void return
                    stub._invoke(out);
                    return null;
                } else {
                    // read the return value
                    in = (InputStream)stub._invoke(out);
                    Object response = readValue(in, returnType);
                    return response;
                }

            } catch (ApplicationException ex) {
                in = (InputStream)ex.getInputStream();
                String id = in.read_string();
                // Check if the id matches to any declared exceptions for the
                // method
                String[] exceptionTypes = methodInfo.getExceptionTypes();
                for (int i = 0; i < exceptionTypes.length; i++) {
                    Class exceptionType = loadClass(exceptionTypes[i]);
                    String exceptionId = ExceptionType.getExceptionType(exceptionType).getExceptionRepositoryId();
                    if (id.equals(exceptionId)) {
                        Throwable t = (Throwable)in.read_value(exceptionType);
                        throw new ServiceRuntimeException(t); // FIXME should
                        // be
                        // ServcieBusinessException?
                        // no support by
                        // Tuscany core
View Full Code Here

                    parameterTypes[i] = loadClass(types[i]);
                }
                returnType = loadClass(methodInfo.getReturnType());
            }

            InputStream in = null;
            try {
                OutputStream out = (OutputStream)stub._request(operation, true);

                for (int i = 0; i < parameterTypes.length; i++) {
                    // Object arg = (args.length < i) ? null : args[i];
View Full Code Here

TOP

Related Classes of org.omg.CORBA_2_3.portable.OutputStream

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.