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 WSDL Document For Type SOAP

In this section, you add a WSDL document to the BPEL Module project. Later, you can use the Partner view of the WSDL editor to configure the components of the WSDL document.

When creating or editing a WSDL file, you may be prompted to select a binding type and a binding subtype. A binding contains protocol and data format information for the operations and messages of a port type. For more information, see step 6.

To Create a WSDL Document : SOAPWSDL

  1. Expand the project node in the Projects window.

    The New WSDL Document wizard appears.

  2. Right-click the node or Process Files node. Choose New —> WSDL Document.
  3. In the File Name field, enter SOAPWSDL.wsdl.
  4. Select Concrete WSDL Document.
    • binding

      Defines the message format and protocol details for a port type. For JDBC Binding Component, this is always a message containing a database operation defined using the JDBC API.

    • service

      Indicates which binding to use and how to access the database resource. For Database Binding Component, the address element (<jdbc:address>) specifies the JNDI name for the database resource.

  5. In the Binding field, select SOAP from the drop-down list.

    The Binding — SOAP is selected and displayed, by default.

  6. Select any one of the following Type.

    If you select the SOAP binding type, then you must select any one of the following binding subtypes:

    • RPC Literal: The operations are RPC oriented (that is, messages contain parameters and return values). Each message part references a concrete schema definition by using the element or type attribute.

    • Document Literal: The operations are document oriented (that is, messages contain one or more documents). Each message part references a concrete schema definition by using the element or type attribute.

    • RPC Encoded: The operations are RPC oriented (that is, messages contain parameters and return values). Each message part references an abstract type by using the type attribute.

  7. Choose Type — RPC Literal from the drop-down list.
    image:New Document
  8. Click Next.

    This action displays the New WSDL Document dialog box.

  9. Choose the Operation Type from the drop-down list.

    The WSDL Editor is used to create, edit, and delete port types.

    The WSDL Editor supports the following categories of operations:

    • Request-Response Operation: The operation receives a message as input, and sends a message as output.

    • One-Way Operation: The operation can either receive or send a message as input.

    Each message contains one or more logical parts. Specify the name and the type of content for each part.


    Tip - If you change the name of a port type or operation, then the WSDL Editor renames all occurrences in the same file.

    1. Right-click the component node to rename all occurrences in associated XSD, WSDL, and BPEL files.

    2. Choose Refactor —> Rename.


    When Operation Type : One-Way Operation. The illustration is as shown.


    image:One-Way Operation

    Note -

    1. Click the ellipsis to select any Element or Type.

    2. Enter both the Input and Output Message Part Names for Request-Response Operation.

      The default value of the Input and Output Message Part Names is xsd:string.

    3. Click Add to another Message Part Name as the Input.

      The checkbox Generate partnerlinktype automatically is selected, by default.


      Note - Click Remove to delete the Message Part Name as the Input.



    See Steps 11 through 15.

  10. Select Operation Type : Request-Response from the drop-down list.

    Note - Port Type Name and Operation Name are populated from the previous wizard.


  11. Click the ellipsis to select the Element or Type.
    image:New WSDL Document Input Output

    The Select Element or Type dialog box is displayed.

  12. Expand By File.
  13. Select the Complex Types for both the Input and Output Message Part Name.

    For example, CUSTOMER.


    image:Select Element Or Type
  14. Click OK.

    The New WSDL Document is populated with the Input and Output Element Part Names.


    image:New WSDL Document Populated
  15. Click Next.

    Verify the Concrete Configuration.

  16. Click Finish.
    image:SOAP WSDL Created