[Enterprise Extensions only]

ORB::list_initial_services

Overview Lists the runtime objects available by calling the CORBA::ORB::resolve_initial_references method.
Original class CORBA::ORB
Exceptions CORBA::SystemException


Intended Usage

The CORBA::ORB::list_initial_services method is intended to be used by client and server applications to determine what object references are available from the CORBA::ORB::resolve_initial_references method.

IDL Syntax

  CORBA::ObjectIdList* list_initial_services ();

Input parameters

None.

Return values

CORBA::ObjectIdList *
A pointer to a sequence of strings, where each string is an identifier that can be passed to CORBA::ORB::resolve_initial_references. The caller assumes ownership of the returned result and should subsequently delete it.

Example

  /* This program lists the runtime objects available into a
     CORBA::ORB::ObjectIdList obj
   */
  #include "corba.h"
  #include   int main(int argc, char* argv[])
  {
    int rc = 0;
    CORBA::ORB::ObjectIdList *idlist = NULL;
    /* assume orb initialized */
    extern CORBA::ORB_ptr orb;
    try
    {
      idlist = orb->list_initial_services();
    }
    catch (CORBA::SystemException &se)
    {
      cout << "exception : " << se.id() << endl; rc="1;"
    }
    if (idlist)
    {
      /* use idlist such as idlist->length(), (*idlist)[i] where i is 
         index ... */
    }
    return rc;
  }