| Oracle® Application Server Adapters for CICS User's Guide 10g Release 3 (10.1.3.4) Part Number E13828-01 |
|
|
View PDF |
This chapter contains the following topics:
This topic describes the components necessary to work with the samples and how to prepare your system.
Prerequisites
The following are installation and configuration requirements for using the examples.
Personal computer running Microsoft Windows XP or Windows Server 2003 with one GB of RAM.
The CICS adapter that you are using must be deployed to the Oracle Application Server.
OracleAS CICS Adapter must be configured for outbound processing. See Configuring an OracleAS Adapter for CICS for Outbound Interactions.
Oracle JDeveloper must be installed.
Legacy adapter must be deployed.
Oracle Studio with the necessary machines loaded. See Setting Up the IBM z/OS Platform in Oracle Studio.
This chapter provides examples of the configuration steps that are used when using BPEL to work with the Oracle CICS adapters. You should be familiar with the following before working with these examples:
How to create J2CA connections. See Integrating OracleAS Adapters for CICS with OC4J for more information.
How to configure the OracleAS adapters for CICS using Oracle Studio. See Configuring Oracle Connect for more information.
Integration between the OracleAS adapters for CICS and BPEL has the following processes:
Design Time: The OracleAS adapters for CICS are configured with Oracle Studio as described in Configuring Oracle Connect.
Runtime: After you deploy the BPEL process with JDeveloper, you can test your configurations. See Runtime Configuration.
This section describes how to create a BPEL outbound process that connects to a OracleAS adapter for CICS. For information on how to configure a CICS adapter for outbound, see Modeling Interactions for OracleAS Adapter for CICS.
To configure a process with the BPEL process manager, you use JDeveloper. This section describes how to create a BPEL outbound process for CICS reource adapters using JDeveloper. The following sections describe how to deploy a BPEL outbound process. The following steps describe the steps necessary to carry out this outbound sample.
Before you design the outbound process, make sure to integrate and connect your OracleAS adapter for CICS with the BPEL process manager.
Before you design the outbound process, you must carry out the following:
Integrate the OracleAS Adapter for CICS with OC4J. See Integrating the J2CA 1.5 CICS Adapter for Outbound for more information.
Configure the connection for the J2CA CICS resource adapter. You do this by creating a connection factory. See Configuring the J2CA 1.5 CICS Adapter for Outbound for information on how to do this.
Write a schema file. First, create an interaction called findDoctor using Oracle Studio. See Configuring the J2CA 1.5 CICS Adapter for Outbound for a description on how to create the findDoctor interaction.
Write a schema file called FINDDOCTORSchema.xsd to define the message schema. The following is an example of the findDoctor.xsd file:
<schema targetNamespace="http://xmlns.oracle.com/Esb/findDoctorData" xmlns:cust="http://xmlns.oracle.com/Esb/findDoctorData" xmlns="http://www.w3.org/2001/XMLSchema"> <element name="findDoctorata" type="cust:findDoctorDataType"/> <complexType name="findDoctorDataType"> <sequence> <element name="Record1" type="string"/> </sequence> </complexType></schema>
Create a BPEL PM Server Connection in JDeveloper.
Create the WSDL for the interaction. You do this in JDeveloper Connections explorer before you begin to build your endpoint in JDeveloper. JDeveloper will create the WSDL automatically based on the interaction you create. In the Connections explorer, browse for the Oracle Connect server you configured in Oracle Studio (see Installing Oracle Connect on an IBM z/OS Series Platform), then double-click the findDoctor interaction to view and create the WSDL.
See Modeling Interactions for OracleAS Adapter for CICS for an explanation on how to create the findDoctor interaction and for an explanation on the WSDL.
This section describes the design-time steps necessary to deploy two BPEL outbound processes. The processes use the Web service called FINDDOCTOR. This service finds a list of doctors from the data. The following are the steps required to create the outbound process.
Do the following to create a BPEL project for outbound.
In JDeveloper, from the View menu, select Application Navigator.
In the Application Navigator, right-click the application you are working with and select New Project. The New Gallery dialog box is displayed.
From the Items list, select BPEL Process Project then click OK. The BPEL Project Creation Wizard-Project Settings dialog box is displayed.
Do the following in BPEL Project Creation Wizard-Project Settings dialog box:
Enter a name for the BPEL process, for example BPELOutbound1.
From the Template list, select Empty BPEL Process.
Click Next to review the input/output schema elements or click Finish.
You create a database adapter to read the DOCTOR data. SOA exectes the SQL statment defined in the interaction and passes it to a resource adapter. The resource adapter then processes the information and returns the data. Do the following to create the database adapter.
Drag a PartnerLink into a service lane of the visual editor. The Create Partner Link dialog box is displayed.
Figure 5-2 Partner Link for Database Adapter

Click the Adapter Wizard button. This is the third button in the WDSL Settings section of the Create Partner Link dialog box, as shown in the figure above.
Enter the following information in the Adapter Configuration wizard:
Step 1, Adapter Type: Select Database Adapter.
Step 2, Service Name: type findDoctor
Step 3, Service Connection. In this step select the data you want to work with.
Click New to open the Create Connection wizard.
Step 1: Select the connection type:
Connection Name: dbConnection1
Connection Type: Oracle (JDBC)
Step 2: Authentication.
Enter the User Name, Password, and Role for the connection
Step 3: Enter the connection information.
Enter the driver type (thin, oci), the name of the computer where JDBC is deployed, and its port number. This information should be the same as defined in the JDBC connecton facrory. See Configuring the J2CA 1.5 CICS Adapter for Outbound.
Select Service Name and enter findDoctor.
Click Finish to go back to the Adapter Configuration wizard.
Step 4, File Directories
Directory Names are Specified as: Select Physical Path
Directory for Incoming Files (physical path): Enter the full path to the folder where you want the incoming files, for example C:\temp.
Step 5, File Filtering:
Includes Files with Name Pattern: Enter *xml
Step 6, File Polling:
Polling Frequency: enter 1 then select seconds from the list.
Step 7, Messages:
Schema File URL: Enter findDoctor.xsd
Schema Element: Enter FindDoctorData
Click Finish.
In this step, you design the BPEL process. Do the following to design the BPEL outbound process:
From the Component Palette-Process Activities pane, drag a Receive, Assign, and Invoke activity into the editor for the process you created in the Create a BPEL Project for a BPEL Outbound Process step.
In the Visual Editor, connect the Recieve_1 activity to the findDoctor database adapter. The Edit Receive dialog box is displayed.
Do the following in the Edit Receive dialog box:
Enter a name for the Receive activity, in this example it is Receive_1.
Make sure to create the variable. Click the first button to the right of the Variable field, then click OK in the Create Variable dialog box that is displayed.
Make sure that the Create Instance check box is selected.
Click OK to close the dialog box and accept the information.
In this step, create a partner link to the database adapter you defined when you created the IMD/DB configuration in Oracle Studio. Do the following to create a partner link.
Drag a PartnerLink into a service lane of the visual editor. The Create Partner Link dialog box is displayed.
From the Create Partner Link dialog box, click the Service Explorer button. This button is the second form the left and is shown in the figure in the previous step. The Service Explorer dialog box is displayed.
In the Service Explorer, expand the connection you are using, then expand adapters and then applications, and continue to browse until you find the WDSL file you are using. Select the file and click OK.
The WSDL File field in the Create Partner Link dialog box displays the path to the WSDL file you selected. The Partner Link Type field displays the Partner Link defined in the WSDL file.
Enter the following information in the Create Partner Link dialog box:
In the Partner Role list, select FINDDOCTORRole.
In the My Role list, select Not Specified.
Edit the Invoke_1 activity that you added to the Visual Editor so that it will invoke the FINDDOCTOR service. Do the following to edit the Invoke_1 activity.
Double-click the Invoke_1 activity to edit it. The Invoke dialog box is displayed.
In the Invoke dialog box, make sure that the Partner Role Web Service Interface section has the following values:
Partner Link: FINDDOCTOR
Operation: FINDDOCTOR
Click the Automatically Create Input Variable button. It is the first icon to the right of the Input Variable field as shown in the figure in the previous step. The Create Variable dialog appears with the input variable.
The Input Variable should be Invoke_1_FINDDOCTOR_InputVariable. Click OK.
Click the Automatically Create Input Variable button for the Output Variable field.
The Output Variable should be Invoke_1_FINDDOCTOR_OutputVariable. Click OK.
You use the assign activity to assign a value to the resource adapter. Do the following to edit the Assign_1 activity.
Double-click the Assign_1 activity to edit it. The Assign dialog box is displayed.
Click the Create list and select Copy Operation. The Create Copy Operation dialog box is displayed.
On the From side, expand Variables then expand Read_1_SelectDoctor_InputVariable, then expand nsx:findDoctor and select Record1.
On the To side, expand Variables then expand Read_1_SelectDoctor_InputVariable, then expand input:findDoctor, then expand nsx:Record1 and select Record1_data.
Click OK. The Copy Operation tab in the Assign window updates to show the rule.
The following figure shows how the final process looks:
This section describes how to test the project and run it to see that the outbound process is executed successfully. Do the following to test the outbound process.
Create a file and call it FindDoctor.xml as shown in the following example:
<?xml version="1.0" encoding="UTF-8"?><CU:FindDoctorData xmlns:CU="http://xmlns.oracle.com/Esb/FindDoctorData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Record1>CICS</Record1></CU:FindDoctorData>
Save the file to the C:/temp folder that was defined for the first adapter. The file is deleted after the SOA server reads the file and completes the process.
Open the C:\tempOut folder that was defined in the second adapter. A file with the following contents is copied to this folder.
<?xml version="1.0"?> <findDoctorData xmlns="http://xmlns.oracle.com/Esb/findDoctorData"> <Record1 xmlns>="">CICS</Record1>