[omniORB] omniORB.CORBA.BAD_PARAM

Paul Brannan pbrannan@atdesk.com
Wed, 14 Nov 2001 12:35:06 -0500 (EST)


I have an IDL that looks like this:

  module Test {
    struct Bar {
      char str[10];
    };

    interface Foo {
      void send(in Bar str);
    };
  };

And my client (in python) looks like this:

  import sys
  import CORBA
  import Test
  import CosNaming

  orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
  obj = orb.resolve_initial_references('NameService')
  nc = obj._narrow(CosNaming.NamingContextExt)
  obj = nc.resolve_str('test')
  test = obj._narrow(Test.Foo)
  b = Test.Bar('testing')
  test.send(b)

The server is implemented in C++ using TAO.  When I run the C++ client
(also using TAO), the string 'testing' is sent properly from the client to
the server.  However, running the python client gives me:

  Traceback (most recent call last):
    File "client.py", line 17, in ?
      test.send(b)
    File "Test_idl.py", line 61, in send
      return _omnipy.invoke(self, "send", _0_Test.Foo._d_send, args)
  omniORB.CORBA.BAD_PARAM: Minor: 0, Completed: COMPLETED_NO.

(the line numbers for client.py don't match due to the comments that were
removed from the top of the file).  It seems that basic types (string,
long, etc.) work just fine, but user-defined types give me BAD_PARAM.  Am
I doing something wrong?

Thanks,

Paul