[omniORB] Question regarding CosNaming and Python/omniOrb

Duncan Grisby dgrisby@uk.research.att.com
Thu, 13 Apr 2000 11:15:10 +0100


On Thursday 13 April, 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.. 

You should read the Python mapping specification, from

  http://www.omg.org/cgi-bin/doc?ptc/00-01-12

which explains how out arguments are mapped. Unlike most OMG
specifications, the Python mapping is actually quite easy to
understand.


To use NamingContext::list(), you should do

  blist, biterator = rootContext.list(5)

blist is now a sequence of Names with at most 5 elements; biterator is
a (possibly nil) BindingIterator reference which you can use to
retrieve the rest of the context's elements.

HTH,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --