Show TOC Start of Content Area

Procedure documentation Generating IDL Representation of the Callback Application  Locate the document in its SAP Library structure

Use

Since C++ is a different language to Java, it knows nothing about J2EE technologies such as EJB, or the Java types. Since you use these Java classes in your server-side application, you have to “translate” them into C++ for the client-side application. You do this using the language-neutral IDL representation of the CallbackApplication.

To generate the IDL files, use the command-line rmic tool that is distributed with you JDK installation. You run this command against the Notificator.java, UtilCallback.java and UtilCallbackHome.java interfaces from the server-side application.

Procedure

...

       1.      Start the rmic tool using the rmic.exe file located in your <jdk_install_dir>\bin directory.

       2.      You must execute the command against each of the classes mentioned above. Provide the following arguments for the rmic command (the arguments are listed in the order they must appear on the command line):

                            a.      Use the –classpath option to set a classpath to the location of the required JAR files in your system:

Source File Name

Classpath to Set

Notificator

<IDE_install_dir>\workspace\UtilCallback\UtilCallback.jar

UtilCallbackHome

<IDE_install_dir>\workspace\UtilCallback\UtilCallback.jar

<IDE_install_dir>\plugins\com.tssap.ext.libs.j2ee_1.3\lib\ejb20.jar

UtilCallback

<IDE_install_dir>\workspace\UtilCallback\UtilCallback.jar

<IDE_install_dir>\plugins\com.tssap.ext.libs.j2ee_1.3\lib\ejb20.jar

                            b.      Use the –noValueMethods option to instruct the generator not to define methods for the different value types.

                            c.      This step is optional. Use the –d option followed by the directory path to the directory where you want the generated files to be saved. We recommend that you use this option so that you do not have the generated IDL file saved in the same directory in the workspace where the source files reside.

                            d.      Use the –idl option to instruct the rmic compiler to generate an IDL file based on the java source file.

                            e.      Specify the source file to be used to generate the IDL using its fully-qualified name, for example, examples.iiop.Notificator.

Note

If you are not confident about using the rmic command syntax, execute rmic –h to read the help provided with the command.

Result

After you execute the command against each of the interfaces mentioned above, you will have the necessary IDL files that represent the CallbackApplication’s classes. Regardless of the fact that you have run the command against only three classes, many more IDL files are generated. This is because the rmic tool searches through the inheritance chain that occurs in the source classes and generates an IDL representation of each match.

Next Step:

Generating C++ Code for the Notificator Object

 

End of Content Area