ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | celtix List | November 2005 Index

<--  Date Index  --> <--  Thread Index  -->

FW: Revised Demo README Files


Hurray, first contribution :)
Thank you very much for your help John.
 
We will review your README's and make sure they get incorporated into the product.
 
Btw, Anybody willing to try these instructions on UNIX using Milestone 2A?
 
regards,
Adi
-----Original Message-----
From: Lifter, John
Sent: Friday, November 11, 2005 12:24 PM
To: celtix-dev@xxxxxxxxxxxxx
Subject: [celtix-dev] Revised Demo README Files

I’ve reworked the README files so that the demos can be built and run using either ant or the command line entries wsdl2java, javac, and java.

 

I’ve also suggested that users create an environment script to insure that the CLASSPATH and other environment settings are correct for the command line approach.  The environment script is also applicable if the user has other JDK installations and does not want to set JAVA_HOME and the various PATH entries at the global level.

 

Attached are four README files.  When added to the product distribution, these files should be renamed README and placed into the appropriate demo directories.

 

            README_samples.txt discusses general topics related to all the demos and describes the content of the environment script.  It should be in the samples directory.

            README_handlers is the reworked README for the handlers demo.

            README_hw is the reworked README for the hello world demo.

            README_hwRPCLit is the reworked README for the hello world RPCLit demo.

 

I’ve tested the step-by-step instructions on Windows but not on UNIX.

 

 

Basic Setup for Building and Running the Demos
==============================================

As described in the installation notes, extract the Celtix
binary distribution archive into an installation directory
under the root drive.  This creates the sub-directory celtix,
which includes all of the product directories.

To build and run the demos, you must install the J2SE Development
Kit (JDK) 5.0

If you want to use ant to build and run the demos, you must
install the Apache ant 1.6 build utility.

To build and run the demos provided in the Celtix binary
distribution using either ant or wsdl2java, javac and java,
you need to set the environment so that the file celtix.jar
is on the CLASSPATH and to insure that the JDK, ant and
Celtix bin directories are on the PATH.

In each of the demos, source code files for the client and
server mainlines and the Service Endpoint Interface class are
included in the src directory.  The build process will write
generated code into a new directory, build/src, and then place
compiled code into the directory build/classes.

You may find it convenient to use a script to set the required
environment variables.

For UNIX:
  CELTIX_HOME=/<installation_directory>/celtix
  JAVA_HOME=/<jdk_installation_directory>
  ANT_HOME=/<ant_installation_directory>/apache-ant-1.6.5

  export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$CELTIX_HOME/bin:$PATH
  export CLASSPATH=.:$CELTIX_HOME/lib/celtix.jar:./build/classes

For Windows:
  set CELTIX_HOME=C:\<installation_directory>\celtix
  set JAVA_HOME=C:\<jdk_installation_directory>
  set ANT_HOME=C:\<ant_installation_directory>\apache-ant-1.6.5

  set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%CELTIX_HOME%\bin;%PATH%
  set CLASSPATH=.;%CELTIX_HOME%\lib\celtix.jar;.\build\classes

Save a copy of this script in the Celtix samples directory.  Run the
script prior to building and running the demos.
Handler Demo
============

This demo shows how the JAXWS handlers can be used.  The server
registers a SOAP protocol handler which simply logs incoming and
outgoing messages to the console.  

The server code registers a handler using the @HandlerChain
annotation on the service implementation class. For this demo, the
handler is SOAPHandler that logs the SOAP message to stdout.

The client includes a logical handler that checks the parameters on
outbound requests and short-circuits the invocation in certain
circumstances.

Please review the README in the samples directory before
continuing.



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

If your environment already includes celtix.jar on the
CLASSPATH, and the JDK and ant bin directories on the PATH
it is not necessary to run the environment script described in
the samples directory README.  If your environment is not
properly configured, or if you are planning on using wsdl2java,
javac, and java to build and run the demos, you must set the
environment by running the script.



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

From the samples/handlers directory, the ant build script can
be used to build and run the demo.  The server and client
targets automatically build the demo.

Using either UNIX or Windows:

  ant server  (in the background or another window)
  ant client
        

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

  ant clean



Buildng the demo using wsdl2java and javac
------------------------------------------

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

For UNIX:
  mkdir -p build/classes

  wsdl2java -d build/classes ./wsdl/addNumbers.wsdl

For Windows:
  mkdir build\classes
    Must use back slashes.

  wsdl2java -d build\classes .\wsdl\addNumbers.wsdl

    May use either forward or back slashes.

Now compile both the generated code and the provided client and
server applications with the commands:

  javac -d build/classes src/demo/handlers/common/*.java
  javac -d build/classes src/demo/handlers/client/*.java
  javac -d build/classes src/demo/handlers/server/*.java

Windows may use either forward or back slashes.

Finally, copy the demo_handlers.xml file from the 
src/demo/handlers/common directory into the
build/classes/demo/handlers/common directory.

For UNIX:
  cp ./src/demo/handlers/common/demo_handlers.xml 
./build/classes/demo/handlers/common

For Windows:
  copy src\demo\handlers\common\demo_handlers.xml 
build\classes\demo\handlers\common



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

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

For UNIX (must use forward slashes):
    java -Djava.util.logging.config.file=$CELTIX_HOME/etc/logging.properties
         -Dcatalina.home=../../lib/tomcat/5.5.9/ 
         demo.handlers.server.Server &

    java -Djava.util.logging.config.file=$CELTIX_HOME/etc/logging.properties
         demo.handlers.client.Client ./wsdl/addNumbers.wsdl

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

For Windows (may use either forward or back slashes):
  start 
    java -Djava.util.logging.config.file=%CELTIX_HOME%\etc\logging.properties
         -Dcatalina.home=..\..\lib\tomcat\5.5.9\ 
         demo.handlers.server.Server

    java -Djava.util.logging.config.file=%CELTIX_HOME%\etc\logging.properties
       demo.handlers.client.Client .\wsdl\addNumbers.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.

To remove the code generated from the WSDL file and the .class
files, either delete the build directory and its contents or run:

  ant clean
Hello World Demo using Document/Literal Style
=============================================

Yes, it's the ever present Hello World demo.  No product is
complete without one.

Please review the README in the samples directory before
continuing.



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

If your environment already includes celtix.jar on the
CLASSPATH, and the JDK and ant bin directories on the PATH
it is not necessary to run the environment script described in
the samples directory README.  If your environment is not
properly configured, or if you are planning on using wsdl2java,
javac, and java to build and run the demos, you must set the
environment by running the script.



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

From the samples/hello_world directory, the ant build script
can be used to build and run the demo.

Using either UNIX or Windows:

  ant build
  ant server  (in the background or another window)
  ant client
        

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

  ant clean



Buildng the demo using wsdl2java and javac
------------------------------------------

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

For UNIX:
  mkdir -p build/classes

  wsdl2java -d build/classes ./wsdl/hello_world.wsdl

For Windows:
  mkdir build\classes
    Must use back slashes.

  wsdl2java -d build\classes .\wsdl\hello_world.wsdl
    May use either forward or back slashes.

Now compile both the generated code and the provided client and
server applications with the commands:

  javac -d build/classes src/demo/hw/client/*.java
  javac -d build/classes src/demo/hw/server/*.java

Windows may use either forward or back slashes.



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

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

For UNIX (must use forward slashes):
    java -Djava.util.logging.config.file=$CELTIX_HOME/etc/logging.properties
         -Dcatalina.home=../../lib/tomcat/5.5.9/ 
         demo.hw.server.Server &

    java -Djava.util.logging.config.file=$CELTIX_HOME/etc/logging.properties
         demo.hw.client.Client ./wsdl/hello_world.wsdl

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

For Windows (may use either forward or back slashes):
  start 
    java -Djava.util.logging.config.file=%CELTIX_HOME%\etc\logging.properties
         -Dcatalina.home=..\..\lib\tomcat\5.5.9\ 
         demo.hw.server.Server

    java -Djava.util.logging.config.file=%CELTIX_HOME%\etc\logging.properties
       demo.hw.client.Client .\wsdl\hello_world.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.

To remove the code generated from the WSDL file and the .class
files, either delete the build directory and its contents or run:

  ant clean
Hello World Demo using RPC-Literal Style
========================================

Yes, it's the ever present Hello World demo.  No product is 
complete without one.  However, this version demonstrates use
of the RPC-Literal style binding.

Please review the README in the samples directory before
continuing.



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

If your environment already includes celtix.jar on the
CLASSPATH, and the JDK and ant bin directories on the PATH
it is not necessary to run the environment script described in
the samples directory README.  If your environment is not
properly configured, or if you are planning on using wsdl2java,
javac, and java to build and run the demos, you must set the
environment by running the script.



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

From the samples/hello_world_RPCLit directory, the ant build script
can be used to build and run the demo.

Using either UNIX or Windows:

  ant build
  ant server  (in the background or another window)
  ant client
        

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

  ant clean



Buildng the demo using wsdl2java and javac
------------------------------------------

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

For UNIX:
  mkdir -p build/classes

  wsdl2java -d build/classes ./wsdl/hello_world_RPCLit.wsdl

For Windows:
  mkdir build\classes
    Must use back slashes.

  wsdl2java -d build\classes .\wsdl\hello_world_RPCLit.wsdl
    May use either forward or back slashes.

Now compile both the generated code and the provided client and
server applications with the commands:

  javac -d build/classes src/demo/hwRPCLit/client/*.java
  javac -d build/classes src/demo/hwRPCLit/server/*.java

Windows may use either forward or back slashes.



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

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

For UNIX (must use forward slashes):
    java -Djava.util.logging.config.file=$CELTIX_HOME/etc/logging.properties
         -Dcatalina.home=../../lib/tomcat/5.5.9/ 
         demo.hwRPCLit.server.Server &

    java -Djava.util.logging.config.file=$CELTIX_HOME/etc/logging.properties
         demo.hwRPCLit.client.Client ./wsdl/hello_world.wsdl

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

For Windows (may use either forward or back slashes):
  start 
    java -Djava.util.logging.config.file=%CELTIX_HOME%\etc\logging.properties
         -Dcatalina.home=..\..\lib\tomcat\5.5.9\ 
         demo.hwRPCLit.server.Server

    java -Djava.util.logging.config.file=%CELTIX_HOME%\etc\logging.properties
       demo.hwRPCLit.client.Client .\wsdl\hello_world_RPCLit.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.

To remove the code generated from the WSDL file and the .class
files, either delete the build directory and its contents or run:

  ant clean
--
You receive this message as a subscriber of the celtix-dev@xxxxxxxxxxxxx 
mailing list.
To unsubscribe: mailto:celtix-dev-unsubscribe@xxxxxxxxxxxxx
For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.