Read only archive ; use for new issues

Bug 993

Summary: Interface Repository does not return Repository IDs for FullInterfaceDescription.base_interfaces
Product: JacORB Reporter: Michael Popovich <earthmabus>
Component: Interface RepositoryAssignee: Mailinglist to track bugs <jacorb-bugs>
Status: NEW ---    
Severity: normal    
Priority: P5    
Version: 3.5   
Hardware: PC   
OS: Linux   

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.