Skip Navigation Links | |
Exit Print View | |
Oracle Java CAPS Database Binding Component Tutorial Java CAPS Documentation |
Using the Database Binding Component
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
Creating a JDBC Connection Pool
To Create a JDBC Connection Pool
Creating a WSDL Document For Type : DATABASE
To Create a WSDL Document : dbWSDL
Creating a WSDL Document For Type SOAP
To Create a WSDL Document : SOAPWSDL
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
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
Creating a BPEL Module Process Using Prepared Statements
In this section, you add a WSDL document, to the BPEL Module project and then use the Partner view of the WSDL editor to configure the components of the WSDL document.
The New WSDL Document wizard appears.
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.
Table
Prepared Statements
Procedures
SQL File
You find the MySQL Database is not configured and is not available in the list.
Note - A broken icon indicates that the database is not connected.
Before You Begin
See To Create a WSDL Document : dbWSDL to Create the WSDL Document.
Click the left arrow to remove the table from the list of Selected Tables.
Note - You can select and move one table at a time.
You can Insert, Update, Find, and Poll Records.
Note - As the ID is unique, they cannot be unchecked. Hence, these are greyed out.
Note - Based on the requirement, you can check and deselect the Column names.
Observe the following:
In the Projects window, the IDE adds a dbWSDL.wsdl node under the Process Files node along with the .xsd file.
The dbWSDL.wsdl file is open in the WSDL editor.
The WSDL editor has three views: Source, WSDL, and Partner.
The Properties window is open.
Note - If you do not see the Properties window, choose Window —> Properties.
The Navigator window is open.
The WSDL Editor is opened.
For instance, you want to perform a find operation.
Expand inputFind and click jdbc:input.
Modify the SQL Statement.
The jdbc:input — sql Editor appears.
Make the necessary changes.
For example:
select PHONE, STATE, NAME, ZIP, ADDRESSLINE1, ADDRESSLINE2, CREDIT_LIMIT,
EMAIL, CUSTOMER_ID, CITY, FAX, DISCOUNT_CODE
from CUSTOMER where NAME=? and CUSTOMER_ID=?
For example, you want to find for NAME and CUSTOMER_ID. Enter the parameter order of the result.
See Also
WSDL View
In the WSDL view of the WSDL Editor, the WSDL file appears as a tree component or a series of columns.
The WSDL view has two subviews: tree view and column view. To switch between the subviews, use the buttons in the WSDL Editor toolbar.
The main nodes in the WSDL view correspond to the major elements in a WSDL file.
Types: This node enables you to import XML schemas and to add inline schemas.
Imports: This node enables you to import WSDL files.
Messages: This node enables you to create, edit, and delete messages.
Port Types: This node enables you to create, edit, and delete port types.
Bindings: This node enables you to create, edit, and delete bindings.
Services: This node enables you to create, edit, and delete services.
Extensibility Elements: This node enables you to add the following extensibility elements: partner link types, properties, and property aliases.
Some of the nodes in the WSDL view allow you to add extension attributes.
Right-click the node and choose Add Extension Attribute.
Specify the name and namespace in the Add Extension Attribute dialog box.
Specify the value from the Properties window after adding the attribute.
Right-click the node and choose Remove Attributes to delete the attribute.
Right-click a node and choose Go To —> Source.
The Source view appears with the cursor positioned at the beginning of the component's block.
In the Source view, the underlying XML source code appears. You can directly edit the XML.
The top of the Source Editor has a tab for each open document. Each tab shows the name of the document.
Note - If the document has been modified and has not been saved, then an asterisk (*) appears after the name. You can right-click a tab to access various commands.
A toolbar is located at the top of the Source Editor window.
Source code displayed in the Source Editor is syntactically colored.
The Source Editor status line is located beneath the horizontal scroll bar. To toggle between insert mode and overwrite mode, use the Insert key.