ORB orb = ORB.init(new String[ 0 ], null);
Any an = orb.create_any();
OutputStream out = an.create_output_stream();
comServant object = new comServant();
orb.connect(object);
out.write_Object(object);
IOR ior = IORHelper.read(out.create_input_stream());
boolean ip = false;
for (int i = 0; i < ior.profiles.length; i++)
{
if (ior.profiles [ i ].tag == TAG_INTERNET_IOP.value)
{
if (ip)
h.fail("HR:One internet profile expected");
ip = true;
h.check(ior.profiles [ i ].profile_data.length > 0,
"HR:Internet profile data"
);
}
}
h.check(ip, "HR:Internet profile present");
h.check(object._is_a(ior.type_id), "HR id");
h.check(ior.profiles.length > 0, "HR profiles");
out = orb.create_any().create_output_stream();
IORHelper.write(out, ior);