summaryrefslogtreecommitdiffstats
path: root/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-11-16 06:35:50 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-11-16 06:35:50 +0000
commit034ecc7803559acdda5dd6c54ecc081665b19f61 (patch)
tree7485982d141aba0577b0eb11d5fef083876e4ed3 /sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank
parentb72b7e219af9b9c6826372eeb581ee85ca653d75 (diff)
Cleaning up SVN structure, moving tag under sca-cpp/tags.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@880618 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank')
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/Makefile.am21
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/README30
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/README.html427
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountDataService.h64
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.componentType28
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.cpp136
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.h61
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountService.h52
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountService.wsdl126
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountServiceImpl.componentType40
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountServiceImpl.cpp130
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountServiceImpl.h44
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/Makefile.am59
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteService.h36
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.componentType29
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.cpp72
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.h36
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteTypes.xsd37
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteWebService.h40
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteWebService.wsdl165
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/bigbank.account.composite49
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/runwsserver.bat51
-rwxr-xr-xsca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/runwsserver.sh48
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.accountmanagement.composite30
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.client/AccountClient.cpp129
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.client/Makefile.am49
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.client/runclient.bat50
-rwxr-xr-xsca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.client/runclient.sh48
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/AccountService.wsdl126
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/Makefile.am22
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/README137
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/bigaccount.php113
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/bigwelcome.php44
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/AccountWSClient.cpp184
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/Makefile.am44
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/axis2_Account_stub.cpp111
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/axis2_Account_stub.h71
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/runwsclient.bat32
-rwxr-xr-xsca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/runwsclient.sh31
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/deploy.bat67
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/deployclient.bat63
-rw-r--r--sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/deploywsclient.bat63
42 files changed, 3195 insertions, 0 deletions
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/Makefile.am b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/Makefile.am
new file mode 100644
index 0000000000..aa315d4f46
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/Makefile.am
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+deploydir=$(prefix)/samples/BigBank/deploy
+SUBDIRS = bigbank.account bigbank.client bigbank.wsclient bigbank.phpwsclient
+EXTRA_DIST = *.composite README.html
+deploy_DATA = *.composite
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/README b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/README
new file mode 100644
index 0000000000..dc919e1aed
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/README
@@ -0,0 +1,30 @@
+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.
+
+Additionally, there is the bigbank.accountmanagement.composite file. This
+describes the configuration of the SCA Calculator composite deployed to the
+SCA runtime.
+
+See the README.html file for instructions to build and run this sample
+
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/README.html b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/README.html
new file mode 100644
index 0000000000..597d05de67
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/README.html
@@ -0,0 +1,427 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<HTML>
+<HEAD>
+ <META CONTENT="text/html; charset=iso-8859-1" HTTP-EQUIV="Content-Type">
+ <META CONTENT="text/css" HTTP-EQUIV="Content-Style-Type">
+ <STYLE MEDIA="all" TYPE="text/css">
+@import url("../../doc/css/maven-base.css");
+@import url("../../doc/css/maven-theme.css");
+ </STYLE>
+
+ <LINK HREF="../doc/css/maven-theme.css" MEDIA="print" REL="stylesheet"
+ TYPE="text/css">
+ <TITLE>Tuscany SCA for C++ Samples - BigBank Sample</TITLE>
+</HEAD>
+
+<BODY>
+<DIV ID="bodyColumn">
+ <DIV ID="contentBox">
+ <DIV CLASS="section">
+ <H2>Tuscany SCA for C++ Samples - BigBank Sample</H2>
+
+ <P>This sample implements the "Simplified BigBank" scenario. A whitepaper describing
+ the scenario based on the SCA 0.9 Assembly specification can be found
+ <A HREF="http://www.osoa.org/display/Main/SCA+-+Previously+Published+Specifications">here</A>.
+ 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.
+ </P>
+ <P>There are four sub projects in this workspace:</P>
+ <UL>
+ <LI>bigbank.account<BR/>
+ This contains the source code and SCDL artifacts for the SCA BigBank
+ composite implementing the account services.
+ </LI>
+ <LI>bigbank.client<BR/>
+ A sample client which does a local call to the BigBank service.
+ </LI>
+ <LI>bigbank.wsclient<BR/>
+ A sample Axis2 Web Service client which calls the BigBank Web service.
+ </LI>
+ <LI>bigbank.phpclient<BR/>
+ A sample PHP client which calls the BigBank Web service and then deconstructs
+ and displays the result by using the
+ <A HREF="http://www.osoa.org/display/PHP/SOA+PHP+Homepage">SDO for PHP extension</A>.
+ <P>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.
+ </P>
+ <P>bigwelcome.php<BR/>
+ A bootstrap script that shows a form and allows the user to press a button
+ in order to invoke the bigaccount.php script
+ </P>
+ <P>bigaccount.php<BR/>
+ 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.
+ </P>
+ </LI>
+ </UL>
+ <P>Additionally, there is the bigbank.accountmanagement.composite file. This
+ describes the configuration of the SCA Calculator composite deployed to the SCA
+ runtime.
+ </P>
+
+ </DIV>
+
+ <DIV CLASS="section">
+ <H2>Contents</H2>
+ <OL>
+ <LI><A HREF="#linuxbld">Building the C++ samples on Linux</A></LI>
+ <LI><A HREF="#linuxrun">Running the BigBank sample on Linux:</A></LI>
+ <UL>
+ <LI><A HREF="#linuxbasic">Running the basic client</A></LI>
+ <LI><A HREF="#linuxws">Running the Web Service client</A></LI>
+ <LI><A HREF="#linuxphp">Installing and running the PHP web client</A></LI>
+ </UL>
+ <LI><A HREF="#winbld">Building the BigBank sample on Windows</A></LI>
+ <LI><A HREF="#winrun">Running the BigBank sample on Windows:</A></LI>
+ <UL>
+ <LI><A HREF="#winbasic">Running the basic client</A></LI>
+ <LI><A HREF="#winws">Running the Web Service client</A></LI>
+ <LI><A HREF="#winphp">Installing and running the PHP web client</A></LI>
+ </UL>
+ <LI><A HREF="#help">Getting help</A></LI>
+ </OL>
+ </DIV>
+
+
+ <DIV CLASS="section">
+ <A NAME="linuxbld"><H2>Building the C++ samples on Linux</H2></A>
+ <P>If using the binary distribution the samples are built and installed in
+ &lt;tuscany_sca_install_dir&gt;/samples - go directly to <A HREF="#linuxrun">Running the samples on Linux</A>.</P>
+ <OL>
+ <LI>The following environment variables are required:
+ <UL>
+ <LI>TUSCANY_SCACPP=&lt;path to installed Tuscany SCA&gt;
+ <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;
+ <LI>AXIS2C_HOME=&lt;path to axis2c version 0.94&gt;</LI>
+ </UL></LI>
+ </LI>
+ <LI>Build the C++ samples with the following command sequence:
+ <UL>
+ <LI>cd &lt;tuscany_sca_install_dir&gt;/samples</LI>
+ <LI>./configure --prefix=$TUSCANY_SCACPP --enable-static=no</LI>
+ <LI>make</LI>
+ <LI>make install</LI>
+ </UL>
+ NOTE: If you don't provide the --prefix configure option, it will by default install into
+ /usr/local/tuscany/sca/samples/BigBank</LI>
+ </OL>
+ </DIV>
+
+ <DIV CLASS="section">
+ <A NAME="linuxrun"><H2>Running the BigBank sample on Linux</H2></A>
+ <A NAME="linuxbasic"><H3>BigBank with basic client</H3></A>
+ <OL>
+ <LI>The following environment variables are required:
+ <UL>
+ <LI>TUSCANY_SCACPP=&lt;path to installed Tuscany SCA&gt;</LI>
+ <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;</LI>
+ <LI>AXIS2C_HOME=&lt;path to axis2c version 0.92&gt;</LI>
+ </UL>
+ </LI>
+ <LI>Run the sample with the following commands:
+ <UL>
+ <LI>cd &lt;tuscany_sca_install_dir&gt;/samples/BigBank/deploy/bigbank.client</LI>
+ <LI>./runclient.sh</LI>
+ </UL>
+ </LI>
+ </OL>
+ <A NAME="linuxws"><H3>BigBank with Web Service client</H3></A>
+ <OL>
+ <LI>Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions
+ found <A HREF="../../doc/Axis2CWSService.html">here</A>.
+ </LI>
+ <LI>Start the Axis2C simple http server:
+ <OL>
+ <LI>The following environment variables are required:
+ <UL>
+ <LI>TUSCANY_SCACPP=&lt;path to installed Tuscany SCA&gt;</LI>
+ <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;</LI>
+ <LI>AXIS2C_HOME=&lt;path to axis2c version 0.94&gt;</LI>
+ </UL>
+ </LI>
+ <LI>cd &lt;tuscany_sca_install_dir&gt;/samples/BigBank/deploy/bigbank.account
+ </LI>
+ <LI>./runwsserver.sh</LI>
+ </OL>
+ </LI>
+ <LI>Run the client:
+ <OL>
+ <LI>The following environment variable is required:
+ <UL>
+ <LI>AXIS2C_HOME=&lt;path to axis2c version 0.94&gt;</LI>
+ </UL>
+ </LI>
+ <LI>cd &lt;tuscany_sca_install_dir&gt;/samples/BigBank/deploy/bigbank.wsclient</LI>
+ <LI>./runwsclient.sh</LI>
+ </OL>
+ </LI>
+ </OL>
+ <A NAME="linuxphp"><H3>BigBank with PHP web client</H3></A>
+ <OL>
+ <LI>Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions
+ found <A HREF="../../doc/Axis2CWSService.html">here</A>.
+ </LI>
+ <LI>Start the Axis2C simple http server:
+ <OL>
+ <LI>The following environment variables are required:
+ <UL>
+ <LI>TUSCANY_SCACPP=&lt;path to installed Tuscany SCA&gt;</LI>
+ <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;</LI>
+ <LI>AXIS2C_HOME=&lt;path to axis2c version 0.94&gt;</LI>
+ </UL>
+ </LI>
+ <LI>cd &lt;tuscany_sca_install_dir&gt;/samples/BigBank/deploy/bin
+ </LI>
+ <LI>./runwsserver.sh</LI>
+ </OL>
+ </LI>
+ <LI>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:
+ <UL>
+ <LI><A HREF="http://httpd.apache.org/">Apache web server</A> (tested with version 2.0.55)</LI>
+ <LI><A HREF="http://www.php.net/downloads.php">PHP 5</A> (tested with version 5.1.6)</LI>
+ <LI><A HREF="http://pecl.php.net/package/sdo">PHP SDO</A> (tested with version 1.0.3)</LI>
+ </UL>
+ <P>Follow
+ <A HREF="http://livedocs.phpdoc.info/index.php?l=en&q=ref.sdo">these instructions</A> to
+ install SDO and DAS.
+ </P>
+ </LI>
+ <LI>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:
+ <PRE># 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"</PRE>
+ </LI>
+ <LI>Copy the &lt;tuscany_sca_install_dir&gt;/samples/BigBank/bigbank.phpwsclient
+ directory to your Apache document root directory (by default this is named 'htdocs').
+ </LI>
+ <LI>Finally, start your Apache web server.
+ </LI>
+ <LI>Run the PHP web client by pointing your browser at
+ <A HREF="http://localhost/bigbank.phpwsclient/welcome.php">http://localhost/bigbank.phpwsclient/welcome.php</A>.
+ You should now be able to press the "GetAccount" button and see the values
+ returned from the BigBank SCA application.
+ </LI>
+
+ </OL>
+ </DIV>
+
+ <DIV CLASS="section">
+ <A NAME="winbld"><H2>Building the BigBank sample on Windows</H2></A>
+ <P>If using the binary distribution the samples are built and installed in
+ &lt;tuscany_sca_install_dir&gt;\samples - go directly to <A HREF="#winrun">Running the samples on Windows</A>.</P>
+ <OL>
+ <LI>The following environment variables are required:
+ <UL>
+ <LI>TUSCANY_SCACPP=&lt;path to installed Tuscany SCA&gt;
+ <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;
+ <LI>AXIS2C_HOME=&lt;path to axis2c version 0.94&gt;</LI>
+ </UL></LI>
+ </LI>
+ <LI>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.
+ </LI>
+ <LI>Build the source, either via the Visual Studio 6 or 7 projects under
+ &lt;tuscany_sca_install_dir&gt;\samples\ides or via the command-line build file
+ found at &lt;tuscany_sca_install_dir&gt;\samples\ides\devstudio6\projects\BigBank\build.cmd
+ which will build and deploy the samples.
+ </LI>
+ </OL>
+ </DIV>
+
+ <DIV CLASS="section">
+ <A NAME="winrun"><H2>Running the BigBank sample on Windows</H2></A>
+ <A NAME="winbasic"><H3>BigBank with basic client</H3></A>
+ <OL>
+ <LI>The following environment variables are required:
+ <UL>
+ <LI>TUSCANY_SCACPP=&lt;path to installed Tuscany SCA&gt;</LI>
+ <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;</LI>
+ <LI>AXIS2C_HOME=&lt;path to axis2c version 0.94&gt;</LI>
+ </UL>
+ </LI>
+ <LI>Run the sample with the following commands:
+ <UL>
+ <LI>cd &lt;tuscany_sca_install_dir&gt;\samples\BigBank\deploy\bigbank.client</LI>
+ <LI>runclient.bat</LI>
+ </UL>
+ </LI>
+ </OL>
+ <A NAME="winws"><H3>BigBank with Web Service client</H3></A>
+ <OL>
+ <LI>Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions
+ found <A HREF="../../doc/Axis2CWSService.html">here</A>.
+ </LI>
+ <LI>Start the Axis2C simple http server:
+ <OL>
+ <LI>The following environment variables are required:
+ <UL>
+ <LI>TUSCANY_SCACPP=&lt;path to installed Tuscany SCA&gt;</LI>
+ <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;</LI>
+ <LI>AXIS2C_HOME=&lt;path to axis2c version 0.94&gt;</LI>
+ </UL>
+ </LI>
+ <LI>cd &lt;tuscany_sca_install_dir&gt;\samples\BigBank\deploy\bigbank.account
+ </LI>
+ <LI>runwsserver.bat</LI>
+ </OL>
+ </LI>
+ <LI>Run the client:
+ <OL>
+ <LI>The following environment variable is required:
+ <UL>
+ <LI>AXIS2C_HOME=&lt;path to axis2c version 0.94&gt;</LI>
+ </UL>
+ </LI>
+ <LI>cd &lt;tuscany_sca_install_dir&gt;\samples\BigBank\deploy\bigbank.wsclient</LI>
+ <LI>runwsclient.bat</LI>
+ </OL>
+ </LI>
+ </OL>
+ <A NAME="winphp"><H3>BigBank with PHP web client</H3></A>
+ <OL>
+ <LI>Ensure you have enabled Axis2C to run Tuscany SCA services. Follow the instructions
+ found <A HREF="../../doc/Axis2CWSService.html">here</A>.
+ </LI>
+ <LI>Start the Axis2C simple http server:
+ <OL>
+ <LI>The following environment variables are required:
+ <UL>
+ <LI>TUSCANY_SCACPP=&lt;path to installed Tuscany SCA&gt;</LI>
+ <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;</LI>
+ <LI>AXIS2C_HOME=&lt;path to axis2c version 0.94&gt;</LI>
+ </UL>
+ </LI>
+ <LI>cd &lt;tuscany_sca_install_dir&gt;\samples\BigBank\deploy\bigbank.account
+ </LI>
+ <LI>runwsserver.bat</LI>
+ </OL>
+ </LI>
+ <LI>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:
+ <UL>
+ <LI><A HREF="http://httpd.apache.org/">Apache web server</A> (tested with version 2.0.55)</LI>
+ <LI><A HREF="http://www.php.net/downloads.php">PHP 5</A> (tested with version 5.1.6)</LI>
+ <LI><A HREF="http://pecl.php.net/package/sdo">PHP SDO</A> (tested with version 1.0.3)</LI>
+ </UL>
+ <P>You can get Windows binary builds from
+ <A HREF="http://www.php.net/downloads.php">http://www.php.net/downloads.php</A>.
+ For SDO you need two dlls as follows:
+ </P>
+ <UL>
+ <LI><A HREF="http://pecl4win.php.net/ext.php/php_sdo.dll">php_sdo.dll</A></LI>
+ <LI><A HREF="http://pecl4win.php.net/ext.php/php_sdo_das_xml.dll">php_sdo_das_xml.dll</A></LI>
+ </UL>
+ <P>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)
+ <PRE>extension=php_soap.dll
+extension=php_sdo.dll
+extension=php_sdo_das_xml.dll</PRE>
+ I also changed the extension_dir directive to point to my extensions directory:
+ <PRE>extension_dir="C:\php5.1.6\ext"</PRE>
+ </P>
+ <P>Asking PHP to list what modules are active gives the following:
+ <PRE>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]</PRE>
+ Of particular relevance to these scripts note that soap, sdo and sdo_das_xml are active.
+ </P>
+ </LI>
+ <LI>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:
+ <PRE># 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"</PRE>
+ </LI>
+ <LI>Copy the &lt;tuscany_sca_install_dir&gt;\samples\BigBank\bigbank.phpwsclient
+ directory to your Apache document root directory (by default this is named 'htdocs').
+ </LI>
+ <LI>Finally, start your Apache web server.
+ </LI>
+ <LI>Run the PHP web client by pointing your browser at
+ <A HREF="http://localhost/bigbank.phpwsclient/welcome.php">http://localhost/bigbank.phpwsclient/welcome.php</A>.
+ You should now be able to press the "GetAccount" button and see the values
+ returned from the BigBank SCA application.
+ </LI>
+ </OL>
+ </DIV>
+
+
+
+ <DIV CLASS="section">
+ <A NAME="help"><H2>Getting Help</H2></A>
+
+ <P>First place to look is at the Tuscany FAQ at
+ <A HREF="http://incubator.apache.org/tuscany/faq.html"
+ TARGET="_blank">http://incubator.apache.org/tuscany/faq.html</A> </P>
+
+ <P>Any problem with this release can be reported to the Tuscany
+ <A HREF="http://incubator.apache.org/tuscany/mail-lists.html"
+ TARGET="_blank">mailing lists</A> or create a JIRA issue at&nbsp;<A HREF="http://issues.apache.org/jira/browse/Tuscany"
+ TARGET="_blank">http://issues.apache.org/jira/browse/Tuscany</A>.</P>
+ </DIV>
+ </DIV>
+</DIV>
+</BODY>
+
+</HTML>
+
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountDataService.h b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountDataService.h
new file mode 100644
index 0000000000..04000698e7
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountDataService.h
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Rev$ $Date$ */
+
+#include "commonj/sdo/SDO.h"
+
+#include <string>
+using std::string;
+
+namespace services
+{
+ namespace accountdata
+ {
+
+ /**
+ * AccountDataService business interface
+ */
+ class AccountDataService
+ {
+ public:
+
+ // CheckingAccount is a data object containing
+ // string accountNumber
+ // float balance
+
+ virtual commonj::sdo::DataObjectPtr /* CheckingAccount*/ getCheckingAccount(
+ const string id) = 0;
+
+ // SavingsAccount is a data object containing
+ // string accountNumber
+ // float balance
+
+ virtual commonj::sdo::DataObjectPtr /* SavingsAccount */ getSavingsAccount(
+ const string id) = 0;
+
+ // StockAccount is a data object containing
+ // string accountNumber
+ // string symbol
+ // int quantity
+
+ virtual commonj::sdo::DataObjectPtr /* StockAccount */ getStockAccount (
+ const string id) = 0;
+
+ };
+
+ } // End accountdata
+} // End services
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.componentType b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.componentType
new file mode 100644
index 0000000000..b1cab9e1f9
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+
+ <service name="AccountDataService">
+ <interface.cpp header="AccountDataService.h"/>
+ </service>
+
+</componentType>
+ \ No newline at end of file
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.cpp b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.cpp
new file mode 100644
index 0000000000..3f06809919
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.cpp
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Rev$ $Date$ */
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "commonj/sdo/SDO.h"
+#include "osoa/sca/sca.h"
+
+#include "AccountDataServiceImpl.h"
+
+using namespace commonj::sdo;
+using namespace osoa::sca;
+
+/**
+ * AccountDataServiceImpl component implementation
+ */
+
+namespace services
+{
+ namespace accountdata
+ {
+
+ DataObjectPtr /* CheckingAccount*/
+ AccountDataServiceImpl::getCheckingAccount(const string id)
+ {
+ try {
+
+ DataFactoryPtr factory = ComponentContext::getCurrent().getDataFactory();
+
+ DataObjectPtr newaccount =
+ factory->create("http://www.bigbank.com/AccountService","CheckingAccount");
+
+ char* name = new char[id.size() + 10];
+ strcpy(name,id.c_str());
+ strcat(name,"_CHA12345");
+
+ newaccount->setCString("accountNumber",name);
+
+ delete name;
+
+ newaccount->setFloat("balance",1500.0f);
+
+ return newaccount;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ return 0;
+ }
+ }
+
+
+
+ DataObjectPtr /* SavingsAccount */
+ AccountDataServiceImpl::getSavingsAccount(const string id)
+ {
+ try {
+
+ DataFactoryPtr factory = ComponentContext::getCurrent().getDataFactory();
+
+ DataObjectPtr newaccount =
+ factory->create("http://www.bigbank.com/AccountService","SavingsAccount");
+
+ char* name = new char[id.size() + 10];
+ strcpy(name,id.c_str());
+ strcat(name,"_SAA12345");
+
+ newaccount->setCString("accountNumber",name);
+
+ delete name;
+
+ newaccount->setFloat("balance",1500.0f);
+
+ return newaccount;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ return 0;
+ }
+ }
+
+
+ DataObjectPtr /* StockAccount */
+ AccountDataServiceImpl::getStockAccount (const string id)
+ {
+ try {
+
+ DataFactoryPtr factory = ComponentContext::getCurrent().getDataFactory();
+
+ DataObjectPtr newaccount =
+ factory->create("http://www.bigbank.com/AccountService","StockAccount");
+
+ char* name = new char[id.size() + 10];
+ strcpy(name,id.c_str());
+ strcat(name,"_STA12345");
+
+ newaccount->setCString("accountNumber",name);
+
+ delete name;
+
+ newaccount->setCString("symbol","IBM");
+
+ newaccount->setInteger("quantity",100);
+
+ return newaccount;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ return 0;
+ }
+ }
+
+ } // End accountdata
+} // End services
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.h b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.h
new file mode 100644
index 0000000000..373da4ba95
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountDataServiceImpl.h
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Rev$ $Date$ */
+
+#include "AccountDataService.h"
+
+namespace services
+{
+ namespace accountdata
+ {
+
+ /**
+ * AccountDataServiceImpl component implementation class
+ */
+ class AccountDataServiceImpl : public AccountDataService
+ {
+ public:
+
+ // CheckingAccount is a data object containing
+ // string accountNumber
+ // float balance
+
+ virtual DataObjectPtr /* CheckingAccount*/ getCheckingAccount(
+ const string id);
+
+ // SavingsAccount is a data object containing
+ // string accountNumber
+ // float balance
+
+ virtual DataObjectPtr /* SavingsAccount */ getSavingsAccount(
+ const string id);
+
+ // StockAccount is a data object containing
+ // string accountNumber
+ // string symbol
+ // int quantity
+
+ virtual DataObjectPtr /* StockAccount */ getStockAccount (
+ const string id);
+
+ };
+
+ } // End accountdata
+} // End services
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountService.h b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountService.h
new file mode 100644
index 0000000000..b8e462fb72
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountService.h
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Rev$ $Date$ */
+
+#include "commonj/sdo/SDO.h"
+
+#include <string>
+using std::string;
+
+namespace services
+{
+ namespace account
+ {
+
+ /**
+ * AccountService business interface
+ */
+ class AccountService
+ {
+ public:
+
+ // The account report data object has one many-valued
+ // property "accountSummaries", containing the following
+ // properties:
+ // string accountNumber
+ // string accountType
+ // float balance.
+
+ virtual commonj::sdo::DataObjectPtr /*AccountReport*/
+ getAccountReport(const string customerID) = 0;
+
+ };
+
+ } // End account
+} // End services
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountService.wsdl b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountService.wsdl
new file mode 100644
index 0000000000..cbfe180692
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountService.wsdl
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.bigbank.com/AccountService"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.bigbank.com/AccountService"
+ name="AccountService">
+
+ <wsdl:types>
+ <xsd:schema
+ targetNamespace="http://www.bigbank.com/AccountService"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:element name="getAccountReport">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="customerID"
+ type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="getAccountReportResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="result"
+ type="tns:AccountReport" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:complexType name="AccountReport">
+ <xsd:sequence>
+ <xsd:element name="checking"
+ type="tns:CheckingAccount" maxOccurs="unbounded" />
+ <xsd:element name="savings"
+ type="tns:SavingsAccount" maxOccurs="unbounded" />
+ <xsd:element name="stocks" type="tns:StockAccount"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="StockAccount">
+ <xsd:sequence>
+ <xsd:element name="accountNumber" type="xsd:string" />
+ <xsd:element name="symbol" type="xsd:string" />
+ <xsd:element name="quantity" type="xsd:integer" />
+ <xsd:element name="balance" type="xsd:float" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="CheckingAccount">
+ <xsd:sequence>
+ <xsd:element name="accountNumber" type="xsd:string" />
+ <xsd:element name="balance" type="xsd:float" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="SavingsAccount">
+ <xsd:sequence>
+ <xsd:element name="accountNumber" type="xsd:string" />
+ <xsd:element name="balance" type="xsd:float" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="getAccountReportRequest">
+ <wsdl:part element="tns:getAccountReport"
+ name="getAccountReportRequest" />
+ </wsdl:message>
+
+ <wsdl:message name="getAccountReportResponse">
+ <wsdl:part element="tns:getAccountReportResponse"
+ name="getAccountReportResponse" />
+ </wsdl:message>
+
+ <wsdl:portType name="AccountService">
+ <wsdl:operation name="getAccountReport">
+ <wsdl:input message="tns:getAccountReportRequest" />
+ <wsdl:output message="tns:getAccountReportResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="AccountServiceSOAP" type="tns:AccountService">
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="getAccountReport">
+ <soap:operation
+ soapAction="http://www.bigbank.com/AccountService/getAccountReport" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="AccountService">
+ <wsdl:port binding="tns:AccountServiceSOAP"
+ name="AccountServiceSOAP">
+ <soap:address
+ location="http://localhost:9090/axis2/services/AccountService" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountServiceImpl.componentType b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountServiceImpl.componentType
new file mode 100644
index 0000000000..b65fa1dc18
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountServiceImpl.componentType
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="AccountService">
+ <interface.cpp header="AccountService.h"/>
+ </service>
+
+ <reference name="accountDataService">
+ <interface.cpp header="AccountDataService.h"/>
+ </reference>
+
+ <reference name="stockQuoteService">
+ <interface.cpp header="StockQuoteService.h"/>
+ </reference>
+
+ <property name="currency" type="xs:string">USD</property>
+
+</componentType>
+ \ No newline at end of file
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountServiceImpl.cpp b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountServiceImpl.cpp
new file mode 100644
index 0000000000..fd18119bad
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountServiceImpl.cpp
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Rev$ $Date$ */
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "osoa/sca/sca.h"
+
+#include "AccountServiceImpl.h"
+#include "StockQuoteService.h"
+#include "AccountDataService.h"
+
+using namespace osoa::sca;
+using namespace services::accountdata;
+using namespace services::stockquote;
+
+/**
+ * AccountServiceImpl component implementation
+ */
+namespace services
+{
+ namespace account
+ {
+
+ DataObjectPtr /*AccountReport**/
+ AccountServiceImpl::getAccountReport(const string customerID)
+ {
+ ComponentContext theContext = ComponentContext::getCurrent();
+
+ commonj::sdo::DataFactoryPtr factory = theContext.getDataFactory();
+
+ commonj::sdo::DataObjectPtr newReport =
+ factory->create("http://www.bigbank.com/AccountService","AccountReport");
+
+ // Get the accountDataService service
+ AccountDataService *dataService =
+ (AccountDataService*)theContext.getService("accountDataService");
+
+ // would be better to return a list of accounts - this only
+ // gets the first of each.
+
+ commonj::sdo::DataObjectPtr checking =
+ dataService->getCheckingAccount(customerID);
+
+ if (checking != 0)
+ {
+ commonj::sdo::DataObjectList& dl = newReport->getList("checking");
+ checking->setFloat("balance",
+ fromUSDollarToCurrency(checking->getFloat("balance")));
+ dl.append(checking);
+ }
+
+ commonj::sdo::DataObjectPtr savings = dataService->getSavingsAccount(customerID);
+
+ if (savings != 0)
+ {
+ commonj::sdo::DataObjectList& dl = newReport->getList("savings");
+ savings->setFloat("balance",
+ fromUSDollarToCurrency(savings->getFloat("balance")));
+ dl.append(savings);
+ }
+
+ // Get the stockQuoteService service
+ StockQuoteService* stockService =
+ (StockQuoteService*)theContext.getService("stockQuoteService");
+
+ commonj::sdo::DataObjectPtr stocks = dataService->getStockAccount(customerID);
+
+ if (stocks != 0)
+ {
+ commonj::sdo::DataObjectList& dl = newReport->getList("stocks");
+
+ float value = 10.0f;
+ try {
+ value = stockService->getQuote(
+ stocks->getCString("symbol"));
+ }
+ catch (ServiceRuntimeException& e)
+ {
+ std::cout << "Fault from stock quote service" << e << std::endl;
+ }
+ stocks->setFloat("balance",
+ fromUSDollarToCurrency(stocks->getInteger("quantity") *
+ value));
+ dl.append(stocks);
+ }
+
+ return newReport;
+ }
+
+ float AccountServiceImpl::fromUSDollarToCurrency(float value)
+ {
+ // Get the "currency" property
+ ComponentContext myContext = ComponentContext::getCurrent();
+
+ commonj::sdo::DataObjectInstance properties = myContext.getProperties();
+ if (properties)
+ {
+ const char* currency = properties->getCString("currency");
+ if (currency != 0)
+ {
+ std::cout << "Currency is : " << currency << std::endl;
+ if (!strcmp(currency,"USD")) return value;
+ if (!strcmp(currency,"EURO")) return 0.8f * value;
+ }
+ }
+ return 0.0f;
+ }
+
+ } // End account
+} // End services
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountServiceImpl.h b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountServiceImpl.h
new file mode 100644
index 0000000000..70dfc17b19
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/AccountServiceImpl.h
@@ -0,0 +1,44 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "AccountService.h"
+
+
+namespace services
+{
+ namespace account
+ {
+
+ /**
+ * AccountServiceImpl component implementation class
+ */
+ class AccountServiceImpl: public AccountService
+ {
+ public:
+
+ virtual DataObjectPtr /*AccountReport*/
+ getAccountReport(const string customerID);
+
+ private:
+
+ float fromUSDollarToCurrency(float value);
+
+ };
+
+ } // End account
+} // End services
+
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/Makefile.am b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/Makefile.am
new file mode 100644
index 0000000000..4e4d69e2d7
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/Makefile.am
@@ -0,0 +1,59 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+deploydir=$(prefix)/samples/BigBank/deploy
+compositedir=$(deploydir)/bigbank.account
+
+BUILT_SOURCES = scagen
+
+noinst_HEADERS = *.h
+
+composite_SCRIPTS = runwsserver.sh
+
+scagen:
+ java -jar $(TUSCANY_SCACPP)/bin/scagen.jar -dir . -output .
+
+composite_LTLIBRARIES = libAccount.la
+composite_DATA = *.composite *.componentType *.wsdl *.xsd
+EXTRA_DIST = *.composite *.componentType *.wsdl *.xsd runwsserver.sh
+
+dist_libAccount_la_SOURCES = \
+AccountDataServiceImpl.cpp \
+AccountServiceImpl.cpp \
+StockQuoteServiceImpl.cpp
+
+nodist_libAccount_la_SOURCES = \
+AccountDataServiceImpl_AccountDataService_Proxy.cpp \
+AccountDataServiceImpl_AccountDataService_Wrapper.cpp \
+AccountServiceImpl_accountDataService_Proxy.cpp \
+AccountServiceImpl_AccountService_Proxy.cpp \
+AccountServiceImpl_AccountService_Wrapper.cpp \
+AccountServiceImpl_stockQuoteService_Proxy.cpp \
+StockQuoteServiceImpl_StockQuoteService_Proxy.cpp \
+StockQuoteServiceImpl_StockQuoteService_Wrapper.cpp \
+StockQuoteServiceImpl_webService_Proxy.cpp
+
+libAccount_la_LIBADD = \
+-L${TUSCANY_SCACPP}/lib \
+ -ltuscany_sca \
+-L${TUSCANY_SCACPP}/extensions/cpp/lib \
+ -ltuscany_sca_cpp
+
+INCLUDES = \
+ -I$(TUSCANY_SCACPP)/extensions/cpp/include \
+ -I$(TUSCANY_SCACPP)/include \
+ -I${TUSCANY_SDOCPP}/include
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteService.h b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteService.h
new file mode 100644
index 0000000000..d67998059a
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteService.h
@@ -0,0 +1,36 @@
+/*
+ *
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <string>
+using std::string;
+
+namespace services
+{
+ namespace stockquote
+ {
+ /**
+ * StockQuoteService business interface
+ */
+ class StockQuoteService
+ {
+ public:
+
+ virtual float getQuote(const string symbol) = 0;
+
+ };
+
+ } // End stockquote
+} // End services
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.componentType b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.componentType
new file mode 100644
index 0000000000..6ac2b77255
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.componentType
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+
+ <service name="StockQuoteService">
+ <interface.cpp header="StockQuoteService.h"/>
+ </service>
+
+ <reference name="webService">
+ <interface.cpp header="StockQuoteWebService.h"/>
+ </reference>
+
+</componentType>
+ \ No newline at end of file
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.cpp b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.cpp
new file mode 100644
index 0000000000..e78769f50e
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.cpp
@@ -0,0 +1,72 @@
+/*
+ *
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "StockQuoteServiceImpl.h"
+#include "StockQuoteWebService.h"
+
+#include "osoa/sca/sca.h"
+#include "commonj/sdo/SDO.h"
+
+using namespace osoa::sca;
+using namespace commonj::sdo;
+
+/**
+ * StockQuoteServiceImpl component implementation
+ */
+namespace services {
+ namespace stockquote {
+
+ // Map the format returned by the StockQuote Web service to
+ // the format expected in the BigBank application
+ float StockQuoteServiceImpl::getQuote(const string symbol)
+ {
+ ComponentContext myContext = ComponentContext::getCurrent();
+
+ // Get the StockQuote Web service
+ StockQuoteWebService* webService =
+ (StockQuoteWebService*)myContext.getService("webService");
+
+ // Invoke the service
+ const string result = webService->GetQuote(symbol);
+
+ float stockPrice = 0.0f;
+
+ // Get the stock price out of the document returned by the StockQuote
+ // Web service
+ try
+ {
+ XMLHelperPtr xmlHelper = HelperProvider::getXMLHelper(myContext.getDataFactory());
+ XMLDocumentPtr stockDoc = xmlHelper->load(result);
+ if (stockDoc->getRootDataObject())
+ {
+ stockPrice=stockDoc->getRootDataObject()->getFloat("Stock.0/Last");
+ }
+ }
+ catch (SDORuntimeException e)
+ {
+ std::cout << e << std::endl;
+ return 0.0f;
+ }
+ return stockPrice;
+ }
+
+ } // End stockquote
+} // End services
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.h b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.h
new file mode 100644
index 0000000000..cccf161454
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteServiceImpl.h
@@ -0,0 +1,36 @@
+/*
+ *
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "StockQuoteService.h"
+
+namespace services
+{
+ namespace stockquote
+ {
+
+ /**
+ * StockQuoteServiceImpl component implementation class
+ */
+ class StockQuoteServiceImpl : public StockQuoteService
+ {
+ public:
+
+ virtual float getQuote(const string symbol);
+ };
+
+ } // End stockquote
+} // End services
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteTypes.xsd b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteTypes.xsd
new file mode 100644
index 0000000000..5bce3a63dc
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteTypes.xsd
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="StockQuotes" type="tStockQuotes"/>
+ <xs:complexType name="tStockQuotes">
+ <xs:sequence>
+ <xs:element name="Stock" type="tStock" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##any" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:complexType name="tStock">
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="1" name="Symbol" type="xs:string"/>
+ <xs:element minOccurs="0" maxOccurs="1" name="Last" type="xs:float"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##any" processContents="lax"/>
+ </xs:complexType>
+</xs:schema> \ No newline at end of file
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteWebService.h b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteWebService.h
new file mode 100644
index 0000000000..9bee445c8d
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteWebService.h
@@ -0,0 +1,40 @@
+/*
+ *
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <string>
+using std::string;
+
+namespace services
+{
+ namespace stockquote
+ {
+
+ /**
+ * StockQuoteWebService business interface
+ *
+ * This is the interface of the Web service used to get
+ * live stock quotes.
+ */
+ class StockQuoteWebService
+ {
+ public:
+
+ virtual const string GetQuote(const string symbol) = 0;
+
+ };
+
+ } // End stockquote
+} // End services
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteWebService.wsdl b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteWebService.wsdl
new file mode 100644
index 0000000000..c14f97c87b
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/StockQuoteWebService.wsdl
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:s="http://www.w3.org/2001/XMLSchema"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:tns="http://www.webserviceX.NET/"
+ xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
+ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+ targetNamespace="http://www.webserviceX.NET/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <s:schema elementFormDefault="qualified"
+ targetNamespace="http://www.webserviceX.NET/">
+ <s:element name="GetQuote">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+ name="symbol" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+
+ </s:element>
+ <s:element name="GetQuoteResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+ name="GetQuoteResult" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="string" nillable="true" type="s:string" />
+
+ </s:schema>
+ </wsdl:types>
+ <wsdl:message name="GetQuoteSoapIn">
+ <wsdl:part name="parameters" element="tns:GetQuote" />
+ </wsdl:message>
+ <wsdl:message name="GetQuoteSoapOut">
+ <wsdl:part name="parameters" element="tns:GetQuoteResponse" />
+ </wsdl:message>
+ <wsdl:message name="GetQuoteHttpGetIn">
+
+ <wsdl:part name="symbol" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="GetQuoteHttpGetOut">
+ <wsdl:part name="Body" element="tns:string" />
+ </wsdl:message>
+ <wsdl:message name="GetQuoteHttpPostIn">
+ <wsdl:part name="symbol" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="GetQuoteHttpPostOut">
+
+ <wsdl:part name="Body" element="tns:string" />
+ </wsdl:message>
+ <wsdl:portType name="StockQuoteSoap">
+ <wsdl:operation name="GetQuote">
+ <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
+ Get Stock quote for a company Symbol
+ </documentation>
+ <wsdl:input message="tns:GetQuoteSoapIn" />
+ <wsdl:output message="tns:GetQuoteSoapOut" />
+ </wsdl:operation>
+
+ </wsdl:portType>
+ <wsdl:portType name="StockQuoteHttpGet">
+ <wsdl:operation name="GetQuote">
+ <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
+ Get Stock quote for a company Symbol
+ </documentation>
+ <wsdl:input message="tns:GetQuoteHttpGetIn" />
+ <wsdl:output message="tns:GetQuoteHttpGetOut" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:portType name="StockQuoteHttpPost">
+ <wsdl:operation name="GetQuote">
+ <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
+ Get Stock quote for a company Symbol
+ </documentation>
+ <wsdl:input message="tns:GetQuoteHttpPostIn" />
+ <wsdl:output message="tns:GetQuoteHttpPostOut" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="StockQuoteSoap" type="tns:StockQuoteSoap">
+
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
+ style="document" />
+ <wsdl:operation name="GetQuote">
+ <soap:operation
+ soapAction="http://www.webserviceX.NET/GetQuote" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="StockQuoteHttpGet"
+ type="tns:StockQuoteHttpGet">
+ <http:binding verb="GET" />
+ <wsdl:operation name="GetQuote">
+ <http:operation location="/GetQuote" />
+ <wsdl:input>
+ <http:urlEncoded />
+ </wsdl:input>
+
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="StockQuoteHttpPost"
+ type="tns:StockQuoteHttpPost">
+ <http:binding verb="POST" />
+ <wsdl:operation name="GetQuote">
+ <http:operation location="/GetQuote" />
+
+ <wsdl:input>
+ <mime:content type="application/x-www-form-urlencoded" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="StockQuote">
+
+ <wsdl:port name="StockQuoteSoap" binding="tns:StockQuoteSoap">
+ <soap:address
+ location="http://www.webservicex.net/stockquote.asmx" />
+ </wsdl:port>
+ <wsdl:port name="StockQuoteHttpGet"
+ binding="tns:StockQuoteHttpGet">
+ <http:address
+ location="http://www.webservicex.net/stockquote.asmx" />
+ </wsdl:port>
+ <wsdl:port name="StockQuoteHttpPost"
+ binding="tns:StockQuoteHttpPost">
+ <http:address
+ location="http://www.webservicex.net/stockquote.asmx" />
+ </wsdl:port>
+
+ </wsdl:service>
+</wsdl:definitions> \ No newline at end of file
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/bigbank.account.composite b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/bigbank.account.composite
new file mode 100644
index 0000000000..7173d584d2
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/bigbank.account.composite
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ name="bigbank.account">
+
+ <service name="AccountService">
+ <interface.wsdl interface="http://www.bigbank.com/AccountService#wsdl.interface(AccountService)"/>
+ <!-- The endpoint is optional -->
+ <!-- <binding.ws endpoint="http://www.bigbank.com/AccountService#wsdl.endpoint(AccountService/AccountServiceSOAP)"/> -->
+ <binding.ws/>
+ <reference>AccountServiceComponent</reference>
+ </service>
+
+ <component name="AccountServiceComponent">
+ <implementation.cpp library="Account" header="AccountServiceImpl.h"/>
+ <reference name="accountDataService">AccountDataServiceComponent</reference>
+ <reference name="stockQuoteService">StockQuoteServiceComponent</reference>
+ <property name="currency">EURO</property>
+ </component>
+
+ <component name="AccountDataServiceComponent">
+ <implementation.cpp library="Account" header="AccountDataServiceImpl.h"/>
+ </component>
+
+ <component name="StockQuoteServiceComponent">
+ <implementation.cpp library="Account" header="StockQuoteServiceImpl.h"/>
+ <reference name="webService">StockQuoteWebService</reference>
+ </component>
+
+ <reference name="StockQuoteWebService">
+ <interface.wsdl interface="http://www.webserviceX.NET/#wsdl.interface(StockQuoteSoap)"/>
+ <binding.ws endpoint="http://www.webserviceX.NET/#wsdl.endpoint(StockQuote/StockQuoteSoap)"/>
+ </reference>
+
+</composite>
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/runwsserver.bat b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/runwsserver.bat
new file mode 100644
index 0000000000..f95d5136ef
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/runwsserver.bat
@@ -0,0 +1,51 @@
+@echo off
+
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+
+setlocal
+
+if "%TUSCANY_SCACPP%" == "" (
+echo "TUSCANY_SCACPP not set"
+goto end
+)
+echo Using SCA installed at %TUSCANY_SCACPP%
+
+if "%TUSCANY_SDOCPP%" == "" (
+echo "TUSCANY_SDOCPP not set"
+goto end
+)
+echo Using SDO installed at %TUSCANY_SDOCPP%
+
+if "%AXIS2C_HOME%" == "" (
+echo "AXIS2C_HOME not set"
+goto end
+)
+echo Using Axis2C installed at %AXIS2C_HOME%
+
+set APFULLDIR=%~d0%~p0
+set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\
+set TUSCANY_SCACPP_DEFAULT_COMPONENT=bigbank.AccountManagementComponent
+
+rem Run the client
+set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SCACPP%\extensions\cpp\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH%
+
+cd %AXIS2C_HOME%\bin
+.\axis2_http_server.exe
+
+:end
+endlocal
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/runwsserver.sh b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/runwsserver.sh
new file mode 100755
index 0000000000..eb20a3d670
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.account/runwsserver.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+APFULLDIR=`pwd`
+
+if [ x$TUSCANY_SCACPP = x ]; then
+echo "TUSCANY_SCACPP not set"
+exit;
+fi
+echo "Using SCA installed at $TUSCANY_SCACPP"
+
+if [ x$TUSCANY_SDOCPP = x ]; then
+echo "TUSCANY_SDOCPP not set"
+exit;
+fi
+echo "Using SDO installed at $TUSCANY_SDOCPP"
+
+if [ x$AXIS2C_HOME = x ]; then
+echo "AXIS2C_HOME not set"
+exit;
+fi
+echo "Using Axis2C installed at $AXIS2C_HOME"
+
+TEST_SYSTEM=$APFULLDIR/../
+
+export LD_LIBRARY_PATH=$TUSCANY_SCACPP/extensions/cpp/lib:$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH
+
+export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM
+export TUSCANY_SCACPP_DEFAULT_COMPONENT=bigbank.AccountManagementComponent
+
+cd $AXIS2C_HOME/bin
+./axis2_http_server
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.accountmanagement.composite b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.accountmanagement.composite
new file mode 100644
index 0000000000..4bf2c35008
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.accountmanagement.composite
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ name="bigbank.accountmanagement">
+
+ <component name="bigbank.AccountManagementComponent">
+ <implementation.composite name="bigbank.account"/>
+ </component>
+
+</composite>
+ \ No newline at end of file
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.client/AccountClient.cpp b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.client/AccountClient.cpp
new file mode 100644
index 0000000000..a0b9de5f76
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.client/AccountClient.cpp
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Rev$ $Date$ */
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "AccountService.h"
+#include "osoa/sca/sca.h"
+#include <iostream>
+#include <stdlib.h>
+
+using namespace osoa::sca;
+using namespace std;
+using namespace services::account;
+using namespace commonj::sdo;
+
+int main(int argc, char* argv[])
+{
+
+ if (argc != 2)
+ {
+ cout << "account_client: Argument must be the name of the account" << endl;
+ return 0;
+ }
+ try
+ {
+
+ // Locate a service
+ CompositeContext myContext = CompositeContext::getCurrent();
+ AccountService *accountService =
+ (AccountService*) myContext.locateService("AccountServiceComponent");
+ if (accountService == 0)
+ {
+ cout << "account_client: Unable to find Account service" << endl;
+ }
+ else
+ {
+ try
+ {
+ // exercise the account service
+
+ DataObjectPtr report =
+ accountService->getAccountReport(argv[1]);
+
+ XMLHelperPtr xmlHelper = HelperProvider::getXMLHelper(myContext.getDataFactory());
+ char* doc = xmlHelper->save(report, report->getType().getURI(), report->getType().getName());
+ cout << "XML: " << doc <<endl;
+
+ if (report != 0)
+ {
+ int i;
+ char balanceStr[20];
+ float balance;
+
+ cout << "My Account Report" << endl;
+ cout << "=================" << endl;
+
+ DataObjectList& stocks = report->getList("stocks");
+
+ for (i=0;i< stocks.size() ;i++)
+ {
+ cout << "Stock Account " << stocks[i]->getCString("accountNumber") << endl;
+ cout << "Stock Symbol : " << stocks[i]->getCString("symbol") << endl;
+ cout << " Holding : " << stocks[i]->getCString("quantity") << endl;
+ balance = stocks[i]->getFloat("balance");
+ sprintf(balanceStr,"%.2f",balance);
+ cout << " Value : " << balanceStr << endl << endl;
+ }
+
+ DataObjectList& checking = report->getList("checking");
+
+ for (i=0;i< checking.size() ;i++)
+ {
+ cout << "Checking Account " << checking[i]->getCString("accountNumber") << endl;
+ balance = checking[i]->getFloat("balance");
+ sprintf(balanceStr,"%.2f",balance);
+ cout << " Balance : " << balanceStr << endl << endl;
+ }
+
+ DataObjectList& savings = report->getList("savings");
+
+ for (i=0;i< savings.size() ;i++)
+ {
+ cout << "Savings Account " << savings[i]->getCString("accountNumber") << endl;
+ balance = savings[i]->getFloat("balance");
+ sprintf(balanceStr,"%.2f",balance);
+ cout << " Balance : " << balanceStr << endl << endl;
+ }
+
+ cout << endl;
+ }
+ }
+ catch (SDORuntimeException& e)
+ {
+ cout << e << endl;
+ }
+ catch (char* x)
+ {
+ cout << "account_client: exception caught: " << x << endl;
+ }
+ }
+
+ }
+ catch (ServiceRuntimeException& ex)
+ {
+ cout << ex << endl;
+ }
+ return 0;
+}
+
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.client/Makefile.am b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.client/Makefile.am
new file mode 100644
index 0000000000..3ca7379572
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.client/Makefile.am
@@ -0,0 +1,49 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+deploydir=$(prefix)/samples/BigBank/deploy
+clientdir=$(deploydir)/bigbank.client
+
+client_PROGRAMS = account_client
+client_SCRIPTS = runclient.sh
+EXTRA_DIST = runclient.sh
+
+AM_CPPFLAGS = $(CPPFLAGS)
+account_client_SOURCES = AccountClient.cpp
+
+account_client_LDADD = -L${TUSCANY_SCACPP}/lib -ltuscany_sca \
+ -L${TUSCANY_SCACPP}/extensions/cpp/lib -ltuscany_sca_cpp \
+ -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo -ltuscany_sdo_axiom \
+ -L$(AXIS2C_HOME)/lib \
+ -laxis2_util \
+ -laxis2_axiom \
+ -laxis2_wsdl \
+ -laxis2_engine \
+ -lwoden \
+ -lwoden_wsdl \
+ -laxis2_xml_schema \
+ -laxis2_parser \
+ -laxis2_minizip \
+ -lpthread \
+ -laxis2_http_sender \
+ -laxis2_http_receiver
+
+
+INCLUDES = -I$(TUSCANY_SCACPP)/extensions/cpp/include \
+ -I${TUSCANY_SCACPP}/include \
+ -I${TUSCANY_SDOCPP}/include \
+ -I../bigbank.account
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.client/runclient.bat b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.client/runclient.bat
new file mode 100644
index 0000000000..e8907e9302
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.client/runclient.bat
@@ -0,0 +1,50 @@
+@echo off
+
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+
+setlocal
+
+if "%TUSCANY_SCACPP%" == "" (
+echo "TUSCANY_SCACPP not set"
+goto end
+)
+echo Using SCA installed at %TUSCANY_SCACPP%
+
+if "%TUSCANY_SDOCPP%" == "" (
+echo "TUSCANY_SDOCPP not set"
+goto end
+)
+echo Using SDO installed at %TUSCANY_SDOCPP%
+
+if "%AXIS2C_HOME%" == "" (
+echo "AXIS2C_HOME not set"
+goto end
+)
+echo Using Axis2C installed at %AXIS2C_HOME%
+
+set APFULLDIR=%~d0%~p0
+set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\
+set TUSCANY_SCACPP_DEFAULT_COMPONENT=bigbank.AccountManagementComponent
+
+rem Run the client
+set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SCACPP%\extensions\cpp\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH%
+
+.\AccountClient.exe 1234
+
+:end
+endlocal
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.client/runclient.sh b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.client/runclient.sh
new file mode 100755
index 0000000000..54f3c27578
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.client/runclient.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+APFULLDIR=`pwd`
+
+if [ x$TUSCANY_SCACPP = x ]; then
+echo "TUSCANY_SCACPP not set"
+exit;
+fi
+echo "Using SCA installed at $TUSCANY_SCACPP"
+
+if [ x$TUSCANY_SDOCPP = x ]; then
+echo "TUSCANY_SDOCPP not set"
+exit;
+fi
+echo "Using SDO installed at $TUSCANY_SDOCPP"
+
+if [ x$AXIS2C_HOME = x ]; then
+echo "AXIS2C_HOME not set"
+exit;
+fi
+echo "Using Axis2C installed at $AXIS2C_HOME"
+
+TEST_SYSTEM=$APFULLDIR/../
+
+export LD_LIBRARY_PATH=$TUSCANY_SCACPP/extensions/cpp/lib:$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH
+
+export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM
+export TUSCANY_SCACPP_DEFAULT_COMPONENT=bigbank.AccountManagementComponent
+
+./account_client 1234
+
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/AccountService.wsdl b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/AccountService.wsdl
new file mode 100644
index 0000000000..cbfe180692
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/AccountService.wsdl
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.bigbank.com/AccountService"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.bigbank.com/AccountService"
+ name="AccountService">
+
+ <wsdl:types>
+ <xsd:schema
+ targetNamespace="http://www.bigbank.com/AccountService"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:element name="getAccountReport">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="customerID"
+ type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="getAccountReportResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="result"
+ type="tns:AccountReport" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:complexType name="AccountReport">
+ <xsd:sequence>
+ <xsd:element name="checking"
+ type="tns:CheckingAccount" maxOccurs="unbounded" />
+ <xsd:element name="savings"
+ type="tns:SavingsAccount" maxOccurs="unbounded" />
+ <xsd:element name="stocks" type="tns:StockAccount"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="StockAccount">
+ <xsd:sequence>
+ <xsd:element name="accountNumber" type="xsd:string" />
+ <xsd:element name="symbol" type="xsd:string" />
+ <xsd:element name="quantity" type="xsd:integer" />
+ <xsd:element name="balance" type="xsd:float" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="CheckingAccount">
+ <xsd:sequence>
+ <xsd:element name="accountNumber" type="xsd:string" />
+ <xsd:element name="balance" type="xsd:float" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="SavingsAccount">
+ <xsd:sequence>
+ <xsd:element name="accountNumber" type="xsd:string" />
+ <xsd:element name="balance" type="xsd:float" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="getAccountReportRequest">
+ <wsdl:part element="tns:getAccountReport"
+ name="getAccountReportRequest" />
+ </wsdl:message>
+
+ <wsdl:message name="getAccountReportResponse">
+ <wsdl:part element="tns:getAccountReportResponse"
+ name="getAccountReportResponse" />
+ </wsdl:message>
+
+ <wsdl:portType name="AccountService">
+ <wsdl:operation name="getAccountReport">
+ <wsdl:input message="tns:getAccountReportRequest" />
+ <wsdl:output message="tns:getAccountReportResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="AccountServiceSOAP" type="tns:AccountService">
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="getAccountReport">
+ <soap:operation
+ soapAction="http://www.bigbank.com/AccountService/getAccountReport" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="AccountService">
+ <wsdl:port binding="tns:AccountServiceSOAP"
+ name="AccountServiceSOAP">
+ <soap:address
+ location="http://localhost:9090/axis2/services/AccountService" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/Makefile.am b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/Makefile.am
new file mode 100644
index 0000000000..48843d8e56
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/Makefile.am
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+deploydir=$(prefix)/samples/BigBank/deploy
+phpwsclientdir=$(deploydir)/bigbank.phpwsclient
+
+phpwsclient_DATA = *.php *.wsdl README
+EXTRA_DIST = *.php *.wsdl README
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/README b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/README
new file mode 100644
index 0000000000..d02873e860
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/README
@@ -0,0 +1,137 @@
+Big Bank PHP Client
+===================
+
+Overview
+--------
+
+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.
+
+As this is a very simple test client once you have reached bigaccount.php you are done.
+So there are no further buttons other than the browser back button.
+
+Installation
+------------
+
+This assumes that you have the BigBank sample runnig as a web service in your local
+Axis2C container at http://localhost:9090/axis2/services/AccountService
+
+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:
+
+Apache web server - http://httpd.apache.org/ (I'm currently at 2.0.55)
+PHP 5.1.6 - http://www.php.net/downloads.php (I'm currently at 5.1.6)
+PHP SDO - http://pecl.php.net/package/sdo (I'm currently at 1.0.3)
+
+Windows
+-------
+If you are on windows you can get binary builds from http://www.php.net/downloads.php.
+For SDO you need two dlls as followd
+
+php_sdo.dll http://pecl4win.php.net/ext.php/php_sdo.dll
+php_sdo_das_xml.dll http://pecl4win.php.net/ext.php/php_sdo_das_xml.dll
+
+I copied these to my php5.1.6/ext dir ( php_soap.dll is already there)
+
+And added the following to my 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:/simon/apps/php5.1.6/ext"
+
+When I ask PHP to list what modules are active in my version of PHP I get the
+following
+
+C:\simon\apps\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 sd_das_xml are active.
+
+Other Platforms
+---------------
+
+If your on on another platform, such as Linux, then you will need to compile the
+SDO extension. The documentation at the SDO extension page (http://livedocs.phpdoc.info/index.php?l=en&q=ref.sdo)
+is currently a bit missleading and needs updating. What you need to do is do a
+phpize build of the SDO PECL extension. This is discussed in the SDO documentation
+but is also discussed in many other places, for example, http://www.php.net/manual/en/install.pecl.phpize.php.
+Here is not the time to go into the details of how to build PHP extensions using
+phpize but if you are familar with the process I use the following configure line
+on windows.
+
+cscript configure.js --with-extra-includes=c:\simon\projects\tuscany\php\win32build\include;
+ c:\simon\apps\libxml2-2.6.23.win32\include;
+ c:\simon\apps\iconv-1.9.1.win32\include
+ --with-extra-libs=c:\simon\projects\tuscany\php\win32build\lib;
+ c:\simon\apps\libxml2-2.6.23.win32\lib;
+ c:\simon\apps\iconv-1.9.1.win32\lib
+ --enable-sdo=shared
+ --enable-soap
+
+There are no newlines in my command line by the way. I've just included them
+here so you can see the command.
+
+Running
+-------
+
+You need to configure Apache to run PHP of course. This is well documented but this
+is what I put at the end of httpd.conf
+
+# PHP5 Support
+LoadModule php5_module "C:/simon/apps/php5.1.6/php5apache2.dll"
+AddType application/x-httpd-php .php
+
+# configure the path to php.ini
+PHPIniDir "C:/simon/apps/php5.1.6"
+
+Having set up Apache all that remains is to
+
+- put the bigbank.phpwsclient directory in your web server's root documents directory
+- start up the Axis2C runtime configured to run BigBank
+- point your browser at http://myserver:port/bigbank.phpwsclient/bigwelcome.php
+
+You should now be able to press the "GetAccount" button and see the values
+returned from the BigBank SCA application.
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/bigaccount.php b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/bigaccount.php
new file mode 100644
index 0000000000..b9f77d3297
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/bigaccount.php
@@ -0,0 +1,113 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+$Rev$ $Date: 2005/12/22 11:33:21 $
+-->
+<head>
+ <title>BigBank Sample</title>
+</head>
+
+<body BGCOLOR="#EFEFEF">
+
+<script type="text/javascript"></script>
+
+<?php
+ try
+ {
+ // In case we want to see what's in the request
+ //print_r ($_POST);
+
+ // get the entered account name
+ $accountname = $_POST['accountname'];
+
+ try
+ {
+ // configure the SOAP client
+ $client = new SoapClient("AccountService.wsdl");
+
+ // make the call but its a wrapped call so we
+ // can't just do...
+ // $result = $client->getAccountReport($accountname);
+ // we have to construct an object hierarchy that matches the
+ // WSDL request. We can use SDO to do this for us
+
+ // configure SDO based on the WSDL
+ $xmldas = SDO_DAS_XML::create("AccountService.wsdl");
+
+ // Get a document that represents the request
+ // and get the root element
+ $requestxdoc = $xmldas->createDocument("getAccountReport");
+ $requestsdo = $requestxdoc->getRootDataObject();
+
+ // add the parameter
+ $requestsdo['customerID'] = $accountname;
+
+ // make the call
+ $result = $client->getAccountReport($requestsdo);
+
+ // now we have the result as a PHP object
+ // we can turn this into an SDO but we have to do it manually
+ // as the SOAP extension won't generate types for us
+ // automatically just yet
+ $responsexdoc = $xmldas->createDocument("getAccountReportResponse");
+ $responsesdo = $responsexdoc->getRootDataObject();
+
+ // flesh out the object hierarchy
+ $account = $responsesdo->createDataObject ('result');
+ $checking = $account->createDataObject ('checking');
+ $saving = $account->createDataObject ('savings');
+ $stocks = $account->createDataObject ('stocks');
+
+ //copy the data
+ $checking['accountNumber'] = $result->result->checking->accountNumber;
+ $checking['balance'] = $result->result->checking->balance;
+ //etc..
+ // This is a bit rubbish as we would want this to happen automatically
+
+ // Now just put the data on the screen
+ // To do this we don't need to use SDO as you can see but
+ // it would be really handy if we wanted to pass the XML doc
+ // onto another service or if we wanted to do some other
+ // more complex XML manipulation or XPath searches
+ echo "<h2>Account $accountname</h2>";
+ echo "<h2>Checking Account</h2><table>";
+ echo "<tr><td>Account Number</td><td> $checking->accountNumber </td></tr>";
+ echo "<tr><td>Balance</td><td> $checking->balance </td></tr>";
+ echo "</table><h2>Saving Account</h2><table>";
+ echo "<tr><td>Account Number</td><td>" . $result->result->savings->accountNumber . "</td></tr>";
+ echo "<tr><td>Balance</td><td>" . $result->result->savings->balance . "</td></tr>";
+ echo "</table><h2>Stock Account</h2><table>";
+ echo "<tr><td>Account Number</td><td>" . $result->result->stocks->accountNumber . "</td></tr>";
+ echo "<tr><td>Symbol</td><td>" . $result->result->stocks->symbol . "</td></tr>";
+ echo "<tr><td>Quantity</td><td>" . $result->result->stocks->quantity . "</td></tr>";
+ echo "<tr><td>Banalce</td><td>" . $result->result->stocks->balance . "</td></tr>";
+ echo "</table>";
+ }
+ catch (SoapFault $f)
+ {
+ echo "Caught soap exception: \n";
+ print_r ( $f );
+ }
+ }
+ catch ( Exception $e )
+ {
+ echo "Caught exception: \n";
+ print_r ( $e );
+
+ }
+?>
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/bigwelcome.php b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/bigwelcome.php
new file mode 100644
index 0000000000..32159ddc16
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.phpwsclient/bigwelcome.php
@@ -0,0 +1,44 @@
+<html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+$Rev$ $Date: 2005/12/22 11:33:21 $
+-->
+<head>
+ <title>BigBank Sample</title>
+</head>
+
+<body BGCOLOR="#EFEFEF">
+
+<script type="text/javascript"></script>
+
+<?php
+define('APP_ROOT', $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].'/bigbank.phpwsclient');
+?>
+
+<h1>Welcome To The BigBank Sample</h1>
+
+ <form action="http://<?php echo APP_ROOT . '/bigaccount.php' ?>" method="POST">
+ Please enter your account ID
+ <input type="text" name="accountname" size="30" value="ED" />
+ <button type="submit">GetAccount</button>
+ </form>
+
+ <div id="statusString"/>
+</body>
+</html>
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/AccountWSClient.cpp b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/AccountWSClient.cpp
new file mode 100644
index 0000000000..b31959170f
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/AccountWSClient.cpp
@@ -0,0 +1,184 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Rev$ $Date$ */
+
+#include "axis2_Account_stub.h"
+#include <stdio.h>
+#include <axiom.h>
+#include <axis2_util.h>
+#include <axiom_soap.h>
+#include <axis2_client.h>
+
+axiom_node_t *
+build_om_programatically(const axis2_env_t *env,
+ const axis2_char_t *operation,
+ const axis2_char_t *param1
+ );
+
+int main(int argc, char** argv)
+{
+ axis2_stub_t *stub = NULL;
+ axiom_node_t *node = NULL;
+ axis2_status_t status = AXIS2_FAILURE;
+ const axis2_env_t *env = NULL;
+ const axis2_char_t *address = NULL;
+ const axis2_char_t *client_home = NULL;
+ axiom_node_t *ret_node = NULL;
+
+ const axis2_char_t *operation = "getAccountReport";
+ const axis2_char_t *param1 = "ED";
+
+ env = axis2_env_create_all( "BigBank_blocking.log", AXIS2_LOG_LEVEL_TRACE);
+
+ client_home = AXIS2_GETENV("AXIS2C_HOME");
+ if (!client_home)
+ client_home = "../../deploy";
+
+ address = "http://localhost:9090/axis2/services/AccountService";
+ if (argc > 1 )
+ operation = argv[1];
+ if (AXIS2_STRCMP(operation, "-h") == 0)
+ {
+ printf("Usage : %s [operation] [param1] [endpoint_url]\n", argv[0]);
+ printf("use -h for help\n");
+ printf("default operation add\n");
+ printf("default param1 %s\n", param1);
+ printf("default endpoint_url %s\n", address);
+ printf("NOTE: command line arguments must appear in given order, with trailing ones being optional\n");
+ return 0;
+ }
+ if (argc > 2 )
+ param1 = argv[2];
+ if (argc > 3 )
+ address = argv[3];
+
+ printf ("Using endpoint : %s\n", address);
+ printf ("\nInvoking operation %s with param %s \n", operation, param1);
+
+ node = build_om_programatically(env, operation, param1);
+ stub =
+ axis2_Account_stub_create_with_endpoint_uri_and_client_home(env, address, client_home);
+ /* create node and invoke Calculator */
+ ret_node = axis2_Account_stub_getAccountReport(stub, env, node);
+ if(ret_node)
+ {
+ axis2_char_t *om_str = NULL;
+ om_str = AXIOM_NODE_TO_STRING(ret_node, env);
+ if(om_str)
+ {
+ printf("\nOM returned = %s\n", om_str);
+ }
+
+ //if (AXIOM_NODE_GET_NODE_TYPE(ret_node, env) == AXIOM_ELEMENT)
+ //{
+ // axis2_char_t *result = NULL;
+ // axiom_node_t *result_node = (axiom_node_t*)AXIOM_NODE_GET_FIRST_CHILD(ret_node, env);
+ // axiom_element_t *data_ele = (axiom_element_t*)AXIOM_NODE_GET_DATA_ELEMENT(result_node, env);
+
+ // result = AXIOM_ELEMENT_GET_TEXT(data_ele, env, result_node);
+ // printf( "\nResult = %s\n", result);
+ //}
+ //else
+ //{
+ // axiom_xml_writer_t *writer = NULL;
+ // axiom_output_t *om_output = NULL;
+ // axis2_char_t *buffer = NULL;
+ // writer = axiom_xml_writer_create_for_memory(env, NULL, AXIS2_TRUE, 0,
+ // AXIS2_XML_PARSER_TYPE_BUFFER);
+ // om_output = axiom_output_create (env, writer);
+
+ // AXIOM_NODE_SERIALIZE (ret_node, env, om_output);
+ // buffer = (axis2_char_t*)AXIOM_XML_WRITER_GET_XML(writer, env);
+ // printf ("\nReceived invalid OM as result : %s\n", buffer);
+ // if(NULL != buffer)
+ // {
+ // AXIS2_FREE(env->allocator, buffer);
+ // buffer = NULL;
+ // }
+ // if(NULL != om_output)
+ // {
+ // AXIOM_OUTPUT_FREE(om_output, env);
+ // om_output = NULL;
+ // }
+ //}
+ }
+ else
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
+ " %d :: %s", env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
+ printf("Account stub invoke FAILED!\n");
+ }
+ if (stub)
+ {
+ AXIS2_STUB_FREE(stub, env);
+ }
+ return status;
+}
+
+axiom_node_t *
+build_om_programatically(const axis2_env_t *env,
+ const axis2_char_t *operation,
+ const axis2_char_t *param1
+ )
+{
+ axiom_node_t *Account_om_node = NULL;
+ axiom_element_t* Account_om_ele = NULL;
+ axiom_node_t* text_om_node = NULL;
+ axiom_element_t * text_om_ele = NULL;
+ axiom_node_t* first_om_node = NULL;
+ axiom_element_t * first_om_ele = NULL;
+ axiom_namespace_t *ns1 = NULL;
+
+
+ axiom_xml_writer_t *xml_writer = NULL;
+ axiom_output_t *om_output = NULL;
+ axis2_char_t *buffer = NULL;
+
+ ns1 = axiom_namespace_create (env, "http://www.bigbank.com/AccountService", "ns1");
+
+ Account_om_ele = axiom_element_create(env, NULL, operation, ns1, &Account_om_node);
+
+ first_om_ele = axiom_element_create(env, Account_om_node, "customerID", NULL, &first_om_node);
+
+ text_om_ele = axiom_element_create(env, first_om_node, "customerID", NULL, &text_om_node);
+
+ AXIOM_ELEMENT_SET_TEXT(text_om_ele, env, param1, text_om_node);
+
+ xml_writer = axiom_xml_writer_create_for_memory(env, NULL, AXIS2_FALSE, AXIS2_FALSE,
+ AXIS2_XML_PARSER_TYPE_BUFFER);
+ om_output = axiom_output_create( env, xml_writer);
+
+ AXIOM_NODE_SERIALIZE(Account_om_node, env, om_output);
+ buffer = (axis2_char_t*)AXIOM_XML_WRITER_GET_XML(xml_writer, env);
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "\nSending OM node in XML : %s \n", buffer);
+ if(NULL != buffer)
+ {
+ AXIS2_FREE(env->allocator, buffer);
+ buffer = NULL;
+ }
+ if(NULL != om_output)
+ {
+ AXIOM_OUTPUT_FREE(om_output, env);
+ om_output = NULL;
+ }
+
+ return Account_om_node;
+}
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/Makefile.am b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/Makefile.am
new file mode 100644
index 0000000000..c9b565dc0c
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/Makefile.am
@@ -0,0 +1,44 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+deploydir=$(prefix)/samples/BigBank/deploy
+wsclientdir=$(deploydir)/bigbank.wsclient
+
+wsclient_PROGRAMS = account_wsclient
+wsclient_SCRIPTS = runwsclient.sh
+EXTRA_DIST = runwsclient.sh
+
+AM_CPPFLAGS = $(CPPFLAGS)
+account_wsclient_SOURCES = axis2_Account_stub.cpp AccountWSClient.cpp
+noinst_HEADERS = *.h
+
+account_wsclient_LDADD = -L$(AXIS2C_HOME)/lib \
+ -laxis2_util \
+ -laxis2_axiom \
+ -laxis2_wsdl \
+ -laxis2_engine \
+ -lwoden \
+ -lwoden_wsdl \
+ -laxis2_xml_schema \
+ -laxis2_parser \
+ -laxis2_minizip \
+ -lpthread \
+ -laxis2_http_sender \
+ -laxis2_http_receiver
+
+
+INCLUDES = -I${AXIS2C_HOME}/include
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/axis2_Account_stub.cpp b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/axis2_Account_stub.cpp
new file mode 100644
index 0000000000..a219003a75
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/axis2_Account_stub.cpp
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Rev$ $Date$ */
+
+#include "axis2_Account_stub.h"
+
+
+axis2_stub_t *
+axis2_Account_stub_create_with_endpoint_ref_and_client_home(const axis2_env_t *env,
+ axis2_endpoint_ref_t *endpoint_ref,
+ axis2_char_t *client_home)
+{
+ axis2_stub_t *stub = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+
+ stub = (axis2_stub_t *)
+ axis2_stub_create_with_endpoint_ref_and_client_home(env, endpoint_ref,
+ client_home);
+ if(NULL == stub)
+ {
+ AXIS2_ERROR_SET(env->error,
+ AXIS2_ERROR_NO_MEMORY, (axis2_status_codes)AXIS2_FAILURE);
+ return NULL;
+ }
+ axis2_populate_axis_service( stub, env);
+ return stub;
+}
+
+void axis2_populate_axis_service( axis2_stub_t* stub, const axis2_env_t *env)
+{
+ axis2_svc_client_t* svc_client = NULL;
+ axis2_qname_t *op_qname = NULL;
+ axis2_svc_t* svc = NULL;
+ axis2_op_t* op = NULL;
+
+ /*Modifying the Service*/
+ svc_client = AXIS2_STUB_GET_SVC_CLIENT (stub, env );
+ svc = (axis2_svc_t*)AXIS2_SVC_CLIENT_GET_AXIS_SERVICE ( svc_client, env );
+
+ /*creating the operations*/
+
+ op_qname = axis2_qname_create(env,"getAccountReport" , "", NULL);
+ op = axis2_op_create_with_qname(env, op_qname);
+ AXIS2_OP_SET_MSG_EXCHANGE_PATTERN(op, env, AXIS2_MEP_URI_OUT_IN);
+ AXIS2_SVC_ADD_OP(svc, env, op);
+
+ }
+
+axis2_stub_t *
+axis2_Account_stub_create_with_endpoint_uri_and_client_home(const axis2_env_t *env,
+ const axis2_char_t *endpoint_uri,
+ const axis2_char_t *client_home)
+{
+ axis2_stub_t *stub = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+
+ stub = (axis2_stub_t *)
+ axis2_stub_create_with_endpoint_uri_and_client_home(env, endpoint_uri,
+ client_home);
+ if(NULL == stub)
+ {
+ AXIS2_ERROR_SET(env->error,
+ AXIS2_ERROR_NO_MEMORY, (axis2_status_codes)AXIS2_FAILURE);
+ return NULL;
+ }
+
+ axis2_populate_axis_service( stub, env);
+
+ return stub;
+}
+
+/***************************Function implementation****************************/
+
+axiom_node_t *
+axis2_Account_stub_getAccountReport(axis2_stub_t *stub,
+ const axis2_env_t *env,
+ axiom_node_t *node)
+{
+ axis2_svc_client_t *svc_client = NULL;
+ axiom_node_t *ret_node = NULL;
+ axis2_qname_t *op_qname = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ svc_client = AXIS2_STUB_GET_SVC_CLIENT(stub, env);
+ op_qname = axis2_qname_create(env, "getAccountReport" , "", NULL);
+ ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME( svc_client, env, op_qname, node);
+
+ return ret_node;
+}
+
+
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/axis2_Account_stub.h b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/axis2_Account_stub.h
new file mode 100644
index 0000000000..f16b6d3a06
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/axis2_Account_stub.h
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Rev$ $Date$ */
+
+#ifndef AXIS2_ECHO_STUB_H
+#define AXIS2_ECHO_STUB_H
+
+/**
+ * @file axis2_Calculator_stub.h
+ * @brief axis2 Calculator stub interface
+ */
+
+#include <axis2_stub.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+axiom_node_t *
+axis2_Account_stub_getAccountReport(axis2_stub_t *stub,
+ const axis2_env_t *env,
+ axiom_node_t *node);
+
+/**
+ * populate services
+ */
+void axis2_populate_axis_service( axis2_stub_t* stub, const axis2_env_t *env);
+
+/**
+ * Creates axis2_stub struct
+ * @param endpoint reference
+ * @return pointer to newly created axis2_stub struct
+ */
+axis2_stub_t *
+axis2_Account_stub_create_with_endpoint_ref_and_client_home(const axis2_env_t *env,
+ axis2_endpoint_ref_t *endpoint_ref,
+ axis2_char_t *client_home);
+
+/**
+ * Creates axis2_stub struct
+ * @param endpoint uri
+ * @return pointer to newly created axis2_stub struct
+ */
+axis2_stub_t *
+axis2_Account_stub_create_with_endpoint_uri_and_client_home(const axis2_env_t *env,
+ const axis2_char_t *endpoint_uri,
+ const axis2_char_t *client_home);
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_ECHO_STUB_H */
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/runwsclient.bat b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/runwsclient.bat
new file mode 100644
index 0000000000..aa3f7d6dad
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/runwsclient.bat
@@ -0,0 +1,32 @@
+@echo off
+
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+
+
+setlocal
+
+if "%AXIS2C_HOME%" == "" (
+echo "AXIS2C_HOME not set"
+goto end
+)
+echo Using Axis2C installed at %AXIS2C_HOME%"
+
+rem Run the client
+WSAccountClient.exe %*
+:end
+endlocal
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/runwsclient.sh b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/runwsclient.sh
new file mode 100755
index 0000000000..fa7d7d6813
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/bigbank.wsclient/runwsclient.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+APFULLDIR=`pwd`
+
+if [ x$AXIS2C_HOME = x ]; then
+echo "AXIS2C_HOME not set"
+exit;
+fi
+echo "Using Axis2C installed at $AXIS2C_HOME"
+
+export LD_LIBRARY_PATH=$AXIS2C_HOME/lib:$LD_LIBRARY_PATH
+
+./account_wsclient
+
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/deploy.bat b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/deploy.bat
new file mode 100644
index 0000000000..2f1bdf1423
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/deploy.bat
@@ -0,0 +1,67 @@
+@echo off
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+
+rem Will copy the correct files from the source tree for packaging and deployment of the
+rem SCA BigBank sample.
+
+setlocal
+
+if . == .%1 (
+echo source path not specified
+goto usage
+)
+set srcdir=%1
+
+if . == .%2 (
+echo input directory not specified
+goto usage
+)
+set inpath=%2
+echo %inpath%
+
+set package=bigbank.account
+
+set deploydir=%TUSCANY_SCACPP%
+set samplesdir=%deploydir%\samples
+set bbdir=%samplesdir%\BigBank
+set bbdeploydir=%bbdir%\deploy
+set samplebb=%bbdeploydir%\%package%
+
+if not exist %samplesdir% mkdir %samplesdir%
+if not exist %bbdir% mkdir %bbdir%
+if not exist %bbdeploydir% mkdir %bbdeploydir%
+if not exist %samplebb% mkdir %samplebb%
+
+set samplebbsrc=%srcdir%\%package%
+copy %srcdir%\bigbank.accountmanagement.composite %bbdeploydir%
+copy %samplebbsrc%\*.wsdl %samplebb%
+copy %samplebbsrc%\*.composite %samplebb%
+copy %samplebbsrc%\*.componentType %samplebb%
+copy %samplebbsrc%\runwsserver.bat %samplebb%
+
+set library=Account
+copy %inpath%\%library%.dll %samplebb%
+
+if exist %inpath%\%library%.pdb copy %inpath%\%library%.pdb %samplebb%
+
+goto end
+:usage
+echo Usage: deploy <sample-src> <build-output>
+:end
+
+endlocal
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/deployclient.bat b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/deployclient.bat
new file mode 100644
index 0000000000..1f47e5ab13
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/deployclient.bat
@@ -0,0 +1,63 @@
+@echo off
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+
+rem Will copy the correct files from the source tree for packaging and deployment of the
+rem SCA BigBank sample.
+
+setlocal
+
+if . == .%1 (
+echo source path not specified
+goto usage
+)
+set srcdir=%1
+
+if . == .%2 (
+echo input directory not specified
+goto usage
+)
+set inpath=%2
+echo %inpath%
+
+set package=bigbank.client
+
+set deploydir=%TUSCANY_SCACPP%
+set samplesdir=%deploydir%\samples
+set bbdir=%samplesdir%\BigBank
+set bbdeploydir=%bbdir%\deploy
+set clientdir=%bbdeploydir%\%package%
+
+if not exist %samplesdir% mkdir %samplesdir%
+if not exist %bbdir% mkdir %bbdir%
+if not exist %bbdeploydir% mkdir %bbdeploydir%
+if not exist %clientdir% mkdir %clientdir%
+
+set clientdirsrc=%srcdir%\%package%
+copy %clientdirsrc%\runclient.bat %clientdir%
+
+set library=AccountClient
+copy %inpath%\%library%.exe %clientdir%
+
+if exist %inpath%\%library%.pdb copy %inpath%\%library%.pdb %clientdir%
+
+goto end
+:usage
+echo Usage: deploy <sample-src> <build-output>
+:end
+
+endlocal
diff --git a/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/deploywsclient.bat b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/deploywsclient.bat
new file mode 100644
index 0000000000..3e2ce687fe
--- /dev/null
+++ b/sca-cpp/tags/cpp-1.0-incubating-M2-final/sca/samples/BigBank/deploywsclient.bat
@@ -0,0 +1,63 @@
+@echo off
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+
+rem Will copy the correct files from the source tree for packaging and deployment of the
+rem SCA BigBank sample.
+
+setlocal
+
+if . == .%1 (
+echo source path not specified
+goto usage
+)
+set srcdir=%1
+
+if . == .%2 (
+echo input directory not specified
+goto usage
+)
+set inpath=%2
+echo %inpath%
+
+set package=bigbank.wsclient
+
+set deploydir=%TUSCANY_SCACPP%
+set samplesdir=%deploydir%\samples
+set bbdir=%samplesdir%\BigBank
+set bbdeploydir=%bbdir%\deploy
+set clientdir=%bbdeploydir%\%package%
+
+if not exist %samplesdir% mkdir %samplesdir%
+if not exist %bbdir% mkdir %bbdir%
+if not exist %bbdeploydir% mkdir %bbdeploydir%
+if not exist %clientdir% mkdir %clientdir%
+
+set clientdirsrc=%srcdir%\%package%
+copy %clientdirsrc%\runwsclient.bat %clientdir%
+
+set library=WSAccountClient
+copy %inpath%\%library%.exe %clientdir%
+
+if exist %inpath%\%library%.pdb copy %inpath%\%library%.pdb %clientdir%
+
+goto end
+:usage
+echo Usage: deploy <sample-src> <build-output>
+:end
+
+endlocal