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.
EclipseLink/UserGuide/DBWS/DBWSBuilderAPI
DBWSBuilder API
The EclipseLink DBWS design-time utility - DBWSBuilder - is a Java application that generates EclipseLink DBWS files and assembles them into deployable archives.
It is normally invoked from the command-line via its main
method:
prompt > dbwsbuilder.cmd -builderFile {path_to_builder.xml} -stageDir {path_to_stageDir} -packageAs {packager}
The given builder XML file is parsed:
<?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>
by the OXM Project o.e.p.tools.dbws.DBWSBuilderModelProject
producing model objects that represent properties and <table> operations. Thus the public class org.eclipse.persistence.tools.dbws.DBWSBuilder
can be populated
programmatically through property setters (i.e. setDriver()
, setUrl()
) - table or procedure operations
can be added via the public addDbTable()
and addDbStoredProcedure()
methods; SQL operations via addSqlOperation()
.
The packager specified on the command-line is represented by a class that implements the o.e.p.tools.dbws.DBWSPackager
interface. There is a hierarchy of concrete implementations of this interface:
<html>
foo
stuff
</html>
Once all the data and definitions have been set, the builder is invoked through the build(...)
method:
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