|
|
(30 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:1px solid black; 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>
| |
| | | |
− | ==== 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" enclose=div>
| + | |
− | 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] [warFilename]
| + | |
− | -packageAs:[default=archive] glassfish [warFilename] [warFilename]
| + | |
− | -packageAs:[default=archive] jboss [warFilename] [warFilename]
| + | |
− | -packageAs:[default=archive] war [warFilename] [warFilename]
| + | |
− | -packageAs:[default=archive] was [warFilename] [warFilename]
| + | |
− | -packageAs:[default=not supported] eclipse
| + | |
− | </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 full 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.
| + | |