sql/create.sql,
contains a number of methods. Each method will be exposed as a Web Service
operation.
To run this demo you need to ensure that you have installed the required software and set up your environment. In addition, an installation of the Oracle database is required.
<data-source
class="com.evermind.sql.DriverManagerDataSource"
name="OracleDS"
location="jdbc/OracleCoreDS"
xa-location="jdbc/xa/OracleXADS"
ejb-location="jdbc/OracleDS"
connection-driver="oracle.jdbc.driver.OracleDriver"
username="scott"
password="tiger"
url="jdbc:oracle:thin:@<host>:<port>:<sid>"
inactivity-timeout="30"
/>
java -jar oc4j.jar
jdbc:oracle:thin:@<host>:<port>:<sid>
antin the current directory. The last target "run-client" should give the following result:
[java] *** Query Emp Rows by ID returns 1 rowsThis step accomplish several tasks including assembling, deploying, binding the application and then running the client. In the next section, Step 5a (Alternative to Step 5), we will detail how this step is implemented with separate commands.
[java] *** Query Emp Rows by ID returns <7900,JAMES>
java -jar $ORACLE_HOME/webservices/wsa.jar -config service-config.xmlThis step publishes queries defined in service-config.xml into Webservices. The following files will be generated.
java -jar $J2EE_HOME/admin.jar ormi://localhost admin welcome -deploy -file dist/query.ear -deploymentName query
java -jar $J2EE_HOME/admin.jar ormi://localhost admin welcome -bindWebApp query query-web http-web-site /query
java -jar $ORACLE_HOME/webservices/wsa.jar -config client-config.xmlThe client proxy will be generated in the subdirectory build/classes/client.
src/client/oracle/demo/db/query/QueryClient.java, uses the client proxy, generated in Step 5a(4), to invoke the WebServices operations.
Compile and run the client program using the ANT commands:
ant compile-clientThe target "run-client" will give the result described in Section 5.
ant run-client
http://localhost:8888/query/query