Package org.omg.CORBA.portable

Examples of org.omg.CORBA.portable.OutputStream.write_string()


                try {
                    OutputStream out = rh.createExceptionReply();
                    Class<?> exceptionClass = ie.getTargetException().getClass();
                    TypeTree tree = TypeTreeCreator.createTypeTree(exceptionClass, null);
                    String exceptionId = Utils.getTypeId(exceptionClass);
                    out.write_string(exceptionId);
                    TypeHelpersProxy.write(tree.getRootNode(), out, ie.getTargetException());
                    return out;
                } catch (Exception e) {
                    logger.log(Level.WARNING, "Exception during handling invocation exception", e);
                }
View Full Code Here


            OutputStream os = (OutputStream) bootstrapDelegate.request( objref,
                operationName, true);

            if ( parameter != null ) {
                os.write_string( parameter );
            }

            try {
                // The only reason a null objref is passed is to get the version of
                // invoke used by streams.  Otherwise the PortableInterceptor
View Full Code Here

    public static void insertSystemException(SystemException ex, Any any) {
        OutputStream out = any.create_output_stream();
        ORB orb = (ORB)(out.orb());
        String name = ex.getClass().getName();
        String repID = ORBUtility.repositoryIdOf(name);
        out.write_string(repID);
        out.write_long(ex.minor);
        out.write_long(ex.completed.value());
        any.read_value(out.create_input_stream(),
            getSystemExceptionTypeCode(orb, repID, name));
    }
View Full Code Here

        // go to server.

        InputStream is = null;
        try {
            OutputStream os = request(null, "_is_a", true);
            os.write_string(dest);
            is = (InputStream) invoke((org.omg.CORBA.Object) null, os);

            return is.read_boolean();

        } catch (ApplicationException e) {
View Full Code Here

    }
   
    @Test
    public void testReadString() {
        OutputStream oStream = orb.create_output_stream();
        oStream.write_string("String");
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        String stringValue = reader.readString();
View Full Code Here

        String data[] = {"one", "one", "two", "three", "five", "eight", "thirteen", "twenty-one"};
       
        OutputStream oStream = orb.create_output_stream();
        oStream.write_long(data.length);
        for (int i = 0; i < data.length; ++i) {
            oStream.write_string(data[i]);
        }

        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
View Full Code Here

        int member1 = 12345;
        String member2 = "54321";
        boolean member3 = true;
       
        oStream.write_long(member1);
        oStream.write_string(member2);
        oStream.write_boolean(member3);

        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
View Full Code Here

        //     string message;
        // }
        short code = 12345;
        String message = "54321";
       
        oStream.write_string("IDL:org.apache.cxf.TestException/1.0");
        oStream.write_short(code);
        oStream.write_string(message);

        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
View Full Code Here

        short code = 12345;
        String message = "54321";
       
        oStream.write_string("IDL:org.apache.cxf.TestException/1.0");
        oStream.write_short(code);
        oStream.write_string(message);

        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        QName exceptIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "exception",
View Full Code Here

                        target.rollback ( arg0 );
                    } catch ( javax.transaction.SystemException ex ) {
                        String id = "IDL:javax/transaction/SystemEx:1.0";
                        org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply
                                .createExceptionReply ();
                        out.write_string ( id );
                        out.write_value ( ex,
                                javax.transaction.SystemException.class );
                        return out;
                    }
                    OutputStream out = reply.createReply ();
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.