[omniORB] Passing object references back to the server

Samuel Abels newsgroups at debain.org
Fri May 25 21:05:21 BST 2007


Hi,

Given the following IDL:

module CServer {
  interface Action {
    void set_name(in string name);
  };

  interface WorkQueue {
    long enqueue(in Action my_action);
  };
};


I am trying to pass an Action reference that was previously retrieved
from the server back to the WorkQueue.enqueue() method:

-----------------
[...]
orb       = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
action    = orb.string_to_object("corbaname:rir:#cserver/Action")
workqueue = orb.string_to_object("corbaname:rir:#cserver/WorkQueue")
action.set_name("Good enough.")  # Works.
workqueue.enqueue(action) # This fails.
-----------------

The error is:

-----------------
Traceback (most recent call last):
  File "./client.py", line 13, in <module>
    workqueue.enqueue(action)
  File "/pub/scripts/cserver/cserver_idl.py", line 192, in enqueue
    return _omnipy.invoke(self, "enqueue",
_0_CServer.WorkQueue._d_enqueue, args)
omniORB.CORBA.BAD_PARAM: Minor: 0x41540058, COMPLETED_MAYBE.
-----------------

I see that the parameter type is not accepted, but I do not understand
why. Can anyone explain this (or point me to an explanation)? I tried
looking at the docs but could not find how this specific design can be
done.

Thanks,
-Samuel




More information about the omniORB-list mailing list