Message Sets: Importing an IDL file

You can use the New Message Definition File wizard in the IBM® Integration Toolkit to create a message definition from an IDL file.

Before you begin

Complete the following tasks:
  • Message Sets: Creating a message set
  • Importing files from the file system into the IBM Integration Toolkit
  • Ensure that you have a valid IDL file. If you select an IDL file that is not valid, you see an error message and you cannot complete the wizard. When you import an IDL file, supported and unsupported operations are listed. You can import an IDL file that contains operations with types that are not supported by IBM Integration Bus, but if you try to call an unsupported operation, you see an error message. The CORBA IDL file must contain at least one interface that has one operation. For more information about the IDL operations that are supported, see CORBA support.
  • For more information about how IDL types correspond to XML schema types, see IDL data types.

About this task

The following steps describe how to use an IDL file to create a message definition file or overwrite the contents of an existing file.

Procedure

  1. Right-click the message set, then click New > Message Definition File From > CORBA IDL File to open the New Message Definition File From wizard.
  2. Complete the wizard by following the on-screen instructions.
    1. Select an IDL file either from the list of files in your workspace, or by using Browse to search outside your workspace.
      If you have imported an IDL file that contains includes, select the top-level IDL file.
    2. Ensure that the check box to add the DataObject domain to the message set is selected. By default, this check box is selected.
    3. Optional: You can provide a target namespace.
    4. By default, the message definition file name is the same as the name of the IDL file. You can change the name of the message definition file.
    5. If the IDL or message definition file exists, click Next. To rename or overwrite the existing files, select them.
  3. Click Finish.
  4. After you have imported the IDL file, check for errors.
    • Check for errors in the report that is created when the file is imported. You can find this report in the log directory of the project that contains the new message definition. The report is named <idl-file-name>.idl.report.txt, where <idl-file-name> is the name of the IDL file that you are importing.
    • Check for errors in the IBM Integration Toolkit task list.

Results

When you have finished importing the IDL file, the message definition opens. A read-only copy of the IDL file is stored in the CORBA IDLs folder.

For each IDL file, a single message definition is created. (If you have imported an IDL file that contains includes, all the elements and types in the IDL files are generated into a single message definition.) In the message definition, two messages are created for each operation in the IDL file (one message for the request, and one for the response), and a message is created for each user-defined exception. The request has a child element for each in and inout parameter; the response has a child element for each inout and out parameter, and a child element named "_return" for the return type of the operation.

The name of these elements is based on the interface name and operation name; for example, for the operation sayHello in the Interface Hello, the request element is called Hello.sayHello, and the response element is called Hello.sayHelloResponse. If the interface is contained in a module, the request and response element names are qualified with the names of the modules. For example, if the operation sayHello in the Interface Hello is contained in ModuleB, which in turn is contained in ModuleA, the response element would be called ModuleA.ModuleB.Hello.sayHelloResponse.

Another message definition is created with a message for each CORBA system exception.

What to do next

Develop a message flow, as described in Developing a message flow with a CORBARequest node.