

GetCustOrders Sample

====================



This sample specifies a default AppServer URL "AppServer://localhost/asbroker1",

and a default quantity of Customer records to retrieve as 5.  

It then calls the 4GL procedure GetCustOrds() and receives a ProDataGraph that 

contains three tables (Customer, Orders, and OrderLine) as well as the data 

relations between them.  The schema and row data from the resulting ProDataGraph 

is then displayed on the console.



The application uses the Progress Java Open Client to obtain Customers, 

Orders, and OrderLines records from an Progress AppServer that is 

connected to a sports2000 database





Steps to run the sample:  

======================== 



1) Run ProxyGen (Start->Programs->OpenEdge->Proxy Generator)

   a) Open the file CustOrders.xpxg found in: 

		<yourInstallDir>\samples\open4gl\java\AppService\GetCustOrders



   b) Select File->Generate and press OK. 

      This will generate the Java class files in 

	<yourInstallDir>\samples\open4gl\java\GetCustOrders\CustOrdersProxy



   	If your install directory is different than c:\Progress\OpenEdge, you 

        need to do the following changes before generating:



	- Select Tools->Change Propath

	  Change the propath component

		c:\Progress\OpenEdge\samples\open4gl\java\AppService

	  to:

		<yourInstallDir>\samples\open4gl\java\AppService



   	- Change the Output dir on the General tab of the Generate dialog to

		<yourInstallDir>\samples\open4gl\java\GetCustOrders



   c) Check the .log file to verify the generate was successful a WARNING

      message may indicate a problem.



2) Setup a Progress AppServer that is connected to a sports2000 database.



3) Copy the one .p file from the above AppService\GetCustOrders directory

   into a "GetCustOrders" directory under the AppServer's work directory 

   - typically C:\OpenEdge\WRK.



4) On the client system, make sure that the CLASSPATH contains the Open Client 

    Runtime Package (ex. <yourInstallDir>/java/o4glrt.jar). The CLASSPATH should

    also contain the current directory ".".



    The CLASSPATH also needs to contain:

		<yourInstallDir>/java/ext/common.jar

		<yourInstallDir>/java/ext/commonj.sdo.jar

		<yourInstallDir>/java/ext/ecore.jar

		<yourInstallDir>/java/ext/ecore.sdo.jar

		<yourInstallDir>/java/ext/ecore.change.jar

		<yourInstallDir>/java/ext/ecore.xmi.jar

		<yourInstallDir>/java/ext/ecore.resources.jar

		

	

5) Go to <yourInstallDir>\samples\open4gl\java\GetCustOrders directory.

   Compile the sample client code. The default AppServer supplied in the client 

   code is asbroker1. If this is not your AppServer, you may change it in 

   CustOrdClient.java.

	

   > javac CustOrdClient.java



6) You are now ready to run the client application.  



   > java CustOrdClient





