Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EclipseLink/UserGuide/DBWS/Overview/EclipseLink DBWSBuilder File (ELUG)"
(→What You May Need to Know About Builder Operations) |
|||
Line 163: | Line 163: | ||
urn: + projectName | urn: + projectName | ||
|} | |} | ||
+ | |||
The following tables describe attributes of builder operations that [[#Example 9-5|eclipselink-dbws-build.xml File]] uses. | The following tables describe attributes of builder operations that [[#Example 9-5|eclipselink-dbws-build.xml File]] uses. | ||
− | |||
+ | |||
+ | This table lists attributes common to all three builder operations. | ||
<span id="Table 9-5"></span> | <span id="Table 9-5"></span> | ||
'''''Common Attributes of Builder Operations''''' | '''''Common Attributes of Builder Operations''''' | ||
− | + | {| class="RuleFormalWideMax" dir="ltr" title="Common Attributes of Builder Operations" width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all" | |
− | {| class="RuleFormalWideMax" dir="ltr" title=" | + | |
|- align="left" valign="top" | |- align="left" valign="top" | ||
! id="r1c1-t2" align="left" valign="bottom" | '''Attribute''' | ! id="r1c1-t2" align="left" valign="bottom" | '''Attribute''' | ||
Line 196: | Line 197: | ||
*true - the operation returns information in the Simple XML Format. | *true - the operation returns information in the Simple XML Format. | ||
*false - the operation returns information in the Simple XML Format. | *false - the operation returns information in the Simple XML Format. | ||
− | For more information, see | + | For more information, see foobar |
| | | | ||
false | false | ||
Line 204: | Line 205: | ||
| | | | ||
The name of the root-level Simple XML Format element-tag. | The name of the root-level Simple XML Format element-tag. | ||
− | For more information, see | + | For more information, see foobar |
| | | | ||
<simple-xml-format> | <simple-xml-format> | ||
Line 212: | Line 213: | ||
| | | | ||
The name of the grouping XML element-tag for rows. | The name of the grouping XML element-tag for rows. | ||
− | For more information, see | + | For more information, see foobar |
| | | | ||
<simple-xml> | <simple-xml> | ||
Line 227: | Line 228: | ||
| | | | ||
returnType | returnType | ||
− | |Specifies a return type when the operation's return type cannot be deduced from database metadata. Valid values are any type that the '''eclipselink-dbws-schema.xsd''' file defines | + | |Specifies a return type when the operation's return type cannot be deduced from database metadata. Valid values are any type that the '''eclipselink-dbws-schema.xsd''' file defines. |
Note: This attribute is optional. | Note: This attribute is optional. | ||
| | | | ||
Line 236: | Line 237: | ||
This table lists attributes of the procedure operation. | This table lists attributes of the procedure operation. | ||
<span id="Table 9-6"></span> | <span id="Table 9-6"></span> | ||
− | |||
'''''Attributes of the procedure Operation''''' | '''''Attributes of the procedure Operation''''' | ||
− | + | {| class="RuleFormalWideMax" dir="ltr" title="Attributes of the procedure Operation" width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all" | |
− | {| class="RuleFormalWideMax" dir="ltr" title=" | + | |
|- align="left" valign="top" | |- align="left" valign="top" | ||
! id="r1c1-t2" align="left" valign="bottom" | '''Attribute''' | ! id="r1c1-t2" align="left" valign="bottom" | '''Attribute''' | ||
Line 263: | Line 262: | ||
This table lists attributes of the table operation. | This table lists attributes of the table operation. | ||
<span id="Table 9-7"></span> | <span id="Table 9-7"></span> | ||
− | |||
'''''Attributes of the table Operation''''' | '''''Attributes of the table Operation''''' | ||
− | + | {| class="RuleFormalWideMax" dir="ltr" title="Attributes of the table Operation" width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all" | |
− | {| class="RuleFormalWideMax" dir="ltr" title=" | + | |
|- align="left" valign="top" | |- align="left" valign="top" | ||
! id="r1c1-t2" align="left" valign="bottom" | '''Attribute''' | ! id="r1c1-t2" align="left" valign="bottom" | '''Attribute''' | ||
Line 319: | Line 316: | ||
</dbws-builder> | </dbws-builder> | ||
</source> | </source> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===Graphical view of EclipseLink DBWS Service Descriptor's Schema <code>eclipselink-dbws_1.0.xsd</code>=== | ===Graphical view of EclipseLink DBWS Service Descriptor's Schema <code>eclipselink-dbws_1.0.xsd</code>=== |
Revision as of 16:50, 19 March 2009
EclipseLink DBWSBuilder
builder XML File
The DBWSBuilder
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 DBWSBuilder
builder xml File is
eclipselink-dbws-builder_1.0.xsd and can be found in the META-INF/ directory in the
eclipselink-dbwsutils.jar file, located in the <ECLIPSELINK_HOME>/utils/dbws/ directory.
Element | Description | Required | Default |
---|---|---|---|
projectName |
The name of the EclipseLink DBWS service. |
Yes |
None |
username |
Database user name. |
Yes |
None |
password |
Database password. |
Yes |
None |
url |
Database connection URL. |
Yes |
None |
driver |
Class name of the JDBC driver. |
Yes |
None |
contextRoot |
The value of the web.xml file servlet-mapping element's url-pattern sub-element: Example: <servlet-mapping> ... <url-pattern> /servlet/MyWebService </url-pattern> </servlet-mapping> |
No |
" / "+ projectName |
dataSource |
JNDI datasource location for the EclipseLink sessions.xml file You must configure a JNDI datasource before deploying your EclipseLink DBWS to a Java-EE server |
No |
None |
sessionsFileName |
The name of EclipseLink sessions.xml file to add to the EclipseLink DBWS service archive file. |
No |
eclipselink-dbws-sessions.xml |
platformClassname |
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 |
org.eclipse.persistence.platform.database.MySQLPlatform |
orSessionCustomizerClassName |
The name of a Java class that implements the |
No |
None |
oxSessionCustomizerClassName |
The name of a Java class that implements the |
No |
None |
wsdlLocationURI |
The URI of this EclipseLink Database Web service's WSDL (used by Web service tools to generate client code). |
No |
http://localhost:7001/projectName |
logLevel |
EclipseLink logging level to be inserted in the EclipseLink database Web service sessions.xml file. Controls the amount and detail of log output by configuring the log level (in ascending order of information) to one of the following java.util.logging.Level values:
|
No |
info |
targetNameSpace |
The URI of the target namespace that the EclipseLink Database Web service inserts into the eclipselink-dbws-schema.xsd file. |
No |
urn: + projectName |
The following tables describe attributes of builder operations that eclipselink-dbws-build.xml File uses.
This table lists attributes common to all three builder operations.
Common Attributes of Builder Operations
Attribute | Description | Default |
---|---|---|
name |
Name of the operation. |
None |
isCollection |
Specifies whether or not the procedure returns multiple results. The following are valid values:
|
false |
isSimpleXMLFormat |
Specifies whether or not the procedure returns information in the Simple XML Format (SXF). The following are valid values:
For more information, see foobar |
false |
simpleXMLFormatTag |
The name of the root-level Simple XML Format element-tag. For more information, see foobar |
<simple-xml-format> |
xmlTag |
The name of the grouping XML element-tag for rows. For more information, see foobar |
<simple-xml> |
binaryAttachment |
Specifies whether or not the operation returns binary data as a SOAP attachment. The following are valid values:
|
false |
returnType |
Specifies a return type when the operation's return type cannot be deduced from database metadata. Valid values are any type that the eclipselink-dbws-schema.xsd file defines.
Note: This attribute is optional. |
None |
This table lists attributes of the procedure operation.
Attributes of the procedure Operation
Attribute | Description |
---|---|
catalogPattern |
A pattern that matches one or more catalog names in the database identified by the parent operation (supports SQL-92 % wild-card). |
schemaPattern |
A pattern that matches one or more schema names in the database identified by the parent operation (supports SQL-92 % wild-card). |
procedurePattern |
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 table operation.
Attributes of the table Operation
Attribute | Description |
---|---|
catalogPattern |
A pattern that matches one or more catalog names in the database identified by the parent operation (supports SQL-92 % wild-card). |
schemaPattern |
A pattern that matches one or more schema names in the database identified by the parent operation (supports SQL-92 % wild-card). |
tableNamePattern |
A pattern that matches one or more table names in the database identified by the parent operation (supports SQL-92 % wild-card). |
Example DBWSBuilder
builder xml file:
<?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>