Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EclipseLink/Development/DBWS/Overview

< EclipseLink‎ | Development‎ | DBWS
Revision as of 11:28, 14 April 2014 by David.mccann.oracle.com (Talk | contribs) (Design time Component)

High-level Overview of EclipseLink DBWS

The purpose of this document is to provide a high-level overview of the design and runtime portions of the DBWS component. In addition, notable pain points and an outline of relevant changes from version to version will be provided.

Design time Component

The DBWS builder is responsible for processing input from the user (or tooling, such as JDeveloper), then scraping the database DDL (base on this input) for information required to construct a meta-model which will be used to generate a number of artifacts that will be used at runtime to service user SOAP message requests.

The following artifacts will be generated by the builder:

  • WSDL (JAX-WS 2.0)
  • JPA metadata
  • JAXB metadata
  • XML Schema
  • Sessions XML
  • DBWS XML-Relational (XR) file (defines querie operations used by the XR runtime)
  • web.xml
  • DBWSProvider (Web service provider)
  • ProviderListener (servlet)

Supported Input Types

  • SQL
    • generate operations based on SQL statement(s)
  • DB Table
    • CRUD operations generated by default
    • Custom SQL statements can be applied as well
  • Custom SQL
    • Allows additional operations to be defined on a given table
  • Secondary SQL
    • Allows separate design/runtime SQL statements to be defined
    • Design time SQL used to build operations and runtime SQL executed at runtime
  • Stored function/procedure
  • Oracle Object and Object table types
  • PL/SQL stored function/procedure
  • PL/SQL records and collections

User/Tooling Input

At a minimum, DBWS builder requires database connectivity information and one or more database targets as listed in Supported Input Types above. The input can be passed to the builder as an XML file, or as Java objects (builder creates the Java model based on the input XML, but this model can be created and handed to the builder).

Following is sample input XML:

<?xml version="1.0" encoding="UTF-8"?>
<dbws-builder xmlns:xsd=\http://www.w3.org/2001/XMLSchema\>
  <properties>
    <property name="projectName">tabletype</property>
    <property name="logLevel">off</property>
    <property name="username">scott</property>
    <property name="password">tiger</property>
    <property name="url">jdbc:oracle:thin:@localhost:1521:ORCL</property>
    <property name="driver">oracle.jdbc.OracleDriver</property>
    <property name="platformClassname">org.eclipse.persistence.platform.database.oracle.Oracle11Platform</property>
  </properties>
  <table
     schemaPattern="SCOTT"
     tableNamePattern="EMPLOYEE"
  />
</dbws-builder>

And the equivalent Java code:

DBWSBuilder builder = new DBWSBuilder();
builder.setProjectName("tabletype");
builder.setLogLevel("off");
builder.setUsername("scott");
builder.setPassword("tiger");
builder.setUrl("jdbc:oracle:thin:@localhost:1521:ORCL");
builder.setDriver("oracle.jdbc.OracleDriver");
builder.setPlatformClassname("org.eclipse.persistence.platform.database.oracle.Oracle11Platform");
 
TableOperationModel tableOpModel = new TableOperationModel();
tableOpModel.setSchemaPattern("SCOTT");
tableOpModel.setTablePattern("EMPLOYEE");
builder.addOperation(tableOpModel);

Note: the 'projectName' property will be used as the default namespace.

Back to the top