|
Now you can use the Web Services Assembler
to create a deployable Web Service EAR file.
The WebServicesAssembler.jar is present at
<OC4J_HOME>\webservices\lib
You need to provide inputs to the
WebServicesAssembler.jar through a configuration file
config.xml. A sample config.xml is present in the
<SAMPLE_HOME>\Boolean\config.xml. You can copy
this config.xml to <OC4J_HOME>\webservices\lib.
The config.xml contains information
about the database username\password database URL, the
package that implements the webservice,etc.
<!-- Connection
information -->
<schema>hr/hr</schema>
<db-url>jdbc:oracle:thin:@<host>:<port>:<sid> </db-url>
<!-- PL/SQL package information. By default,
this is also used for the Java class name -->
<db-pkg-name>EmpTax</db-pkg-name>
Make sure to change the database URL
to the one where you have created the PL/SQL function.
This information is used only at the package creation
time. When the application runs, it requires a JNDI
data source that connects to the database.
The JNDI data source is provided in the config.xml
file as shown below.
<!-- Info
needed at runtime - the JNDI DB connection -->
<database-JNDI-name>jdbc/ora9idb</database-JNDI-name>
Make sure to change the data source
name to the one that connects to the EMPTAX package
in the HR user of sample schema. If the data source
does not exist, you can provide a new data source name
by creating the following entry in the
<OC4J_HOME>\j2ee\home\config\data-sources.xml.
<data-source
class="oracle.jdbc.pool.OracleDataSource"
name="ora9idb"
location="jdbc/ora9idb"
xa-location="jdbc/xa/ora9idbXADS"
ejb-location="jdbc/ora9idb"
connection-driver="oracle.jdbc.driver.OracleDriver"
username="hr"
password="hr"
url="jdbc:oracle:thin:@<hostname>:<port>:<sid>"
inactivity-timeout="30"
/>
Note: Add valid values for hostname,
port and SID
|