Compiling a CORBA server implementation class IDL (using idlc)

Why and when to perform this task

Use this task to compile the IDL file, servant.idl, that defines the public interface for a CORBA server implementation class. You also can use this task to compile the IDL file (also referred to in this task as servant.idl) for an enterprise bean.

Note: If your servant.idl file references other IDL files, ensure that all those other IDL files can be accessed by the idlc program.

Steps for this task

  1. At a command line, change to the directory that contains the IDL file, servant.idl, where servant is the name of the server implementation class.
  2. Type the following command:
    idlc -ehh:ih:ic:uc:sc servant.idl 
    The names of the generated output files are derived from the file name of the specified IDL file. For example, for the IDL file, servant.idl, the -ehh emitter option outputs the file servant.hh.
    This produces the files servant.hh, servant.ih, servant_I.cpp, servant_C.cpp, and servant_S.cpp.

Results

This task creates the usage binding files needed to implement and use the servant object within a particular programming language. For example, for a server object implementation class called WSLogger, the IDL file, WSLogger.idl, is created and edited to add its interface definition. To compile the IDL file, the following command is used:

idlc -ehh:ih:ic:uc:sc WSLogger.idl

This creates the following files: WSLogger.hh, WSLogger.ih, WSLogger_I.cpp, WSLogger_C.cpp, and WSLogger_S.cpp.

What to do next

Add declarations for class variables, constructors, and destructors to the servant class definition, servant.ih, as described in Adding declarations to the servant class definition.

This task also can be used to create the client-side bindings files needed to develop a CORBA client to access an enterprise bean as described in Developing a CORBA client.


Related tasks
Developing a CORBA C++ server
Adding declarations to a CORBA servant class definition (servant.ih)
Developing a CORBA C++ client



Searchable topic ID:   tcor_pgms2
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/corba/tasks/tcor_pgms2.html

Library | Support | Terms of Use | Feedback