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/Creating from a Stored Function"

m (New page: {{EclipseLink_UserGuide |info=y |toc=n |eclipselink=y |eclipselinktype=DBWS }} ==Creating from a Stored Function == The EclipseLink DBWS can create of a Web service that exposes a simple ...)
 
m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{EclipseLink_UserGuide
+
'''[[Image:Elug_draft_icon.png|Warning]] This page is obsolete. Please see ''[http://www.eclipse.org/eclipselink/documentation/ Developing Persistence Architectures Using EclipseLink Database Web Services]'' for current information.'''
|info=y
+
|toc=n
+
|eclipselink=y
+
|eclipselinktype=DBWS
+
}}
+
 
+
==Creating from a Stored Function ==
+
The EclipseLink DBWS can create of a Web service that exposes a simple Stored Function.
+
 
+
 
+
===Example==
+
In this example, the following stored function will be used:
+
 
+
<source lang="sql"  enclose="div">
+
DROP FUNCTION TESTECHO;
+
CREATE OR REPLACE FUNCTION TESTECHO(T IN VARCHAR2) RETURN VARCHAR2 IS retVal VARCHAR2
+
BEGIN
+
retVal := CONCAT('test-' , T);
+
RETURN retVal;
+
END TESTECHO;
+
</source>
+
 
+
The <tt>DBWSBuilder</tt> utility requires a DBWS configuration XML file as input, as shown here:
+
 
+
<source lang="xml" enclose="div">
+
<?xml version="1.0" encoding="UTF-8"?>
+
<dbws-builder xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
  <properties>
+
    <property name="projectName">testEcho</property>
+
    ... database properties
+
  </properties>
+
  <procedure
+
    name="testEcho"
+
    procedurePattern="TESTECHO"
+
    returnType="xsd:string"
+
  />
+
</dbws-builder>
+
</source>
+
 
+
Execute the DBWSBuilder, as shown here:
+
 
+
<source lang="text">
+
prompt > dbwsbuilder.cmd -builderFile dbws-builder.xml -stageDir output_directory -packageAs wls testEcho.war
+
</source>
+
 
+
where
+
* <tt>dbws-builder.xml</tt> is the DBWS builder configuration XML file above
+
* <tt>output_directory</tt> is the output directory for the generated files
+
* <tt>-packageAs</tt> the platform on which the web service will be deployed
+

Latest revision as of 13:18, 30 January 2013

Warning This page is obsolete. Please see Developing Persistence Architectures Using EclipseLink Database Web Services for current information.

Back to the top