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.

  1. 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>
  2. 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

  1. 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>
  2. Run the sample with the following commands:
    • cd <tuscany_sca_install_dir>/samples/RubyBank/deploy/bigbank.client
    • ./runclient.sh

RubyBank with Web Service clients

  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions found here.
  2. Start the Axis2C simple http server:
    1. 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>
    2. cd <tuscany_sca_install_dir>/samples/RubyBank/deploy/bigbank.account
    3. ./runwsserver.sh
  3. 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.

  1. 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>
  2. 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

  1. 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>
  2. Run the sample with the following commands:
    • cd <tuscany_sca_install_dir>/samples/RubyBank/deploy/bigbank.client
    • ./runclient.bat

RubyBank with Web Service clients

  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions found here.
  2. Start the Axis2C simple http server:
    1. 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>
    2. cd <tuscany_sca_install_dir>/samples/RubyBank/deploy/bigbank.account
    3. ./runwsserver.bat
  3. 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.

Getting Help

First place to look is at the Tuscany FAQ at http://incubator.apache.org/tuscany/faq.html

Any problem with this release can be reported to the Tuscany mailing lists or create a JIRA issue at http://issues.apache.org/jira/browse/Tuscany.