Using the ejb2pb170 tool
You can also use the ejb2pb170 command-line tool to generate
proxies. The tool generates:
-
Proxies (.srx files) for the home and remote interfaces of the
EJB you specify and for the classes on which the EJB depends. -
A PowerBuilder structure object named
ejbname_ejb_pb_mapping.srs, where ejbname is the name of the EJB.
This structure hosts the mapping table between the Java class name
and the PowerBuilder proxy name. -
A text file called ejbproxies.txt or, if errors occur,
ejbproxies.err.
These files are generated in the directory in which you invoke the
command. The syntax is:
|
1 |
ejb2pb170 [ -classpath pathlist ] EJBName [EJBHomeName][ prefix ] |
If the pathlist argument contains spaces, for example
D:Program Files, the pathlist must be enclosed in quotes. EJBName is
the fully qualified remote interface class name. If you use the standard
naming convention for the home interface, then including an argument for
the fully qualified home interface name, EJBHomeName, is optional. If
you specify the optional prefix, it is added to the beginning of the
generated proxy name.
For example, the following statements generate proxies for the
mytest.Calc class in the package Calc on WebLogic. The proxies for the
home and remote interfaces of the Calc class have the prefix pf_, and
the generated files are written to the directory D:workproxies:
|
1 2 |
cd D:workproxies ejb2pb170 -classpath "D:Program FilesweblogicCalc.jar" mytest.Calc pf_ |
The home and remote classes for the EJB and any dependent classes
must be in the class path that you specify.
After generating the proxies, you import them into your target by
selecting the library that contains the client, selecting Import from
its pop-up menu, and selecting the .srx files from the dialog box that
displays. The order in which you import .srx files is significant — you
cannot import proxies that depend on other classes until you have
imported the proxies for the dependent classes.