Callback Demo
=============

This demo shows a client creating a callback object by passing an 
EndpointReferenceType to a server. The server then uses the EndpointRefrenceType 
to call back on the callback object.

Please review the README in the samples directory before continuing.



Prerequisite
------------

$SUBSTITUTE_PREREQ$


Building and running the demo using ant
---------------------------------------

From the samples/basic_callback directory, use the following commands to build 
and run the demo on either UNIX or Windows:

  ant build
  ant server
  ant client   

To remove the code generated from the WSDL file and the .class files, run:

  ant clean



Building the demo using wsdl2java and javac
-------------------------------------------

From the samples/basic_callback directory, first create the target directory 
build/classes and then generate code from the WSDL file.

For UNIX:
  mkdir -p build/classes

  $THE_TOOL$ wsdl2java -d build/classes -compile ./wsdl/basic_callback.wsdl

For Windows:
  mkdir build\classes
    (You must use backslashes.)

  $THE_TOOL$ wsdl2java -d build\classes -compile .\wsdl\basic_callback.wsdl
    (Use either forward or backslashes.)

Now compile the client and server applications with the following commands:

For UNIX:  
  
  export CLASSPATH=$CLASSPATH:./build/classes
  javac -d build/classes src/demo/callback/client/*.java
  javac -d build/classes src/demo/callback/server/*.java

For Windows:

  set classpath=%classpath%;.\build\classes
  javac -d build\classes src\demo\callback\client\*.java
  javac -d build\classes src\demo\callback\server\*.java



Running the demo using java
---------------------------

From the samples/basic_callback directory run the commands, entered on a single 
command line:

For UNIX (you must use forward slashes):

    java -Djava.util.logging.config.file=$$SUBSTITUTE_HOME$/etc/logging.properties
         demo.callback.server.Server &

    java -Djava.util.logging.config.file=$$SUBSTITUTE_HOME$/etc/logging.properties
         demo.callback.client.Client ./wsdl/basic_callback.wsdl

The server process starts in the background. After running the client,
use the kill command to terminate the server process.

For Windows (use either forward or backslashes):

  start 
    java -Djava.util.logging.config.file=%$SUBSTITUTE_HOME$%\etc\logging.properties
         demo.callback.server.Server

    java -Djava.util.logging.config.file=%$SUBSTITUTE_HOME$%\etc\logging.properties
       demo.callback.client.Client .\wsdl\basic_callback.wsdl

A new command windows opens for the server process. After running the client, 
terminate the server process by issuing Ctrl-C in its command window.

