
Running the Apache AXIS Sample Java Client Application
For the OrderInfo sample
-------------------------------------------------------

This sample application provides customer and order information 
from the sports2000 database.  It demonstrates the use of static
TEMP-TABLES, connecting to the AppServer, and the use of SOAP Headers 
in a session-managed environment.

The sample Apache AXIS Java client was developed using Apache AXIS 1.4. 
In order to build and run these examples, you will need to download AXIS 
from http://ws.apache.org/axis/. The release 1.4 
axis-bin-1_4.tar.gz or axis-bin-1_4.zip binary distribution can be used.

This sample uses the WSDL file generated by deploying the OpenEdge
Session-Managed, Document/Literal OrderInfo Web service.
  
A WSDL file is provided with this example in the OE_webservice 
directory. The Web Service client developer uses the WSDL document to determine 
the functionality provided by the Web Service. With AXIS, the client developer 
uses the AXIS WSDL2Java utility to generate proxies based on the WSDL. 
These proxies are used as the interface to the Web service. The client 
developer then writes his/her application utilizing the proxies to make 
requests of the Web service.

To run the AXIS Java sample application:

1. In order to run the sample client that communicates with the 
   OrderInfo Web service application, you must perform the following tasks 
   in order to configure and deploy the Web Service in the WSA environment:
        - Install and Configure a JSE
        - Install the WSA
        - Configure the WSA
        - Start the OpenEdge OrderInfo Web service

   For details see README.txt located in 
       <DLC-DIR>/src/samples/webservices/OrderInfo

2. On the client system, make sure that the CLASSPATH contains the following
   AXIS files in order to run AXIS 1.0 client code:
		<AXIS_HOME-DIR>/lib/wsdl4j-1.5.1.jar
		<AXIS_HOME-DIR>/lib/commons-logging-1.0.4.jar
		<AXIS_HOME-DIR>/lib/commons-discovery-0.2.jar
		<AXIS_HOME-DIR>/lib/jaxrpc.jar
		<AXIS_HOME-DIR>/lib/axis.jar
		<AXIS_HOME-DIR>/lib/saaj.jar
		<AXIS_HOME-DIR>/lib/log4j-1.2.8.jar

3. On the client system, create a test directory; add it to the CLASSPATH.

4. On the client system, copy the following java files (as well as their class
   files) from the Java_client directory to your test directory.
   The specified files and directories can be found in this directory:
	<DLC-DIR>/src/samples/webservices/OrderInfo/Java_client
    

   Client Code:
   -----------

   OrderInfo.java            Client application code

   PscObjectIDHandler.java   Helper class for the Apache Axis 
			     session-managed client. Enables you to work 
			     with the SOAP Headers sent and received from 
			     the OpenEdge WSA. In the session-managed model, 
			     the WSA returns an Object-ID in the SOAP 
			     header of a connect message. This Object-ID  
			     header then needs to be inserted in all 
			     subsequent SOAP messages.

   HandlerControlBlock.java  Helper class. Command and data interface 
			     between the Web Service client application and a
			     registered PscObjectIDHandler. 


   Proxy Code:
   ------------

   CustomerOrder/*
   OrderInfoSvc/*
   details/*          
                             All proxy files under these directories
   			     (and all subdirectories) were generated by running
			      the AXIS WSDL2Java utility on OrderInfo.wsdl.
	
			     WSDL2Java creates java packages according to 
			     the Target Namespace value specified, so 
			     these directories are created in the current 
			     directory with the proxy .java files in them.

			     (If you want to generate the proxies yourself,  
			      see step #5.)


5. On the client system, you can copy the proxies from step #4 above
   to your test directory, or generate them yourself by doing the following:

   First copy OrderInfo.wsdl from OE_webservice to your test directory. 
   Then run the following AXIS WSDL2Java utility to generate the proxies.

   > java org.apache.axis.wsdl.WSDL2Java OrderInfo.wsdl
		    		     


6. If you generated the proxies yourself (step #5), you must now compile them.
   On the client system, make sure that your PATH includes your Java executables.
   Go to your test directory, and compile all your client code and proxy code 
   by entering the following command. (You only need to do this if you have 
   generated your own proxies in step 5.)

   > javac *.java

7. You are now ready to access the OrderInfo Web service.

   This sample application demonstrates Web service client code that 
   connects to the AppServer. It also demonstrates how the helper classes 
   PscObjectIDHandler.java and HandlerControlBlock.java can be used for passing 
   the Web service application's object identifiers back and forth between the SOAP 
   Header handler and the client application. It makes calls to OrderInfo 
   Web service methods such as orderInfo.findCustomerByNum() and 
   custOrder.getTotalOrdersByNumber() as well as custOrder.getOrderDetails()
   which demonstrates how client code can request TEMP-TABLEs from a 
   Web service. For more details, see OrderInfo.java.

   Run the sample by entering a command with the following syntax:

   > java OrderInfo  [ wsa-instance-url ]


   You only need to specify the url parameter to override the existing 
   value (http://localhost:8080/wsa/wsa1).




 
