This section provides an example of a WebSphere business integration business object. The corresponding OneWorld class and Java class are also provided to illustrate the mapping across the three constructs. Note that business objects inherit their names from the matching OneWorld application objects.
The samples provided in this section are as follows:
OneWorld provides a utility, GenJava, that generates Java wrappers for the business functions running as part of the OneWorld server. GenJava requires a script file, written using iJDEScript. The following example uses the script file, AddressBook.cmd. AddressBook.cmd specifies the library and the interface to which the set of business functions is modularized.
Once GenJava is executed, it creates Java class files for all the interface classes and associated data structures. GenJava compiles the generated Java files, generates Java docs, and packages them into two .jar files, one for Java classes and one for Java doc. The below sample renders AddressBookInterop.jar and AddressBookInteropDoc.jar files.
To execute the following sample, type the following from the command line:
GenJava /UserID JDE /Password JDE /Environment JDETest /cmd AddressBook.cmd
There are options available for running GenJava. GenJava is present in the <INSTALL>\system\bin32 folder.
Please refer to the section on Running GenJava in the Interoperability Guide, provided by OneWorld. The sample GenJava script file is shown below:
# This example creates a library whose name is derived from an input parameter # (library) if one is specified. A default value is used otherwise.
define library JDEAddressBook
login
library JDEAddressBook interface AddressBook import B0100031 import B0100019 import B0100032 import B0100002 import B0100033 build
logout
While preparing this script, consider the mapping of the Interface class to a business object in WebSphere Business Integration Adapter and relate the business functions as method sequences that are required for performing the intended actions for a verb. For example, if a business object is a SalesOrder business object, then the interface SalesOrder in the script file must include all the business functions that it needs to perform actions on the SalesOrder object through WebSphere Business Integration Adapter. The sequence of method execution for each verb is accomplished by populating the verb ASI for the business object. You must be able to do this in the business object generation process using the ODA. You can also edit the verb ASI using Business Object Designer after the business objects have been generated.
The following figure shows the business object structure for the above
example in Business Object Designer.
Figure 15. Business object structure for the AddressBook example
This section explains the business object structure for the AddressBook example, in the following sections:
Name AddressBook ASI (type=BFN; class_name=com.JD Edwards.interop.AddressBook)
The AddressBook business object includes the following objects:
The Verb ASI uses the following Retrieve and RetrieveDetails objects:
Name D0100033 ASI (type=BFN; class_name=com.JD Edwards.interop.jdeaddressbook.D0100033; bfn_name=GetEffectiveAddress)
The D0100033 business object includes the following objects: