[omniORB] IOR in Python from hostname and port

K. Novitsky novitk@pobox.com
Sat, 25 Aug 2001 14:06:55 -0400


Ok, I think I was not clear on what my problem is, so let me try again...

Let's say I have two IORs: AAA and BBB.

#catior AAA
Type ID: "IDL:IT_daemon:1.0"
Profiles:
1. IIOP 1.0 127.0.0.1 1570 ":\localhost:IT_daemon:0::IR:IT_daemon."

#catior BBB
Type ID: ""
Profiles:
1. IIOP 1.0 127.0.0.1 1570 ":\localhost:IT_daemon:0::IR:IT_daemon."

Now if I do:
///
obj = orb.string_to_object(X)
daemon = obj._narrow(IT_daemon)
\\\

When X is AAA everything works. If X is BBB, daemon is None.  Profiles are
identical, but the BBB has an empty type id.
(BBB was generated by:
    ///
    obj = orb.string_to_object("corbaloc:iiop:...")
    print orb.object_to_string(obj)
    \\\)

I believe when type of an object is unknown, _narrow does an 'is_a' call.
Orbix returns false. I also think that 'is_a' in _narrow is unconditional
on -ORBverifyObjectExistsAndType.

I want to invoke my client using following syntax(object key is generated
within):
///
client.py hostname port
\\\
which I thought would be no problem with corbaloc, but alas...

I see there are 3 possible solutions:
1) generate proper IOR with proper typeid. Basically means porting genior
into Python. Looks complicated.
2) somehow patch type id into object reference before _narrow. I don't see
any means of doing it in OmniOrbpy.
3) call genior from with python. Works but clumsy.

Thx, KN