[omniORB] Question regarding CosNaming and Python/omniOrb
Richard Gruet
rgruet@ina.fr
Thu, 13 Apr 2000 14:16:02 +0200
Steinar,
In your example, bindl and bindit are CLASSES instead of instances;
furthermore, they are OUT parameters, thus according to the std Corba/Python
mapping, they are returned packed in a tuple with the fct result. That is, in
your example you should call list() the following way:
how_many = 5000 # How much elements you may read without using the binding
iterator.
aBindingList, aBindIterator = rootContext.list(how_many)
-> aBindingList is a Python sequence of CosNaming.Binding instances (see
naming.idl).
Hope this helps,
Richard Gruet
Steinar Rune Eriksen wrote:
> Does anyone have an example of hwo to use the NamingContext::list() method
> with omniorbpy. I have tried all sorts of commands without success, only
> getting BAD_PARAM in return..
> I am using Orbix 3.0.1 NS reading the root context IOR from a file. The
> root context seems OK itself and I can resolve to a specific object in the
> NS tree. Still listing the contents of a context is still a mystery...:-)
>
> bindl=CosNaming.BindingList
> bindit=CosNaming.BindingIterator
> rootContext=orb.string_to_object(ior)
>
> listarg=[0,bindl,bindit]
> rootContext.list(listarg)