JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS Database Binding Component Tutorial     Java CAPS Documentation
search filter icon
search icon

Document Information

Using the Database Binding Component

Tutorial Plan

Database Binding Component Project in a Nutshell

Starting the GlassFish V2 Application Server

To Start the GlassFish V2 Application Server From NetBeans IDE

Creating a BPEL Module Project For Table Type Operations

To Create a BPEL Module Project

Connecting to a MySQL Database

To Connect to a MySQL Database

Starting the GlassFish Admin Console

To Start the Admin Console

Setting Up Database Access

Integrating a JDBC Driver

To Integrate a JDBC Driver

Creating a JDBC Connection Pool

To Create a JDBC Connection Pool

To Create a JDBC Resource

Creating a WSDL Document For Type : DATABASE

To Create a WSDL Document : dbWSDL

To Select the Database Connection

To Edit the SQL Code

Source View

Creating a WSDL Document For Type SOAP

To Create a WSDL Document : SOAPWSDL

Creating a BPEL Process

To Create a BPEL Process

To Add a Partner Link

To Add a Web Service and Basic Activities

To Edit Web Service : Receive1

To Edit the Web Service : Invoke1

To Edit the Web Service : Reply1

To Edit the Basic Activities : Assign1

To Edit the Basic Activities : Assign2

Validating BPEL

To Invoke Explicit Validation

Design View : Notifications

The Design View

Creating the Composite Application Project

To Create the Composite Application Project

Deploying and Testing the Composite Application

To Deploy the Composite Application

To Test the Composite Application

Debug the Test Case

To Debug the Test Case

Creating a BPEL Module Process Using Prepared Statements

Creating a BPEL Module Project Using Procedures

Creating a BPEL Module Project Using SQL File

Creating a BPEL Process

In this section, you add a BPEL process file, for example, BPELProcess.bpel. Add a partner link and three activities to the BPEL process file.

To Create a BPEL Process

  1. Expand the BPEL Module project node in the Projects window.
  2. Right-click the BPEL Module project name or Process Files node. Choose New —> BPEL Process.
    image:BPEL Process

    This opens the New BPEL Process wizard.

  3. In the File Name field, enter BPELProcess.
  4. Click Finish.
    image:BPEL Created

    Note -

    • In the Projects window, the IDE adds a BPELProcess.bpel node under the Process Files node.

    • The BPELProcess.bpel file is open in the BPEL Designer.

    • The Properties window is open.

    • If you do not see the Properties window, choose Window —> Properties.

    • The Navigator window is open showing the BPEL Logical View of the BPEL Process document.


To Add a Partner Link

  1. Select the Partner Link from the Projects tab (for example, SOAPWSDL.wsdl).

    This is the Input WSDL.

  2. Drag and drop the SOAP WSDL Document to the left panel of the design area.
    image:SOAP WSDL BPEL Created
  3. Select the Partner Link (dbWSDL.wsdl) from the Projects tab.

    This is the Output WSDL.

  4. Drag and drop the database WSDL Document (dbWSDL.wsdl) to the right panel of the design area.
    image:WSDL BPEL Created

To Add a Web Service and Basic Activities

Drag and Drop the following Web Services:

Drag and Drop the Basic Activities : Assign1 and Assign2.

  1. Select the Web Service : Receive in the Web Service section of the Palette.
  2. Drag the selection to the BPELProcess box in the design area between the Process Start and the Process End activities.

    The IDE provides the visual clues to show an appropriate location to drop the selection.


    image:Select Activity Receive

    This action places a Web Service Receive called Receive1 in the Design view.

  3. Select the Basic Activities — Assign in the Basic Activities section of the Palette.

    This action places a Assign activity called Assign1 in the Design view.

  4. Drag the selection to the BPELProcess box in the design area, between the Process Start and the Process End activities.

    Note - Repeat steps 1 through 4 to select Invoke1, Assign2, and Reply1.

    Choose the following:

    • Select the Web Service : Invoke and Basic Activities : Assign.

    • Select the Web Service ; Reply.



    image:Select All Activities

    Note - In the diagram, a red cross next to an element means that the element has not passed validation and the output contains errors. Edit each Sequence to pass validation.


    The icon symbolizes that the Web Services can be edited.


    image:Edit Enabled

To Edit Web Service : Receive1

  1. Click Web Service — Receive1 and click Edit.

    This opens the Receive1 [Receive] - Property Editor.

  2. Select the properties from the Main tab. Select PartnerLink1 from the drop-down list.

    The IDE fills in the Operation field with SOAPWSDLOperation.


    image:Receive Property Editor
  3. Create a new input variable.

    Perform the following:

    • Click the Create button next to the Input Variable field.

      This opens the New Input Variable dialog box.

    • The Name, Type, and Scope are displayed, by default.

      You can also change the value in the Name field.

    • Click OK.


    image:Input Variable

    Note - All the fields are populated with the assigned values.

    Input Variable — SOAPWSDLOperationIn



    image:Receive Property Editor
  4. Click OK to close the Receive1 [Receive] - Property Editor.
  5. Click Save All.
    image:Receive Edit Map

To Edit the Web Service : Invoke1

  1. Click Web Service — Invoke1 and click Edit.

    This opens the Invoke1 [Invoke] - Property Editor.

  2. Select the properties from the Main tab. Select PartnerLink2 from the drop-down list.

    Select any one of the Operations from the drop-down list.

    • Insert

    • Update

    • Delete

    • Find

    • Pollrecords

    Select Operation — find from the drop-down list. The IDE fills in the Operation field.


    image:Invoke Property Window
  3. Follow the steps to create a new input and an output variable.
    1. Click the Create button next to the Input Variable field.

      This opens the New Input Variable dialog box.


      image:New Input Variable

      The Name, Type, and Scope are displayed, by default.

      You can also change the value in the Name field.

    2. Click OK to close the New Input Variable dialog box.
    3. Click the Create button next to the Output Variable field.

      This opens the New Output Variable dialog box.


      image:New Output Variable

      The Name, Type, and Scope are displayed, by default.

      You can also change the value in the Name field.

    4. Click OK to close the New Output Variable dialog box.

    Note - All the fields are populated with the assigned values.

    Select the following Variables:

    • Input Variable : FindIn

    • Output Variable : FindOut



    image:Find In Find Out Property Editor
  4. Click OK to close the Invoke1 [Invoke] - Property Editor.
  5. Save the project.
    image:Invoke Edit Find Map

To Edit the Web Service : Reply1

  1. Click Web Service : Reply1. Click Edit.

    This opens the Reply1 [Reply] - Property Editor.

  2. Select the properties from the Main tab. Select PartnerLink1 from the drop-down list.

    The IDE fills in the Operation field with SOAPWSDLOperation.


    image:Reply Editor
  3. Follow the steps to create a New Output Variable.
    1. Make sure to select the Normal Response radio button.
    2. Click the Create button next to the Output Variable field.

      This opens the New Output Variable dialog box.


      image:Reply New Output
    3. Change the value in the Name field. This is optional.

      Reply1 is displayed, by default.

    4. Click OK.

    image:Reply Property Editor
  4. Click OK to close the Reply1 [Reply] - Property Editor.
    image:Final Mapper IRR

To Edit the Basic Activities : Assign1

  1. Double-click the Basic Activity : Assign1.

    This displays the BPEL Mapper window.

  2. Expand the node in the Source tree pane (the left pane) of the BPEL Mapper under Output —> Variables (for example, SOAPWSDLOperationIn).

    A part1 node appears under the SOAPWSDLOperationIn node.

  3. Expand the node in the Destination tree pane (the right pane) of the BPEL Mapper under Input —> Variables (for example, FindIn).

    A part node appears under the FindIn node.

  4. Select the node in the Source tree pane.

    For example, SOAPWSDLOperationIn — part1 — CUSTOMER_Record.

  5. Drag the selection and map it to the node in the Destination tree pane.

    For example, FindIn — part — CUSTOMER_Record.

    Map the following Variables:

    1. NAME — NAME
    2. CUSTOMER_ID — CUSTOMER_ID

    image:Assign Mapper
  6. Click the Design tab.

    Note - A red icon marked against Basic Activities — Assign1 is not shown.



    image:Assign Cleared

To Edit the Basic Activities : Assign2

  1. Double-click the Basic Activity : Assign2.

    This displays the BPEL Mapper window.

  2. Expand the node in the Source tree pane (the left pane) of the BPEL Mapper under Output — Variables (for example, FindOut).
  3. Expand the node in the Destination tree pane (the right pane) of the BPEL Mapper under Input — Variables (for example, SOAPWSDLOpertionOut).
  4. Select the node in the Source tree pane.

    For example, FindOut : part : CUSTOMER_Record.

  5. Drag the selection to the node in the Destination tree pane.

    For example, SOAPWSDLOpertionOut : part1 : CUSTOMER_Record

    Map the following variables:

    • PHONE : PHONE

    • STATE : STATE

    • NAME : NAME

    • ZIP : ZIP

    • ADDRESSLINE1 — ADDRESSLINE1

    • ADDRESSLINE2 — ADDRESSLINE2

    • CREDIT_LIMIT — CREDIT_LIMIT

    • EMAIL — EMAIL

    • CUSTOMER_ID — CUSTOMER_ID

    • CITY — CITY

    • FAX — FAX

    • DISCOUNT_CODE — DISCOUNT_CODE

      Finally, map part : part1.


    image:Assign2 Mapper
  6. Click the Design tab.

    The final output is as shown in the illustration.


    image:Final Mapper
  7. Right-click the project node and select Clean and Build.

    The following message is displayed.

    BUILD SUCCESSFUL (total time: 2 seconds).
  8. Click Save All.