IBM DB2 AS400 MySQL

Oracle JCA Adapter for Database 9-87 DatabaseConnection=mysql Table 9–16 lists the supported data types for MySQL stored procedures: Note: For MySQL, the SchemaName, Parameters, and IsFunction properties are all required properties. Table 9–16 Data Types for MySQL Stored Procedures SQL Data Type XML Schema Type BINARY BLOB LONGBLOB MEDIUMBLOB TINYBLOB VARBINARY base64Binary BOOLEAN boolean CHAR LONGTEXT MEDIUMTEXT TEXT TINYTEXT VARCHAR string DATE DATETIME TIMESTAMP dateTime DECIMAL NUMERIC REAL decimal DOUBLE double FLOAT float TINYINT byte TINYINT UNSIGNED unsigned_byte SMALLINT short SMALLINT UNSIGNED unsigned_short INTEGER INT MEDIUMINT int INTEGER UNSIGNED INT UNSIGNED MEDIUMINT UNSIGNED unsigned_int BIGINT long BIGINT UNSIGNED unsigned_long 9-88 Oracle Fusion Middleware Users Guide for Technology Adapters The character length for any SQL data type that corresponds with STRING can be specified using the notation in the Parameters property, for example, VARCHAR 20. Specifying the length of any other SQL data type does not have any effect. UNSIGNED integer data types are treated as though they were SIGNED integer data types when using the Adapter Configuration Wizard. Stored procedures in MySQL are grouped by database specified by database in the JDBC Connection URL. For MySQL, Default Schema refers to the database that the user is connected to usually specified in the JDBC connection URL. Click Default Schema to select a different database. Click Search to search for specific stored procedures in the current database specified in the JDBC Connection URL. For example, d or D would both find stored procedures beginning with d or D. Click Show All to reveal all procedures in the current database.

9.7.2.3 Creating Database Connections

Database connections must be created in JDeveloper in order to access catalog tables necessary for the Adapter Configuration Wizard to work. The following are the steps to create a database connection by using JDeveloper:

1. Select Database Navigator from View.

2. Right-click the application name, then click New followed by Connections. Select

Database Connection . The Create Database Connection page is displayed, as shown in Figure 9–45 . Figure 9–45 The Create Database Connection

3. Enter a connection name in the Connection Name field. For example, sqlserver.

4. Select Generic JDBC as the Connection Type from the Connection Type list.

Oracle JCA Adapter for Database 9-89 5. Enter your Username, Password, and role information.

6. Click New for Driver Class. The Register JDBC Driver dialog is displayed, as

shown in Figure 9–46 . Figure 9–46 The Register JDBC Driver Dialog

7. Enter the Driver Class for example,

com.microsoft.sqlserver.jdbc.SQLServerDriver.

8. Create a new library or edit an existing one by using the following steps:

a. Click Browse in the Register JDBC Driver dialog.

b. Click New in the Select Library dialog.

The Select Library dialog is displayed, as shown in Figure 9–47 . Figure 9–47 The Select Library Dialog

c. Select an existing library or click New to create a new one.

The Create Library dialog is displayed. d. Enter a library name, for example, SQL Server JDBC.

e. Click Add Entry to add JDBC jar files to the class path.

f. Click OK twice to exit the Create Library windows.

g. Click OK to exit the Register JDBC Driver window.

9-90 Oracle Fusion Middleware Users Guide for Technology Adapters

9. Enter your connection string name for JDBC URL.

10. Click Test Connection.

11. If the connection is successful, then a screen, as shown in Figure 9–48 is displayed. Figure 9–48 The Create Database Connection Dialog

12. Click OK followed by Finish.

9.7.3 Design Time: Artifact Generation

The Adapter Configuration Wizard – Stored Procedures is capable of creating a WSDL file and a valid XSD file that describes the signature of a stored procedure or function. The following sections describe the relevant structure and content of both the WSDL and the XSD files, and their relationship with each other. This section includes the following topics: ■ Section 9.7.3.1, The WSDL–XSD Relationship ■ Section 9.7.3.2, JCA File ■ Section 9.7.3.3, Oracle Data Types ■ Section 9.7.3.4, Generated XSD Attributes ■ Section 9.7.3.5, User-Defined Types ■ Section 9.7.3.6, Complex User-Defined Types ■ Section 9.7.3.7, Object Type Inheritance ■ Section 9.7.3.8, Object References ■ Section 9.7.3.9, Referencing Types in Other Schemas