Skip to main content

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.

Jump to: navigation, search

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

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...')
 
(15 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 provided for invoking <tt>DBWSBuilder</tt>. They are located in the <tt><ECLIPSELINK_HOME>\utils\dbws</tt> directory. 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>dbwsbuilder.cmd</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">
+
DBWSBuilder usage - [] indicates optional argument:
+
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[:archive_flag]</tt>
+
|Required
+
|{packager} [warFilename] - 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:
+
* jdev - generate the deployment files (source only, no <tt>.class</tt> files) in an 'exploded directory' view compatible with the layout of a JDev project
+
* javase - 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]
+
* wls - generate a <tt>.war</tt> file compatible with WebLogic application server (10.3.4 or higher)
+
* glassfish - generate a <tt>.war</tt> file compatible with Glassfish  application server (3.0.1 or higher)
+
* jboss - generate a <tt>.war</tt> file compatible with JBoss application server (6.0 or higher)
+
* war - generate a <tt>.war</tt> file (testing only)
+
* was - generate a <tt>.war</tt> file compatible with WebSphere application server (7.0 or higher)
+
* eclipse - 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>
+
|}
+
 
+
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 08: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

Back to the top