Tuscany SCA for C++ Samples - RubyBank Sample
This sample implements the "Simplified RubyBank" scenario. A whitepaper describing
the scenario based on the SCA 0.9 Assembly specification can be found
here.
This sample uses multiple Ruby components, calls out to an external Web Service via a reference
and exposes the service as a Web Service.
There are two sub projects in this workspace:
- bigbank.account
This contains the source code and SCDL artifacts for the SCA RubyBank
composite implementing the account services.
- bigbank.client
A sample client which does a local call to the RubyBank service.
Additionally, there is the bigbank.accountmanagement.composite file. This
describes the configuration of the SCA Calculator composite deployed to the SCA
runtime.
Building the C++ 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.94>
- As the RubyBank sample is based on Ruby scripts, a specific compilation step is not necessary -
only deployment is required. Deploy the Ruby samples only with the following command sequence:
- cd <tuscany_sca_install_dir>/samples
- ./configure --enable-ruby --enable-cpp=no --prefix=$TUSCANY_SCACPP
- make install
NOTE: If you don't provide the --prefix configure option, it will by default install into
/usr/local/tuscany/sca/samples/RubyBank
Running the RubyBank sample on Linux
RubyBank 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/RubyBank/deploy/bigbank.client
- ./runclient.sh
RubyBank with Web Service clients
- Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions
found here.
- Start the Axis2C simple http server:
- 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.94>
- cd <tuscany_sca_install_dir>/samples/RubyBank/deploy/bigbank.account
- ./runwsserver.sh
- The Web Service client and PHP web client detailed in the
BigBank sample can both be used
with the RubyBank service that is served by the Axis2C http server started above.
Building the RubyBank sample 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.94>
- As this sample is based on Ruby scripts, a specific compilation step is not necessary -
only deployment is required. Deploy the sample with the following commands:
- cd <tuscany_sca_install_dir>/samples/RubyBank
- ./deploy.cmd
Running the RubyBank sample on Windows
RubyBank 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.94>
- Run the sample with the following commands:
- cd <tuscany_sca_install_dir>/samples/RubyBank/deploy/bigbank.client
- ./runclient.bat
RubyBank with Web Service clients
- Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions
found here.
- Start the Axis2C simple http server:
- 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.94>
- cd <tuscany_sca_install_dir>/samples/RubyBank/deploy/bigbank.account
- ./runwsserver.bat
- The Web Service client and PHP web client detailed in the
BigBank sample can both be used
with the RubyBank service that is served by the Axis2C http server started above.