Package org.omg.CORBA

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


                                               hashCode() << 32 |
                                               ((myTraceId & 0xffff) << 16) |
                                               (ri.request_id() & 0xffff));

                Any any = ri.get_slot(slot_id);
                if (any.type().kind().value() != TCKind._tk_null)
                {
                    /*
                       we are not the initiatiator of the call:
                       extract the existing request
                    */
 
View Full Code Here


        for (int x = 0; x < _operationDescription.parameters.length; ++x)
        {
            final Any _any = getORB().create_any();

            _any.type(_operationDescription.parameters[x].type);

            _args.add_value(_operationDescription.parameters[x].name, _any, ARG_OUT.value);
        }

        _request.set_return_type(_operationDescription.result);
View Full Code Here

        for (int x = 0; x < _operation.parameters.length; ++x)
        {
            Any _value = getORB().create_any();

            _value.type(_operation.parameters[x].type);

            _expectedParams.add_value(_operation.parameters[x].name, _value,
                    ParameterMode._PARAM_IN);
        }
View Full Code Here

    }

    private static final NamedValue createVoidResultValue(ORB orb)
    {
        Any any = orb.create_any();
        any.type(orb.get_primitive_tc(TCKind.tk_void));
        org.jacorb.orb.NamedValue namedValue = new org.jacorb.orb.NamedValue(1);
        namedValue.set_value(any);
        return namedValue;
    }
View Full Code Here

   */
  public void testAny_read_write()
  {
    Any a = orb.create_any();
    org.omg.CORBA.portable.OutputStream out = a.create_output_stream();
    a.type(ServiceInformationHelper.type());
    ServiceInformationHelper.write(out, createInstance());
    a.read_value(out.create_input_stream(), ServiceInformationHelper.type());

    verifyInstance(ServiceInformationHelper.read(a.create_input_stream()));
  }
View Full Code Here

    assertEquals("Any enclosed value", expectedReturn.extract_long(),
                 actualReturn.extract_long()
                );

    assertTrue("Any, types", expectedReturn.type().equal(actualReturn.type()));

    expectedReturn = orb.create_any();
    expectedReturn.insert_string("http://www.akl.lt/remejai");

    out = out();
View Full Code Here

    actualReturn = out.create_input_stream().read_any();

    assertEquals("Any enclosed value", expectedReturn.extract_string(),
                 actualReturn.extract_string()
                );
    assertTrue("Any, types", expectedReturn.type().equal(actualReturn.type()));
  }

  public void testRead_boolean()
  {
    out = out();
View Full Code Here

            default :
              try
                {
                  Any a = orb.create_any();
                  a.type(tc);
                  d1 = factory.create_dyn_any_from_type_code(tc);
                  d1.from_any(a);
                  harness.fail("from_any() should not have succeeded");
                }
              catch (org.omg.DynamicAny.DynAnyPackage.InvalidValue ex)
View Full Code Here

        String wstringValue = "test wstring";
        any.insert_wstring(wstringValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:string";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_wstring);
        String wstringResult = result.extract_wstring();
        assertTrue(wstringResult == wstringValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));
    }
View Full Code Here

        resultValue = anyHandler.getValueData();
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultValue.equals(value));       
        assertTrue(resultSchemaType.equals(schemaType));
        resultAny = anyHandler.getValue();
        assertTrue(resultAny.type().kind().value() == TCKind._tk_boolean);

        value = "7";
        schemaType = "xs:byte";
        anyHandler.setValueFromData(orb, value, schemaType);
        resultValue = anyHandler.getValueData();
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.