[omniORB] Possible bug in omniidl regarding _PD_repoId?

Tarjei Knapstad tarjei.knapstad at gmail.com
Mon Oct 29 09:32:09 GMT 2012


I have encountered an issue when trying to get object references to an
existing server using the IIOP.Net library from a C# application.
After some digging, I found the issue to be a failure in the "is_a()"
call because the _PD_repoId string is not set correctly. The existing
omniORB server code defines several interfaces in separate IDL files
which are then included into a module in a separate IDL file like so:

// myInterface.idl
interface MyInterface {
};

// moduleIncl.idl
module MyModule {
  #include "myInterface.idl"
};

When compiling this with omniidl, the _PD_repoId of MyInterface is defined as:

moduleInclSK.cc:const char* MyModule::MyInterface::_PD_repoId =
"IDL:MyInterface:1.0";

However, if I define MyInterface inline in one single file like this:

// moduleInline.idl
module MyModule {
  interface MyInterface {
  };
};

...then the _PD_repoId string is defined as:

moduleInlineSK.cc:const char* MyModule::MyInterface::_PD_repoId =
"IDL:MyModule/MyInterface:1.0";

The latter is what IIOP.Net asks for when trying to obtain a object
reference. Is this a bug in how omniidl treats include directives? It
seems to disregard the fact that a file was included inside a module,
but I haven't been able to figure out if this is legal IDL in the
first place (the IDLToCLS compiler from IIOP.Net at least puts
MyInterface in the MyModule namespace when compiling the same IDL).

Regards,
--
Tarjei Knapstad



More information about the omniORB-list mailing list