diff options
Diffstat (limited to 'tags/cpp-0.1.incubating-M1-RC3/sca/samples/BigBank/AccountClient')
3 files changed, 0 insertions, 264 deletions
diff --git a/tags/cpp-0.1.incubating-M1-RC3/sca/samples/BigBank/AccountClient/AccountClient.cpp b/tags/cpp-0.1.incubating-M1-RC3/sca/samples/BigBank/AccountClient/AccountClient.cpp deleted file mode 100644 index 004c02fd9e..0000000000 --- a/tags/cpp-0.1.incubating-M1-RC3/sca/samples/BigBank/AccountClient/AccountClient.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/* - * - * 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 "..\Accounts\AccountService.h" -#include "osoa/sca/sca.h" -#include <iostream> -#include <stdlib.h> - -using namespace osoa::sca; -using namespace std; -using namespace com::bigbank::account; -using namespace commonj::sdo; - -int main(int argc, char* argv[]) -{ - - if (argc != 2) - { - cout << "AccountClient.exe: Argument must be the name of the account" << endl; - return 0; - } - try - { - - // Locate a service - ModuleContext myContext = ModuleContext::getCurrent(); - AccountService *accountService = - (AccountService*) myContext.locateService("AccountServiceComponent"); - if (accountService == 0) - { - cout << "AccountClient.exe: Unable to find Account service" << endl; - } - else - { - try - { - // exercise the account service - - DataFactoryPtr mdg = DataFactory::getDataFactory(); - - XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg); - - xsh->defineFile("AccountService.wsdl"); - - DataObjectPtr in = mdg->create("http://www.bigbank.com/AccountService","cid"); - in->setCString("customerID",argv[1]); - - DataObjectPtr report = - accountService->getAccountReport(in); - - 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 << "AccountService.exe: exception caught: " << x << endl; - } - } - - } - catch (ServiceRuntimeException& ex) - { - cout << ex << endl; - } - return 0; -} - diff --git a/tags/cpp-0.1.incubating-M1-RC3/sca/samples/BigBank/AccountClient/AccountClient.dsp b/tags/cpp-0.1.incubating-M1-RC3/sca/samples/BigBank/AccountClient/AccountClient.dsp deleted file mode 100644 index cf1c043ae2..0000000000 --- a/tags/cpp-0.1.incubating-M1-RC3/sca/samples/BigBank/AccountClient/AccountClient.dsp +++ /dev/null @@ -1,102 +0,0 @@ -# Microsoft Developer Studio Project File - Name="AccountClient" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=AccountClient - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "AccountClient.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "AccountClient.mak" CFG="AccountClient - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "AccountClient - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "AccountClient - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "AccountClient - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "AccountClient - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(TUSCANY_SDOCPP)/include" /I "$(TUSCANY_SCACPP)/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# SUBTRACT CPP /X
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sdo.lib tuscany_sca.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"Accounts" /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SDOCPP)/lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "AccountClient - Win32 Release"
-# Name "AccountClient - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\AccountClient.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/tags/cpp-0.1.incubating-M1-RC3/sca/samples/BigBank/AccountClient/AccountClient.plg b/tags/cpp-0.1.incubating-M1-RC3/sca/samples/BigBank/AccountClient/AccountClient.plg deleted file mode 100644 index c378b0a81b..0000000000 --- a/tags/cpp-0.1.incubating-M1-RC3/sca/samples/BigBank/AccountClient/AccountClient.plg +++ /dev/null @@ -1,32 +0,0 @@ -<html>
-<body>
-<pre>
-<h1>Build Log</h1>
-<h3>
---------------------Configuration: AccountClient - Win32 Debug--------------------
-</h3>
-<h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP3EF.tmp" with contents
-[
-/nologo /MLd /W3 /Gm /GX /ZI /Od /I "c:\apache\apache_checkout\cpp\sdo\deploy/include" /I "c:\apache\apache_checkout\cpp\sca\deploy/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/AccountClient.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"C:\apache\apache_checkout\cpp\sca\samples\BigBank\AccountClient\AccountClient.cpp"
-]
-Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP3EF.tmp"
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP3F0.tmp" with contents
-[
-kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tuscany_sdo.lib tuscany_sca.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/AccountClient.pdb" /debug /machine:I386 /out:"Debug/AccountClient.exe" /pdbtype:sept /libpath:"Accounts" /libpath:"c:\apache\apache_checkout\cpp\sca\deploy/lib" /libpath:"c:\apache\apache_checkout\cpp\sdo\deploy/lib"
-.\Debug\AccountClient.obj
-]
-Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP3F0.tmp"
-<h3>Output Window</h3>
-Compiling...
-AccountClient.cpp
-Linking...
-
-
-
-<h3>Results</h3>
-AccountClient.exe - 0 error(s), 0 warning(s)
-</pre>
-</body>
-</html>
|