From bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a Mon Sep 17 00:00:00 2001 From: dims Date: Tue, 17 Jun 2008 00:23:01 +0000 Subject: Move Tuscany from Incubator to top level. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/samples/BigBank/README.html | 427 +++++++++++++++++++++ 1 file changed, 427 insertions(+) create mode 100644 tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/README.html (limited to 'tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/README.html') diff --git a/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/README.html b/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/README.html new file mode 100644 index 0000000000..597d05de67 --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/README.html @@ -0,0 +1,427 @@ + + + + + + + + + + + + Tuscany SCA for C++ Samples - BigBank Sample + + + +
+
+
+

Tuscany SCA for C++ Samples - BigBank Sample

+ +

This sample implements the "Simplified BigBank" scenario. A whitepaper describing + the scenario based on the SCA 0.9 Assembly specification can be found + here. + This sample uses multiple C++ components, calls out to an external Web Service via a reference, + exposes the service as a Web Service and also provides a PHP based client. +

+

There are four sub projects in this workspace:

+
    +
  • bigbank.account
    + This contains the source code and SCDL artifacts for the SCA BigBank + composite implementing the account services. +
  • +
  • bigbank.client
    + A sample client which does a local call to the BigBank service. +
  • +
  • bigbank.wsclient
    + A sample Axis2 Web Service client which calls the BigBank Web service. +
  • +
  • bigbank.phpclient
    + A sample PHP client which calls the BigBank Web service and then deconstructs + and displays the result by using the + SDO for PHP extension. +

    This is a pair of very simple PHP scripts to demonstrate how the Accounts service + that the C++ Big Bank sample exposes can be used from within the PHP scripting + language. +

    +

    bigwelcome.php
    + A bootstrap script that shows a form and allows the user to press a button + in order to invoke the bigaccount.php script +

    +

    bigaccount.php
    + Makes a call to a locally installed BigBank Accounts service. The script + shows how to use PHP SDO and SOAP extensions to construct the call + and interpret the result. +

    +
  • +
+

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. + +
  3. Build the C++ samples with the following command sequence: +
      +
    • cd <tuscany_sca_install_dir>/samples
    • +
    • ./configure --prefix=$TUSCANY_SCACPP --enable-static=no
    • +
    • make
    • +
    • make install
    • +
    + NOTE: If you don't provide the --prefix configure option, it will by default install into + /usr/local/tuscany/sca/samples/BigBank
  4. +
+
+ +
+

Running the BigBank sample on Linux

+

BigBank 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. +
  3. Run the sample with the following commands: +
      +
    • cd <tuscany_sca_install_dir>/samples/BigBank/deploy/bigbank.client
    • +
    • ./runclient.sh
    • +
    +
  4. +
+

BigBank with Web Service client

+
    +
  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions + found here. +
  2. +
  3. 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. +
    3. cd <tuscany_sca_install_dir>/samples/BigBank/deploy/bigbank.account +
    4. +
    5. ./runwsserver.sh
    6. +
    +
  4. +
  5. Run the client: +
      +
    1. The following environment variable is required: +
        +
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • +
      +
    2. +
    3. cd <tuscany_sca_install_dir>/samples/BigBank/deploy/bigbank.wsclient
    4. +
    5. ./runwsclient.sh
    6. +
    +
  6. +
+

BigBank with PHP web client

+
    +
  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions + found here. +
  2. +
  3. 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. +
    3. cd <tuscany_sca_install_dir>/samples/BigBank/deploy/bin +
    4. +
    5. ./runwsserver.sh
    6. +
    +
  4. +
  5. To run the php scripts requires some configuration and setup of a php runtime with + the SDO and SimpleXML extensions enabled. The bits you will need are: + +

    Follow + these instructions to + install SDO and DAS. +

    +
  6. +
  7. You need to configure Apache to run PHP of course. This is well documented but this + is what to put at the end of httpd.conf: +
    # PHP5 Support
    +LoadModule php5_module "/home/php/php5.1.6/php5apache2.so"
    +AddType application/x-httpd-php .php
    +
    +# configure the path to php.ini
    +PHPIniDir "/home/php/php5.1.6"
    +
  8. +
  9. Copy the <tuscany_sca_install_dir>/samples/BigBank/bigbank.phpwsclient + directory to your Apache document root directory (by default this is named 'htdocs'). +
  10. +
  11. Finally, start your Apache web server. +
  12. +
  13. Run the PHP web client by pointing your browser at + http://localhost/bigbank.phpwsclient/welcome.php. + You should now be able to press the "GetAccount" button and see the values + returned from the BigBank SCA application. +
  14. + +
+
+ +
+

Building the BigBank 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. + +
  3. 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. +
  4. +
  5. 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\BigBank\build.cmd + which will build and deploy the samples. +
  6. +
+
+ +
+

Running the BigBank sample on Windows

+

BigBank 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. +
  3. Run the sample with the following commands: +
      +
    • cd <tuscany_sca_install_dir>\samples\BigBank\deploy\bigbank.client
    • +
    • runclient.bat
    • +
    +
  4. +
+

BigBank with Web Service client

+
    +
  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions + found here. +
  2. +
  3. 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. +
    3. cd <tuscany_sca_install_dir>\samples\BigBank\deploy\bigbank.account +
    4. +
    5. runwsserver.bat
    6. +
    +
  4. +
  5. Run the client: +
      +
    1. The following environment variable is required: +
        +
      • AXIS2C_HOME=<path to axis2c version 0.94>
      • +
      +
    2. +
    3. cd <tuscany_sca_install_dir>\samples\BigBank\deploy\bigbank.wsclient
    4. +
    5. runwsclient.bat
    6. +
    +
  6. +
+

BigBank with PHP web client

+
    +
  1. Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions + found here. +
  2. +
  3. 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. +
    3. cd <tuscany_sca_install_dir>\samples\BigBank\deploy\bigbank.account +
    4. +
    5. runwsserver.bat
    6. +
    +
  4. +
  5. To run the php scripts requires some configuration and setup of a php runtime with + the SDO and SimpleXML extensions enabled. The bits you will need are: + +

    You can get Windows binary builds from + http://www.php.net/downloads.php. + For SDO you need two dlls as follows: +

    + +

    Copy these to the php5.1.6\ext dir ( php_soap.dll is already there) and add the + following to php.ini file (having already renamed php.ini-recommended to php.ini + of course) +

    extension=php_soap.dll
    +extension=php_sdo.dll
    +extension=php_sdo_das_xml.dll
    + I also changed the extension_dir directive to point to my extensions directory: +
    extension_dir="C:\php5.1.6\ext"
    +

    +

    Asking PHP to list what modules are active gives the following: +

    C:\php5.1.6>php -m
    +[PHP Modules]
    +bcmath
    +calendar
    +com_dotnet
    +ctype
    +date
    +dom
    +ftp
    +hash
    +iconv
    +libxml
    +odbc
    +pcre
    +Reflection
    +sdo
    +sdo_das_xml
    +session
    +SimpleXML
    +soap
    +SPL
    +standard
    +tokenizer
    +wddx
    +xml
    +xmlreader
    +xmlwriter
    +zlib
    +
    +[Zend Modules]
    + Of particular relevance to these scripts note that soap, sdo and sdo_das_xml are active. +

    +
  6. +
  7. You need to configure Apache to run PHP of course. This is well documented but this + is what to put at the end of httpd.conf: +
    # PHP5 Support
    +LoadModule php5_module "C:\php5.1.6\php5apache2.dll"
    +AddType application/x-httpd-php .php
    +
    +# configure the path to php.ini
    +PHPIniDir "C:\php5.1.6"
    +
  8. +
  9. Copy the <tuscany_sca_install_dir>\samples\BigBank\bigbank.phpwsclient + directory to your Apache document root directory (by default this is named 'htdocs'). +
  10. +
  11. Finally, start your Apache web server. +
  12. +
  13. Run the PHP web client by pointing your browser at + http://localhost/bigbank.phpwsclient/welcome.php. + You should now be able to press the "GetAccount" button and see the values + returned from the BigBank SCA application. +
  14. +
+
+ + + +
+

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.

+
+
+
+ + + + -- cgit v1.2.3