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

This sample application demonstrates how to send Web Service requests
and process Web Service responses that contain TABLE-HANDLE parameters.
Dynamic TEMP-TABLES require an XML Schema along with the XML representing the data.
The Web Service client must create the XML containing the schema and data
for the SOAP request, and must parse the schema and data in the SOAP response.

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-Free, Document/Literal DynTT 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 
   CustOrders 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
        - Deploy and start the OpenEdge CustOrders Web service

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

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

   The CLASSPATH also needs to contain:
		<DLC-DIR>/java/ext/xmlParserAPIs.jar
		<DLC-DIR>/java/ext/xercesImpl.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/DynTempTable/Java_client


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

   DynTT.java 	         Main Client class

   RowSet.java	         A class containing the Java representation of a Dynamic TEMP-TABLE

   ColumnMetaData.java
		         A class containing the metadata for a row in the Dynamic TEMP-TABLE
                         An array of ColumnMetaData objects represents the schema
                         for the Dynamic TEMP-TABLE (RowSet.java's m_schema member).
   SchemaParser.java
		         A class for parsing the XML Schema from a SOAP Response containing an
                     	 OUTPUT or INPUT-OUTPUT TABLE-HANDLE.  SchemaParser creates a 
                         ColumnMetaData[] based on the XML Schema.

   Proxy Code:
   ----------
   DynTT/* 
   DynTTSvc/*
   details/*	         All proxy files under these directories were 
			 generated by running the AXIS WSDL2Java 
			 utility on DynTT.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 DynTT.wsdl from OE_webservice to your test directory. 
   Run the following AXIS WSDL2Java utility to generate the proxies.

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

6. If you generated the proxies yourself (step #5), you must now compile them.
   On the client system, go to your test directory, and compile all your 
   client code and proxy code by entering the following command:

   > javac *.java

7. You are now ready to access the DynTempTable Web Service.

   This sample application demonstrates Web Service client code that makes
   requests to the DynTempTable Web Service with a session-free AppServer.
   A session-free model AppServer is used since connection context does
   not need to be maintained between calls to the Web Service.
   For more details, see the client code mentioned above.

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

   > java DynTT  [ wsa-instance-url ]

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



 
