Package org.omg.CORBA

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


        Any outAny = setup.getClientOrb().create_any();
        MyStringAliasHelper.insert(outAny, testValue);

        Any inAny = server.bounce_any(outAny);
        assertEquals(testValue, inAny.extract_string());
        assertTrue(outAny.equal(inAny));
    }

    //compare two anys, one inserted manually, one inserted using helper
    public void test_alias2()
View Full Code Here


        throws Exception
    {
        String testValue = "foo";
        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_string(testValue);
        assertEquals(testValue, outAny.extract_string());

        Any inAny = server.bounce_any(outAny);

        assertEquals(testValue, inAny.extract_string());
        assertTrue(outAny.equal(inAny));
View Full Code Here

        outAny.insert_string(testValue);
        assertEquals(testValue, outAny.extract_string());

        Any inAny = server.bounce_any(outAny);

        assertEquals(testValue, inAny.extract_string());
        assertTrue(outAny.equal(inAny));
    }

    public void test_string_streamable()
        throws Exception
View Full Code Here

    {
        String testValue = "foo";

        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_Streamable(new StringHolder(testValue));
        assertEquals(testValue, outAny.extract_string());

        Any inAny = server.bounce_any(outAny);

        assertEquals(testValue, inAny.extract_string());
        assertTrue(outAny.equal(inAny));
View Full Code Here

        outAny.insert_Streamable(new StringHolder(testValue));
        assertEquals(testValue, outAny.extract_string());

        Any inAny = server.bounce_any(outAny);

        assertEquals(testValue, inAny.extract_string());
        assertTrue(outAny.equal(inAny));
    }

    public void test_string_stream()
    {
View Full Code Here

        Any any = setup.getClientOrb().create_any();
        any.type (setup.getClientOrb().get_primitive_tc(TCKind.tk_string));
        any.create_output_stream().write_string (testValue);
        // don't bounce, because we want to extract from the
        // output stream we just created
        String outValue = any.extract_string();
        assertEquals (testValue, outValue);
    }

    public void test_wstring()
        throws Exception
View Full Code Here

        {
            Current current = (Current) orb.resolve_initial_references( "PICurrent" );

            Any any = current.get_slot( ServerInitializer.slot_id );

            ((org.jacorb.orb.ORB)orb).getConfiguration ().getLogger("org.jacorb.test").debug ("Server extracted from PICurrent: >>" + any.extract_string() + "<<");
        }
        catch( Exception e )
        {
            throw new INTERNAL (e.getMessage());
        }
View Full Code Here

        int slot2 = med2.getSlot();
        Any anyFrom2 = curr2.get_slot(slot2);

        if (anyFrom2.type().kind().value() != TCKind._tk_null)
        {
            String extractedFrom2 = anyFrom2.extract_string();
System.out.println ("### "+extractedFrom2 +" and " + info1);
            assertFalse("Contains data from ORB 1", extractedFrom2.equals(info1));
        }

    }
View Full Code Here

            // Get the slot data as a string
            String s = null;
            String slotDataAsStr = "<no_slot_data>";
            if( slotDataAsAny.type().kind().value() != org.omg.CORBA.TCKind._tk_null
                && null != (s = slotDataAsAny.extract_string())) {
               slotDataAsStr = s;
            }

            slotDataAsStr += ":" + methodName;
View Full Code Here

        {
            Current current = (Current) orb.resolve_initial_references( "PICurrent" );

            Any any = current.get_slot( MyInitializer.slot_id );

            String s = any.extract_string();

            logger.debug ("TestObjectImpl.foo, extracted from PICurrent: >>" + s + "<<");

            String expectedPiFlow = "JacOrbRocks:receive_request_service_contexts:preinvoke:receive_request:foo";
            if (! expectedPiFlow.equals(s))
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.