Chapter 6. EIS integration using Java Message Service 143
Finally, because we intend to generate code to access IMS via the J2C
connector, the IMS resource adapter has to be imported into the workspace.
1. Select File
→ Import from the menu bar to open the import wizard.
2. In the window select File System and browse to the resource adaptersims
directory.
3. Select ims222.rar.
4. Enter a name for the connector project and click Finish.
You should now see two new projects in the Navigator view: the connector
project and a project named J2C Tool Plugin Import Service.
Creating the IMS access code
We used the J2C IMS connector and Java utility classes that are generated by
WebSphere Studio Application Developer Integration Edition to implement the
Trader IMSFeature session bean. In the following paragraphs, we show how to
create the utility classes for a specific IMS transaction that provides a stock order
function.
Before you start using the wizard to generate the classes, you first have to gather
details on the IMSConnect and IMS system running on the zSeries host. At a
minimum, you should know the following parameters: hostname, port, IMS
datastore, username, and password. You also have to request the COBOL
copybook that describes the input and output data for the transactions. Import
the COBOL copybook into your Service project by selecting File
→Import. You
may want to create a Java package first, to structure the project folder.
The wizard we used to create the utility classes also generates a service binding.
We do not use the service as generated by the tool directly in a business process
because it exposes the IMS COBOL copybook details at the service interface.
We recommend that you hide these technical details in a system process, or, as
shown in the following sections, develop an EIS component that encapsulates
the EIS access details.
You start the wizard to generate the Java utility classes from the Business
Integration perspective:
1. Click File
→ New → Service build from.
Input for the process are IMS system details and COBOL copybook, and the
output includes WSDL files and Java classes.
2. From the Service Creation wizard, select IMS as the back-end technology
and click Next.
3. Enter the IMS system parameters as depicted in Figure 6-8. Enter hostname,
port, IMS datastore, username, and password and click Next.