Web Services Interoperability
WS-I Sample Application 1.0 Package
Contents
Overview
This distribution contains Oracle's implementation of the Web Services Interoperability
Sample Application 1.0 (see http://www.ws-i.org/).
The following are the pre-requisites for installing and running the Sample
Application.
- J2SDK1.4.0 or higher must be installed.
- An installation of Oracle OC4J:
- Download OC4J 10.0.3 preview 2 available from the Oracle Technology
Network (OTN) at http://otn.oracle.com/software/products/ias/preview.html
- expand it to a directory which we will refer to as $ORACLE_HOME.
- run the install:
java -jar $ORACLE_HOME/j2ee/home/oc4j.jar -install
You will be promped for a password which should be recorded for later
use. The following assumes that the password is 'welcome'.
Installation of the Sample Application
- Download and expand sample application from webservices_demos.zip
to a directory which we will refer to as SA_HOME
- Start the OC4J instance:
java -jar ORACLE_HOME/j2ee/home/oc4j.jar
- Deploy the Sample Application by issuing the following two commands:
- java -jar ORACLE_HOME/j2ee/home/admin.jar ormi://localhost/
admin welcome -deploy -file SA_HOME/distribution/WsiSupplyChain.ear -deploymentName
WsiSupplyChain
- java -jar ORACLE_HOME/j2ee/home/admin.jar ormi://localhost/
admin welcome -bindWebApp WsiSupplyChain WebServices http-web-site /ws-i/supplychain
Note: See build/readme.txt for instructions
how to build the WsiSupplyChain.ear yourself.
- Verify your install as follows.
- Point your browser to http://localhost:8888/ws-i/supplychain.
You should see the welcome page of the sample application.
- See build/readme.txt on how to run the functional
tests to fully verify the installation.
Running the Sample Application
- Click the 'Configuration' link on the left panel.
- Choose the endpoints you would like to try from the right panel.
- Click the 'Start a New Demo' button.
- Fill in some quantities for the items you want to buy and
click the 'Submit Order' button. You should see what items have
been shipped.
- Click on the 'Track Order' link on the left panel. You should
see a list of logging entries.
Sample Results from Running the Sample Application
- Click the 'Configuration' link on the left panel.
- Choose the endpoints that start with 'Oracle'.
- Click the 'Start a New Demo' button.
- Fill in the following values.
- 8 for product 605003
- 61 for product 605004
- 40 for product 605008
Click the 'Submit Order' button. You should see
the following order confirmation:
Quantity Product ID Price Comment
8 605003 $45,807.84 in stock from WarehouseA
61 605004 $12,196.95 in stock from WarehouseB
40 605008 $8,000.00 in stock from WarehouseC
- Click on the 'Track Order' link on the left panel and you should see 20 logging entries.
Notes
-
There is a file named DemoSetup.properties under
WEB-INF/classes/com/oracle/wsi/ supplychain/common, the same directory where
DemoSetup.class resides. This is the config file used by the Sample App.
The following is an explanation of the configuration switches:
- TEST_HOST=localhost:8888 - this is the host and port where the Sample
App is deployed.
- CONFIG_LIST=static - the valid values for this switch are 'static'
and the inquiry URL of a public uddi node.
For example, the IBM uddi inquiry url: http://uddi.ibm.com/ubr/inquiryapi.
The default is 'static'.
In the 'static' situation, a file named ConfigOptions.xml
must exist in the directory WEB-INF/classes/com/oracle/
wsi/supplychain/configurator. The file ConfigOptions.xml holds
the static configuration used by the configurator service and users can
modify it to add more endpoints. This file needs to be changed accordingly
if localhost:8888 is not the where the Sample App is deployed.
If the value is not 'static', it will be interpreted as an inquiry URL
of a public uddi node.
- LOGGER_MODE=mem - The LoggingFacility service can use either an in-memory
cache or a database. Its valid values are 'db' and 'mem' for database
and memory respectively. The default is 'mem'.
- PURGE_DELAY=5h - How frequently the in-memory log cache will purge its
content.
- DS_LOCATION=jdbc/WS-I_CoreDS - The data source location configured in
oc4j data-source.xml and used by the LoggingFacility service. This switch
must be specified if LOGGER_MODE=db.
- The following setup is required in <j2ee_home>/home/config/data-source.xml
if the database will be used by the LoggingFacility service, i.e. LOGGER_MODE=db.
<data-source
class="com.evermind.sql.DriverManagerDataSource"
name="WS-I_DS"
location="jdbc/WS-I_CoreDS"
xa-location="jdbc/xa/WS-I_XADS"
ejb-location="jdbc/WS-I_DS"
connection-driver="oracle.jdbc.driver.OracleDriver"
username="wsilogger"
password="password"
url="jdbc:oracle:thin:@localhost:1521:xwen"
inactivity-timeout="30"
/>
Notes:
- The DS_LOCATION switch above must have the value of the 'location' attribute.
- The SQL script 'create.sql' under the src
directory needs to be run with "Oracle SQL*PLUS" to initialize the database.
- To test the service endpoints which are not listed in step 2, you can use
&mode=expert in step 2.
For example: http://localhost:8888/ws-i/supplychain/ApplicationStep.jsp?step=2&mode=expert
- By default, the list of endpoints is cached. If you want to do a refresh,
use &reload=true in step 2. For example: http://localhost:8888/ws-i/supplychain/ApplicationStep.jsp?step=2&reload=true.
- If you are running the Sample App in a cluster environment, you must use
the database for logging.
- If you are getting connection related errors, it may be due the fact that
you are behind a firewall. Try starting OC4J with the http proxy setting or
modify the appropriate script. For example:
java -Dhttp.proxyHost=proxy.host.world.com
-Dhttp.proxyPort=80 -Dhttp.nonProxyHosts="localhost|127.0.0.1" -jar oc4j.jar