Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
Bug 993 - Interface Repository does not return Repository IDs for FullInterfaceDescription.base_interfaces
Summary: Interface Repository does not return Repository IDs for FullInterfaceDescript...
Status: NEW
Alias: None
Product: JacORB
Classification: Unclassified
Component: Interface Repository (show other bugs)
Version: 3.5
Hardware: PC Linux
: P5 normal
Assignee: Mailinglist to track bugs
URL:
Depends on:
Blocks:
 
Reported: 2014-09-20 22:12 CEST by Michael Popovich
Modified: 2014-09-20 22:12 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Popovich 2014-09-20 22:12:09 CEST
I've noticed that the Interface Repository does not work properly when tracking the inheritance relationships between interfaces.  As an example, suppose I have the following IDL (let's call it AddressBook.idl):

module AddressBook
{
  struct PersonData
  {
    string ssn;
    string firstname;
    string lastname;
  };

  typedef sequence<PersonData> PersonDataSeq;

  interface ReadonlyDirectory
  {
    PersonDataSeq getAllPeople();
  };

  interface Directory : ReadonlyDirectory
  {
    void addPerson(in PersonData newPerson) raises (SsnAlreadyExists);
  };
}
I compile AddressBook.idl using the following:
> idl -ir AddressBook.idl

I then start up the Interface Repository against the class files, which were the result of the compile and build, using the following:
> ir ../../AddressBook/AddressBookIdl/build/classes if_repo.ior

When I interact with the FullInterfaceDescription object that represents the Directory interface with the following code:

org.omg.CORBA.InterfaceDef interfaceDef = ... // interfaceDef for Directory
org.omg.CORBA.InterfaceDefPackage.FullInterfaceDescription fullDescr = interfaceDef.describe_interface();
String[] parent_interfaces = fullDescr.base_interfaces;

The issue with the above code is that parent_interfaces contains a single item (which is good) with a value of "AddressBook.ReadonlyDirectory" (which is bad).  I've noticed that other IR implementations (such as the older TAO ones) will return the repository id here (IDL:AddressBook/ReadonlyDirectory:1.0) which I believe is a part of the IR specification (with the RepositoryID of the parents, you could immediately query the IR for info about the parents... with the data being returned, you have to play games with the returned data.