Jump to: navigation, search

Difference between revisions of "EclipseLink/UserGuide/DBWS/Overview/Design time"

(DBWSBuilder Command-line arguments)
m (Replacing page with 'For the current version, see: '''[http://www.eclipse.org/eclipselink/documentation/2.4/dbws/toc.htm Developing Persistence Architectures Using EclipseLink Database Web Services...')
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<css>
+
For the current version, see:
  .source-sql {padding:1em;border:1px solid black; background-color: white;}
+
'''[http://www.eclipse.org/eclipselink/documentation/2.4/dbws/toc.htm Developing Persistence Architectures Using EclipseLink Database Web Services, Release 2.4]'''
  .source-java5 {padding:1em;border:1px solid black; background-color: white;}
+
  .source-xml {padding:1em;border:1px solid black; background-color: white;}
+
  .source-text {padding:1em;border-style:none; background-color: white;}
+
</css>
+
{{EclipseLink_UserGuide
+
|info=y
+
|toc=n
+
|eclipselink=y
+
|eclipselinktype=DBWS
+
}}
+
  
== Creating EclipseLink DBWS Services using the DBWSBuilder utility ==
 
The EclipseLink DBWS design-time utility <tt><b>DBWSBuilder</b></tt> is a Java application that processes an [[EclipseLink dbws-builder.xml File (ELUG)#eclipselink-dbws-builder.xml|EclipseLink DBWS builder XML file]] to produce a deployable archive (typically a <tt>.war</tt> file) containing all the required deployment artifacts (WSDL, <tt>.xsd</tt> schema, <tt>web.xml</tt>, etc.) for a JAX-WS 2.0 compliant Web Service. There are script files located in the <tt><ECLIPSELINK_HOME>\utils\dbws</tt> directory for invoking the <tt>DBWSBuilder</tt> utility. The scripts ending in <tt>.cmd</tt> are for Windows use while those that end with <tt>.sh</tt> are for all other operating systems. Before running the <tt><b>dbwsbuilder.cmd</b></tt> script, please ensure that the following environment variables in the <tt><ECLIPSELINK_HOME>\utils\dbws\setenv.cmd</tt> (or <tt>setenv.sh</tt> file) are set:
 
* <tt>JAVA_HOME</tt>
 
* <tt>DRIVER_CLASSPATH</tt>
 
  
==== <span style="font-size:5;font-family:monospace,sans-serif;">DBWSBuilder</span> Command-line arguments ====
+
To create EclipseLink DBWS Services using the DBWSBuilder utility, see http://www.eclipse.org/eclipselink/documentation/2.4/dbws/overview002.htm
<source lang="text">
+
prompt > dbwsbuilder.cmd -builderFile {path_to_dbws_builder.xml} -stageDir  {path_to_stageDir}
+
-packageAs[:archive_flag - archive, noArchive, ignore] {packager} [additional args]
+
Available packagers:
+
    -packageAs:[default=not supported] jdev
+
    -packageAs:[default=archive] javase [jarFilename]
+
    -packageAs:[default=archive] wls [warFilename]
+
    -packageAs:[default=archive] glassfish [warFilename]
+
    -packageAs:[default=archive] jboss [warFilename]
+
    -packageAs:[default=archive] war [warFilename]
+
    -packageAs:[default=archive] was [warFilename]
+
    -packageAs:[default=not supported] eclipse
+
</source>
+
{| class="RuleFormalWideMax" dir="ltr" width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
+
|- align="left" valign="top"
+
! id="r1c1-t2" align="left" valign="bottom" | '''Argument'''
+
! id="r1c2-t2" align="left" valign="bottom" | '''Status'''
+
! id="r1c2-t2" align="left" valign="bottom" | '''Description'''
+
|- align="left" valign="top"
+
| align="left" |
+
|-
+
|<tt>-builderFile</tt>
+
|Required
+
|{path_to_dbws_builder.xml} - location of <tt>dbws_builder.xml</tt> file
+
If the file does not exist, then a brief message is displayed:
+
<source lang="text">DBWSBuilder unable to locate dbws-builder.xml file c:\foo\bar.xml</source>
+
|-
+
|<tt>-stageDir</tt>
+
|Required
+
|{path_to_stageDir} - directory to use for staging output
+
If the directory does not exist, then a brief message is displayed:
+
<source lang="text">DBWSBuilder unable to locate stage directory c:\temp\blah</source>
+
|-
+
|<tt>-packageAs</tt>
+
|Required
+
|{packager}- type of packager to use to build the deployment archive.<br/>The optional archive_flag allows one to create an 'exploded directory' view of the archive. If the optional <tt>[warFilename]</tt> is not provided, then the name of the archive is based on the name of the project. If the packager does not exist, then the usage message above is displayed with the list of supported packagers:
+
* <tt>jdev</tt> - generate the deployment files (source only, no <tt>.class</tt> files) in an 'exploded directory' view compatible with the layout of a JDev project
+
* <tt>javase</tt> - generate a <tt>.jar</tt> file that can run in Javase6 'containerless' mode using the [http://java.sun.com/javase/6/docs/api/javax/xml/ws/Endpoint.html javax.xml.ws.Endpoint API] (see the example <i>[[EclipseLink/Examples/DBWS/AdvancedJavase6Containerless|EclipseLink DBWS Service deployed as a JavaSE 6 'containerless' EndPoint]]</i> for details).
+
* <tt>wls</tt> - generate a <tt>.war</tt> file compatible with WebLogic application server (10.3.4 or higher)
+
* <tt>glassfish</tt> - generate a <tt>.war</tt> file compatible with Glassfish  application server (3.0.1 or higher)
+
* <tt>jboss</tt> - generate a <tt>.war</tt> file compatible with JBoss application server (6.0 or higher)
+
* <tt>war</tt> - generate a <tt>.war</tt> file (testing only)
+
* <tt>was</tt> - generate a <tt>.war</tt> file compatible with WebSphere application server (7.0 or higher)
+
* <tt>eclipse</tt> - generate the deployment files (source only, no <tt>.class</tt> files) in an 'exploded directory' view compatible with the layout of an Eclipse project
+
</source>
+
|-
+
|<tt>archive_flag</tt>
+
|Optional
+
|The archive_flag by default  is set to 'archive' which packages the generated files into a Java archive (typically a <tt>.war</tt> file). When set to 'noArchive', one can create an 'exploded directory' view of the archive.
+
|-
+
|<tt>additional args</tt>
+
|Optional
+
|The additional arguments are passed to the packager. The IDE packagers (<tt>jdev, eclipse</tt>) require no additional arguments. The Application server packagers (<tt>was, glass fish, jboss, was</tt>) can be provided with 1 additional argument: the filename of the archive. If the filename is not provided, then by default the name of the archive is based upon the <tt>projectName</tt> property in the dbws-builder.xml file
+
|}
+
Typical <tt>.war</tt> file layout:
+
root of war file
+
    \---WEB-INF
+
    |
+
    |  <span style="font-weight: bold;">web.xml</span>
+
    |
+
    +---classes
+
    |  +---META-INF
+
    |  |      <span style="font-weight: bold;">eclipselink-dbws.xml</span>
+
    |  |      <span style="font-weight: bold;">eclipselink-dbws-or.xml</span>
+
    |  |      <span style="font-weight: bold;">eclipselink-dbws-ox.xml</span>
+
    |  |      <span style="font-weight: bold;">eclipselink-dbws-sessions.xml</span>
+
    |  |
+
    |  \---_dbws
+
    |          <span style="font-weight: bold;">DBWSProvider.class</span>    -- auto-generated JAX-WS 2.0 Provider
+
    |          <span style="font-weight: bold;">ProviderListener.class</span> -- auto-generated Servlet Listener
+
    |
+
    \---wsdl
+
            <span style="font-weight: bold;">eclipselink-dbws-schema.xsd</span>
+
            <span style="font-weight: bold;">eclipselink-dbws.wsdl</span>
+
            <span style="font-weight: bold;">swaref.xsd</span>                -- optional
+
 
+
{| class="RuleFormalWideMax" dir="ltr" title="<b>EclipseLink DBWS Service <code>.war</code> File Contents</b>" width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
+
|+ <b>EclipseLink DBWS Service <code>.war</code> File Contents</b>
+
|- align="left" valign="top"
+
! id="r1c1-t2" align="left" valign="bottom" | '''File'''
+
! id="r1c2-t2" align="left" valign="bottom" | '''Description'''
+
|- align="left" valign="top"
+
| align="left" |
+
|-
+
|<tt>web.xml</tt>
+
|The Web application deployment file <br />(required for deployment as a JAX-WS Web service - see [http://jcp.org/en/jsr/detail?id=109 JSR-109] for more details).
+
|-
+
|<tt>eclipselink-dbws.xml</tt>
+
|[[EclipseLink/UserGuide/DBWS/Overview/EclipseLink_DBWS_Service_Descriptor_File_(ELUG)|The EclipseLink DBWS service descriptor file]]<br/>(described in the EclipseLink User Guide).
+
|-
+
|<tt>eclipselink-dbws-or.xml</tt>
+
|The EclipseLink ORM project XML file.<br/>For more information, see [[Introduction to Relational Projects (ELUG)]].
+
|-
+
|<tt>eclipselink-dbws-ox.xml</tt>
+
|The EclipseLink OXM project XML file.<br/>For more information, see [[Introduction to XML Projects (ELUG)]].
+
|-
+
|<tt>eclipselink-dbws-sessions.xml</tt>
+
|The EclipseLink sessions.xml file for the EclipseLink DBWS service.<br/>It contains references to the EclipseLink ORM and OXM project XML files.<br/>For more information, see [[Introduction to EclipseLink Sessions (ELUG)]].
+
|-
+
|<tt>eclipselink-dbws-schema.xsd</tt>
+
|Contains XML type definitions for operation arguments and return types.<br/>The <tt>DBWSBuilder</tt> utility automatically generates this file from database<br/>metadata to derive element-tag names and types.
+
|-
+
|<tt>eclipselink-dbws.wsdl</tt>
+
|Contains entries for all operations in the EclipseLink DBWS service.<br />(required for deployment as a JAX-WS Web service - see [http://jcp.org/en/jsr/detail?id=109 JSR-109] for more details).
+
|-
+
|<tt>swaref.xsd</tt>
+
|(optional) Contains XML type definitions for SOAP attachments.
+
|-
+
|}
+
 
+
Note that the files <tt>swaref.xsd</tt> and <tt>web.xml</tt> have names and content determined by their roles in Web deployment and cannot be changed.
+

Latest revision as of 07:40, 1 November 2012

For the current version, see: Developing Persistence Architectures Using EclipseLink Database Web Services, Release 2.4


To create EclipseLink DBWS Services using the DBWSBuilder utility, see http://www.eclipse.org/eclipselink/documentation/2.4/dbws/overview002.htm