


CustomerOrders Sample


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





NOTE: This sample was updated for OpenEdge 10.1A, to be more consistent with


the other Java Open Client examples.





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


and a default Customer Number (6) to retrieve the Orders for that Customer in a 


temp-table.  The resulting Java ResultSet is then written to a file 


CustomerOrders.out with a timestamp indicating when the data was retrieved.





The application uses the Progress Java Open Client to obtain Order records from


a 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 CustomerOrders.xpxg





    b) Select File -> Generate and press OK.


       This will generate Java class files in:


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





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


        need to make 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\CustomerOrders





    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\CustomerOrders directory


    into a "CustomerOrders" 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 ".".


    


5)  Go to the <yourInstallDir>\samples\open4gl\java\CustomerOrders 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 CustomerOrdersClient.java





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





    > java CustomerOrdersClient








