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.
Expand the project node in the Projects window.
For example, BpelModuleSample
This opens the New WSDL Document wizard.
Right-click the project node or Process Files node. Select New —> WSDL Document...
For example, BpelModuleSample
Enter the filename in the File Name field.
For example, dbWSDL.wsdl
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.
Choose the Binding — Database from the drop-down list.
The Binding — SOAP is selected and displayed, by default.
Choose any one of the following Types from the drop-down list.
Table
Prepared Statements
Procedures
SQL File
Choose Type — Table from the drop-down list.
Click Next.
Select the URL from the drop-down list.
You find the MySQL Database is not configured and is not available in the list.
A broken icon indicates that the database is not connected.
See To Create a WSDL Document : dbWSDL to Create the WSDL Document.
Select the URL from the drop-down list.
Click Next.
Select the table from the DataSource and Table Objects.
Click > to move the table from Available Tables to Selected Tables.
Click < to remove the table from the list of Selected Tables.
You can select and move one table at a time.
ALL> and <ALL feature is not enabled. This feature will be implemented in future.
Click Next.
Select Operation Specific Attributes.
Click Advanced. Select the required Column name.
You can Insert, Update, Find, and Poll Records.
As the ID is unique, they cannot be unchecked. Hence, these are greyed out.
Based on the requirement, you can check and uncheck the Column names.
Click OK.
Click Next.
Enter an appropriate JNDI Resource Name.
Click Finish.
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.
If you do not see the Properties window, choose Window —> Properties.
The Navigator window is open.
Double-click the created WSDL Document.
For example, dbWSDL.wsdl
The WSDL Editor is opened.
Expand Bindings —> binding PortType=”jdbcPortype”.
For instance, you want to perform a find operation.
Select and expand find from the list.
Expand inputFind and click jdbc:input.
Select sql from Properties.
Modify the SQL Statement.
Click ellipses (...).
This opens the jdbc:input — sql editor.
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=? |
Click OK.
Click the paramOrder from Properties and enter the values.
For example, you want to find for NAME and CUSTOMER_ID. Enter the parameter order of the result.
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.
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.