The corbaname URL scheme, one of three CORBA object URL schemes, extends the corbaloc form to specify an entry within a Naming Service.
The corbaname URL scheme is similiar to the corbaloc scheme, but adds the ability to specify an entry within the Naming Service. Converting a corbaname URL scheme to an object is a two step process. The first step obtains a reference to the naming service. The second step requests an entry within that naming service.
The additional specification of the entry within the naming service is called the key string. Syntactically, the key string follows the object key and is preceeded by a "#" delimiter. After a naming service object is obtained, the key string is passed to the naming service using the CosNaming::resolve_str method.
If the object key is not specified in a corbaname URL scheme, it defaults to "NameService".
Note: The portion of corbaname URL scheme, excluding the key string, must identify an object that supports CosNaming.
Example of corbaname URL strings:
corbaname::primary_name.com:402/myNamingService#productX/subcategoryY/specificZ corbaname:iiop:Linux7.com:114#productX/subcategoryY/widgetW corbaname:rir:#productX/subcategoryY/specificZ
Using CORBA::string_to_object to convert the first example URL causes the Object Request Broker (ORB) to contact the primary_name.com host on port 402 and obtain an object associated with the object key "myNameService". The ORB sends a CosNaming::resolve_str method to this object with the argument "productX/subcategoryY/specificZ". The result of the CosNaming::resolve_str method is returned from string_to_object().
In the second example, the object key is not specified. When converting this, the ORB contacts the Linux7.com host on port 114 and asks for an object associated with the default key, "NameService". The key string, "productX/subcategoryY/widgetW", is passed using a CosNaming::resolve_str() method to this naming context object.
The third example shows the use of the resolve_initial_references form of addressing. When converting this, the ORB performs the equivalent of calling CORBA::resolve_initial_references("productX/subcategoryY/specificZ") and returns the result.