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
    @Test
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));
    }

    @Test
    public void test_string_streamable()
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));
    }

    @Test
    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);
    }

    @Test
    public void test_wstring()
View Full Code Here

        Any any1 = setup.getClientOrb().create_any();
        any1.insert_string("foobar");
        Any any2 = setup.getClientOrb().create_any();
        ((org.jacorb.orb.Any)any2).insert(any1.type(),
                                                 any1.extract_string());
        assertTrue (any1.extract_string() == any2.extract_string());
    }

    @Test
    public void testEquals() throws Exception
    {
View Full Code Here

                org.omg.CORBA.NVList params = orb.create_list(0);
                Any stringAny = orb.create_any();
                stringAny.type( orb.get_primitive_tc(org.omg.CORBA.TCKind.tk_string));
                params.add_value( "", stringAny, org.omg.CORBA.ARG_IN.value );
                request.arguments( params );
                impl._notify( stringAny.extract_string() );
                Any s = orb.create_any();
                s.type( orb.get_primitive_tc(org.omg.CORBA.TCKind.tk_void ));
                request.set_result( s );
            }
            else if( op.equals("_non_existent") )
View Full Code Here

     * on it already. If so, use it.
     */

    if (localData.type().kind().value() != TCKind._tk_null)
    {
        if ((threadId = localData.extract_string()) == null)
      throw new UNKNOWN(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.context.invalidparam"));
    }
    else
        threadId = ThreadUtil.getThreadId() ;

View Full Code Here

  {
      String threadId = null;

      try
      {
    if ((threadId = data.extract_string()) != null)
    {
        //        ControlWrapper ctx = OTSImpleManager.systemCurrent().contextManager().popAction(threadId);
        ControlWrapper ctx = OTSImpleManager.current().contextManager().popAction(threadId);

        //        OTSImpleManager.systemCurrent().contextManager().purgeActions(threadId);
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.