Beta STORET Station Web Service, S2.0B - 01/28/2004



5.0	INSTALLATION INSTRUCTIONS - Extracted from Section 5.0 Software Release Notes

This section provides instructions to deploy the beta version of the STORET Station Web Service.   The service performs a query against the STORET Central Warehouse database and returns Station data in a SOAP XML response message.  The service also includes a link to the service description (i.e., WSDL) XML document.


5.1	Assumptions

The following assumptions are made regarding installation and configuration of the STORET Station Web Service:

 -	The STORET Central Warehouse schemas and objects are available.

 -	Oracle 9i Application Server (AS) Release 2 version 9.0.3 must be installed and initially configured.

 -	The Oracle Application Server Containers for J2EE version 9.0.4.0.0 WSSERVER.JAR file must be applied on the Oracle 9iAS to ensure the deployed Java-based web services function properly.

 -	The installation personnel should be familiar with Structured Query Language (SQL) Plus and Oracle 9iAS operations.


5.2	Web Service Installation

Perform the following step-by-step installation instructions to install the STORET Station Web Service on your Oracle 9iAS Release 2 version 9.0.3 server:

1.	Copy or use File Transfer Protocol (FTP) to place the STORET1-STORET1-WS.EAR and STATION_VIEW.sql files on the server (e.g., c:\STORET_WS), and make note of the directory location.

2.	Create the required STORET database view as user storetw:

	- 	Open the STATION_VIEW.sql file.  Edit the file for STORETW and STORETWEB passwords and database connect strings.
	
	- 	Open a SQL Plus session.
	
	- 	Set the current directory to the file location (e.g., c:\STORET_WS) by opening a file under that directory from within SQL Plus; any file will suffice.  This will ensure the log file is created in this directory; otherwise, the log file will be created in the \bin directory where SQL Plus is loaded.

	- 	Execute the file:

	-	@C:\STORET_WS\STORET_VIEW.sql;

3.	Login to Oracle 9iAS Oracle Enterprise Manager.

4.	Go to the Application Servers page.

5.	Select the Oracle 9iAS 9.0.3 instance.

6.	Ensure the Oracle Containers for J2EE (OC4J) home (i.e., OC4J_home) system component is up and running.

7.	Ensure the Hyper-Text Transfer Protocol (HTTP) Server system component is up and running.

8.	Select the OC4J_home system component.

9.	View the applications deployed under OC4J_home.

10.	Press <Deploy EAR File>.

11.	For Step 1, press <Next>.

12.	For Step 2, browse for the STORET1-STORET1-WS.EAR file on the hard drive.  Specify an application name (e.g., STORET-Stations).  Press <Next>.

13.	For Step 3, accept the default Uniform Resource Locator (URL) (i.e., STORET1-STORET1-context-root), but add a forward slash ("/") to the front of it.  Press <Next>.

14.	For Steps 4 through 7, press <Next>.

15.	For Step 8, press <Deploy>.

16.	The new application (e.g., STORET-Stations) should now be displayed in the list of deployed applications.

17.	Select the HTTP Server system component.  Press <Server Properties>.  Make note of the default port (e.g., 7777) for later use.


5.3	Server Configuration

Follow the instructions below to configure the deployed Web Service for use by your target database and application server.

Notes: 

 -	Be sure to backup each referenced file before making changes.

 -	You can use Notepad to open all files.

 -	Substitute items in italics with your specific directory names.  If using an OC4J instance other than OC4J_home, then replace all "home" directory references accordingly.    

1.	From Windows Explorer, navigate to the Oracle9iAS 9.0.3 Home\j2ee\home\application-deployments\new application name directory.  Open the data-sources.xml file.  Make the following changes and save the file:

	- 	Change the password value to reflect the target database STORETWEB password.

	-	Change the "olympus.sdc-moses.com:1521:STORET" URL reference to reflect the target database machine name, port number, and System Identifier (SID).

2.	From the same directory, open the data-sources.xml.smibak file.  Make the same changes as noted in step 1 above and save the file.

3.	Navigate to the Oracle9iAS 9.0.3 Home\j2ee\home\applications\new application name\META-INF directory.  Open the data-sources.xml file.  Make the same changes as noted in step 1 above and save the file.

4.	Navigate to the Oracle9iAS 9.0.3 Home\j2ee\home\applications\new application name\WebServices\WEB-INF\classes directory.  Open the connections.xml file.  Make the following changes under the first "connection" element and save the file:

	- 	Change the JDBC_PORT tag content to the target database port.

	- 	Change the HOSTNAME tag content to the target database machine name.

	- 	Change the SID tag content to the target database SID.

	- 	Change the password tag content to the target database STORETWEB password.

5.	Navigate to the Oracle9iAS 9.0.3 Home\j2ee\home\applications\new application name\WebServices\WEB-INF\classes\stn\common directory.  Open the bc4j.xcfg file.  Make the following changes to the STORETWEB "ConnectionDefinition" section and save the file:

	-	Change the JDBC_PORT entry to the target database port.

	- 	Change the HOSTNAME entry to the target database machine name.

	- 	Change the SID entry to the target database SID.

	- 	Change the password entry to the target database STORETWEB password.

6.	Navigate to the Oracle9iAS 9.0.3 Home\j2ee\home\applications\new application name\WebServices\WEB-INF\classes\stn directory.  Open the stnModuleWS.wsdl file.  Go to the end of the file.  Update the "SOAP:address location" URL to change the "http://127.0.0.1:8888" portion to reflect the Oracle 9iAS server name and HTTP default port number (as noted in step 17 of the Web Service Installation above).

7.	Restart the OC4J_home system component.

8.	Test the web service in a browser:

	- 	Type in the URL for the web service: Oracle 9iAS server name:HTTP default port number/STORET1-STORET1-context-root/stn.StnModuleWS.  
	
	- 	Select the "getStation" service.
	
	- 	Provide minimum and maximum latitude and longitude input parameters.  
	
	- 	Press <Invoke>.   
	
	- 	The SOAP response should display the results of your database query in XML format.