Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "EclipseLink/UserGuide/DBWS/DBWSBuilderAPI"

m (Replacing page with 'For "Using DBWSBuilder API," see http://www.eclipse.org/eclipselink/documentation/2.4/dbws/overview002.htm Category: DBWS')
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
==DBWSBuilder API==
+
For "Using DBWSBuilder API," see http://www.eclipse.org/eclipselink/documentation/2.4/dbws/overview002.htm
<onlyinclude>
+
The EclipseLink DBWS design-time utility - <tt>DBWSBuilder</tt> - is a Java application that generates EclipseLink DBWS files and assembles them into deployable archives. <br />
+
It is normally invoked from the command-line via its <code>main</code> method:
+
<css>
+
  .source-text {padding: 1em; border: 1px solid; color: black; background-color: #ffffff;}
+
</css>
+
<source lang="text">
+
prompt > dbwsbuilder.cmd -builderFile {path_to_builder.xml} -stageDir {path_to_stageDir} -packageAs {packager}
+
</source>
+
The given builder XML file is parsed:
+
<css>
+
  .source-xml {padding: 1em; border: 1px solid; color: black; background-color: #ffffff;}
+
</css>
+
<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="EMP"
+
    />
+
</dbws-builder>
+
</source>
+
by the OXM Project <code>o.e.p.tools.dbws.DBWSBuilderModelProject</code> producing model objects that represent <tt>properties</tt> and <tt>&lt;table&gt;</tt> operations. Thus the public class <b><code>org.eclipse.persistence.tools.dbws.DBWSBuilder</code></b> can be populated
+
programmatically through property setters (i.e. <b><code>setDriver()</code></b>, <b><code>setUrl()</code></b>)  - table or procedure operations<br/>
+
can be added via the public <b><code>addDbTable()</code></b> and <b><code>addDbStoredProcedure()</code></b> methods; SQL operations via <b><code>addSqlOperation()</code></b>.
+
 
+
The <tt>packager</tt> specified on the command-line is represented by a class that implements the <code>o.e.p.tools.dbws.DBWSPackager</code> interface. There is a hierarchy of concrete implementations of this interface:
+
[[Image:DBWSPackagerHierarchy.png]]
+
 
+
Once all the data and definitions have been set, the builder is invoked through the <b><code>build(...)</code></b> method:
+
<source lang="java" eclose="div">
+
public void build(OutputStream dbwsSchemaStream, OutputStream dbwsSessionsStream,
+
        OutputStream dbwsServiceStream, OutputStream dbwsOrStream, OutputStream dbwsOxStream,
+
        OutputStream swarefStream, OutputStream webXmlStream, OutputStream wsdlStream,
+
        OutputStream codeGenProviderStream, OutputStream sourceProviderStream, Logger logger)
+
        throws WSDLException
+
</source>
+
 
+
</onlyinclude>
+
  
 
[[Category: DBWS]]
 
[[Category: DBWS]]

Latest revision as of 08:48, 1 November 2012

For "Using DBWSBuilder API," see http://www.eclipse.org/eclipselink/documentation/2.4/dbws/overview002.htm

Back to the top