Follow the instructions in this section to build and run the CXF standalone demonstration. These instructions assume that you have already configured your environment as described in Before You Start .
Build the standalone demonstration as follows:
Open a command prompt and change directory to CeltixInstallDir/samples/service_creation/hello_world.
Enter the following command to build the demonstration:
ant build
The command produces output similar to the following:
Buildfile: build.xml
maybe.generate.code:
generate.code:
[echo] Generating code using wsdl2java...
[mkdir] Created dir: C:\Programs\Celtix\samples\service_creation\hello_world\build\classes
[mkdir] Created dir: C:\Programs\Celtix\samples\service_creation\hello_world\build\src
[java] wsdl2java -verbose -d C:\Programs\Celtix\samples\service_creation\hello_world\build\
src C:\Programs\Celtix\samples\service_creation\hello_world\wsdl/hello_world.wsdl
[java] wsdl2java - 2.0-M1-IONA-SNAPSHOT
[touch] Creating C:\Programs\Celtix\samples\service_creation\hello_world\build\src\.CODEGEN_
DONE
compile:
[javac] Compiling 16 source files to C:\Programs\Celtix\samples\service_creation\hello_world
\build\classes
build:
BUILD SUCCESSFUL
Total time: 6 seconds
Building the demonstration consists essentially of two steps:
Generating stub code from the hello_world.wsdl file, using the wsdl2java utility.
Compiling the application code and the WSDL stub code using the javac compiler.
Run the standalone server as follows:
Enter the following command from within the samples/service_creation/hello_world directory in order to run the server:
ant server
The command produces output similar to the following:
Buildfile: build.xml
maybe.generate.code:
compile:
build:
server:
[java] Starting Server
[java] Server ready...
Run the client as follows:
Open a new command prompt and change directory to CeltixInstallDir/samples/service_creation/hello_world.
Enter the following command to run the client:
ant client
The command produces output similar to the following:
Buildfile: build.xml
maybe.generate.code:
compile:
build:
client:
[java] file:/C:/Programs/Celtix/samples/service_creation/hello_world/wsdl/hello_world.wsdl
[java] Invoking sayHi...
[java] Server responded with: Bonjour
[java] Invoking greetMe...
[java] Server responded with: Hello fbolton
[java] Invoking greetMe with invalid length string, expecting
exception...
[java] Invoking greetMeOneWay...
[java] No response from server as method is OneWay
[java] Invoking pingMe, expecting exception...
[java] Expected exception: PingMeFault has occurred: PingMeFault
raised by
server
[java] FaultDetail major:2
[java] FaultDetail minor:1
BUILD SUCCESSFUL
Total time: 3 seconds