Package org.apache.yoko.orb.CORBA

Examples of org.apache.yoko.orb.CORBA.OutputStream.create_input_stream()


    public void testReadString() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        oStream.write_string("String");
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        String stringValue = reader.readString();
        assertTrue(stringValue.equals("String"));
    }
View Full Code Here


    public void testReadWString() {
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        oStream.write_wstring("WString");
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        String wstringValue = reader.readWString();
        assertTrue(wstringValue.equals("WString"));
    }
View Full Code Here

       
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        oStream.write_long_array(data, 0, data.length);

        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);

        // create an array of longs
        QName longIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "long", CorbaConstants.NP_WSDL_CORBA);
        QName arrayIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "array", CorbaConstants.NP_WSDL_CORBA);
View Full Code Here

        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);

        // create an sequence of strings
        QName stringIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "string", CorbaConstants.NP_WSDL_CORBA);
        QName seqIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "sequence", CorbaConstants.NP_WSDL_CORBA);
View Full Code Here

       
        oStream.write_long(member1);
        oStream.write_string(member2);
        oStream.write_boolean(member3);

        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        QName structIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "struct", CorbaConstants.NP_WSDL_CORBA);
        QName longIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "long", CorbaConstants.NP_WSDL_CORBA);
        QName stringIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "string", CorbaConstants.NP_WSDL_CORBA);
View Full Code Here

       
        oStream.write_string("IDL:org.apache.yoko.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", CorbaConstants.NP_WSDL_CORBA);
        QName shortIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "short", CorbaConstants.NP_WSDL_CORBA);
        QName stringIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "string", CorbaConstants.NP_WSDL_CORBA);
View Full Code Here

        OutputStream oStream = new OutputStream(buf);
       
        // create the following enum
        // enum { RED, GREEN, BLUE };
        oStream.write_long(1);
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        String[] enums = {"RED", "GREEN", "BLUE" };
        Enum enumType = new Enum();
        Enumerator enumRed = new Enumerator();
View Full Code Here

        OutputStream oStream = new OutputStream(buf);
       
        // create the following fixed
        // fixed<5,2>
        oStream.write_fixed(new java.math.BigDecimal("12345.67").movePointRight((int)2));
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
       
        Fixed fixedType = new Fixed();
        fixedType.setDigits(5);
        fixedType.setScale(2);
View Full Code Here

        oStream.write_boolean(nestedMember2Value.booleanValue());
        oStream.write_fixed(fixedValue.movePointRight(2));
        oStream.write_long(enumIndex);
        oStream.write_float(floatValue.floatValue());
       
        InputStream iStream = oStream.create_input_stream();
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
        reader.read(obj);       
       
        // Now that the Object has its values, try and write it to Stax
        XMLInputFactory inputFactory = XMLInputFactory.newInstance();
View Full Code Here

       
        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        oStream.write_char('c');
       
        InputStream iStream = oStream.create_input_stream();
        streamable._read(iStream);
        CorbaPrimitiveHandler streamableObj = (CorbaPrimitiveHandler)streamable.getObject();
        Object o = streamableObj.getValue();
       
        assertTrue(o instanceof Character);
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.