BEAAquaLogic Data Service Platform - Oracle

Transcription

BEA AquaLogic Data ServicePlatformClient ApplicationDeveloper’s GuideNote: Product documentation may be revised post-release andmade available from the following BEA e-docs Version: 3.0Document Date: June 2005Revised: March 2008

Contents1. Introducing Data Services for Client ApplicationsIntroduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2What Is a Data Service? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2What is an ALDSP Client Application? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3Choosing a Client Programming Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5Introducing Service Data Objects (SDO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6Introducing The Data Service Mediator API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7Typical Client Application Development Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8Security Considerations in Client Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8Performance Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9Client Classpath Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9Java Mediator API Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10Web Services Clients. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10JMX Mbean Management API Client Classpath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11ALDSP JDBC API Client Classpath. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11Backward Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-122. Data Programming Model and Update FrameworkIntroduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1ALDSP and SDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2Client Application Developer’s Guideiii

Static and Dynamic Data Object APIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-3Static Data Object API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-4XML Schema-to-Java Type Mapping Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-6Dynamic Data Object API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-7Role of the Mediator API and SDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-133. Invoking Data Services from Java ClientsIntroducing the Mediator API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-2What is SDO? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-2What is the Mediator API? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-3Dynamic and Static Mediator APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-3API Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-4Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-5Getting Started. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-5Basic Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-6Setting the CLASSPATH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-7Static Java Mediator API Client CLASSPATH. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-7Dynamic Java Mediator API Client CLASSPATH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-7Specifying the Class Loader Directly. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-8Running the Sample Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9Sample Static Mediator Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9Setting Up the Sample Data Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-10Generating the Mediator Client JAR File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-15Setting Up the Java Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-16Running and Testing the Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-19Examining the Sample Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-20Importing Packages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-20Obtaining a Data Access Service Handle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-21ivClient Application Developer’s Guide

Retrieving Data from the Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21Obtaining a DataObject from the Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22Disposing the Result Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22Modifying the DataObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22Returning Changes to the Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23Sample Dynamic Mediator Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23Setting Up and Running the Sample Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23Sample Java Client Code (Dynamic Mediator API) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24Examining the Sample Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25Importing Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26Obtaining a DataAccessService Handle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26Retrieving Data from the Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-27Obtaining a DataObject from the Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-27Disposing the Result Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-27Modifying the DataObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-27Returning Changes to the Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28Creating New DataObjects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28Creating a New DataObject with the Static API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28Setting Up and Running the Sample. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28Importing Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-31Obtaining a Data Access Service Handle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-31Creating a DataFactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-32Create and Name the DataObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-32Modifying the DataObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-32Returning New DataObject to the Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33Returning the New DataObject Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33Creating a New DataObject with the Dynamic API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33Running the Sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33Client Application Developer’s Guidev

Importing Packages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-36Creating a DataFactory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-36Create and Name the DataObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-37Modifying the DataObject. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-37Returning New DataObject to the Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-38Returning the New DataObject Key. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-38Mediator API Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-39Beyond the Sample Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-39More on the Static Mediator API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-40More on the Dynamic Mediator API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-40Invoking Data Service Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-40Getters and Setters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-40Naming Conventions for Generated Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-41Mediator Client JAR Naming Convention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-41Web Services Mediator Client JAR Naming Convention . . . . . . . . . . . . . . . . . . . . . . . .3-41Understanding DASResult . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-41Overview of DASResult . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-42Disposing of DASResult Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-42Dynamic Mediator APIs and DASResult . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-43Static Mediator APIs and DASResult . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-43Retrieving an Array of Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-44Obtaining the WebLogic JNDI Context for ALDSP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-44Working with Data Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-45Enabling Data Objects for Change Tracking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-45Modifying Data Object Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-46Creating a New Data Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-46Mapping Data Service Types to Java Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-46Conversion of Simple Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-47viClient Application Developer’s Guide

Conversion of Date/Time Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-49Passing Empty Sequence Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-49Quantified Return Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-50What is Autoboxing? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-50Web Services Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-51Advanced Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-51Schema Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-52Schema Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-52Schema Download . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-53Schema Cache Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-53Support for Stateless Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-54Cache Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-55Forcing Data Cache Read-through and Update. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-55Specifying XPath Expressions as Arguments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-56Making Ad Hoc Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-57Understanding Transaction Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-57Transaction Behavior for Read/Write Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-57Transaction Behavior for Read-Only Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-584. Invoking Data Services Through Web ServicesOverview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1Before You Begin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3Basic Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4Setting the CLASSPATH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5Running the Sample Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5Sample Static Mediator Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6Setting Up the Sample Data Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6Client Application Developer’s Guidevii

Creating a Web Service Map File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-6Generating the Web Services Mediator Client JAR File . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-7Setting Up the Java Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-8Running and Testing the Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-11Examining the Sample Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-12Importing Packages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-12Obtaining a Data Access Service Handle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-13Retrieving Data from the Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-13Obtaining a DataObject from the Result. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-14Disposing the Result Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-14Modifying the DataObject. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-14Returning Changes to the Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-14Sample Dynamic Mediator Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-15Setting Up and Running the Sample Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-15Sample Java Client Code (Dynamic Mediator API). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-15Examining the Sample Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-17Importing Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-17Obtaining a DataAccessService Handle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-18Retrieving Data from the Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-18Obtaining a DataObject from the Result. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-19Disposing the Result Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-19Modifying the DataObject. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-19Returning Changes to the Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-19Transaction Behavior and Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-20Securing Your Web Services Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-215. Using SQL to Access Data ServicesIntroducing SQL Access to Data Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-2viiiClient Application Developer’s Guide

Features of the Data Services Platform JDBC Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5Exploring Data Services Platform and JDBC Artifacts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5JDBC and SQL Support in Data Services Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6JDBC Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6SQL Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-13Supported SQL Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-13Supported SQL Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-13Table Parameter Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18Additional Details and Limitations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20Preparing to Use SQL to Access Data Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-21Publishing Data Service Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-21Configuring the Data Services Platform JDBC Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-21Accessing Data Services Using SQL From a Java Application . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-23Obtaining a Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-24Using the PreparedStatement Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-25Using the CallableStatement Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-26Advanced Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-26Using Table Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-26When to Use Table Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-26Setting Table Parameters Using JDBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-27Accessing Custom Database Functions Using JDBC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-32Accessing Data Services Using SQL-Based Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-34Accessing Data Services Using SQL Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-34Connecting to the Data Services Platform Client Using OpenLink ODBC-JDBC Bridge . 5-38Using OpenLink with Reporting Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-39Crystal Reports XI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-41Business Objects XI-Release 2 (ODBC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-43Microsoft Access 2003-ODBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-47Client Application Developer’s Guideix

Microsoft Excel 2003-ODBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-486. Using Excel to Access Data ServicesIntroducing the Excel Add-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2Installing the Excel Add-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2Installation Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2Accessing Excel Add-in Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-5Preparing to Use the Excel Add-in. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-6Accessing the Data Service Using Excel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-87. Accessing Data Services Through a WebLogic WorkshopControlIntroduction to Data Service Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-2Data Service Controls Defined . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-2Description of the Data Service Control File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-3Design View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-3Source View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-4Creating Data Service Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-6Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-7Step 1: Create a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-7Step 2: Start WebLogic Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-7Step 3: Create a Package under src Folder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-7Step 4: Create the Data Service Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-7Using ALDSP Control for Ad Hoc Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-12ALDSP Control Backward Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-13Modifying Existing ALDSP Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-14Adding and Removing Operations Used by a Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-14xClient Application Developer’s Guide

Updating an Existing Control When Schemas Change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-16Caching Considerations When Using Data Service Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-17Bypassing the Cache When Using a Data Service Control . . . . . . . . . . . . . . . . . . . . . . . . . . 7-17Cache Bypass Example When Using a Data Service Control . . . . . . . . . . . . . . . . . . . . 7-17ALDSP Control Security Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-18Security Credentials Used to Create Data Service Controls . . . . . . . . . . . . . . . . . . . . . . . . 7-19Testing Controls in the JWS File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-19Trusted Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-20Using ALDSP Control in Different Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-208. Supporting ADO.NET ClientsOverview of ADO.NET Integration in Data Services Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2Understanding ADO.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2ADO.NET Client Application Development Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4Understanding How ALDSP Supports ADO.NET Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-5Supporting Java Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7Enabling ALDSP Support for ADO.NET Clients. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8Generating an ALDSP Web Services Mapper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8Viewing an ADO.NET-Enabled WSDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-10Creating a Web Reference in ADO.NET Client by Providing the ALDSP WSDL URL . . . . 8-12Adapting ALDSP XML Types (Schemas) for ADO.NET Clients . . . . . . . . . . . . . . . . . . . . . . . . . . 8-12Approaches to Adapting XML Types for ADO.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13XML Type Requirements for Working With ADO.NET DataSets . . . . . . . . . . . . . . . . . 8-14References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-16Creating a Data Service Based on an RPC-Style Web Service . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-17Generated Artifacts Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-18XML Schema Definition for ADO.NET Types DataSet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-18Web Services Description Language (WSDL) File for Microsoft ADO.NET Clients. . . . . . 8-19Client Application Developer’s Guidexi

9. Advanced TopicsALDSP Control Source Upgrade. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-1Accessing Metadata Using Catalog Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-2Installing Catalog Services . . . . . . . . . .

BEAAquaLogic Data Service Platform Client Application Developer's Guide Note: Product documentation may be revised post-release and made available from the following BEA e-docs site: