Package org.omg.CORBA

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


            Any numAny = orb.create_any();
            numAny.type( orb.get_primitive_tc(org.omg.CORBA.TCKind.tk_long));
            params.add_value( "", numAny,org.omg.CORBA.ARG_IN.value );
            request.arguments( params );
            Any a = orb.create_any();
            a.insert_string( delegate.writeNumber( numAny.extract_long() ));
            request.set_result( a );
        }
        else if( op.equals("add") )
        {
            org.omg.CORBA.NVList params = orb.create_list(0);
View Full Code Here


        // End

        try
        {
            Any nameAny = orb.create_any();
            nameAny.insert_string(ipAddr);

            ri.set_slot(IPInitializer.slotID, nameAny);
        }
        catch (Exception e)
        {
View Full Code Here

        System.out.println( s.generic( a ) );

        // string
        System.out.print("Passing a string...");
        a.type( orb.create_string_tc(0));
        a.insert_string("Hi there");
        System.out.println( s.generic( a ) );
       
        // wstring
        System.out.print("Passing a Wstring...");
        a.insert_wstring( "Hi there" );
View Full Code Here

        System.out.println( "Output of generic: " + s.generic( a ) );
       
        /* insert an any */
        System.out.print("Passing an any");
        Any inner_any = orb.create_any();
        inner_any.insert_string("Hello in any");
        a.insert_any(inner_any);
        System.out.println( "Output of generic: " + s.generic( a ) );
       
        while( counter > 0 )
        {
View Full Code Here

    break;
      case TCKind._tk_objref:
    System.out.println("Objectref.");
    AnyServer s = AnyServerHelper.narrow(a.extract_Object());
    Any any = org.omg.CORBA.ORB.init().create_any();
    any.insert_string("hallo");
    result = s.generic( any );
    break;
      case TCKind._tk_any:
    System.out.println("Any.");
    Any inner_any = a.extract_any();
View Full Code Here

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

        Any inAny = setup.getClientOrb().create_any();
        inAny.insert_string(testValue);

        assertTrue(outAny.equal(inAny));
    }

    //insert manually, extract using helper
View Full Code Here

        throws Exception
    {
        String testValue = "foo";

        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_string(testValue);

        Any inAny = server.bounce_any(outAny);
        assertEquals(testValue, MyStringAliasHelper.extract(inAny));
        assertTrue(outAny.equal(inAny));
    }
View Full Code Here

    @Test
    public void test_equal()
        throws Exception
    {
        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_string("foo");

        Any inAny = setup.getClientOrb().create_any();
        inAny.insert_string("bar");

        assertFalse(outAny.equal(inAny));
View Full Code Here

    {
        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_string("foo");

        Any inAny = setup.getClientOrb().create_any();
        inAny.insert_string("bar");

        assertFalse(outAny.equal(inAny));
    }

    //different typecode
View Full Code Here

    {
        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_wstring("foo");

        Any inAny = setup.getClientOrb().create_any();
        inAny.insert_string("bar");

        assertFalse(outAny.equal(inAny));
    }

    @Test
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.