Jump to: navigation, search

Difference between revisions of "EclipseLink/UserGuide/DBWS/Overview/EclipseLink DBWSBuilder File (ELUG)"

m (EclipseLink DBWSBuilder File)
m (Replacing page with 'For EclipseLink DBWS documentation,including JAX-WS and JAX-RS, see http://www.eclipse.org/eclipselink/dbws.php Category: EclipseLink User's Guide [[Category: Release 1.1]...')
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
+
For EclipseLink DBWS documentation,including JAX-WS and JAX-RS, see http://www.eclipse.org/eclipselink/dbws.php
==EclipseLink <code>DBWSBuilder</code> File==
+
<onlyinclude>
+
The <code>DBWSBuilder</code> design-time utility processes the elements in this file to produce the requisite EclipseLink DBWS service
+
descriptor and accompanying files. The XML Schema definition for a <code>DBWSBuilder</code> file is
+
<tt>eclipselink-dbws-builder_1.0.xsd</tt> and can be found in the <tt>META-INF/</tt> directory of the
+
<tt>eclipselink-dbwsutils.jar</tt> file, located in the <tt><ECLIPSELINK_HOME>/utils/dbws/</tt> directory.
+
The file has two main sections: global properties settings and specific operation settings.
+
<br/>
+
 
+
{| class="RuleFormalWideMax" dir="ltr" title="<b><code>DBWSBuilder</code> file Properties</b>" width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
+
|- align="left" valign="top"
+
|+ <b><code>DBWSBuilder</code> builder xml file Properties</b>
+
! id="r1c1-t2" align="left" valign="bottom" | '''Property'''
+
! id="r1c2-t2" align="left" valign="bottom" | '''Description'''
+
! id="r1c1-t2" align="left" valign="bottom" | '''Required'''
+
! id="r1c2-t2" align="left" valign="bottom" | '''Default'''
+
|- align="left" valign="top"
+
| align="left" |
+
<tt>projectName</tt>
+
|
+
The name of the EclipseLink DBWS service.
+
|
+
Yes
+
|
+
None
+
|-
+
|
+
<tt>username</tt>
+
|
+
Database user name.
+
|
+
Yes
+
|
+
None
+
|-
+
|
+
<tt>password</tt>
+
|
+
Database password.
+
|
+
Yes
+
|
+
None
+
|-
+
|
+
<tt>url</tt>
+
|
+
Database connection URL.
+
|
+
Yes
+
|
+
None
+
|-
+
|
+
<tt>driver</tt>
+
|
+
Class name of the JDBC driver.
+
|
+
Yes
+
|
+
None
+
|-
+
|
+
<tt>contextRoot</tt>
+
|
+
The value of the <tt>web.xml</tt> file <tt>servlet-mapping</tt> element's <tt>url-pattern</tt> subelement:
+
 
+
<source lang="xml" enclose="div">
+
Example:
+
<servlet-mapping>
+
    ...
+
    <url-pattern>
+
        /servlet/MyWebService
+
    </url-pattern>
+
</servlet-mapping>
+
</source>
+
|
+
No
+
|
+
" / "+ <tt>projectName</tt>
+
|-
+
|
+
<tt>dataSource</tt>
+
|
+
JNDI datasource location for the EclipseLink <tt>sessions.xml</tt> file.
+
You must configure a JNDI data source before deploying your EclipseLink DBWS to a Java-EE server.
+
|
+
No
+
|
+
None
+
|-
+
|
+
<tt>sessionsFileName</tt>
+
|
+
The name of EclipseLink <tt>sessions.xml</tt> file to add to the EclipseLink DBWS service archive file.
+
|
+
No
+
|
+
<tt>eclipselink-dbws-sessions.xml</tt>
+
|-
+
|
+
<tt>platformClassname</tt>
+
|The fully qualified name of the EclipseLink database platform class to use to connect to the relational database. This class must be in the classpath.
+
|
+
No
+
|
+
<tt>org.eclipse.persistence.platform.database.MySQLPlatform</tt><
+
|-
+
|
+
<tt>orSessionCustomizerClassName</tt>
+
|
+
The name of a Java class that implements the <code>eclipselink.persistence.config.SessionCustomizer</code> interface.
+
The name is added to the EclipseLink <tt>sessions.xml</tt> file, allowing for customization of the object-relational mappings project.
+
|
+
No
+
|
+
None
+
|-
+
|
+
<tt>oxSessionCustomizerClassName</tt>
+
|
+
The name of a Java class that implements the <code>eclipselink.persistence.config.SessionCustomizer</code> interface.
+
The name is added to the EclipseLink <tt>sessions.xml</tt> file, allowing for customization of the object-XML mappings project.
+
|
+
No
+
|
+
None
+
|-
+
|
+
<tt>wsdlLocationURI</tt>
+
|
+
The URI of this EclipseLink Database Web service's WSDL (used by Web service tools to generate the client code).
+
|
+
No
+
|
+
<tt>http://localhost:7001/projectName</tt>
+
|-
+
|
+
<tt>logLevel</tt>
+
|
+
EclipseLink logging level to be inserted in the EclipseLink database Web service <tt>sessions.xml</tt> file.
+
Controls the amount and detail of log output by configuring the log level (in ascending order of information) to one of the following <tt>java.util.logging.Level</tt> values:
+
* <tt>off</tt> - Disable logging.
+
* <tt>severe</tt> - Logs exceptions indicating EclipseLink cannot continue, as well as any exceptions generated during login. Includes a stack trace.
+
* <tt>warning</tt> - Logs exceptions that do not force EclipseLink to stop, including all exceptions not logged with severe level. Does not include a stack trace.
+
* <tt>info</tt> - Logs the login and logout per sever session, including the user name. After acquiring the session, detailed information is logged.
+
* <tt>config</tt> - Logs only login, JDBC connection, and database information.
+
* <tt>fine</tt> - Logs SQL.
+
* <tt>finer</tt> - Similar to warning. Includes stack trace.
+
* <tt>finest</tt> - Includes additional low level information.
+
|
+
No
+
|
+
<tt>info</tt>
+
|-
+
|
+
<tt>targetNameSpace</tt>
+
|The URI of the target namespace that the EclipseLink Database Web service inserts into the <tt>eclipselink-dbws-schema.xsd</tt> file.
+
|
+
No
+
|
+
urn: + <tt>projectName</tt>
+
|}
+
 
+
 
+
<br/>
+
The following tables describe attributes of builder operations.
+
<br/>
+
This table lists attributes common to all three builder operations: <tt>table</tt>, <tt>procedure</tt> and <tt>sql</tt>.
+
 
+
{| class="RuleFormalWideMax" dir="ltr" title="<b>Common Attributes of Builder Operations</b>" width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
+
|- align="left" valign="top"
+
|+ <b>Common Attributes of Builder Operations</b>
+
! id="r1c1-t2" align="left" valign="bottom" | '''Attribute'''
+
! id="r1c2-t2" align="left" valign="bottom" | '''Description'''
+
! id="r1c2-t2" align="left" valign="bottom" | '''Default'''
+
|- align="left" valign="top"
+
| align="left" |
+
<tt>name</tt>
+
|
+
Name of the operation.
+
|
+
None
+
|-
+
|
+
<tt>isCollection</tt>
+
|Specifies whether or not the procedure returns multiple results. The following are valid values:
+
* <tt>true</tt> - the operation returns more than a single row.
+
* <tt>false</tt> - the operation returns a single row.
+
|
+
<tt>false</tt>
+
|-
+
|
+
<tt>isSimpleXMLFormat</tt>
+
|
+
Specifies whether or not the procedure returns information in the Simple XML Format (SXF). The following are valid values:
+
* <tt>true</tt> - the operation returns information in the Simple XML Format.
+
* <tt>false</tt> - the operation returns information in the Simple XML Format.
+
For more information, see foobar
+
|
+
<tt>false</tt>
+
|-
+
|
+
<tt>simpleXMLFormatTag</tt>
+
|
+
The name of the root-level simple XML format element tag.
+
For more information, see (Information pending).
+
|
+
<tt><simple-xml-format></tt>
+
|-
+
|
+
<tt>xmlTag</tt>
+
|
+
The name of the grouping XML element tag for rows.
+
For more information, see (Information pending).
+
|
+
<tt><simple-xml></tt>
+
|-
+
|
+
<tt>binaryAttachment</tt>
+
|
+
Specifies whether or not the operation returns binary data as a SOAP attachment. The following are valid values:
+
* <tt>true</tt> - the operation returns binary data as a SOAP attachment.
+
* <tt>false</tt> - the operation does not return binary data as a SOAP attachment.
+
|
+
<tt>false</tt>
+
|-
+
|
+
<tt>returnType</tt>
+
|Specifies a return type when the operation's return type cannot be deduced from database metadata. Valid values are any type that the <tt>eclipselink-dbws-schema.xsd</tt> file defines.
+
Note: This attribute is optional.
+
|
+
None
+
|}
+
<br/>
+
 
+
 
+
This table lists attributes of the <tt>procedure</tt> operation:
+
<br/>
+
{| class="RuleFormalWideMax" dir="ltr" title="Attributes of the <b>procedure</b> Operation" width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
+
|- align="left" valign="top"
+
|+ Attributes of the <b>procedure</b> Operation
+
! id="r1c1-t2" align="left" valign="bottom" | '''Attribute'''
+
! id="r1c2-t2" align="left" valign="bottom" | '''Description'''
+
|- align="left" valign="top"
+
| align="left" |
+
<tt>catalogPattern</tt>
+
|
+
A pattern that matches one or more catalog names in the database identified by the parent operation (supports SQL-92 % wild-card).
+
|-
+
|
+
<tt>schemaPattern</tt>
+
|
+
A pattern that matches one or more schema names in the database identified by the parent operation (supports SQL-92 % wild-card).
+
|-
+
|
+
<tt>procedurePattern</tt>
+
|
+
A pattern that matches one or more stored procedure, stored function, or stored trigger names in the database identified by the parent operation (supports SQL-92 % wild-card).
+
|}
+
 
+
This table lists attributes of the <tt>table</tt> operation:
+
{| class="RuleFormalWideMax" dir="ltr" title="Attributes of the <b>table</b> Operation" width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
+
|- align="left" valign="top"
+
|+ Attributes of the <b>table</b> Operation
+
! id="r1c1-t2" align="left" valign="bottom" | '''Attribute'''
+
! id="r1c2-t2" align="left" valign="bottom" | '''Description'''
+
|- align="left" valign="top"
+
| align="left" |
+
<tt>catalogPattern</tt>
+
|
+
A pattern that matches one or more catalog names in the database identified by the parent operation (supports SQL-92 % wild-card).
+
|-
+
|
+
<tt>schemaPattern</tt>
+
|
+
A pattern that matches one or more schema names in the database identified by the parent operation (supports SQL-92 % wild-card).
+
|-
+
|
+
<tt>tableNamePattern</tt>
+
|
+
A pattern that matches one or more table names in the database identified by the parent operation (supports SQL-92 % wild-card).
+
|}
+
 
+
 
+
<span id="Example 9-5"></span>
+
Example <code>DBWSBuilder</code> builder xml file:
+
 
+
<source lang="xml">
+
<?xml version="1.0" encoding="UTF-8"?>
+
<dbws-builder xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
    <properties>
+
        <property name="projectName">test</property>
+
        <property name="driver">oracle.jdbc.OracleDriver</property>
+
        <property name="password">tiger</property>
+
        <property name="url">jdbc:oracle:thin:@localhost:1521:ORCL</property>
+
        <property name="username">scott</property>
+
    </properties>
+
    <table catalogPattern="%" schemaPattern="SCOTT" tableNamePattern="XR_EMP">
+
        <procedure returnType="xr_empType"
+
                  catalogPattern="SOME_PKG"
+
                  schemaPattern="SCOTT"
+
                  procedurePattern="GetEmployeeByEMPNO_DEPTNO"
+
        />
+
        <sql name="findXREmpByName" isCollection="true" returnType="xr_empType">
+
            <text>
+
            <![CDATA[select * from XR_EMP where ENAME like ?]]>
+
            </text>
+
            <binding name="ENAME" type="xsd:string"/>
+
        </sql>
+
    </table>
+
    <sql name="employeeInfo" simpleXMLFormatTag="employee-info" xmlTag="aggregate-counts">
+
        <text>
+
        <![CDATA[select count(*) as "COUNT", max(SAL) as "MAX-Salary" from EMP]]>
+
        </text>
+
    </sql>
+
</dbws-builder>
+
</source>
+
 
+
 
+
===Graphical View of EclipseLink DBWS Service Descriptor Schema eclipselink-dbws_1.0.xsd===
+
[[Image:dbws-builder_1_0.png]]
+
 
+
----
+
''[[EclipseLink User's Guide Copyright Statement|Copyright Statement]]''
+
 
+
  
 
[[Category: EclipseLink User's Guide]]
 
[[Category: EclipseLink User's Guide]]
 
[[Category: Release 1.1]]
 
[[Category: Release 1.1]]
 
[[Category: DBWS]]
 
[[Category: DBWS]]

Latest revision as of 07:50, 1 November 2012

For EclipseLink DBWS documentation,including JAX-WS and JAX-RS, see http://www.eclipse.org/eclipselink/dbws.php