Chapter 8. Integration using WebSphere Business Integration Adapters 221
The project is created producing four artifacts:
A WSDL document for the adapter service, the specific business objects
and its operations
A JMS binding WSDL for use in sending messages to the adapter
A JMS binding service WSDL
The XSD for the STOCKINFO business object
8.5.5 Exposing the adapter as a service
In this step, you import the adapter JDBC project into a new service project. You
configure this project and expose it as a service to the adapter using an EJB
binding.
Creating the service project
First, create the JDBC adapter service project and import the adapter files.
1. Click File-New
Service Project.
2. Enter JDBCAdapter as the project name, as shown in Figure 8-13.
Figure 8-13 New JDBC adapter service
222 Managing Information Access to an EIS Using J2EE and Services Oriented Architecture
3. Click Finish to create the project.
Importing adapter artifacts
To import the adapter artifacts:
1. Right-click the project and click Import. Choose the File system as the import
source and click Next.
2. Browse to the location where the WebSphere Application Server project was
exported (Figure 8-14). Select all files in the folder and click Finish.
Figure 8-14 Import adapter WebSphere Application Server project files
Creating the adapter service BPEL process
Next, create a BPEL process that retrieves the stock quote analysis information
using the Hub Request integration pattern.
Chapter 8. Integration using WebSphere Business Integration Adapters 223
Creating a new BPEL process
Create the BPEL process which represents the stock information adapter
service:
1. Right-click the JDBCAdapter service project. Click New
Business
process. Figure 8-15 shows the new business process wizard.
Figure 8-15 New JDBC Adapter BPEL Process
2. Enter the package name (com.itso.wbia.jdbc) and file name
(StockQuoteInfo).
3. Click Finish.
Wrapping the JMS service in an EJB service
The scenario requires that the request be synchronous and that the results be
returned promptly. We use a microflow for this process. The adapter service was
exported as JMS, which simulates a synchronous implementation by requiring a
send message on the request queue and waiting on a reply on the response
queue. We wrapped this JMS service in an EJB service to enable the microflow
to execute in a single transaction.
224 Managing Information Access to an EIS Using J2EE and Services Oriented Architecture
First, you generate the deploy code with an EJB binding.
1. Right-click the JDBCAdapterJMSService.wsdl file found in the JDBCAdapter
service project. Click Enterprise Services
Generate Deploy Code
(Figure 8-16).
Figure 8-16 EJB service generate deploy code
2. Choose STOCKINFOHubRequestBindingPort as the Port Name for the Hub
Request integration pattern, as shown in Figure 8-16.
You create a new port and binding using an EJB binding type to deploy the
service using a session bean.
3. Click Next to go to the Inbound Services Files page.
Chapter 8. Integration using WebSphere Business Integration Adapters 225
4. Enter the package name com.itso.wbia.jdbc for the EJB project. Click
Finish.
Customizing the BPEL process
Open the StockQuoteInfo.bpel file by double-clicking it. Then, follow the steps in
the sections that follow.
Adding input and output variables for the JDBC Adapter
Next, you add the input and output variables to be used when sending the
request to the adapter.
1. Click the plus sign on the Variables box in the editor to add a variable
(Figure 8-17). Name the variable QuoteInput.
Figure 8-17 QuoteInput variable
2. Repeat the previous step and add a variable called QuoteOutput (Figure 8-18
on page 226).
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset