Tuscany Samples - Getting Started - SCA C++ Milestone release 1
Tuscany SCA C++ includes a simple technology sample that demonstrates some of the functionality of
the Tuscany SCA C++ runtime. This page describes what is needed to install and run the sample.
Building the samples on Linux
If using the binary distribution the samples are built and installed in
<tuscany_sca_install_dir>/samples - go directly to Running the samples on Linux.
- The following environment variables are required:
- TUSCANY_SCACPP=<path to installed Tuscany SCA>
- TUSCANY_SDOCPP=<path to installed Tuscany SDO>
- AXIS2C_HOME=<path to axis2c version 0.92>
- Build the source with the following command sequence:
- cd <tuscany_sca_install_dir>/samples
- ./configure
- make
- make install
NOTE: If you don't provide a --prefix configure option, it will by default install into
/usr/local/tuscany/sca/samples/Calculator
Running the samples on Linux
Calculator with basic client
- The following environment variables are required:
- TUSCANY_SCACPP=<path to installed Tuscany SCA>
- TUSCANY_SDOCPP=<path to installed Tuscany SDO>
- AXIS2C_HOME=<path to axis2c version 0.92>
- Run the sample with the following commands:
- cd <tuscany_sca_install_dir>/samples/Calculator/deploy/bin
- ./runclient.sh
Calculator with Web Service client
- Deploy the Calculator as an Axis2C service:
- Create a new service folder in axis2:
<AXIS2C_HOME>/services/Calculator
- Copy the <TUSCANY_SCACPP>/samples/Calculator/CalculatorModule/services.xml
to <AXIS2C_HOME>/services/Calculator/services.xml
- Edit the <AXIS2C_HOME>/services/Calculator/services.xml file to set the TuscanySystemRoot parameter to
<parameter name="TuscanySystemRoot" locked="xsd:false"><tuscany_sca_install_dir>/samples/Calculator/deploy</parameter>
replacing <tuscany_sca_install_dir> with the install path of Tuscany SCA
- Copy the <TUSCANY_SCACPP>/lib/libtuscany_sca_ws_service.so library into <AXIS2C_HOME>/services/Calculator
- Start the Axis2C simple http server:
- cd <AXIS2C_HOME>/bin
- The following environment variables are required:
- TUSCANY_SCACPP=<path to installed Tuscany SCA>
- TUSCANY_SDOCPP=<path to installed Tuscany SDO>
- AXIS2C_HOME=<path to axis2c version 0.92>
- Add <TUSCANY_SCACPP>/lib, <TUSCANY_SDOCPP>/lib and <AXIS2C_HOME>/lib
to the LD_LIBRARY_PATH environment variable
- ./axis2_http_server
- Run the client:
- The following environment variable is required:
- AXIS2C_HOME=<path to axis2c version 0.92>
- cd <tuscany_sca_install_dir>/samples/Calculator/deploy/bin
- ./runwsclient.sh
Building the samples on Windows
If using the binary distribution the samples are built and installed in
<tuscany_sca_install_dir>/samples - go directly to Running the samples on Windows.
- The following environment variables are required:
- TUSCANY_SCACPP=<path to installed Tuscany SCA>
- TUSCANY_SDOCPP=<path to installed Tuscany SDO>
- AXIS2C_HOME=<path to axis2c version 0.92>
- You must have set up the environment for Microsoft Visual C++ tools.
The build command will call vcvars32 to set the environment. Ensure the
directory containing this is on your path. This will be where you
installed the compiler.
- Build the source, either via the Visual Studio 6 or 7 projects under
<tuscany_sca_install_dir>\samples\ides or via the command-line build file
found at <tuscany_sca_install_dir>\samples\ides\devstudio6\projects\Calculator\build.cmd
which will build and deploy the samples.
Running the samples on Windows
Calculator with basic client
- The following environment variables are required:
- TUSCANY_SCACPP=<path to installed Tuscany SCA>
- TUSCANY_SDOCPP=<path to installed Tuscany SDO>
- AXIS2C_HOME=<path to axis2c version 0.92>
- Run the sample with the following commands:
- cd <tuscany_sca_install_dir>/samples/Calculator/deploy/bin
- runclient add 5 6
(can also use sub, div, mul).
Calculator with Web Service client
- Deploy the Calculator as an Axis2C service:
- Create a new service folder in axis2:
<AXIS2C_HOME>/services/Calculator
- Copy the <TUSCANY_SCACPP>/samples/Calculator/CalculatorModule/services.xml
to <AXIS2C_HOME>/services/Calculator/services.xml
- Edit the <AXIS2C_HOME>/services/Calculator/services.xml file to set the TuscanySystemRoot parameter to
<parameter name="TuscanySystemRoot" locked="xsd:false"><TUSCANY_SCACPP>/samples/Calculator/deploy</parameter>
replacing <TUSCANY_SCACPP> with the install path of Tuscany SCA
- Copy the <TUSCANY_SCACPP>/lib/tuscany_sca_ws_service.dll (and .pdb if debugging) file(s)
into <AXIS2C_HOME>/services/Calculator
- Start the Axis2C simple http server:
- cd <AXIS2C_HOME>/bin
- The following environment variables are required:
- TUSCANY_SCACPP=<path to installed Tuscany SCA>
- TUSCANY_SDOCPP=<path to installed Tuscany SDO>
- AXIS2C_HOME=<path to axis2c version 0.92>
- Add <TUSCANY_SCACPP>\bin, <TUSCANY_SDOCPP>\bin and <AXIS2C_HOME>/lib
to the PATH environment variable
- axis2_http_server
- Run the client:
- The following environment variable is required:
- AXIS2C_HOME=<path to axis2c version 0.92>
- cd <tuscany_sca_install_dir>/samples/Calculator/deploy/bin
- runwsclient