summaryrefslogtreecommitdiffstats
path: root/branches/cpp-M1/sca
diff options
context:
space:
mode:
authordims <dims@13f79535-47bb-0310-9956-ffa450edef68>2008-06-17 00:23:01 +0000
committerdims <dims@13f79535-47bb-0310-9956-ffa450edef68>2008-06-17 00:23:01 +0000
commitbdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a (patch)
tree38a92061c0793434c4be189f1d70c3458b6bc41d /branches/cpp-M1/sca
Move Tuscany from Incubator to top level.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--branches/cpp-M1/sca/AUTHORS0
-rwxr-xr-xbranches/cpp-M1/sca/COPYING203
-rw-r--r--branches/cpp-M1/sca/ChangeLog0
-rw-r--r--branches/cpp-M1/sca/Developers Guide.txt346
-rw-r--r--branches/cpp-M1/sca/GettingStarted.html244
-rw-r--r--branches/cpp-M1/sca/INSTALL2
-rwxr-xr-xbranches/cpp-M1/sca/LICENSE177
-rw-r--r--branches/cpp-M1/sca/Makefile.am36
-rw-r--r--branches/cpp-M1/sca/NEWS0
-rw-r--r--branches/cpp-M1/sca/NOTICE2
-rw-r--r--branches/cpp-M1/sca/README69
-rwxr-xr-xbranches/cpp-M1/sca/autogen.sh14
-rw-r--r--branches/cpp-M1/sca/build.bat30
-rwxr-xr-xbranches/cpp-M1/sca/build.sh40
-rw-r--r--branches/cpp-M1/sca/configure.ac55
-rw-r--r--branches/cpp-M1/sca/doc/CreatingSCACPPComponents.txt281
-rw-r--r--branches/cpp-M1/sca/doc/WSEntrypoint.txt272
-rw-r--r--branches/cpp-M1/sca/doc/css/maven-base.css147
-rw-r--r--branches/cpp-M1/sca/doc/css/maven-theme.css125
-rwxr-xr-xbranches/cpp-M1/sca/makebindist.sh47
-rwxr-xr-xbranches/cpp-M1/sca/makedist.sh42
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/build.cmd19
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca.dsw98
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca.ncbbin0 -> 844800 bytes
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca.optbin0 -> 70144 bytes
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca/Build Instructions.txt30
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca/tuscany_sca.dsp537
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca/tuscany_sca.mak669
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment36
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType30
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType36
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueService.wsdl65
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl120
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteTypes.xsd37
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config26
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/sca.module50
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/subsystems/SubSystem1/sca.subsystem27
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/tuscany_sca_test.dsp104
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/tuscany_sca_test.mak353
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.dsp133
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.mak264
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.dsp153
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.mak284
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.dsp125
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.mak283
-rw-r--r--branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_ws_service_axis2/tuscany_sca_ws_service_axis2.vcproj145
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca.sln52
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca.suobin0 -> 15360 bytes
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca/Build Instructions.txt30
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca/tuscany_sca.vcproj520
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.dllbin0 -> 9216 bytes
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment36
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.pdbbin0 -> 470016 bytes
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType30
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValue.dllbin0 -> 15360 bytes
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValue.pdbbin0 -> 519168 bytes
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType36
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueService.wsdl65
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl120
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteTypes.xsd37
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config26
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/sca.module50
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/subsystems/SubSystem1/sca.subsystem27
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/tuscany_sca_test.vcproj142
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.vcproj166
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.vcproj181
-rw-r--r--branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.vcproj161
-rw-r--r--branches/cpp-M1/sca/runtime/Makefile.am1
-rw-r--r--branches/cpp-M1/sca/runtime/core/Makefile.am1
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/Makefile.am103
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/osoa/sca/ComponentContext.cpp132
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/osoa/sca/ComponentContext.h105
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/osoa/sca/ComponentContextImpl.cpp270
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/osoa/sca/ComponentContextImpl.h120
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/osoa/sca/ModuleContext.cpp93
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/osoa/sca/ModuleContext.h80
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/osoa/sca/ModuleContextImpl.cpp102
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/osoa/sca/ModuleContextImpl.h71
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/osoa/sca/SCA.cpp21
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/osoa/sca/ServiceList.cpp105
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/osoa/sca/ServiceList.h84
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/osoa/sca/ServiceRuntimeException.cpp208
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/osoa/sca/ServiceRuntimeException.h236
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/osoa/sca/export.h39
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/osoa/sca/sca.h29
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.cpp204
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.h156
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.cpp102
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.h81
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/Operation.cpp266
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/Operation.h177
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/SCAEntryPoint.cpp210
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/SCAEntryPoint.h122
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp355
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/SCARuntime.h195
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp121
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.h89
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.cpp55
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.h73
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.cpp100
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.h85
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Binding.cpp44
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Binding.h85
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/CPPImplementation.cpp54
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/CPPImplementation.h125
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/CPPInterface.cpp67
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/CPPInterface.h143
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Component.cpp305
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Component.h202
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/EntryPoint.cpp101
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/EntryPoint.h158
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ExternalService.cpp55
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ExternalService.h97
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Implementation.cpp44
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Implementation.h66
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Interface.cpp44
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Interface.h65
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp1702
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ModelLoader.h105
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Module.cpp235
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Module.h235
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Service.cpp47
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Service.h81
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ServiceReference.cpp89
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ServiceReference.h136
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Subsystem.cpp122
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Subsystem.h131
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/System.cpp118
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/System.h89
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WSBinding.cpp127
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WSBinding.h106
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Wire.cpp46
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Wire.h91
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WireTarget.cpp49
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WireTarget.h106
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Wsdl.cpp356
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Wsdl.h129
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WsdlOperation.cpp56
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WsdlOperation.h141
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/DefaultLogWriter.cpp43
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/DefaultLogWriter.h46
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Exceptions.h48
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/File.cpp221
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/File.h133
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/FileLogWriter.cpp49
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/FileLogWriter.h53
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Library.cpp122
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Library.h97
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/LogWriter.cpp32
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/LogWriter.h47
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Logger.cpp107
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Logger.h89
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Logging.h57
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Utils.cpp215
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Utils.h61
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/ws/EntryPointProxy.cpp677
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/ws/EntryPointProxy.h63
-rw-r--r--branches/cpp-M1/sca/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.h47
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/CustomerInfo/.cdtbuild41
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/CustomerInfo/.cdtproject15
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/CustomerInfo/.project19
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/CustomerInfo/.settings/org.eclipse.cdt.managedbuilder.core.prefs9
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfo.h30
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl.cpp80
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl.h36
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.cpp63
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.h38
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp72
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/CustomerInfo/Makefile.am15
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/Makefile.am28
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/MyValue/.cdtbuild43
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/MyValue/.cdtproject15
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/MyValue/.project19
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/MyValue/.settings/org.eclipse.cdt.managedbuilder.core.prefs9
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/MyValue/Makefile.am18
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/MyValue/MyValue.h34
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl.cpp150
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl.h39
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.cpp91
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.h41
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.cpp91
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.cpp63
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.h38
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.cpp63
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.h38
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/MyValue/StockQuoteService.h32
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/src/.cdtbuild69
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/src/.cdtproject15
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/src/.project19
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs9
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/src/Makefile.am12
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/src/TestSCA.cpp86
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment36
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType30
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType36
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl135
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/StockQuoteTypes.xsd37
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config25
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/sca.module50
-rw-r--r--branches/cpp-M1/sca/runtime/core/test/testSCASystem/subsystems/SubSystem1/sca.subsystem27
-rw-r--r--branches/cpp-M1/sca/runtime/ws_reference/Makefile.am1
-rw-r--r--branches/cpp-M1/sca/runtime/ws_reference/axis2c/Makefile.am1
-rw-r--r--branches/cpp-M1/sca/runtime/ws_reference/axis2c/src/Axis2Client.cpp362
-rw-r--r--branches/cpp-M1/sca/runtime/ws_reference/axis2c/src/Axis2Client.h68
-rw-r--r--branches/cpp-M1/sca/runtime/ws_reference/axis2c/src/Makefile.am26
-rw-r--r--branches/cpp-M1/sca/runtime/ws_reference/axis2c/src/WSServiceWrapper.cpp71
-rw-r--r--branches/cpp-M1/sca/runtime/ws_service/Makefile.am1
-rw-r--r--branches/cpp-M1/sca/runtime/ws_service/axis2c/Makefile.am1
-rw-r--r--branches/cpp-M1/sca/runtime/ws_service/axis2c/src/Axis2EntryPointService_skeleton.cpp253
-rw-r--r--branches/cpp-M1/sca/runtime/ws_service/axis2c/src/Axis2Utils.cpp66
-rw-r--r--branches/cpp-M1/sca/runtime/ws_service/axis2c/src/Axis2Utils.h41
-rw-r--r--branches/cpp-M1/sca/runtime/ws_service/axis2c/src/Makefile.am27
-rw-r--r--branches/cpp-M1/sca/samples/AUTHORS0
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/AccountClient/AccountClient.cpp130
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/AccountClient/AccountClient.dsp102
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataService.h62
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl.componentType26
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl.cpp140
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl.h61
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl_AccountDataService_Proxy.cpp87
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl_AccountDataService_Proxy.h36
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl_AccountDataService_Wrapper.cpp86
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl_AccountDataService_Wrapper.h36
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountService.h58
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountService.wsdl97
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl.componenttype39
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl.cpp186
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl.h58
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountDataService_Proxy.cpp87
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountDataService_Proxy.h40
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountService_Proxy.cpp67
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountService_Proxy.h34
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountService_Wrapper.cpp73
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountService_Wrapper.h36
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_stockQuote_Proxy.cpp67
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_stockQuote_Proxy.h34
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/Accounts.dsp250
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteExternalService.h24
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteService.h24
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteService.wsdl68
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl.componentType32
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl.cpp63
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl.h25
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteExternal_Proxy.cpp67
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteExternal_Proxy.h34
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteService_Proxy.cpp67
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteService_Proxy.h34
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteService_Wrapper.cpp74
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteService_Wrapper.h36
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/sca.module53
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/Accounts/sca.subsystem27
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/BigBank.dsw53
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/BigBank.ncbbin0 -> 230400 bytes
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/WSAccountClient/Tuscany-model.config24
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/WSAccountClient/WSAccountClient.cpp179
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/WSAccountClient/WSAccountClient.dsp109
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/WSAccountClient/axis2_Account_stub.cpp106
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/WSAccountClient/axis2_Account_stub.h66
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/WSAccountClient/services.xml30
-rw-r--r--branches/cpp-M1/sca/samples/BigBank/deploy.bat16
-rwxr-xr-xbranches/cpp-M1/sca/samples/COPYING203
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/Calculator.h31
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/Calculator.wsdl161
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl.componentType30
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl.cpp85
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl.h37
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorDivideService_Proxy.cpp64
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorDivideService_Proxy.h38
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Proxy.cpp97
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Proxy.h41
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Wrapper.cpp94
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideService.h29
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.componentType10
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.cpp44
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.h34
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Proxy.cpp64
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Proxy.h38
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Wrapper.cpp73
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/Makefile.am35
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/Tuscany-model.config23
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/sca.module47
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/sca.module.lin42
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorModule/services.xml42
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/CalculatorSubsystem/sca.subsystem23
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/Client/Calc.cpp172
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/Client/Calculator.h32
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/Client/Makefile.am27
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/Client/readme.txt64
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/Client/runclient.cmd51
-rwxr-xr-xbranches/cpp-M1/sca/samples/Calculator/Client/runclient.sh47
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/Makefile.am4
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/WSClient/Calculator_Client.cpp181
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/WSClient/Makefile.am24
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/WSClient/axis2_Calculator_stub.cpp173
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/WSClient/axis2_Calculator_stub.h80
-rw-r--r--branches/cpp-M1/sca/samples/Calculator/WSClient/runwsclient.cmd28
-rwxr-xr-xbranches/cpp-M1/sca/samples/Calculator/WSClient/runwsclient.sh30
-rw-r--r--branches/cpp-M1/sca/samples/ChangeLog0
-rw-r--r--branches/cpp-M1/sca/samples/GettingStarted.html261
-rw-r--r--branches/cpp-M1/sca/samples/INSTALL2
-rwxr-xr-xbranches/cpp-M1/sca/samples/LICENSE177
-rw-r--r--branches/cpp-M1/sca/samples/Makefile.am3
-rw-r--r--branches/cpp-M1/sca/samples/MyValue/Client/Makefile.am11
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/Client/MyValueClient.cpp179
-rw-r--r--branches/cpp-M1/sca/samples/MyValue/Makefile.am23
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo.fragment36
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfo.h30
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.componentType30
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.cpp79
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.h36
-rw-r--r--branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/Makefile.am15
-rw-r--r--branches/cpp-M1/sca/samples/MyValue/MyValueModule/Makefile.am10
-rw-r--r--branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/Makefile.am17
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValue.h30
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueImpl.componentType36
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueImpl.cpp143
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueImpl.h32
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueService.wsdl65
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueService.xsd39
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.h32
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.wsdl157
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/MyValueModule/Tuscany-model.config25
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/MyValueModule/sca.module51
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/MyValueSubsystem/sca.subsystem27
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/runMyValueClient.sh51
-rwxr-xr-xbranches/cpp-M1/sca/samples/MyValue/server.wsdd22
-rw-r--r--branches/cpp-M1/sca/samples/NEWS0
-rw-r--r--branches/cpp-M1/sca/samples/NOTICE2
-rw-r--r--branches/cpp-M1/sca/samples/README0
-rwxr-xr-xbranches/cpp-M1/sca/samples/autogen.sh14
-rwxr-xr-xbranches/cpp-M1/sca/samples/build.sh39
-rw-r--r--branches/cpp-M1/sca/samples/configure.ac26
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator.dsw62
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator.ncbbin0 -> 189440 bytes
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator.optbin0 -> 58880 bytes
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator/Calculator.dsp189
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator/Calculator.mak254
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Client/Client.dsp117
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Client/Client.mak262
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/WSClient/BuildInstructions.txt93
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/WSClient/WSClient.dsp122
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/WSClient/WSClient.mak298
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/build.cmd21
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/deploy.cmd61
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/wsdeploy.cmd63
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/Calculator.sln35
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/Calculator.suobin0 -> 11264 bytes
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/Calculator/Calculator.vcproj219
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/Client/Client.vcproj146
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/WSClient/BuildInstructions.txt95
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/WSClient/WSClient.vcproj152
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/deploy.cmd61
-rw-r--r--branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/wsdeploy.cmd63
-rw-r--r--branches/cpp-M1/sca/scatest.bat45
-rwxr-xr-xbranches/cpp-M1/sca/scatest.sh45
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestClient/WSEntryPointTestClient.c414
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestClient/WSEntryPointTestClient.vcproj136
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/Tuscany-model.config24
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTest.h53
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTest.wsdl526
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.componentType10
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.cpp159
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.h57
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Proxy.cpp187
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Proxy.h50
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.cpp145
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestModule.vcproj173
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/sca.module19
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/services.xml62
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestSubsystem/sca.subsystem23
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/Tuscany-model.config24
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTest.h53
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTest.wsdl526
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTestImpl.componentType10
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTestImpl.h57
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/sca.module19
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTest/runtime/subsystems/WSEntryPointTestSubsystem/sca.subsystem23
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.c148
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.vcproj135
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/Tuscany-model.config24
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h30
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl62
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType10
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.cpp38
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h36
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp63
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h34
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp70
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h36
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCModule.vcproj170
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/sca.module19
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/services.xml30
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCSubsystem/sca.subsystem23
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/Tuscany-model.config24
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h30
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl62
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType10
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h36
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/sca.module19
-rw-r--r--branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/subsystems/WSEntryPointTestRPCSubsystem/sca.subsystem23
-rw-r--r--branches/cpp-M1/sca/tools/Makefile.am1
-rwxr-xr-xbranches/cpp-M1/sca/tools/scagen/META-INF/LICENSE177
-rw-r--r--branches/cpp-M1/sca/tools/scagen/META-INF/NOTICE2
-rw-r--r--branches/cpp-M1/sca/tools/scagen/META-INF/README19
-rw-r--r--branches/cpp-M1/sca/tools/scagen/Makefile.am19
-rw-r--r--branches/cpp-M1/sca/tools/scagen/build.xml151
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/CalculatorTest.java29
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/EnvHandlerTest.java44
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceButNotInClassAttrTest.java88
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceTest.java44
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceButNotInClassAttrTest.java44
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceTest.java44
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/MissingModuleAndFragmentTest.java44
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/SimplePublicPrivateProtectedTest.java45
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllModulesTest.java83
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestDeployAssistTool.java91
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TuscanyTestCase.java337
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/go.cmd2
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_dir_option.cmd1
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_input_dir.cmd1
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_output_dir.cmd1
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/refresh-tools-jar.cmd1
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/Calculator.h32
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.componentType25
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.h33
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/sca.module28
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorBack.h31
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorForward.h30
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/sca.module31
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.componentType25
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.h33
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.componentType25
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.h32
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.fragment39
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.h94
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.componentType33
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.h34
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.fragment39
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.h89
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.componentType33
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.h43
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.fragment38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.h36
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.componentType32
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.h46
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValue.h35
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.componentType38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.hpp38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl_stockQuote_Proxy.h34
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/StockQuoteService.h33
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/sca.module59
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.fragment38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.h37
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.componentType32
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.h47
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValue.h36
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.componentType38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.hpp38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl_stockQuote_Proxy.h34
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/StockQuoteService.h32
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/sca.module59
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/MyValue.h72
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType56
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp86
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/sca.module96
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValue.h39
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.componentType28
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.hpp38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/sca.module48
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValue.h37
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType28
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/sca.module48
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/CustomerInfo.fragmentX38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/sca.moduleX60
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.fragment38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.h36
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.componentType32
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.h45
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValue.h35
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.componentType38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.hpp38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl_stockQuote_Proxy.h34
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/StockQuoteService.h32
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/sca.module59
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.fragment39
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.h40
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.componentType32
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.h34
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.cpp64
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.h38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.cpp73
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.cpp75
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.h39
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.cpp80
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.cpp75
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.h39
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.cpp80
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp593
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h87
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp411
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp503
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h83
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp339
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp63
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp72
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.cpp91
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.h41
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.cpp91
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.cpp63
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.h38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.cpp63
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.h38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp63
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp72
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp91
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h41
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp91
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.cpp63
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.h38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.cpp63
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.h38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp182
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h82
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp182
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h80
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp91
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h41
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp91
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp91
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h41
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp91
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp63
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp70
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp91
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h41
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp89
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp63
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.h38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp63
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.h38
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp86
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h40
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp87
-rw-r--r--branches/cpp-M1/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h40
-rw-r--r--branches/cpp-M1/sca/tools/scagen/lib/readme.txt4
-rw-r--r--branches/cpp-M1/sca/tools/scagen/scagen.cmd15
-rwxr-xr-xbranches/cpp-M1/sca/tools/scagen/scagen.sh17
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/BodyPart.java90
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.java119
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Configuration.java126
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.java100
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FileActor.java32
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FilePart.java75
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Headers.java162
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.java420
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MacroPart.java82
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MethodPart.java128
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Options.java159
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Parameter.java211
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/ParsingException.java42
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.java51
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Signature.java501
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java543
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/package.html39
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java360
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java124
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java87
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomHandler.java77
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.java40
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java214
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/LittleClass.java27
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.java85
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java67
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java170
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java62
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java825
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java202
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html140
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl274
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl222
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl276
-rw-r--r--branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl185
-rw-r--r--branches/cpp-M1/sca/xsd/readme.txt2
-rw-r--r--branches/cpp-M1/sca/xsd/sca-binding-sca.xsd37
-rw-r--r--branches/cpp-M1/sca/xsd/sca-binding-webservice.xsd38
-rw-r--r--branches/cpp-M1/sca/xsd/sca-core.xsd240
-rw-r--r--branches/cpp-M1/sca/xsd/sca-implementation-cpp.xsd40
-rw-r--r--branches/cpp-M1/sca/xsd/sca-implementation-java.xsd38
-rw-r--r--branches/cpp-M1/sca/xsd/sca-interface-cpp.xsd50
-rw-r--r--branches/cpp-M1/sca/xsd/sca-interface-java.xsd39
-rw-r--r--branches/cpp-M1/sca/xsd/sca-interface-wsdl.xsd39
-rw-r--r--branches/cpp-M1/sca/xsd/sca.xsd34
-rw-r--r--branches/cpp-M1/sca/xsd/tuscany.xsd48
615 files changed, 53198 insertions, 0 deletions
diff --git a/branches/cpp-M1/sca/AUTHORS b/branches/cpp-M1/sca/AUTHORS
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/branches/cpp-M1/sca/AUTHORS
diff --git a/branches/cpp-M1/sca/COPYING b/branches/cpp-M1/sca/COPYING
new file mode 100755
index 0000000000..6b0b1270ff
--- /dev/null
+++ b/branches/cpp-M1/sca/COPYING
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
+
diff --git a/branches/cpp-M1/sca/ChangeLog b/branches/cpp-M1/sca/ChangeLog
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/branches/cpp-M1/sca/ChangeLog
diff --git a/branches/cpp-M1/sca/Developers Guide.txt b/branches/cpp-M1/sca/Developers Guide.txt
new file mode 100644
index 0000000000..96b0476174
--- /dev/null
+++ b/branches/cpp-M1/sca/Developers Guide.txt
@@ -0,0 +1,346 @@
+Tuscany SCA For C++ Developers Guide
+====================================
+
+Contents:
+ Developing Services in C++
+ Running C++ Services
+
+
+See cpp/build.txt in the parent directory or the cpp/sca/INSTALL file
+for build instructions.
+
+Building the tools
+------------------
+
+NOTE: this is built and installed by the build step above.
+
+Currently, there is only one tool: "scagen". It can be built using the
+ant build script at \tuscany\cpp\sca\tools\scagen\build.xml.
+The default target "all" will build the java jars, documentation,
+scripts and a zip file of the whole thing. This is all the ant
+build tasks apart from "test" which runs all the junit tests.
+
+The ant build script can be altered to add the junit tests to the
+default target. Replace the line
+
+<property name="junit.jar.folder" value="${basedir}/lib" />
+
+The "test" task was not included in "all" as it requires a
+junit jar file to run. This jar is available here:
+http://www.junit.org/index.htm testing has been done with
+Junit version 3.8.1.
+
+Running the scagen tool
+-----------------------
+
+The scagen tool user interface is quite basic in this initial release.
+It can be run from the scagen.jar file using "java -jar scagen.jar"
+or from small scripts - scagen.cmd for Windows and scagen.sh for Unix.
+The parameters are:
+ -dir <the path to the sca module root directory>
+ -output <the path to an output directory where the generated file will be placed>
+
+e.g.
+ scagen -dir c:\mymodules\module1 -output c:\mymodules\bld\module1
+
+What scagen does
+----------------
+
+The input directory passed to the scagen tools as
+the -dir parameter method is taken to be the SCA
+module root directory. All the sca.module and .fragment
+files in that directory are inspected to resolve all
+the <component/> elements within them.
+
+Each <component/> element found is inspected
+to see if it has a <implementation.cpp/> element within it.
+
+Each <implementation.cpp/> element should have a
+header attribute that represents a C++ header file
+that contains function prototypes for the C++
+implementation of the service. An optional class
+attribute can be used to select one class if more than
+one that is present in the header file. The default
+class is the one with the same name as the header file.
+The tool will verify that the implementation header
+contains an appropriate class prototype.
+
+The directory that contains the implementation header
+should also contain a matching .componentType file for
+the equivalent SCA component. So for example, a
+MyServiceImpl.h file would have a corresponding
+MyServiceImpl.componentType file in the same directory.
+
+Each componentType file is inspected for <service/>
+and <reference/> elements. For each <service/> element
+that is found that contains a <interface.cpp/> element
+within it,
+
+the header attribute of the <interface.cpp/> is taken
+as the filename of the C++ interface header for the
+SCA service. This C++ header file is opened and used
+as a means for specifying the SCA service resulting
+in an appropriate wrapper and proxy being generated
+for this service interface. Both method bodies and h
+eaders are generated in the given output directory.
+The processing of a <reference/> element is the same
+except that only a proxy header and implementation
+re generated.
+
+
+Getting started with the code
+-----------------------------
+
+The following is a list of tasks that are performed by the scagen tool
+for each task we will describe technically how it is accomplished and
+the location of the code that can be inspected/changed to alter the
+behaviour.
+
+Here are the tasks listed, below is a paragraph for each one:
+
+ o (Overall structure of the code)
+ o Walking the input directory
+ o Scanning the .module and .fragment files
+ o finding the C++ implementation headers
+ o finding/checking the classname in the C++ implementation headers
+ o find the matching .componentTemplate files
+ o going into the componentTemplate files to extract the interface header filenames
+ o going into the interface header files and parsing them to extract the method signatures
+ into a network of objects we can inspect.
+ o taking all the meta data stored as objects and building a DOM for XSLT processing
+ o using XSLT to produce a proxy header
+ o using XSLT to produce a proxy implementation
+ o using XSLT to produce a wrapper header
+ o using XSLT to produce a wrapper implementation
+
+
+Overall structure of the code
+-----------------------------
+
+There are two packages org.apache.tuscany.sca.cpp.tools.common and
+org.apache.tuscany.sca.cpp.tools.services. The ...common package is
+taken from some existing code that was also contributed to axis that
+was used to parse C++ code and do various tasks like insert trace.
+This code was repackaged and shipped as a tuscany package but there
+has been a desire not to change it significantly from the equivalent
+org.apache.axis.tools.common package to leave the door open for
+future convergence.
+
+Where the ...common package has been amended (for example to cope with
+namespaces better or the provision of an Options.reset method to reset a static
+variable and enable the tuscany junit tests to run independently) these
+have been flagged with a "Tuscany" comment. The ...common package basically
+provides two functions - 1) the ability to go into a directory (see DirectoryTree.java)
+and process files that fit a particular filter (e.g. "*.hpp") by passing them to
+implementer of the FileActor Interface (see the classes "Headers" for the
+actor that processes C++ headers and "XMLFileActor" for the file actor that
+processes the .componentType and sca.module/fragment files.)
+
+The ...services package contains the majority of code written afresh for the
+scagen tool including the subclasses of XMLFileActor (see ComponentTypeFileHandler.java
+and ModuleOrFragmentFileHandler.java) that are the classes that tie this
+package to the ...common package and which are called by the
+DirectoryTree walker.
+
+Walking the module root input directory
+---------------------------------------
+
+The main method of the scagen class creates an instance of
+"DirectoryScanner" and registers with it a file handler of
+type "ModuleOrFragmentFileHandler" for all files that end
+in ".module" or ".fragment". On calling the "walkTree" method
+on the scanner it will in turn call the actOnFile method on the
+ModuleOrFragmentFileHandler for appropriate files.
+
+Scanning the .module and .fragment files
+----------------------------------------
+
+The scanning of these files by the respective "ModuleOrFragmentFileHandler"
+and "ComponentTypeFileHandler" is mostly handled by the superclass
+"XMLFileActor". This class will recursively goes through the whole
+XML file and considers the name of the XML element it finds.
+"XMLFileActor" contains a map of element names to element handlers
+that will "flatten out" the structure of the XML file "above" the
+level of node we are interested in.
+
+So for example the ComponentTypeFile handler sets up the handlers
+map as follows:
+
+ GenericDomNodeHandler gdnh = new GenericDomNodeHandler();
+ handlers.put("componentType", gdnh);
+ handlers.put("interface.cpp", gdnh);
+ ServiceDomNodeHandler sdnh = new ServiceDomNodeHandler();
+ handlers.put("service", sdnh);
+
+ ReferenceDomNodeHandler rdnh = new ReferenceDomNodeHandler();
+ handlers.put("reference", rdnh);
+
+The majority of processing done by these DomNOdeHandlers is to
+place the attributes and values discovered into another map that
+maps an (static version of) the XPath of a value to the value itself.
+So for example "/componentType/service/interface.cpp/@header" might contain
+the current ("root to here") value of the header attribute of the current
+interface.
+
+Particular handlers for the "leaves" of this tree
+such as ServiceDomNodeHandler and ReferenceDomNodeHandler
+can then consume these values from the map without having
+to be concerned with the actual names of things,
+like the service name, appearing in the key. It should be
+understood though that there are multiple values placed in the map
+for one "key" as the processing works its way through the
+XML tree. For example the processing of a second component will
+overlay its data over the same keys as the first component.
+(After "wiping" the appropriate subtree.)
+
+Finding the C++ implementation headers
+--------------------------------------
+
+The "/module/component/implementation.cpp/@header" and
+is used to key into the name of the implementation header
+and this is opened directly and passed to the
+actOnFileMethod of a Headers object from the ...common package
+bypassing the DirectoryScanner code. The path is relative to
+the given (-dir option) module root directory.
+
+Finding/checking the classname in the C++ implementation headers
+-----------------------------------------------------------------
+
+This implementation header is not used to define the
+methods of the SCA service but rather is opened to check
+ any given implementation.cpp/@class attribute
+(or find out the name of the implementation class
+in the header if this is not specified in the XML. This
+is done using the same method that later parses the interface
+C++ headers into java objects - we just them inspect the
+class attribute of the "Signature" objects that represent the methods
+we find in the header.
+
+Find the matching .componentType files
+------------------------------------------
+
+By SCA convention we go to the same directory as the implementation
+files and look for the XXX.componentType files with the same name.
+A instance of the ComponentDOMNodeHandler handles the data in the
+Component Element and pre-creates a ComponentTypeFileHandler that
+will eventually be called to process the .componentType file. This
+object receives a number of "setParameter" calls to poke into it
+matadata that is available prior/outside the the actual .componentType
+file it will read.
+
+Go into the componentType files to extract the interface header filenames
+-----------------------------------------------------------------------------
+
+We open up the .componentTemplateFiles with exactly the same
+mechanism as we read the sca.module/fragment file (by creating
+a DOM and descending through it this time using a ComponentTypeFileHandler that it
+has had various data values ( e.g. the implementation class and namespace used later)
+poked into it. The ComponentTypeFileHandler itself has individual
+handlers for the service and reference XML/DOM element/nodes
+that is comes across (ServiceDomNodeHandler and ReferenceDomNodeHandler
+respectively). Each these handlers will pull out the name of
+a C++ interface header and use it to resolve the interface of the
+SCA Service.
+
+Parsing the interface header files for signatures
+-------------------------------------------------
+
+The Service/Reference DOM Node hander both call the
+ ServicesGenerator.handleInterfaceHeader(parameters, true);
+method, the second parameter is used to differentiate
+the call source as we don't need wrapper files for
+SCA references (just proxies).
+
+The ServicesGenerator uses the Headers file actor from
+the ...common package to create a List of Signature
+objects that describe the interface methods in the C++
+header.
+
+Take all the meta data stored as objects and build a DOM
+--------------------------------------------------------
+We now have a List of Signature objects and a map that
+represents the flattened information that we have pulled
+from the XML files in the ServiceGenerator class.
+We call a "createDOMofMethods" method
+to consolidate all this information into one DOM
+(this task should be split into more than one method as the
+signature/parameter list of the method is too large).
+
+Use XSLT to produce the output files (Proxy/Wrapper headers and Implementations)
+--------------------------------------------------------------------------------
+
+The ServicesGenerator.handleInterfaceHeader(parameters, forReference);
+method closes of with the code:
+
+ createProxyCPPFromDom(outputDir, dom);
+ createProxyHeaderFromDom(outputDir, dom);
+
+ if (!forReference) {
+ createWrapperCPPFromDom(outputDir, dom);
+ createWrapperHeaderFromDom(outputDir, dom);
+ }
+
+
+Each of the create methods sets up the output
+file name and a different XSLT transform and calls
+"createOutputFromDom" to transform/filter the data in the
+"model" that is held in our DOM of the data to a particular
+"view" as expressed in the C++ output file.
+
+The four XSLT style sheets are in rough order of the output
+file and this corresponds very roughly to a depth first descent
+of the DOM tree so, for example, we could have in a stylesheet:
+
+...
+ void* </xsl:text>
+ <xsl:value-of select="$class"/><xsl:text>::newImplementation()
+ {
+ return new </xsl:text><xsl:value-of select="../@implClass"/><xsl:text><xsl:text>(target);
+ }
+
+which would be output as:
+
+ void* MyClassImpl_MyClass_Proxy::newImplementation()
+ {
+ return new MyClassImpl(target)
+ }
+
+given appropriate valies for $class and "../@implClass" and
+$class might be defined to be:
+xsl:variable name="clazz">
+ <xsl:value-of select="../@implClass"/>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="../@nameOfServiceOrReference"/>
+ <xsl:text>_Proxy</xsl:text>
+</xsl:variable>
+
+giving "MyClassImpl_MyClass_Proxy"
+
+The stylesheets can be found in the xsl subdirectory of the
+org.apache.tuscany.sca.cpp.tools.services package.
+
+Unit Testing Scagen Code Changes
+--------------------------------
+
+The junit unit test
+ /tuscany/cpp/sca/tools/scagen/
+ junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllModulesTest.java
+
+will dynamically look for all the subdirectores of the directory
+path given by TuscanyTestCase.junit_modules and run the scagen
+tool on them as if they were modules roots.
+
+By convention an "expected_output" directory is located
+(see the CVS tree or the test program) and the actual
+and expected results compared. This testcase is thus a
+good first/basic regression test for any changes.
+
+New test cases can thus be added without having to write
+any new junit java code by by creating new SCA modules and
+the associated expected Scagen output - perhaps by using the tool
+initially and checking the output is satisfactory before copying
+it to the expected output directory at:
+
+/tuscany/cpp/sca/tools/scagen/junit/testoutput/<module>/expected_output
+where input data is taken from
+/tuscany/cpp/sca/tools/scagen/junit/testinput/modules/<module>
diff --git a/branches/cpp-M1/sca/GettingStarted.html b/branches/cpp-M1/sca/GettingStarted.html
new file mode 100644
index 0000000000..3ebffdf566
--- /dev/null
+++ b/branches/cpp-M1/sca/GettingStarted.html
@@ -0,0 +1,244 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<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 - Getting Started</TITLE>
+</HEAD>
+
+<BODY>
+<DIV ID="bodyColumn">
+ <DIV ID="contentBox">
+ <DIV CLASS="section">
+ <H2>Tuscany - Getting Started - SCA C++ Milestone release 1</H2>
+
+ <P>Tuscany SCA C++ provides a runtime implementation for the Service Component
+ Architecture 0.9 specification, written in C++ and currently supports C++
+ component implementation types. This page describes what is needed to install and run Tuscany
+ SCA for C++.<BR/>If you haven't already done so, the first
+ step is to download the SCA C++ Milestone release 1 of Apache Tuscany from our
+ <A HREF="http://incubator.apache.org/tuscany/download.html" target='_blank'>download page</A>.<BR/>
+ </P>
+ </DIV>
+
+ <DIV CLASS="section">
+ <H2>Contents</H2>
+ <OL>
+ <LI><A HREF="#requirements">System Requirements</A></LI>
+ <LI><A HREF="#install">Installing Tuscany SCA..</A>
+ <UL>
+ <LI><A HREF="#linuxbin">..from the binary release on Linux</A></LI>
+ <LI><A HREF="#linuxsrc">..from the source release on Linux</A></LI>
+ <LI><A HREF="#winbin">..from the binary release on Windows</A></LI>
+ <LI><A HREF="#winsrc">..from the source release on Windows</A></LI>
+ </UL></LI>
+ <LI><A HREF="#samples">Samples</A></LI>
+ <LI><A HREF="#userguide">User Guide Documents</A></LI>
+ <LI><A HREF="#help">Getting Help</A></LI>
+ </OL>
+ </DIV>
+
+
+ <DIV CLASS="section">
+ <A NAME="requirements"><H2>System Requirements</H2></A>
+
+ <P>In order to run Tuscany SCA there are some
+ minimum requirements:</P>
+ <TABLE CLASS="bodyTable">
+
+ <TBODY>
+ <TR CLASS="a">
+ <TD><B>Software</B></TD>
+ <TD><B>Download Link</B></TD>
+ </TR>
+ <TR CLASS="b">
+ <TD>Operating systems:
+ <UL>
+
+ <LI>Windows XP SP2</LI>
+ <LI>Linux</LI>
+ </UL>
+ </TD>
+ <TD>
+ </TD>
+ </TR>
+ <TR CLASS="a">
+ <TD>Axis2C Release 0.92</TD>
+
+ <TD>
+ <A HREF="http://ws.apache.org/axis2/c/download.cgi"
+ TARGET="_blank">http://ws.apache.org/axis2/c/download.cgi</A><BR/>
+ Please download and follow the installation instructions. Ensure you can run the Axis2C samples
+ </TD>
+ </TR>
+ <TR CLASS="b">
+ <TD>Tuscany SDO for C++ Milestone Release 1</TD>
+
+ <TD>
+ <A HREF="http://incubator.apache.org/tuscany/download.html"
+ TARGET="_blank">http://incubator.apache.org/tuscany/download.html</A><BR/>
+ Please download and follow the installation instructions
+ </TD>
+ </TR>
+ <TR CLASS="a">
+ <TD>Java SDK 1.4 or later</TD>
+
+ <TD>
+ <A HREF="http://java.sun.com/javase/downloads/index.jsp"
+ TARGET="_blank">http://java.sun.com/javase/downloads/index.jsp</A><BR/>
+ This is required for building and running the SCAGEN code generation tool, which is used
+ when developing Tuscany SCA C++ components
+ </TD>
+ </TR>
+ <TR CLASS="b">
+ <TD>Apache Ant 1.6 or later</TD>
+
+ <TD>
+ <A HREF="http://ant.apache.org"
+ TARGET="_blank">http://ant.apache.org</A><BR/>
+ This is required for building the SCAGEN code generation tool, which is used
+ when developing Tuscany SCA C++ components
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </DIV>
+ <DIV CLASS="section">
+ <A NAME="install"><H2>Installing Tuscany SCA for C++</H2></A>
+ <A NAME="linuxbin"><H3>Getting Tuscany SCA for C++ working with the binary release on Linux</H3></A>
+ <OL>
+ <LI>Extract the binary tar package to a folder</LI>
+ <LI>Set the TUSCANY_SCACPP environment variable to point to the directory that was just extracted</LI>
+ <LI>Add the *install_dir*/lib directory to the LD_LIBRARY_PATH environment variable</LI>
+ </OL>
+ <A NAME="linuxsrc"><H3>Getting Tuscany SCA for C++ working with the source release on Linux</H3></A>
+ <OL>
+ <LI>Extract the source tar package to a folder &lt;tuscany_sca&gt;</LI>
+ <LI>The following environment variables are required:
+ <UL>
+ <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;
+ <LI>AXIS2C_HOME=&lt;path to axis2c version 0.92&gt;</LI>
+ </UL></LI>
+ <LI>Build the source with the following command sequence:
+ <UL>
+ <LI>./configure</LI>
+ <LI>make</LI>
+ <LI>make install</LI>
+ </UL>
+ NOTE: If you don't provide a --prefix configure option, it will by default install into
+ /usr/local/tuscany/sca</LI>
+ </OL>
+
+ <A NAME="winbin"><H3>Getting Tuscany SCA for C++ working with the binary release on Windows</H3></A>
+ <OL>
+ <LI>Unzip the supplied zip file to a folder</LI>
+ <LI>Set the TUSCANY_SCACPP environment variable to point to the directory that was just unzipped</LI>
+ <LI>Add the *install_dir*\bin directory to the PATH environment variable</LI>
+ </OL>
+ <A NAME="winsrc"><H3>Getting Tuscany SCA for C++ working with the source release on Windows</H3></A>
+ <OL>
+ <LI>Unzip the supplied source zip file</LI>
+ <LI>The following environment variables are required:
+ <UL>
+ <LI>TUSCANY_SDOCPP=&lt;path to installed Tuscany SDO&gt;
+ <LI>AXIS2C_HOME=&lt;path to axis2c version 0.92&gt;</LI>
+ </UL></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:
+ <UL>
+ <LI>cd &lt;to where you unzipped the source&gt;</LI>
+ <LI>build</LI>
+ </UL>
+ This will build all the projects and put the required output into the 'deploy' directory<BR/><BR/>
+ Alternatively, open the workspace tuscany_sca.dsw in Visual Studio 6 - you can build projects individually
+ or build the samples to rebuild all the projects</LI>
+ <LI>Set the TUSCANY_SCACPP environment variable to point to the 'deploy' directory that was just created</LI>
+ </OL>
+ </DIV>
+
+ <DIV CLASS="section">
+ <A NAME="samples"><H2>Samples</H2></A>
+ <TABLE CLASS="bodyTable">
+ <TBODY>
+ <TR CLASS="a">
+ <TD STYLE="vertical-align: top; white-space: nowrap;">SCA Technology samples
+ </TD>
+ <TD>Simple samples that emphasize how to to use
+ Service Component Architecture technology. Follow the
+ instructions on the samples <A HREF="samples/GettingStarted.html">Getting Started</A>
+ page to build and run the Tuscany SCA samples
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ <BR>
+ </DIV>
+ <DIV CLASS="section">
+ <A NAME="userguide"><H2>User Guide Documents</H2></A>
+ <TABLE CLASS="bodyTable">
+ <TBODY>
+ <TR CLASS="a">
+ <TD STYLE="vertical-align: top; white-space: nowrap;"><A HREF="doc/CreatingSCACPPComponents.txt">Creating and building a Tuscany SCA C++ component</A>
+ </TD>
+ <TD>A document that describes how to create, build and run a Tuscany SCA C++ component.
+ </TD>
+ </TR>
+ <TR CLASS="a">
+ <TD STYLE="vertical-align: top; white-space: nowrap;"><A HREF="doc/WSEntrypoint.txt">Enabling Web Service access to your Tuscany SCA C++ component</A>
+ </TD>
+ <TD>A document that describes how to expose a Tuscany SCA C++ component as a Web Service via an SCA Web Service Entrypoint.
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ <BR>
+ </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>
+
+
+ <P>&nbsp;</P>
+
+ <P>&nbsp;</P>
+
+ <P>&nbsp;</P>
+ <TABLE CLASS="bodyTable">
+ <TBODY>
+ <TR CLASS="a">
+ <TD>
+
+ <P>Thank you for your interest in Tuscany.</P> <STRONG><EM>-The
+ Tuscany Development Team</EM></STRONG>
+
+ <P></P>
+
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+
+ <P></P>
+ </DIV>
+ </DIV>
+</DIV>
+</BODY>
+
+</HTML>
diff --git a/branches/cpp-M1/sca/INSTALL b/branches/cpp-M1/sca/INSTALL
new file mode 100644
index 0000000000..9e0a0b758a
--- /dev/null
+++ b/branches/cpp-M1/sca/INSTALL
@@ -0,0 +1,2 @@
+Please read the GettingStarted.html document for information on
+building and installing Tuscany SCA for C++
diff --git a/branches/cpp-M1/sca/LICENSE b/branches/cpp-M1/sca/LICENSE
new file mode 100755
index 0000000000..f433b1a53f
--- /dev/null
+++ b/branches/cpp-M1/sca/LICENSE
@@ -0,0 +1,177 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
diff --git a/branches/cpp-M1/sca/Makefile.am b/branches/cpp-M1/sca/Makefile.am
new file mode 100644
index 0000000000..3fd18bc820
--- /dev/null
+++ b/branches/cpp-M1/sca/Makefile.am
@@ -0,0 +1,36 @@
+SUBDIRS = tools runtime
+DIST_SUBDIRS = tools runtime samples
+datadir=$(prefix)
+
+data_DATA = INSTALL README LICENSE COPYING NOTICE GettingStarted.html
+nobase_data_DATA = xsd/*.*
+EXTRA_DIST = LICENSE COPYING INSTALL README NOTICE GettingStarted.html scatest.sh xsd doc
+dist-hook:
+ rm -rf `find $(distdir)/ -type d -name .svn`
+ rm -rf `find $(distdir)/ -type d -name .deps`
+
+install-data-hook:
+ rm -rf $(prefix)/samples
+ cp -r samples $(prefix)
+ rm -rf `find $(prefix)/samples -type d -name .svn`
+ rm -rf `find $(prefix)/samples -type d -name .deps`
+ rm -rf $(prefix)/doc
+ cp -r doc $(prefix)
+ rm -rf `find $(prefix)/doc -type d -name .svn`
+ rm -rf `find $(prefix)/doc -type d -name .deps`
+
+
+bindist: dist
+ rm -rf ${PACKAGE}-${PACKAGE_VERSION}
+ rm -rf ${PACKAGE}-${PACKAGE_VERSION}-src
+ rm -rf ${PACKAGE}-${PACKAGE_VERSION}-bin
+ gunzip -f ${PACKAGE}-${PACKAGE_VERSION}.tar.gz
+ tar -xf ${PACKAGE}-${PACKAGE_VERSION}.tar
+ mv ${PACKAGE}-${PACKAGE_VERSION} ${PACKAGE}-${PACKAGE_VERSION}-src
+ tar -cf - ${PACKAGE}-${PACKAGE_VERSION}-src | gzip -c > ${PACKAGE}-${PACKAGE_VERSION}-src.tar.gz
+ cd ${PACKAGE}-${PACKAGE_VERSION}-src \
+ && sh ../makebindist.sh
+ mkdir ${PACKAGE}-${PACKAGE_VERSION}-bin
+ cp -r ${PACKAGE}-${PACKAGE_VERSION}-src/deploy/* ${PACKAGE}-${PACKAGE_VERSION}-bin
+ tar -cf - ${PACKAGE}-${PACKAGE_VERSION}-bin | gzip -c > ${PACKAGE}-${PACKAGE_VERSION}-bin.tar.gz
+
diff --git a/branches/cpp-M1/sca/NEWS b/branches/cpp-M1/sca/NEWS
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/branches/cpp-M1/sca/NEWS
diff --git a/branches/cpp-M1/sca/NOTICE b/branches/cpp-M1/sca/NOTICE
new file mode 100644
index 0000000000..bfb81409ad
--- /dev/null
+++ b/branches/cpp-M1/sca/NOTICE
@@ -0,0 +1,2 @@
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/) \ No newline at end of file
diff --git a/branches/cpp-M1/sca/README b/branches/cpp-M1/sca/README
new file mode 100644
index 0000000000..a286dca6e3
--- /dev/null
+++ b/branches/cpp-M1/sca/README
@@ -0,0 +1,69 @@
+Apache Tuscany C++ M1 build (July, 2006)
+===================================
+
+http://incubator.apache.org/tuscany
+
+Tuscany is an effort undergoing incubation at the Apache Software Foundation
+(ASF), sponsored by the Web Services PMC.
+
+Incubation is required of all newly accepted projects until a further review
+indicates that the infrastructure, communications, and decision making process
+have stabilized in a manner consistent with other successful ASF projects.
+
+While incubation status is not necessarily a reflection of the completeness or
+stability of the code, it does indicate that the project has yet to be fully
+endorsed by the ASF.
+
+
+Getting Started
+===============
+
+Documentation describing the system requirements and the steps to install
+Tuscany SCA C++ and run the samples can be found in the GettingStarted.html file.
+
+
+About Tuscany SCA C++
+=====================
+
+Tuscany SCA C++ provides a runtime implementation for the Service Component
+Architecture 0.9 specification, written in C++ and will currently support C++
+component implementation types.
+
+It is possible to interoperate with Tuscany SCA Java via the Web Service bindings
+for EntryPoint/ExternalService but restrictions apply. This is not yet a complete
+implementation and known restrictions are described below.
+
+Supported SCA Assembly Model features
+ * All features are supported unless listed under the known restrictions
+ below. See SCA Assembly Model specification.
+
+Supported language bindings
+ * Component implementations written in C++. See SCA Client and
+ Implementation Model specification.
+ * Component interfaces described by C++ classes. See SCA Client and
+ Implementation Model specification.
+
+Supported external service and entry point bindings
+ * The web service binding is supported. This implementation will support
+ web services which using document literal SOAP bindings conforming to the
+ WS-I basic profile (rpc/encoded is not yet supported).
+
+Known restrictions
+ * Subsystem wiring, entry points and external services are not supported.
+ * Local service interfaces cannot use overloaded operations (the SCA
+ specification limits remote service interfaces to not using overloaded
+ operations).
+ * Each WSDL definition for a web service binding must be in a single WSDL
+ document.
+ * No load time validation of the deployed SCA application (run time validation
+ only).
+ * No metadata API.
+ * A Web Service EntryPoint that is wired (via zero or more components) to a
+ Web Service ExternalService will fail when attempting to send the final
+ response to the originating client.
+
+
+
+Thank you for using Tuscany!
+
+The Tuscany Team.
diff --git a/branches/cpp-M1/sca/autogen.sh b/branches/cpp-M1/sca/autogen.sh
new file mode 100755
index 0000000000..3cebb0a380
--- /dev/null
+++ b/branches/cpp-M1/sca/autogen.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+for i in "libtoolize --force" aclocal autoconf autoheader
+do
+ echo -n "Running $i..."
+ $i || exit 1
+ echo 'done.'
+done
+
+echo -n 'Running automake...'
+automake --add-missing
+echo 'done.'
+exit 0
+
diff --git a/branches/cpp-M1/sca/build.bat b/branches/cpp-M1/sca/build.bat
new file mode 100644
index 0000000000..2f6ece9b33
--- /dev/null
+++ b/branches/cpp-M1/sca/build.bat
@@ -0,0 +1,30 @@
+@echo off
+
+@REM Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM 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, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+
+
+@setlocal
+
+echo building Java code
+cd tools\scagen
+call ant
+
+echo building C++ code
+call vcvars32
+cd ..\..\projects\tuscany_sca
+build.cmd
+
+@endlocal
diff --git a/branches/cpp-M1/sca/build.sh b/branches/cpp-M1/sca/build.sh
new file mode 100755
index 0000000000..cf94f1489d
--- /dev/null
+++ b/branches/cpp-M1/sca/build.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+# 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.
+
+TUSCANY_SCACPP_HOME=`pwd`
+
+if [ x$AXIS2C_HOME = x ]; then
+echo "AXIS2C_HOME not set"
+exit;
+fi
+echo "Using Axis2C installed at $AXIS2C_HOME"
+
+if [ x$TUSCANY_SDOCPP = x ]; then
+echo "TUSCANY_SDOCPP not set"
+exit;
+fi
+echo "Using SDO installed at $TUSCANY_SDOCPP"
+
+cd ${TUSCANY_SCACPP_HOME}/samples
+./autogen.sh
+
+cd $TUSCANY_SCACPP_HOME
+./autogen.sh
+
+./configure --prefix=${TUSCANY_SCACPP_HOME}/deploy --enable-static=no
+make
+make install
+
diff --git a/branches/cpp-M1/sca/configure.ac b/branches/cpp-M1/sca/configure.ac
new file mode 100644
index 0000000000..6f448cf832
--- /dev/null
+++ b/branches/cpp-M1/sca/configure.ac
@@ -0,0 +1,55 @@
+dnl run autogen.sh to generate the configure script.
+
+AC_PREREQ(2.59)
+AC_INIT(tuscany_sca_cpp, 0.1.incubating-M1)
+AC_CANONICAL_SYSTEM
+AM_CONFIG_HEADER(config.h)
+AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+AC_PREFIX_DEFAULT(/usr/local/tuscany/sca)
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PROG_LIBTOOL
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_CHECK_HEADERS([inttypes.h stdlib.h string.h sys/time.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_CONST
+AC_C_INLINE
+
+# Checks for library functions.
+AC_FUNC_CLOSEDIR_VOID
+AC_FUNC_STAT
+AC_FUNC_VPRINTF
+AC_CHECK_FUNCS([getcwd putenv strdup])
+# AC_CONFIG_SUBDIRS([samples])
+AC_CONFIG_FILES([Makefile
+ tools/Makefile
+ tools/scagen/Makefile
+ runtime/Makefile
+ runtime/ws_reference/Makefile
+ runtime/ws_reference/axis2c/Makefile
+ runtime/ws_reference/axis2c/src/Makefile
+ runtime/ws_service/Makefile
+ runtime/ws_service/axis2c/Makefile
+ runtime/ws_service/axis2c/src/Makefile
+ runtime/core/Makefile
+ runtime/core/src/Makefile
+ runtime/core/test/Makefile
+ runtime/core/test/CustomerInfo/Makefile
+ runtime/core/test/MyValue/Makefile
+ runtime/core/test/src/Makefile
+ ])
+AC_OUTPUT
+
diff --git a/branches/cpp-M1/sca/doc/CreatingSCACPPComponents.txt b/branches/cpp-M1/sca/doc/CreatingSCACPPComponents.txt
new file mode 100644
index 0000000000..17f6430b79
--- /dev/null
+++ b/branches/cpp-M1/sca/doc/CreatingSCACPPComponents.txt
@@ -0,0 +1,281 @@
+Creating SCA Components in Tuscany SCA C++
+==========================================
+
+This document describes how to create and run SCA components in Tuscany SCA C++
+milestone release 1.
+
+
+Creating and deploying an SCA C++ Component
+===========================================
+
+Each SCA C++ component needs:
+ o A service header file that defines the operations that can be invoked on the
+ component
+ o An implementation header file that defines the implementation and extends
+ the service header file
+ o A C++ implementation of the service that implements the operations defined
+ in the service header file
+ o Proxy and wrapper header and implementation files generated by the Tuscany
+ C++ SCAGEN tool
+ o A component definition in the module sca.module file
+ o A service definition in a .componentType file
+ o A module component definition in a sca.subsystem file
+
+
+In this section we will use the Calculator sample as a worked example.
+The Calculator code and files can be found at samples/Calculator and has been
+developed further than the details specified below. In the interests of
+readability, the example used below takes the simplest path.
+
+
+1. Create the service header file that defines the operations your component
+ will implement. E.g. Calculator.h contains the following:
+
+#ifndef CALCULATOR_H
+#define CALCULATOR_H
+class Calculator
+{
+public:
+ virtual float add(float arg1, float arg2) = 0;
+ virtual float sub(float arg1, float arg2) = 0;
+ virtual float mul(float arg1, float arg2) = 0;
+ virtual float div(float arg1, float arg2) = 0;
+};
+
+#endif
+
+
+2. Create the implementation header file that extends the service header file.
+ E.g. CalculatorImpl.h contains the following:
+
+#ifndef CALCULATORIMPL_H
+#define CALCULATORIMPL_H
+
+#include "Calculator.h"
+
+class CalculatorImpl : public Calculator
+{
+public:
+ CalculatorImpl();
+ virtual ~CalculatorImpl();
+
+ // Calculator interface
+ virtual float add(float arg1, float arg2);
+ virtual float sub(float arg1, float arg2);
+ virtual float mul(float arg1, float arg2);
+ virtual float div(float arg1, float arg2);
+};
+
+#endif
+
+
+3. Create the implementation for the component based on the implementation
+ header file. E.g. CalculatorImpl.cpp contains the following code:
+
+#include "CalculatorImpl.h"
+#include <stdio.h>
+
+CalculatorImpl::CalculatorImpl()
+{
+}
+
+CalculatorImpl::~CalculatorImpl()
+{
+}
+
+// Calculator interface
+float CalculatorImpl::add(float arg1, float arg2)
+{
+ float result = arg1 + arg2;
+
+ printf("CalculatorImpl::add %f + %f = %f\n", arg1, arg2, result);
+ return result;
+}
+
+float CalculatorImpl::sub(float arg1, float arg2)
+{
+ float result = arg1 - arg2;
+ printf("CalculatorImpl::sub %f - %f = %f\n", arg1, arg2, result);
+ return result;
+}
+
+float CalculatorImpl::div(float arg1, float arg2)
+{
+ float result = arg1 / arg2;
+ printf("CalculatorImpl::div %f / %f = %f\n", arg1, arg2, result);
+ return result;
+}
+
+float CalculatorImpl::mul(float arg1, float arg2)
+{
+ float result = arg1 * arg2;
+ printf("CalculatorImpl::mul %f * %f = %f\n", arg1, arg2, result);
+ return result;
+}
+
+
+4. Create the componentType file for your component to define the service that
+ your component provides. The file must be named after your implementation
+ class and specifies the name of the service and the service header file
+ (which describes the service operations). E.g. CalculatorImpl.componentType
+ contains the following XML:
+
+<?xml version="1.0" encoding="ASCII"?>
+<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="CalculatorService">
+ <interface.cpp header="Calculator.h"/>
+ </service>
+</componentType>
+
+
+5. Create the sca.module file for your module and define your component within
+ it. The component definition specifies the implementation library to use (a
+ .dll file on Windows and a .so file on Linux) and the implementation header
+ file (which describes the implementation class). Component properties and
+ references to other services can also be specified here. E.g. the
+ Calculator sca.module file contains the following XML:
+
+<?xml version="1.0" encoding="ASCII"?>
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ name="CalculatorModule">
+
+ <!-- The Calculator component -->
+ <component name="CalculatorServiceComponent">
+ <implementation.cpp dll="Calculator.dll" header="CalculatorImpl.h"/>
+ <properties></properties>
+ <references></references>
+ </component>
+</module>
+
+
+6. Generate the proxy and wrapper classes and header files using the SCAGEN
+ tool. These classes are used by the Tuscany SCA C++ runtime to enable
+ service implementations to be invoked from a client or another component.
+ Run the SCAGEN tool, specifying the directory where your header files,
+ sca.module and componentType file are and the directory where you
+ want the generated files to be placed. E.g. on Windows, the
+ following command is run from the directory where Tuscany SCA is deployed:
+
+bin/scagen.cmd -dir samples/Calculator/CalculatorModule -output samples/Calculator/CalculatorModule
+
+ which produces the following files:
+
+CalculatorImpl_CalculatorService_Proxy.h
+CalculatorImpl_CalculatorService_Proxy.cpp
+CalculatorImpl_CalculatorService_Wrapper.h
+CalculatorImpl_CalculatorService_Wrapper.cpp
+
+
+7. Compile and link the code that has been written and generated. This will
+ produce a .dll or .so library file. The name should match the library name
+ specified in the sca.module file.
+
+
+8. Create the sca.subsystem file and define your module component within it.
+ The module component definition should specify the service name used in the
+ componentType file and the module name used in the sca.module file. E.g.
+ the Calculator sca.subsystem file contains the following XML:
+
+<?xml version="1.0" encoding="ASCII"?>
+<subsystem xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ name="CalculatorSubsystem">
+
+ <moduleComponent name="CalculatorService" module="CalculatorModule"/>
+</subsystem>
+
+
+9. Deploy the various files into the SCA directory structure, as follows:
+
+<deploy_root>/modules/ModuleName/ServiceHeader.h
+<deploy_root>/modules/ModuleName/ImplementationHeader.h
+<deploy_root>/modules/ModuleName/sca.module
+<deploy_root>/modules/ModuleName/Implementation.componentType
+<deploy_root>/modules/ModuleName/Implementation.dll (or .so on Linux)
+<deploy_root>/subsystems/SubsystemName/sca.subsystem
+
+ E.g. for the Calculator sample the structure is:
+
+samples/Calculator/deploy/modules/CalculatorModule/Calculator.h
+samples/Calculator/deploy/modules/CalculatorModule/CalculatorImpl.h
+samples/Calculator/deploy/modules/CalculatorModule/sca.module
+samples/Calculator/deploy/modules/CalculatorModule/CalculatorImpl.componentType
+samples/Calculator/deploy/modules/CalculatorModule/Calculator.dll
+samples/Calculator/deploy/subsystems/CalculatorSubsystem/sca.subsystem
+
+
+10. Your component, module and subsystem are now ready to be invoked. Create a
+ client that will call the service. E.g. the Calculator client (in the
+ Calc.cpp file) contains code similar to the following:
+
+try
+{
+ // Define and start the Tuscany runtime:
+ // Set the system root path that contains the SCA directory structure, set
+ // the default module component that will be used based on the format
+ // <SubsystemName>/<ModuleComponentName> and then start the runtime
+ TuscanyRuntime rt;
+ rt.setSystemRoot("C:/tuscany_sca/samples/Calculator/deploy");
+ rt.setDefaultModuleComponent("CalculatorSubsystem/CalculatorService");
+ rt.start();
+
+
+ // Locate the service
+ ModuleContext myContext = ModuleContext::getCurrent();
+ Calculator *calcService = (Calculator*) myContext.locateService("CalculatorServiceComponent");
+ if (calcService == 0)
+ {
+ cout << "MyCalculatorClient.exe: Unable to find Calculator service" << endl;
+ }
+ else
+ {
+ result = calcService->add(arg1, arg2);
+ cout << "Calculator: add(" << arg1 << "," << arg2 << ") = " << result << endl;
+ }
+}
+catch (ServiceRuntimeException& ex)
+{
+ cout << "MyCalculatorClient.exe: Error whilst starting or invoking Tuscany: " <<
+ ex.getMessageText() << endl;
+}
+
+
+11. Compile, link and run the client that has been created. You should
+ (hopefully!) see your component invoked. Remember you will need to have the
+ TUSCANY_SCACPP, TUSCANY_SDOCPP and AXIS2C_HOME environment variables set,
+ as well as the SCA and SDO bin directories and the Axis2C lib directory on
+ your PATH (or LD_LIBRARY_PATH on Linux). E.g. on Windows run the following
+ commands:
+
+set TUSCANY_SCACPP=C:/tuscany_sca
+set TUSCANY_SDOCPP=C:/tuscany_sdo
+set AXIS2C_HOME=C:/axis2c-bin-0.92-win32
+set PATH=%PATH%;C:/tuscany_sca/bin;C:/tuscany_sdo/bin;C:/axis2c-bin-0.92-win32/lib
+./MyCalculatorClient.exe
+
+
+12. Optionally, enable Tuscany logging by setting the TUSCANY_SCACPP_LOGGING
+ environment variable with the level you wish to log at (0 for minimal
+ logging, up to 9 for more detailed logging) and the TUSCANY_SCACPP_LOG
+ environment variable to define the file to log to (if this is not set,
+ logging will go to the console). E.g. on Windows run the following
+ commands:
+
+set TUSCANY_SCACPP_LOGGING=5
+set TUSCANY_SCACPP_LOG=C:/tuscany/mylogfile.txt
+
+
+Further Steps
+-------------
+
+The Calculator sample has been developed further than the details specified
+above. In particular, it demonstrates how two services can be wired together
+such that one references and invokes the other. It also demonstrates how to
+expose the Calculator component service as an Axis2C Web Service. See the
+WSEntrypoint.txt document for more details on exposing components as Web
+Services.
+
+
+
diff --git a/branches/cpp-M1/sca/doc/WSEntrypoint.txt b/branches/cpp-M1/sca/doc/WSEntrypoint.txt
new file mode 100644
index 0000000000..7e59008cae
--- /dev/null
+++ b/branches/cpp-M1/sca/doc/WSEntrypoint.txt
@@ -0,0 +1,272 @@
+Web Services EntryPoint
+=======================
+
+This section of the document describes the use of the Web Service EntryPoint
+(WS EntryPoint) support in the Apache Tuscany SCA C++ runtime.
+
+The WS EntryPoint code is based on Apache Axis2C version 0.92
+(http://ws.apache.org/axis2/c) and allows SCA components to be invoked via Web
+Service calls.
+
+WS EntryPoint currently supports Document/literal Wrapped style Web Services
+only. There are also restrictions about the parameter and return types of the
+operations in SCA components that can be exposed as Web Services, see below
+for more details.
+
+
+Defining and deploying an SCA Module with a WS EntryPoint
+=========================================================
+
+In this section we will use the Calculator sample as a worked example.
+The Calculator code and files can be found at sca/samples/Calculator.
+
+Pre-requisites:
+
+ o A working component within a module and subsystem, with SCAGEN generated
+ Proxy and Wrapper classes and a DLL or SO library compiled from these and
+ the component class files. The sca.module, *.componentType, *.fragment and
+ sca.subsystem files must also be available and working
+
+1. Create the WSDL that defines the interface of your SCA component. See the
+table "XML Schema Type to C++ Type Mapping" and "Notes on creating WSDL" below
+for mapping the parameters and return types of the component operations to XML
+schema types in the WSDL. This file needs to be accessible from the component,
+so place it in the same directory as the component or in a subdirectory.
+
+See the sca/samples/Calculator/CalculatorModule/Calculator.wsdl file as an
+example.
+
+
+2. Add an EntryPoint definition to the sca.module file, setting the
+interface.wsdl interface attribute to the WSDL file defined above, the
+reference element to the name of the component to be invoked and the binding.ws
+port attribute to the namespace, service and port name specified in the
+WSDL, in the form: "<namespace>#wsdl.endpoint(<service-name>/<port-name>)".
+Also give the EntryPoint a name and set the multiplicity.
+
+E.g. for the Calculator component, based on the Calculator.wsdl file:
+
+<!-- Expose as a web service -->
+<entryPoint name="WSCalculatorEntrypoint" multiplicity="1..1">
+ <interface.wsdl interface="Calculator.wsdl" />
+ <binding.ws port="tuscany/c/Calculator#wsdl.endpoint(CalculatorService/CalculatorServicePort)"/>
+ <reference>CalculatorServiceComponent</reference>
+</entryPoint>
+
+
+3. Create a file named Tuscany-model.config in the same directory as your
+component. This file defines which WSDL and XML Schema files to include in the
+Tuscany runtime environment for this module. Set the contents of the file
+using the example below and use the path and name of the WSDL file created
+above.
+
+E.g. for the Calculator component
+
+<?xml version="1.0" encoding="utf-8" ?>
+<tuscany-model xmlns="http://org.apache.tuscany/xmlns/cpp/1.0">
+ <wsdl>
+ <file name="Calculator.wsdl"/>
+ </wsdl>
+</tuscany-model>
+
+
+
+These changes are all that are required in the Tuscany runtime environment to
+expose a component as a Web Service; the following steps detail how to add the
+Web Service to the list of Axis2C services.
+
+
+4. Create a new directory within the Axis2C services directory. The name of
+this directory defines the URL of your service. For example, if you create a
+directory named "CalcWebService", the URL of the service will be
+http://localhost:9090/axis2/services/CalcWebService
+
+
+5. Create a file named services.xml within the new directory. This file defines
+the library to use that contains the service code and the operations that the
+service exposes. For the Tuscany WS EntryPoint, you also need to add some
+Tuscany specific parameters to identify the Tuscany System Root directory and
+the EntryPoint that will be invoked.
+
+The TuscanySystemRoot parameter requires the full path to your system root
+directory - this is the directory that contains the "modules" and "subsystem"
+directories; which in turn contain your modules and subsystems.
+
+The TuscanyEntryPoint parameter is of the form
+"<subsystem-name>/<service-name>/<entrypoint-name>", with the subsystem and
+service names defined in your sca.subsystem file and the EntryPoint name
+defined in the EntryPoint definition you added to your sca.module file above.
+
+Set the ServiceClass parameter to "tuscany_sca_ws_service" as this library
+(tuscany_sca_ws_service.dll on Windows and libtuscany_sca_ws_service.so on
+Linux) contains the service code that will invoke your component.
+
+Finally, add all of the operations that your component defines that you want
+to expose as Web Service operations.
+
+E.g. for the Calculator WS EntryPoint,
+axis2c/services/CalcWebService/services.xml contains:
+
+<service name="CalcWebService">
+
+ <parameter name="ServiceClass" locked="xsd:false">tuscany_sca_ws_service</parameter>
+ <parameter name="TuscanySystemRoot" locked="xsd:false">C:/tuscany/cpp/sca/samples/runtime</parameter>
+ <parameter name="TuscanyEntryPoint" locked="xsd:false">CalculatorSubsystem/CalculatorService/WSCalculatorEntrypoint</parameter>
+
+ <operation name="add"/>
+ <operation name="sub"/>
+ <operation name="mul"/>
+ <operation name="div"/>
+
+</service>
+
+
+6. Copy the tuscany_sca_ws_service.dll file (or the
+libtuscany_sca_ws_service.so file, if on Linux) to the new service directory
+you created above. This library contains the code that Axis2C requires to call
+a service implementation and links to the tuscany_sca.dll library (or
+libtuscany_sca.so on Linux) which manages the invocation of your component.
+
+
+7. Ensure the TUSCANY_SCACPP, TUSCANY_SDOCPP, AXIS2C_HOME and PATH environment
+variables are correctly set
+
+E.g. on Windows run the following commands with the correct directories:
+set TUSCANY_SCACPP=C:/path_to_tuscany/sca/deploy
+set TUSCANY_SDOCPP=C:/path_to_tuscany/sdo/deploy
+set AXIS2C_HOME=C:/path_to_axis2c0.92
+set PATH=%PATH%;C:/path_to_tuscany/sca/deploy/bin;C:/path_to_tuscany/sdo/deploy/bin;C:/path_to_axis2c0.92/lib
+
+
+8. Optionally, enable logging in Tuscany by setting the TUSCANY_SCACPP_LOGGING
+environment variable with the level you wish to log at (0 for minimal
+logging, up to 9 for more detailed logging) and the TUSCANY_SCACPP_LOG
+environment variable to define the file to log to (if this is not set, logging
+will go to the console)
+
+E.g. on Windows run the following commands:
+set TUSCANY_SCACPP_LOGGING=5
+set TUSCANY_SCACPP_LOG=C:/tuscany/mylogfile.txt
+
+Additionally, Axis2C automatically writes logging files to the Axis2C logs
+directory (e.g. C:/path_to_axis2c0.92/logs). In particular the Axis2.log file
+may contain useful information about your service.
+
+
+9. Start the Simple Axis server, or your Apache HTTP server if you have
+deployed Axis2C to Apache.
+
+E.g. on Windows run the following commands:
+cd C:/path_to_axis2c0.92/bin
+./axis2_http_server.exe
+
+
+Your component should now be exposed as an Axis2C Web Service, via the WS
+EntryPoint you created. See the Axis2C documentation for writing clients to
+invoke the Web Service, or you can use any other Web Service client platform
+(e.g. Axis2 for Java: http://ws.apache.org/axis2), or you can invoke your
+component from another Tuscany runtime by using Tuscany's WS External Service
+support.
+
+
+
+XML Schema Type to C++ Type Mapping
+===================================
+
+To help define the WSDL that describes the interface of your component, the
+table below lists how incoming XML data in Web Service messages is mapped to
+C++ types used in the parameters and return types of your component operations.
+
+This lists the only C++ types that can currently be used on the operations of a
+component exposed as a Web Service. For other types, use an SDO DataObject to
+wrap the data, and define that wrapping as a complexType in the WSDL. See the
+SDO specifications (available from the Tuscany website) for the C++ types that
+SDO supports.
+
+
+ XML Schema Type | C++ Type
+-------------------------------------------------------------
+ |
+ string | char*
+ |
+ int | long
+ |
+ integer | long
+ |
+ short | short
+ |
+ float | float
+ |
+ double | long double
+ |
+ boolean | bool
+ |
+ hexBinary | char*
+ |
+ base64Binary | char*
+ |
+ byte | char
+ |
+ complexType | SDO DataObjectPtr
+ |
+ any | SDO DataObjectPtr with OpenDataObjectType
+
+
+
+Notes on creating WSDL
+======================
+
+ o Currently only Document/literal Wrapped style Web Services are supported by
+ WS EntryPoint, support for RPC style Web Services is planned for future
+ releases.
+
+ See the article at http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/
+ for an explanation of Document/literal Wrapped style WSDL and Web Services
+
+ o Operation parameter and return messages that are defined in the WSDL must be
+ XML Schema elements containing a complexType - there is currently no
+ support for simpleTypes or single-level elements. Also, Document/literal
+ Wrapped services require that the operation name is used as the name of the
+ incoming element that wraps the operation parameters.
+
+ For example, a component operation defined in C++ as:
+
+ long myOperation(char* arg1, short arg2, DataObjectPtr arg3);
+
+ will need to be described in WSDL with messages like:
+
+ <wsdl:message name="myOperationRequestMsg">
+ <wsdl:part element="tns:myOperation" name="myOperationRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="myOperationResponseMsg">
+ <wsdl:part element="tns:myOperationResponse" name="myOperationResponsePart"/>
+ </wsdl:message>
+
+ and will need an XML schema to define the types like:
+
+ <xsd:element name="myOperation">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="arg1" type="xsd:string" minOccurs="1"/>
+ <xsd:element name="arg2" type="xsd:short" minOccurs="1"/>
+ <xsd:element name="arg3" minOccurs="1">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="dataObjectFloatData" type="xsd:float"/>
+ <xsd:element name="dataObjectStringData" type="xsd:string"/>
+ <xsd:element name="dataObjectIntData" type="xsd:int"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="myOperationResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="result" type="xsd:int" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
diff --git a/branches/cpp-M1/sca/doc/css/maven-base.css b/branches/cpp-M1/sca/doc/css/maven-base.css
new file mode 100644
index 0000000000..314da3a272
--- /dev/null
+++ b/branches/cpp-M1/sca/doc/css/maven-base.css
@@ -0,0 +1,147 @@
+body {
+ margin: 0px;
+ padding: 0px;
+}
+img {
+ border:none;
+}
+table {
+ padding:0px;
+ width: 100%;
+ margin-left: -2px;
+ margin-right: -2px;
+}
+acronym {
+ cursor: help;
+ border-bottom: 1px dotted #feb;
+}
+table.bodyTable th, table.bodyTable td {
+ padding: 2px 4px 2px 4px;
+ vertical-align: top;
+}
+div.clear{
+ clear:both;
+ visibility: hidden;
+}
+div.clear hr{
+ display: none;
+}
+#bannerLeft, #bannerRight {
+ font-size: xx-large;
+ font-weight: bold;
+}
+#bannerLeft img, #bannerRight img {
+ margin: 0px;
+}
+.xleft, #bannerLeft img {
+ float:left;
+ text-shadow: #7CFC00;
+}
+.xright, #bannerRight img {
+ float:right;
+ text-shadow: #7CFC00;
+}
+#banner {
+ padding: 0px;
+}
+#banner img {
+ border: none;
+}
+#breadcrumbs {
+ padding: 3px 10px 3px 10px;
+}
+#leftColumn {
+ width: 150px;
+ float:left;
+}
+#bodyColumn {
+ margin-right: 1.5em;
+ margin-left: 177px;
+}
+#legend {
+ padding: 8px 0 8px 0;
+}
+#navcolumn {
+ padding: 8px 4px 0 8px;
+}
+#navcolumn h5 {
+ margin: 0;
+ padding: 0;
+ font-size: small;
+}
+#navcolumn ul {
+ margin: 0;
+ padding: 0;
+ font-size: small;
+}
+#navcolumn li {
+ list-style-type: none;
+ background-image: none;
+ background-repeat: no-repeat;
+ background-position: 0 0.4em;
+ padding-left: 16px;
+ list-style-position: ouside;
+ line-height: 1.2em;
+ font-size: smaller;
+}
+#navcolumn li.expanded {
+ background-image: url(../images/expanded.gif);
+}
+#navcolumn li.collapsed {
+ background-image: url(../images/collapsed.gif);
+}
+#poweredBy {
+ text-align: center;
+}
+#navcolumn img {
+ margin-top: 10px;
+ margin-bottom: 3px;
+}
+#poweredBy img {
+ display:block;
+ margin: 20px 0 20px 17px;
+ border: 1px solid black;
+ width: 90px;
+ height: 30px;
+}
+#search img {
+ margin: 0px;
+ display: block;
+}
+#search #q, #search #btnG {
+ border: 1px solid #999;
+ margin-bottom:10px;
+}
+#search form {
+ margin: 0px;
+}
+#lastPublished {
+ font-size: x-small;
+}
+.navSection {
+ margin-bottom: 2px;
+ padding: 8px;
+}
+.navSectionHead {
+ font-weight: bold;
+ font-size: x-small;
+}
+.section {
+ padding: 4px;
+}
+#footer {
+ padding: 3px 10px 3px 10px;
+ font-size: x-small;
+}
+#breadcrumbs {
+ font-size: x-small;
+ margin: 0pt;
+}
+.source {
+ padding: 12px;
+ margin: 1em 7px 1em 7px;
+}
+.source pre {
+ margin: 0px;
+ padding: 0px;
+}
diff --git a/branches/cpp-M1/sca/doc/css/maven-theme.css b/branches/cpp-M1/sca/doc/css/maven-theme.css
new file mode 100644
index 0000000000..5c8e7b4abf
--- /dev/null
+++ b/branches/cpp-M1/sca/doc/css/maven-theme.css
@@ -0,0 +1,125 @@
+body {
+ padding: 0px 0px 10px 0px;
+}
+body, td, select, input, li{
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+ font-size: 13px;
+}
+code{
+ font-family: Courier, monospace;
+ font-size: 13px;
+}
+a {
+ text-decoration: none;
+}
+a:link {
+ color:#36a;
+}
+a:visited {
+ color:#47a;
+}
+a:active, a:hover {
+ color:#69c;
+}
+#legend li.externalLink {
+ background: url(../images/external.png) left top no-repeat;
+ padding-left: 18px;
+}
+a.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover {
+ background: url(../images/external.png) right center no-repeat;
+ padding-right: 18px;
+}
+#legend li.newWindow {
+ background: url(../images/newwindow.png) left top no-repeat;
+ padding-left: 18px;
+}
+a.newWindow, a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover {
+ background: url(../images/newwindow.png) right center no-repeat;
+ padding-right: 18px;
+}
+h2 {
+ padding: 4px 4px 4px 6px;
+ border: 1px solid #999;
+ color: #900;
+ background-color: #ddd;
+ font-weight:900;
+ font-size: x-large;
+}
+h3 {
+ padding: 4px 4px 4px 6px;
+ border: 1px solid #aaa;
+ color: #900;
+ background-color: #eee;
+ font-weight: normal;
+ font-size: large;
+}
+h4 {
+ padding: 4px 4px 4px 6px;
+ border: 1px solid #bbb;
+ color: #900;
+ background-color: #fff;
+ font-weight: normal;
+ font-size: large;
+}
+h5 {
+ padding: 4px 4px 4px 6px;
+ color: #900;
+ font-size: normal;
+}
+p {
+ line-height: 1.3em;
+ font-size: small;
+}
+#breadcrumbs {
+ border-top: 1px solid #aaa;
+ border-bottom: 1px solid #aaa;
+ background-color: #ccc;
+}
+#leftColumn {
+ margin: 10px 0 0 5px;
+ border: 1px solid #999;
+ background-color: #eee;
+}
+#navcolumn h5 {
+ font-size: smaller;
+ border-bottom: 1px solid #aaaaaa;
+ padding-top: 2px;
+ color: #000;
+}
+
+table.bodyTable th {
+ color: white;
+ background-color: #bbb;
+ text-align: left;
+ font-weight: bold;
+}
+
+table.bodyTable th, table.bodyTable td {
+ font-size: 1em;
+}
+
+table.bodyTable tr.a {
+ background-color: #ddd;
+}
+
+table.bodyTable tr.b {
+ background-color: #eee;
+}
+
+.source {
+ border: 1px solid #999;
+}
+dl {
+ padding: 4px 4px 4px 6px;
+ border: 1px solid #aaa;
+ background-color: #ffc;
+}
+dt {
+ color: #900;
+}
+#organizationLogo img, #projectLogo img, #projectLogo span{
+ margin: 8px;
+}
+#banner {
+ border-bottom: 1px solid #fff;
+}
diff --git a/branches/cpp-M1/sca/makebindist.sh b/branches/cpp-M1/sca/makebindist.sh
new file mode 100755
index 0000000000..8a274dc407
--- /dev/null
+++ b/branches/cpp-M1/sca/makebindist.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# 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.
+
+TUSCANY_SCACPP_HOME=`pwd`
+
+if [ x$AXIS2C_HOME = x ]; then
+echo "AXIS2C_HOME not set"
+exit;
+fi
+echo "Using Axis2C installed at $AXIS2C_HOME"
+
+if [ x$TUSCANY_SDOCPP = x ]; then
+echo "TUSCANY_SDOCPP not set"
+exit;
+fi
+echo "Using SDO installed at $TUSCANY_SDOCPP"
+
+cd $TUSCANY_SCACPP_HOME
+./configure --prefix=${TUSCANY_SCACPP_HOME}/deploy --enable-static=no
+make
+make install
+
+cd ${TUSCANY_SCACPP_HOME}/samples
+export TUSCANY_SCACPP=${TUSCANY_SCACPP_HOME}/deploy
+./configure --prefix=${TUSCANY_SCACPP_HOME}/deploy --enable-static=no
+make
+make install
+
+cd ${TUSCANY_SCACPP_HOME}/deploy
+for i in `find . -name "*.la"`
+do
+ rm $i
+done
+
diff --git a/branches/cpp-M1/sca/makedist.sh b/branches/cpp-M1/sca/makedist.sh
new file mode 100755
index 0000000000..b90ce68489
--- /dev/null
+++ b/branches/cpp-M1/sca/makedist.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+# 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.
+
+TUSCANY_SCACPP_HOME=`pwd`
+
+if [ x$AXIS2C_HOME = x ]; then
+echo "AXIS2C_HOME not set"
+exit;
+fi
+echo "Using Axis2C installed at $AXIS2C_HOME"
+
+if [ x$TUSCANY_SDOCPP = x ]; then
+echo "TUSCANY_SDOCPP not set"
+exit;
+fi
+echo "Using SDO installed at $TUSCANY_SDOCPP"
+
+cd ${TUSCANY_SCACPP_HOME}/samples
+./autogen.sh
+./configure --prefix=${TUSCANY_SCACPP_HOME}/deploy --enable-static=no
+
+cd $TUSCANY_SCACPP_HOME
+./autogen.sh
+./configure --prefix=${TUSCANY_SCACPP_HOME}/deploy --enable-static=no
+
+make bindist
+
+
+
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/build.cmd b/branches/cpp-M1/sca/projects/tuscany_sca/build.cmd
new file mode 100644
index 0000000000..cd1a2eeaae
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/build.cmd
@@ -0,0 +1,19 @@
+@echo off
+@REM Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM 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, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+setlocal
+cd tuscany_sca_test
+nmake -f tuscany_sca_test.mak CFG="tuscany_sca_test - Win32 Release"
+cd ..
+endlocal
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca.dsw b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca.dsw
new file mode 100644
index 0000000000..89d7942d77
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca.dsw
@@ -0,0 +1,98 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "tuscany_sca"=.\tuscany_sca\tuscany_sca.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "tuscany_sca_test"=.\tuscany_sca_test\tuscany_sca_test.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name tuscany_sca
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name tuscany_sca_test_CustomerInfo
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name tuscany_sca_test_MyValue
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name tuscany_sca_ws_service
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "tuscany_sca_test_CustomerInfo"=.\tuscany_sca_test_CustomerInfo\tuscany_sca_test_CustomerInfo.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name tuscany_sca
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "tuscany_sca_test_MyValue"=.\tuscany_sca_test_MyValue\tuscany_sca_test_MyValue.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name tuscany_sca
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "tuscany_sca_ws_service"=.\tuscany_sca_ws_service\tuscany_sca_ws_service.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name tuscany_sca
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca.ncb b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca.ncb
new file mode 100644
index 0000000000..dc29a53257
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca.ncb
Binary files differ
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca.opt b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca.opt
new file mode 100644
index 0000000000..3a2046245e
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca.opt
Binary files differ
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca/Build Instructions.txt b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca/Build Instructions.txt
new file mode 100644
index 0000000000..9f298f0707
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca/Build Instructions.txt
@@ -0,0 +1,30 @@
+Tuscany SCA Build Instructions
+==============================
+
+1) Set the environment variable TUSCANY_SDOCPP to the path of an SDO driver
+
+2) Set the environment variable AXIS2C_HOME to the path of Axis2C (Version 0.92)
+
+NOTE: The environment variables must be set BEFORE launching Visual Studio
+
+3) Build->Rebuild All
+
+The output for the build will be in tuscany\cpp\sca\include, lib and bin
+
+To run the test from a command prompt:
+
+1) Set the environment variable TUSCANY_SCACPP to the location of the built SCA
+ (...tuscany\cpp\sca\deploy)
+
+2) Set the environment variable TUSCANY_SCACPP_SYSTEM_ROOT to the location of the test system
+ ...tuscany\cpp\sca\projects\tuscany_sca\tuscany_sca_test\testSCASystem
+
+3) Add %TUSCANY_SCACPP%\lib and %TUSCANY_SDOCPP%\lib to the PATH
+ (ensure required libraries for SDO are also on the path. e.g. libxml2)
+
+4) cd %TUSCANY_SCACPP%\..\projects\tuscany_sca\tuscany_sca_test\Debug
+
+5) tuscany_sca_test
+
+NOTE: To run the test from the workspace the environment variables must be set
+ BEFORE launching Visual Studio
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca/tuscany_sca.dsp b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca/tuscany_sca.dsp
new file mode 100644
index 0000000000..c898f3da3f
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca/tuscany_sca.dsp
@@ -0,0 +1,537 @@
+# Microsoft Developer Studio Project File - Name="tuscany_sca" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=tuscany_sca - 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 "tuscany_sca.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 "tuscany_sca.mak" CFG="tuscany_sca - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "tuscany_sca - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "tuscany_sca - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "tuscany_sca - 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 Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SCA_EXPORTS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# 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 /nologo /dll /machine:I386
+# ADD LINK32 axis2_engine.lib tuscany_sdo_axiom.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 axis2_parser.lib axis2_util.lib axiom.lib /nologo /dll /machine:I386 /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=del ..\..\..\deploy\bin\tuscany_sca.* del ..\..\..\deploy\lib\*.lib copy ..\..\..\runtime\core\src\osoa\sca\*.h ..\..\..\deploy\include\osoa\sca copy ..\..\..\runtime\core\src\tuscany\sca\core\*.h ..\..\..\deploy\include\tuscany\sca\core copy ..\..\..\runtime\core\src\tuscany\sca\model\*.h ..\..\..\deploy\include\tuscany\sca\model copy ..\..\..\runtime\core\src\tuscany\sca\util\*.h ..\..\..\deploy\include\tuscany\sca\util copy ..\..\..\runtime\core\src\tuscany\sca\ws\*.h ..\..\..\deploy\include\tuscany\sca\ws copy Release\tuscany_sca.dll ..\..\..\deploy\bin copy Release\tuscany_sca.lib ..\..\..\deploy\lib copy ..\..\..\xsd\*.* ..\..\..\deploy\xsd
+# End Special Build Tool
+
+!ELSEIF "$(CFG)" == "tuscany_sca - 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 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SCA_EXPORTS" /FD /GZ /c
+# SUBTRACT CPP /X
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# 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 /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 axis2_engine.lib tuscany_sdo_axiom.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 axis2_parser.lib axis2_util.lib axiom.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=del ..\..\..\deploy\bin\tuscany_sca.* del ..\..\..\deploy\lib\*.lib copy ..\..\..\runtime\core\src\osoa\sca\*.h ..\..\..\deploy\include\osoa\sca copy ..\..\..\runtime\core\src\tuscany\sca\core\*.h ..\..\..\deploy\include\tuscany\sca\core copy ..\..\..\runtime\core\src\tuscany\sca\model\*.h ..\..\..\deploy\include\tuscany\sca\model copy ..\..\..\runtime\core\src\tuscany\sca\util\*.h ..\..\..\deploy\include\tuscany\sca\util copy ..\..\..\runtime\core\src\tuscany\sca\ws\*.h ..\..\..\deploy\include\tuscany\sca\ws copy Debug\tuscany_sca.dll ..\..\..\deploy\bin copy Debug\tuscany_sca.pdb ..\..\..\deploy\bin copy Debug\tuscany_sca.lib ..\..\..\deploy\lib copy ..\..\..\xsd\*.* ..\..\..\deploy\xsd
+# End Special Build Tool
+
+!ENDIF
+
+# Begin Target
+
+# Name "tuscany_sca - Win32 Release"
+# Name "tuscany_sca - Win32 Debug"
+# Begin Group "osoa/sca"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ComponentContext.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ComponentContext.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ComponentContextImpl.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ComponentContextImpl.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\export.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ModuleContext.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ModuleContext.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ModuleContextImpl.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ModuleContextImpl.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\SCA.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\sca.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ServiceList.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ServiceList.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ServiceRuntimeException.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ServiceRuntimeException.h
+# End Source File
+# End Group
+# Begin Group "tuscany/sca"
+
+# PROP Default_Filter ""
+# Begin Group "core"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ComponentServiceWrapper.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ComponentServiceWrapper.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ExternalServiceWrapper.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ExternalServiceWrapper.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\Operation.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\Operation.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\SCAEntryPoint.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\SCAEntryPoint.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\SCARuntime.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\SCARuntime.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ServiceProxy.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ServiceProxy.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ServiceWrapper.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ServiceWrapper.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\TuscanyRuntime.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\TuscanyRuntime.h
+# End Source File
+# End Group
+# Begin Group "model"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Binding.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Binding.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Component.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Component.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CPPImplementation.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CPPImplementation.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CPPInterface.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CPPInterface.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\EntryPoint.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\EntryPoint.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ExternalService.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ExternalService.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Implementation.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Implementation.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Interface.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Interface.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ModelLoader.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ModelLoader.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Module.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Module.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Service.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Service.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ServiceReference.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ServiceReference.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Subsystem.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Subsystem.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\System.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\System.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Wire.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Wire.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WireTarget.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WireTarget.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WSBinding.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WSBinding.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Wsdl.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Wsdl.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WsdlOperation.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WsdlOperation.h
+# End Source File
+# End Group
+# Begin Group "util"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\DefaultLogWriter.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\DefaultLogWriter.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Exceptions.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\File.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\File.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\FileLogWriter.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\FileLogWriter.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Library.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Library.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Logger.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Logger.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Logging.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\LogWriter.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\LogWriter.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Utils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Utils.h
+# End Source File
+# End Group
+# Begin Group "ws"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\runtime\ws_reference\axis2c\src\Axis2Client.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\ws_reference\axis2c\src\Axis2Client.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\ws\EntryPointProxy.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\ws\EntryPointProxy.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\ws_reference\axis2c\src\WSServiceWrapper.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\ws\WSServiceWrapper.h
+# End Source File
+# End Group
+# End Group
+# Begin Group "xsd"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE="..\..\..\xsd\sca-binding-sca.xsd"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\..\xsd\sca-binding-webservice.xsd"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\..\xsd\sca-core.xsd"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\..\xsd\sca-implementation-cpp.xsd"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\..\xsd\sca-implementation-java.xsd"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\..\xsd\sca-interface-cpp.xsd"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\..\xsd\sca-interface-java.xsd"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\..\xsd\sca-interface-wsdl.xsd"
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\xsd\sca.xsd
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\xsd\tuscany.xsd
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=".\Build Instructions.txt"
+# End Source File
+# End Target
+# End Project
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca/tuscany_sca.mak b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca/tuscany_sca.mak
new file mode 100644
index 0000000000..e711264c36
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca/tuscany_sca.mak
@@ -0,0 +1,669 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on tuscany_sca.dsp
+!IF "$(CFG)" == ""
+CFG=tuscany_sca - Win32 Debug
+!MESSAGE No configuration specified. Defaulting to tuscany_sca - Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "tuscany_sca - Win32 Release" && "$(CFG)" != "tuscany_sca - Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!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 "tuscany_sca.mak" CFG="tuscany_sca - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "tuscany_sca - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "tuscany_sca - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+!IF "$(CFG)" == "tuscany_sca - Win32 Release"
+
+OUTDIR=.\Release
+INTDIR=.\Release
+# Begin Custom Macros
+OutDir=.\Release
+# End Custom Macros
+
+ALL : "$(OUTDIR)\tuscany_sca.dll"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\Axis2Client.obj"
+ -@erase "$(INTDIR)\Binding.obj"
+ -@erase "$(INTDIR)\Component.obj"
+ -@erase "$(INTDIR)\ComponentContext.obj"
+ -@erase "$(INTDIR)\ComponentContextImpl.obj"
+ -@erase "$(INTDIR)\ComponentServiceWrapper.obj"
+ -@erase "$(INTDIR)\CPPImplementation.obj"
+ -@erase "$(INTDIR)\CPPInterface.obj"
+ -@erase "$(INTDIR)\DefaultLogWriter.obj"
+ -@erase "$(INTDIR)\EntryPoint.obj"
+ -@erase "$(INTDIR)\EntryPointProxy.obj"
+ -@erase "$(INTDIR)\ExternalService.obj"
+ -@erase "$(INTDIR)\ExternalServiceWrapper.obj"
+ -@erase "$(INTDIR)\File.obj"
+ -@erase "$(INTDIR)\FileLogWriter.obj"
+ -@erase "$(INTDIR)\Implementation.obj"
+ -@erase "$(INTDIR)\Interface.obj"
+ -@erase "$(INTDIR)\Library.obj"
+ -@erase "$(INTDIR)\Logger.obj"
+ -@erase "$(INTDIR)\LogWriter.obj"
+ -@erase "$(INTDIR)\ModelLoader.obj"
+ -@erase "$(INTDIR)\Module.obj"
+ -@erase "$(INTDIR)\ModuleContext.obj"
+ -@erase "$(INTDIR)\ModuleContextImpl.obj"
+ -@erase "$(INTDIR)\Operation.obj"
+ -@erase "$(INTDIR)\SCA.obj"
+ -@erase "$(INTDIR)\SCAEntryPoint.obj"
+ -@erase "$(INTDIR)\SCARuntime.obj"
+ -@erase "$(INTDIR)\Service.obj"
+ -@erase "$(INTDIR)\ServiceList.obj"
+ -@erase "$(INTDIR)\ServiceProxy.obj"
+ -@erase "$(INTDIR)\ServiceReference.obj"
+ -@erase "$(INTDIR)\ServiceRuntimeException.obj"
+ -@erase "$(INTDIR)\ServiceWrapper.obj"
+ -@erase "$(INTDIR)\Subsystem.obj"
+ -@erase "$(INTDIR)\System.obj"
+ -@erase "$(INTDIR)\TuscanyRuntime.obj"
+ -@erase "$(INTDIR)\Utils.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\Wire.obj"
+ -@erase "$(INTDIR)\WireTarget.obj"
+ -@erase "$(INTDIR)\WSBinding.obj"
+ -@erase "$(INTDIR)\Wsdl.obj"
+ -@erase "$(INTDIR)\WsdlOperation.obj"
+ -@erase "$(INTDIR)\WSServiceWrapper.obj"
+ -@erase "$(OUTDIR)\tuscany_sca.dll"
+ -@erase "$(OUTDIR)\tuscany_sca.exp"
+ -@erase "$(OUTDIR)\tuscany_sca.lib"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SCA_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=axis2_engine.lib tuscany_sdo_axiom.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 axis2_parser.lib axis2_util.lib axiom.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\tuscany_sca.pdb" /machine:I386 /out:"$(OUTDIR)\tuscany_sca.dll" /implib:"$(OUTDIR)\tuscany_sca.lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib"
+LINK32_OBJS= \
+ "$(INTDIR)\ComponentContext.obj" \
+ "$(INTDIR)\ComponentContextImpl.obj" \
+ "$(INTDIR)\ModuleContext.obj" \
+ "$(INTDIR)\ModuleContextImpl.obj" \
+ "$(INTDIR)\SCA.obj" \
+ "$(INTDIR)\ServiceList.obj" \
+ "$(INTDIR)\ServiceRuntimeException.obj" \
+ "$(INTDIR)\ComponentServiceWrapper.obj" \
+ "$(INTDIR)\ExternalServiceWrapper.obj" \
+ "$(INTDIR)\Operation.obj" \
+ "$(INTDIR)\SCAEntryPoint.obj" \
+ "$(INTDIR)\SCARuntime.obj" \
+ "$(INTDIR)\ServiceProxy.obj" \
+ "$(INTDIR)\ServiceWrapper.obj" \
+ "$(INTDIR)\TuscanyRuntime.obj" \
+ "$(INTDIR)\Binding.obj" \
+ "$(INTDIR)\Component.obj" \
+ "$(INTDIR)\CPPImplementation.obj" \
+ "$(INTDIR)\CPPInterface.obj" \
+ "$(INTDIR)\EntryPoint.obj" \
+ "$(INTDIR)\ExternalService.obj" \
+ "$(INTDIR)\Implementation.obj" \
+ "$(INTDIR)\Interface.obj" \
+ "$(INTDIR)\ModelLoader.obj" \
+ "$(INTDIR)\Module.obj" \
+ "$(INTDIR)\Service.obj" \
+ "$(INTDIR)\ServiceReference.obj" \
+ "$(INTDIR)\Subsystem.obj" \
+ "$(INTDIR)\System.obj" \
+ "$(INTDIR)\Wire.obj" \
+ "$(INTDIR)\WireTarget.obj" \
+ "$(INTDIR)\WSBinding.obj" \
+ "$(INTDIR)\Wsdl.obj" \
+ "$(INTDIR)\WsdlOperation.obj" \
+ "$(INTDIR)\DefaultLogWriter.obj" \
+ "$(INTDIR)\File.obj" \
+ "$(INTDIR)\FileLogWriter.obj" \
+ "$(INTDIR)\Library.obj" \
+ "$(INTDIR)\Logger.obj" \
+ "$(INTDIR)\LogWriter.obj" \
+ "$(INTDIR)\Utils.obj" \
+ "$(INTDIR)\Axis2Client.obj" \
+ "$(INTDIR)\EntryPointProxy.obj" \
+ "$(INTDIR)\WSServiceWrapper.obj"
+
+"$(OUTDIR)\tuscany_sca.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+SOURCE="$(InputPath)"
+DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
+
+ALL : $(DS_POSTBUILD_DEP)
+
+# Begin Custom Macros
+OutDir=.\Release
+# End Custom Macros
+
+$(DS_POSTBUILD_DEP) : "$(OUTDIR)\tuscany_sca.dll"
+ del ..\..\..\deploy\bin\tuscany_sca.*
+ del ..\..\..\deploy\lib\*.lib
+ copy ..\..\..\runtime\core\src\osoa\sca\*.h ..\..\..\deploy\include\osoa\sca
+ copy ..\..\..\runtime\core\src\tuscany\sca\core\*.h ..\..\..\deploy\include\tuscany\sca\core
+ copy ..\..\..\runtime\core\src\tuscany\sca\model\*.h ..\..\..\deploy\include\tuscany\sca\model
+ copy ..\..\..\runtime\core\src\tuscany\sca\util\*.h ..\..\..\deploy\include\tuscany\sca\util
+ copy ..\..\..\runtime\core\src\tuscany\sca\ws\*.h ..\..\..\deploy\include\tuscany\sca\ws
+ copy Release\tuscany_sca.dll ..\..\..\deploy\bin
+ copy Release\tuscany_sca.lib ..\..\..\deploy\lib
+ copy ..\..\..\xsd\*.* ..\..\..\deploy\xsd
+ echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
+
+!ELSEIF "$(CFG)" == "tuscany_sca - Win32 Debug"
+
+OUTDIR=.\Debug
+INTDIR=.\Debug
+# Begin Custom Macros
+OutDir=.\Debug
+# End Custom Macros
+
+ALL : "$(OUTDIR)\tuscany_sca.dll"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\Axis2Client.obj"
+ -@erase "$(INTDIR)\Binding.obj"
+ -@erase "$(INTDIR)\Component.obj"
+ -@erase "$(INTDIR)\ComponentContext.obj"
+ -@erase "$(INTDIR)\ComponentContextImpl.obj"
+ -@erase "$(INTDIR)\ComponentServiceWrapper.obj"
+ -@erase "$(INTDIR)\CPPImplementation.obj"
+ -@erase "$(INTDIR)\CPPInterface.obj"
+ -@erase "$(INTDIR)\DefaultLogWriter.obj"
+ -@erase "$(INTDIR)\EntryPoint.obj"
+ -@erase "$(INTDIR)\EntryPointProxy.obj"
+ -@erase "$(INTDIR)\ExternalService.obj"
+ -@erase "$(INTDIR)\ExternalServiceWrapper.obj"
+ -@erase "$(INTDIR)\File.obj"
+ -@erase "$(INTDIR)\FileLogWriter.obj"
+ -@erase "$(INTDIR)\Implementation.obj"
+ -@erase "$(INTDIR)\Interface.obj"
+ -@erase "$(INTDIR)\Library.obj"
+ -@erase "$(INTDIR)\Logger.obj"
+ -@erase "$(INTDIR)\LogWriter.obj"
+ -@erase "$(INTDIR)\ModelLoader.obj"
+ -@erase "$(INTDIR)\Module.obj"
+ -@erase "$(INTDIR)\ModuleContext.obj"
+ -@erase "$(INTDIR)\ModuleContextImpl.obj"
+ -@erase "$(INTDIR)\Operation.obj"
+ -@erase "$(INTDIR)\SCA.obj"
+ -@erase "$(INTDIR)\SCAEntryPoint.obj"
+ -@erase "$(INTDIR)\SCARuntime.obj"
+ -@erase "$(INTDIR)\Service.obj"
+ -@erase "$(INTDIR)\ServiceList.obj"
+ -@erase "$(INTDIR)\ServiceProxy.obj"
+ -@erase "$(INTDIR)\ServiceReference.obj"
+ -@erase "$(INTDIR)\ServiceRuntimeException.obj"
+ -@erase "$(INTDIR)\ServiceWrapper.obj"
+ -@erase "$(INTDIR)\Subsystem.obj"
+ -@erase "$(INTDIR)\System.obj"
+ -@erase "$(INTDIR)\TuscanyRuntime.obj"
+ -@erase "$(INTDIR)\Utils.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(INTDIR)\Wire.obj"
+ -@erase "$(INTDIR)\WireTarget.obj"
+ -@erase "$(INTDIR)\WSBinding.obj"
+ -@erase "$(INTDIR)\Wsdl.obj"
+ -@erase "$(INTDIR)\WsdlOperation.obj"
+ -@erase "$(INTDIR)\WSServiceWrapper.obj"
+ -@erase "$(OUTDIR)\tuscany_sca.dll"
+ -@erase "$(OUTDIR)\tuscany_sca.exp"
+ -@erase "$(OUTDIR)\tuscany_sca.ilk"
+ -@erase "$(OUTDIR)\tuscany_sca.lib"
+ -@erase "$(OUTDIR)\tuscany_sca.pdb"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SCA_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=axis2_engine.lib tuscany_sdo_axiom.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 axis2_parser.lib axis2_util.lib axiom.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\tuscany_sca.pdb" /debug /machine:I386 /out:"$(OUTDIR)\tuscany_sca.dll" /implib:"$(OUTDIR)\tuscany_sca.lib" /pdbtype:sept /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib"
+LINK32_OBJS= \
+ "$(INTDIR)\ComponentContext.obj" \
+ "$(INTDIR)\ComponentContextImpl.obj" \
+ "$(INTDIR)\ModuleContext.obj" \
+ "$(INTDIR)\ModuleContextImpl.obj" \
+ "$(INTDIR)\SCA.obj" \
+ "$(INTDIR)\ServiceList.obj" \
+ "$(INTDIR)\ServiceRuntimeException.obj" \
+ "$(INTDIR)\ComponentServiceWrapper.obj" \
+ "$(INTDIR)\ExternalServiceWrapper.obj" \
+ "$(INTDIR)\Operation.obj" \
+ "$(INTDIR)\SCAEntryPoint.obj" \
+ "$(INTDIR)\SCARuntime.obj" \
+ "$(INTDIR)\ServiceProxy.obj" \
+ "$(INTDIR)\ServiceWrapper.obj" \
+ "$(INTDIR)\TuscanyRuntime.obj" \
+ "$(INTDIR)\Binding.obj" \
+ "$(INTDIR)\Component.obj" \
+ "$(INTDIR)\CPPImplementation.obj" \
+ "$(INTDIR)\CPPInterface.obj" \
+ "$(INTDIR)\EntryPoint.obj" \
+ "$(INTDIR)\ExternalService.obj" \
+ "$(INTDIR)\Implementation.obj" \
+ "$(INTDIR)\Interface.obj" \
+ "$(INTDIR)\ModelLoader.obj" \
+ "$(INTDIR)\Module.obj" \
+ "$(INTDIR)\Service.obj" \
+ "$(INTDIR)\ServiceReference.obj" \
+ "$(INTDIR)\Subsystem.obj" \
+ "$(INTDIR)\System.obj" \
+ "$(INTDIR)\Wire.obj" \
+ "$(INTDIR)\WireTarget.obj" \
+ "$(INTDIR)\WSBinding.obj" \
+ "$(INTDIR)\Wsdl.obj" \
+ "$(INTDIR)\WsdlOperation.obj" \
+ "$(INTDIR)\DefaultLogWriter.obj" \
+ "$(INTDIR)\File.obj" \
+ "$(INTDIR)\FileLogWriter.obj" \
+ "$(INTDIR)\Library.obj" \
+ "$(INTDIR)\Logger.obj" \
+ "$(INTDIR)\LogWriter.obj" \
+ "$(INTDIR)\Utils.obj" \
+ "$(INTDIR)\Axis2Client.obj" \
+ "$(INTDIR)\EntryPointProxy.obj" \
+ "$(INTDIR)\WSServiceWrapper.obj"
+
+"$(OUTDIR)\tuscany_sca.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+SOURCE="$(InputPath)"
+DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
+
+ALL : $(DS_POSTBUILD_DEP)
+
+# Begin Custom Macros
+OutDir=.\Debug
+# End Custom Macros
+
+$(DS_POSTBUILD_DEP) : "$(OUTDIR)\tuscany_sca.dll"
+ del ..\..\..\deploy\bin\tuscany_sca.*
+ del ..\..\..\deploy\lib\*.lib
+ copy ..\..\..\runtime\core\src\osoa\sca\*.h ..\..\..\deploy\include\osoa\sca
+ copy ..\..\..\runtime\core\src\tuscany\sca\core\*.h ..\..\..\deploy\include\tuscany\sca\core
+ copy ..\..\..\runtime\core\src\tuscany\sca\model\*.h ..\..\..\deploy\include\tuscany\sca\model
+ copy ..\..\..\runtime\core\src\tuscany\sca\util\*.h ..\..\..\deploy\include\tuscany\sca\util
+ copy ..\..\..\runtime\core\src\tuscany\sca\ws\*.h ..\..\..\deploy\include\tuscany\sca\ws
+ copy Debug\tuscany_sca.dll ..\..\..\deploy\bin
+ copy Debug\tuscany_sca.pdb ..\..\..\deploy\bin
+ copy Debug\tuscany_sca.lib ..\..\..\deploy\lib
+ copy ..\..\..\xsd\*.* ..\..\..\deploy\xsd
+ echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
+
+!ENDIF
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("tuscany_sca.dep")
+!INCLUDE "tuscany_sca.dep"
+!ELSE
+!MESSAGE Warning: cannot find "tuscany_sca.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "tuscany_sca - Win32 Release" || "$(CFG)" == "tuscany_sca - Win32 Debug"
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ComponentContext.cpp
+
+"$(INTDIR)\ComponentContext.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ComponentContextImpl.cpp
+
+"$(INTDIR)\ComponentContextImpl.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ModuleContext.cpp
+
+"$(INTDIR)\ModuleContext.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ModuleContextImpl.cpp
+
+"$(INTDIR)\ModuleContextImpl.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\SCA.cpp
+
+"$(INTDIR)\SCA.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ServiceList.cpp
+
+"$(INTDIR)\ServiceList.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\osoa\sca\ServiceRuntimeException.cpp
+
+"$(INTDIR)\ServiceRuntimeException.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ComponentServiceWrapper.cpp
+
+"$(INTDIR)\ComponentServiceWrapper.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ExternalServiceWrapper.cpp
+
+"$(INTDIR)\ExternalServiceWrapper.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\Operation.cpp
+
+"$(INTDIR)\Operation.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\SCAEntryPoint.cpp
+
+"$(INTDIR)\SCAEntryPoint.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\SCARuntime.cpp
+
+"$(INTDIR)\SCARuntime.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ServiceProxy.cpp
+
+"$(INTDIR)\ServiceProxy.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\ServiceWrapper.cpp
+
+"$(INTDIR)\ServiceWrapper.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\core\TuscanyRuntime.cpp
+
+"$(INTDIR)\TuscanyRuntime.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Binding.cpp
+
+"$(INTDIR)\Binding.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Component.cpp
+
+"$(INTDIR)\Component.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CPPImplementation.cpp
+
+"$(INTDIR)\CPPImplementation.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\CPPInterface.cpp
+
+"$(INTDIR)\CPPInterface.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\EntryPoint.cpp
+
+"$(INTDIR)\EntryPoint.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ExternalService.cpp
+
+"$(INTDIR)\ExternalService.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Implementation.cpp
+
+"$(INTDIR)\Implementation.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Interface.cpp
+
+"$(INTDIR)\Interface.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ModelLoader.cpp
+
+"$(INTDIR)\ModelLoader.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Module.cpp
+
+"$(INTDIR)\Module.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Service.cpp
+
+"$(INTDIR)\Service.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\ServiceReference.cpp
+
+"$(INTDIR)\ServiceReference.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Subsystem.cpp
+
+"$(INTDIR)\Subsystem.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\System.cpp
+
+"$(INTDIR)\System.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Wire.cpp
+
+"$(INTDIR)\Wire.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WireTarget.cpp
+
+"$(INTDIR)\WireTarget.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WSBinding.cpp
+
+"$(INTDIR)\WSBinding.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\Wsdl.cpp
+
+"$(INTDIR)\Wsdl.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\model\WsdlOperation.cpp
+
+"$(INTDIR)\WsdlOperation.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\DefaultLogWriter.cpp
+
+"$(INTDIR)\DefaultLogWriter.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\File.cpp
+
+"$(INTDIR)\File.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\FileLogWriter.cpp
+
+"$(INTDIR)\FileLogWriter.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Library.cpp
+
+"$(INTDIR)\Library.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Logger.cpp
+
+"$(INTDIR)\Logger.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\LogWriter.cpp
+
+"$(INTDIR)\LogWriter.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\util\Utils.cpp
+
+"$(INTDIR)\Utils.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\ws_reference\axis2c\src\Axis2Client.cpp
+
+"$(INTDIR)\Axis2Client.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\src\tuscany\sca\ws\EntryPointProxy.cpp
+
+"$(INTDIR)\EntryPointProxy.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\ws_reference\axis2c\src\WSServiceWrapper.cpp
+
+"$(INTDIR)\WSServiceWrapper.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+
+!ENDIF
+
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment
new file mode 100644
index 0000000000..c2c521ed96
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<moduleFragment xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="CustomerInfoComponent">
+
+
+ <component name="CustomerInfoComponent">
+ <implementation.cpp dll="CustomerInfo.dll" header="CustomerInfoImpl.h"></implementation.cpp>
+ <properties>
+ <v:Fred>x</v:Fred>
+ <v:Joe>23</v:Joe>
+ <Joe>42</Joe>
+ </properties>
+ <references>
+ </references>
+ </component>
+
+</moduleFragment>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType
new file mode 100644
index 0000000000..48651b63fe
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="CustomerInfoService">
+ <interface.cpp header="CustomerInfo.h">
+ </interface.cpp>
+ </service>
+
+ <property name="Fred" type="xs:string"/>
+ <property name="Joe" type="xs:integer" many="true"/>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType
new file mode 100644
index 0000000000..ace4154966
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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/0.9">
+
+ <service name="MyValueService">
+ <interface.cpp header="MyValue.h">
+ </interface.cpp>
+ </service>
+
+ <reference name="customerInfo">
+ <interface.cpp header="CustomerInfo.h">
+ </interface.cpp>
+ </reference>
+
+ <reference name="stockQuote">
+ <interface.cpp header="StockQuoteService.h">
+ </interface.cpp>
+ </reference>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueService.wsdl b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueService.wsdl
new file mode 100644
index 0000000000..f82690e1ab
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueService.wsdl
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.myvalue.org/MyValueService/"
+ targetNamespace="http://www.myvalue.org/MyValueService/">
+ <types>
+ <xs:schema targetNamespace="http://www.myvalue.org/MyValueService/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.myvalue.org/MyValueService/"
+ elementFormDefault="qualified">
+
+ <xs:element name="getMyValue">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="customerID" type="xs:string" minOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="getMyValueResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="myValue" type="xs:float" minOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ </xs:schema>
+ </types>
+
+ <message name="getMyValueRequestMsg">
+ <part name="body" element="tns:getMyValue"/>
+ </message>
+
+ <message name="getMyValueResponseMsg">
+ <part name="body" element="tns:getMyValueResponse"/>
+ </message>
+
+ <portType name="MyValueServicePortType">
+ <operation name="getMyValue">
+ <input message="tns:getMyValueRequestMsg"/>
+ <output message="tns:getMyValueResponseMsg"/>
+ </operation>
+ </portType>
+
+ <binding name="MyValueServiceBinding" type="tns:MyValueServicePortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="getMyValue">
+ <soap:operation soapAction="MyValueService#getMyValue"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="MyValueService">
+ <port name="MyValueServicePort" binding="tns:MyValueServiceBinding">
+ <soap:address location="http://localhost/axis/MyValueService"/>
+ </port>
+ </service>
+</definitions>
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl
new file mode 100644
index 0000000000..26e2ea5cb8
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<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/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteTypes.xsd b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteTypes.xsd
new file mode 100644
index 0000000000..5bce3a63dc
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/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/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config
new file mode 100644
index 0000000000..a23cc3f5cd
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config
@@ -0,0 +1,26 @@
+<?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.
+ -->
+
+<tuscany-model xmlns="http://org.apache.tuscany/xmlns/cpp/1.0">
+ <wsdl>
+ <file name="MyValueService.wsdl"/>
+ <file name="StockQuoteService.wsdl"/>
+ </wsdl>
+ <xsd>
+ <file name="StockQuoteTypes.xsd"/>
+ </xsd>
+</tuscany-model> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/sca.module b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/sca.module
new file mode 100644
index 0000000000..8cc39ce7bb
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/sca.module
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="MyValueServiceModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="MyValueServiceExport" multiplicity="1..1">
+ <interface.wsdl interface="MyValueService.wsdl" callbackInterface=""></interface.wsdl>
+ <binding.ws port="http://www.myvalue.org/MyValueService/#wsdl.endpoint(MyValueService/MyValueServicePort)"></binding.ws>
+ <reference>MyValueServiceComponent</reference>
+ </entryPoint>
+
+ <component name="MyValueServiceComponent">
+ <implementation.cpp dll="MyValue.dll" header="MyValueImpl.h"></implementation.cpp>
+ <properties>
+ </properties>
+ <references>
+ <stockQuote>StockQuoteService</stockQuote>
+ </references>
+ </component>
+
+ <externalService name="StockQuoteService">
+ <interface.cpp header="StockQuoteService.h"/>
+ <binding.ws port="http://www.webserviceX.NET/#wsdl.endpoint(StockQuote/StockQuoteSoap)"/>
+ </externalService>
+
+ <wire>
+ <source.uri>MyValueServiceComponent/customerInfo</source.uri>
+ <target.uri>CustomerInfoComponent</target.uri>
+ </wire>
+
+</module>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/subsystems/SubSystem1/sca.subsystem b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/subsystems/SubSystem1/sca.subsystem
new file mode 100644
index 0000000000..1b32bf8a93
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/testSCASystem/subsystems/SubSystem1/sca.subsystem
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<subsystem xmlns="http://www.osoa.org/xmlns/sca/0.9"
+
+ name="SubSystem1">
+
+ <moduleComponent name="MyValue" module="MyValueServiceModule">
+
+ </moduleComponent>
+
+</subsystem>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/tuscany_sca_test.dsp b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/tuscany_sca_test.dsp
new file mode 100644
index 0000000000..1929fbfc7a
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/tuscany_sca_test.dsp
@@ -0,0 +1,104 @@
+# Microsoft Developer Studio Project File - Name="tuscany_sca_test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=tuscany_sca_test - 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 "tuscany_sca_test.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 "tuscany_sca_test.mak" CFG="tuscany_sca_test - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "tuscany_sca_test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "tuscany_sca_test - 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)" == "tuscany_sca_test - 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 Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "../../../runtime/core/test/MyValue" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# 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 tuscany_sca.lib tuscany_sdo.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=copy ..\tuscany_sca_test_MyValue\Release\MyValue.dll testSCASystem\modules\MyValueServiceModule copy ..\tuscany_sca_test_CustomerInfo\Release\CustomerInfo.dll testSCASystem\modules\MyValueServiceModule copy..\tuscany_sca\Release\*.dll Release
+# End Special Build Tool
+
+!ELSEIF "$(CFG)" == "tuscany_sca_test - 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 /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "../../../runtime/core/test/MyValue" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# SUBTRACT CPP /YX
+# 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 tuscany_sca.lib tuscany_sdo.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=copy ..\tuscany_sca_test_MyValue\Debug\MyValue.dll testSCASystem\modules\MyValueServiceModule copy ..\tuscany_sca_test_MyValue\Debug\MyValue.pdb testSCASystem\modules\MyValueServiceModule copy ..\tuscany_sca_test_CustomerInfo\Debug\CustomerInfo.dll testSCASystem\modules\MyValueServiceModule copy ..\tuscany_sca_test_CustomerInfo\Debug\CustomerInfo.pdb testSCASystem\modules\MyValueServiceModule copy..\tuscany_sca\Debug\*.dll Debug copy..\tuscany_sca\Debug\*.pdb Debug
+# End Special Build Tool
+
+!ENDIF
+
+# Begin Target
+
+# Name "tuscany_sca_test - Win32 Release"
+# Name "tuscany_sca_test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\src\TestSCA.cpp
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/tuscany_sca_test.mak b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/tuscany_sca_test.mak
new file mode 100644
index 0000000000..d643484ff4
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test/tuscany_sca_test.mak
@@ -0,0 +1,353 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on tuscany_sca_test.dsp
+!IF "$(CFG)" == ""
+CFG=tuscany_sca_test - Win32 Debug
+!MESSAGE No configuration specified. Defaulting to tuscany_sca_test - Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "tuscany_sca_test - Win32 Release" && "$(CFG)" != "tuscany_sca_test - Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!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 "tuscany_sca_test.mak" CFG="tuscany_sca_test - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "tuscany_sca_test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "tuscany_sca_test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+!IF "$(CFG)" == "tuscany_sca_test - Win32 Release"
+
+OUTDIR=.\Release
+INTDIR=.\Release
+# Begin Custom Macros
+OutDir=.\Release
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : "$(OUTDIR)\tuscany_sca_test.exe"
+
+!ELSE
+
+ALL : "tuscany_sca_ws_service - Win32 Release" "tuscany_sca_test_MyValue - Win32 Release" "tuscany_sca_test_CustomerInfo - Win32 Release" "tuscany_sca - Win32 Release" "$(OUTDIR)\tuscany_sca_test.exe"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"tuscany_sca - Win32 ReleaseCLEAN" "tuscany_sca_test_CustomerInfo - Win32 ReleaseCLEAN" "tuscany_sca_test_MyValue - Win32 ReleaseCLEAN" "tuscany_sca_ws_service - Win32 ReleaseCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\TestSCA.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(OUTDIR)\tuscany_sca_test.exe"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "../../../runtime/core/test/MyValue" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_test.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=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_sca.lib tuscany_sdo.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\tuscany_sca_test.pdb" /machine:I386 /out:"$(OUTDIR)\tuscany_sca_test.exe" /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib"
+LINK32_OBJS= \
+ "$(INTDIR)\TestSCA.obj" \
+ "..\tuscany_sca\Release\tuscany_sca.lib" \
+ "..\tuscany_sca_test_CustomerInfo\Release\CustomerInfo.lib" \
+ "..\tuscany_sca_test_MyValue\Release\MyValue.lib" \
+ "..\tuscany_sca_ws_service\Release\tuscany_sca_ws_service.lib"
+
+"$(OUTDIR)\tuscany_sca_test.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+SOURCE="$(InputPath)"
+DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
+
+ALL : $(DS_POSTBUILD_DEP)
+
+# Begin Custom Macros
+OutDir=.\Release
+# End Custom Macros
+
+$(DS_POSTBUILD_DEP) : "tuscany_sca_ws_service - Win32 Release" "tuscany_sca_test_MyValue - Win32 Release" "tuscany_sca_test_CustomerInfo - Win32 Release" "tuscany_sca - Win32 Release" "$(OUTDIR)\tuscany_sca_test.exe"
+ copy ..\tuscany_sca_test_MyValue\Release\MyValue.dll testSCASystem\modules\MyValueServiceModule
+ copy ..\tuscany_sca_test_CustomerInfo\Release\CustomerInfo.dll testSCASystem\modules\MyValueServiceModule
+ copy..\tuscany_sca\Release\*.dll Release
+ echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
+
+!ELSEIF "$(CFG)" == "tuscany_sca_test - Win32 Debug"
+
+OUTDIR=.\Debug
+INTDIR=.\Debug
+# Begin Custom Macros
+OutDir=.\Debug
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : "$(OUTDIR)\tuscany_sca_test.exe"
+
+!ELSE
+
+ALL : "tuscany_sca_ws_service - Win32 Debug" "tuscany_sca_test_MyValue - Win32 Debug" "tuscany_sca_test_CustomerInfo - Win32 Debug" "tuscany_sca - Win32 Debug" "$(OUTDIR)\tuscany_sca_test.exe"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"tuscany_sca - Win32 DebugCLEAN" "tuscany_sca_test_CustomerInfo - Win32 DebugCLEAN" "tuscany_sca_test_MyValue - Win32 DebugCLEAN" "tuscany_sca_ws_service - Win32 DebugCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\TestSCA.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(OUTDIR)\tuscany_sca_test.exe"
+ -@erase "$(OUTDIR)\tuscany_sca_test.ilk"
+ -@erase "$(OUTDIR)\tuscany_sca_test.pdb"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "../../../runtime/core/test/MyValue" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_test.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=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_sca.lib tuscany_sdo.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\tuscany_sca_test.pdb" /debug /machine:I386 /out:"$(OUTDIR)\tuscany_sca_test.exe" /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib"
+LINK32_OBJS= \
+ "$(INTDIR)\TestSCA.obj" \
+ "..\tuscany_sca\Debug\tuscany_sca.lib" \
+ "..\tuscany_sca_test_CustomerInfo\Debug\CustomerInfo.lib" \
+ "..\tuscany_sca_test_MyValue\Debug\MyValue.lib" \
+ "..\tuscany_sca_ws_service\Debug\tuscany_sca_ws_service.lib"
+
+"$(OUTDIR)\tuscany_sca_test.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+SOURCE="$(InputPath)"
+DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
+
+ALL : $(DS_POSTBUILD_DEP)
+
+# Begin Custom Macros
+OutDir=.\Debug
+# End Custom Macros
+
+$(DS_POSTBUILD_DEP) : "tuscany_sca_ws_service - Win32 Debug" "tuscany_sca_test_MyValue - Win32 Debug" "tuscany_sca_test_CustomerInfo - Win32 Debug" "tuscany_sca - Win32 Debug" "$(OUTDIR)\tuscany_sca_test.exe"
+ copy ..\tuscany_sca_test_MyValue\Debug\MyValue.dll testSCASystem\modules\MyValueServiceModule
+ copy ..\tuscany_sca_test_MyValue\Debug\MyValue.pdb testSCASystem\modules\MyValueServiceModule
+ copy ..\tuscany_sca_test_CustomerInfo\Debug\CustomerInfo.dll testSCASystem\modules\MyValueServiceModule
+ copy ..\tuscany_sca_test_CustomerInfo\Debug\CustomerInfo.pdb testSCASystem\modules\MyValueServiceModule
+ copy..\tuscany_sca\Debug\*.dll Debug
+ copy..\tuscany_sca\Debug\*.pdb Debug
+ echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
+
+!ENDIF
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("tuscany_sca_test.dep")
+!INCLUDE "tuscany_sca_test.dep"
+!ELSE
+!MESSAGE Warning: cannot find "tuscany_sca_test.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "tuscany_sca_test - Win32 Release" || "$(CFG)" == "tuscany_sca_test - Win32 Debug"
+SOURCE=..\..\..\runtime\core\test\src\TestSCA.cpp
+
+"$(INTDIR)\TestSCA.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!IF "$(CFG)" == "tuscany_sca_test - Win32 Release"
+
+"tuscany_sca - Win32 Release" :
+ cd "..\tuscany_sca"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release"
+ cd "..\tuscany_sca_test"
+
+"tuscany_sca - Win32 ReleaseCLEAN" :
+ cd "..\tuscany_sca"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release" RECURSE=1 CLEAN
+ cd "..\tuscany_sca_test"
+
+!ELSEIF "$(CFG)" == "tuscany_sca_test - Win32 Debug"
+
+"tuscany_sca - Win32 Debug" :
+ cd "..\tuscany_sca"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug"
+ cd "..\tuscany_sca_test"
+
+"tuscany_sca - Win32 DebugCLEAN" :
+ cd "..\tuscany_sca"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug" RECURSE=1 CLEAN
+ cd "..\tuscany_sca_test"
+
+!ENDIF
+
+!IF "$(CFG)" == "tuscany_sca_test - Win32 Release"
+
+"tuscany_sca_test_CustomerInfo - Win32 Release" :
+ cd "..\tuscany_sca_test_CustomerInfo"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_test_CustomerInfo.mak CFG="tuscany_sca_test_CustomerInfo - Win32 Release"
+ cd "..\tuscany_sca_test"
+
+"tuscany_sca_test_CustomerInfo - Win32 ReleaseCLEAN" :
+ cd "..\tuscany_sca_test_CustomerInfo"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_test_CustomerInfo.mak CFG="tuscany_sca_test_CustomerInfo - Win32 Release" RECURSE=1 CLEAN
+ cd "..\tuscany_sca_test"
+
+!ELSEIF "$(CFG)" == "tuscany_sca_test - Win32 Debug"
+
+"tuscany_sca_test_CustomerInfo - Win32 Debug" :
+ cd "..\tuscany_sca_test_CustomerInfo"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_test_CustomerInfo.mak CFG="tuscany_sca_test_CustomerInfo - Win32 Debug"
+ cd "..\tuscany_sca_test"
+
+"tuscany_sca_test_CustomerInfo - Win32 DebugCLEAN" :
+ cd "..\tuscany_sca_test_CustomerInfo"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_test_CustomerInfo.mak CFG="tuscany_sca_test_CustomerInfo - Win32 Debug" RECURSE=1 CLEAN
+ cd "..\tuscany_sca_test"
+
+!ENDIF
+
+!IF "$(CFG)" == "tuscany_sca_test - Win32 Release"
+
+"tuscany_sca_test_MyValue - Win32 Release" :
+ cd "..\tuscany_sca_test_MyValue"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_test_MyValue.mak CFG="tuscany_sca_test_MyValue - Win32 Release"
+ cd "..\tuscany_sca_test"
+
+"tuscany_sca_test_MyValue - Win32 ReleaseCLEAN" :
+ cd "..\tuscany_sca_test_MyValue"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_test_MyValue.mak CFG="tuscany_sca_test_MyValue - Win32 Release" RECURSE=1 CLEAN
+ cd "..\tuscany_sca_test"
+
+!ELSEIF "$(CFG)" == "tuscany_sca_test - Win32 Debug"
+
+"tuscany_sca_test_MyValue - Win32 Debug" :
+ cd "..\tuscany_sca_test_MyValue"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_test_MyValue.mak CFG="tuscany_sca_test_MyValue - Win32 Debug"
+ cd "..\tuscany_sca_test"
+
+"tuscany_sca_test_MyValue - Win32 DebugCLEAN" :
+ cd "..\tuscany_sca_test_MyValue"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_test_MyValue.mak CFG="tuscany_sca_test_MyValue - Win32 Debug" RECURSE=1 CLEAN
+ cd "..\tuscany_sca_test"
+
+!ENDIF
+
+!IF "$(CFG)" == "tuscany_sca_test - Win32 Release"
+
+"tuscany_sca_ws_service - Win32 Release" :
+ cd "..\tuscany_sca_ws_service"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_service.mak CFG="tuscany_sca_ws_service - Win32 Release"
+ cd "..\tuscany_sca_test"
+
+"tuscany_sca_ws_service - Win32 ReleaseCLEAN" :
+ cd "..\tuscany_sca_ws_service"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_service.mak CFG="tuscany_sca_ws_service - Win32 Release" RECURSE=1 CLEAN
+ cd "..\tuscany_sca_test"
+
+!ELSEIF "$(CFG)" == "tuscany_sca_test - Win32 Debug"
+
+"tuscany_sca_ws_service - Win32 Debug" :
+ cd "..\tuscany_sca_ws_service"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_service.mak CFG="tuscany_sca_ws_service - Win32 Debug"
+ cd "..\tuscany_sca_test"
+
+"tuscany_sca_ws_service - Win32 DebugCLEAN" :
+ cd "..\tuscany_sca_ws_service"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca_ws_service.mak CFG="tuscany_sca_ws_service - Win32 Debug" RECURSE=1 CLEAN
+ cd "..\tuscany_sca_test"
+
+!ENDIF
+
+
+!ENDIF
+
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.dsp b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.dsp
new file mode 100644
index 0000000000..53677c939e
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.dsp
@@ -0,0 +1,133 @@
+# Microsoft Developer Studio Project File - Name="tuscany_sca_test_CustomerInfo" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=tuscany_sca_test_CustomerInfo - 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 "tuscany_sca_test_CustomerInfo.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 "tuscany_sca_test_CustomerInfo.mak" CFG="tuscany_sca_test_CustomerInfo - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "tuscany_sca_test_CustomerInfo - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "tuscany_sca_test_CustomerInfo - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "tuscany_sca_test_CustomerInfo - 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 Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_CUSTOMERINFO_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_CUSTOMERINFO_EXPORTS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# 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 /nologo /dll /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 tuscany_sca.lib tuscany_sdo.lib /nologo /dll /machine:I386 /out:"Release/CustomerInfo.dll" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"..\..\..\deploy\lib"
+
+!ELSEIF "$(CFG)" == "tuscany_sca_test_CustomerInfo - 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 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_CUSTOMERINFO_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_CUSTOMERINFO_EXPORTS" /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# 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 /nologo /dll /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 tuscany_sca.lib tuscany_sdo.lib /nologo /dll /debug /machine:I386 /out:"Debug/CustomerInfo.dll" /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "tuscany_sca_test_CustomerInfo - Win32 Release"
+# Name "tuscany_sca_test_CustomerInfo - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Proxy.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Wrapper.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfo.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Proxy.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Wrapper.h
+# End Source File
+# 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/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.mak b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.mak
new file mode 100644
index 0000000000..289fec0deb
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.mak
@@ -0,0 +1,264 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on tuscany_sca_test_CustomerInfo.dsp
+!IF "$(CFG)" == ""
+CFG=tuscany_sca_test_CustomerInfo - Win32 Debug
+!MESSAGE No configuration specified. Defaulting to tuscany_sca_test_CustomerInfo - Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "tuscany_sca_test_CustomerInfo - Win32 Release" && "$(CFG)" != "tuscany_sca_test_CustomerInfo - Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!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 "tuscany_sca_test_CustomerInfo.mak" CFG="tuscany_sca_test_CustomerInfo - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "tuscany_sca_test_CustomerInfo - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "tuscany_sca_test_CustomerInfo - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+!IF "$(CFG)" == "tuscany_sca_test_CustomerInfo - Win32 Release"
+
+OUTDIR=.\Release
+INTDIR=.\Release
+# Begin Custom Macros
+OutDir=.\Release
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : "$(OUTDIR)\CustomerInfo.dll"
+
+!ELSE
+
+ALL : "tuscany_sca - Win32 Release" "$(OUTDIR)\CustomerInfo.dll"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"tuscany_sca - Win32 ReleaseCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\CustomerInfoImpl.obj"
+ -@erase "$(INTDIR)\CustomerInfoImpl_CustomerInfoService_Proxy.obj"
+ -@erase "$(INTDIR)\CustomerInfoImpl_CustomerInfoService_Wrapper.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(OUTDIR)\CustomerInfo.dll"
+ -@erase "$(OUTDIR)\CustomerInfo.exp"
+ -@erase "$(OUTDIR)\CustomerInfo.lib"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_CUSTOMERINFO_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_test_CustomerInfo.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=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_sca.lib tuscany_sdo.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\CustomerInfo.pdb" /machine:I386 /out:"$(OUTDIR)\CustomerInfo.dll" /implib:"$(OUTDIR)\CustomerInfo.lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"..\..\..\deploy\lib"
+LINK32_OBJS= \
+ "$(INTDIR)\CustomerInfoImpl.obj" \
+ "$(INTDIR)\CustomerInfoImpl_CustomerInfoService_Proxy.obj" \
+ "$(INTDIR)\CustomerInfoImpl_CustomerInfoService_Wrapper.obj" \
+ "..\tuscany_sca\Release\tuscany_sca.lib"
+
+"$(OUTDIR)\CustomerInfo.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "tuscany_sca_test_CustomerInfo - Win32 Debug"
+
+OUTDIR=.\Debug
+INTDIR=.\Debug
+# Begin Custom Macros
+OutDir=.\Debug
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : "$(OUTDIR)\CustomerInfo.dll"
+
+!ELSE
+
+ALL : "tuscany_sca - Win32 Debug" "$(OUTDIR)\CustomerInfo.dll"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"tuscany_sca - Win32 DebugCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\CustomerInfoImpl.obj"
+ -@erase "$(INTDIR)\CustomerInfoImpl_CustomerInfoService_Proxy.obj"
+ -@erase "$(INTDIR)\CustomerInfoImpl_CustomerInfoService_Wrapper.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(OUTDIR)\CustomerInfo.dll"
+ -@erase "$(OUTDIR)\CustomerInfo.exp"
+ -@erase "$(OUTDIR)\CustomerInfo.ilk"
+ -@erase "$(OUTDIR)\CustomerInfo.lib"
+ -@erase "$(OUTDIR)\CustomerInfo.pdb"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_CUSTOMERINFO_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_test_CustomerInfo.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=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_sca.lib tuscany_sdo.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\CustomerInfo.pdb" /debug /machine:I386 /out:"$(OUTDIR)\CustomerInfo.dll" /implib:"$(OUTDIR)\CustomerInfo.lib" /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib"
+LINK32_OBJS= \
+ "$(INTDIR)\CustomerInfoImpl.obj" \
+ "$(INTDIR)\CustomerInfoImpl_CustomerInfoService_Proxy.obj" \
+ "$(INTDIR)\CustomerInfoImpl_CustomerInfoService_Wrapper.obj" \
+ "..\tuscany_sca\Debug\tuscany_sca.lib"
+
+"$(OUTDIR)\CustomerInfo.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("tuscany_sca_test_CustomerInfo.dep")
+!INCLUDE "tuscany_sca_test_CustomerInfo.dep"
+!ELSE
+!MESSAGE Warning: cannot find "tuscany_sca_test_CustomerInfo.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "tuscany_sca_test_CustomerInfo - Win32 Release" || "$(CFG)" == "tuscany_sca_test_CustomerInfo - Win32 Debug"
+SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl.cpp
+
+"$(INTDIR)\CustomerInfoImpl.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Proxy.cpp
+
+"$(INTDIR)\CustomerInfoImpl_CustomerInfoService_Proxy.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Wrapper.cpp
+
+"$(INTDIR)\CustomerInfoImpl_CustomerInfoService_Wrapper.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!IF "$(CFG)" == "tuscany_sca_test_CustomerInfo - Win32 Release"
+
+"tuscany_sca - Win32 Release" :
+ cd "..\tuscany_sca"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release"
+ cd "..\tuscany_sca_test_CustomerInfo"
+
+"tuscany_sca - Win32 ReleaseCLEAN" :
+ cd "..\tuscany_sca"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release" RECURSE=1 CLEAN
+ cd "..\tuscany_sca_test_CustomerInfo"
+
+!ELSEIF "$(CFG)" == "tuscany_sca_test_CustomerInfo - Win32 Debug"
+
+"tuscany_sca - Win32 Debug" :
+ cd "..\tuscany_sca"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug"
+ cd "..\tuscany_sca_test_CustomerInfo"
+
+"tuscany_sca - Win32 DebugCLEAN" :
+ cd "..\tuscany_sca"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug" RECURSE=1 CLEAN
+ cd "..\tuscany_sca_test_CustomerInfo"
+
+!ENDIF
+
+
+!ENDIF
+
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.dsp b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.dsp
new file mode 100644
index 0000000000..83a980a9a2
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.dsp
@@ -0,0 +1,153 @@
+# Microsoft Developer Studio Project File - Name="tuscany_sca_test_MyValue" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=tuscany_sca_test_MyValue - 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 "tuscany_sca_test_MyValue.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 "tuscany_sca_test_MyValue.mak" CFG="tuscany_sca_test_MyValue - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "tuscany_sca_test_MyValue - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "tuscany_sca_test_MyValue - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "tuscany_sca_test_MyValue - 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 Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_MYVALUE_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "../../../runtime/core/test/CustomerInfo" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_MYVALUE_EXPORTS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# 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 /nologo /dll /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 tuscany_sca.lib tuscany_sdo.lib /nologo /dll /machine:I386 /out:"Release/MyValue.dll" /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib"
+
+!ELSEIF "$(CFG)" == "tuscany_sca_test_MyValue - 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 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_MYVALUE_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "../../../runtime/core/test/CustomerInfo" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_MYVALUE_EXPORTS" /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# 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 /nologo /dll /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 tuscany_sca.lib tuscany_sdo.lib /nologo /dll /debug /machine:I386 /out:"Debug/MyValue.dll" /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "tuscany_sca_test_MyValue - Win32 Release"
+# Name "tuscany_sca_test_MyValue - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_customerInfo_Proxy.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Proxy.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Wrapper.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_stockQuote_Proxy.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\MyValue\MyValue.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_customerInfo_Proxy.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Proxy.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Wrapper.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_stockQuote_Proxy.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\core\test\MyValue\StockQuoteService.h
+# End Source File
+# 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/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.mak b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.mak
new file mode 100644
index 0000000000..1bd49a885b
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.mak
@@ -0,0 +1,284 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on tuscany_sca_test_MyValue.dsp
+!IF "$(CFG)" == ""
+CFG=tuscany_sca_test_MyValue - Win32 Debug
+!MESSAGE No configuration specified. Defaulting to tuscany_sca_test_MyValue - Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "tuscany_sca_test_MyValue - Win32 Release" && "$(CFG)" != "tuscany_sca_test_MyValue - Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!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 "tuscany_sca_test_MyValue.mak" CFG="tuscany_sca_test_MyValue - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "tuscany_sca_test_MyValue - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "tuscany_sca_test_MyValue - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+!IF "$(CFG)" == "tuscany_sca_test_MyValue - Win32 Release"
+
+OUTDIR=.\Release
+INTDIR=.\Release
+# Begin Custom Macros
+OutDir=.\Release
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : "$(OUTDIR)\MyValue.dll"
+
+!ELSE
+
+ALL : "tuscany_sca - Win32 Release" "$(OUTDIR)\MyValue.dll"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"tuscany_sca - Win32 ReleaseCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\MyValueImpl.obj"
+ -@erase "$(INTDIR)\MyValueImpl_customerInfo_Proxy.obj"
+ -@erase "$(INTDIR)\MyValueImpl_MyValueService_Proxy.obj"
+ -@erase "$(INTDIR)\MyValueImpl_MyValueService_Wrapper.obj"
+ -@erase "$(INTDIR)\MyValueImpl_stockQuote_Proxy.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(OUTDIR)\MyValue.dll"
+ -@erase "$(OUTDIR)\MyValue.exp"
+ -@erase "$(OUTDIR)\MyValue.lib"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "../../../runtime/core/test/CustomerInfo" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_MYVALUE_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_test_MyValue.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=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_sca.lib tuscany_sdo.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\MyValue.pdb" /machine:I386 /out:"$(OUTDIR)\MyValue.dll" /implib:"$(OUTDIR)\MyValue.lib" /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib"
+LINK32_OBJS= \
+ "$(INTDIR)\MyValueImpl.obj" \
+ "$(INTDIR)\MyValueImpl_customerInfo_Proxy.obj" \
+ "$(INTDIR)\MyValueImpl_MyValueService_Proxy.obj" \
+ "$(INTDIR)\MyValueImpl_MyValueService_Wrapper.obj" \
+ "$(INTDIR)\MyValueImpl_stockQuote_Proxy.obj" \
+ "..\tuscany_sca\Release\tuscany_sca.lib"
+
+"$(OUTDIR)\MyValue.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "tuscany_sca_test_MyValue - Win32 Debug"
+
+OUTDIR=.\Debug
+INTDIR=.\Debug
+# Begin Custom Macros
+OutDir=.\Debug
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : "$(OUTDIR)\MyValue.dll"
+
+!ELSE
+
+ALL : "tuscany_sca - Win32 Debug" "$(OUTDIR)\MyValue.dll"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"tuscany_sca - Win32 DebugCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\MyValueImpl.obj"
+ -@erase "$(INTDIR)\MyValueImpl_customerInfo_Proxy.obj"
+ -@erase "$(INTDIR)\MyValueImpl_MyValueService_Proxy.obj"
+ -@erase "$(INTDIR)\MyValueImpl_MyValueService_Wrapper.obj"
+ -@erase "$(INTDIR)\MyValueImpl_stockQuote_Proxy.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(OUTDIR)\MyValue.dll"
+ -@erase "$(OUTDIR)\MyValue.exp"
+ -@erase "$(OUTDIR)\MyValue.ilk"
+ -@erase "$(OUTDIR)\MyValue.lib"
+ -@erase "$(OUTDIR)\MyValue.pdb"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "../../../runtime/core/test/CustomerInfo" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_TEST_MYVALUE_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_test_MyValue.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=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_sca.lib tuscany_sdo.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\MyValue.pdb" /debug /machine:I386 /out:"$(OUTDIR)\MyValue.dll" /implib:"$(OUTDIR)\MyValue.lib" /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib"
+LINK32_OBJS= \
+ "$(INTDIR)\MyValueImpl.obj" \
+ "$(INTDIR)\MyValueImpl_customerInfo_Proxy.obj" \
+ "$(INTDIR)\MyValueImpl_MyValueService_Proxy.obj" \
+ "$(INTDIR)\MyValueImpl_MyValueService_Wrapper.obj" \
+ "$(INTDIR)\MyValueImpl_stockQuote_Proxy.obj" \
+ "..\tuscany_sca\Debug\tuscany_sca.lib"
+
+"$(OUTDIR)\MyValue.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("tuscany_sca_test_MyValue.dep")
+!INCLUDE "tuscany_sca_test_MyValue.dep"
+!ELSE
+!MESSAGE Warning: cannot find "tuscany_sca_test_MyValue.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "tuscany_sca_test_MyValue - Win32 Release" || "$(CFG)" == "tuscany_sca_test_MyValue - Win32 Debug"
+SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl.cpp
+
+"$(INTDIR)\MyValueImpl.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_customerInfo_Proxy.cpp
+
+"$(INTDIR)\MyValueImpl_customerInfo_Proxy.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Proxy.cpp
+
+"$(INTDIR)\MyValueImpl_MyValueService_Proxy.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Wrapper.cpp
+
+"$(INTDIR)\MyValueImpl_MyValueService_Wrapper.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\core\test\MyValue\MyValueImpl_stockQuote_Proxy.cpp
+
+"$(INTDIR)\MyValueImpl_stockQuote_Proxy.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!IF "$(CFG)" == "tuscany_sca_test_MyValue - Win32 Release"
+
+"tuscany_sca - Win32 Release" :
+ cd "..\tuscany_sca"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release"
+ cd "..\tuscany_sca_test_MyValue"
+
+"tuscany_sca - Win32 ReleaseCLEAN" :
+ cd "..\tuscany_sca"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release" RECURSE=1 CLEAN
+ cd "..\tuscany_sca_test_MyValue"
+
+!ELSEIF "$(CFG)" == "tuscany_sca_test_MyValue - Win32 Debug"
+
+"tuscany_sca - Win32 Debug" :
+ cd "..\tuscany_sca"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug"
+ cd "..\tuscany_sca_test_MyValue"
+
+"tuscany_sca - Win32 DebugCLEAN" :
+ cd "..\tuscany_sca"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug" RECURSE=1 CLEAN
+ cd "..\tuscany_sca_test_MyValue"
+
+!ENDIF
+
+
+!ENDIF
+
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.dsp b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.dsp
new file mode 100644
index 0000000000..c25fdb3536
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.dsp
@@ -0,0 +1,125 @@
+# Microsoft Developer Studio Project File - Name="tuscany_sca_ws_service" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=tuscany_sca_ws_service - 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 "tuscany_sca_ws_service.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 "tuscany_sca_ws_service.mak" CFG="tuscany_sca_ws_service - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "tuscany_sca_ws_service - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "tuscany_sca_ws_service - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "tuscany_sca_ws_service - 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 Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_SERVICE_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_SERVICE_EXPORTS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# 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 /nologo /dll /machine:I386
+# ADD LINK32 axis2_util.lib axiom.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 axis2_engine.lib tuscany_sdo_axiom.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /machine:I386 /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=copy Release\tuscany_sca_ws_service.lib ..\..\..\deploy\lib copy Release\tuscany_sca_ws_service.dll ..\..\..\deploy\bin
+# End Special Build Tool
+
+!ELSEIF "$(CFG)" == "tuscany_sca_ws_service - 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 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_SERVICE_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_SERVICE_EXPORTS" /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# 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 /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 axis2_util.lib axiom.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 axis2_engine.lib tuscany_sdo_axiom.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=copy Debug\tuscany_sca_ws_service.dll ..\..\..\deploy\bin copy Debug\tuscany_sca_ws_service.pdb ..\..\..\deploy\bin copy Debug\tuscany_sca_ws_service.lib ..\..\..\deploy\lib
+# End Special Build Tool
+
+!ENDIF
+
+# Begin Target
+
+# Name "tuscany_sca_ws_service - Win32 Release"
+# Name "tuscany_sca_ws_service - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\runtime\ws_service\axis2c\src\Axis2EntryPointService_skeleton.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\runtime\ws_service\axis2c\src\Axis2Utils.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\..\runtime\ws_service\axis2c\src\Axis2Utils.h
+# End Source File
+# 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/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.mak b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.mak
new file mode 100644
index 0000000000..49674c1f23
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.mak
@@ -0,0 +1,283 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on tuscany_sca_ws_service.dsp
+!IF "$(CFG)" == ""
+CFG=tuscany_sca_ws_service - Win32 Debug
+!MESSAGE No configuration specified. Defaulting to tuscany_sca_ws_service - Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "tuscany_sca_ws_service - Win32 Release" && "$(CFG)" != "tuscany_sca_ws_service - Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!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 "tuscany_sca_ws_service.mak" CFG="tuscany_sca_ws_service - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "tuscany_sca_ws_service - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "tuscany_sca_ws_service - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+!IF "$(CFG)" == "tuscany_sca_ws_service - Win32 Release"
+
+OUTDIR=.\Release
+INTDIR=.\Release
+# Begin Custom Macros
+OutDir=.\Release
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : "$(OUTDIR)\tuscany_sca_ws_service.dll"
+
+!ELSE
+
+ALL : "tuscany_sca - Win32 Release" "$(OUTDIR)\tuscany_sca_ws_service.dll"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"tuscany_sca - Win32 ReleaseCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\Axis2EntryPointService_skeleton.obj"
+ -@erase "$(INTDIR)\Axis2Utils.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(OUTDIR)\tuscany_sca_ws_service.dll"
+ -@erase "$(OUTDIR)\tuscany_sca_ws_service.exp"
+ -@erase "$(OUTDIR)\tuscany_sca_ws_service.lib"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_SERVICE_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_ws_service.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=axis2_util.lib axiom.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 axis2_engine.lib tuscany_sdo_axiom.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\tuscany_sca_ws_service.pdb" /machine:I386 /out:"$(OUTDIR)\tuscany_sca_ws_service.dll" /implib:"$(OUTDIR)\tuscany_sca_ws_service.lib" /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib"
+LINK32_OBJS= \
+ "$(INTDIR)\Axis2EntryPointService_skeleton.obj" \
+ "$(INTDIR)\Axis2Utils.obj" \
+ "..\tuscany_sca\Release\tuscany_sca.lib"
+
+"$(OUTDIR)\tuscany_sca_ws_service.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+SOURCE="$(InputPath)"
+DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
+
+ALL : $(DS_POSTBUILD_DEP)
+
+# Begin Custom Macros
+OutDir=.\Release
+# End Custom Macros
+
+$(DS_POSTBUILD_DEP) : "tuscany_sca - Win32 Release" "$(OUTDIR)\tuscany_sca_ws_service.dll"
+ copy Release\tuscany_sca_ws_service.lib ..\..\..\deploy\lib
+ copy Release\tuscany_sca_ws_service.dll ..\..\..\deploy\bin
+ echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
+
+!ELSEIF "$(CFG)" == "tuscany_sca_ws_service - Win32 Debug"
+
+OUTDIR=.\Debug
+INTDIR=.\Debug
+# Begin Custom Macros
+OutDir=.\Debug
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : "$(OUTDIR)\tuscany_sca_ws_service.dll"
+
+!ELSE
+
+ALL : "tuscany_sca - Win32 Debug" "$(OUTDIR)\tuscany_sca_ws_service.dll"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"tuscany_sca - Win32 DebugCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\Axis2EntryPointService_skeleton.obj"
+ -@erase "$(INTDIR)\Axis2Utils.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(OUTDIR)\tuscany_sca_ws_service.dll"
+ -@erase "$(OUTDIR)\tuscany_sca_ws_service.exp"
+ -@erase "$(OUTDIR)\tuscany_sca_ws_service.ilk"
+ -@erase "$(OUTDIR)\tuscany_sca_ws_service.lib"
+ -@erase "$(OUTDIR)\tuscany_sca_ws_service.pdb"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../runtime/core/src" /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TUSCANY_SCA_WS_SERVICE_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\tuscany_sca_ws_service.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=axis2_util.lib axiom.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 axis2_engine.lib tuscany_sdo_axiom.lib tuscany_sca.lib tuscany_sdo.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\tuscany_sca_ws_service.pdb" /debug /machine:I386 /out:"$(OUTDIR)\tuscany_sca_ws_service.dll" /implib:"$(OUTDIR)\tuscany_sca_ws_service.lib" /pdbtype:sept /libpath:"..\..\..\deploy\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib"
+LINK32_OBJS= \
+ "$(INTDIR)\Axis2EntryPointService_skeleton.obj" \
+ "$(INTDIR)\Axis2Utils.obj" \
+ "..\tuscany_sca\Debug\tuscany_sca.lib"
+
+"$(OUTDIR)\tuscany_sca_ws_service.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+SOURCE="$(InputPath)"
+DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
+
+ALL : $(DS_POSTBUILD_DEP)
+
+# Begin Custom Macros
+OutDir=.\Debug
+# End Custom Macros
+
+$(DS_POSTBUILD_DEP) : "tuscany_sca - Win32 Debug" "$(OUTDIR)\tuscany_sca_ws_service.dll"
+ copy Debug\tuscany_sca_ws_service.dll ..\..\..\deploy\bin
+ copy Debug\tuscany_sca_ws_service.pdb ..\..\..\deploy\bin
+ copy Debug\tuscany_sca_ws_service.lib ..\..\..\deploy\lib
+ echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
+
+!ENDIF
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("tuscany_sca_ws_service.dep")
+!INCLUDE "tuscany_sca_ws_service.dep"
+!ELSE
+!MESSAGE Warning: cannot find "tuscany_sca_ws_service.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "tuscany_sca_ws_service - Win32 Release" || "$(CFG)" == "tuscany_sca_ws_service - Win32 Debug"
+SOURCE=..\..\..\runtime\ws_service\axis2c\src\Axis2EntryPointService_skeleton.cpp
+
+"$(INTDIR)\Axis2EntryPointService_skeleton.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\runtime\ws_service\axis2c\src\Axis2Utils.cpp
+
+"$(INTDIR)\Axis2Utils.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!IF "$(CFG)" == "tuscany_sca_ws_service - Win32 Release"
+
+"tuscany_sca - Win32 Release" :
+ cd "..\tuscany_sca"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release"
+ cd "..\tuscany_sca_ws_service"
+
+"tuscany_sca - Win32 ReleaseCLEAN" :
+ cd "..\tuscany_sca"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Release" RECURSE=1 CLEAN
+ cd "..\tuscany_sca_ws_service"
+
+!ELSEIF "$(CFG)" == "tuscany_sca_ws_service - Win32 Debug"
+
+"tuscany_sca - Win32 Debug" :
+ cd "..\tuscany_sca"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug"
+ cd "..\tuscany_sca_ws_service"
+
+"tuscany_sca - Win32 DebugCLEAN" :
+ cd "..\tuscany_sca"
+ $(MAKE) /$(MAKEFLAGS) /F .\tuscany_sca.mak CFG="tuscany_sca - Win32 Debug" RECURSE=1 CLEAN
+ cd "..\tuscany_sca_ws_service"
+
+!ENDIF
+
+
+!ENDIF
+
diff --git a/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_ws_service_axis2/tuscany_sca_ws_service_axis2.vcproj b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_ws_service_axis2/tuscany_sca_ws_service_axis2.vcproj
new file mode 100644
index 0000000000..39e90539a3
--- /dev/null
+++ b/branches/cpp-M1/sca/projects/tuscany_sca/tuscany_sca_ws_service_axis2/tuscany_sca_ws_service_axis2.vcproj
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="tuscany_sca_ws_service_axis2"
+ ProjectGUID="{96EB08C3-5CF3-4597-B9FB-0B6732FB84B2}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="$(AXIS2C_HOME)/include,$(TUSCANY_SCACPP)/include,$(TUSCANY_SDOCPP)/include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="tuscany_sca.lib tuscany_sdo_axiom.lib tuscany_sdo.lib axis2_engine.lib axis2_parser.lib axis2_util.lib axis2_om.lib"
+ OutputFile="$(OutDir)/tuscany_ws_service.dll"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="$(TUSCANY_SCACPP)/lib,$(TUSCANY_SDOCPP)/lib,$(AXIS2C_HOME)/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/tuscany_sca_ws_service_axis2.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="del ..\..\..\bin\tuscany_ws_service.*
+copy Debug\tuscany_ws_service.dll ..\..\..\bin
+copy Debug\tuscany_ws_service.pdb ..\..\..\bin
+copy Debug\tuscany_ws_service.lib ..\..\..\lib"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="4"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/tuscany_sca_ws_service_axis2.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath="..\..\..\runtime\ws_service\axis2c\src\Axis2EntryPointService_skeleton.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\ws_service\axis2c\src\Axis2Utils.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\ws_service\axis2c\src\Axis2Utils.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca.sln b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca.sln
new file mode 100644
index 0000000000..ec07ab3877
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca.sln
@@ -0,0 +1,52 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tuscany_sca", "tuscany_sca\tuscany_sca.vcproj", "{2FC1B037-C30C-4B63-949E-B7467529671F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tuscany_sca_test", "tuscany_sca_test\tuscany_sca_test.vcproj", "{2E87E2DB-3BE9-4FCF-9D16-9725A62A6BC5}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tuscany_sca_test_CustomerInfo", "tuscany_sca_test_CustomerInfo\tuscany_sca_test_CustomerInfo.vcproj", "{4CA34112-DC16-42E5-B6C6-66742E4F5CE1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tuscany_sca_test_MyValue", "tuscany_sca_test_MyValue\tuscany_sca_test_MyValue.vcproj", "{664DD6E6-B551-45D3-83A9-49FFAEB4A4D2}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tuscany_sca_ws_service", "tuscany_sca_ws_service\tuscany_sca_ws_service.vcproj", "{A5943537-08D7-4A51-A7F0-B24400810738}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = Debug
+ ConfigName.1 = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ {2E87E2DB-3BE9-4FCF-9D16-9725A62A6BC5}.0 = {A5943537-08D7-4A51-A7F0-B24400810738}
+ {2E87E2DB-3BE9-4FCF-9D16-9725A62A6BC5}.1 = {664DD6E6-B551-45D3-83A9-49FFAEB4A4D2}
+ {2E87E2DB-3BE9-4FCF-9D16-9725A62A6BC5}.2 = {4CA34112-DC16-42E5-B6C6-66742E4F5CE1}
+ {2E87E2DB-3BE9-4FCF-9D16-9725A62A6BC5}.3 = {2FC1B037-C30C-4B63-949E-B7467529671F}
+ {4CA34112-DC16-42E5-B6C6-66742E4F5CE1}.0 = {2FC1B037-C30C-4B63-949E-B7467529671F}
+ {664DD6E6-B551-45D3-83A9-49FFAEB4A4D2}.0 = {2FC1B037-C30C-4B63-949E-B7467529671F}
+ {A5943537-08D7-4A51-A7F0-B24400810738}.0 = {2FC1B037-C30C-4B63-949E-B7467529671F}
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {2FC1B037-C30C-4B63-949E-B7467529671F}.Debug.ActiveCfg = Debug|Win32
+ {2FC1B037-C30C-4B63-949E-B7467529671F}.Debug.Build.0 = Debug|Win32
+ {2FC1B037-C30C-4B63-949E-B7467529671F}.Release.ActiveCfg = Release|Win32
+ {2FC1B037-C30C-4B63-949E-B7467529671F}.Release.Build.0 = Release|Win32
+ {2E87E2DB-3BE9-4FCF-9D16-9725A62A6BC5}.Debug.ActiveCfg = Debug|Win32
+ {2E87E2DB-3BE9-4FCF-9D16-9725A62A6BC5}.Debug.Build.0 = Debug|Win32
+ {2E87E2DB-3BE9-4FCF-9D16-9725A62A6BC5}.Release.ActiveCfg = Release|Win32
+ {2E87E2DB-3BE9-4FCF-9D16-9725A62A6BC5}.Release.Build.0 = Release|Win32
+ {4CA34112-DC16-42E5-B6C6-66742E4F5CE1}.Debug.ActiveCfg = Debug|Win32
+ {4CA34112-DC16-42E5-B6C6-66742E4F5CE1}.Debug.Build.0 = Debug|Win32
+ {4CA34112-DC16-42E5-B6C6-66742E4F5CE1}.Release.ActiveCfg = Release|Win32
+ {4CA34112-DC16-42E5-B6C6-66742E4F5CE1}.Release.Build.0 = Release|Win32
+ {664DD6E6-B551-45D3-83A9-49FFAEB4A4D2}.Debug.ActiveCfg = Debug|Win32
+ {664DD6E6-B551-45D3-83A9-49FFAEB4A4D2}.Debug.Build.0 = Debug|Win32
+ {664DD6E6-B551-45D3-83A9-49FFAEB4A4D2}.Release.ActiveCfg = Release|Win32
+ {664DD6E6-B551-45D3-83A9-49FFAEB4A4D2}.Release.Build.0 = Release|Win32
+ {A5943537-08D7-4A51-A7F0-B24400810738}.Debug.ActiveCfg = Debug|Win32
+ {A5943537-08D7-4A51-A7F0-B24400810738}.Debug.Build.0 = Debug|Win32
+ {A5943537-08D7-4A51-A7F0-B24400810738}.Release.ActiveCfg = Release|Win32
+ {A5943537-08D7-4A51-A7F0-B24400810738}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca.suo b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca.suo
new file mode 100644
index 0000000000..71c843b643
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca.suo
Binary files differ
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca/Build Instructions.txt b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca/Build Instructions.txt
new file mode 100644
index 0000000000..847dd5d492
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca/Build Instructions.txt
@@ -0,0 +1,30 @@
+Tuscany SCA Build Instructions
+==============================
+
+1) Set the environment variable TUSCANY_SDOCPP to the path of an SDO driver
+
+2) Set the environment variable AXIS2C_HOME to the path of Axis2C (Version 0.92)
+
+NOTE: The environment variables must be set BEFORE launching Visual Studio
+
+3) Rebuild Solution
+
+The output for the build will be in deploy\include, lib and bin
+
+To run the test from a command prompt:
+
+1) Set the environment variable TUSCANY_SCACPP to the location of the built SCA
+ (...tuscany\cpp\sca\deploy)
+
+2) Set the environment variable TUSCANY_SCACPP_SYSTEM_ROOT to the location of the test system
+ ...tuscany\cpp\sca\projects\tuscany_sca\tuscany_sca_test\testSCASystem
+
+3) Add %TUSCANY_SCACPP%\lib and %TUSCANY_SDOCPP%\lib to the PATH
+ (ensure required libraries for SDO are also on the path. e.g. libxml2)
+
+4) cd %TUSCANY_SCACPP%\..\projects\tuscany_sca\tuscany_sca_test\Debug
+
+5) tuscany_sca_test
+
+NOTE: To run the test from the workspace the environment variables must be set
+ BEFORE launching Visual Studio
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca/tuscany_sca.vcproj b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca/tuscany_sca.vcproj
new file mode 100644
index 0000000000..a83144e12a
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca/tuscany_sca.vcproj
@@ -0,0 +1,520 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.00"
+ Name="tuscany_sca"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="../../../runtime/core/src,$(TUSCANY_SDOCPP)/include,$(AXIS2C_HOME)/include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SCA_EXPORTS"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ PrecompiledHeaderFile=".\Release/tuscany_sca.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="axis2_engine.lib tuscany_sdo_axiom.lib odbc32.lib odbccp32.lib tuscany_sdo.lib axis2_parser.lib axis2_util.lib axiom.lib"
+ OutputFile=".\Release/tuscany_sca.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="$(TUSCANY_SDOCPP)\lib,$(AXIS2C_HOME)\lib"
+ ProgramDatabaseFile=".\Release/tuscany_sca.pdb"
+ ImportLibrary=".\Release/tuscany_sca.lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/tuscany_sca.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if not exist ..\..\..\deploy mkdir ..\..\..\deploy
+if not exist ..\..\..\deploy\bin mkdir ..\..\..\deploy\bin
+if not exist ..\..\..\deploy\lib mkdir ..\..\..\deploy\lib
+if not exist ..\..\..\deploy\include mkdir ..\..\..\deploy\include
+if not exist ..\..\..\deploy\include\osoa mkdir ..\..\..\deploy\include\osoa
+if not exist ..\..\..\deploy\include\osoa\sca mkdir ..\..\..\deploy\include\osoa\sca
+if not exist ..\..\..\deploy\include\tuscany mkdir ..\..\..\deploy\include\tuscany
+if not exist ..\..\..\deploy\include\tuscany\sca mkdir ..\..\..\deploy\include\tuscany\sca
+if not exist ..\..\..\deploy\include\tuscany\sca\core mkdir ..\..\..\deploy\include\tuscany\sca\core
+if not exist ..\..\..\deploy\include\tuscany\sca\model mkdir ..\..\..\deploy\include\tuscany\sca\model
+if not exist ..\..\..\deploy\include\tuscany\sca\util mkdir ..\..\..\deploy\include\tuscany\sca\util
+if not exist ..\..\..\deploy\include\tuscany\sca\ws mkdir ..\..\..\deploy\include\tuscany\sca\ws
+if not exist ..\..\..\deploy\xsd mkdir ..\..\..\deploy\xsd
+
+del ..\..\..\deploy\bin\tuscany_sca.*
+del ..\..\..\deploy\lib\*.lib
+copy ..\..\..\runtime\core\src\osoa\sca\*.h ..\..\..\deploy\include\osoa\sca
+copy ..\..\..\runtime\core\src\tuscany\sca\core\*.h ..\..\..\deploy\include\tuscany\sca\core
+copy ..\..\..\runtime\core\src\tuscany\sca\model\*.h ..\..\..\deploy\include\tuscany\sca\model
+copy ..\..\..\runtime\core\src\tuscany\sca\util\*.h ..\..\..\deploy\include\tuscany\sca\util
+copy ..\..\..\runtime\core\src\tuscany\sca\ws\*.h ..\..\..\deploy\include\tuscany\sca\ws
+copy Release\tuscany_sca.dll ..\..\..\deploy\bin
+copy Release\tuscany_sca.pdb ..\..\..\deploy\bin
+copy Release\tuscany_sca.lib ..\..\..\deploy\lib
+copy ..\..\..\xsd\*.* ..\..\..\deploy\xsd
+
+"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../runtime/core/src,$(TUSCANY_SDOCPP)/include,$(AXIS2C_HOME)/include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SCA_EXPORTS"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile=".\Debug/tuscany_sca.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="axis2_engine.lib tuscany_sdo_axiom.lib odbc32.lib odbccp32.lib tuscany_sdo.lib axis2_parser.lib axis2_util.lib axiom.lib"
+ OutputFile=".\Debug/tuscany_sca.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="$(TUSCANY_SDOCPP)\lib,$(AXIS2C_HOME)\lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/tuscany_sca.pdb"
+ ImportLibrary=".\Debug/tuscany_sca.lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/tuscany_sca.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if not exist ..\..\..\deploy mkdir ..\..\..\deploy
+if not exist ..\..\..\deploy\bin mkdir ..\..\..\deploy\bin
+if not exist ..\..\..\deploy\lib mkdir ..\..\..\deploy\lib
+if not exist ..\..\..\deploy\include mkdir ..\..\..\deploy\include
+if not exist ..\..\..\deploy\include\osoa mkdir ..\..\..\deploy\include\osoa
+if not exist ..\..\..\deploy\include\osoa\sca mkdir ..\..\..\deploy\include\osoa\sca
+if not exist ..\..\..\deploy\include\tuscany mkdir ..\..\..\deploy\include\tuscany
+if not exist ..\..\..\deploy\include\tuscany\sca mkdir ..\..\..\deploy\include\tuscany\sca
+if not exist ..\..\..\deploy\include\tuscany\sca\core mkdir ..\..\..\deploy\include\tuscany\sca\core
+if not exist ..\..\..\deploy\include\tuscany\sca\model mkdir ..\..\..\deploy\include\tuscany\sca\model
+if not exist ..\..\..\deploy\include\tuscany\sca\util mkdir ..\..\..\deploy\include\tuscany\sca\util
+if not exist ..\..\..\deploy\include\tuscany\sca\ws mkdir ..\..\..\deploy\include\tuscany\sca\ws
+if not exist ..\..\..\deploy\xsd mkdir ..\..\..\deploy\xsd
+
+del ..\..\..\deploy\bin\tuscany_sca.*
+del ..\..\..\deploy\lib\*.lib
+copy ..\..\..\runtime\core\src\osoa\sca\*.h ..\..\..\deploy\include\osoa\sca
+copy ..\..\..\runtime\core\src\tuscany\sca\core\*.h ..\..\..\deploy\include\tuscany\sca\core
+copy ..\..\..\runtime\core\src\tuscany\sca\model\*.h ..\..\..\deploy\include\tuscany\sca\model
+copy ..\..\..\runtime\core\src\tuscany\sca\util\*.h ..\..\..\deploy\include\tuscany\sca\util
+copy ..\..\..\runtime\core\src\tuscany\sca\ws\*.h ..\..\..\deploy\include\tuscany\sca\ws
+copy Debug\tuscany_sca.dll ..\..\..\deploy\bin
+copy Debug\tuscany_sca.pdb ..\..\..\deploy\bin
+copy Debug\tuscany_sca.lib ..\..\..\deploy\lib
+copy ..\..\..\xsd\*.* ..\..\..\deploy\xsd
+"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ </Configurations>
+ <Files>
+ <Filter
+ Name="osoa/sca"
+ Filter="">
+ <File
+ RelativePath="..\..\..\runtime\core\src\osoa\sca\ComponentContext.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\osoa\sca\ComponentContext.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\osoa\sca\ComponentContextImpl.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\osoa\sca\ComponentContextImpl.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\osoa\sca\ModuleContext.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\osoa\sca\ModuleContext.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\osoa\sca\ModuleContextImpl.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\osoa\sca\ModuleContextImpl.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\osoa\sca\SCA.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\osoa\sca\ServiceList.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\osoa\sca\ServiceList.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\osoa\sca\ServiceRuntimeException.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\osoa\sca\ServiceRuntimeException.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\osoa\sca\export.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\osoa\sca\sca.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="tuscany/sca"
+ Filter="">
+ <Filter
+ Name="core"
+ Filter="">
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\core\ComponentServiceWrapper.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\core\ComponentServiceWrapper.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\core\ExternalServiceWrapper.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\core\ExternalServiceWrapper.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\core\Operation.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\core\Operation.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\core\SCAEntryPoint.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\core\SCAEntryPoint.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\core\SCARuntime.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\core\SCARuntime.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\core\ServiceProxy.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\core\ServiceProxy.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\core\ServiceWrapper.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\core\ServiceWrapper.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\core\TuscanyRuntime.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\core\TuscanyRuntime.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="model"
+ Filter="">
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Binding.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Binding.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\CPPImplementation.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\CPPImplementation.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\CPPInterface.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\CPPInterface.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Component.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Component.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\EntryPoint.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\EntryPoint.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\ExternalService.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\ExternalService.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Implementation.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Implementation.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Interface.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Interface.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\ModelLoader.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\ModelLoader.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Module.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Module.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Service.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Service.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\ServiceReference.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\ServiceReference.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Subsystem.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Subsystem.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\System.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\System.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\WSBinding.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\WSBinding.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Wire.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Wire.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\WireTarget.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\WireTarget.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Wsdl.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\Wsdl.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\WsdlOperation.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\WsdlOperation.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="util"
+ Filter="">
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\util\DefaultLogWriter.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\util\DefaultLogWriter.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\util\Exceptions.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\util\File.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\util\File.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\util\FileLogWriter.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\util\FileLogWriter.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\util\Library.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\util\Library.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\util\LogWriter.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\util\LogWriter.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\util\Logger.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\util\Logger.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\util\Logging.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\util\Utils.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\util\Utils.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="ws"
+ Filter="">
+ <File
+ RelativePath="..\..\..\runtime\ws_reference\axis2c\src\Axis2Client.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\ws_reference\axis2c\src\Axis2Client.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\ws\EntryPointProxy.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\ws\EntryPointProxy.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\ws_reference\axis2c\src\WSServiceWrapper.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\src\tuscany\sca\ws\WSServiceWrapper.h">
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="xsd"
+ Filter="">
+ <File
+ RelativePath="..\..\..\xsd\sca-binding-sca.xsd">
+ </File>
+ <File
+ RelativePath="..\..\..\xsd\sca-binding-webservice.xsd">
+ </File>
+ <File
+ RelativePath="..\..\..\xsd\sca-core.xsd">
+ </File>
+ <File
+ RelativePath="..\..\..\xsd\sca-implementation-cpp.xsd">
+ </File>
+ <File
+ RelativePath="..\..\..\xsd\sca-implementation-java.xsd">
+ </File>
+ <File
+ RelativePath="..\..\..\xsd\sca-interface-cpp.xsd">
+ </File>
+ <File
+ RelativePath="..\..\..\xsd\sca-interface-java.xsd">
+ </File>
+ <File
+ RelativePath="..\..\..\xsd\sca-interface-wsdl.xsd">
+ </File>
+ <File
+ RelativePath="..\..\..\xsd\sca.xsd">
+ </File>
+ <File
+ RelativePath="..\..\..\xsd\tuscany.xsd">
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\Build Instructions.txt">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.dll b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.dll
new file mode 100644
index 0000000000..4ca1690be8
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.dll
Binary files differ
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment
new file mode 100644
index 0000000000..c2c521ed96
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<moduleFragment xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="CustomerInfoComponent">
+
+
+ <component name="CustomerInfoComponent">
+ <implementation.cpp dll="CustomerInfo.dll" header="CustomerInfoImpl.h"></implementation.cpp>
+ <properties>
+ <v:Fred>x</v:Fred>
+ <v:Joe>23</v:Joe>
+ <Joe>42</Joe>
+ </properties>
+ <references>
+ </references>
+ </component>
+
+</moduleFragment>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.pdb b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.pdb
new file mode 100644
index 0000000000..61869285b1
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.pdb
Binary files differ
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType
new file mode 100644
index 0000000000..48651b63fe
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="CustomerInfoService">
+ <interface.cpp header="CustomerInfo.h">
+ </interface.cpp>
+ </service>
+
+ <property name="Fred" type="xs:string"/>
+ <property name="Joe" type="xs:integer" many="true"/>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValue.dll b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValue.dll
new file mode 100644
index 0000000000..e651ea0adb
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValue.dll
Binary files differ
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValue.pdb b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValue.pdb
new file mode 100644
index 0000000000..76b5bef92f
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValue.pdb
Binary files differ
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType
new file mode 100644
index 0000000000..ace4154966
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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/0.9">
+
+ <service name="MyValueService">
+ <interface.cpp header="MyValue.h">
+ </interface.cpp>
+ </service>
+
+ <reference name="customerInfo">
+ <interface.cpp header="CustomerInfo.h">
+ </interface.cpp>
+ </reference>
+
+ <reference name="stockQuote">
+ <interface.cpp header="StockQuoteService.h">
+ </interface.cpp>
+ </reference>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueService.wsdl b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueService.wsdl
new file mode 100644
index 0000000000..f82690e1ab
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/MyValueService.wsdl
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.myvalue.org/MyValueService/"
+ targetNamespace="http://www.myvalue.org/MyValueService/">
+ <types>
+ <xs:schema targetNamespace="http://www.myvalue.org/MyValueService/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.myvalue.org/MyValueService/"
+ elementFormDefault="qualified">
+
+ <xs:element name="getMyValue">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="customerID" type="xs:string" minOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="getMyValueResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="myValue" type="xs:float" minOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ </xs:schema>
+ </types>
+
+ <message name="getMyValueRequestMsg">
+ <part name="body" element="tns:getMyValue"/>
+ </message>
+
+ <message name="getMyValueResponseMsg">
+ <part name="body" element="tns:getMyValueResponse"/>
+ </message>
+
+ <portType name="MyValueServicePortType">
+ <operation name="getMyValue">
+ <input message="tns:getMyValueRequestMsg"/>
+ <output message="tns:getMyValueResponseMsg"/>
+ </operation>
+ </portType>
+
+ <binding name="MyValueServiceBinding" type="tns:MyValueServicePortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="getMyValue">
+ <soap:operation soapAction="MyValueService#getMyValue"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="MyValueService">
+ <port name="MyValueServicePort" binding="tns:MyValueServiceBinding">
+ <soap:address location="http://localhost/axis/MyValueService"/>
+ </port>
+ </service>
+</definitions>
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl
new file mode 100644
index 0000000000..26e2ea5cb8
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<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/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteTypes.xsd b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/StockQuoteTypes.xsd
new file mode 100644
index 0000000000..5bce3a63dc
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/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/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config
new file mode 100644
index 0000000000..a23cc3f5cd
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config
@@ -0,0 +1,26 @@
+<?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.
+ -->
+
+<tuscany-model xmlns="http://org.apache.tuscany/xmlns/cpp/1.0">
+ <wsdl>
+ <file name="MyValueService.wsdl"/>
+ <file name="StockQuoteService.wsdl"/>
+ </wsdl>
+ <xsd>
+ <file name="StockQuoteTypes.xsd"/>
+ </xsd>
+</tuscany-model> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/sca.module b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/sca.module
new file mode 100644
index 0000000000..8cc39ce7bb
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/modules/MyValueServiceModule/sca.module
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="MyValueServiceModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="MyValueServiceExport" multiplicity="1..1">
+ <interface.wsdl interface="MyValueService.wsdl" callbackInterface=""></interface.wsdl>
+ <binding.ws port="http://www.myvalue.org/MyValueService/#wsdl.endpoint(MyValueService/MyValueServicePort)"></binding.ws>
+ <reference>MyValueServiceComponent</reference>
+ </entryPoint>
+
+ <component name="MyValueServiceComponent">
+ <implementation.cpp dll="MyValue.dll" header="MyValueImpl.h"></implementation.cpp>
+ <properties>
+ </properties>
+ <references>
+ <stockQuote>StockQuoteService</stockQuote>
+ </references>
+ </component>
+
+ <externalService name="StockQuoteService">
+ <interface.cpp header="StockQuoteService.h"/>
+ <binding.ws port="http://www.webserviceX.NET/#wsdl.endpoint(StockQuote/StockQuoteSoap)"/>
+ </externalService>
+
+ <wire>
+ <source.uri>MyValueServiceComponent/customerInfo</source.uri>
+ <target.uri>CustomerInfoComponent</target.uri>
+ </wire>
+
+</module>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/subsystems/SubSystem1/sca.subsystem b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/subsystems/SubSystem1/sca.subsystem
new file mode 100644
index 0000000000..1b32bf8a93
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/testSCASystem/subsystems/SubSystem1/sca.subsystem
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<subsystem xmlns="http://www.osoa.org/xmlns/sca/0.9"
+
+ name="SubSystem1">
+
+ <moduleComponent name="MyValue" module="MyValueServiceModule">
+
+ </moduleComponent>
+
+</subsystem>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/tuscany_sca_test.vcproj b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/tuscany_sca_test.vcproj
new file mode 100644
index 0000000000..1a1fc48b50
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test/tuscany_sca_test.vcproj
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.00"
+ Name="tuscany_sca_test"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="../../../runtime/core/src,$(TUSCANY_SDOCPP)/include,../../../runtime/core/test/MyValue"
+ PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ PrecompiledHeaderFile=".\Release/tuscany_sca_test.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib"
+ OutputFile=".\Release/tuscany_sca_test.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\deploy\lib,$(TUSCANY_SDOCPP)\lib"
+ ProgramDatabaseFile=".\Release/tuscany_sca_test.pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/tuscany_sca_test.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="copy ..\tuscany_sca_test_MyValue\Release\MyValue.dll testSCASystem\modules\MyValueServiceModule
+copy ..\tuscany_sca_test_CustomerInfo\Release\CustomerInfo.dll testSCASystem\modules\MyValueServiceModule
+"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../runtime/core/src,$(TUSCANY_SDOCPP)/include,../../../runtime/core/test/MyValue"
+ PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile=".\Debug/tuscany_sca_test.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib"
+ OutputFile=".\Debug/tuscany_sca_test.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\deploy\lib,$(TUSCANY_SDOCPP)\lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/tuscany_sca_test.pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/tuscany_sca_test.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="copy ..\tuscany_sca_test_MyValue\Debug\MyValue.dll testSCASystem\modules\MyValueServiceModule
+copy ..\tuscany_sca_test_MyValue\Debug\MyValue.pdb testSCASystem\modules\MyValueServiceModule
+copy ..\tuscany_sca_test_CustomerInfo\Debug\CustomerInfo.dll testSCASystem\modules\MyValueServiceModule
+copy ..\tuscany_sca_test_CustomerInfo\Debug\CustomerInfo.pdb testSCASystem\modules\MyValueServiceModule
+copy..\tuscany_sca\Debug\*.dll Debug
+copy..\tuscany_sca\Debug\*.pdb Debug
+"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ </Configurations>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+ <File
+ RelativePath="..\..\..\runtime\core\test\src\TestSCA.cpp">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.vcproj b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.vcproj
new file mode 100644
index 0000000000..2bbb8e4cba
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test_CustomerInfo/tuscany_sca_test_CustomerInfo.vcproj
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.00"
+ Name="tuscany_sca_test_CustomerInfo"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../runtime/core/src,$(TUSCANY_SDOCPP)/include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;TUSCANY_SCA_TEST_CUSTOMERINFO_EXPORTS"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile=".\Debug/tuscany_sca_test_CustomerInfo.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib"
+ OutputFile="Debug/CustomerInfo.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\deploy\lib,$(TUSCANY_SDOCPP)\lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/CustomerInfo.pdb"
+ ImportLibrary=".\Debug/CustomerInfo.lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/tuscany_sca_test_CustomerInfo.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="../../../runtime/core/src,$(TUSCANY_SDOCPP)/include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;TUSCANY_SCA_TEST_CUSTOMERINFO_EXPORTS"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ PrecompiledHeaderFile=".\Release/tuscany_sca_test_CustomerInfo.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib"
+ OutputFile="Release/CustomerInfo.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\deploy\lib,$(TUSCANY_SDOCPP)\lib"
+ ProgramDatabaseFile=".\Release/CustomerInfo.pdb"
+ ImportLibrary=".\Release/CustomerInfo.lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/tuscany_sca_test_CustomerInfo.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ </Configurations>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+ <File
+ RelativePath="..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Proxy.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Wrapper.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl">
+ <File
+ RelativePath="..\..\..\runtime\core\test\CustomerInfo\CustomerInfo.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Proxy.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\test\CustomerInfo\CustomerInfoImpl_CustomerInfoService_Wrapper.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.vcproj b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.vcproj
new file mode 100644
index 0000000000..7272352508
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_test_MyValue/tuscany_sca_test_MyValue.vcproj
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.00"
+ Name="tuscany_sca_test_MyValue"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="../../../runtime/core/src,$(TUSCANY_SDOCPP)/include,../../../runtime/core/test/CustomerInfo"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;TUSCANY_SCA_TEST_MYVALUE_EXPORTS"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ PrecompiledHeaderFile=".\Release/tuscany_sca_test_MyValue.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib"
+ OutputFile="Release/MyValue.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\deploy\lib,$(TUSCANY_SDOCPP)\lib"
+ ProgramDatabaseFile=".\Release/MyValue.pdb"
+ ImportLibrary=".\Release/MyValue.lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/tuscany_sca_test_MyValue.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../runtime/core/src,$(TUSCANY_SDOCPP)/include,../../../runtime/core/test/CustomerInfo"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;TUSCANY_SCA_TEST_MYVALUE_EXPORTS"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile=".\Debug/tuscany_sca_test_MyValue.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib"
+ OutputFile="Debug/MyValue.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\deploy\lib,$(TUSCANY_SDOCPP)\lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/MyValue.pdb"
+ ImportLibrary=".\Debug/MyValue.lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/tuscany_sca_test_MyValue.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ </Configurations>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+ <File
+ RelativePath="..\..\..\runtime\core\test\MyValue\MyValueImpl.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Proxy.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Wrapper.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\test\MyValue\MyValueImpl_customerInfo_Proxy.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\test\MyValue\MyValueImpl_stockQuote_Proxy.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl">
+ <File
+ RelativePath="..\..\..\runtime\core\test\MyValue\MyValue.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\test\MyValue\MyValueImpl.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Proxy.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\test\MyValue\MyValueImpl_MyValueService_Wrapper.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\test\MyValue\MyValueImpl_customerInfo_Proxy.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\test\MyValue\MyValueImpl_stockQuote_Proxy.h">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\core\test\MyValue\StockQuoteService.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.vcproj b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.vcproj
new file mode 100644
index 0000000000..1619337c8f
--- /dev/null
+++ b/branches/cpp-M1/sca/projectsvc7/tuscany_sca/tuscany_sca_ws_service/tuscany_sca_ws_service.vcproj
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.00"
+ Name="tuscany_sca_ws_service"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="../../../runtime/core/src,$(TUSCANY_SDOCPP)/include,$(AXIS2C_HOME)/include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;TUSCANY_SCA_WS_SERVICE_EXPORTS"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ PrecompiledHeaderFile=".\Release/tuscany_sca_ws_service.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="axis2_util.lib axiom.lib odbc32.lib odbccp32.lib axis2_engine.lib tuscany_sdo_axiom.lib tuscany_sca.lib tuscany_sdo.lib"
+ OutputFile=".\Release/tuscany_sca_ws_service.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\deploy\lib,$(TUSCANY_SDOCPP)\lib,$(AXIS2C_HOME)\lib"
+ ProgramDatabaseFile=".\Release/tuscany_sca_ws_service.pdb"
+ ImportLibrary=".\Release/tuscany_sca_ws_service.lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/tuscany_sca_ws_service.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="copy Release\tuscany_sca_ws_service.lib ..\..\..\deploy\lib
+copy Release\tuscany_sca_ws_service.dll ..\..\..\deploy\bin
+"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../runtime/core/src,$(TUSCANY_SDOCPP)/include,$(AXIS2C_HOME)/include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;TUSCANY_SCA_WS_SERVICE_EXPORTS"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile=".\Debug/tuscany_sca_ws_service.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="axis2_util.lib axiom.lib odbc32.lib odbccp32.lib axis2_engine.lib tuscany_sdo_axiom.lib tuscany_sca.lib tuscany_sdo.lib"
+ OutputFile=".\Debug/tuscany_sca_ws_service.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\deploy\lib,$(TUSCANY_SDOCPP)\lib,$(AXIS2C_HOME)\lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/tuscany_sca_ws_service.pdb"
+ ImportLibrary=".\Debug/tuscany_sca_ws_service.lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/tuscany_sca_ws_service.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="copy Debug\tuscany_sca_ws_service.dll ..\..\..\deploy\bin
+copy Debug\tuscany_sca_ws_service.pdb ..\..\..\deploy\bin
+copy Debug\tuscany_sca_ws_service.lib ..\..\..\deploy\lib
+"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ </Configurations>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+ <File
+ RelativePath="..\..\..\runtime\ws_service\axis2c\src\Axis2EntryPointService_skeleton.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\runtime\ws_service\axis2c\src\Axis2Utils.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl">
+ <File
+ RelativePath="..\..\..\runtime\ws_service\axis2c\src\Axis2Utils.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/branches/cpp-M1/sca/runtime/Makefile.am b/branches/cpp-M1/sca/runtime/Makefile.am
new file mode 100644
index 0000000000..8cd99f1477
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = ws_reference core ws_service
diff --git a/branches/cpp-M1/sca/runtime/core/Makefile.am b/branches/cpp-M1/sca/runtime/core/Makefile.am
new file mode 100644
index 0000000000..b4b5bc3097
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = src test
diff --git a/branches/cpp-M1/sca/runtime/core/src/Makefile.am b/branches/cpp-M1/sca/runtime/core/src/Makefile.am
new file mode 100644
index 0000000000..305bbe5504
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/Makefile.am
@@ -0,0 +1,103 @@
+lib_LTLIBRARIES = libtuscany_sca.la
+
+nobase_include_HEADERS = \
+osoa/sca/ComponentContext.h \
+osoa/sca/ComponentContextImpl.h \
+osoa/sca/export.h \
+osoa/sca/ModuleContext.h \
+osoa/sca/ModuleContextImpl.h \
+osoa/sca/sca.h \
+osoa/sca/ServiceList.h \
+osoa/sca/ServiceRuntimeException.h \
+tuscany/sca/core/ComponentServiceWrapper.h \
+tuscany/sca/core/ExternalServiceWrapper.h \
+tuscany/sca/core/Operation.h \
+tuscany/sca/core/SCAEntryPoint.h \
+tuscany/sca/core/SCARuntime.h \
+tuscany/sca/core/ServiceProxy.h \
+tuscany/sca/core/ServiceWrapper.h \
+tuscany/sca/core/TuscanyRuntime.h \
+tuscany/sca/model/Binding.h \
+tuscany/sca/model/Component.h \
+tuscany/sca/model/CPPImplementation.h \
+tuscany/sca/model/CPPInterface.h \
+tuscany/sca/model/EntryPoint.h \
+tuscany/sca/model/ExternalService.h \
+tuscany/sca/model/Implementation.h \
+tuscany/sca/model/Interface.h \
+tuscany/sca/model/ModelLoader.h \
+tuscany/sca/model/Module.h \
+tuscany/sca/model/Service.h \
+tuscany/sca/model/ServiceReference.h \
+tuscany/sca/model/Subsystem.h \
+tuscany/sca/model/System.h \
+tuscany/sca/model/Wire.h \
+tuscany/sca/model/WireTarget.h \
+tuscany/sca/model/WSBinding.h \
+tuscany/sca/model/Wsdl.h \
+tuscany/sca/model/WsdlOperation.h \
+tuscany/sca/util/DefaultLogWriter.h \
+tuscany/sca/util/Exceptions.h \
+tuscany/sca/util/File.h \
+tuscany/sca/util/FileLogWriter.h \
+tuscany/sca/util/Library.h \
+tuscany/sca/util/Logger.h \
+tuscany/sca/util/Logging.h \
+tuscany/sca/util/LogWriter.h \
+tuscany/sca/util/Utils.h \
+tuscany/sca/ws/WSServiceWrapper.h \
+tuscany/sca/ws/EntryPointProxy.h
+
+
+libtuscany_sca_la_SOURCES = \
+osoa/sca/ComponentContext.cpp \
+osoa/sca/ComponentContextImpl.cpp \
+osoa/sca/ModuleContext.cpp \
+osoa/sca/ModuleContextImpl.cpp \
+osoa/sca/SCA.cpp \
+osoa/sca/ServiceList.cpp \
+osoa/sca/ServiceRuntimeException.cpp \
+tuscany/sca/util/DefaultLogWriter.cpp \
+tuscany/sca/util/File.cpp \
+tuscany/sca/util/FileLogWriter.cpp \
+tuscany/sca/util/Library.cpp \
+tuscany/sca/util/Logger.cpp \
+tuscany/sca/util/LogWriter.cpp \
+tuscany/sca/util/Utils.cpp \
+tuscany/sca/model/Binding.cpp \
+tuscany/sca/model/Component.cpp \
+tuscany/sca/model/CPPImplementation.cpp \
+tuscany/sca/model/CPPInterface.cpp \
+tuscany/sca/model/EntryPoint.cpp \
+tuscany/sca/model/ExternalService.cpp \
+tuscany/sca/model/Implementation.cpp \
+tuscany/sca/model/Interface.cpp \
+tuscany/sca/model/ModelLoader.cpp \
+tuscany/sca/model/Module.cpp \
+tuscany/sca/model/Service.cpp \
+tuscany/sca/model/ServiceReference.cpp \
+tuscany/sca/model/Subsystem.cpp \
+tuscany/sca/model/System.cpp \
+tuscany/sca/model/Wire.cpp \
+tuscany/sca/model/WireTarget.cpp \
+tuscany/sca/model/WSBinding.cpp \
+tuscany/sca/model/Wsdl.cpp \
+tuscany/sca/model/WsdlOperation.cpp \
+tuscany/sca/core/ComponentServiceWrapper.cpp \
+tuscany/sca/core/ExternalServiceWrapper.cpp \
+tuscany/sca/core/Operation.cpp \
+tuscany/sca/core/SCAEntryPoint.cpp \
+tuscany/sca/core/SCARuntime.cpp \
+tuscany/sca/core/ServiceProxy.cpp \
+tuscany/sca/core/ServiceWrapper.cpp \
+tuscany/sca/core/TuscanyRuntime.cpp \
+tuscany/sca/ws/EntryPointProxy.cpp
+
+libtuscany_sca_la_LIBADD = -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo \
+ -L$(top_builddir)/runtime/ws_reference/axis2c/src -ltuscany_sca_ws_reference
+
+AM_CPPFLAGS = $(CPPFLAGS) -D_DEBUG
+
+INCLUDES = -I$(top_builddir)/runtime/core/src \
+ -I${TUSCANY_SDOCPP}/include
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ComponentContext.cpp b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ComponentContext.cpp
new file mode 100644
index 0000000000..73c3ed2e36
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ComponentContext.cpp
@@ -0,0 +1,132 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "osoa/sca/ComponentContext.h"
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Exceptions.h"
+#include "osoa/sca/ComponentContextImpl.h"
+#include "tuscany/sca/core/SCARuntime.h"
+
+using namespace tuscany::sca;
+
+namespace osoa
+{
+ namespace sca
+ {
+
+ // =======================================================
+ // getCurrent: create a context from the current component
+ // =======================================================
+ ComponentContext ComponentContext::getCurrent()
+ {
+ LOGENTRY(1, "ComponentContext::getCurrent");
+ Component* component = SCARuntime::getInstance()->getCurrentComponent();
+ if (!component)
+ {
+ throw ComponentContextException("No current component");
+ }
+ ComponentContextImpl* cci = new ComponentContextImpl(component);
+ LOGEXIT(1, "ComponentContext::constructor");
+ return ComponentContext(cci);
+ }
+
+ // ===========
+ // Constructor
+ // ===========
+ ComponentContext::ComponentContext(ComponentContextImpl* implementation)
+ : impl(implementation)
+ {
+ LOGENTRY(1, "ComponentContext::constructor");
+ LOGEXIT(1, "ComponentContext::constructor");
+ }
+
+ // ==========
+ // Destructor
+ // ==========
+ ComponentContext::~ComponentContext()
+ {
+ LOGENTRY(1, "ComponentContext::destructor");
+ delete impl;
+ LOGEXIT(1, "ComponentContext::destructor");
+ }
+
+ // ===================================
+ // Copy constructor: create a new impl
+ // ===================================
+ ComponentContext::ComponentContext(const ComponentContext& ctx)
+ {
+ impl = new ComponentContextImpl(impl->getComponent());
+ }
+
+ // =============================
+ // operator= : create a new impl
+ // =============================
+ ComponentContext& ComponentContext::operator=(const ComponentContext& ctx)
+ {
+ if (this != &ctx)
+ {
+ impl = new ComponentContextImpl(impl->getComponent());
+ }
+ return *this;
+ }
+
+ // ==========
+ // getService
+ // ==========
+ void* ComponentContext::getService(const char* referenceName)
+ {
+ LOGENTRY(1, "ComponentContext::getService");
+ void* service = impl->getService(referenceName);
+ LOGEXIT(1, "ComponentContext::getService");
+ return service;
+ }
+
+ // ===========
+ // getServices
+ // ===========
+ ServiceList ComponentContext::getServices(const char* referenceName)
+ {
+ return impl->getServices(referenceName);
+ }
+
+ // ============
+ // getProperties
+ // =============
+ DataObjectPtr ComponentContext::getProperties()
+ {
+ LOGENTRY(1, "ComponentContext::getProperties");
+ DataObjectPtr properties = impl->getProperties();
+ LOGEXIT(1, "ComponentContext::getProperties");
+ return properties;
+ }
+
+ // ============
+ // getDataFactory
+ // =============
+ DataFactoryPtr ComponentContext::getDataFactory()
+ {
+ LOGENTRY(1, "ComponentContext::getDataFactory");
+ DataFactoryPtr dataFactory = impl->getDataFactory();
+ LOGEXIT(1, "ComponentContext::getDataFactory");
+ return dataFactory;
+ }
+
+
+ } // End namespace sca
+} // End namespace osoa
diff --git a/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ComponentContext.h b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ComponentContext.h
new file mode 100644
index 0000000000..10d334a936
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ComponentContext.h
@@ -0,0 +1,105 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef osoa_sca_componentcontext_h
+#define osoa_sca_componentcontext_h
+
+#include "osoa/sca/export.h"
+#include "osoa/sca/ServiceList.h"
+#include "commonj/sdo/SDO.h"
+namespace osoa
+{
+ namespace sca
+ {
+ class ComponentContextImpl;
+
+ /**
+ * An SCA component implementation uses the ComponentContext class to
+ * retrieve information about the configured SCA component.
+ */
+ class SCA_API ComponentContext
+ {
+
+ public:
+ /**
+ * Return a new ComponentContext for the current Component.
+ */
+ static ComponentContext getCurrent();
+
+ /**
+ * Resolve a reference name into a single configured service.
+ * If the component's reference is wired to more than one service
+ * then theis method will return an exception.
+ * @param referenceName The reference to be resolved. This must match
+ * the name of a reference configured in the component type file for
+ * this component.
+ */
+ void* getService(const char* referenceName);
+
+ /**
+ * Resolve a reference name into a list of configured services.
+ * @param referenceName The reference to be resolved. This must match
+ * the name of a reference configured in the component type file for
+ * this component.
+ */
+ ServiceList getServices(const char* referenceName);
+
+ /**
+ * Get the configured properties for the component.
+ * @return A data object representing all the properties that
+ * are configured for this component.
+ */
+ commonj::sdo::DataObjectPtr getProperties();
+
+ /**
+ * Get an SDO data factory which will allow the component to
+ * create data objects for all the types configured for this
+ * component.
+ * @return A data factory to be used by the component to create
+ * new data objects.
+ */
+ commonj::sdo::DataFactoryPtr getDataFactory();
+
+ /**
+ * Destructor
+ */
+ virtual ~ComponentContext();
+
+
+ ComponentContext(const ComponentContext&);
+ ComponentContext& operator=(const ComponentContext&);
+
+ private:
+ /**
+ * Constructor to create an interface class from the contained
+ * implementation.
+ * @param implementation the actual implementation class
+ */
+ ComponentContext(ComponentContextImpl* implementation);
+
+ /**
+ * Pointer to the class which provides the actual implementation.
+ */
+ ComponentContextImpl* impl;
+
+ };
+ } // End namespace sca
+} // End namespace osoa
+
+#endif // osoa_sca_componentcontext_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ComponentContextImpl.cpp b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ComponentContextImpl.cpp
new file mode 100644
index 0000000000..436e44d5e1
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ComponentContextImpl.cpp
@@ -0,0 +1,270 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Exceptions.h"
+#include "osoa/sca/ComponentContextImpl.h"
+#include "tuscany/sca/model/WireTarget.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+#include "tuscany/sca/core/ExternalServiceWrapper.h"
+#include "tuscany/sca/model/CPPImplementation.h"
+#include "tuscany/sca/model/Module.h"
+
+using namespace tuscany::sca;
+using namespace tuscany::sca::model;
+
+namespace osoa
+{
+ namespace sca
+ {
+ // ===========
+ // Constructor
+ // ===========
+ ComponentContextImpl::ComponentContextImpl(Component* comp)
+ : component(comp)
+ {
+ LOGENTRY(1, "ComponentContextImpl::constructor");
+ LOGEXIT(1, "ComponentContextImpl::constructor");
+ }
+
+ // ==========
+ // Destructor
+ // ==========
+ ComponentContextImpl::~ComponentContextImpl()
+ {
+ // --------------------------------------------
+ // Delete the proxies served up by this context
+ // --------------------------------------------
+ for (PROXIES::iterator iter = proxies.begin(); iter != proxies.end(); iter++)
+ {
+ delete (ServiceProxy*)*iter;
+ }
+ }
+
+
+ // ==========================================================================
+ // getServices: return a list of Proxies for services wired to this reference
+ // ==========================================================================
+ ServiceList ComponentContextImpl::getServices(const char* referenceName)
+ {
+ LOGENTRY(1, "ComponentContextImpl::getServices");
+
+ string message;
+
+ // --------------------------------------------------------------
+ // locate reference in the current component and determine target
+ // --------------------------------------------------------------
+ ServiceReference* serviceReference = component->findReference(referenceName);
+ if (!serviceReference)
+ {
+ message = "Reference not defined: ";
+ message = message + referenceName;
+ throw ServiceNotFoundException(message.c_str());
+ }
+
+ // Get the target services from the ServiceReference
+ const ServiceReference::TARGETS& targets = serviceReference->getTargets();
+
+ // --------------------
+ // Validate the request
+ // --------------------
+ switch (serviceReference->getMultiplicity())
+ {
+ case ServiceReference::ONE_MANY:
+ case ServiceReference::ONE_ONE:
+ {
+ if (targets.size() == 0)
+ {
+ message = "Reference ";
+ message = message + referenceName + " not wired";
+ throw ServiceNotFoundException(message.c_str());
+ }
+ }
+ default:
+ {
+ }
+ } // end switch
+
+ // ------------------------------
+ // Create a proxy for each target
+ // ------------------------------
+ ServiceList services(targets.size());
+ for (ServiceReference::TARGETS::const_iterator iter = targets.begin();
+ iter!=targets.end();
+ iter++)
+ {
+ services.addService(getServiceProxy(serviceReference, *iter));
+ }
+
+ return services;
+
+ } // End getServices()
+
+
+ // ===================================================================
+ // getService: return a Proxy for the services wired to this reference
+ // ===================================================================
+ void* ComponentContextImpl::getService(const char* referenceName)
+ {
+ LOGENTRY(1, "ComponentContextImpl::getService");
+
+ string message;
+
+ // --------------------------------------------------------------
+ // locate reference in the current component and determine target
+ // --------------------------------------------------------------
+ ServiceReference* serviceReference = component->findReference(referenceName);
+ if (!serviceReference)
+ {
+ message = "Reference not defined: ";
+ message = message + referenceName;
+ throw ServiceNotFoundException(message.c_str());
+ }
+
+ // Get the target service from the ServiceReference
+ const ServiceReference::TARGETS& targets = serviceReference->getTargets();
+
+ // --------------------
+ // Validate the request
+ // --------------------
+ switch (serviceReference->getMultiplicity())
+ {
+ case ServiceReference::ZERO_MANY:
+ case ServiceReference::ONE_MANY:
+ {
+ message = "getService() called for reference with multiplicity >1 :";
+ message = message + referenceName;
+ throw ServiceNotFoundException(message.c_str());
+ }
+ case ServiceReference::ONE_ONE:
+ {
+ if (targets.size() == 0)
+ {
+ message = "Reference ";
+ message = message + referenceName + " not wired";
+ throw ServiceNotFoundException(message.c_str());
+ }
+ }
+ default:
+ {
+ }
+ } // end switch
+
+ // Return the proxy
+ return getServiceProxy(serviceReference, *targets.begin());
+
+ } // End getService()
+
+
+ // ==================================================================
+ // getServiceProxy: Create and return an instance of the ServiceProxy
+ // ==================================================================
+ void* ComponentContextImpl::getServiceProxy(
+ ServiceReference* serviceReference,
+ WireTarget* target)
+ {
+ // -----------------------------------
+ // Get a ServiceWrapper for the target
+ // -----------------------------------
+ ServiceWrapper* serviceWrapper = getServiceWrapper(target);
+
+ // ------------------------------
+ // Get a Proxy for this reference
+ // ------------------------------
+ try
+ {
+ ServiceProxy* serviceProxy = new ServiceProxy(component, serviceReference->getName(), serviceWrapper);
+ void* service = serviceProxy->getProxy();
+ // service MUST be set here or an exception will have been thrown
+ proxies.push_back(serviceProxy);
+ return service;
+ }
+ catch (ServiceRuntimeException&)
+ {
+ delete serviceWrapper;
+ throw ;
+ }
+ }
+
+
+ // ======================================================================
+ // getServiceWrapper: Create and return an instance of the ServiceWrapper
+ // ======================================================================
+ ServiceWrapper* ComponentContextImpl::getServiceWrapper(WireTarget* target)
+ {
+ // -------------------------
+ // Determine type of Service
+ // -------------------------
+ switch (target->getServiceType())
+ {
+ case WireTarget::ExternalServiceType:
+ {
+ // ----------------
+ // External Service
+ // ----------------
+ return ExternalServiceWrapper::createServiceWrapper((ExternalService*)target);
+ }
+
+ case WireTarget::ComponentServiceType:
+ {
+ // -----------------
+ // Component Service
+ // -----------------
+ return ComponentServiceWrapper::createServiceWrapper((Service*)target);
+ }
+
+ default:
+ {
+ string message = "Undefined wire target type for : ";
+ message = message + target->getName();
+ throw ServiceNotFoundException(message.c_str());
+ }
+ } // end switch
+ }
+
+
+
+ // ==============================================
+ // getProperties: return the component properties
+ // ==============================================
+ DataObjectPtr ComponentContextImpl::getProperties()
+ {
+ LOGENTRY(1, "ComponentContextImpl::getProperties");
+ DataObjectPtr properties = component->getProperties();
+
+ LOGEXIT(1, "ComponentContextImpl::getProperties");
+ return properties;
+ }
+
+ // ==============================================
+ // getDataFactory: return the data factory for the module in which
+ // this component resides
+ // ==============================================
+ DataFactoryPtr ComponentContextImpl::getDataFactory()
+ {
+ LOGENTRY(1, "ComponentContextImpl::getProperties");
+ DataFactoryPtr dataFactory = component->getModule()->getDataFactory();
+
+ LOGEXIT(1, "ComponentContextImpl::getDataFactory");
+ return dataFactory;
+ }
+
+
+ } // End namespace sca
+} // End namespace osoa
diff --git a/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ComponentContextImpl.h b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ComponentContextImpl.h
new file mode 100644
index 0000000000..bd3a0d106a
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ComponentContextImpl.h
@@ -0,0 +1,120 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef osoa_sca_componentcontextimpl_h
+#define osoa_sca_componentcontextimpl_h
+
+#include "osoa/sca/ServiceList.h"
+
+#include "tuscany/sca/model/Component.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+#include "tuscany/sca/core/ServiceProxy.h"
+#include "tuscany/sca/model/Service.h"
+
+using namespace tuscany::sca;
+using namespace tuscany::sca::model;
+
+namespace osoa
+{
+ namespace sca
+ {
+ /**
+ * Contains the actual implementation of a ComponentContext interface.
+ */
+ class ComponentContextImpl
+ {
+
+ public:
+ /**
+ * Constructor that takes a Component which represents the runtime
+ * model for this context.
+ */
+ ComponentContextImpl(Component* component);
+
+ /**
+ * Default constructor.
+ */
+ virtual ~ComponentContextImpl();
+
+ /**
+ * See ComponentContext.
+ */
+ void* getService(const char* referenceName);
+
+ /**
+ * See ComponentContext.
+ */
+ ServiceList getServices(const char* referenceName);
+
+ /**
+ * See ComponentContext.
+ */
+ DataObjectPtr getProperties();
+
+ /**
+ * See ComponentContext.
+ */
+ commonj::sdo::DataFactoryPtr getDataFactory();
+
+ /**
+ * Returns the contained Component.
+ * @return The Component to which this context refers.
+ */
+ Component* getComponent() {return component;}
+
+ private:
+ ComponentContextImpl(const ComponentContextImpl&);
+ ComponentContextImpl& operator=(const ComponentContextImpl&);
+
+ /**
+ * Pointer to the runtime model Component to which this
+ * context refers.
+ */
+ Component* component;
+
+ /**
+ * Helper method to return a proxy to a service.
+ * @param serviceReference The source reference.
+ * @param target The target to which this source reference is wired.
+ * @return A pointer to an object which can be cast to the business
+ * class representing the target.
+ */
+ void* getServiceProxy(
+ ServiceReference* serviceReference,
+ WireTarget* target);
+
+ /**
+ * Helper method to return a wrapper for a target service.
+ * @param target The target for which this wrapper is to be created.
+ * @return The service wrapper.
+ */
+ ServiceWrapper* getServiceWrapper(WireTarget* target);
+
+
+ typedef vector<ServiceProxy*> PROXIES;
+ /**
+ * A vector of the proxies created by this ComponentContext. The
+ * proxies will be destroyed when the ComponentContext is destroyed.
+ */
+ PROXIES proxies;
+ };
+ } // End namespace sca
+} // End namespace osoa
+
+#endif // osoa_sca_componentcontextimpl_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ModuleContext.cpp b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ModuleContext.cpp
new file mode 100644
index 0000000000..93e36b297f
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ModuleContext.cpp
@@ -0,0 +1,93 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "osoa/sca/ModuleContext.h"
+#include "tuscany/sca/util/Logging.h"
+#include "osoa/sca/ModuleContextImpl.h"
+#include "tuscany/sca/core/SCARuntime.h"
+
+using namespace tuscany::sca;
+
+namespace osoa
+{
+ namespace sca
+ {
+ // ===========
+ // Constructor
+ // ===========
+ ModuleContext::ModuleContext(ModuleContextImpl* implementation)
+ : impl(implementation)
+ {
+ }
+
+ // ===================================
+ // Copy constructor: create a new impl
+ // ===================================
+ ModuleContext::ModuleContext(const ModuleContext& ctx)
+ {
+ impl = new ModuleContextImpl(SCARuntime::getInstance()->getCurrentModule());
+ }
+
+ // =============================
+ // operator= : create a new impl
+ // =============================
+ ModuleContext& ModuleContext::operator=(const ModuleContext& ctx)
+ {
+ if (this != &ctx)
+ {
+ impl = new ModuleContextImpl(SCARuntime::getInstance()->getCurrentModule());
+ }
+ return *this;
+ }
+
+ // ==========
+ // Destructor
+ // ==========
+ ModuleContext::~ModuleContext()
+ {
+ LOGENTRY(1, "ModuleContext::destructor");
+ delete impl;
+ LOGEXIT(1, "ModuleContext::destructor");
+ }
+
+ // ====================================================
+ // getCurrent: create a context from the current module
+ // ====================================================
+ ModuleContext ModuleContext::getCurrent()
+ {
+ LOGENTRY(1, "ModuleContext::getCurrent");
+ ModuleContextImpl* mci = new ModuleContextImpl(SCARuntime::getInstance()->getCurrentModule());
+ LOGEXIT(1, "ModuleContext::getCurrent");
+ return ModuleContext(mci);
+ }
+
+ // =============
+ // locateService
+ // =============
+ void* ModuleContext::locateService(const char* serviceName)
+ {
+ LOGENTRY(1, "ModuleContext::locateService");
+ void* sp = impl->locateService(serviceName);
+ LOGEXIT(1, "ModuleContext::locateService");
+ return sp;
+ }
+
+
+ } // End namespace sca
+} // End namespace osoa
diff --git a/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ModuleContext.h b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ModuleContext.h
new file mode 100644
index 0000000000..7aacb00123
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ModuleContext.h
@@ -0,0 +1,80 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef osoa_sca_modulecontext_h
+#define osoa_sca_modulecontext_h
+
+#include "osoa/sca/export.h"
+
+namespace osoa
+{
+ namespace sca
+ {
+ class ModuleContextImpl;
+
+ /**
+ * An SCA component implementation, or a non-SCA client, uses the
+ * ModuleContext class to retrieve information about the configured
+ * SCA module.
+ */
+ class SCA_API ModuleContext
+ {
+
+ public:
+ /**
+ * Return a new ModuleContext for the current Component.
+ */
+ static ModuleContext getCurrent();
+
+ /**
+ * Resolve a service name into a single component service.
+ * @param serviceName The name of the service in the form
+ * "component name"/"service name". The service name is
+ * optional in the component has one service.
+ * @return A pointer to an object which can be cast to the
+ * business interface of the target service.
+ */
+ void* locateService(const char* serviceName);
+
+ /**
+ * Destructor.
+ */
+ virtual ~ModuleContext();
+
+ ModuleContext(const ModuleContext&);
+ ModuleContext& operator=(const ModuleContext&);
+
+ private:
+ /**
+ * Constructor to create an interface class from the contained
+ * implementation.
+ * @param implementation The actual implementation class.
+ */
+ ModuleContext(ModuleContextImpl* implementation);
+
+ /**
+ * Pointer to the class which provides the actual implementation.
+ */
+ ModuleContextImpl* impl;
+
+ };
+ } // End namespace sca
+} // End namespace osoa
+
+#endif // osoa_sca_modulecontext_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ModuleContextImpl.cpp b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ModuleContextImpl.cpp
new file mode 100644
index 0000000000..4d96ee336d
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ModuleContextImpl.cpp
@@ -0,0 +1,102 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Exceptions.h"
+#include "tuscany/sca/model/Component.h"
+#include "tuscany/sca/model/CPPImplementation.h"
+#include "osoa/sca/ModuleContextImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+using namespace tuscany::sca;
+using namespace tuscany::sca::model;
+
+namespace osoa
+{
+ namespace sca
+ {
+ // ===========
+ // Constructor
+ // ===========
+ ModuleContextImpl::ModuleContextImpl(Module* mod)
+ : module(mod)
+ {
+ }
+
+ // ==========
+ // Destructor
+ // ==========
+ ModuleContextImpl::~ModuleContextImpl()
+ {
+ // --------------------------------------------
+ // Delete the proxies served up by this context
+ // --------------------------------------------
+ for (PROXIES::iterator iter = proxies.begin(); iter != proxies.end(); iter++)
+ {
+ delete (ServiceProxy*)*iter;
+ }
+ }
+
+ // ===========================================================================
+ // locateService: return a proxy connected to a wrapper for the target service
+ // ===========================================================================
+ void* ModuleContextImpl::locateService(const char* serviceName)
+ {
+ LOGENTRY(1, "ModuleContextImpl::locateService");
+
+
+ // ----------------------------
+ // Locate the component service
+ // ----------------------------
+ Service* service = module->findComponentService(serviceName);
+ string msg;
+ if (!service)
+ {
+ msg = "Service not found: ";
+ msg = msg + serviceName;
+ throw ServiceNotFoundException(msg.c_str());
+ }
+
+ // -------------------------
+ // Create the ServiceWrapper
+ // -------------------------
+ ComponentServiceWrapper* serviceWrapper = ComponentServiceWrapper::createServiceWrapper(service);
+
+ // ----------------------------
+ // Get a Proxy for this service
+ // ----------------------------
+ try
+ {
+ ServiceProxy* serviceProxy = new ServiceProxy(service->getComponent(), service->getName(), serviceWrapper);
+ proxies.push_back(serviceProxy);
+ LOGEXIT(1, "ModuleContextImpl::locateService");
+ return serviceProxy->getProxy();
+ }
+ catch (ServiceRuntimeException&)
+ {
+ delete serviceWrapper;
+ throw ;
+ }
+
+ }
+
+
+
+ } // End namespace sca
+} // End namespace osoa
diff --git a/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ModuleContextImpl.h b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ModuleContextImpl.h
new file mode 100644
index 0000000000..5950313a06
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ModuleContextImpl.h
@@ -0,0 +1,71 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef osoa_sca_modulecontextimpl_h
+#define osoa_sca_modulecontextimpl_h
+#include "tuscany/sca/model/Module.h"
+#include "tuscany/sca/core/ServiceProxy.h"
+
+namespace osoa
+{
+ namespace sca
+ {
+ /**
+ * Contains the actual implementation of a ModuleContext interface.
+ */
+ class ModuleContextImpl
+ {
+
+ public:
+ /**
+ * Constructor that takes a Module which represents the runtime
+ * model for this context.
+ */
+ ModuleContextImpl(tuscany::sca::model::Module* module);
+
+ /**
+ * See ModuleContext#locateService.
+ */
+ void* locateService(const char* serviceName);
+
+ /**
+ * Destructor.
+ */
+ virtual ~ModuleContextImpl();
+ private:
+ ModuleContextImpl(const ModuleContextImpl&);
+ ModuleContextImpl& operator=(const ModuleContextImpl&);
+
+ /**
+ * Pointer to the runtime model Module object to which this
+ * context refers.
+ */
+ tuscany::sca::model::Module* module;
+
+ typedef vector<tuscany::sca::ServiceProxy*> PROXIES;
+ /**
+ * Vector of proxies created from calls to the locateService
+ * method.
+ */
+ PROXIES proxies;
+ };
+ } // End namespace sca
+} // End namespace osoa
+
+#endif // osoa_sca_modulecontextimpl_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/osoa/sca/SCA.cpp b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/SCA.cpp
new file mode 100644
index 0000000000..bcca254028
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/SCA.cpp
@@ -0,0 +1,21 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev: $ $Date: $ */
+
+#include "osoa/sca/sca.h"
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ServiceList.cpp b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ServiceList.cpp
new file mode 100644
index 0000000000..ba2b418a7c
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ServiceList.cpp
@@ -0,0 +1,105 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "osoa/sca/ServiceList.h"
+
+#include "osoa/sca/ServiceRuntimeException.h"
+
+namespace osoa
+{
+ namespace sca
+ {
+ // ===========
+ // Constructor
+ // ===========
+ ServiceList::ServiceList(unsigned int numTargets)
+ : maxServices(numTargets), numServices(0)
+ {
+ services = new void*[numTargets];
+ }
+
+ // ==========================================
+ // Copy comstructor: create new service array
+ // ==========================================
+ ServiceList::ServiceList(const ServiceList& sl)
+ : maxServices(sl.maxServices), numServices(sl.numServices)
+ {
+ services = new void*[maxServices];
+ for (unsigned int i=0; i<numServices; i++)
+ {
+ services[i] = sl.services[i];
+ }
+ }
+
+ // ===================================
+ // operator=: create new service array
+ // ===================================
+ ServiceList& ServiceList::operator=(const ServiceList& sl)
+ {
+ if (this != &sl)
+ {
+ maxServices = sl.maxServices;
+ numServices = sl.numServices;
+
+ services = new void*[maxServices];
+ for (unsigned int i=0; i<numServices; i++)
+ {
+ services[i] = sl.services[i];
+ }
+ }
+ return *this;
+ }
+
+ // ==========
+ // Destructor
+ // ==========
+ ServiceList::~ServiceList()
+ {
+ delete [] services;
+ }
+
+ // =================================
+ // operator[]: return service at pos
+ // =================================
+ void* ServiceList::operator[] (unsigned int pos)
+ {
+ if (pos < numServices)
+ {
+ return services[pos];
+ }
+ else
+ {
+ throw ServiceRuntimeException("ServiceList: index out of bounds");
+ }
+ }
+
+ // ====================================
+ // addService: add service to the array
+ // ====================================
+ void ServiceList::addService(void* service)
+ {
+ if (numServices < maxServices)
+ {
+ services[numServices] = service;
+ numServices++;
+ }
+ }
+
+ } // End namespace sca
+} // End namespace osoa
diff --git a/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ServiceList.h b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ServiceList.h
new file mode 100644
index 0000000000..be6f6c9b1a
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ServiceList.h
@@ -0,0 +1,84 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef osoa_sca_servicelist_h
+#define osoa_sca_servicelist_h
+
+#include "osoa/sca/export.h"
+
+namespace osoa
+{
+ namespace sca
+ {
+
+ /**
+ * Holds a list of services that can be accessed from an SCA
+ * component. Each entry can be cast to the business interface
+ * of the target component. All the entries will be of the
+ * same type.
+ */
+ class SCA_API ServiceList
+ {
+
+ public:
+ /**
+ * Return the number of services in the list.
+ * @return Number of services.
+ */
+ unsigned int size() {return numServices;}
+
+ /**
+ * Return the service at this position.
+ */
+ void* operator[] (unsigned int pos);
+
+ ServiceList(const ServiceList& serviceList);
+ ServiceList& operator=(const ServiceList& serviceList);
+ virtual ~ServiceList();
+
+ private:
+ friend class ComponentContextImpl;
+
+ /**
+ * Create a new service list with the known number of
+ * target services. Once created, the service list can only
+ * have services added to it up to the number of targets
+ * specified on this constructor.
+ * @param numTargets Number of target services to be held in this list.
+ */
+ ServiceList(unsigned int numTargets);
+
+ /**
+ * Add a service to this list.
+ */
+ void addService(void* service);
+
+ unsigned int maxServices;
+ unsigned int numServices;
+
+ /**
+ * Pointer to an array of services.
+ */
+ void** services;
+
+ };
+ } // End namespace sca
+} // End namespace osoa
+
+#endif // osoa_sca_servicelist_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ServiceRuntimeException.cpp b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ServiceRuntimeException.cpp
new file mode 100644
index 0000000000..9f275c9c10
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ServiceRuntimeException.cpp
@@ -0,0 +1,208 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "osoa/sca/ServiceRuntimeException.h"
+using namespace std;
+
+namespace osoa
+{
+ namespace sca
+ {
+
+ // ========================================================================
+ // Constructor
+ // ========================================================================
+ ServiceRuntimeException :: ServiceRuntimeException(const char* name,
+ severity_level sev,
+ const char* msg_text)
+ : severity(sev), location_set(0)
+ {
+ class_name = new char[strlen(name) + 1];
+ strcpy(class_name,name);
+ message_text = new char[strlen(msg_text)+1];
+ strcpy(message_text,msg_text);
+
+ } // end ServiceRuntimeException constuctor
+
+ // ========================================================================
+ // Constructor
+ // ========================================================================
+ ServiceRuntimeException :: ServiceRuntimeException(const ServiceRuntimeException& c)
+ :
+ severity(c.getSeverity()), location_set(c.location_set)
+
+ {
+ class_name = new char[strlen(c.getEClassName()) + 1];
+ strcpy(class_name, c.getEClassName());
+ message_text = new char[strlen(c.getMessageText())+1];
+ strcpy(message_text,c.getMessageText());
+ for (int i=0;i<c.location_set;i++)
+ {
+ locations[i].file = new char[strlen(c.locations[i].file) + 1];
+ strcpy(locations[i].file,c.locations[i].file);
+ locations[i].line = c.locations[i].line;
+ locations[i].function = new char[strlen(c.locations[i].function) + 1];
+ strcpy(locations[i].function, c.locations[i].function);
+ }
+ }
+
+ // ========================================================================
+ // Destructor
+ // ========================================================================
+ ServiceRuntimeException :: ~ServiceRuntimeException()
+ {
+ if (class_name) delete class_name;
+ if (message_text) delete message_text;
+ for (int i=0;i<location_set;i++)
+ {
+ if (locations[i].file) delete locations[i].file;
+ if (locations[i].function) delete locations[i].function;
+ }
+
+ } // end ServiceRuntimeException destructor
+
+ // ========================================================================
+ // Return class name of this exception
+ // ========================================================================
+ const char* ServiceRuntimeException :: getEClassName() const
+ {
+ return class_name;
+ } // end getClassName()
+
+ // ========================================================================
+ // Return severity
+ // ========================================================================
+ ServiceRuntimeException::severity_level ServiceRuntimeException :: getSeverity() const
+ {
+ return severity;
+ } // end getSeverity()
+
+ // ========================================================================
+ // Return message text associated with exception
+ // ========================================================================
+ const char* ServiceRuntimeException :: getMessageText() const
+ {
+ return message_text;
+ } // end getMessageText()
+
+ // ========================================================================
+ // Return file name where exception was raised
+ // ========================================================================
+ const char* ServiceRuntimeException :: getFileName() const
+ {
+ return locations[0].file;
+ } // end getFileName()
+
+ // ========================================================================
+ // Return line number where exception was raised
+ // ========================================================================
+ unsigned long ServiceRuntimeException :: getLineNumber() const
+ {
+ return locations[0].line;
+ } // end getLineNumber()
+
+ // ========================================================================
+ // Return function name where exception was raised
+ // ========================================================================
+ const char* ServiceRuntimeException :: getFunctionName() const
+ {
+ return locations[0].function;
+ } // end getFunctionName()
+
+
+ // ========================================================================
+ // set severity of exception
+ // ========================================================================
+ void ServiceRuntimeException :: setSeverity(severity_level sev)
+ {
+ severity = sev;
+ } // end setSeverity(severity_level sev) const
+
+ // ========================================================================
+ // set message text associated with exception
+ // ========================================================================
+ void ServiceRuntimeException :: setMessageText(const char* msg_text)
+ {
+ if (message_text != 0) delete message_text;
+ message_text = new char[strlen(msg_text) + 1];
+ strcpy(message_text,msg_text);
+ } // end setMessageText(const string &msg_text) const
+
+ // ========================================================================
+ // set location of most recent throw/handling of the exception
+ // ========================================================================
+ void ServiceRuntimeException :: setLocation(const char* file,
+ unsigned long line,
+ const char* function)
+ {
+ if (location_set < num_locations)
+ {
+ locations[location_set].file = new char[strlen(file) + 1];
+ strcpy(locations[location_set].file,file);
+ locations[location_set].line = line;
+ locations[location_set].function = new char[strlen(function) + 1];
+ strcpy(locations[location_set].function,function);
+
+ location_set++;
+ }
+ } // end setLocation()
+
+
+ // ========================================================================
+ // print self
+ // ========================================================================
+ ostream& ServiceRuntimeException :: PrintSelf(ostream &os) const
+ {
+
+ os << "Exception object :" << endl;
+ os << " class: " << class_name << endl;
+ os << " description: " << message_text << endl;
+ if (location_set != 0)
+ {
+ os << " file name: " << locations[0].file << endl;
+ char lineNumber[100];
+ sprintf(lineNumber, "%lu",locations[0].line);
+ os << " line number: " << lineNumber << endl;
+ os << " function: " << locations[0].function << endl;
+ os << " location history:" << endl;
+
+ int i=1;
+ while (i < location_set)
+ {
+ os << " " << i << ")" << endl;
+ os << " file: " << locations[i].file << endl;
+ os << " line: " << locations[i].line << endl;
+ os << " function: " << locations[i].function << endl;
+ i++;
+ }
+ }
+ return os;
+ } // end ostream operator <<
+
+ // ========================================================================
+ // ostream operator <<
+ // ========================================================================
+ SCA_API ostream& operator<< (ostream &os, const ServiceRuntimeException &except)
+ {
+ return except.PrintSelf(os);
+ } // end ostream operator <<
+
+
+ } // End namespace sca
+} // End namespace osoa
diff --git a/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ServiceRuntimeException.h b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ServiceRuntimeException.h
new file mode 100644
index 0000000000..7de44f84d7
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/ServiceRuntimeException.h
@@ -0,0 +1,236 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef osoa_sca_serviceruntimeexception_h
+#define osoa_sca_serviceruntimeexception_h
+
+#include "osoa/sca/export.h"
+
+#include <ostream>
+
+namespace osoa
+{
+ namespace sca
+ {
+
+ /**
+ * Top level exception to represent all the exceptions that may be
+ * thrown by an SCA runtime implementation.
+ */
+ class SCA_API ServiceRuntimeException
+ {
+ public:
+ /**
+ * Represents the possible severity levels for an exception.
+ */
+ enum severity_level
+ {
+ Normal,
+ Warning,
+ Error,
+ Severe
+ };
+
+ /**
+ * Constructor.
+ * @param name Class name of the exception.
+ * @param sev Severity level.
+ * @param msg_text Detailed description of the exception.
+ */
+ ServiceRuntimeException(
+ const char *name="ServiceRuntimeException",
+ severity_level sev=Severe,
+ const char* msg_text="");
+
+ ServiceRuntimeException(const ServiceRuntimeException& c);
+
+ // Destructor
+ virtual ~ServiceRuntimeException();
+
+ /**
+ * Return class name of this exception.
+ */
+ const char* getEClassName() const;
+
+ /**
+ * Return severity.
+ */
+ severity_level getSeverity() const;
+
+ /**
+ * Return message text associated with exception.
+ */
+ const char* getMessageText() const;
+
+ /*
+ * Return file name where the exception was raised.
+ */
+ const char* getFileName() const;
+
+ /**
+ * Return line number where the exception was raised.
+ */
+ unsigned long getLineNumber() const;
+
+ /**
+ * Return function name where the exception was raised.
+ */
+ const char* getFunctionName() const;
+
+ /**
+ * Set the exception severity.
+ */
+ void setSeverity(severity_level sev);
+
+ /**
+ * Set the message text associated with exception.
+ */
+ void setMessageText(const char* msg_text);
+
+ /**
+ * Set the location where the exception was raised.
+ * @param file Name of the file.
+ * @param line Line number in the file.
+ * @param function Name of the function.
+ */
+ void setLocation(const char* file,
+ unsigned long line,
+ const char* function="");
+
+ /**
+ * Append exception details to ostream.
+ */
+ virtual std::ostream& PrintSelf(std::ostream &os) const;
+
+ /**
+ * Operator to send exceptions details to a stream.
+ */
+ SCA_API friend std::ostream& operator<< (std::ostream &os, const ServiceRuntimeException &except);
+ protected:
+
+ private:
+ /**
+ * Class name of the exception.
+ */
+ char* class_name;
+
+ /**
+ * Severity level of the exception.
+ */
+ severity_level severity;
+
+ /**
+ * Description of the exception.
+ */
+ char* message_text; // Description of exception
+
+ /**
+ * Location where the exception was thrown or handled and thrown.
+ */
+ class location
+ {
+ public:
+ char* file; // File name (from __FILE__)
+ unsigned long line; // Line number (from __LINE__)
+ char* function; // Function name
+ };
+
+
+ enum {num_locations=5};
+ /**
+ * Array of locations where the exception has been handled and thrown.
+ */
+ location locations[num_locations];
+
+ /**
+ * The current location (index into ServiceRuntimeException#location).
+ */
+ int location_set;
+
+
+ }; // End ServiceRuntimeException class definition
+
+
+ /**
+ * A remotable service is currently unavailable. It is possible that a retry
+ * may resolve this exception.
+ */
+ class SCA_API ServiceUnavailableException: public ServiceRuntimeException
+ {
+ public:
+ ServiceUnavailableException(const char* serviceName)
+ : ServiceRuntimeException("ServiceUnavailableException", Warning,
+ serviceName)
+ {
+ }
+ private:
+ }; // End ServiceUnavailableException class definition
+
+
+ /**
+ * The target of a wire cannot be found, or the reference has not been
+ * configured.
+ */
+ class SCA_API ServiceNotFoundException: public ServiceRuntimeException
+ {
+ public:
+ ServiceNotFoundException(const char* msg)
+ : ServiceRuntimeException("ServiceNotFoundException", Error,
+ msg)
+ {
+ }
+ private:
+ }; // End ServiceNotFoundException class definition
+
+
+ /**
+ * There is no current component (for example, if a non-SCA component
+ * tries to get the current ComponentContext).
+ */
+ class SCA_API ComponentContextException: public ServiceRuntimeException
+ {
+ public:
+ ComponentContextException(const char* msg)
+ : ServiceRuntimeException("ComponentContextException", Error,
+ msg)
+ {
+ }
+ private:
+ }; // End ComponentContextException class definition
+
+ /**
+ * Unable to find the specified entry point in the module.
+ */
+ class SCA_API EntryPointNotFoundException: public ServiceRuntimeException
+ {
+ public:
+ EntryPointNotFoundException(const char* msg)
+ : ServiceRuntimeException("EntryPointNotFoundException", Error,
+ msg)
+ {
+ }
+ private:
+ }; // End EntryPointNotFoundException class definition
+
+
+
+ } // End namespace sca
+} // End namespace osoa
+
+#endif // osoa_sca_serviceruntimeexception_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/osoa/sca/export.h b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/export.h
new file mode 100644
index 0000000000..6ef7960284
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/export.h
@@ -0,0 +1,39 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef osoa_sca_export_h
+#define osoa_sca_export_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+
+#ifdef SCA_EXPORTS
+#define SCA_API __declspec(dllexport)
+#else
+#define SCA_API __declspec(dllimport)
+#endif
+
+#else
+#include <sys/time.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#define SCA_API
+#endif
+
+#endif // osoa_sca_export_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/osoa/sca/sca.h b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/sca.h
new file mode 100644
index 0000000000..528bd91c4a
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/osoa/sca/sca.h
@@ -0,0 +1,29 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef osoa_sca_sca_h
+#define osoa_sca_sca_h
+
+#include "osoa/sca/export.h"
+#include "osoa/sca/ModuleContext.h"
+#include "osoa/sca/ComponentContext.h"
+#include "osoa/sca/ServiceList.h"
+#include "osoa/sca/ServiceRuntimeException.h"
+
+#endif // osoa_sca_sca_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.cpp
new file mode 100644
index 0000000000..65d218dc86
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.cpp
@@ -0,0 +1,204 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+#include "tuscany/sca/util/Exceptions.h"
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/core/SCARuntime.h"
+#include "tuscany/sca/model/CPPImplementation.h"
+using namespace osoa::sca;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ // ===================
+ // Static data members
+ // ===================
+ void* ComponentServiceWrapper::staticImpl = 0;
+
+ // ===========
+ // Constructor
+ // ===========
+ ComponentServiceWrapper::ComponentServiceWrapper(Service* target)
+ : ServiceWrapper(target), service(target)
+ {
+ LOGENTRY(1,"ComponentServiceWrapper::constructor");
+ if (target->getServiceType() != WireTarget::ComponentServiceType)
+ {
+ throw ServiceRuntimeException("ComponentServiceWrapper: target is not a component service");
+ }
+
+ component = target->getComponent();
+ interf = (CPPInterface*)target->getInterface();
+
+ remotable = interf->getRemotable();
+
+
+ LOGEXIT(1,"ComponentServiceWrapper::constructor");
+
+ }
+
+ // ==========
+ // Destructor
+ // ==========
+ ComponentServiceWrapper::~ComponentServiceWrapper()
+ {
+ LOGENTRY(1,"ComponentServiceWrapper::destructor");
+ LOGEXIT(1,"ComponentServiceWrapper::destructor");
+ }
+
+
+ // ======================================================================
+ // getImplementation: get an implementation for this scope
+ // ======================================================================
+ void* ComponentServiceWrapper::getImplementation()
+ {
+ CPPInterface::SCOPE scope = interf->getScope();
+ if (scope == CPPInterface::MODULE)
+ {
+ if (!staticImpl)
+ {
+ staticImpl = newImplementation();
+ }
+ return staticImpl;
+ }
+ else // (scope == CPPInterface::STATELESS)
+ {
+ return newImplementation();
+ }
+ }
+
+ // ======================================================================
+ // releaseImplementation: release the implementation for this scope
+ // ======================================================================
+ void ComponentServiceWrapper::releaseImplementation()
+ {
+ CPPInterface::SCOPE scope = interf->getScope();
+ if (scope == CPPInterface::STATELESS)
+ {
+ deleteImplementation();
+ }
+ }
+
+ // ======================================================================
+ // invoke: wrapper call to service with setting the component context
+ // ======================================================================
+ void ComponentServiceWrapper::invoke(Operation& operation)
+ {
+ LOGENTRY(1,"ComponentServiceWrapper::invoke");
+
+ SCARuntime* runtime = SCARuntime::getInstance();
+ runtime->setCurrentComponent(component);
+
+ try
+ {
+ invokeService(operation);
+ }
+ catch (...)
+ {
+ runtime->unsetCurrentComponent();
+ throw;
+ }
+ runtime->unsetCurrentComponent();
+ LOGEXIT(1,"ComponentServiceWrapper::invoke");
+
+ }
+
+ void ComponentServiceWrapper::setLibrary(Library* lib)
+ {
+ wrapperLibrary = lib;
+ }
+
+ // ======================================================================
+ // createServiceWrapper: create a wrapper for the target ComponentService
+ // ======================================================================
+ ComponentServiceWrapper* ComponentServiceWrapper::createServiceWrapper(Service* service)
+ {
+ string msg;
+ ComponentServiceWrapper* serviceWrapper = 0;
+
+ // -----------------------------------------------
+ // Get the implementation for the target component
+ // -----------------------------------------------
+ Component* targetComponent = service->getComponent();
+ Implementation* impl = targetComponent->getImplementation();
+ if (!impl)
+ {
+ msg = "Component " + targetComponent->getName() + " has no implementation defined";
+ throw ServiceNotFoundException(msg.c_str());
+ }
+
+ // TODO: This only handle CPP implementation for now
+ if (impl->getImplementationType() == Implementation::CPP)
+ {
+ // ----------------------------------------------------
+ // Get implementation dll name and wrapper factory name
+ // ----------------------------------------------------
+ string dllName = ((CPPImplementation*)impl)->getDll();
+ string wrapperFactoryName = ((CPPImplementation*)impl)->getHeaderStub()
+ + "_" + service->getName() + "_Wrapper_Factory";
+
+ // ------------
+ // Load the dll
+ // ------------
+ string fullDllName = targetComponent->getModule()->getRoot() + "/" + dllName;
+ typedef ComponentServiceWrapper* (* WRAPPERFACTORY) (Service*);
+ Library* wrapperLib = new Library(fullDllName);
+
+ // -------------------------
+ // Locate the factory method
+ // -------------------------
+ WRAPPERFACTORY wrapperFactory = (WRAPPERFACTORY)wrapperLib->getSymbol(wrapperFactoryName);
+ if (!wrapperFactory)
+ {
+ LOGERROR_2(1, "ComponentServiceWrapper::createServiceWrapper: Unable to locate %s in library %s",
+ wrapperFactoryName.c_str(), fullDllName.c_str());
+ msg = "Unable to locate " + wrapperFactoryName + " in library " + fullDllName;
+ throw ServiceNotFoundException(msg.c_str());
+ }
+
+ // -------------------------------------
+ // Now create an instance of the wrapper
+ // -------------------------------------
+ serviceWrapper = wrapperFactory(service);
+ if (!serviceWrapper)
+ {
+ LOGERROR_2(1, "ComponentServiceWrapper::createServiceWrapper: Factory method %s in library %s returned null",
+ wrapperFactoryName.c_str(), fullDllName.c_str());
+ msg = "Factory method " + wrapperFactoryName + " in library " + fullDllName + " returned null";
+ throw ServiceNotFoundException(msg.c_str());
+ }
+ serviceWrapper->setLibrary(wrapperLib);
+ }
+ else
+ {
+ // ----------------------
+ // Non CPP Implementation
+ // ----------------------
+ msg = "Unsupported implementation type for service: " + service->getName();
+ throw ServiceNotFoundException(msg.c_str());
+ }
+
+ return serviceWrapper;
+ }
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.h
new file mode 100644
index 0000000000..3a5e990bf0
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ComponentServiceWrapper.h
@@ -0,0 +1,156 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_core_componentservicewrapper_h
+#define tuscany_sca_core_componentservicewrapper_h
+
+#include "osoa/sca/export.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+#include "tuscany/sca/model/Component.h"
+#include "tuscany/sca/core/Operation.h"
+#include "tuscany/sca/model/CPPInterface.h"
+#include "tuscany/sca/util/Library.h"
+
+using namespace tuscany::sca::model;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ /**
+ * Wraps the service on a component implementation.
+ * This abstract class is extended by generated code which provides
+ * the implementation of some of the methods.
+ * An instance of this class wraps the actual component implementation which
+ * has been written by a developer of an SCA application.
+ */
+ class ComponentServiceWrapper : public ServiceWrapper
+ {
+ public:
+ /**
+ * Factory method to create a new ComponentServiceWrapper for a given target
+ * service. This method will provide all the loading of dlls required to
+ * create the target component.
+ * @param target The service on the component for which this wrapper is to be
+ * created.
+ * @return A wrapper that references the given target.
+ */
+ static SCA_API ComponentServiceWrapper* createServiceWrapper(Service* target);
+
+ /**
+ * Constructor.
+ * @param target The component service to which this wrapper refers.
+ */
+ SCA_API ComponentServiceWrapper(Service* target);
+
+ /**
+ * Destructor.
+ */
+ SCA_API virtual ~ComponentServiceWrapper();
+
+ /**
+ * All business method calls to the target component go through the invoke method.
+ * @param operation The details of the method, paramaters and return value for the
+ * business method to be called on the target component.
+ */
+ SCA_API virtual void invoke(Operation& operation);
+
+ /**
+ * Return the loaded shared library for the target component.
+ */
+ Library* getLibrary() {return wrapperLibrary;}
+ protected:
+ /**
+ * Delegated method to invoke the correct method on the target component.
+ * Implemented by the subtype.
+ */
+ SCA_API virtual void invokeService(Operation& operation) = 0;
+
+ /**
+ * Delegated method to create a new component implementation.
+ * Implemented by the subtype.
+ * @return A pointer to an instance of the component implementation class.
+ */
+ SCA_API virtual void* newImplementation() = 0;
+
+ /**
+ * Delegated method to delete the current instance of the component
+ * implementation.
+ * Implemented by the subtype.
+ */
+ SCA_API virtual void deleteImplementation() = 0;
+
+ /**
+ * Return the current instance of the component implementation.
+ * @return A pointer to an instance of the component implementation class.
+ */
+ SCA_API virtual void* getImplementation();
+
+ /**
+ * Indicates that the current instance of the component implementation
+ * has been finished with.
+ * Will call ComponentServiceWrapper#deleteImplementation if the
+ * implementation is stateless (so that a new instance is returned
+ * for each call).
+ */
+ SCA_API virtual void releaseImplementation();
+
+ private:
+ /**
+ * Holds an implementation instance if the scope is set to module.
+ */
+ static void* staticImpl;
+
+ /**
+ * The component to which this wrapper refers.
+ */
+ Component* component;
+
+ /**
+ * The service on the component to which this wrapper refers.
+ */
+ Service* service;
+
+ /**
+ * A pointer to the interface which the service exposes.
+ */
+ CPPInterface* interf;
+
+ /**
+ * Set to true if the service is remotable.
+ */
+ bool remotable;
+
+ /**
+ * Pointer to the loaded library which contains the component
+ * implementation.
+ */
+ Library* wrapperLibrary;
+
+ /**
+ * Set the loaded library which contains the component
+ * implementation.
+ * @param lib The library.
+ */
+ void setLibrary(Library* lib);
+ };
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_core_componentservicewrapper_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.cpp
new file mode 100644
index 0000000000..2838bbe4d4
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.cpp
@@ -0,0 +1,102 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/core/ExternalServiceWrapper.h"
+#include <stdarg.h>
+
+#include "tuscany/sca/util/Exceptions.h"
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/core/SCARuntime.h"
+
+#include "tuscany/sca/ws/WSServiceWrapper.h"
+using tuscany::sca::ws::WSServiceWrapper;
+
+using namespace osoa::sca;
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ //////////////////////////////////////////////////////////////////////
+ // Construction/Destruction
+ //////////////////////////////////////////////////////////////////////
+
+ ExternalServiceWrapper::ExternalServiceWrapper(tuscany::sca::model::WireTarget* target)
+ : ServiceWrapper(target)
+ {
+ LOGENTRY(1,"ExternalServiceWrapper::constructor");
+ if (target->getServiceType() != WireTarget::ExternalServiceType)
+ {
+ throw ServiceRuntimeException("ExternalServiceWrapper: target is not an ExternalService");
+ }
+
+ LOGEXIT(1,"ExternalServiceWrapper::constructor");
+
+ }
+
+ ExternalServiceWrapper::~ExternalServiceWrapper()
+ {
+ LOGENTRY(1,"ExternalServiceWrapper::destructor");
+ LOGEXIT(1,"ExternalServiceWrapper::destructor");
+ }
+
+ // ======================================================================
+ // createServiceWrapper: create a wrapper for the target ExternalService
+ // ======================================================================
+ ExternalServiceWrapper* ExternalServiceWrapper::createServiceWrapper(ExternalService* service)
+ {
+ string msg;
+ ExternalServiceWrapper* serviceWrapper = 0;
+
+ // -----------------------------------------------
+ // Get the binding for the target component
+ // -----------------------------------------------
+ Binding* targetBinding = service->getBinding();
+ if (!targetBinding)
+ {
+ msg = "External service " + service->getName() + " has no binding defined";
+ throw ServiceNotFoundException(msg.c_str());
+ }
+
+ // TODO: This only handles ws implementation for now
+ if (targetBinding->getBindingType() == Binding::WS)
+ {
+ // -------------------------------------
+ // Create an instance of the wrapper
+ // -------------------------------------
+ serviceWrapper = new WSServiceWrapper(service);
+
+ }
+ else
+ {
+ // ----------------------
+ // Non WS Binding
+ // ----------------------
+ msg = "Unsupported binding type for externalService: " + service->getName();
+ throw ServiceNotFoundException(msg.c_str());
+ }
+
+ return serviceWrapper;
+ }
+
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.h
new file mode 100644
index 0000000000..b2dcfb3a6b
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ExternalServiceWrapper.h
@@ -0,0 +1,81 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_core_externalservicewrapper_h
+#define tuscany_sca_core_externalservicewrapper_h
+
+#include "osoa/sca/export.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+#include "tuscany/sca/core/Operation.h"
+#include "tuscany/sca/model/ExternalService.h"
+using tuscany::sca::model::ExternalService;
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ /**
+ * Wraps an SCA external service so that it can be called by a
+ * proxy.
+ * This abstract class will be extended by a class which supports
+ * a specific external service binding (for example, the web services binding).
+ */
+ class SCA_API ExternalServiceWrapper : public ServiceWrapper
+ {
+ public:
+ /**
+ * Factory method to create a new ExternaServiceWrapper for a given
+ * external service described in the SCA module.
+ */
+ static ExternalServiceWrapper* createServiceWrapper(ExternalService* service);
+
+ /**
+ * Constructor.
+ * @param target The target external service for which this wrapper is to be
+ * created.
+ * @return A wrapper that references the given target.
+ */
+ ExternalServiceWrapper(tuscany::sca::model::WireTarget* target);
+
+ /**
+ * Destructor.
+ */
+ virtual ~ExternalServiceWrapper();
+
+ /**
+ * Return the external service (in the runtime model) that is wrapped by
+ * the instance of this class.
+ */
+ virtual ExternalService* getExternalService() {return (ExternalService*)getTarget();};
+
+ /**
+ * All business method calls to the external service go through the invoke method.
+ * This is a delegated method which will be implemented by the subclass.
+ * @param operation The details of the method, paramaters and return value for the
+ * business method to be called on the external service.
+ */
+ virtual void invoke(Operation& operation) = 0;
+ private:
+
+ };
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_core_externalservicewrapper_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/Operation.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/Operation.cpp
new file mode 100644
index 0000000000..981f4e6d9e
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/Operation.cpp
@@ -0,0 +1,266 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/core/Operation.h"
+#include <stdarg.h>
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/core/SCARuntime.h"
+
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+ // ===========
+ // Constructor
+ // ===========
+ Operation::Operation(const char* operationName)
+ {
+ LOGENTRY(1,"Operation::constructor");
+
+ if (operationName != 0)
+ {
+ name = operationName;
+ }
+
+ LOGEXIT(1,"Operation::constructor");
+ }
+
+ // ==========
+ // Destructor
+ // ==========
+ Operation::~Operation()
+ {
+ LOGENTRY(1,"Operation::destructor");
+ LOGEXIT(1,"Operation::destructor");
+ }
+
+
+ // ==============================================
+ // getParameter: return parameter at position pos
+ // ==============================================
+ void* Operation::getParameterValue(unsigned int pos)
+ {
+ if (pos < parameters.size())
+ {
+ return parameters[pos].getValue();
+ }
+
+ return 0;
+ }
+
+ // ==============================================
+ // getParameter: return of parameter
+ // ==============================================
+ Operation::Parameter& Operation::getParameter(unsigned int pos)
+ {
+ if (pos < parameters.size())
+ {
+ return parameters[pos];
+ }
+
+ throw "index out of range";
+ }
+
+
+ // ==============================================
+ // getParameterType: return type of parameter
+ // ==============================================
+ Operation::ParameterType Operation::getParameterType(unsigned int pos)
+ {
+ if (pos < parameters.size())
+ {
+ return parameters[pos].getType();
+ }
+
+ return VOID_TYPE;
+ }
+
+ // ===========================================
+ // addParameter: set parameter at position pos
+ // ===========================================
+ void Operation::addParameter(const void *parm)
+ {
+ LOGINFO(4, "Operation::addParameter(void*)");
+ parameters.insert(parameters.end(), Parameter((void*)parm, VOID_TYPE));
+ }
+
+ void Operation::addParameter(const bool *parm)
+ {
+ LOGINFO(4, "Operation::addParameter(bool)");
+ parameters.insert(parameters.end(), Parameter((void*)parm, BOOL));
+ }
+
+ void Operation::addParameter(const short *parm)
+ {
+ LOGINFO(4, "Operation::addParameter(short)");
+ parameters.insert(parameters.end(), Parameter((void*)parm, SHORT));
+ }
+
+ void Operation::addParameter(const long *parm)
+ {
+ LOGINFO(4, "Operation::addParameter(long)");
+ parameters.insert(parameters.end(), Parameter((void*)parm, LONG));
+ }
+
+ void Operation::addParameter(const unsigned short *parm)
+ {
+ LOGINFO(4, "Operation::addParameter(unsigned short)");
+ parameters.insert(parameters.end(), Parameter((void*)parm, USHORT));
+ }
+
+ void Operation::addParameter(const unsigned long *parm)
+ {
+ LOGINFO(4, "Operation::addParameter(unsigned long)");
+ parameters.insert(parameters.end(), Parameter((void*)parm, ULONG));
+ }
+
+ void Operation::addParameter(const float *parm)
+ {
+ LOGINFO(4, "Operation::addParameter(float)");
+ parameters.insert(parameters.end(), Parameter((void*)parm, FLOAT));
+ }
+
+ void Operation::addParameter(const double *parm)
+ {
+ LOGINFO(4, "Operation::addParameter(double)");
+ parameters.insert(parameters.end(), Parameter((void*)parm, DOUBLE));
+ }
+
+ void Operation::addParameter(const long double *parm)
+ {
+ LOGINFO(4, "Operation::addParameter(long double)");
+ parameters.insert(parameters.end(), Parameter((void*)parm, LONGDOUBLE));
+ }
+
+ void Operation::addParameter(const char* *parm)
+ {
+ LOGINFO(4, "Operation::addParameter(char*)");
+ parameters.insert(parameters.end(), Parameter((void*)parm, CHARS));
+ }
+
+ void Operation::addParameter(const char *parm)
+ {
+ LOGINFO(4, "Operation::addParameter(char)");
+ parameters.insert(parameters.end(), Parameter((void*)parm, CHAR));
+ }
+
+ void Operation::addParameter(const string *parm)
+ {
+ LOGINFO(4, "Operation::addParameter(string)");
+ parameters.insert(parameters.end(), Parameter((void*)parm, STRING));
+ }
+
+ void Operation::addParameter(const DataObjectPtr *parm)
+ {
+ LOGINFO(4, "Operation::addParameter(DataObjectPtr)");
+ parameters.insert(parameters.end(), Parameter((void*)parm, DATAOBJECT));
+ }
+
+ Operation::Parameter::Parameter(void* val, Operation::ParameterType typ)
+ : value(val), type(typ)
+ {
+ }
+
+ // ===========================================
+ // setReturnValue
+ // ===========================================
+ void Operation::setReturnValue(const void *parm)
+ {
+ LOGINFO(4, "Operation::setReturnValue(void*)");
+ returnValue = Parameter((void*)parm, VOID_TYPE);
+ }
+
+ void Operation::setReturnValue(const bool *parm)
+ {
+ LOGINFO(4, "Operation::setReturnValue(bool*)");
+ returnValue = Parameter((void*)parm, BOOL);
+ }
+
+ void Operation::setReturnValue(const short *parm)
+ {
+ LOGINFO(4, "Operation::setReturnValue(short*)");
+ returnValue = Parameter((void*)parm, SHORT);
+ }
+
+ void Operation::setReturnValue(const long *parm)
+ {
+ LOGINFO(4, "Operation::setReturnValue(long*)");
+ returnValue = Parameter((void*)parm, LONG);
+ }
+
+ void Operation::setReturnValue(const unsigned short *parm)
+ {
+ LOGINFO(4, "Operation::setReturnValue(unsigned short*)");
+ returnValue = Parameter((void*)parm, USHORT);
+ }
+
+ void Operation::setReturnValue(const unsigned long *parm)
+ {
+ LOGINFO(4, "Operation::setReturnValue(unsigned long*)");
+ returnValue = Parameter((void*)parm, ULONG);
+ }
+
+ void Operation::setReturnValue(const float *parm)
+ {
+ LOGINFO(4, "Operation::setReturnValue(float*)");
+ returnValue = Parameter((void*)parm, FLOAT);
+ }
+
+ void Operation::setReturnValue(const double *parm)
+ {
+ LOGINFO(4, "Operation::setReturnValue(double*)");
+ returnValue = Parameter((void*)parm, DOUBLE);
+ }
+
+ void Operation::setReturnValue(const long double *parm)
+ {
+ LOGINFO(4, "Operation::setReturnValue(long double*)");
+ returnValue = Parameter((void*)parm, LONGDOUBLE);
+ }
+
+ void Operation::setReturnValue(const char *parm)
+ {
+ LOGINFO(4, "Operation::setReturnValue(char)");
+ returnValue = Parameter((void*)parm, CHAR);
+ }
+
+ void Operation::setReturnValue(const char* *parm)
+ {
+ LOGINFO(4, "Operation::setReturnValue(char*)");
+ returnValue = Parameter((void*)parm, CHARS);
+ }
+
+ void Operation::setReturnValue(const string *parm)
+ {
+ LOGINFO(4, "Operation::setReturnValue(string*)");
+ returnValue = Parameter((void*)parm, STRING);
+ }
+
+ void Operation::setReturnValue(const DataObjectPtr *parm)
+ {
+ LOGINFO(4, "Operation::setReturnValue(DataObjectPtr*)");
+ returnValue = Parameter((void*)parm, DATAOBJECT);
+ }
+
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/Operation.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/Operation.h
new file mode 100644
index 0000000000..e562dca3c1
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/Operation.h
@@ -0,0 +1,177 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_core_operation_h
+#define tuscany_sca_core_operation_h
+#include "osoa/sca/export.h"
+#include "commonj/sdo/SDO.h"
+using commonj::sdo::DataObjectPtr;
+#include <string>
+using std::string;
+#include <vector>
+using std::vector;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ /**
+ * Holds the details of a single invocation of a business method.
+ * This class is used to pass the parameters and operation name from the
+ * client to a service. It will also hold the return value on the
+ * return from the business method.
+ */
+ class Operation
+ {
+ public:
+ /**
+ * Create a new operation.
+ * @param operationName The method name of the business method to be invoked.
+ * @param numParameters The number of parameters to be passed.
+ */
+ SCA_API Operation(const char* operationName = 0);
+
+ /**
+ * Destructor.
+ */
+ SCA_API virtual ~Operation();
+
+ /**
+ * Return the operation name.
+ * @return The name of the operation.
+ */
+ SCA_API const string& getName() {return name;}
+
+
+ enum ParameterType
+ {
+ UNSET = 0,
+ VOID_TYPE,
+ BOOL,
+ SHORT,
+ LONG,
+ USHORT,
+ ULONG,
+ FLOAT,
+ DOUBLE,
+ LONGDOUBLE,
+ CHARS,
+ CHAR,
+ STRING,
+ DATAOBJECT
+ };
+
+ class Parameter
+ {
+ public:
+ SCA_API Parameter(void* value = NULL, ParameterType type = VOID_TYPE);
+ SCA_API void* getValue() {return value;}
+ SCA_API ParameterType getType() {return type;}
+
+ private:
+ void* value;
+ ParameterType type;
+ };
+
+ /**
+ * Set a return value for the operation.
+ * @param retVal Pointer to the return value.
+ */
+ SCA_API void setReturnValue(const void *retVal);
+ SCA_API void setReturnValue(const bool *retVal);
+ SCA_API void setReturnValue(const short *retVal);
+ SCA_API void setReturnValue(const long *retVal);
+ SCA_API void setReturnValue(const unsigned short *retVal);
+ SCA_API void setReturnValue(const unsigned long *retVal);
+ SCA_API void setReturnValue(const float *retVal);
+ SCA_API void setReturnValue(const double *retVal);
+ SCA_API void setReturnValue(const long double *retVal);
+ SCA_API void setReturnValue(const char *retVal);
+ SCA_API void setReturnValue(const char* *retVal);
+ SCA_API void setReturnValue(const string *retVal);
+ SCA_API void setReturnValue(const DataObjectPtr *retVal);
+
+ /**
+ * Set a parameter on the operation.
+ * @param pos The position of the parameter in the parameter list.
+ * @param parm Pointer to the parameter to be passed.
+ */
+ SCA_API void addParameter(const void *parm);
+ SCA_API void addParameter(const bool *parm);
+ SCA_API void addParameter(const short *parm);
+ SCA_API void addParameter(const long *parm);
+ SCA_API void addParameter(const unsigned short *parm);
+ SCA_API void addParameter(const unsigned long *parm);
+ SCA_API void addParameter(const float *parm);
+ SCA_API void addParameter(const double *parm);
+ SCA_API void addParameter(const long double *parm);
+ SCA_API void addParameter(const char *parm);
+ SCA_API void addParameter(const char* *parm);
+ SCA_API void addParameter(const string *parm);
+ SCA_API void addParameter(const DataObjectPtr *parm);
+
+ SCA_API unsigned int getNParms() {return parameters.size();}
+
+ /**
+ * Get a parameter from the operation.
+ * @param pos The position of the parameter in the parameter list.
+ * @return Pointer to the paramter at the given postion. Should be
+ * cast to the appropriate type.
+ */
+ SCA_API Parameter& getParameter(unsigned int pos);
+
+ /**
+ * Get a parameter type from the operation.
+ * @param pos The position of the parameter in the parameter list.
+ * @return Pointer to the paramter at the given postion. Should be
+ * cast to the appropriate type.
+ */
+ SCA_API ParameterType getParameterType(unsigned int pos);
+
+ /**
+ * Get a parameter from the operation.
+ * @param pos The position of the parameter in the parameter list.
+ * @return Pointer to the paramter at the given postion. Should be
+ * cast to the appropriate type.
+ */
+ SCA_API void* getParameterValue(unsigned int pos);
+
+ SCA_API ParameterType getReturnType() {return returnValue.getType();}
+ SCA_API void* getReturnValue() {return returnValue.getValue();}
+
+ private:
+ /**
+ * Operation name (method name).
+ */
+ string name;
+
+ /**
+ * Array of parameters.
+ */
+ typedef std::vector<Parameter> PARAMETER_VECTOR;
+
+ PARAMETER_VECTOR parameters;
+
+ Parameter returnValue;
+
+ };
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_core_operation_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/SCAEntryPoint.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/SCAEntryPoint.cpp
new file mode 100644
index 0000000000..63a7d52e7a
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/SCAEntryPoint.cpp
@@ -0,0 +1,210 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/core/SCAEntryPoint.h"
+
+#include "tuscany/sca/util/Exceptions.h"
+#include "tuscany/sca/util/Utils.h"
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/core/SCARuntime.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+#include "tuscany/sca/core/ExternalServiceWrapper.h"
+using namespace osoa::sca;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ // ===========
+ // Constructor
+ // ===========
+ SCAEntryPoint::SCAEntryPoint(const char* epName)
+ : subsystem(0), entrypoint(0), module(0)
+ {
+ LOGENTRY(1,"SCAEntryPoint::constructor");
+ string message;
+
+ // initialize the system if necessary
+ System* system = SCARuntime::getInstance()->getSystem();
+
+ string subsystemName;
+ string entrypointName;
+
+ Utils::tokeniseUri(epName, subsystemName, entrypointName);
+
+ // --------------------
+ // locate the Subsystem
+ // --------------------
+ subsystem = system->findSubsystem(subsystemName);
+ if (!subsystem)
+ {
+ throw EntryPointNotFoundException(epName);
+ }
+
+ // ---------------------
+ // locate the EntryPoint
+ // ---------------------
+ entrypoint = subsystem->findEntryPoint(entrypointName);
+ if (entrypoint)
+ {
+ // found Subsystem EntryPoint
+ throw EntryPointNotFoundException("Subsystem EntryPoint not yet supported");
+ }
+ else
+ {
+ // -----------------------------------
+ // locate the EntryPoint in the Module
+ // -----------------------------------
+ string moduleComponentName;
+ Utils::tokeniseUri(entrypointName, moduleComponentName, entrypointName);
+ module = subsystem->findModuleByComponentName(moduleComponentName);
+ if (module)
+ {
+ dataFactory = module->getDataFactory();
+ entrypoint = module->findEntryPoint(entrypointName);
+ }
+ }
+
+ if (!entrypoint)
+ {
+ throw EntryPointNotFoundException(epName);
+ }
+
+ // ---------------------------------
+ // Get Wrappers for each wire target
+ // ---------------------------------
+
+ // Get the target services from the EntryPoint
+ const EntryPoint::TARGETS& targets = entrypoint->getTargets();
+
+ // --------------------
+ // Validate the request
+ // --------------------
+ switch (entrypoint->getMultiplicity())
+ {
+ case EntryPoint::ONE_MANY:
+ case EntryPoint::ONE_ONE:
+ {
+ if (targets.size() == 0)
+ {
+ message = "EntryPoint " + entrypoint->getName() + " not wired";
+ throw ServiceNotFoundException(message.c_str());
+ }
+ }
+ default:
+ {
+ }
+ } // end switch
+
+ for (EntryPoint::TARGETS::const_iterator iter = targets.begin();
+ iter!=targets.end();
+ iter++)
+ {
+ ServiceWrapper* service = getServiceWrapper(*iter);
+ if (service)
+ {
+ services.push_back(service);
+ }
+ }
+
+ LOGEXIT(1,"SCAEntryPoint::constructor");
+ }
+
+ // ==========
+ // Destructor
+ // ==========
+ SCAEntryPoint::~SCAEntryPoint()
+ {
+ LOGENTRY(1,"SCAEntryPoint::destructor");
+
+ // Delete any ServiceWrappers
+ for (SERVICES::iterator iter = services.begin(); iter < services.end(); iter++)
+ {
+ delete (*iter);
+ }
+ LOGEXIT(1,"SCAEntryPoint::destructor");
+ }
+
+
+ // ======================================================================
+ // invoke:
+ // ======================================================================
+ SCA_API void SCAEntryPoint::invoke(Operation& operation)
+ {
+ LOGENTRY(1,"SCAEntryPoint::invoke");
+ string message;
+
+ // --------------------
+ // Validate the request
+ // --------------------
+ if (services.size() == 0)
+ {
+ message = "EntryPoint " + entrypoint->getName() + " not wired";
+ throw ServiceNotFoundException(message.c_str());
+ }
+
+ // -------------------
+ // Invoke each target
+ // -------------------
+ for (SERVICES::iterator iter = services.begin(); iter < services.end(); iter++)
+ {
+ (*iter)->invoke(operation);
+ }
+ LOGEXIT(1,"SCAEntryPoint::invoke");
+ }
+
+
+ // ======================================================================
+ // getServiceWrapper: Create and return an instance of the ServiceWrapper
+ // ======================================================================
+ ServiceWrapper* SCAEntryPoint::getServiceWrapper(WireTarget* target)
+ {
+ // -------------------------
+ // Determine type of Service
+ // -------------------------
+ switch (target->getServiceType())
+ {
+ case WireTarget::ExternalServiceType:
+ {
+ // ----------------
+ // External Service
+ // ----------------
+ return ExternalServiceWrapper::createServiceWrapper((ExternalService*)target);
+ }
+
+ case WireTarget::ComponentServiceType:
+ {
+ // -----------------
+ // Component Service
+ // -----------------
+ return ComponentServiceWrapper::createServiceWrapper((Service*)target);
+ }
+
+ default:
+ {
+ string message = "Undefined wire target type for : ";
+ message = message + target->getName();
+ throw ServiceNotFoundException(message.c_str());
+ }
+ } // end switch
+ }
+
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/SCAEntryPoint.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/SCAEntryPoint.h
new file mode 100644
index 0000000000..6c1df3e28e
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/SCAEntryPoint.h
@@ -0,0 +1,122 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_core_scaentrypoint_h
+#define tuscany_sca_core_scaentrypoint_h
+
+#include "osoa/sca/export.h"
+
+#include <vector>
+using std::vector;
+#include "tuscany/sca/core/ServiceWrapper.h"
+#include "tuscany/sca/model/WireTarget.h"
+#include "tuscany/sca/model/Subsystem.h"
+#include "tuscany/sca/model/EntryPoint.h"
+#include "tuscany/sca/model/Module.h"
+using namespace tuscany::sca::model;
+#include "commonj/sdo/SDO.h"
+using commonj::sdo::DataObjectPtr;
+using commonj::sdo::DataFactoryPtr;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ /**
+ * A runtime class which is used by external bindings to provide the entry
+ * point into the SCA runtime. An entry point will be defined in an SCA
+ * module, and a binding class will be provided to service the
+ * communication between the external binding (e.g. for web services the
+ * SOAP/HTTP communication) and the SCA runtime. The binding class will
+ * use SCAEntryPoint to call into the SCA runtime.
+ */
+ class SCAEntryPoint
+ {
+ public:
+ /**
+ * Constructor to create a new instance which will be associated with
+ * a given entry point in an SCA module.
+ * @param entryPointName The qualified name of the entry point in an
+ * SCA module. It is of the form
+ * "subsystem name"/"module component name"/"entry point name".
+ */
+ SCA_API SCAEntryPoint(const char* entryPointName);
+
+ /**
+ * Destructor.
+ */
+ SCA_API virtual ~SCAEntryPoint();
+
+ /**
+ * Invokes an operation on the component to which the SCA entry point
+ * is wired in the SCA module.
+ * @param operation. The operation request
+ */
+ SCA_API virtual void invoke(Operation& operation);
+
+ /**
+ * Returns a SDO data factory from which all the types associated with the entry point
+ * and module can be created.
+ */
+ SCA_API DataFactoryPtr getDataFactory() {return dataFactory;}
+
+ protected:
+
+ private:
+ /**
+ * The subsystem in which this entry point is found.
+ */
+ Subsystem* subsystem;
+
+ /**
+ * The entry point in the module.
+ */
+ EntryPoint* entrypoint;
+
+ /**
+ * The module component in the subsystem.
+ */
+ Module* module;
+
+ /**
+ * Cached data factory which has all the types defined for the module in which
+ * this entry point is found.
+ */
+ DataFactoryPtr dataFactory;
+
+ typedef vector<ServiceWrapper*> SERVICES;
+ /**
+ * Vector of all the service wrappers created for this entry point.
+ * Used to destroy the wrappers when this class is destroyed.
+ */
+ SERVICES services;
+
+ /**
+ * Creates and returns the service wrapper for a given target.
+ * @param target The target of the wire for which a service wrapper is
+ * to be created.
+ * @return A service wrapper to be used for invoking the target implementation.
+ */
+ ServiceWrapper* getServiceWrapper(WireTarget* target);
+
+ };
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_core_scaentrypoint_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp
new file mode 100644
index 0000000000..9da3e547e9
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/SCARuntime.cpp
@@ -0,0 +1,355 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/core/SCARuntime.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Utils.h"
+#include "tuscany/sca/util/Exceptions.h"
+
+#include "tuscany/sca/model/System.h"
+#include "tuscany/sca/model/Subsystem.h"
+#include "tuscany/sca/model/ModelLoader.h"
+
+#if defined(WIN32) || defined (_WINDOWS)
+#include <windows.h>
+#endif
+
+namespace tuscany
+{
+ namespace sca
+ {
+ /**
+ * Environment variable names
+ */
+ static const char* TUSCANY_SCACPP = "TUSCANY_SCACPP";
+ static const char* TUSCANY_SCACPP_SYSTEM_ROOT = "TUSCANY_SCACPP_SYSTEM_ROOT";
+ static const char* TUSCANY_SCACPP_DEFAULT_MODULE = "TUSCANY_SCACPP_DEFAULT_MODULE";
+
+
+ // ==========================================================
+ // Initialize static class member to not pointing at anything
+ // ==========================================================
+ SCARuntime* SCARuntime::instance = 0;
+ string SCARuntime::systemRoot = "";
+ string SCARuntime::defaultModuleName = "";
+
+
+ // ==========================================================
+ // Set the system configuration root
+ // ==========================================================
+ void SCARuntime::setSystemRoot(const string& root)
+ {
+ LOGENTRY(1, "SCARuntime::");
+ systemRoot = root;
+ LOGINFO_1(3, "SCARuntime::setSystemRoot - set to %s", root.c_str());
+ LOGEXIT(1, "SCARuntime::setSystemRoot");
+ }
+
+ // ==========================================================
+ // Set the default ModuleComponent name
+ // ==========================================================
+ void SCARuntime::setDefaultModuleComponent(const string& moduleComponent)
+ {
+ LOGENTRY(1, "SCARuntime::setDefaultModuleComponent");
+ defaultModuleName = moduleComponent;
+ LOGINFO_1(3, "SCARuntime::setDefaultModuleComponent - set to %s", moduleComponent.c_str());
+ LOGEXIT(1, "SCARuntime::setDefaultModuleComponent");
+ }
+
+ // ===================================================================
+ // Constructor for the SCARuntime class. This will be a singleton that
+ // holds all the information about the current runtime.
+ // ===================================================================
+ SCARuntime::SCARuntime() : system(new System()), defaultModule(0)
+ {
+ LOGENTRY(1, "SCARuntime::constructor");
+
+ // Locate the SCA install root
+ char* root = 0;
+ root = getenv(TUSCANY_SCACPP);
+ if (root == 0)
+ {
+ string msg = TUSCANY_SCACPP;
+ msg += " environment variable not set";
+ throw SystemConfigurationException(msg.c_str());
+ }
+ else
+ {
+ SCARoot = root;
+ }
+
+ LOGEXIT(1, "SCARuntime::constructor");
+ }
+
+ // ===================================================================
+ // Destructor for the SCARuntime class.
+ // ===================================================================
+ SCARuntime::~SCARuntime()
+ {
+ LOGENTRY(1, "SCARuntime::destructor");
+
+ if (system)
+ {
+ delete system;
+ }
+
+ LOGEXIT(1, "SCARuntime::destructor");
+ }
+
+ // =============================================================
+ // Get the instance of the runtime, creates it if does not exist
+ // static method
+ // =============================================================
+ SCARuntime* SCARuntime::getInstance()
+ {
+ LOGENTRY(1, "SCARuntime::getInstance");
+
+ if (instance == NULL)
+ {
+ instance = new SCARuntime();
+
+ if (systemRoot == "")
+ {
+
+ // Load the runtime
+ // Get root from environment variable TUSCANY_SCACPP_SYSTEM_ROOT
+ char* systemRootEnv = getenv(TUSCANY_SCACPP_SYSTEM_ROOT);
+ if (systemRootEnv == 0)
+ {
+ string msg = TUSCANY_SCACPP_SYSTEM_ROOT;
+ msg += " environment variable not set";
+ throw SystemConfigurationException(msg.c_str());
+ }
+
+ systemRoot = systemRootEnv;
+ }
+
+ instance->load(systemRoot);
+ }
+
+ LOGEXIT(1, "SCARuntime::getInstance");
+
+ return instance;
+
+ }
+
+
+ // =============================================================
+ // Release the instance of the runtime.
+ // =============================================================
+ void SCARuntime::releaseInstance()
+ {
+ LOGENTRY(1, "SCARuntime::releaseInstance");
+
+ if (instance)
+ {
+ delete instance;
+ instance = 0;
+ systemRoot = "";
+ defaultModuleName = "";
+ }
+
+ LOGEXIT(1, "SCARuntime::releaseInstance");
+ }
+
+ // ======================================
+ // Load up all the details of the runtime
+ // ======================================
+ void SCARuntime::load(const string& configurationRoot)
+ {
+ LOGENTRY(1, "SCARuntime::load");
+
+ LOGINFO_1(2,"configuration root: %s", configurationRoot.c_str());
+
+ ModelLoader loader(system);
+ // Load details of the module
+ loader.load(configurationRoot);
+
+ LOGEXIT(1, "SCARuntime::load");
+ }
+
+
+ // ===================================
+ // Return the top of the runtime model
+ // ===================================
+ System* SCARuntime::getSystem()
+ {
+ return system;
+ }
+
+
+ // ===================================================
+ // setCurrentComponent: push component for this thread
+ // ===================================================
+ void SCARuntime::setCurrentComponent(Component* component)
+ {
+
+#if defined(WIN32) || defined (_WINDOWS)
+ DWORD currentThreadId = GetCurrentThreadId();
+#else
+ pthread_t currentThreadId = pthread_self();
+#endif
+ COMPONENTS_MAP::iterator iter = components.find(currentThreadId);
+ if (iter == components.end())
+ {
+ components[currentThreadId] = COMPONENT_STACK();
+ iter = components.find(currentThreadId);
+ }
+
+ COMPONENT_STACK& compStack = iter->second;
+ compStack.push(component);
+ }
+
+
+ // ====================================================
+ // unsetCurrentComponent: pop component for this thread
+ // ====================================================
+ Component* SCARuntime::unsetCurrentComponent()
+ {
+#if defined(WIN32) || defined (_WINDOWS)
+ DWORD currentThreadId = GetCurrentThreadId();
+#else
+ pthread_t currentThreadId = pthread_self();
+#endif
+
+ COMPONENTS_MAP::iterator iter = components.find(currentThreadId);
+ if (iter != components.end())
+ {
+ COMPONENT_STACK& compStack = iter->second;
+ if (compStack.size() > 0)
+ {
+ Component* component = compStack.top();
+ compStack.pop();
+ return component;
+ }
+ }
+
+ return 0;
+ }
+
+ // =============================================================
+ // getCurrentComponent: return current component for this thread
+ // =============================================================
+ Component* SCARuntime::getCurrentComponent()
+ {
+#if defined(WIN32) || defined (_WINDOWS)
+ DWORD currentThreadId = GetCurrentThreadId();
+#else
+ pthread_t currentThreadId = pthread_self();
+#endif
+
+ COMPONENTS_MAP::iterator iter = components.find(currentThreadId);
+ if (iter == components.end())
+ {
+ components[currentThreadId] = COMPONENT_STACK();
+ iter = components.find(currentThreadId);
+ }
+
+ COMPONENT_STACK& compStack = iter->second;
+ if (compStack.size() > 0)
+ {
+ return compStack.top();
+ }
+ else
+ {
+ return 0;
+ }
+
+ }
+
+
+ // ===========================================
+ // getCurrentModule: return the current module
+ // ===========================================
+ Module* SCARuntime::getCurrentModule()
+ {
+ // ---------------------------------------------
+ // Get module from current component if possible
+ // ---------------------------------------------
+ Component* comp = getCurrentComponent();
+ if (comp != 0)
+ {
+ return comp->getModule();
+ }
+
+ // ----------------------
+ // Get the default Module
+ // ----------------------
+ string message;
+ if (!defaultModule)
+ {
+ // -------------------------------------------
+ // Get the default module from the environment
+ // -------------------------------------------
+ if (defaultModuleName == "")
+ {
+ const char* defMod = getenv(TUSCANY_SCACPP_DEFAULT_MODULE);
+ if (!defMod)
+ {
+ message = TUSCANY_SCACPP_DEFAULT_MODULE;
+ message += " environment variable not set";
+ throw SystemConfigurationException(message.c_str());
+ }
+ defaultModuleName = defMod;
+ }
+ string subsystemName, moduleName;
+ Utils::tokeniseUri(defaultModuleName, subsystemName, moduleName);
+
+ // ---------------------------
+ // Subsystem must be specified
+ // ---------------------------
+ Subsystem* subsystem = system->findSubsystem(subsystemName);
+ if (!subsystem)
+ {
+ message = "Default subsystem \'" + subsystemName + "\' not found";
+ throw SystemConfigurationException(message.c_str());
+ }
+
+ // --------------------------------------------------------------------------
+ // If module is not specified then get the default module for this subsystem.
+ // This will be the ONLY module for this subsystem
+ // --------------------------------------------------------------------------
+ if (moduleName == "")
+ {
+ defaultModule = subsystem->getDefaultModule();
+ if (!defaultModule)
+ {
+ message = "Default module not found for subsystem \'" + subsystemName + "\'";
+ throw SystemConfigurationException(message.c_str());
+ }
+ }
+ else
+ {
+ // -----------------------------
+ // get the named ModuleComponent
+ // -----------------------------
+ defaultModule = subsystem->findModuleByComponentName(moduleName);
+ if (!defaultModule)
+ {
+ message = "Default module \'" + moduleName + "\' not found in subsystem \'" + subsystemName +"\'";
+ throw SystemConfigurationException(message.c_str());
+ }
+ }
+ }
+ return defaultModule;
+ }
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/SCARuntime.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/SCARuntime.h
new file mode 100644
index 0000000000..2b81b2cbcd
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/SCARuntime.h
@@ -0,0 +1,195 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_core_scaruntime_h
+#define tuscany_sca_core_scaruntime_h
+
+#include "osoa/sca/export.h"
+
+#include "osoa/sca/ComponentContext.h"
+using osoa::sca::ComponentContext;
+
+#include "tuscany/sca/core/ServiceWrapper.h"
+#include "tuscany/sca/model/System.h"
+using namespace tuscany::sca::model;
+
+#if defined(WIN32) || defined (_WINDOWS)
+#include <windows.h>
+#else
+#include <pthread.h>
+#endif
+
+#include <stack>
+#include <string>
+#include <map>
+using namespace std;
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ /**
+ * A singleton which represents the executing SCA runtime.
+ */
+ class SCARuntime {
+ public:
+ /**
+ * Get the single instance.
+ * @return The single instance of the runtime.
+ */
+ SCA_API static SCARuntime* getInstance();
+
+ /**
+ * Release the single instance.
+ */
+ SCA_API static void releaseInstance();
+
+ /**
+ * Set the system root
+ * @param root The path to the deployed system.
+ */
+ static void setSystemRoot(const string& root);
+
+ /**
+ * Set the default ModuleComponent for the system
+ * @param moduleComponent The name of the default moduleComponent.
+ */
+ static void setDefaultModuleComponent(const string& moduleComponent);
+
+ /**
+ * Set the current component for the current thread.
+ * @param component The current component.
+ */
+ SCA_API void setCurrentComponent(Component* component);
+
+ /**
+ * Remove the current component from this thread, and return
+ * to the previous component (if there was one).
+ * @return The previous component.
+ */
+ SCA_API Component* unsetCurrentComponent();
+
+ /**
+ * Get a pointer to the configured SCA system which this
+ * SCA runtime represents.
+ * The rest of the SCA configuration can be navigated from
+ * the System.
+ * @return The configured SCA system.
+ */
+ System* getSystem();
+
+ /**
+ * The directory in which the Tuscany runtime has been installed.
+ */
+ const string& getInstallRoot() {return SCARoot;}
+
+ /**
+ * Return the current component for this thread.
+ * @return The current component for this thread.
+ */
+ Component* getCurrentComponent();
+
+ /**
+ * Get the current module. The current module will either
+ * be the module in which the current component for this thread
+ * is defined, or it will be the default module if there is no current
+ * component. There will not be a current component if a client of
+ * the SCA runtime is making a call into the SCA runtime.
+ */
+ Module* getCurrentModule();
+
+ private:
+ /**
+ * Default constructor is private to prevent more than one instance.
+ */
+ SCARuntime();
+
+ virtual ~SCARuntime();
+
+ /**
+ * Load the SCA configuration from the scdl files (sca.module,
+ * *.fragment, etc).
+ * This will create the runtime model from which the SCA runtime
+ * will operate.
+ * @param configurationRoot The path to the configuration of the
+ * SCA runtime. Under this root will be the subsystems and modules
+ * directories.
+ */
+ void load(const string& configurationRoot);
+
+ /**
+ * The single instance of this class.
+ */
+ static SCARuntime* instance;
+
+ /**
+ * Pointer to the top of the runtime model.
+ */
+ System* system;
+
+ /**
+ * The installed path of the Tuscany runtime.
+ */
+ string SCARoot;
+
+ /**
+ * The path to the system root
+ */
+ static string systemRoot;
+
+ /**
+ * The default ModuleComponent.
+ */
+ static string defaultModuleName;
+
+ /**
+ * Get the default module set for this runtime.
+ * @return The default module.
+ */
+ Module* getDefaultModule() {return defaultModule;}
+
+ /**
+ * The default module set for this runtime.
+ */
+ Module* defaultModule;
+
+
+ typedef stack<Component*> COMPONENT_STACK;
+#if defined(WIN32) || defined (_WINDOWS)
+ typedef map<DWORD, COMPONENT_STACK> COMPONENTS_MAP;
+#else
+ typedef map<pthread_t, COMPONENT_STACK> COMPONENTS_MAP;
+#endif
+
+ /**
+ * A map of threads to components.
+ */
+ COMPONENTS_MAP components;
+ };
+
+
+ } // End namespace sca
+} // End namespace tuscany
+
+
+
+
+#endif // tuscany_sca_core_scaruntime_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp
new file mode 100644
index 0000000000..ef2f2744eb
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.cpp
@@ -0,0 +1,121 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/core/ServiceProxy.h"
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Exceptions.h"
+#include "tuscany/sca/core/SCARuntime.h"
+#include "tuscany/sca/model/CPPImplementation.h"
+
+using namespace osoa::sca;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ // ============================
+ // Constructor: Create a proxy
+ // ============================
+ ServiceProxy::ServiceProxy(Component* component, const string& name, ServiceWrapper* target)
+ {
+ LOGENTRY(1,"ServiceProxy::constructor");
+ string msg;
+
+ // ----------------------
+ // Get the implementation
+ // ----------------------
+ Implementation* impl = component->getImplementation();
+ if (!impl)
+ {
+ msg = "Component " + component->getName() + " has no implementation defined";
+ throw ServiceNotFoundException(msg.c_str());
+ }
+
+ // TODO: This only handle CPP implementation for now
+ if (impl->getImplementationType() == Implementation::CPP)
+ {
+ // ----------------------------------------------------
+ // Get implementation dll name and service factory name
+ // ----------------------------------------------------
+ string dllName = ((CPPImplementation*)impl)->getDll();
+ string headerStub = ((CPPImplementation*)impl)->getHeaderStub();
+
+ string fullDllName = component->getModule()->getRoot() + "/" + dllName;
+ string proxyFactoryName = headerStub + "_" + name + "_Proxy_Factory";
+ string proxyDestructorName = headerStub + "_" + name + "_Proxy_Destructor";
+ typedef void* (* PROXYFACTORY) (ServiceWrapper*);
+
+ // ------------
+ // Load the dll
+ // ------------
+ proxyLibrary = Library(fullDllName);
+
+ // -------------------------
+ // Locate the factory method
+ // -------------------------
+ PROXYFACTORY proxyFactory = (PROXYFACTORY)proxyLibrary.getSymbol(proxyFactoryName);
+ if (!proxyFactory)
+ {
+ LOGERROR_2(1, "ComponentContextImpl::getServiceProxy: Unable to locate %s in library %s",
+ proxyFactoryName.c_str(), fullDllName.c_str());
+ msg = "Unable to locate " + proxyFactoryName + " in library " + fullDllName;
+ throw ServiceNotFoundException(msg.c_str());
+ }
+
+ // -----------------------------------
+ // Now create an instance of the proxy
+ // -----------------------------------
+ proxy = proxyFactory(target);
+ if (!proxy)
+ {
+ LOGERROR_2(1, "ComponentContextImpl::getServiceProxy: Factory method %s in library %s returned null",
+ proxyFactoryName.c_str(), fullDllName.c_str());
+ msg = "Factory method " + proxyFactoryName + " in library " + fullDllName + " returned null";
+ throw ServiceNotFoundException(msg.c_str());
+ }
+
+ // -------------------------
+ // Get the destructor method
+ // -------------------------
+ destructor = (PROXYDESTRUCTOR)proxyLibrary.getSymbol(proxyDestructorName);
+ }
+
+ LOGEXIT(1,"ServiceProxy::constructor");
+
+ }
+
+ // ==========
+ // Destructor
+ // ==========
+ ServiceProxy::~ServiceProxy()
+ {
+ LOGENTRY(1,"ServiceProxy::destructor");
+
+ // Delete the proxy
+ if (destructor)
+ {
+ destructor(proxy);
+ }
+ LOGEXIT(1,"ServiceProxy::destructor");
+ }
+
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.h
new file mode 100644
index 0000000000..073b379cd7
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ServiceProxy.h
@@ -0,0 +1,89 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_core_serviceproxy_h
+#define tuscany_sca_core_serviceproxy_h
+
+#include "osoa/sca/export.h"
+
+#include "tuscany/sca/core/ServiceWrapper.h"
+#include "tuscany/sca/model/Component.h"
+#include "tuscany/sca/util/Library.h"
+
+using namespace tuscany::sca::model;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ /**
+ * Holds a proxy for a given component and reference.
+ * The proxy which is held inside a ServiceProxy will be specific to the component
+ * and reference and will have been code generated and be contained in a dll
+ * created by a developer of an SCA application.
+ */
+ class ServiceProxy
+ {
+ public:
+ /**
+ * Create a new service proxy for a given component and reference name. The
+ * create proxy will contain a pointer to the target ServiceWrapper.
+ * @param component The component for which this proxy will be created (the
+ * source component).
+ * @param name The name of the reference on the component.
+ * @param target The wrapper of the component which is wired to this component and
+ * reference.
+ */
+ ServiceProxy(Component* component, const string& name, ServiceWrapper* target);
+
+ /**
+ * Destructor.
+ */
+ virtual ~ServiceProxy();
+
+ /**
+ * Return an instance of the proxy created for this particular component and reference.
+ * @return The proxy.
+ */
+ void* getProxy() {return proxy;}
+
+
+ private:
+ /**
+ * Holds the instance of the code generated proxy.
+ */
+ void* proxy;
+
+ typedef void (* PROXYDESTRUCTOR) (void*);
+
+ /**
+ * A function pointer to the destructor of the proxy.
+ */
+ PROXYDESTRUCTOR destructor;
+
+ /**
+ * The library which contains the code for the proxy.
+ */
+ Library proxyLibrary;
+
+ };
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_core_serviceproxy_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.cpp
new file mode 100644
index 0000000000..5936f526f1
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.cpp
@@ -0,0 +1,55 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/core/ServiceWrapper.h"
+#include <stdarg.h>
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/core/SCARuntime.h"
+
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ // ===========
+ // Constructor
+ // ===========
+ ServiceWrapper::ServiceWrapper(WireTarget* targ)
+ : target(targ)
+ {
+ LOGENTRY(1,"ServiceWrapper::constructor");
+
+ LOGEXIT(1,"ServiceWrapper::constructor");
+
+ }
+
+ // ==========
+ // Destructor
+ // ==========
+ ServiceWrapper::~ServiceWrapper()
+ {
+ LOGENTRY(1,"ServiceWrapper::destructor");
+ LOGEXIT(1,"ServiceWrapper::destructor");
+ }
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.h
new file mode 100644
index 0000000000..21c162d77f
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/ServiceWrapper.h
@@ -0,0 +1,73 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_core_servicewrapper_h
+#define tuscany_sca_core_servicewrapper_h
+
+#include "osoa/sca/export.h"
+
+#include "tuscany/sca/core/Operation.h"
+#include "tuscany/sca/model/WireTarget.h"
+using tuscany::sca::model::WireTarget;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ /**
+ * An abstract class that wraps a component implementation or an external
+ * service.
+ */
+ class SCA_API ServiceWrapper
+ {
+ public:
+ /**
+ * Constructor.
+ * @param target The service wrapper wraps the target of a wire.
+ */
+ ServiceWrapper(WireTarget* target);
+
+ /**
+ * Destructor.
+ */
+ virtual ~ServiceWrapper();
+
+ /**
+ * Get the target represented by this wrapper.
+ * @return The target represented by this wrapper.
+ */
+ virtual WireTarget* getTarget() {return target;}
+
+ /**
+ * All business method calls on the target service are performed through
+ * this invoke method.
+ * @param operation The details of the method, paramaters and return value for the
+ * business method to be called on the target service.
+ */
+ virtual void invoke(Operation& operation) = 0;
+ private:
+ /**
+ * The target represented by this wrapper.
+ */
+ WireTarget* target;
+ };
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_core_servicewrapper_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.cpp
new file mode 100644
index 0000000000..810f810132
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.cpp
@@ -0,0 +1,100 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/core/TuscanyRuntime.h"
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Utils.h"
+#include "tuscany/sca/util/Exceptions.h"
+#include "tuscany/sca/core/SCARuntime.h"
+
+#include "tuscany/sca/model/System.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ // ==========================================================
+ // Set the default ModuleComponent name
+ // ==========================================================
+ void TuscanyRuntime::setSystemRoot(const string& root)
+ {
+ LOGENTRY(1, "TuscanyRuntime::setSystemRoot");
+ systemRoot = root;
+ LOGINFO_1(3, "TuscanyRuntime::setSystemRoot - set to %s", root.c_str());
+ LOGEXIT(1, "TuscanyRuntime::setSystemRoot");
+ }
+
+ // ==========================================================
+ // Set the default ModuleComponent name
+ // ==========================================================
+ void TuscanyRuntime::setDefaultModuleComponent(const string& moduleComponent)
+ {
+ LOGENTRY(1, "TuscanyRuntime::setDefaultModuleComponent");
+ defaultModuleComponent = moduleComponent;
+ LOGINFO_1(3, "TuscanyRuntime::setDefaultModuleComponent - set to %s", moduleComponent.c_str());
+ LOGEXIT(1, "TuscanyRuntime::setDefaultModuleComponent");
+ }
+
+ // ===================================================================
+ // Constructor for the TuscanyRuntime class.
+ // ===================================================================
+ TuscanyRuntime::TuscanyRuntime(const string& moduleComponent, const string& root)
+ {
+ LOGENTRY(1, "TuscanyRuntime::constructor");
+ setSystemRoot(root);
+ setDefaultModuleComponent(moduleComponent);
+ LOGEXIT(1, "TuscanyRuntime::constructor");
+ }
+
+ // ===================================================================
+ // Destructor for the TuscanyRuntime class.
+ // ===================================================================
+ TuscanyRuntime::~TuscanyRuntime()
+ {
+ LOGENTRY(1, "TuscanyRuntime::destructor");;
+ LOGEXIT(1, "TuscanyRuntime::destructor");
+ }
+
+ // ===================================================================
+ // Start the runtime.
+ // ===================================================================
+ void TuscanyRuntime::start()
+ {
+ LOGENTRY(1, "TuscanyRuntime::start");
+ SCARuntime::setSystemRoot(systemRoot);
+ SCARuntime::setDefaultModuleComponent(defaultModuleComponent);
+ SCARuntime::getInstance();
+ LOGEXIT(1, "TuscanyRuntime::start");
+ }
+
+ // ===================================================================
+ // Stop the runtime.
+ // ===================================================================
+ void TuscanyRuntime::stop()
+ {
+ LOGENTRY(1, "TuscanyRuntime::stop");
+ SCARuntime::releaseInstance();
+ LOGEXIT(1, "TuscanyRuntime::stop");
+ }
+
+
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.h
new file mode 100644
index 0000000000..92da737416
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/core/TuscanyRuntime.h
@@ -0,0 +1,85 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_core_tuscanyruntime_h
+#define tuscany_sca_core_tuscanyruntime_h
+
+#include "osoa/sca/export.h"
+#include <string>
+using std::string;
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ /**
+ * A singleton which represents the executing SCA runtime.
+ */
+ class SCA_API TuscanyRuntime
+ {
+ public:
+ /**
+ * Default constructor
+ */
+ TuscanyRuntime(const string& moduleComponent = "", const string& root = "");
+
+ /**
+ * Destructor
+ */
+ virtual ~TuscanyRuntime();
+
+
+ /**
+ * Set the system root
+ * @param root The path to the deployed system.
+ */
+ void setSystemRoot(const string& root);
+
+ /**
+ * Set the default ModuleComponent for the system
+ * @param moduleComponent The name of the default moduleComponent.
+ */
+ void setDefaultModuleComponent(const string& moduleComponent);
+
+ /**
+ * start the runtime
+ */
+ void start();
+
+ /**
+ * stop the runtime
+ */
+ void stop();
+
+
+ private:
+ string systemRoot;
+ string defaultModuleComponent;
+ };
+
+
+ } // End namespace sca
+} // End namespace tuscany
+
+
+
+
+#endif // tuscany_sca_core_tuscanyruntime_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Binding.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Binding.cpp
new file mode 100644
index 0000000000..c312d7a077
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Binding.cpp
@@ -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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/model/Binding.h"
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ namespace model
+ {
+
+ // Constructor
+ Binding::Binding(const string& uri) : uri(uri)
+ {
+ }
+
+ Binding::~Binding()
+ {
+ }
+
+ } // End namespace model
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Binding.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Binding.h
new file mode 100644
index 0000000000..ff97990dc6
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Binding.h
@@ -0,0 +1,85 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_binding_h
+#define tuscany_sca_model_binding_h
+#include <string>
+using std::string;
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+ /**
+ * Information about the binding for EntryPoint and ExternalService. An
+ * abstract class which will be extended by classes that hold specific
+ * information for each type of binding.
+ */
+ class Binding
+ {
+
+ public:
+ /**
+ * Supported binding types.
+ */
+ enum Type
+ {
+ WS,
+ SCA
+ };
+
+ /**
+ * Constructor to create a new binding.
+ * @param uri The uri specified in the scdl file.
+ */
+ Binding(const string& uri);
+
+ /**
+ * Destructor.
+ */
+ virtual ~Binding();
+
+ /**
+ * Return the enumerated type of binding.
+ * @return The type of the binding (see Binding#Type).
+ */
+ virtual Type getBindingType() = 0;
+
+ /**
+ * Return the uri of the binding.
+ * @return The uri of the binding.
+ */
+ string getUri() {return uri;};
+
+ private:
+ /**
+ * The uri of the binding.
+ */
+ string uri;
+ };
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_binding_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/CPPImplementation.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/CPPImplementation.cpp
new file mode 100644
index 0000000000..7212e777b1
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/CPPImplementation.cpp
@@ -0,0 +1,54 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/model/CPPImplementation.h"
+#include "tuscany/sca/util/Utils.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ namespace model
+ {
+
+ // Constructor
+ CPPImplementation::CPPImplementation(const string& dllName, const string& head, const string& classN)
+ : dll(dllName), header(head), className(classN)
+ {
+ // Separate any path element
+ Utils::rTokeniseString("/", head, headerPath, headerStub);
+ if (headerPath != "")
+ {
+ headerPath += "/";
+ }
+
+ // Determine the header stub name
+ string tmp;
+ Utils::rTokeniseString(".h", headerStub, headerStub, tmp);
+ }
+
+ CPPImplementation::~CPPImplementation()
+ {
+ }
+ } // End namespace model
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/CPPImplementation.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/CPPImplementation.h
new file mode 100644
index 0000000000..0294649af7
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/CPPImplementation.h
@@ -0,0 +1,125 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_cppimplementation_h
+#define tuscany_sca_model_cppimplementation_h
+#include "tuscany/sca/model/Implementation.h"
+
+#include <map>
+using std::map;
+#include <string>
+using std::string;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+ /**
+ * Holds informatio about an SCA implementation written in C++
+ */
+ class CPPImplementation : public Implementation
+ {
+
+ public:
+ /**
+ * Constructor.
+ * @param dllName Name of the shared library.
+ * @param header Name of the header file that contains the class declaring the
+ * implementation class.
+ * @param className Name of the class in the header file (could be a blank string
+ * if this is not specified).
+ */
+ CPPImplementation(const string& dllName, const string& header, const string& className);
+
+ /**
+ * Destructor
+ */
+ virtual ~CPPImplementation();
+
+ /**
+ * Return the implementation type.
+ * @return Always returns CPP.
+ */
+ virtual Type getImplementationType() {return CPP;}
+
+ /**
+ * Returns the name of the shared library.
+ * @return The name of the shared library.
+ */
+ const string& getDll() {return dll;}
+
+ /**
+ * Get the name of the header file.
+ * @return Name of the header file.
+ */
+ const string& getHeader() {return header;}
+
+ /**
+ * Get the header file name without the extension.
+ * @return The name of the header file without any extension.
+ */
+ const string& getHeaderStub() {return headerStub;}
+
+ /**
+ * Get the header path.
+ * @return The pathe element of the header.
+ */
+ const string& getHeaderPath() {return headerPath;}
+
+ /**
+ * Get the name of the class.
+ * @return The class name if specified.
+ */
+ const string& getClass() {return className;}
+ private:
+ /**
+ * Name of the shared library.
+ */
+ string dll;
+
+ /**
+ * Name of the header file describing the interface.
+ */
+ string header;
+
+ /**
+ * Name of the header file without the extension.
+ */
+ string headerStub;
+
+ /**
+ * Path element of the header.
+ */
+ string headerPath;
+
+ /**
+ * Name of the class in the header file declaring the implementation.
+ * May be an empty string if not set in the SCDL file.
+ */
+ string className;
+ };
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_cppimplementation_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/CPPInterface.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/CPPInterface.cpp
new file mode 100644
index 0000000000..015b54c259
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/CPPInterface.cpp
@@ -0,0 +1,67 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/model/CPPInterface.h"
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ namespace model
+ {
+
+ // Constructor
+ CPPInterface::CPPInterface(
+ const string& head,
+ const string& classN,
+ const string& scop,
+ bool remote)
+ : header(head), className(classN), remotable(remote)
+ {
+ string::size_type dot = header.rfind(".h"); // this will also find .hpp
+ if (dot != string::npos)
+ {
+ headerStub = header.substr(0, dot);
+ }
+ else
+ {
+ headerStub = header;
+ }
+
+ if (scop == "module")
+ {
+ scope = MODULE;
+ }
+ else
+ {
+ scope = STATELESS;
+ }
+ }
+
+ CPPInterface::~CPPInterface()
+ {
+ }
+
+ } // End namespace model
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/CPPInterface.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/CPPInterface.h
new file mode 100644
index 0000000000..7b37b1892e
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/CPPInterface.h
@@ -0,0 +1,143 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_cppinterface_h
+#define tuscany_sca_model_cppinterface_h
+
+#include "tuscany/sca/model/Interface.h"
+
+
+#include <map>
+using std::map;
+#include <string>
+using std::string;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+ /**
+ * Holds information about an interface described using a C++
+ * header file.
+ */
+ class CPPInterface : public Interface
+ {
+
+ public:
+ /**
+ * Constuctor.
+ * @param header Name of the header file containing the class that
+ * describes the interface.
+ * @param className Name of the class in the header file that
+ * describes the interface.
+ * @param scope The scope of the interface (stateless or module).
+ * @param remotable True if the interface is remotable.
+ */
+ CPPInterface(
+ const string& header,
+ const string& className,
+ const string& scope,
+ bool remotable);
+
+ /**
+ * Destructor.
+ */
+ virtual ~CPPInterface();
+
+ /**
+ * Return the type of the interface.
+ * @return Always returns CPP.
+ */
+ virtual Type getInterfaceType() {return CPP;}
+
+ /**
+ * Get the name of the header file.
+ * @return The name of the header file containing the definition of the
+ * interface.
+ */
+ const string& getHeader() {return header;}
+
+ /**
+ * Return the name of the header file without the extension.
+ * @return Header file name without any extension.
+ */
+ const string& getHeaderStub() {return headerStub;}
+
+ /**
+ * Get the name of the class.
+ * @return The name of the class defining the interface.
+ */
+ const string& getClass() {return className;}
+
+ /**
+ * Scope of interface.
+ */
+ enum SCOPE
+ {
+ MODULE,
+ STATELESS
+ };
+
+ /**
+ * Get the scope of the interface.
+ * @return The scope of the interface.
+ */
+ SCOPE getScope() {return scope;}
+
+ /**
+ * Return whether the interface is remotable or local.
+ * @return True if the interface is remotable, otherwise false.
+ */
+ bool getRemotable() {return remotable;}
+
+ private:
+ /**
+ * Name of the header file containing the definition of the interface.
+ */
+ string header;
+
+ /**
+ * Name of the header file without the extension.
+ */
+ string headerStub;
+
+ /**
+ * Name of the class in the header file.
+ */
+ string className;
+
+ /**
+ * Scope of the interface.
+ */
+ SCOPE scope;
+
+ /**
+ * Remotable interface or not.
+ */
+ bool remotable;
+ };
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_cppinterface_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Component.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Component.cpp
new file mode 100644
index 0000000000..4e0cf81c61
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Component.cpp
@@ -0,0 +1,305 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+// Component.cpp : Represent a loaded Component
+//
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Exceptions.h"
+#include "tuscany/sca/util/Utils.h"
+#include "tuscany/sca/model/Component.h"
+
+using namespace commonj::sdo;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+ // Constructor
+ Component::Component(const std::string& componentName, Module* module)
+ : name(componentName), containingModule(module), implementation(0)
+ {
+ LOGENTRY(1, "Component::constructor");
+ LOGINFO_1(3, "Component::constructor: Component name: %s", name.c_str());
+ LOGEXIT(1, "Component::constructor");
+ }
+
+ Component::~Component()
+ {
+ }
+
+ Service* Component::addService(const std::string& serviceName)
+ {
+ Service* service = new Service(serviceName, this);
+ services[serviceName] = service;
+ return service;
+ }
+
+ Service* Component::findService(const std::string& serviceName)
+ {
+ // If serviceName is null then return the ONLY service
+ if (serviceName == ""
+ && services.size() == 1)
+ {
+ return services.begin()->second;
+ }
+ else
+ {
+ return services[serviceName];
+ }
+ }
+
+ ServiceReference* Component::findReference(const std::string& referenceName)
+ {
+ return references[referenceName];
+ }
+
+ ServiceReference* Component::addReference(const std::string& referenceName)
+ {
+ ServiceReference* serviceReference = references[referenceName];
+ if (!serviceReference)
+ {
+ references[referenceName] = new ServiceReference(referenceName);
+ }
+ return references[referenceName];
+ }
+
+ void Component::setImplementation(Implementation* impl)
+ {
+ implementation = impl;
+ }
+
+ void Component::addProperty(const string& name,
+ const string& type,
+ bool many,
+ bool required,
+ const char* defaultValue)
+ {
+ // Create a Type in the Properties dataFactory
+ DataFactoryPtr factory = getPropertyDataFactory();
+
+ string typeUri, typeName;
+ Utils::tokeniseQName(type, typeUri, typeName);
+
+ if (typeUri == "http://www.w3.org/2001/XMLSchema")
+ {
+ typeUri = Type::SDOTypeNamespaceURI;
+ if (typeName == "string")
+ {
+ typeName = "String";
+ }
+ else if (typeName == "anyType")
+ {
+ typeName = "DataObject";
+ }
+ else if (typeName == "int")
+ {
+ typeName = "Integer";
+ }
+ else if (typeName == "integer")
+ {
+ typeName = "Integer";
+ }
+ else if (typeName == "negativeInteger")
+ {
+ typeName = "Integer";
+ }
+ else if (typeName == "nonNegativeInteger")
+ {
+ typeName = "Integer";
+ }
+ else if (typeName == "positiveInteger")
+ {
+ typeName = "Integer";
+ }
+ else if (typeName == "nonPositiveInteger")
+ {
+ typeName = "Integer";
+ }
+ else if (typeName == "unsignedLong")
+ {
+ typeName = "Integer";
+ }
+ else if (typeName == "unsignedShort")
+ {
+ typeName = "Integer";
+ }
+ else if (typeName == "unsignedInt")
+ {
+ typeName = "Long";
+ }
+ else if (typeName == "long")
+ {
+ typeName = "Long";
+ }
+ else if (typeName == "double")
+ {
+ typeName = "Double";
+ }
+ else if (typeName == "short")
+ {
+ typeName = "Short";
+ }
+ else if (typeName == "unsignedByte")
+ {
+ typeName = "Short";
+ }
+ else if (typeName == "float")
+ {
+ typeName = "Float";
+ }
+ else if (typeName == "boolean")
+ {
+ typeName = "Boolean";
+ }
+ else if (typeName == "byte")
+ {
+ typeName = "Byte";
+ }
+ else if (typeName == "base64Binary")
+ {
+ typeName = "Bytes";
+ }
+ else if (typeName == "hexBinary")
+ {
+ typeName = "Bytes";
+ }
+ else if (typeName == "anyURI")
+ {
+ typeName = "URI";
+ }
+ else if (typeName == "QName")
+ {
+ typeName = "URI";
+ }
+ else
+ {
+ // Default unknown xs: types to string??
+ typeName = "String";
+ }
+ }
+ else
+ {
+ // It's not an XML type
+ }
+
+
+ factory->addPropertyToType(
+ "org/osoa/sca",
+ "Properties",
+ name.c_str(),
+ typeUri.c_str(),
+ typeName.c_str(),
+ many,
+ false,
+ true);
+
+ // Set the default
+
+
+ // Add to list of required properties
+ if (required)
+ {
+ }
+ }
+
+ DataFactoryPtr Component::getPropertyDataFactory()
+ {
+ if (!propertyFactory)
+ {
+ propertyFactory = DataFactory::getDataFactory();
+ // Add the root type
+ propertyFactory->addType("org/osoa/sca", "Properties", false, false, false, false);
+ }
+ return propertyFactory;
+ }
+
+ DataObjectPtr Component::getProperties()
+ {
+ if (!properties)
+ {
+ properties = getPropertyDataFactory()->create("org/osoa/sca", "Properties");
+ }
+ return properties;
+ }
+
+ void Component::addProperties(DataObjectPtr values)
+ {
+ if (!values)
+ {
+ return;
+ }
+
+ DataObjectPtr props = getProperties();
+
+ PropertyList pl = values->getInstanceProperties();
+ for (int i=0; i < pl.size(); i++)
+ {
+ if (!values->isSet(i))
+ {
+ continue;
+ }
+
+ // Add the property value to the component to be resolved later
+ string propName = pl[i].getName();
+
+ // Get the property's type
+ try
+ {
+ const Property& propProperty = props->getProperty(pl[i].getName());
+ const Type& propType = propProperty.getType();
+
+ DataObjectList& proplist = values->getList(pl[i]);
+ for (int proplistI=0; proplistI<proplist.size(); proplistI++)
+ {
+ // Get the property value
+ string propValue = proplist.getDataObject(proplistI)->getSequence()->getCStringValue(0);
+ if (propType.isDataType())
+ {
+ if (propProperty.isMany())
+ {
+ DataObjectList& dol = props->getList(propProperty);
+ dol.append(propValue.c_str());
+ }
+ else
+ {
+ props->setCString(propProperty, propValue.c_str());
+ }
+ }
+ else
+ {
+ // Create a new instance of the DO
+ // iterate over properties setting each one
+ }
+ }
+ }
+ catch (SDOPropertyNotFoundException&)
+ {
+ // Configuration error: property is not defined
+ string message = "Undefined property: " + propName;
+ throw SystemConfigurationException(message.c_str());
+ }
+
+ }
+ }
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Component.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Component.h
new file mode 100644
index 0000000000..f40690c859
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Component.h
@@ -0,0 +1,202 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_component_h
+#define tuscany_sca_model_component_h
+
+#include <string>
+using std::string;
+
+#include <map>
+
+#include "tuscany/sca/model/Service.h"
+#include "tuscany/sca/model/Implementation.h"
+#include "tuscany/sca/model/ServiceReference.h"
+
+#include "commonj/sdo/SDO.h"
+using commonj::sdo::DataObjectPtr;
+using commonj::sdo::DataFactoryPtr;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+
+ class Module;
+
+ /**
+ * Information about an SCA component.
+ */
+ class Component
+ {
+ public:
+ /**
+ * Constructor
+ * @param name The name of the component.
+ * @param module The module containing this component.
+ */
+ Component(const std::string& name, Module* module);
+
+ /**
+ * Destructor.
+ */
+ virtual ~Component();
+
+ /**
+ * Returns the name of the component.
+ * @return The name of the component.
+ */
+ const string& getName() {return name;}
+
+ /**
+ * Get the module containing this component.
+ * @return The containing module.
+ */
+ Module* getModule() {return containingModule;}
+
+ /**
+ * Add a new service to this component.
+ * @param serviceName The name of the service to add.
+ * @return The newly added service.
+ */
+ Service* addService(const std::string& serviceName);
+
+ /**
+ * Find an existing service on this component.
+ * @param serviceName The name of the service to find.
+ * If the serviceName is the zero length string then if there is
+ * only one service it will be returned.
+ * @return The found service, or 0 if not found.
+ */
+ Service* findService(const std::string& serviceName);
+
+ /**
+ * Add a new reference to this component.
+ * @param referenceName The name of the reference to add.
+ * @return The newly added reference.
+ */
+ ServiceReference* addReference(const std::string& referenceName);
+
+ /**
+ * Find an existing reference on this component.
+ * @param referenceName The name of the reference to find.
+ * @return The found reference, or 0 if not found.
+ */
+ ServiceReference* findReference(const std::string& referenceName);
+
+ /**
+ * Set the details of the implementation of this component.
+ * @param impl The details of the implementation.
+ */
+ void setImplementation(Implementation* impl);
+
+ /**
+ * Returns the details of the implementation of this component.
+ * @return The details of the implementation.
+ */
+ Implementation* getImplementation() {return implementation;}
+
+ /**
+ * Add a new property to this component. Properties are
+ * added one at a time. The property definitions come from the component
+ * type file.
+ * @param name The name of the property.
+ * @param type The full name of the type (including uri and local name).
+ * @param many True if this is a many valued property.
+ * @param required True if this property must have a value set.
+ * @param defaultValue The default value if the property does not have a
+ * value set.
+ */
+ void addProperty(const string& name,
+ const string& type,
+ bool many,
+ bool required,
+ const char* defaultValue = 0);
+
+ /**
+ * Add the property values to the properties defined on this
+ * component. The values will come from the sca.module file.
+ * @param properties A data object representing all the values set
+ * for this component.
+ */
+ void addProperties(DataObjectPtr properties);
+
+ /**
+ * Returns a data object from which all the properties and their
+ * values can be accessed.
+ * @return A data object holding the property values.
+ */
+ DataObjectPtr getProperties();
+ private:
+ /**
+ * Name of the component.
+ */
+ string name;
+
+ /**
+ * Module containing this component for navigating up the tree.
+ */
+ Module* containingModule;
+
+ /**
+ * Information about the implementation of this component.
+ */
+ Implementation* implementation;
+
+ typedef std::map<std::string, Service*> SERVICE_MAP;
+ /**
+ * Map of all the services defined on this component.
+ */
+ SERVICE_MAP services;
+
+ typedef std::map<std::string, ServiceReference*> REFERENCE_MAP;
+ /**
+ * Map of all the references defined on this component.
+ */
+ REFERENCE_MAP references;
+
+ /**
+ * SDO data factory which has all the property types defined from
+ * the component type file
+ */
+ DataFactoryPtr propertyFactory;
+
+ /**
+ * Return the SDO data factory which has the property types defined
+ * in it.
+ * @return The data factory.
+ */
+ DataFactoryPtr getPropertyDataFactory();
+
+ /**
+ * The properties and their values for this component.
+ */
+ DataObjectPtr properties;
+
+ };
+
+ } // End namespace model
+
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_component_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/EntryPoint.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/EntryPoint.cpp
new file mode 100644
index 0000000000..1c38e31469
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/EntryPoint.cpp
@@ -0,0 +1,101 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/model/EntryPoint.h"
+#include "tuscany/sca/util/Exceptions.h"
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ namespace model
+ {
+
+ // Constructor
+ EntryPoint::EntryPoint(const std::string& epName)
+ : name(epName)
+ {
+ LOGENTRY(1, "EntryPoint::constructor");
+ LOGINFO_1(2, "EntryPoint::constructor: EntryPoint name: %s", name.c_str());
+ LOGEXIT(1, "EntryPoint::constructor");
+ }
+
+ EntryPoint::~EntryPoint()
+ {
+ }
+
+ void EntryPoint::addTarget(WireTarget* targ)
+ {
+ if (multiplicity == ONE_ONE || multiplicity == ZERO_ONE)
+ {
+ if (targets.size() > 0)
+ {
+ // throw exception
+ string message = "Duplicate wire for reference: " + name;
+ throw SystemConfigurationException(message.c_str());
+ }
+ }
+
+ // TODO - must be remotable
+
+ targets.push_back(targ);
+ }
+
+ void EntryPoint::setMultiplicity(const std::string& multip)
+ {
+ if (multip == "0..1")
+ {
+ multiplicity = ZERO_ONE;
+ }
+ else if (multip == "1..1")
+ {
+ multiplicity = ONE_ONE;
+ }
+ else if (multip == "0..n")
+ {
+ multiplicity = ZERO_MANY;
+ }
+ else if (multip == "1..n")
+ {
+ multiplicity = ONE_MANY;
+ }
+ else
+ {
+ string msg = "Invalid multiplicity specified, " + multip + ", for reference: " +name;
+ throw SystemConfigurationException(msg.c_str());
+ }
+ }
+
+ void EntryPoint::setInterface(Interface* interf)
+ {
+ iface = interf;
+ }
+
+ void EntryPoint::setBinding(Binding* bind)
+ {
+ binding = bind;
+ }
+
+ } // End namespace model
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/EntryPoint.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/EntryPoint.h
new file mode 100644
index 0000000000..9b80a1049f
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/EntryPoint.h
@@ -0,0 +1,158 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_entrypoint_h
+#define tuscany_sca_model_entrypoint_h
+
+#include <string>
+using std::string;
+#include <vector>
+using std::vector;
+
+#include "tuscany/sca/model/Interface.h"
+#include "tuscany/sca/model/Binding.h"
+#include "tuscany/sca/model/WireTarget.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+ /**
+ * Represents the information about an entry point.
+ */
+ class EntryPoint
+ {
+
+ public:
+ /**
+ * Constructor.
+ * @param name The name of the entry point.
+ */
+ EntryPoint(const std::string& name);
+
+ /**
+ * Destructor.
+ */
+ virtual ~EntryPoint();
+
+ /**
+ * Return the name of the entry point.
+ * @return The name of the entry point.
+ */
+ const string& getName() {return name;}
+
+ /**
+ * How many wires can be wired from this entry point.
+ */
+ enum Multiplicity
+ {
+ ZERO_ONE,
+ ONE_ONE,
+ ZERO_MANY,
+ ONE_MANY
+ };
+
+ /**
+ * Set the multiplicity of this entry point.
+ * @param multiplicity One of 0..1, 1..1, 0..n, 1..n
+ */
+ void setMultiplicity(const std::string& multiplicity);
+
+ /**
+ * Return the multiplicity of this entry point (how
+ * many wires can be wired from this entry point).
+ * @return The multiplicity.
+ */
+ Multiplicity getMultiplicity() {return multiplicity;}
+
+ /**
+ * Set the interface describing this entry point.
+ * @param iface The interface.
+ */
+ void setInterface(Interface* iface);
+
+ /**
+ * Get the interface describing this entry point. Use
+ * Interface#getType to find out the type of interface
+ * describing this entry point.
+ * @return iface The interface.
+ */
+ Interface* getInterface() {return iface;}
+
+ /**
+ * Set the binding connecting this entry point.
+ * @param binding The Binding.
+ */
+ void setBinding(Binding* binding);
+
+ /**
+ * Get the binding connecting this entry point. Use
+ * Binding#getType to find out the type of binding
+ * connecting this entry point.
+ * @return binding The binding.
+ */
+ Binding* getBinding() {return binding;}
+
+ /**
+ * Add a target to the entry point.
+ * @param target Add a target (derived from a wire) to
+ * the entry point.
+ */
+ void addTarget(WireTarget* target);
+ typedef vector<WireTarget*> TARGETS;
+
+ /**
+ * Get a vector of targets added to this entry point.
+ */
+ const TARGETS& getTargets() {return targets;}
+ private:
+ /**
+ * Name of the entry point.
+ */
+ string name;
+
+ /**
+ * The interface describing this entry point.
+ */
+ Interface* iface;
+
+ /**
+ * The binding connecting this entry point.
+ */
+ Binding* binding;
+
+ /**
+ * The multiplicity of this entry point..
+ */
+ Multiplicity multiplicity;
+
+ /**
+ * The vector of targets added to this entry point.
+ */
+ TARGETS targets;
+ };
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_entrypoint_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ExternalService.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ExternalService.cpp
new file mode 100644
index 0000000000..c848c3aafb
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ExternalService.cpp
@@ -0,0 +1,55 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/model/ExternalService.h"
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ namespace model
+ {
+
+ // Constructor
+ ExternalService::ExternalService(const std::string& serviceName, Module *module)
+ : WireTarget(serviceName), containingModule(module)
+ {
+ LOGENTRY(1, "ExternalService::constructor");
+ LOGINFO_1(2, "ExternalService::constructor: ExternalService name: %s", getName().c_str());
+ LOGEXIT(1, "ExternalService::constructor");
+ }
+
+ ExternalService::~ExternalService()
+ {
+ delete binding;
+ }
+
+ void ExternalService::setBinding(Binding* bind)
+ {
+ binding = bind;
+ }
+
+
+ } // End namespace model
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ExternalService.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ExternalService.h
new file mode 100644
index 0000000000..fe9640d1b8
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ExternalService.h
@@ -0,0 +1,97 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_externalservice_h
+#define tuscany_sca_model_externalservice_h
+
+#include <string>
+
+#include "tuscany/sca/model/WireTarget.h"
+#include "tuscany/sca/model/Binding.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ namespace model
+ {
+ class Module;
+
+ /**
+ * Information about an external service.
+ */
+ class ExternalService : public WireTarget
+ {
+ public:
+ /**
+ * Constructor.
+ * @param name The name of the external service.
+ * @param module The module containing this external service.
+ */
+ ExternalService(const std::string& name, Module *module);
+
+ /**
+ * Destructor.
+ */
+ virtual ~ExternalService();
+
+ /**
+ * Return the type of service.
+ * @return Always returns ExternalServiceType
+ */
+ virtual Type getServiceType() {return ExternalServiceType;}
+
+ /**
+ * Set the binding for this external service.
+ * @param binding The binding to set.
+ */
+ virtual void setBinding(Binding* binding);
+
+ /**
+ * Get the binding set for this external service.
+ * @return The binding.
+ */
+ virtual Binding* getBinding() {return binding;};
+
+ /**
+ * Get the module containing this external service.
+ * @return The containing module.
+ */
+ Module* getContainingModule() {return containingModule;};
+
+ private:
+ /**
+ * The binding for this external service.
+ */
+ Binding* binding;
+
+ /**
+ * The module containing this external service.
+ */
+ Module* containingModule;
+
+
+ };
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_externalservice_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Implementation.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Implementation.cpp
new file mode 100644
index 0000000000..9703d1bab3
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Implementation.cpp
@@ -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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/model/Implementation.h"
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ namespace model
+ {
+
+ // Constructor
+ Implementation::Implementation()
+ {
+ }
+
+ Implementation::~Implementation()
+ {
+ }
+
+ } // End namespace model
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Implementation.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Implementation.h
new file mode 100644
index 0000000000..17414c359b
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Implementation.h
@@ -0,0 +1,66 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_implementation_h
+#define tuscany_sca_model_implementation_h
+
+#include <string>
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+ /**
+ * Abstract class representing information about an implementation
+ * of a component. The subtypes will hold information specific to
+ * the type of implementation.
+ */
+ class Implementation
+ {
+
+ public:
+ /**
+ * Supported types of implementation.
+ */
+ enum Type
+ {
+ CPP,
+ JAVA
+ };
+
+ Implementation();
+ virtual ~Implementation();
+
+ /**
+ * Return the type of the implementation.
+ * @return Will depend on the subtype.
+ */
+ virtual Type getImplementationType() = 0;
+
+ private:
+ };
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_implementation_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Interface.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Interface.cpp
new file mode 100644
index 0000000000..9e0aa45889
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Interface.cpp
@@ -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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/model/Interface.h"
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ namespace model
+ {
+
+ // Constructor
+ Interface::Interface()
+ {
+ }
+
+ Interface::~Interface()
+ {
+ }
+
+ } // End namespace model
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Interface.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Interface.h
new file mode 100644
index 0000000000..24bb43224b
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Interface.h
@@ -0,0 +1,65 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_interface_h
+#define tuscany_sca_model_interface_h
+
+#include <string>
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+ /**
+ * Information about an interface. Subtypes will hold information
+ * specific to a type of interface.
+ */
+ class Interface
+ {
+
+ public:
+ /**
+ * The supported types of interface.
+ */
+ enum Type
+ {
+ CPP,
+ JAVA
+ };
+
+ Interface();
+ virtual ~Interface();
+
+ /**
+ * Returns the type of the interface.
+ * @return Will depend on the subtype.
+ */
+ virtual Type getInterfaceType() = 0;
+
+ private:
+ };
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_interface_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp
new file mode 100644
index 0000000000..32a3ad8d26
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp
@@ -0,0 +1,1702 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "osoa/sca/export.h"
+#include "tuscany/sca/util/Utils.h"
+#include "tuscany/sca/util/Exceptions.h"
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/model/ModelLoader.h"
+#include "tuscany/sca/model/CPPImplementation.h"
+#include "tuscany/sca/model/CPPInterface.h"
+#include "tuscany/sca/core/SCARuntime.h"
+#include "tuscany/sca/model/WSBinding.h"
+#include "commonj/sdo/TypeDefinitions.h"
+
+
+using namespace commonj::sdo;
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ namespace model
+ {
+ // ===========
+ // Constructor
+ // ===========
+ ModelLoader::ModelLoader(System* system) : system(system)
+ {
+ LOGENTRY(1, "ModelLoader::constructor");
+
+
+ LOGEXIT(1, "ModelLoader::constructor");
+ }
+
+ // ==========
+ // Destructor
+ // ==========
+ ModelLoader::~ModelLoader()
+ {
+ }
+
+ // =========================================================
+ // load: Load the runtime model from the deployed xml files
+ // This class has the responsibility for translating from
+ // the SCA scdl files to the SCA runtime's in memory model.
+ // =========================================================
+ void ModelLoader::load(const string& configurationRoot)
+ {
+ LOGENTRY(1, "ModelLoader::load");
+ LOGINFO_1(2,"configuration root: %s", configurationRoot.c_str());
+
+ // The configuration root path will point to a directory structure:
+ // root/
+ // The sca.subsystem files can be located anywhere under this directory
+ // structure.
+ loadSubsystems(configurationRoot);
+
+ // sca.module files represent the root of a module, and can occur anywhere
+ // under the directory structure
+ loadModules(configurationRoot);
+
+ system->resolveWires();
+ LOGEXIT(1, "ModelLoader::load");
+ }
+
+ // ========================================================================
+ // loadSubsystems:
+ // Load all the subsystems from any directory below the configuration root.
+ // Translate the subsystem information to the runtime information
+ // ========================================================================
+ void ModelLoader::loadSubsystems(const string& configurationRoot)
+ {
+ // Get all the sca.subsystem files in the module
+ LOGENTRY(1, "ModelLoader::loadSubsystems");
+ Files files(configurationRoot, "sca.subsystem", true);
+ for (unsigned int i=0; i < files.size(); i++)
+ {
+ loadSubsystemFile(files[i]);
+ }
+ LOGEXIT(1, "ModelLoader::loadSubsystems");
+ }
+
+
+ // =====================================================================
+ // loadSubsystemFile:
+ // This method is called for each sca.subsystem file found in the module
+ // folder structure
+ // =====================================================================
+ void ModelLoader::loadSubsystemFile(const File& file)
+ {
+ LOGENTRY(1, "ModelLoader::loadSubsystemFile");
+ LOGINFO_1(2, "subsystem filename: %s", file.getFileName().c_str());
+
+ try
+ {
+ string filename = file.getDirectory() + "/" + file.getFileName();
+ XMLDocumentPtr subsystemFile = getXMLHelper()->loadFile(filename.c_str());
+ if (subsystemFile->getRootDataObject() == 0)
+ {
+ LOGERROR_1(0, "ModelLoader::loadSubsystemFile: Unable to load file: %s", filename.c_str());
+ }
+ else
+ {
+ //Utils::printDO(subsystemFile->getRootDataObject());
+ mapSubsystem(subsystemFile->getRootDataObject());
+ }
+ } catch (SDORuntimeException ex)
+ {
+ LOGERROR_1(0, "ModelLoader::loadSubsytemFile: Exception caught: %s", ex.getMessageText());
+ }
+
+ LOGEXIT(1, "ModelLoader::loadSubsystemFile");
+ }
+
+ // ===============
+ // mapSubsystem:
+ // ===============
+ void ModelLoader::mapSubsystem(DataObjectPtr root)
+ {
+ LOGENTRY(1, "ModelLoader::mapSubsystem");
+
+ LOGINFO_1(2, "ModelLoader::mapSubsystem: Loaded subsystem: %s", root->getCString("name"));
+
+ Subsystem* subsystem;
+ subsystem = system->addSubsystem(root->getCString("name"));
+
+ DataObjectList& Modules = root->getList("moduleComponent");
+ LOGINFO_1(2, "ModelLoader::mapSubsystem: number of module components: %d", Modules.size());
+
+ // Iterate over module components
+ for (int i=0; i<Modules.size(); i++)
+ {
+ // Add each module component to the subsystem
+ Module* Module;
+ Module = subsystem->addModuleComponent(Modules[i]->getCString("name"), Modules[i]->getCString("module"));
+ }
+
+
+ /// @todo Add external services and entry points
+
+
+ LOGEXIT(1, "ModelLoader::mapSubsystem");
+ }
+
+
+ // =====================================================================
+ // loadModules:
+ // Load all the modules from any directory below the configuration root.
+ // Translate the module information to the runtime information
+ // =====================================================================
+ void ModelLoader::loadModules(const string& configurationRoot)
+ {
+ // Get all the sca.module files in the module
+ LOGENTRY(1, "ModelLoader::loadModules");
+ Files files(configurationRoot, "sca.module", true);
+ for (unsigned int i=0; i < files.size(); i++)
+ {
+ loadModuleFile(files[i]);
+ }
+ LOGEXIT(1, "ModelLoader::loadModules");
+ }
+
+
+ // ====================================================================
+ // loadModuleFile:
+ // This method is called for each sca.module file found in the module
+ // folder structure
+ // The location of this module file will indicate the root of a module
+ // ====================================================================
+ void ModelLoader::loadModuleFile(const File& file)
+ {
+ LOGENTRY(1, "ModelLoader::loadModuleFile");
+ LOGINFO_1(2, "module filename: %s", file.getFileName().c_str());
+
+ try
+ {
+ string filename = file.getDirectory() + "/" + file.getFileName();
+
+ XMLDocumentPtr moduleFile = getXMLHelper()->loadFile(filename.c_str());
+ if (moduleFile->getRootDataObject() == 0)
+ {
+ LOGERROR_1(0, "ModelLoader::loadModuleFile: Unable to load file: %s", filename.c_str());
+ }
+ else
+ {
+ string moduleName = moduleFile->getRootDataObject()->getCString("name");
+ mapModule(moduleName, moduleFile->getRootDataObject(), file.getDirectory());
+
+ // --------------------------------------------------------------
+ // Load any module Fragments in the same folder as the sca.module
+ // --------------------------------------------------------------
+ Files files(file.getDirectory(), "*.fragment", false);
+ for (unsigned int i=0; i < files.size(); i++)
+ {
+ filename = file.getDirectory() + "/" + files[i].getFileName();
+ moduleFile = getXMLHelper()->loadFile(filename.c_str());
+ if (moduleFile->getRootDataObject() == 0)
+ {
+ LOGERROR_1(0, "ModelLoader::loadModuleFile: Unable to load file: %s", filename.c_str());
+ }
+ else
+ {
+ mapModule(moduleName, moduleFile->getRootDataObject(), file.getDirectory());
+ }
+ }
+
+ // Load the xsd types and wsdl files in the module
+ loadModuleConfig(file.getDirectory(), moduleName);
+ }
+
+ } catch (SDORuntimeException ex)
+ {
+ LOGERROR_1(0, "ModelLoader::loadModuleFile: Exception caught: %s", ex.getMessageText());
+ }
+
+ LOGEXIT(1, "ModelLoader::loadModuleFile");
+ }
+
+ // ===========
+ // mapModule
+ // ===========
+ void ModelLoader::mapModule(const string& moduleName, DataObjectPtr root, string moduleRootDir)
+ {
+ LOGENTRY(1, "ModelLoader::mapModule");
+
+ LOGINFO_2(2, "ModelLoader::mapModule: Loading module: %s, root Dir: %s", moduleName.c_str(), moduleRootDir.c_str());
+
+ // Find the ModuleComponent(s) that refer to this module. If a ModuleComponent does not refer to this
+ // module then ignore it
+ MODULE_LIST moduleList = system->findModules(moduleName);
+ MODULE_LIST::iterator moduleIter;
+
+ for (moduleIter = moduleList.begin();
+ moduleIter != moduleList.end();
+ moduleIter++ )
+ {
+ LOGINFO_1(2, "ModelLoader::mapModule: Loading module details for module component: %s", (*moduleIter)->getName().c_str());
+
+ string message; // for exceptions
+ // Set module root
+ (*moduleIter)->setRoot(moduleRootDir);
+
+ // ----------------------------
+ // Add components to the module
+ // ----------------------------
+ DataObjectList& componentList = root->getList("component");
+ int i;
+ for (i=0; i < componentList.size(); i++)
+ {
+ addComponent(*moduleIter, componentList[i]);
+ }
+
+ // ------------
+ // Entry points
+ // ------------
+ DataObjectList& entryPointList = root->getList("entryPoint");
+ for (i=0; i < entryPointList.size(); i++)
+ {
+ addEntryPoint(*moduleIter, entryPointList[i]);
+ }
+
+
+ // -----------------
+ // External services
+ // -----------------
+ DataObjectList& externalServiceList = root->getList("externalService");
+ for (i=0; i < externalServiceList.size(); i++)
+ {
+ addExternalService(*moduleIter, externalServiceList[i]);
+ }
+
+ // -----
+ // Wires
+ // -----
+ DataObjectList& wireList = root->getList("wire");
+ for (int l=0; l < wireList.size(); l++)
+ {
+ string source = wireList[l]->getCString("sourceUri");
+ string target = wireList[l]->getCString("targetUri");
+ (*moduleIter)->addWire(source, target);
+ }
+
+ }
+
+ LOGEXIT(1, "ModelLoader::mapModule");
+ }
+
+ // =================================
+ // addComponent:
+ // =================================
+ void ModelLoader::addComponent(Module* module, DataObjectPtr componentDO)
+ {
+ Component* component = module->addComponent(componentDO->getCString("name"));
+
+ string message;
+
+ // -------------------
+ // Implementation type
+ // -------------------
+ DataObjectPtr impl = componentDO->getDataObject("implementation");
+ if (!impl)
+ {
+ message = "No implementation for component: ";
+ message = message + componentDO->getCString("name");
+ throw SystemConfigurationException(message.c_str());
+ }
+ // Determine the type
+ string componentTypeName;
+ string componentTypePath;
+ string implType = impl->getType().getName();
+ if (implType == "CPPImplementation")
+ {
+ string dll = impl->getCString("dll");
+ string header = impl->getCString("header");
+ string className = impl->getCString("class");
+ CPPImplementation* cppImpl = new CPPImplementation(dll, header, className);
+ componentTypePath = cppImpl->getHeaderPath();
+ componentTypeName = cppImpl->getHeaderStub();
+ component->setImplementation(cppImpl);
+
+ }
+ else if (implType == "JavaImplementation")
+ {
+ }
+
+ // -----------------------
+ // Load the .componentType
+ // -----------------------
+ string typeFileName = module->getRoot() + "/" + componentTypePath + componentTypeName + ".componentType";
+ try
+ {
+ XMLDocumentPtr componentTypeFile = getXMLHelper()->loadFile(typeFileName.c_str());
+ if (componentTypeFile->getRootDataObject() == 0)
+ {
+ LOGERROR_1(0, "ModelLoader::mapModule: Unable to load file: %s", typeFileName.c_str());
+ }
+ else
+ {
+ //Utils::printDO(componentTypeFile->getRootDataObject());
+ //commonj::sdo::SDOUtils::printDataObject(componentTypeFile->getRootDataObject());
+ addServices(component, componentTypeFile->getRootDataObject());
+ addReferences(component, componentTypeFile->getRootDataObject());
+ addProperties(component, componentTypeFile->getRootDataObject());
+ }
+ } catch (SDORuntimeException& ex)
+ {
+ LOGERROR_1(0, "ModelLoader::mapModule: Exception caught: %s", ex.getMessageText());
+ throw SystemConfigurationException(ex.getMessageText());
+ }
+
+ // ----------
+ // Properties
+ // ----------
+ DataObjectPtr props = componentDO->getDataObject("properties");
+ component->addProperties(props);
+
+ // ----------
+ // References
+ // ----------
+ DataObjectPtr refs = componentDO->getDataObject("references");
+ if (refs)
+ {
+ PropertyList pl = refs->getInstanceProperties();
+ for (int refI=0; refI < pl.size(); refI++)
+ {
+ // ----------------------------------------------------------
+ // Add the reference to the module wires to be resolved later
+ // ----------------------------------------------------------
+ string refName = pl[refI].getName();
+ if (!component->findReference(pl[refI].getName()))
+ {
+ // Configuration error: reference is not defined
+ message = "Undefined reference: " + refName;
+ throw SystemConfigurationException(message.c_str());
+ }
+
+ string src = component->getName() + "/" + refName;
+
+ // The reflist below is a list of open data objects
+ DataObjectList& reflist = refs->getList(pl[refI]);
+ for (int refslistI=0; refslistI<reflist.size(); refslistI++)
+ {
+ // Get the reference value
+ string refValue = reflist.getDataObject(refslistI)->getSequence()->getCStringValue(0);
+ module->addWire(src, refValue);
+ }
+ }
+ }
+ }
+
+
+ // =====================================================================
+ // addServices: add the services from the componentType to the component
+ // =====================================================================
+ void ModelLoader::addServices(Component* component, DataObjectPtr componentType)
+ {
+ DataObjectList& services = componentType->getList("service");
+ for (int i=0; i<services.size(); i++)
+ {
+ Service* service = component->addService(services[i]->getCString("name"));
+ service->setInterface(getInterface(services[i]));
+ }
+ }
+
+ // ===================================================
+ // addReferences: add the references to the component
+ // ===================================================
+ void ModelLoader::addReferences(Component* component, DataObjectPtr componentType)
+ {
+ DataObjectList& refs = componentType->getList("reference");
+ for (int i=0; i<refs.size(); i++)
+ {
+ ServiceReference* serviceRef = component->addReference(refs[i]->getCString("name"));
+ string multiplicity = "1..1";
+ if (refs[i]->isSet("multiplicity"))
+ {
+ multiplicity = refs[i]->getCString("multiplicity");
+ }
+ serviceRef->setMultiplicity(multiplicity);
+ serviceRef->setInterface(getInterface(refs[i]));
+ }
+ }
+
+
+ // ==============
+ // getInterface
+ // ==============
+ Interface* ModelLoader::getInterface(DataObjectPtr obj)
+ {
+ // -----------------
+ // get the interface
+ // -----------------
+ DataObjectPtr iface = obj->getDataObject("interface");
+ if (!iface)
+ {
+ string message = "No interface for: ";
+ message = message + obj->getCString("name");
+ throw SystemConfigurationException(message.c_str());
+ }
+
+ // Determine the type
+ string componentTypeName;
+ string ifType = iface->getType().getName();
+ if (ifType == "CPPInterface")
+ {
+ string header = iface->getCString("header");
+ string className = iface->getCString("class");
+ string scope = iface->getCString("scope");
+ bool remotable = iface->getBoolean("remotable");
+
+ return new CPPInterface(header, className, scope, remotable);
+ }
+ else
+ {
+ // Error?
+ return 0;
+ }
+ }
+
+ // ==============================================
+ // addProperties: add Properties to the component
+ // ==============================================
+ void ModelLoader::addProperties(Component* component, DataObjectPtr componentType)
+ {
+ DataObjectList& props = componentType->getList("property");
+ for (int i=0; i<props.size(); i++)
+ {
+ string name = props[i]->getCString("name");
+ string type = props[i]->getCString("type");
+ bool many=false;
+ if (props[i]->isSet("many"))
+ {
+ many = props[i]->getBoolean("many");
+ }
+
+ bool required=false;
+ if (props[i]->isSet("required"))
+ {
+ many = props[i]->getBoolean("required");
+ }
+
+ const char* defaultValue = 0;
+ if (props[i]->isSet("default"))
+ {
+ defaultValue = props[i]->getCString("default");
+ }
+
+ component->addProperty(name, type, many, required, defaultValue);
+ }
+ }
+
+ // ===============================================
+ // addEntryPoint: add an EntryPoint to the module
+ // ===============================================
+ void ModelLoader::addEntryPoint(Module* module, DataObjectPtr entryPointDO)
+ {
+ string message;
+
+ //Utils::printDO(entryPointDO);
+ EntryPoint* entryPoint = module->addEntryPoint(entryPointDO->getCString("name"));
+
+ string multiplicity = "1..1";
+ if (entryPointDO->isSet("multiplicity"))
+ {
+ multiplicity = entryPointDO->getCString("multiplicity");
+ }
+
+ entryPoint->setMultiplicity(multiplicity);
+ entryPoint->setInterface(getInterface(entryPointDO));
+
+ DataObjectList& refs = entryPointDO->getList("reference");
+ for (int i=0; i<refs.size(); i++)
+ {
+ // ----------------------------------------------------------
+ // Add the reference to the module wires to be resolved later
+ // ----------------------------------------------------------
+ string targ = refs.getCString(i);
+ module->addWire(entryPoint->getName(), targ);
+ }
+
+ // Get binding, it will be the first and only binding
+ DataObjectPtr binding = entryPointDO->getList("binding")[0];
+ if (!binding)
+ {
+ message = "No binding for entryPoint: ";
+ message = message + entryPointDO->getCString("name");
+ throw SystemConfigurationException(message.c_str());
+ }
+
+ // Utils::printDO(binding);
+
+ string uri = binding->getCString("uri");
+
+ // Determine the binding type
+ string bindingType = binding->getType().getName();
+ if (bindingType == "WebServiceBinding")
+ {
+ string port = binding->getCString("port");
+
+ WSBinding* wsBinding = new WSBinding(uri,port);
+
+ entryPoint->setBinding(wsBinding);
+
+ }
+ else if (bindingType == "SCABinding")
+ {
+ message = "SCA binding not yet implemented. Binding is for entryPoint: ";
+ message = message + entryPointDO->getCString("name");
+ throw SystemConfigurationException(message.c_str());
+ }
+ }
+
+
+ // =========================================================
+ // addExternalService: add an ExternalService to the module
+ // =========================================================
+ void ModelLoader::addExternalService(Module* module, DataObjectPtr externalServiceDO)
+ {
+ string message;
+
+ ExternalService* externalService = module->addExternalService(externalServiceDO->getCString("name"));
+ // Add the interface
+ externalService->setInterface(getInterface(externalServiceDO));
+
+ // Get binding, it will be the first and only binding
+ DataObjectPtr binding = externalServiceDO->getList("binding")[0];
+ if (!binding)
+ {
+ message = "No binding for externalService: ";
+ message = message + externalServiceDO->getCString("name");
+ throw SystemConfigurationException(message.c_str());
+ }
+
+ //Utils::printDO(binding);
+
+ string uri = binding->getCString("uri");
+
+ // Determine the binding type
+ string bindingType = binding->getType().getName();
+ if (bindingType == "WebServiceBinding")
+ {
+ string port = binding->getCString("port");
+
+ WSBinding* wsBinding = new WSBinding(uri,port);
+
+ externalService->setBinding(wsBinding);
+
+ }
+ else if (bindingType == "SCABinding")
+ {
+ }
+ }
+
+
+
+ ///
+ /// Use the Tuscany-model.config file in the module root directory to
+ /// determine which xsds and wsdls to load into a dataFactory.
+ ///
+ void ModelLoader::loadModuleConfig(const string &moduleRootDir, const string &moduleName)
+ {
+ LOGENTRY(1, "ModelLoader::loadModuleConfig");
+
+ // Load the "Tuscany-model.config" file, if it exists
+ Files files(moduleRootDir, "Tuscany-model.config", false);
+ for (unsigned int i=0; i < files.size(); i++)
+ {
+ string filename = moduleRootDir + "/" + files[i].getFileName();
+ XMLDocumentPtr moduleConfigFile = getXMLHelper()->loadFile(filename.c_str());
+ if (moduleConfigFile->getRootDataObject() == 0)
+ {
+ LOGERROR_1(0, "ModelLoader::loadModuleConfig: Unable to load file: %s", filename.c_str());
+ }
+ else
+ {
+ LOGINFO_2(2, "ModelLoader::loadModuleConfig: Loading module config for: %s, root Dir: %s", moduleName.c_str(), moduleRootDir.c_str());
+
+ if(moduleConfigFile->getRootDataObject()->isSet("xsd"))
+ {
+ DataObjectList& xsds = moduleConfigFile->getRootDataObject()->getList("xsd/file");
+
+ for (int i=0; i<xsds.size(); i++)
+ {
+ if(xsds[i]->isSet("name"))
+ {
+ // Load a xsd file -> set the types in the moduleComponents data factory file
+ string xsdName = moduleRootDir + "/" +xsds[i]->getCString("name");
+ loadTypes(xsdName.c_str(), moduleName);
+ }
+ }
+ }
+
+
+ if( moduleConfigFile->getRootDataObject()->isSet("wsdl"))
+ {
+ DataObjectList& wsdls = moduleConfigFile->getRootDataObject()->getList("wsdl/file");
+ for (int j=0; j<wsdls.size(); j++)
+ {
+ if(wsdls[i]->isSet("name"))
+ {
+ string wsdlName = moduleRootDir + "/" +wsdls[j]->getCString("name");
+ // Load a wsdl file -> get the types, then the contents of the wsdl
+ loadTypes(wsdlName.c_str(), moduleName);
+
+ // Load the contents of the wsdl files
+ loadWsdl(wsdlName.c_str(), moduleName);
+ }
+ }
+ }
+ }
+ }
+
+
+ LOGEXIT(1, "ModelLoader::loadModuleConfig");
+ }
+
+
+ ///
+ /// Use the types from an xsd or wsdl file
+ ///
+ void ModelLoader::loadTypes(const char *fileName, const string &moduleName)
+ {
+ LOGENTRY(1, "ModelLoader::loadTypes");
+
+ // Load a xsd file -> set the types in the moduleComponents data factory file
+
+ MODULE_LIST moduleList = system->findModules(moduleName);
+ MODULE_LIST::iterator moduleIter;
+
+ for (moduleIter = moduleList.begin();
+ moduleIter != moduleList.end();
+ moduleIter++ )
+ {
+ try {
+ (*moduleIter)->getXSDHelper()->defineFile(fileName);
+ //Utils::printTypes((*moduleIter)->getXSDHelper()->getDataFactory());
+
+ } catch (SDOTypeNotFoundException ex)
+ {
+ LOGERROR_1(0, "ModuleLoader: Exception caught: %s", ex.getMessageText());
+ throw ex;
+ }
+ }
+ LOGEXIT(1, "ModelLoader::loadTypes");
+ }
+
+ ///
+ /// Load the web services definition from a wsdl
+ ///
+ void ModelLoader::loadWsdl(const char *fileName, const string &moduleName)
+ {
+ LOGENTRY(1, "ModelLoader::loadWsdl");
+
+ try {
+ // Load the wsdl file
+ XMLDocumentPtr doc = getXMLHelper()->loadFile(fileName);
+
+ if (doc!=0 && doc->getRootDataObject()!=0)
+ {
+ //Utils::printDO(doc->getRootDataObject());
+ MODULE_LIST moduleList = system->findModules(moduleName);
+ MODULE_LIST::iterator moduleIter;
+
+ for (moduleIter = moduleList.begin();
+ moduleIter != moduleList.end();
+ moduleIter++ )
+ {
+ // Add the root object to the module
+ (*moduleIter)->addWsdl(doc->getRootDataObject());
+
+ }
+
+ }
+ else
+ {
+ LOGERROR_1(0, "ModuleLoader: Unable to load or parse WSDL %s", fileName);
+ }
+
+ } catch (SDOTypeNotFoundException ex)
+ {
+ LOGERROR_1(0, "ModelLoader: SDOTypeNotFoundException caught: %s", ex.getMessageText());
+ throw ex;
+ }
+ catch (SDONullPointerException ex)
+ {
+ LOGERROR_1(0, "ModelLoader: SDONullPointerException caught: %s", ex.getMessageText());
+ throw ex;
+ }
+ LOGEXIT(1, "ModelLoader::loadWsdl");
+
+ }
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Methods used to load the model into memory
+ //////////////////////////////////////////////////////////////////////////////
+
+ ///
+ /// Get an XSDHelper that has the appropriate XSDs already loaded
+ ///
+ const XSDHelperPtr ModelLoader::getXSDHelper()
+ {
+ if (myXSDHelper == 0)
+ {
+
+ // Create an xsd helper
+ myXSDHelper = HelperProvider::getXSDHelper();
+
+ // Now add to it some xsd files
+ try {
+ string root = SCARuntime::getInstance()->getInstallRoot();
+ string filename = root + "/xsd/sca.xsd";
+
+ myXSDHelper->defineFile(filename.c_str());
+
+ // Tuscany specific xsd for config files
+ filename = root + "/xsd/tuscany.xsd";
+ myXSDHelper->defineFile(filename.c_str());
+
+ loadWSDLTypes(myXSDHelper);
+
+ } catch (SDOTypeNotFoundException ex)
+ {
+ LOGERROR_1(0, "ModuleLoader: Exception caught: %s", ex.getMessageText());
+ throw ex;
+ }
+ }
+
+
+ return myXSDHelper;
+ }
+
+
+ ///
+ /// Get an XMLHelper to load files
+ ///
+ const XMLHelperPtr ModelLoader::getXMLHelper()
+ {
+ if (myXMLHelper == 0) {
+
+ // Create an xml helper
+ myXMLHelper = HelperProvider::getXMLHelper(getXSDHelper()->getDataFactory());
+
+ }
+
+ return myXMLHelper;
+ }
+
+ void ModelLoader::loadWSDLTypes(XSDHelperPtr xsdHelper)
+ {
+ DataFactoryPtr dataFactory = xsdHelper->getDataFactory();
+
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "RootType",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tBinding",
+ false, true, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationFault",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationMessage",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tDefinitions",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tDocumentation",
+ true, true, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tDocumented",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement",
+ false, false, true);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented",
+ false, true, true);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented",
+ false, true, true);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tFault",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tImport",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tMessage",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tOperation",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tParam",
+ false, false, false);
+
+
+ TypeDefinition tpart;
+ tpart.setUri("http://schemas.xmlsoap.org/wsdl/");
+ tpart.setName("tPart");
+ tpart.setParentType("http://schemas.xmlsoap.org/wsdl/",
+ "tExtensibleAttributesDocumented", false);
+ PropertyDefinition propdef;
+ propdef.setName("name");
+ propdef.setLocalName("name");
+ propdef.setType("commonj.sdo", "String");
+ propdef.setIsContainment(true);
+ tpart.addPropertyDefinition(propdef);
+ propdef.setName("element");
+ propdef.setLocalName("element");
+ propdef.setIsQName(true);
+ tpart.addPropertyDefinition(propdef);
+ propdef.setName("type");
+ propdef.setLocalName("type");
+ tpart.addPropertyDefinition(propdef);
+ TypeDefinitions typedefs;
+ typedefs.addTypeDefinition(tpart);
+ xsdHelper->defineTypes(typedefs);
+
+ //Utils::printTypes(dataFactory);
+ /*dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tPart",
+ false, false, false);*/
+
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tPort",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tPortType",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tService",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/", "tTypes",
+ false, false, false);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "RootType",
+ "definitions",
+ "http://schemas.xmlsoap.org/wsdl/", "tDefinitions",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "RootType",
+ "import",
+ "http://schemas.xmlsoap.org/wsdl/", "tImport",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "RootType",
+ "types",
+ "http://schemas.xmlsoap.org/wsdl/", "tTypes",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "RootType",
+ "message",
+ "http://schemas.xmlsoap.org/wsdl/", "tMessage",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "RootType",
+ "portType",
+ "http://schemas.xmlsoap.org/wsdl/", "tPortType",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "RootType",
+ "binding",
+ "http://schemas.xmlsoap.org/wsdl/", "tBinding",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "RootType",
+ "service",
+ "http://schemas.xmlsoap.org/wsdl/", "tService",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "RootType",
+ "input",
+ "http://schemas.xmlsoap.org/wsdl/", "tParam",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "RootType",
+ "output",
+ "http://schemas.xmlsoap.org/wsdl/", "tParam",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "RootType",
+ "fault",
+ "http://schemas.xmlsoap.org/wsdl/", "tFault",
+ true, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "RootType",
+ "output",
+ "http://schemas.xmlsoap.org/wsdl/", "tParam",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "RootType",
+ "input",
+ "http://schemas.xmlsoap.org/wsdl/", "tParam",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "RootType",
+ "fault",
+ "http://schemas.xmlsoap.org/wsdl/", "tFault",
+ true, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "RootType",
+ "arrayType",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "RootType",
+ "required",
+ "commonj.sdo", "Boolean",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tBinding",
+ "operation",
+ "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation",
+ true, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tBinding",
+ "name",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tBinding",
+ "type",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation",
+ "input",
+ "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationMessage",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation",
+ "output",
+ "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationMessage",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation",
+ "fault",
+ "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationFault",
+ true, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tBindingOperation",
+ "name",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationFault",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationFault",
+ "name",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationMessage",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tBindingOperationMessage",
+ "name",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/", "tDefinitions",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tDefinitions",
+ "import",
+ "http://schemas.xmlsoap.org/wsdl/", "tImport",
+ true, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tDefinitions",
+ "types",
+ "http://schemas.xmlsoap.org/wsdl/", "tTypes",
+ true, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tDefinitions",
+ "message",
+ "http://schemas.xmlsoap.org/wsdl/", "tMessage",
+ true, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tDefinitions",
+ "portType",
+ "http://schemas.xmlsoap.org/wsdl/", "tPortType",
+ true, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tDefinitions",
+ "binding",
+ "http://schemas.xmlsoap.org/wsdl/", "tBinding",
+ true, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tDefinitions",
+ "service",
+ "http://schemas.xmlsoap.org/wsdl/", "tService",
+ true, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tDefinitions",
+ "targetNamespace",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tDefinitions",
+ "name",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tDocumented",
+ "documentation",
+ "http://schemas.xmlsoap.org/wsdl/", "tDocumentation",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement",
+ "required",
+ "commonj.sdo", "Boolean",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented",
+ "http://schemas.xmlsoap.org/wsdl/", "tDocumented");
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented",
+ "http://schemas.xmlsoap.org/wsdl/", "tDocumented");
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/", "tFault",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tFault",
+ "name",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tFault",
+ "message",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/", "tImport",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tImport",
+ "namespace",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tImport",
+ "location",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/", "tMessage",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tMessage",
+ "part",
+ "http://schemas.xmlsoap.org/wsdl/", "tPart",
+ true, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tMessage",
+ "name",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/", "tOperation",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tOperation",
+ "input",
+ "http://schemas.xmlsoap.org/wsdl/", "tParam",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tOperation",
+ "output",
+ "http://schemas.xmlsoap.org/wsdl/", "tParam",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tOperation",
+ "fault",
+ "http://schemas.xmlsoap.org/wsdl/", "tFault",
+ true, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tOperation",
+ "name",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tOperation",
+ "parameterOrder",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/", "tParam",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tParam",
+ "name",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tParam",
+ "message",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/", "tPart",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented");
+ /*dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tPart",
+ "name",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tPart",
+ "element",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tPart",
+ "type",
+ "commonj.sdo", "URI",
+ false, false, true);*/
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/", "tPort",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tPort",
+ "name",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tPort",
+ "binding",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/", "tPortType",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleAttributesDocumented");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tPortType",
+ "operation",
+ "http://schemas.xmlsoap.org/wsdl/", "tOperation",
+ true, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tPortType",
+ "name",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/", "tService",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tService",
+ "port",
+ "http://schemas.xmlsoap.org/wsdl/", "tPort",
+ true, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/", "tService",
+ "name",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/", "tTypes",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibleDocumented");
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "RootType",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tAddress",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tBinding",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tBody",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tFault",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes",
+ false, false, true);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tOperation",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tStyleChoice",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice",
+ false, false, false);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "RootType",
+ "binding",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tBinding",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "RootType",
+ "operation",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tOperation",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "RootType",
+ "body",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tBody",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "RootType",
+ "encodingStyle",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "RootType",
+ "use",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "RootType",
+ "namespace",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "RootType",
+ "fault",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tFault",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "RootType",
+ "header",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "RootType",
+ "message",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "RootType",
+ "part",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "RootType",
+ "use",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "RootType",
+ "encodingStyle",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "RootType",
+ "namespace",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "RootType",
+ "headerfault",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "RootType",
+ "address",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tAddress",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tAddress",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tAddress",
+ "location",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tBinding",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tBinding",
+ "transport",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tBinding",
+ "style",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tStyleChoice",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tBody",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tBody",
+ "parts",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tBody",
+ "encodingStyle",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tBody",
+ "use",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tBody",
+ "namespace",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tFault",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tFault",
+ "name",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tBody");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes",
+ "required",
+ "commonj.sdo", "Boolean",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes",
+ "parts",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes",
+ "encodingStyle",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes",
+ "use",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tFaultRes",
+ "namespace",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader",
+ "headerfault",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault",
+ true, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader",
+ "message",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader",
+ "part",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader",
+ "use",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader",
+ "encodingStyle",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tHeader",
+ "namespace",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault",
+ "message",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault",
+ "part",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault",
+ "use",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault",
+ "encodingStyle",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "encodingStyle",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tHeaderFault",
+ "namespace",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tOperation",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tOperation",
+ "soapAction",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tOperation",
+ "style",
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tStyleChoice",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "tStyleChoice",
+ "commonj.sdo", "String");
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap/", "useChoice",
+ "commonj.sdo", "String");
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/http/", "RootType",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/http/", "addressType",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/http/", "bindingType",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/http/", "operationType",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/http/", "urlEncoded",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/http/", "urlReplacement",
+ false, false, false);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/http/", "RootType",
+ "address",
+ "http://schemas.xmlsoap.org/wsdl/http/", "addressType",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/http/", "RootType",
+ "binding",
+ "http://schemas.xmlsoap.org/wsdl/http/", "bindingType",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/http/", "RootType",
+ "operation",
+ "http://schemas.xmlsoap.org/wsdl/http/", "operationType",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/http/", "RootType",
+ "urlEncoded",
+ "http://schemas.xmlsoap.org/wsdl/http/", "urlEncoded",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/http/", "RootType",
+ "urlReplacement",
+ "http://schemas.xmlsoap.org/wsdl/http/", "urlReplacement",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/http/", "addressType",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/http/", "addressType",
+ "location",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/http/", "bindingType",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/http/", "bindingType",
+ "verb",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/http/", "operationType",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/http/", "operationType",
+ "location",
+ "commonj.sdo", "URI",
+ false, false, true);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/mime/", "RootType",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/mime/", "contentType",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/mime/", "multipartRelatedType",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/mime/", "tMimeXml",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/mime/", "tPart",
+ false, true, false);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/mime/", "RootType",
+ "content",
+ "http://schemas.xmlsoap.org/wsdl/mime/", "contentType",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/mime/", "RootType",
+ "multipartRelated",
+ "http://schemas.xmlsoap.org/wsdl/mime/", "multipartRelatedType",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/mime/", "RootType",
+ "mimeXml",
+ "http://schemas.xmlsoap.org/wsdl/mime/", "tMimeXml",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/mime/", "contentType",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/mime/", "contentType",
+ "type",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/mime/", "contentType",
+ "part",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/mime/", "multipartRelatedType",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/mime/", "multipartRelatedType",
+ "part",
+ "http://schemas.xmlsoap.org/wsdl/mime/", "tPart",
+ true, false, true);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/mime/", "tMimeXml",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement");
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/mime/", "tMimeXml",
+ "part",
+ "commonj.sdo", "String",
+ false, false, true);
+ dataFactory->addPropertyToType(
+ "http://schemas.xmlsoap.org/wsdl/mime/", "tPart",
+ "name",
+ "commonj.sdo", "String",
+ false, false, true);
+
+
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "RootType",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tAddress",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tBinding",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tBody",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tExtensibilityElementOpenAttrs",
+ false, true, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tFault",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tFaultRes",
+ false, false, true);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tHeader",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tHeaderFault",
+ false, true, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tOperation",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tParts",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tStyleChoice",
+ false, false, false);
+ dataFactory->addType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "useChoice",
+ false, false, false);
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tAddress",
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tExtensibilityElementOpenAttrs");
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tBinding",
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tExtensibilityElementOpenAttrs");
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tBody",
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tExtensibilityElementOpenAttrs");
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tExtensibilityElementOpenAttrs",
+ "http://schemas.xmlsoap.org/wsdl/", "tExtensibilityElement");
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tFault",
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tFaultRes");
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tFaultRes",
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tBody");
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tHeader",
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tExtensibilityElementOpenAttrs");
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tOperation",
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tExtensibilityElementOpenAttrs");
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "tStyleChoice",
+ "commonj.sdo", "String");
+ dataFactory->setBaseType(
+ "http://schemas.xmlsoap.org/wsdl/soap12/", "useChoice",
+ "commonj.sdo", "String");
+ }
+
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ModelLoader.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ModelLoader.h
new file mode 100644
index 0000000000..97478748e9
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ModelLoader.h
@@ -0,0 +1,105 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_modelloader_h
+#define tuscany_sca_model_modelloader_h
+
+#include "osoa/sca/export.h"
+#include "commonj/sdo/SDO.h"
+using commonj::sdo::DataObjectPtr;
+using commonj::sdo::DataFactoryPtr;
+using commonj::sdo::XSDHelperPtr;
+
+#include "tuscany/sca/model/System.h"
+#include "tuscany/sca/model/Subsystem.h"
+
+#include "tuscany/sca/util/File.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+ /**
+ * Provides methods to load the runtime model from the SCDL file.
+ */
+ class ModelLoader {
+ public:
+ /**
+ * Constructor.
+ * @param system The SCA system to load.
+ */
+ ModelLoader(System* system);
+
+ /**
+ * Destructor.
+ */
+ virtual ~ModelLoader();
+
+ /**
+ * Load the model from the configuration information.
+ * @param configurationRoot The location of the deployed SCA
+ * modules and subsystems.
+ */
+ void load(const string& configurationRoot);
+
+ private:
+ System* system;
+ void loadModule(const char *moduleRoot);
+
+
+ commonj::sdo::XMLHelperPtr myXMLHelper; // Used to load scdl files
+ commonj::sdo::XSDHelperPtr myXSDHelper; // Used to load xsds
+ const commonj::sdo::XSDHelperPtr getXSDHelper(void);
+ const commonj::sdo::XMLHelperPtr getXMLHelper(void);
+
+ void loadSubsystems(const string& configurationRoot);
+ void loadSubsystemFile(const File& file);
+ void mapSubsystem(commonj::sdo::DataObjectPtr rootDO);
+
+ void loadModules(const string& configurationRoot);
+ void loadModuleFile(const File& file);
+ void mapModule(const string& moduleName, commonj::sdo::DataObjectPtr rootDO, std::string moduleRootDir);
+
+ void addComponent(Module* module, DataObjectPtr componentDO);
+ void addEntryPoint(Module* module, DataObjectPtr entryPointDO);
+ void addExternalService(Module* module, DataObjectPtr externalServiceDO);
+
+ void addServices(Component* component, DataObjectPtr componentType);
+ void addReferences(Component* component, DataObjectPtr componentType);
+ void addProperties(Component* component, DataObjectPtr componentType);
+
+
+ void loadModuleConfig(const string &moduleRootDir, const string &moduleName);
+ void loadTypes(const char *fileName, const string &moduleName);
+ void loadWsdl(const char *fileName, const string &moduleName);
+
+ void loadWSDLTypes(XSDHelperPtr xsdHelper);
+
+ Interface* getInterface(DataObjectPtr obj);
+
+
+ };
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_modelloader_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Module.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Module.cpp
new file mode 100644
index 0000000000..fc8b6b1eb8
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Module.cpp
@@ -0,0 +1,235 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Utils.h"
+#include "tuscany/sca/model/Module.h"
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ namespace model
+ {
+
+ // Constructor
+ Module::Module(const std::string& moduleName)
+ : name(moduleName)
+ {
+ LOGENTRY(1, "Module::constructor");
+ LOGEXIT(1, "Module::constructor");
+ }
+
+ Module::~Module()
+ {
+ }
+
+ void Module::setRoot(const std::string& rootDirectory)
+ {
+ moduleRoot = rootDirectory;
+ }
+
+
+ ///
+ /// Add a new component to the module component
+ ///
+ Component* Module::addComponent(const std::string& name)
+ {
+ LOGENTRY(1, "Module::addComponent");
+ Component* newComponent = new Component(name, this);
+ components[name] = newComponent;
+ LOGEXIT(1, "Module::addComponent");
+ return newComponent;
+ }
+
+ Component* Module::findComponent(const std::string& name)
+ {
+ LOGENTRY(1, "Module::findComponent");
+ Component* foundComponent = components[name];
+ LOGEXIT(1, "Module::findComponent");
+ return foundComponent;
+ }
+
+ Service* Module::findComponentService(const std::string& name)
+ {
+ LOGENTRY(1, "Module::findComponentService");
+
+ Service* service = 0;
+
+ string componentName;
+ string serviceName;
+ Utils::tokeniseUri(name, componentName, serviceName);
+
+ // Locate the component
+ Component* foundComponent = components[componentName];
+ if (foundComponent)
+ {
+ // Locate the service
+ service = foundComponent->findService(serviceName);
+ }
+ LOGEXIT(1, "Module::findComponentService");
+ return service;
+ }
+
+ ExternalService* Module::findExternalService(const std::string& name)
+ {
+ LOGENTRY(1, "Module::findExternalService");
+ ExternalService* foundService = externalServices[name];
+ LOGEXIT(1, "Module::findExternalService");
+ return foundService;
+ }
+
+
+ EntryPoint* Module::addEntryPoint(const std::string& name)
+ {
+ LOGENTRY(1, "Module::addEntryPoint");
+ EntryPoint* ep = new EntryPoint(name);
+ entryPoints[name] = ep;
+ LOGEXIT(1, "Module::addEntryPoint");
+ return findEntryPoint(name);
+ }
+
+ EntryPoint* Module::findEntryPoint(const std::string& name)
+ {
+ return entryPoints[name];
+ }
+
+
+ ExternalService* Module::addExternalService(const std::string& name)
+ {
+ LOGENTRY(1, "Module::addExternalService");
+ ExternalService* es = new ExternalService(name, this);
+ externalServices[name] = es;
+ LOGEXIT(1, "Module::addExternalService");
+ return es;
+ }
+
+ void Module::addWire(const std::string& source, const std::string& target)
+ {
+ LOGENTRY(1, "Module::addWire");
+ wires.push_back(Wire(source, target));
+ LOGEXIT(1, "Module::addWire");
+ }
+
+
+ void Module::resolveWires()
+ {
+ LOGENTRY(1, "Module::resolveWires");
+ for (WIRES::iterator iter = wires.begin();
+ iter != wires.end();
+ iter++)
+ {
+ // -----------------
+ // Locate the target
+ // -----------------
+ WireTarget* target = findComponentService(iter->getTarget());
+ if (!target)
+ {
+ target = findExternalService(iter->getTarget());
+ }
+ if (!target)
+ {
+ LOGERROR_1(0, "Module::resolveWires: Wire target %s not found", iter->getTarget().c_str());
+ }
+ else
+ {
+ EntryPoint* entrypoint = findEntryPoint(iter->getSourceComponent());
+ if (entrypoint)
+ {
+ entrypoint->addTarget(target);
+ }
+ else
+ {
+ Component* component = findComponent(iter->getSourceComponent());
+ if (component)
+ {
+ ServiceReference* serviceReference = component->findReference(iter->getSourceReference());
+ if (serviceReference)
+ {
+ serviceReference->addTarget(target);
+ }
+ else
+ {
+ LOGERROR_1(0, "Module::resolveWires: Wire source reference %s not found", iter->getSourceReference().c_str());
+ }
+ }
+ else
+ {
+ LOGERROR_1(0, "Module::resolveWires: Wire source %s not found", iter->getSourceComponent().c_str());
+ }
+ }
+ }
+ }
+
+ LOGEXIT(1, "Module::resolveWires");
+ }
+
+
+
+ void Module::addWsdl(commonj::sdo::DataObjectPtr wsdlModel)
+ {
+ LOGENTRY(1, "Module::addWsdl");
+ Wsdl* wsdl = new Wsdl(wsdlModel);
+ wsdls[wsdl->getNamespace()] = wsdl;
+ LOGEXIT(1, "Module::addWsdl");
+
+ }
+
+ Wsdl* Module::findWsdl(const std::string& wsdlNamespace )
+ {
+ return wsdls[wsdlNamespace];
+
+ }
+
+
+ // Get an XSDHelper - one will be created for each module
+ commonj::sdo::XSDHelperPtr Module::getXSDHelper()
+ {
+ if (xsdHelper == 0)
+ {
+ xsdHelper = commonj::sdo::HelperProvider::getXSDHelper();
+ }
+
+ return xsdHelper;
+ }
+
+ // Get an XMLHelper - one will be created for each module
+ commonj::sdo::XMLHelperPtr Module::getXMLHelper()
+ {
+ if (xmlHelper == 0)
+ {
+ xmlHelper = commonj::sdo::HelperProvider::getXMLHelper(getXSDHelper()->getDataFactory());
+ }
+
+ return xmlHelper;
+ }
+
+
+ // Get a data factory - the one in the xsd/xml helper
+ commonj::sdo::DataFactoryPtr Module::getDataFactory()
+ {
+ return getXSDHelper()->getDataFactory();
+ }
+
+ } // End namespace model
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Module.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Module.h
new file mode 100644
index 0000000000..f73f1d36bc
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Module.h
@@ -0,0 +1,235 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_module_h
+#define tuscany_sca_model_module_h
+
+#include <string>
+using std::string;
+
+#include <map>
+using std::map;
+#include <vector>
+using std::vector;
+
+#include "commonj/sdo/SDO.h"
+
+
+#include "tuscany/sca/model/Component.h"
+#include "tuscany/sca/model/ExternalService.h"
+#include "tuscany/sca/model/EntryPoint.h"
+#include "tuscany/sca/model/Wire.h"
+#include "tuscany/sca/model/Wsdl.h"
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ namespace model
+ {
+ /**
+ * Information about a module.
+ */
+ class Module
+ {
+ public:
+ /**
+ * Constructor.
+ * @param name the name of the module.
+ */
+ Module(const std::string& name);
+
+ /**
+ * Destructor.
+ */
+ virtual ~Module();
+
+ /**
+ * Set the root directory of the module information.
+ * @param rootDirectory The root of the module in the file system.
+ */
+ void setRoot(const std::string& rootDirectory);
+
+ /**
+ * Get the root directory of the module.
+ * @return The root of the module in the file system.
+ */
+ const std::string& getRoot() {return moduleRoot;}
+
+ /**
+ * Return the name of the module.
+ * @return Name of the module.
+ */
+ const std::string& getName() {return name;}
+
+ /**
+ * Add a new component to the module.
+ * @param componentName The name of the new component.
+ * @return The Component added to the module.
+ */
+ Component* addComponent(const std::string& componentName);
+
+ /**
+ * Add a new entry point to the module.
+ * @param name The name of the new entry point.
+ * @return The entry point added to the module.
+ */
+ EntryPoint* addEntryPoint(const std::string& name);
+
+ /**
+ * Find an entry point by name.
+ * @param name The name of the entry point to be found.
+ * @return The entry point that was found, or 0 if not found.
+ */
+ EntryPoint* findEntryPoint(const std::string& name);
+
+ /**
+ * Add a new external service to the module.
+ * @param name The name of the new external service.
+ * @return The external service added to the module.
+ */
+ ExternalService* addExternalService(const std::string& name);
+
+ /**
+ * Add a wire to the model.
+ * @param source The source location. Either the source component and
+ * reference (optional), or an entry point.
+ * @param target The target location. Either the target component and
+ * service (optional), or an external service.
+ */
+ void addWire(const std::string& source, const std::string& target);
+
+ /**
+ * Find a component by name.
+ * @param componentName The name of the component to be found.
+ * @return The component that was found, or 0 if not found.
+ */
+ Component* findComponent(const std::string& componentName);
+
+ /**
+ * Find a component and service by name.
+ * @param componentServiceName A string of the form
+ * "componentName"/"serviceName" where the service name is optional
+ * if there is only one service on the component.
+ * @return The Service that was found, or 0 if not found.
+ */
+ Service* findComponentService(const std::string& componentServiceName);
+
+ /**
+ * Find an external service by name.
+ * @param serviceName The name of the external service to be found.
+ * @return The external service that was found, or 0 if not found.
+ */
+ ExternalService* findExternalService(const std::string& serviceName);
+
+ /**
+ * Add a WSDL definition to the module.
+ * @param wsdlModel A data object holding all the information about
+ * the WSDL definition from a WSDL file.
+ */
+ void addWsdl(commonj::sdo::DataObjectPtr wsdlModel);
+
+ /**
+ * Find a WSDL definition by target namespace.
+ * @param wsdlNamespace The namespace of the WSDL definitions to find.
+ */
+ Wsdl* findWsdl(const std::string& wsdlNamespace);
+
+ /**
+ * Return a cached SDO XSDHelper.
+ */
+ commonj::sdo::XSDHelperPtr getXSDHelper(void);
+
+ /**
+ * Return a cached SDO XMLHelper.
+ */
+ commonj::sdo::XMLHelperPtr getXMLHelper(void);
+
+ /**
+ * Return a data factory which has all the types defined in XSDs and
+ * WSDL files configured for this module.
+ * @return The data factory for this module.
+ */
+ commonj::sdo::DataFactoryPtr getDataFactory(void);
+
+ /**
+ * Work through the list of wires and connect the source and target uris.
+ */
+ void resolveWires();
+
+ private:
+ /**
+ * Name of the module.
+ */
+ string name;
+
+ /**
+ * Directory of the root of the module.
+ */
+ string moduleRoot;
+
+ /**
+ * Cached XSDHelper.
+ */
+ commonj::sdo::XSDHelperPtr xsdHelper;
+
+ /**
+ * Cached XMLHelper.
+ */
+ commonj::sdo::XMLHelperPtr xmlHelper;
+
+ typedef map<std::string, Component*> COMPONENT_MAP;
+ /**
+ * Map (by name) of all the components in this module.
+ */
+ COMPONENT_MAP components;
+
+ typedef map<std::string, ExternalService*> EXTERNALSERVICE_MAP;
+ /**
+ * Map (by name) of all the external services in this module.
+ */
+ EXTERNALSERVICE_MAP externalServices;
+
+ typedef map<std::string, EntryPoint*> ENTRYPOINT_MAP;
+ /**
+ * Map (by name) of all the entry points in this module.
+ */
+ ENTRYPOINT_MAP entryPoints;
+
+ typedef vector<Wire> WIRES;
+ /**
+ * Vector of all the wires in this module.
+ */
+ WIRES wires;
+
+ typedef map<std::string, Wsdl*> WSDL_MAP;
+ /**
+ * Map by namespace of all the wsdl definitions in this module.
+ */
+ WSDL_MAP wsdls;
+ };
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // SCA_ModuleComponent_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Service.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Service.cpp
new file mode 100644
index 0000000000..42ccecbc99
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Service.cpp
@@ -0,0 +1,47 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/model/Service.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+
+
+ // Constructor
+ Service::Service(const std::string& serviceName, Component* comp)
+ : WireTarget(serviceName),
+ component(comp)
+ {
+ LOGENTRY(1, "Service::constructor (Component)");
+ LOGINFO_1(3, "Service::constructor: Service name: %s", serviceName.c_str());
+ LOGEXIT(1, "Service::constructor");
+ }
+
+ Service::~Service()
+ {
+ }
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Service.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Service.h
new file mode 100644
index 0000000000..6c37dabb3e
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Service.h
@@ -0,0 +1,81 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_service_h
+#define tuscany_sca_model_service_h
+
+#include <string>
+using std::string;
+
+#include "tuscany/sca/model/WireTarget.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+ class Component;
+
+ /**
+ * Information about a service defined on a component.
+ */
+ class Service : public WireTarget
+ {
+ public:
+ /**
+ * Destructor.
+ */
+ virtual ~Service();
+
+ /**
+ * Return the type of the wire target.
+ * @return Always returns ComponentServiceType.
+ */
+ virtual Type getServiceType() {return ComponentServiceType;}
+
+ /**
+ * Get the component on which this service is defined.
+ * @return The component on which this service is defined.
+ */
+ Component* getComponent() {return component;}
+
+
+ private:
+ friend class Component;
+ /**
+ * Constructor.
+ * @param name The name of the service.
+ * @param component The component on which this service is defined.
+ */
+ Service(const std::string& name, Component* component);
+
+ /**
+ * The component on which this service is defined.
+ */
+ Component* component;
+
+ };
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_service_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ServiceReference.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ServiceReference.cpp
new file mode 100644
index 0000000000..cada38dec2
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ServiceReference.cpp
@@ -0,0 +1,89 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Exceptions.h"
+#include "tuscany/sca/model/ServiceReference.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+
+
+ // Constructor
+ ServiceReference::ServiceReference(const std::string& referenceName)
+ : name(referenceName), multiplicity(ONE_ONE)
+ {
+ }
+
+ ServiceReference::~ServiceReference()
+ {
+ }
+
+ void ServiceReference::addTarget(WireTarget* targ)
+ {
+ if (multiplicity == ONE_ONE || multiplicity == ZERO_ONE)
+ {
+ if (targets.size() > 0)
+ {
+ // throw exception
+ string message = "Duplicate wire for reference: " + name;
+ throw SystemConfigurationException(message.c_str());
+ }
+ }
+
+ targets.push_back(targ);
+ }
+
+ void ServiceReference::setMultiplicity(const std::string& multip)
+ {
+ if (multip == "0..1")
+ {
+ multiplicity = ZERO_ONE;
+ }
+ else if (multip == "1..1")
+ {
+ multiplicity = ONE_ONE;
+ }
+ else if (multip == "0..n")
+ {
+ multiplicity = ZERO_MANY;
+ }
+ else if (multip == "1..n")
+ {
+ multiplicity = ONE_MANY;
+ }
+ else
+ {
+ string msg = "Invalid multiplicity specified, " + multip + ", for reference: " +name;
+ throw SystemConfigurationException(msg.c_str());
+ }
+ }
+
+ void ServiceReference::setInterface(Interface* interf)
+ {
+ iface = interf;
+ }
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ServiceReference.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ServiceReference.h
new file mode 100644
index 0000000000..062d7a4c19
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/ServiceReference.h
@@ -0,0 +1,136 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_servicereference_h
+#define tuscany_sca_model_servicereference_h
+
+#include <string>
+using std::string;
+#include <vector>
+using std::vector;
+
+#include "tuscany/sca/model/Interface.h"
+#include "tuscany/sca/model/WireTarget.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+ /**
+ * Information about a reference on a serivce.
+ */
+ class ServiceReference
+ {
+ public:
+ /**
+ * Constructor.
+ * @param name The name of the reference.
+ */
+ ServiceReference(const std::string& name)
+
+ /**
+ * Destructor.
+ */;
+ virtual ~ServiceReference();
+
+ /**
+ * Get the name of the service.
+ * @return The name of the service.
+ */
+ const std::string& getName() {return name;}
+
+ /**
+ * Multiplicity (how many wires can be attached to this
+ * reference as their source)
+ */
+ enum Multiplicity
+ {
+ ZERO_ONE,
+ ONE_ONE,
+ ZERO_MANY,
+ ONE_MANY
+ };
+
+ /**
+ * Set the multiplicity of this reference.
+ * @param multiplicity One of "0..1", "1..1", "0..n", "1..n"
+ */
+ void setMultiplicity(const std::string& multiplicity);
+
+ /**
+ * Get the multiplicity of this reference.
+ * @return The multiplicity.
+ */
+ Multiplicity getMultiplicity() {return multiplicity;}
+
+ /**
+ * Set the interface required by this reference.
+ * @param iface The interface.
+ */
+ void setInterface(Interface* iface);
+
+ /**
+ * Get the interface.
+ * @return The interface.
+ */
+ Interface* getInterface() {return iface;}
+
+ /**
+ * Add a target for a reference. There may be more than
+ * one if the multiplicity is 0..n or 1..n.
+ * @param target The target for a wire.
+ */
+ void addTarget(WireTarget* target);
+ typedef vector<WireTarget*> TARGETS;
+
+ /**
+ * Get a vector of all the targets from this reference.
+ * @return The targets of this reference.
+ */
+ const TARGETS& getTargets() {return targets;}
+ private:
+ /**
+ * Name of this reference.
+ */
+ string name;
+
+ /**
+ * The interface defining this reference.
+ */
+ Interface* iface;
+
+ /**
+ * The multiplicity of this reference.
+ */
+ Multiplicity multiplicity;
+
+ /**
+ * Vector of all the targets wired from this reference.
+ */
+ TARGETS targets;
+ };
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_servicereference_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Subsystem.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Subsystem.cpp
new file mode 100644
index 0000000000..08ef0dde49
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Subsystem.cpp
@@ -0,0 +1,122 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/model/Subsystem.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+
+ // Constructor
+ Subsystem::Subsystem(const std::string& subsystemName) : name(subsystemName)
+ {
+ LOGENTRY(1, "Subsystem::constructor");
+
+
+ LOGEXIT(1, "Subsystem::constructor");
+ }
+
+ Subsystem::~Subsystem()
+ {
+ }
+
+ ///
+ /// Add a new module component
+ ///
+ Module* Subsystem::addModuleComponent(const std::string& name, const std::string& moduleName)
+ {
+ LOGENTRY(1, "Subsystem::addModuleComponent");
+
+ Module* newModule = new Module(moduleName);
+
+ // TODO: Should check for duplicates and throw exception
+ moduleComponents[name] = newModule;
+
+ LOGEXIT(1, "Subsystem::addModuleComponent");
+
+ return newModule;
+ }
+
+ Module* Subsystem::findModule(const std::string& moduleName)
+ {
+ for (MODULECOMPONENT_MAP::iterator moduleComponentIter = moduleComponents.begin();
+ moduleComponentIter != moduleComponents.end();
+ moduleComponentIter++)
+ {
+ if (moduleName == moduleComponentIter->second->getName())
+ {
+ return (Module*)moduleComponentIter->second;
+ }
+ }
+ return 0;
+ }
+
+ Module* Subsystem::findModuleByComponentName(const std::string& moduleComponentName)
+ {
+ return moduleComponents[moduleComponentName];
+ }
+
+ Module* Subsystem::getDefaultModule()
+ {
+ if (moduleComponents.size() == 1)
+ {
+ MODULECOMPONENT_MAP::iterator moduleComponentIter = moduleComponents.begin();
+ return moduleComponentIter->second;
+ }
+ return 0;
+ }
+
+ ///
+ /// Add a new entrypoint
+ ///
+ EntryPoint* Subsystem::addEntryPoint(const std::string& name)
+ {
+ LOGENTRY(1, "Subsystem::addEntryPoint");
+
+ EntryPoint* newEntryPoint = new EntryPoint(name);
+ entryPoints[name] = newEntryPoint;
+ LOGEXIT(1, "Subsystem::addEntryPoint");
+ return findEntryPoint(name);
+ }
+
+ EntryPoint* Subsystem::findEntryPoint(const std::string& name)
+ {
+ return entryPoints[name];
+ }
+
+ void Subsystem::resolveWires()
+ {
+ for (MODULECOMPONENT_MAP::iterator moduleComponentIter = moduleComponents.begin();
+ moduleComponentIter != moduleComponents.end();
+ moduleComponentIter++)
+ {
+ moduleComponentIter->second->resolveWires();
+ }
+
+ // Resolve EntryPoint wires
+ }
+
+ } // End namespace model
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Subsystem.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Subsystem.h
new file mode 100644
index 0000000000..b3c59898eb
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Subsystem.h
@@ -0,0 +1,131 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_h
+#define tuscany_sca_model_h
+
+#include <string>
+using std::string;
+#include <map>
+using std::map;
+
+#include "tuscany/sca/model/Module.h"
+#include "tuscany/sca/model/EntryPoint.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+ /**
+ * Information about a subsystem.
+ */
+ class Subsystem {
+ public:
+ /**
+ * Constructor.
+ * @param name The name of the subsystem.
+ */
+ Subsystem(const std::string& name);
+
+ /**
+ * Destructor.
+ */
+ virtual ~Subsystem();
+
+ /**
+ * Add a new module component to the subsystem.
+ * @param name The name of the module component.
+ * @param moduleName The name of the module.
+ * @return The new Module added to the subsystem.
+ */
+ Module* addModuleComponent(const std::string& name, const std::string& moduleName);
+
+ /**
+ * Find a module by module name.
+ * @param moduleName The name of the module to be found.
+ * @return The Module that was found, or 0 if not found.
+ */
+ Module* findModule(const std::string& moduleName);
+
+ /**
+ * Find a module by the module component name.
+ * @param moduleComponentName The module component name to be used to find
+ * the module.
+ * @return The Module that was found, or 0 if not found.
+ */
+ Module* findModuleByComponentName(const std::string& moduleComponentName);
+
+ /**
+ * Get the default module set for this subsystem.
+ * @return The default module.
+ */
+ Module* getDefaultModule();
+
+ /**
+ * Add an new entry point to the subsystem.
+ * @param name The name of the entry point.
+ * @return The new EntryPoint added to the subsystem.
+ */
+ EntryPoint* addEntryPoint(const std::string& name);
+
+ /**
+ * Find an entry point by name.
+ * @param name The name of the entry point to be found.
+ * @return The EntryPoint that was found, or 0 if not found.
+ */
+ EntryPoint* findEntryPoint(const std::string& name);
+
+ /**
+ * Return the name of the subsystem.
+ * @return The name.
+ */
+ const std::string& getName() {return name;}
+
+ /**
+ * Resolve all the wires configured in all the modules in this
+ * subsystem.
+ */
+ void resolveWires();
+
+ private:
+ /**
+ * The name of the subsystem.
+ */
+ std::string name;
+
+ typedef std::map<std::string, Module*> MODULECOMPONENT_MAP;
+ /**
+ * A map by module component name of modules.
+ */
+ MODULECOMPONENT_MAP moduleComponents;
+
+ typedef map<string, EntryPoint*> ENTRYPOINT_MAP;
+ /**
+ * A map of entry points defined in this subsystem.
+ */
+ ENTRYPOINT_MAP entryPoints;
+ };
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/System.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/System.cpp
new file mode 100644
index 0000000000..dfc4a21b1c
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/System.cpp
@@ -0,0 +1,118 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/model/System.h"
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+
+ // ============
+ // Constructor
+ // ============
+ System::System()
+ {
+ LOGENTRY(1, "System::constructor");
+
+
+ LOGEXIT(1, "System::constructor");
+ }
+
+ System::~System()
+ {
+ SUBSYSTEM_MAP::iterator subsystemsIter;
+ for (subsystemsIter = subsystemMap.begin();
+ subsystemsIter != subsystemMap.end();
+ subsystemsIter++ )
+ {
+ delete subsystemsIter->second;
+ }
+ }
+
+ // =================================
+ // Add a new subsystem to the system
+ // =================================
+ Subsystem* System::addSubsystem(const std::string& name)
+ {
+ LOGENTRY(1, "System::addSubsystem");
+
+ Subsystem* newSubsystem = new Subsystem(name);
+
+ subsystemMap[name] = newSubsystem;
+
+ LOGEXIT(1, "System::addSubsystem");
+
+ return newSubsystem;
+ }
+
+ // ====================================================================
+ // Get a map of all the moduleComponents that use a particular module
+ // ====================================================================
+ MODULE_LIST System::findModules(const std::string& name)
+ {
+ LOGENTRY(1, "System::findModules");
+ MODULE_LIST foundModules;
+
+ SUBSYSTEM_MAP::iterator subsystemsIter;
+ for (subsystemsIter = subsystemMap.begin();
+ subsystemsIter != subsystemMap.end(); subsystemsIter++ ) {
+ LOGINFO_1(2, "System::findModules: Found subsystem: %s", subsystemsIter->second->getName().c_str());
+ // In each subsystem, find module components with this module defined
+
+ Module* module = subsystemsIter->second->findModule(name);
+ if (module)
+ {
+ LOGINFO_1(2, "System::findModules: Found module: %s", module->getName().c_str());
+ foundModules.push_back(module);
+ }
+ }
+ LOGEXIT(1, "System::findModules");
+
+ return foundModules;
+ }
+
+
+ // ====================================================================
+ // Get a map of all the moduleComponents that use a particular module
+ // ====================================================================
+ Subsystem* System::findSubsystem(const std::string& subsystem)
+ {
+ return subsystemMap[subsystem];
+ }
+
+ void System::resolveWires()
+ {
+ SUBSYSTEM_MAP::iterator subsystemsIter;
+ for (subsystemsIter = subsystemMap.begin();
+ subsystemsIter != subsystemMap.end();
+ subsystemsIter++ )
+ {
+ subsystemsIter->second->resolveWires();
+ }
+ }
+
+ } // End namespace model
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/System.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/System.h
new file mode 100644
index 0000000000..a0f62ce67a
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/System.h
@@ -0,0 +1,89 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_system_h
+#define tuscany_sca_model_system_h
+
+#include <map>
+#include <string>
+#include <vector>
+
+#include "tuscany/sca/model/Subsystem.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+ typedef std::vector<Module*> MODULE_LIST;
+
+ /**
+ * The root of the runtime model supported by a Tuscany runtime.
+ */
+ class System {
+ public:
+ System();
+ virtual ~System();
+
+ /**
+ * Add a new subsystem to the system.
+ * @param subsystemName The name of the new subsystem to add.
+ * @return The new Subsystem added to the system.
+ */
+ Subsystem* addSubsystem(const std::string& subsystemName);
+
+ /**
+ * Find subsystem by name.
+ * @param subsystemName The name of the subsystem to be found.
+ * @return The Subsystem found, or 0 if not found.
+ */
+ Subsystem* findSubsystem(const std::string& subsystemName);
+
+ typedef std::vector<Module*> MODULE_LIST;
+
+ /**
+ * Return a vector of all the modules with a given module name.
+ * @param moduleName The name of the module to find
+ * @return A vector of all the times the module appears in the
+ * system. It can be more than once because the same module name
+ * is used by more than one module component.
+ */
+ MODULE_LIST findModules(const std::string& moduleName);
+
+ /**
+ * Resolve all the wires defined in the system.
+ */
+ void resolveWires();
+
+ private:
+
+ typedef std::map<std::string, Subsystem*> SUBSYSTEM_MAP;
+
+ /**
+ * Map by name of subsystems.
+ */
+ SUBSYSTEM_MAP subsystemMap;
+ };
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_system_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WSBinding.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WSBinding.cpp
new file mode 100644
index 0000000000..85cb7482bd
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WSBinding.cpp
@@ -0,0 +1,127 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/model/WSBinding.h"
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+
+ namespace model
+ {
+
+ // Constructor
+ WSBinding::WSBinding(const string& uri, const string& port)
+ : Binding(uri), port(port)
+ {
+
+ // Port is of the form: <wsdl-namepace-uri>#wsdl.endpoint(<service-name>/<port-name>)
+ string::size_type hash = port.find("#");
+ if (hash != string::npos)
+ {
+ // Found a hash
+
+ // Namepace is the part before the #
+ wsdlNamespaceURL = port.substr(0, hash);
+
+
+ if ( (hash+1) < port.length())
+ {
+ // Check the next part is wsdl.endpoint(
+ int ending = hash+15;
+ string check = port.substr(hash+1, 14);
+ if (check.compare("wsdl.endpoint(") == 0)
+ {
+ // Find the matching )
+ int endBracket = port.find(")",ending);
+ if (endBracket-1 > ending+1)
+ {
+ string serviceAndPort = port.substr(ending, endBracket-ending);
+ // Look for a '/'
+ string::size_type slash = serviceAndPort.find("/");
+ if (slash != string::npos)
+ {
+ serviceName = serviceAndPort.substr(0, slash);
+
+ if ( (slash+1) < serviceAndPort.length())
+ {
+ portName = serviceAndPort.substr(slash+1);
+ }
+ else
+ {
+ portName = "";
+ }
+
+ }
+ else
+ {
+ // No '/' so all of it is the service name
+ serviceName = serviceAndPort;
+ portName = "";
+
+ }
+ }
+ else
+ {
+ // Nothing between the ()
+ serviceName = "";
+ portName = "";
+ }
+ }
+ else
+ {
+ // not the correct characters after the #, ignore the rest
+ serviceName = "";
+ portName = "";
+ }
+
+ }
+ else
+ {
+ // Nothing after the hash
+ serviceName = "";
+ portName = "";
+ }
+ }
+ else
+ {
+ // No hash at all
+ wsdlNamespaceURL = port;
+ serviceName = "";
+ portName = "";
+ }
+
+
+
+
+
+
+ }
+
+ WSBinding::~WSBinding()
+ {
+ }
+
+ } // End namespace model
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WSBinding.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WSBinding.h
new file mode 100644
index 0000000000..e7963d205b
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WSBinding.h
@@ -0,0 +1,106 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_wsbinding_h
+#define tuscany_sca_model_wsbinding_h
+
+#include "tuscany/sca/model/Binding.h"
+
+#include <string>
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+ /**
+ * Information about a web service binding for an entry point or an
+ * external service.
+ */
+ class WSBinding : public Binding
+ {
+ public:
+ /**
+ * Constructor.
+ * @param uri The uri of the binding.
+ * @param port The definition of the port to which the entrypoint
+ * or external service is to be bound. This is of the form
+ * "namespace"#endpoint("service"/"port")
+ */
+ WSBinding(const string&uri, const string& port);
+
+ /**
+ * Destructor.
+ */
+ virtual ~WSBinding();
+
+ /**
+ * Return the type of the binding.
+ * @return Always returns WS.
+ */
+ virtual Type getBindingType() {return WS;};
+
+ /**
+ * Return the part of the port definition describing the wsdl
+ * namespace.
+ * @return The wsdl namespace.
+ */
+ string getWSDLNamespaceURL() {return wsdlNamespaceURL;};
+
+ /**
+ * Return the service part of the port definition.
+ * @return The service to use.
+ */
+ string getServiceName() {return serviceName;};
+
+ /**
+ * Return the port name part of the port definition.
+ * @return The port name to use.
+ */
+ string getPortName() {return portName;};
+
+ private:
+ /**
+ * The full port string.
+ */
+ string port;
+
+ /**
+ * Namespace from the port.
+ */
+ string wsdlNamespaceURL;
+
+ /**
+ * Service name from the port.
+ */
+ string serviceName;
+
+ /**
+ * Port name from the port.
+ */
+ string portName;
+ };
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_wsbinding_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Wire.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Wire.cpp
new file mode 100644
index 0000000000..6c1b14940f
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Wire.cpp
@@ -0,0 +1,46 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Utils.h"
+#include "tuscany/sca/model/Wire.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+
+ // Constructor
+ Wire::Wire(const std::string& source, const std::string& targ)
+ {
+ Utils::tokeniseUri(source, sourceComponent, sourceReference);
+ target = targ;
+ }
+
+ Wire::~Wire()
+ {
+ }
+
+ } // End namespace model
+
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Wire.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Wire.h
new file mode 100644
index 0000000000..b126137118
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Wire.h
@@ -0,0 +1,91 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_wire_h
+#define tuscany_sca_model_wire_h
+
+#include <string>
+using std::string;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+ /**
+ * Information about a wire in the model.
+ */
+ class Wire
+ {
+ public:
+ /**
+ * Constructor.
+ * @param source The source of the wire. Either the component and
+ * reference name (optional) or an entry point.
+ * @param target The target of the wire. Either a component and service
+ * service name (optional) or an external sevice.
+ */
+ Wire(const std::string& source, const std::string& target);
+
+ /**
+ * Destructor.
+ */
+ virtual ~Wire();
+
+ /**
+ * Get the component name defined by the source of the wire.
+ * @return The component name which is the source of the wire.
+ */
+ const std::string& getSourceComponent() {return sourceComponent;}
+
+ /**
+ * Get the reference name defined by the source of the wire.
+ * @return The reference name which is the source of the wire.
+ */
+ const std::string& getSourceReference() {return sourceReference;}
+
+ /**
+ * Get the target uri defined by the target of the wire.
+ * @return The target uri which is the source of the wire.
+ */
+ const std::string& getTarget() {return target;}
+ private:
+ /**
+ * The source component of the wire.
+ */
+ string sourceComponent;
+
+ /**
+ * The source reference of the wire.
+ */
+ string sourceReference;
+
+ /**
+ * The target uri of the wire.
+ */
+ string target;
+ };
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_wire_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WireTarget.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WireTarget.cpp
new file mode 100644
index 0000000000..a35b07f5fe
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WireTarget.cpp
@@ -0,0 +1,49 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/model/WireTarget.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+
+ // Constructor
+ WireTarget::WireTarget(const std::string& targetName)
+ : name(targetName)
+ {
+ }
+
+ WireTarget::~WireTarget()
+ {
+ }
+
+ void WireTarget::setInterface(Interface* interf)
+ {
+ iface = interf;
+ }
+
+ } // End namespace model
+
+
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WireTarget.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WireTarget.h
new file mode 100644
index 0000000000..312d20a704
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WireTarget.h
@@ -0,0 +1,106 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_wiretarget_h
+#define tuscany_sca_model_wiretarget_h
+
+#include <string>
+using std::string;
+
+#include "tuscany/sca/model/Interface.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+ /**
+ * Represents the target of a wire. This could be a service on a
+ * component or an external service.
+ */
+ class WireTarget
+ {
+ public:
+ /**
+ * Supported types of wire target.
+ */
+ enum Type
+ {
+ ComponentServiceType,
+ ExternalServiceType
+ };
+
+ /**
+ * Constructor.
+ * @param name The name of the wire target.
+ */
+ WireTarget(const std::string& name);
+
+ /**
+ * Destructor.
+ */
+ virtual ~WireTarget();
+
+ /**
+ * Return the name of the wire target.
+ */
+ string getName() {return name;}
+
+ /**
+ * Get the type of the wire target.
+ * @return Depends on the type of the wire target.
+ */
+ virtual Type getServiceType() = 0;
+
+ /**
+ * Set the interface describing the wire target.
+ * @param iface The interface.
+ */
+ void setInterface(Interface* iface);
+
+ /**
+ * Get the interface describing the wire target.
+ * @return The interface.
+ */
+ Interface* getInterface() {return iface;}
+
+ private:
+ /**
+ * Name of the wire target (service name or external service name)
+ */
+ string name;
+
+ /**
+ * Type of the service.
+ */
+ Type serviceType;
+
+ /**
+ * Interface describing the wire target.
+ */
+ Interface* iface;
+ };
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_wiretarget_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Wsdl.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Wsdl.cpp
new file mode 100644
index 0000000000..d2ca9e96c1
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Wsdl.cpp
@@ -0,0 +1,356 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/model/Wsdl.h"
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Utils.h"
+#include "tuscany/sca/util/Exceptions.h"
+
+using namespace tuscany::sca;
+
+using namespace commonj::sdo;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+
+
+ // Constructor
+ Wsdl::Wsdl(DataObjectPtr wsdlModel)
+ : wsdlModel(wsdlModel)
+ {
+ LOGENTRY(1, "Wsdl::constructor");
+
+ // Trace
+ //Utils::printDO(wsdlModel);
+
+
+
+ LOGEXIT(1, "Wsdl::constructor");
+ }
+
+ Wsdl::~Wsdl()
+ {
+ }
+
+
+ ///
+ /// The namespace of the service and other definitions defined in this wsdl definition
+ string Wsdl::getNamespace()
+ {
+
+ return wsdlModel->getCString("targetNamespace");
+
+ }
+
+ ///
+ /// Find the operation defined in this wsdl
+ ///
+ const WsdlOperation& Wsdl::findOperation(const string& serviceName,
+ const string& portName,
+ const string& operationName)
+ {
+ string message;
+
+ string operationKey = serviceName+"#"+portName+"#"+operationName;
+ OperationMap::iterator iter = operationMap.find(operationKey);
+ if (iter != operationMap.end())
+ {
+ return iter->second;
+ }
+
+ // Find the service
+ DataObjectPtr service = findService(serviceName);
+ if (!service)
+ {
+ // Service not found
+ message = "Unable to find service ";
+ message = message + serviceName;
+ message = message + " in the WSDL definition";
+ throw SystemConfigurationException(message.c_str());
+ }
+ else
+ {
+
+
+ // Found the service
+ DataObjectList& portList = service->getList("port");
+ for (int j=0; j<portList.size();j++)
+ {
+ string portListName(portList[j]->getCString("name"));
+ if (portListName.compare(portName) == 0)
+ {
+ // found port
+ // Add address at this point
+ string targetAddress(portList[j]->getCString("address/location"));
+
+ // find operation by traversing the binding, portType then operation
+ string wsBindingName(portList[j]->getCString("binding"));
+
+ DataObjectPtr wsBinding = findBinding(wsBindingName);
+ if (!wsBinding)
+ {
+ message = "Unable to find binding ";
+ message = message + wsBindingName;
+ message = message + " in the WSDL definition";
+ throw SystemConfigurationException(message.c_str());
+ }
+
+
+ string soapAction;
+ bool documentStyle = false;
+ bool useEncoded = false;
+ WsdlOperation::soapVersion soapVer = WsdlOperation::SOAP11;
+
+ // Find the binding operation
+ DataObjectList& bindingOperationList = wsBinding->getList("operation");
+ for (int i=0; i<bindingOperationList.size(); i++)
+ {
+ string name(bindingOperationList[i]->getCString("name"));
+
+ if (name.compare(operationName) == 0)
+ {
+ DataObjectPtr op = bindingOperationList[i]->getDataObject("operation");
+ string opType = op->getType().getURI();
+ if (opType == "http://schemas.xmlsoap.org/wsdl/soap12/")
+ {
+ soapVer = WsdlOperation::SOAP12;
+ }
+ // Get the soapAction
+ soapAction = bindingOperationList[i]->getCString("operation/soapAction");
+
+ // Get the style
+ string style = bindingOperationList[i]->getCString("operation/style");
+ if (style == "")
+ {
+ style = wsBinding->getCString("binding/style");
+ }
+ if (style == "document")
+ {
+ documentStyle = true;
+ }
+
+ // get the use
+ string use = bindingOperationList[i]->getCString("input/body/use");
+ if (style == "encoded")
+ {
+ useEncoded = true;
+ }
+ }
+ }
+
+
+ // TODO - get the style from the binding or operation????
+
+ // Found the binding, get the portType
+ string wsPortTypeName(wsBinding->getCString("type"));
+ DataObjectPtr wsPortType = findPortType(wsPortTypeName);
+ if (!wsPortType)
+ {
+ message = "Unable to find PortType ";
+ message = message + wsPortTypeName;
+ message = message + " in the WSDL definition";
+ throw SystemConfigurationException(message.c_str());
+ }
+
+ //Utils::printDO(wsPortType);
+
+ // Found the portType, find the operation
+ DataObjectList& operationList = wsPortType->getList("operation");
+ for (int k=0; k< operationList.size(); k++)
+ {
+ string opName(operationList[k]->getCString("name"));
+ if( opName.compare(operationName) == 0)
+ {
+ // Found the operation
+
+ // Find the type of the request message
+ string inputMessageType = string(operationList[k]->getCString("input/message"));
+
+ DataObjectPtr wsMessageIn = findMessage(inputMessageType);
+ if (!wsMessageIn)
+ {
+ message = "Unable to find message ";
+ message = message + inputMessageType;
+ message = message + " in the WSDL definition";
+ throw SystemConfigurationException(message.c_str());
+ }
+
+ string requestType(wsMessageIn->getList("part")[0]->getCString("element"));
+
+ // Find the type of the response message
+ string outputMessageType = string(operationList[k]->getCString("output/message"));
+
+ DataObjectPtr wsMessageOut = findMessage(outputMessageType);
+ if (!wsMessageOut)
+ {
+ message = "Unable to find message ";
+ message = message + outputMessageType;
+ message = message + " in the WSDL definition";
+ throw SystemConfigurationException(message.c_str());
+ }
+
+ string responseType(wsMessageOut->getList("part")[0]->getCString("element"));
+
+ WsdlOperation& wsdlOp = operationMap[operationKey];
+ wsdlOp.setOperationName(operationName);
+ wsdlOp.setSoapAction(soapAction);
+ wsdlOp.setEndpoint(targetAddress);
+ wsdlOp.setSoapVersion(soapVer);
+ wsdlOp.setDocumentStyle(documentStyle);
+ wsdlOp.setEncoded(useEncoded);
+ wsdlOp.setInputType(requestType);
+ wsdlOp.setOutputType(responseType);
+ return wsdlOp;
+ }
+
+ }
+
+ message = "Unable to find Operation ";
+ message = message + operationName;
+ message = message + " in the WSDL definition";
+ throw SystemConfigurationException(message.c_str());
+ }
+ }
+ // cannot find the port
+ message = "Unable to find port ";
+ message = message + portName;
+ message = message + " in the WSDL definition";
+ throw SystemConfigurationException(message.c_str());
+ }
+
+ }
+
+ ///
+ /// Find a service
+ ///
+ DataObjectPtr Wsdl::findService(const string& serviceName)
+ {
+ DataObjectPtr service = 0;
+
+
+ // Find the binding
+ DataObjectList& serviceList = wsdlModel->getList("service");
+ for (int i=0; i<serviceList.size(); i++)
+ {
+ string name(serviceList[i]->getCString("name"));
+
+ if (name.compare(serviceName) == 0)
+ {
+ return serviceList[i];
+ }
+ }
+
+ return service;
+ }
+
+
+ ///
+ /// Find a named binding
+ ///
+ DataObjectPtr Wsdl::findBinding(const string& bindingName)
+ {
+ DataObjectPtr binding = 0;
+ string uri;
+ string name;
+
+
+ //Utils::tokeniseQName(bindingName, uri, name);
+ Utils::rTokeniseString(":", bindingName, uri, name);
+
+
+ // Find the binding
+ DataObjectList& bindingList = wsdlModel->getList("binding");
+ for (int i=0; i<bindingList.size(); i++)
+ {
+ string nameBinding(bindingList[i]->getCString("name"));
+
+ if (nameBinding.compare(name) == 0)
+ {
+ return bindingList[i];
+ }
+ }
+
+ return binding;
+ }
+
+ ///
+ /// Find a named portType
+ ///
+ DataObjectPtr Wsdl::findPortType(const string& portTypeName)
+ {
+ DataObjectPtr portType = 0;
+ string uri;
+ string name;
+
+
+ // Utils::tokeniseQName(portTypeName, uri, name);
+ Utils::rTokeniseString(":", portTypeName, uri, name);
+
+
+ // Find the binding
+ DataObjectList& portTypeList = wsdlModel->getList("portType");
+ for (int i=0; i<portTypeList.size(); i++)
+ {
+ string namePortType(portTypeList[i]->getCString("name"));
+
+ if (namePortType.compare(name) == 0)
+ {
+ return portTypeList[i];
+ }
+ }
+
+ return portType;
+ }
+
+ ///
+ /// Find a named message
+ ///
+ DataObjectPtr Wsdl::findMessage(const string& messageName)
+ {
+ DataObjectPtr message = 0;
+ string uri;
+ string name;
+
+
+ // Utils::tokeniseQName(messageName, uri, name);
+ Utils::rTokeniseString(":", messageName, uri, name);
+
+
+ // Find the binding
+ DataObjectList& messageList = wsdlModel->getList("message");
+ for (int i=0; i<messageList.size(); i++)
+ {
+ string nameMessage(messageList[i]->getCString("name"));
+
+ if (nameMessage.compare(name) == 0)
+ {
+ return messageList[i];
+ }
+ }
+
+ return message;
+ }
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Wsdl.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Wsdl.h
new file mode 100644
index 0000000000..70a07996cc
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/Wsdl.h
@@ -0,0 +1,129 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_wsdl_h
+#define tuscany_sca_model_wsdl_h
+
+#include "osoa/sca/export.h"
+#include <string>
+using std::string;
+
+#include "tuscany/sca/model/WsdlOperation.h"
+
+#include "commonj/sdo/SDO.h"
+using commonj::sdo::DataObjectPtr;
+
+#include <map>
+using std::map;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+
+ /**
+ * Holds information about a WSDL definition loaded into the runtime.
+ */
+ class Wsdl
+ {
+ public:
+ /**
+ * Constructor.
+ * @param wsdlModel The data object representing the WSDL document
+ * defining a web service.
+ */
+ Wsdl(DataObjectPtr wsdlModel);
+
+ /**
+ * Destructor.
+ */
+ ~Wsdl();
+
+
+ /**
+ * Returns the target namespace of the WSDL definitions.
+ * @return The target namespace.
+ */
+ string getNamespace(void);
+
+ /**
+ * Find an operation in the WSDL definitions.
+ * @param serviceName The name of the service on which this
+ * operation is defined.
+ * @param portName The name of the port in the service to
+ * use.
+ * @param operationName The name of the operation to find.
+ * @return The operation if found. Exception thrown if not found.
+ */
+ const WsdlOperation& findOperation(const string& serviceName,
+ const string& portName,
+ const string& operationName);
+
+ private:
+
+ /**
+ * Find a service in the wsdl definition.
+ * @param serviceName The name of the service.
+ * @return A data object describing the service if found, otherwise
+ * a 0 if not found.
+ */
+ DataObjectPtr findService(const string& serviceName);
+
+ /**
+ * Find a binding in the wsdl definition.
+ * @param bindingName The name of the binding to find.
+ * @return A data object describing the binding if found, otherwise
+ * a 0 if not found.
+ */
+ DataObjectPtr findBinding(const string& bindingName);
+
+ /**
+ * Find a portType in the wsdl definition.
+ * @param portTypeName The name of the portType.
+ * @return A data object describing the portType if found, otherwise
+ * a 0 if not found.
+ */
+ DataObjectPtr findPortType(const string& portTypeName);
+
+ /**
+ * Find a message in the wsdl definition.
+ * @param messageName The name of the message.
+ * @return A data object describing the message if found, otherwise
+ * a 0 if not found.
+ */
+ DataObjectPtr findMessage(const string& messageName);
+
+
+ /**
+ * The data object representation of the WSDL document.
+ */
+ DataObjectPtr wsdlModel;
+
+ typedef map<string, WsdlOperation> OperationMap;
+ OperationMap operationMap;
+ };
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_wsdl_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WsdlOperation.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WsdlOperation.cpp
new file mode 100644
index 0000000000..40964ea20e
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WsdlOperation.cpp
@@ -0,0 +1,56 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/model/WsdlOperation.h"
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Utils.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+
+
+ // Constructor
+ WsdlOperation::WsdlOperation()
+ {
+ LOGENTRY(1, "WsdlOperation::constructor");
+ LOGEXIT(1, "WsdlOperation::constructor");
+ }
+
+ WsdlOperation::~WsdlOperation()
+ {
+ }
+
+
+ void WsdlOperation::setInputType(const string& inputType)
+ {
+ Utils::tokeniseQName(inputType, inputTypeUri, inputTypeName);
+ }
+
+ void WsdlOperation::setOutputType(const string& outputType)
+ {
+ Utils::tokeniseQName(outputType, outputTypeUri, outputTypeName);
+ }
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WsdlOperation.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WsdlOperation.h
new file mode 100644
index 0000000000..9fe22b6f57
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/model/WsdlOperation.h
@@ -0,0 +1,141 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_model_wsdlOperation_h
+#define tuscany_sca_model_wsdlOperation_h
+#include "osoa/sca/export.h"
+#include <string>
+using std::string;
+
+
+#include "commonj/sdo/SDO.h"
+using commonj::sdo::DataObjectPtr;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace model
+ {
+
+ /**
+ * Represents a single.,bound WSDL defined operation.
+ * This class includes information from the soapBinding
+ * in addition to the WSDL definition of the operation.
+ */
+ class WsdlOperation
+ {
+ public:
+ /**
+ * Constructor.
+ * @param operation The name of the operation.
+ * @param soapAction The soapAction associated with this operation
+ * in the SOAP binding of the operation.
+ * @param endpoint The endpoint address of the operation.
+ * @param responseName The name of the response message.
+ */
+ WsdlOperation();
+
+ /**
+ * Destructor.
+ */
+ ~WsdlOperation();
+
+ /**
+ * Return the name of the operation for use when serializing an
+ * outgoing message.
+ * @return The name of the element in the request message.
+ */
+ const string& getOperationName() const {return operationName;}
+ void setOperationName(const string& opName) {operationName = opName;}
+
+ /**
+ * The soap action string for this operation.
+ * @return The soap action.
+ */
+ const string& getSoapAction() const {return soapAction;}
+ void setSoapAction(const string& soapAct) {soapAction = soapAct;}
+
+ /**
+ * Return the endpoint address for the target web service.
+ * @return The endpoint address.
+ */
+ const string& getEndpoint() const {return endpoint;}
+ void setEndpoint(const string& ep) {endpoint = ep;}
+
+ enum soapVersion
+ {
+ SOAP11,
+ SOAP12
+ };
+
+ void setSoapVersion(soapVersion ver) {soapVer = ver;}
+ soapVersion getSoapVersion() const {return soapVer;}
+
+ void setDocumentStyle(bool docStyle) {documentStyle = docStyle;}
+ bool isDocumentStyle() const {return documentStyle;}
+
+ void setEncoded(bool enc) {encoded = enc;}
+ bool isEncoded() const {return encoded;}
+
+
+ void setInputType(const string& inputType);
+ const string& getInputTypeUri() const {return inputTypeUri;}
+ const string& getInputTypeName() const {return inputTypeName;}
+ void setOutputType(const string& outputType);
+ const string& getOutputTypeUri() const {return outputTypeUri;}
+ const string& getOutputTypeName() const {return outputTypeName;}
+
+ private:
+ /**
+ * The name of the operation for use when serializing an
+ * outgoing message.
+ */
+ string operationName;
+
+ /**
+ * The soap action string for this operation.
+ */
+ string soapAction;
+
+ /**
+ * The endpoint address of the target web service.
+ */
+ string endpoint;
+
+ bool documentStyle;
+ bool encoded;
+ soapVersion soapVer;
+
+ string inputTypeUri;
+ string inputTypeName;
+
+ string outputTypeUri;
+ string outputTypeName;
+
+ DataObjectPtr inputMessage;
+ DataObjectPtr outputMessage;
+ };
+
+ } // End namespace model
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_model_wsdlOperation_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/DefaultLogWriter.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/DefaultLogWriter.cpp
new file mode 100644
index 0000000000..3ea2212f7c
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/DefaultLogWriter.cpp
@@ -0,0 +1,43 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/DefaultLogWriter.h"
+#include <iostream>
+using namespace std;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ DefaultLogWriter::~DefaultLogWriter()
+ {
+ }
+
+ void DefaultLogWriter::log(int level, const char* msg)
+ {
+ for (int i=0; i < level; i++)
+ {
+ cout << " ";
+ }
+ cout << msg <<endl;
+ }
+
+ } // End namespace sca
+} // End namespace tuscany
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/DefaultLogWriter.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/DefaultLogWriter.h
new file mode 100644
index 0000000000..4d45579907
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/DefaultLogWriter.h
@@ -0,0 +1,46 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_util_defaultlogwriter_h
+#define tuscany_sca_util_defaultlogwriter_h
+
+#include "tuscany/sca/util/LogWriter.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ /**
+ * Log writer to write out to standard out.
+ */
+ class DefaultLogWriter : public LogWriter
+ {
+ public:
+ virtual ~DefaultLogWriter();
+
+ /**
+ * Will write to the console.
+ * See LogWriter#log.
+ */
+ virtual void log(int level, const char* msg);
+ };
+
+ } // End namespace sca
+} // End namespace tuscany
+#endif // tuscany_sca_util_defaultlogwriter_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Exceptions.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Exceptions.h
new file mode 100644
index 0000000000..daad31f59f
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Exceptions.h
@@ -0,0 +1,48 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_util_exceptions_h
+#define tuscany_sca_util_exceptions_h
+
+#include "osoa/sca/ServiceRuntimeException.h"
+using osoa::sca::ServiceRuntimeException;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ /**
+ * Indicates a problem in the consistency of the SCA model provided to the
+ * Tuscany runtime.
+ */
+ class SCA_API SystemConfigurationException: public ServiceRuntimeException
+ {
+ public:
+ SystemConfigurationException(const char* msg)
+ : ServiceRuntimeException("SystemConfigurationException", Severe,
+ msg)
+ {
+ }
+ private:
+ };
+
+
+ } // End namespace sca
+} // End namespace tuscany
+#endif // tuscany_sca_util_exceptions_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/File.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/File.cpp
new file mode 100644
index 0000000000..33e33d1aad
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/File.cpp
@@ -0,0 +1,221 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "tuscany/sca/util/File.h"
+#include "tuscany/sca/util/Utils.h"
+#include "tuscany/sca/util/Exceptions.h"
+#include <iostream>
+
+#include <string>
+#include <iostream>
+using namespace std;
+
+#if defined(WIN32) || defined (_WINDOWS)
+#include <windows.h>
+#else
+#include <unistd.h>
+#include <sys/stat.h>
+#include <dirent.h>
+#endif
+
+namespace tuscany
+{
+ namespace sca
+ {
+ File::File(const string& dir, const string& file)
+ : directory(dir), fileName(file)
+ {
+ }
+ File::~File()
+ {
+ }
+
+
+ Files::Files(const string& rootDir, const string& pattern, bool subdirectories)
+ : rootDirectory(rootDir)
+ {
+ findFiles(rootDirectory, pattern, subdirectories);
+ }
+
+ Files::~Files()
+ {
+ }
+
+ unsigned int Files::size()
+ {
+ return files.size();
+ }
+
+ const File& Files::operator[] (unsigned int index)
+ {
+ if (size() <= index)
+ {
+ throw ServiceRuntimeException("Files::operator[] index out of bounds");
+ }
+
+ FILES::iterator iter = files.begin();
+ for (unsigned int i=0; i<index; i++)
+ {
+ iter++;
+ }
+
+ return *iter;
+ }
+
+
+ void Files::findFiles(const string& rootDir, const string& pattern, bool subdirectories)
+ {
+
+#if defined(WIN32) || defined (_WINDOWS)
+ char currentDir[ _MAX_FNAME];
+
+
+ GetCurrentDirectory(_MAX_FNAME, currentDir);
+
+ // Set current directory, from which to search.
+ if (!SetCurrentDirectory(rootDir.c_str()))
+ {
+ cout << "Unable to set current directory to: " << rootDir.c_str() << endl;
+ return;
+ }
+ char fullDirname[ _MAX_FNAME];
+ GetCurrentDirectory(_MAX_FNAME, fullDirname);
+
+ // First, look for all files in this directory that meet the pattern
+ char search[ _MAX_FNAME];
+ strcpy(search, pattern.c_str());
+
+ // Find the first file in the directory
+ WIN32_FIND_DATA data;
+ HANDLE searchHandle = FindFirstFile(search, &data);
+
+ int more = TRUE;
+ if (searchHandle != INVALID_HANDLE_VALUE)
+ {
+ // Found some matching files, so call the function with the details of each one
+ while (more)
+ {
+ // Skip over directories
+ if (!(data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
+ {
+ // Add the file to our list
+ files.push_back(File(fullDirname, data.cFileName));
+ }
+
+ more = FindNextFile(searchHandle, &data);
+ }
+ }
+
+
+ if (!subdirectories)
+ return;
+
+ // Now recurse down all the directories
+ // Find the first file in the directory
+ searchHandle = FindFirstFile( "*.*", &data);
+ more = TRUE;
+
+ if (searchHandle != INVALID_HANDLE_VALUE)
+ {
+ // Found some files in the directory.
+ while (more)
+ {
+ // If directory
+ if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+ {
+ // Skip over '.' and '..'
+ if ((strcmp(data.cFileName, ".")) && (strcmp("..", data.cFileName)))
+ {
+ // Recurse
+ findFiles(data.cFileName, pattern, subdirectories);
+ }
+ }
+
+ more = FindNextFile(searchHandle, &data);
+ }
+ }
+ SetCurrentDirectory(currentDir);
+#else
+ // Linux
+ //char fullDirname[MAX_PATH];
+ //getcwd(fullDirname, MAX_PATH);
+
+ DIR* root = opendir(rootDir.c_str());
+ if (!root)
+ {
+ cout << "Unable to open directory: " << rootDir.c_str() << endl;
+ return;
+ }
+
+ bool exactMatch = true;
+ string token1, token2;
+ if (pattern.find('*') != string::npos)
+ {
+ exactMatch = false;
+ Utils::tokeniseString("*", pattern, token1, token2);
+ }
+
+ struct dirent *entry=0;
+ while ((entry = readdir(root)))
+ {
+ string entryName = rootDir + "/" + entry->d_name;
+ struct stat statbuf;
+ if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0)
+ continue;
+ if (stat(entryName.c_str(), &statbuf) != 0)
+ {
+ perror("stat");
+ }
+ else
+ {
+ if (S_ISDIR(statbuf.st_mode))
+ {
+ if (subdirectories)
+ {
+ findFiles(entryName, pattern, subdirectories);
+ }
+ }
+ else if (S_ISREG(statbuf.st_mode))
+ {
+ string filename = entry->d_name;
+
+ if ((exactMatch && filename == pattern) ||
+ (!exactMatch &&
+ ((filename.find(token1) == 0)
+ && (filename.length() >= token2.length())
+ && (filename.rfind(token2) == (filename.length() - token2.length())) )))
+ {
+ // Add the file to our list
+ files.push_back(File(rootDir, filename));
+ }
+ }
+ }
+ }
+ closedir(root);
+#endif
+ }
+
+
+ } // End namespace sca
+} // End namespace tuscany
+
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/File.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/File.h
new file mode 100644
index 0000000000..f177401442
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/File.h
@@ -0,0 +1,133 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_util_file_h
+#define tuscany_sca_util_file_h
+
+#include <string>
+using std::string;
+#include <vector>
+using std::vector;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ /**
+ * File access methods. Provides platform independent
+ * access to files.
+ */
+ class File
+ {
+ public:
+ /**
+ * Constructor.
+ * @param directory Name of the directory in which this file is located.
+ * Either / or \ can be used interchangeably for separating directory elements.
+ * @param fileName Name of the file in the dirctory.
+ */
+ File(const string& directory, const string& fileName);
+
+ /**
+ * Destructor.
+ */
+ virtual ~File();
+
+ /**
+ * Return the directory in which this file is located.
+ * @return Name of the directory.
+ */
+ const string& getDirectory() const {return directory;}
+
+ /**
+ * Name of the file.
+ * @return Name of the file.
+ */
+ const string& getFileName() const {return fileName;}
+ private:
+ /**
+ * Name of the directory.
+ */
+ string directory;
+
+ /**
+ * Name of the file.
+ */
+ string fileName;
+ };
+
+ /**
+ * Collection of File to provide platform independent access
+ * to files and directories.
+ */
+ class Files
+ {
+ public:
+ /**
+ * Constructor which will search a given directory with a pattern and return a
+ * new instance of this collection class.
+ * @param rootDirectory The directory in which to search.
+ * @param pattern A pattern for matching file names. Can include * and ?.
+ * @param subdirectories Whether subdirectories should be searched too.
+ */
+ Files(const string& rootDirectory, const string& pattern, bool subdirectories = false);
+
+ /**
+ * Destructor.
+ */
+ virtual ~Files();
+
+ /**
+ * Return the number of files found.
+ * @return The number of files found.
+ */
+ unsigned int size();
+
+ /**
+ * Return a File at this position in the collection.
+ * @param index The index into the collection.
+ * @return The File at this index in the collection.
+ */
+ const File& operator[] (unsigned int index);
+
+ private:
+ /**
+ * Search the given directory and pattern for matching files.
+ * @param rootDirectory The directory in which to search.
+ * @param pattern A pattern for matching file names. Can include * and ?.
+ * @param subdirectories Whether subdirectories should be searched too.
+ */
+ void findFiles(const string& rootDirectory, const string& pattern, bool subdirectories);
+
+ /**
+ * The top level directory to search.
+ */
+ string rootDirectory;
+
+ typedef vector<File> FILES;
+
+ /**
+ * Vector of File.
+ */
+ FILES files;
+ };
+
+ } // End namespace sca
+} // End namespace tuscany
+#endif // tuscany_sca_util_file_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/FileLogWriter.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/FileLogWriter.cpp
new file mode 100644
index 0000000000..c3749c1be2
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/FileLogWriter.cpp
@@ -0,0 +1,49 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date$ */
+
+#include "tuscany/sca/util/FileLogWriter.h"
+#include <iostream>
+using namespace std;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ FileLogWriter::FileLogWriter(const char* logfile)
+ {
+ logFile.open(logfile, ios_base::app);
+ }
+
+ FileLogWriter::~FileLogWriter()
+ {
+ logFile.close();
+ }
+
+ void FileLogWriter::log(int level, const char* msg)
+ {
+ for (int i=0; i < level; i++)
+ {
+ logFile << " ";
+ }
+ logFile << msg <<endl;
+ }
+
+ } // End namespace sca
+} // End namespace tuscany
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/FileLogWriter.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/FileLogWriter.h
new file mode 100644
index 0000000000..4f230a8f0b
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/FileLogWriter.h
@@ -0,0 +1,53 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date$ */
+
+#ifndef tuscany_sca_util_filelogwriter_h
+#define tuscany_sca_util_filelogwriter_h
+
+#include "tuscany/sca/util/LogWriter.h"
+#include <iostream>
+#include <fstream>
+using std::ofstream;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ /**
+ * Log writer to write out to standard out.
+ */
+ class FileLogWriter : public LogWriter
+ {
+ public:
+ FileLogWriter(const char* logfile);
+
+ virtual ~FileLogWriter();
+
+ /**
+ * Will write to the console.
+ * See LogWriter#log.
+ */
+ virtual void log(int level, const char* msg);
+ private:
+ ofstream logFile;
+ };
+
+ } // End namespace sca
+} // End namespace tuscany
+#endif // tuscany_sca_util_defaultlogwriter_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Library.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Library.cpp
new file mode 100644
index 0000000000..0a50f396c7
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Library.cpp
@@ -0,0 +1,122 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "tuscany/sca/util/Library.h"
+#include "tuscany/sca/util/Utils.h"
+#include "tuscany/sca/util/Exceptions.h"
+#include "tuscany/sca/util/Logging.h"
+using namespace osoa::sca;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ Library::Library()
+ : hDLL(NULL)
+ {
+ }
+
+ Library::Library(const string& libraryName)
+ : name(libraryName), hDLL(NULL)
+ {
+ LOGINFO_1(3, "Library::construcor : %s", name.c_str());
+ load();
+ }
+
+ Library::Library(const Library& lib)
+ : name(lib.name), hDLL(NULL)
+ {
+ LOGINFO_1(3, "Library::copy constructor : %s", name.c_str());
+ if (lib.hDLL)
+ {
+ load();
+ }
+ }
+
+ Library& Library::operator=(const Library& lib)
+ {
+ LOGINFO_1(3, "Library::operator= : %s", name.c_str());
+ if (&lib != this)
+ {
+ unload();
+ name = lib.name;
+ load();
+ }
+ return *this;
+ }
+
+ Library::~Library()
+ {
+ LOGINFO_1(3, "Library::destructor: %s", name.c_str());
+ unload();
+ }
+
+
+ void Library::load()
+ {
+ LOGINFO_1(3, "Library::load : %s", name.c_str());
+ string msg;
+#if defined(WIN32) || defined (_WINDOWS)
+ hDLL = LoadLibrary(name.c_str());
+#else
+ hDLL = dlopen(name.c_str(), RTLD_NOW);
+#endif
+ if (hDLL == NULL)
+ {
+ LOGERROR_1(1, "Library::load: Unable to load library %s", name.c_str());
+ msg = "Unable to load dll: " + name;
+ throw ServiceRuntimeException(msg.c_str());
+ }
+ }
+
+ void Library::unload()
+ {
+ if (hDLL != NULL)
+ {
+ LOGINFO_1(3, "Library::unload : %s", name.c_str());
+#if defined(WIN32) || defined (_WINDOWS)
+ FreeLibrary(hDLL);
+#else
+ dlclose(hDLL);
+#endif
+ hDLL = NULL;
+ }
+ }
+
+ void* Library::getSymbol(const string& symbol)
+ {
+ LOGINFO_1(3, "Library::getSymbol : %s", symbol.c_str());
+ if (!hDLL)
+ {
+ return 0;
+ }
+#if defined(WIN32) || defined (_WINDOWS)
+ return GetProcAddress(hDLL, symbol.c_str());
+#else
+ return dlsym(hDLL, symbol.c_str());
+#endif
+ }
+
+ } // End namespace sca
+} // End namespace tuscany
+
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Library.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Library.h
new file mode 100644
index 0000000000..69b2f5352a
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Library.h
@@ -0,0 +1,97 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_util_library_h
+#define tuscany_sca_util_library_h
+
+
+#if defined(WIN32) || defined (_WINDOWS)
+#include <windows.h>
+#else
+#include <unistd.h>
+#include <dlfcn.h>
+#endif
+
+#include <string>
+using std::string;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ /**
+ * Information about shared libraries and methods to
+ * access these shared libraries.
+ */
+ class Library
+ {
+ public:
+ Library();
+
+ /**
+ * Constructor. Will load the library.
+ * @param libraryName Fully qualified name of the library.
+ */
+ Library(const string& libraryName);
+
+ /**
+ * Destructor. Will unload the library.
+ */
+ virtual ~Library();
+
+ Library(const Library& lib);
+ Library& operator=(const Library& lib);
+
+ /**
+ * Find an externalized symbol in the library.
+ * @param symbol The name of the symbol to be found.
+ * @return The pointer to the symbol if found, otherwise 0.
+ */
+ void* getSymbol(const string& symbol);
+ private:
+ /**
+ * Name of the library.
+ */
+ string name;
+
+ /**
+ * Handle to the loaded library.
+ */
+#if defined(WIN32) || defined (_WINDOWS)
+ HINSTANCE hDLL;
+#else
+ void* hDLL;
+#endif
+
+ /**
+ * Load the library.
+ */
+ void load();
+
+ /**
+ * Unload the library, if successfully loaded.
+ */
+ void unload();
+
+ };
+
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_util_library_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/LogWriter.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/LogWriter.cpp
new file mode 100644
index 0000000000..d77d1e4bfd
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/LogWriter.cpp
@@ -0,0 +1,32 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/LogWriter.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ LogWriter::~LogWriter()
+ {
+ }
+
+ } // End namespace sca
+} // End namespace tuscany
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/LogWriter.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/LogWriter.h
new file mode 100644
index 0000000000..edb07c3684
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/LogWriter.h
@@ -0,0 +1,47 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_util_logwriter_h
+#define tuscany_sca_util_logwriter_h
+
+#include "osoa/sca/export.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ /**
+ * Abstract class for extending logging to other destinations.
+ */
+ class SCA_API LogWriter
+ {
+ public:
+ virtual ~LogWriter();
+
+ /**
+ * Log a message.
+ * @param level The level of logging for this message.
+ * @param msg The message to log.
+ */
+ virtual void log(int level, const char* msg) = 0;
+ };
+
+ } // End namespace sca
+} // End namespace tuscany
+#endif // tuscany_sca_util_logwriter_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Logger.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Logger.cpp
new file mode 100644
index 0000000000..0a888a69ef
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Logger.cpp
@@ -0,0 +1,107 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include <iostream>
+#include <stdarg.h>
+
+#include "tuscany/sca/util/Logger.h"
+#include "tuscany/sca/util/DefaultLogWriter.h"
+#include "tuscany/sca/util/FileLogWriter.h"
+
+using namespace std;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ LogWriter* Logger::logWriter = getLogWriter();
+
+ LogWriter* Logger::getLogWriter()
+ {
+ if (logWriter == 0)
+ {
+ setLogWriter(0);
+ }
+ return logWriter;
+ }
+
+ void Logger::setLogWriter(LogWriter* writer)
+ {
+ if (logWriter != writer
+ && logWriter != 0)
+ {
+ delete logWriter;
+ }
+
+ if (writer == 0)
+ {
+ char* loggingVar = 0;
+ loggingVar = getenv("TUSCANY_SCACPP_LOG");
+ if (loggingVar == 0)
+ logWriter = new DefaultLogWriter;
+ else
+ logWriter = new FileLogWriter(loggingVar);
+ }
+ else
+ {
+ logWriter = writer;
+ }
+ }
+
+ int Logger::loggingLevel = setLogging();
+
+ int Logger::setLogging()
+ {
+ char* loggingVar = 0;
+ loggingVar = getenv("TUSCANY_SCACPP_LOGGING");
+ if (loggingVar == 0)
+ return 0;
+ else
+ return atoi(loggingVar);
+ }
+
+ void Logger::setLogging(int level)
+ {
+ loggingLevel = level;
+ }
+
+ void Logger::log(int level, const char* msg)
+ {
+ if (level <= loggingLevel)
+ {
+ logWriter->log(level, msg);
+ }
+ }
+
+ void Logger::logArgs(int level, const char* msg, ...)
+ {
+ if (level <= loggingLevel)
+ {
+ va_list variableArguments;
+ va_start(variableArguments, msg);
+ char messageBuffer[1024];
+ vsprintf(messageBuffer, msg, variableArguments);
+ logWriter->log(level, messageBuffer);
+ va_end(variableArguments);
+ }
+ }
+
+ } // End namespace sca
+} // End namespace tuscany
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Logger.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Logger.h
new file mode 100644
index 0000000000..be5e47e02a
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Logger.h
@@ -0,0 +1,89 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_util_logger_h
+#define tuscany_sca_util_logger_h
+
+#include "osoa/sca/export.h"
+#include "tuscany/sca/util/LogWriter.h"
+namespace tuscany
+{
+ namespace sca
+ {
+ /**
+ * Provide a logging interface.
+ */
+ class Logger {
+
+ public:
+ /**
+ * Set the log writer to use.
+ * @param writer The writer to use for all subsequent logging.
+ */
+ SCA_API static void setLogWriter(LogWriter* writer);
+
+ /**
+ * Set or reset the logging level. Any message with a higher logging
+ * level than this value will be filtered (i.e. not shown).
+ * @param level The level of logging to use for all subsequent logging.
+ */
+ SCA_API static void setLogging(int level);
+
+ /**
+ * Log a message.
+ * @param level The log level of this message.
+ * @param msg The message to be logged.
+ */
+ SCA_API static void log(int level, const char* msg);
+
+ /**
+ * Log a message with variable arguments.
+ * @param level The log level of this message.
+ * @param msg The message to be logged. Must include template
+ * characters as described in printf.
+ * @param ... Variable arguments.
+ */
+ SCA_API static void logArgs(int level, const char* msg, ...);
+
+ /**
+ * The currently set logging level
+ */
+ SCA_API static int loggingLevel;
+
+ private:
+ /**
+ * The current log writer.
+ */
+ static LogWriter* logWriter;
+
+ /**
+ * Get the current log writer.
+ * @return The current log writer.
+ */
+ static LogWriter* getLogWriter();
+
+ /**
+ * Retrieves the logging level set as an environment variable.
+ */
+ static int setLogging();
+ };
+
+ } // End namespace sca
+} // End namespace tuscany
+#endif // tuscany_sca_util_logger_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Logging.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Logging.h
new file mode 100644
index 0000000000..7e3a1a84ab
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Logging.h
@@ -0,0 +1,57 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_util_logging_h
+#define tuscany_sca_util_logging_h
+
+#include "tuscany/sca/util/Logger.h"
+
+#define LOGENTRY(level, methodName) \
+if (Logger::loggingLevel >= level) \
+Logger::log(level, "Entering: " methodName);
+
+#define LOGEXIT(level, methodName) \
+if (Logger::loggingLevel >= level) \
+Logger::log(level, "Exiting: " methodName);
+
+#define LOGINFO(level, message) \
+if (Logger::loggingLevel >= level) \
+Logger::log(level, message);
+
+#define LOGINFO_1(level, message, arg1) \
+if (Logger::loggingLevel >= level) \
+Logger::logArgs(level, message, arg1);
+
+#define LOGINFO_2(level, message, arg1, arg2) \
+if (Logger::loggingLevel >= level) \
+Logger::logArgs(level, message, arg1, arg2);
+
+#define LOGERROR(level, message) \
+if (Logger::loggingLevel >= level) \
+Logger::log(level, message);
+
+#define LOGERROR_1(level, message, arg1) \
+if (Logger::loggingLevel >= level) \
+Logger::logArgs(level, message, arg1);
+
+#define LOGERROR_2(level, message, arg1, arg2) \
+if (Logger::loggingLevel >= level) \
+Logger::logArgs(level, message, arg1, arg2);
+
+#endif // tuscany_sca_util_logging_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Utils.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Utils.cpp
new file mode 100644
index 0000000000..6417ed3da4
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Utils.cpp
@@ -0,0 +1,215 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "tuscany/sca/util/Utils.h"
+
+using namespace std;
+using namespace commonj::sdo;
+namespace tuscany
+{
+ namespace sca
+ {
+ void Utils::tokeniseUri(const string& uri, string& token1, string& token2)
+ {
+ tokeniseString("/", uri, token1, token2);
+ }
+
+ void Utils::tokeniseQName(const string& qname, string& uri, string& name)
+ {
+ tokeniseString("#", qname, uri, name);
+ if (name == "")
+ {
+ name = uri;
+ uri = "";
+ }
+ }
+
+ void Utils::tokeniseString(
+ const string& separator,
+ const string& str,
+ string& token1,
+ string& token2)
+ {
+ string::size_type sep = str.find(separator);
+ if (sep != string::npos)
+ {
+ token1 = str.substr(0, sep);
+ if ( (sep+1) < str.length())
+ {
+ token2 = str.substr(sep+1);
+ }
+ else
+ {
+ token2 = "";
+ }
+ }
+ else
+ {
+ token1 = str;
+ token2 = "";
+ }
+ }
+
+ void Utils::rTokeniseString(
+ const string& separator,
+ const string& str,
+ string& token1,
+ string& token2)
+ {
+ string::size_type sep = str.rfind(separator);
+ if (sep != string::npos)
+ {
+ token1 = str.substr(0, sep);
+ if ( (sep+1) < str.length())
+ {
+ token2 = str.substr(sep+1);
+ }
+ else
+ {
+ token2 = "";
+ }
+ }
+ else
+ {
+ token1 = "";
+ token2 = str;
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // Print a DatObject tree
+ //////////////////////////////////////////////////////////////////////////
+ void Utils::tabs(int inc)
+ {
+ for (int ind=0; ind <inc; ind++)
+ {
+ cout << " ";
+ }
+ }
+
+ void Utils::printDO(DataObjectPtr dataObject, int increment)
+ {
+ int inc=increment;
+ if (!dataObject)
+ return;
+ const Type& dataObjectType = dataObject->getType();
+ tabs(inc);
+ cout << "DataObject type: " << dataObjectType.getURI()<< "#" << dataObjectType.getName() << endl;
+ inc++;
+
+ //////////////////////////////////////////////////////////////////////////
+ // Iterate over all the properties
+ //////////////////////////////////////////////////////////////////////////
+ PropertyList pl = dataObject->getInstanceProperties();
+ for (int i = 0; i < pl.size(); i++)
+ {
+ tabs(inc);
+ cout << "Property: " << pl[i].getName() << endl;
+
+ const Type& propertyType = pl[i].getType();
+
+ tabs(inc);
+ cout << "Property Type: " << propertyType.getURI()<< "#" << propertyType.getName() << endl;
+
+ if (dataObject->isSet(pl[i]))
+ {
+
+ //////////////////////////////////////////////////////////////////////
+ // For a many-valued property get the list of values
+ //////////////////////////////////////////////////////////////////////
+ if (pl[i].isMany())
+ {
+ inc++;
+ DataObjectList& dol = dataObject->getList(pl[i]);
+ for (int j = 0; j <dol.size(); j++)
+ {
+ tabs(inc);
+ cout << "Value " << j <<endl;
+ inc++;
+
+ if (propertyType.isDataType())
+ {
+ tabs(inc);
+ cout<< "Property Value: " << dol.getCString(j) <<endl ;
+ }
+ else
+ printDO(dol[j], inc);
+ inc--;
+ }
+ inc--;
+ } // end IsMany
+
+
+ //////////////////////////////////////////////////////////////////////
+ // For a primitive data type print the value
+ //////////////////////////////////////////////////////////////////////
+ else if (propertyType.isDataType())
+ {
+ tabs(inc);
+ cout<< "Property Value: " << dataObject->getCString(pl[i]) <<endl ;
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // For a dataobject print the do
+ //////////////////////////////////////////////////////////////////////
+ else
+ {
+ inc++;
+ printDO(dataObject->getDataObject(pl[i]), inc);
+ inc--;
+ }
+ }
+ else
+ {
+ tabs(inc);
+ cout<< "Property Value: not set" <<endl ;
+ }
+
+ }
+ inc--;
+ }
+
+ void Utils::printTypes(DataFactoryPtr df)
+ {
+ //////////////////////////////////////////////////////////////////////////
+ // Retrieve the DataFactory from the mediator
+ // get the list of Types in the DataFactory and list them
+ //////////////////////////////////////////////////////////////////////////
+ TypeList tl = df->getTypes();
+ for (int i = 0; i < tl.size(); i++)
+ {
+ cout << "Type: " << tl[i].getURI()<< "#" << tl[i].getName() << endl;
+ PropertyList pl = tl[i].getProperties();
+ for (int j = 0; j < pl.size(); j++)
+ {
+ cout << "\tProperty: " << pl[j].getName()
+ << " type: " <<pl[j].getType().getURI()<<"#"<<pl[j].getType().getName()<< endl;
+
+ }
+ }
+
+ }
+
+
+ } // End namespace sca
+} // End namespace tuscany
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Utils.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Utils.h
new file mode 100644
index 0000000000..184bcd3dad
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/util/Utils.h
@@ -0,0 +1,61 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_util_utils_h
+#define tuscany_sca_util_utils_h
+#include <string>
+using std::string;
+#include "commonj/sdo/SDO.h"
+
+#include "osoa/sca/export.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ /**
+ * Utility methods to parse strings and provide debugging information.
+ */
+ class Utils {
+
+ public:
+ static void tokeniseUri(const string& uri, string& token1, string& token2);
+ static void tokeniseQName(const string& sdoname, string& uri, string& name);
+ static void tokeniseString(
+ const string& separator,
+ const string& str,
+ string& token1,
+ string& token2);
+
+ static void rTokeniseString(
+ const string& separator,
+ const string& str,
+ string& token1,
+ string& token2);
+
+ SCA_API static void printDO(commonj::sdo::DataObjectPtr dataObject, int increment=0);
+ SCA_API static void printTypes(commonj::sdo::DataFactoryPtr df);
+
+ private:
+ static void tabs(int increment=0);
+ };
+
+ } // End namespace sca
+} // End namespace tuscany
+#endif // tuscany_sca_util_utils_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/ws/EntryPointProxy.cpp b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/ws/EntryPointProxy.cpp
new file mode 100644
index 0000000000..dcf974623d
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/ws/EntryPointProxy.cpp
@@ -0,0 +1,677 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * 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 "tuscany/sca/ws/EntryPointProxy.h"
+
+using namespace tuscany::sca;
+
+#include "tuscany/sca/util/Exceptions.h"
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/util/Utils.h"
+#include "tuscany/sca/core/SCARuntime.h"
+
+#include "tuscany/sca/model/WSBinding.h"
+
+#include "commonj/sdo/SDO.h"
+using namespace commonj::sdo;
+
+using namespace tuscany::sca::ws;
+
+
+// Singleton pattern
+EntryPointProxy* EntryPointProxy::entryPointProxyInstance = new EntryPointProxy();
+
+EntryPointProxy* EntryPointProxy::getInstance()
+{
+ return entryPointProxyInstance;
+}
+
+EntryPointProxy::EntryPointProxy()
+{
+ LOGENTRY(1,"EntryPointProxy::constructor");
+ tuscanyRuntime = NULL;
+ scaEntryPoint = NULL;
+ entryPointName = "";
+ systemRoot = "";
+ moduleComponent = "";
+ LOGEXIT(1,"EntryPointProxy::constructor");
+}
+
+EntryPointProxy::~EntryPointProxy()
+{
+ LOGENTRY(1,"EntryPointProxy::destructor");
+
+ if(tuscanyRuntime != NULL)
+ {
+ tuscanyRuntime->stop();
+ delete tuscanyRuntime;
+ tuscanyRuntime = NULL;
+ }
+ if(scaEntryPoint != NULL)
+ {
+ delete scaEntryPoint;
+ }
+ LOGEXIT(1,"EntryPointProxy::destructor");
+}
+
+void EntryPointProxy::init(const char* systemRootPath, const char* fullEntryPointName)
+{
+ LOGENTRY(1,"EntryPointProxy::init");
+
+ try
+ {
+
+ // fullEntryPointName is of the form "subsystem name"/"module component name"/"entry point name"
+ // Get the "subsystem name"/"module component name" part for setDefaultModuleComponent
+ // Keep the "entry point name" part for use in invoke
+ string subsystemAndComponentName, epName;
+ Utils::rTokeniseString("/", fullEntryPointName, subsystemAndComponentName, epName);
+
+ bool newInitParams = false;
+
+ if(systemRoot.length() != 0 && systemRoot != systemRootPath)
+ {
+ systemRoot = systemRootPath;
+ newInitParams = true;
+ }
+
+ if(moduleComponent.length() != 0 && moduleComponent != subsystemAndComponentName)
+ {
+ moduleComponent = subsystemAndComponentName;
+ newInitParams = true;
+ }
+
+ if(entryPointName.length() != 0 && entryPointName != epName)
+ {
+ entryPointName = epName;
+ newInitParams = true;
+ }
+
+
+ if(tuscanyRuntime == NULL)
+ {
+ LOGINFO(4, "Creating new TuscanyRuntime");
+ moduleComponent = subsystemAndComponentName;
+ systemRoot = systemRootPath;
+ entryPointName = epName;
+ tuscanyRuntime = new TuscanyRuntime(moduleComponent, systemRoot);
+ tuscanyRuntime->start();
+ }
+ else if(tuscanyRuntime != NULL && newInitParams)
+ {
+ LOGINFO(4, "Restarting TuscanyRuntime with new SystemRoot or DefaultModule");
+ tuscanyRuntime->stop();
+ tuscanyRuntime->setDefaultModuleComponent(moduleComponent);
+ tuscanyRuntime->setSystemRoot(systemRoot);
+ tuscanyRuntime->start();
+ }
+
+ if(scaEntryPoint == NULL)
+ {
+ scaEntryPoint = new SCAEntryPoint(fullEntryPointName);
+ }
+ else
+ {
+ if(newInitParams)
+ {
+ delete scaEntryPoint;
+ scaEntryPoint = NULL;
+ scaEntryPoint = new SCAEntryPoint(fullEntryPointName);
+ }
+ }
+ }
+ catch(SystemConfigurationException &ex)
+ {
+ LOGERROR_1(0, "SystemConfigurationException has been caught: %s\n", ex.getMessageText());
+ scaEntryPoint = 0;
+ }
+ catch(ServiceRuntimeException &ex)
+ {
+ LOGERROR_2(0, "%s has been caught: %s\n", ex.getEClassName(), ex.getMessageText());
+ scaEntryPoint = 0;
+ }
+ LOGEXIT(1,"EntryPointProxy::init");
+}
+
+DataFactoryPtr EntryPointProxy::getDataFactory()
+{
+ if (scaEntryPoint == 0) return 0;
+ return scaEntryPoint->getDataFactory();
+}
+
+///
+/// This method will be called when an EntryPoint needs to be invoked.
+///
+DataObjectPtr EntryPointProxy::invoke(const char* operationName, DataObjectPtr inputDataObject)
+{
+ LOGENTRY(1,"EntryPointProxy::invoke");
+
+ if (scaEntryPoint == 0)
+ {
+ LOGINFO(4, "EntryPointProxy has not got an sca EntryPoint\n");
+ return NULL;
+ }
+
+ DataFactoryPtr dataFactoryPtr = scaEntryPoint->getDataFactory();
+
+ DataObjectPtr outputDataObject = NULL;
+ SCARuntime* runtime = SCARuntime::getInstance();
+
+ Module* module = runtime->getCurrentModule();
+
+ EntryPoint* entryPoint = module->findEntryPoint(entryPointName);
+
+ Binding* binding = entryPoint->getBinding();
+ if(binding->getBindingType() == Binding::SCA)
+ {
+ LOGINFO_1(4, "EntryPointProxy has got SCA binding: %s\n", binding->getUri().c_str());
+ LOGERROR(0, "EntryPoints with SCA bindings are not yet supported");
+ return NULL;
+ }
+ else if(binding->getBindingType() == Binding::WS)
+ {
+ WSBinding* wsBinding = (WSBinding*) binding;
+
+ string wsdlNamespace = wsBinding->getWSDLNamespaceURL();
+ string wsdlPort = wsBinding->getPortName();
+ string wsdlService = wsBinding->getServiceName();
+
+ Wsdl* wsdl = module->findWsdl(wsdlNamespace);
+ if (wsdl == 0)
+ {
+ LOGINFO_1(0, "WSDL description %s not found\n", wsdlNamespace.c_str());
+ return NULL;
+ }
+
+ WsdlOperation operation;
+ try
+ {
+ operation = wsdl->findOperation(wsdlService, wsdlPort, operationName);
+ }
+ catch(SystemConfigurationException &ex)
+ {
+ LOGERROR_1(0, "SystemConfigurationException has been caught: %s\n", ex.getMessageText());
+ return NULL;
+ }
+
+ LOGINFO_2(4, "EntryPointProxy has got WsdlOperation with inputType: %s#%s",
+ operation.getInputTypeUri().c_str(),
+ operation.getInputTypeName().c_str());
+ LOGINFO_2(4, "EntryPointProxy has got WsdlOperation with outputType: %s#%s",
+ operation.getOutputTypeUri().c_str(),
+ operation.getOutputTypeName().c_str());
+ LOGINFO_2(4, "EntryPointProxy has got WsdlOperation with documentStyle=%d and encoded=%d",
+ operation.isDocumentStyle(),
+ operation.isEncoded());
+
+ if(operation.isDocumentStyle())
+ {
+ // Document style
+ outputDataObject = dataFactoryPtr->create(operation.getOutputTypeUri().c_str(), operation.getOutputTypeName().c_str());
+
+ //printf("outputDataObject %s#%s\n", outputDataObject->getType().getURI(), outputDataObject->getType().getName());
+ //Utils::printDO(outputDataObject);
+ }
+ else
+ {
+ // RPC style
+ LOGERROR(0, "EntryPoints with RPC style WSDL Operations are not yet supported");
+ return NULL;
+ }
+ }
+
+ // Create new Operation object and set parameters and return value
+ Operation operation(operationName);
+
+ // Go through input data object to set the operation parameters
+ PropertyList pl = inputDataObject->getInstanceProperties();
+
+ for(int i=0; i<pl.size(); i++)
+ {
+ const char* name = pl[i].getName();
+
+ switch (pl[i].getTypeEnum())
+ {
+ case Type::BooleanType:
+ {
+ bool* boolData = new bool;
+ *boolData = inputDataObject->getBoolean(pl[i]);
+ //printf("inputDataObject has BooleanType named %s with value %d\n", name, boolData);
+ operation.addParameter(boolData);
+ }
+ break;
+ case Type::ByteType:
+ {
+ char* byteData = new char;
+ //printf("inputDataObject has ByteType named %s\n", name);
+ *byteData = inputDataObject->getByte(pl[i]);
+ operation.addParameter(byteData);
+ }
+ break;
+ case Type::BytesType:
+ {
+ int len = inputDataObject->getLength(pl[i]);
+ char* bytesData = new char[len+1];
+ int bytesWritten = inputDataObject->getBytes(pl[i], bytesData, len);
+ // Ensure the bytes end with the null char. Not sure if this is neccessary
+ if(bytesWritten <= len)
+ {
+ bytesData[bytesWritten] = 0;
+ }
+ else
+ {
+ bytesData[len] = 0;
+ }
+ //printf("inputDataObject has BytesType named %s with length %d\n", name, bytesWritten);
+ operation.addParameter(&bytesData);
+ }
+ break;
+ case Type::CharacterType:
+ {
+ // This code should work but won't be used as there is no mapping from an XSD type to the SDO CharacterType
+ wchar_t* charData = new wchar_t;
+ //printf("inputDataObject has CharacterType named %s\n", name);
+ *charData = inputDataObject->getCharacter(pl[i]);
+ operation.addParameter(charData);
+ }
+ break;
+ case Type::DoubleType:
+ {
+ long double* doubleData = new long double;
+ *doubleData = inputDataObject->getDouble(pl[i]);
+ //printf("inputDataObject has DoubleType named %s\n", name);
+ operation.addParameter(doubleData);
+ }
+ break;
+ case Type::FloatType:
+ {
+ float* floatData = new float;
+ *floatData = inputDataObject->getFloat(pl[i]);
+ //printf("inputDataObject has FloatType named %s with value %f\n", name, *floatData);
+ operation.addParameter(floatData);
+ }
+ break;
+ case Type::IntegerType:
+ {
+ long* intData = new long;
+ //printf("inputDataObject has IntegerType named %s\n", name);
+ *intData = inputDataObject->getInteger(pl[i]);
+ operation.addParameter(intData);
+ }
+ break;
+ case Type::ShortType:
+ {
+ short* shortData = new short;
+ //printf("inputDataObject has ShortType named %s\n", name);
+ *shortData = inputDataObject->getShort(pl[i]);
+ operation.addParameter(shortData);
+ }
+ break;
+ case Type::StringType:
+ {
+ const char* stringData = inputDataObject->getCString(pl[i]);
+ //printf("inputDataObject has StringType named %s with value %s\n", name, stringData);
+ operation.addParameter(&stringData);
+ }
+ break;
+ case Type::DataObjectType:
+ {
+ DataObjectPtr dataObjectData = inputDataObject->getDataObject(pl[i]);
+ //printf("inputDataObject has DataObjectType named %s (#%d)\n", name, dataObjectData);
+
+ if(!dataObjectData)
+ {
+ LOGINFO_1(4, "SDO DataObject parameter named %s was null", name);
+ }
+ operation.addParameter(&dataObjectData);
+ }
+ break;
+ case Type::OpenDataObjectType:
+ {
+ /*
+ * This code deals with xsd:any element parameters
+ * Get each element as a DataObject and add in to the parameter list
+ */
+
+ //printf("inputDataObject has OpenDataObjectType named %s\n", name);
+ DataObjectList& dataObjectList = inputDataObject->getList(pl[i]);
+
+ for(int j=0; j<dataObjectList.size(); j++)
+ {
+ DataObjectPtr dataObjectData = dataObjectList[j];
+ if(!dataObjectData)
+ {
+ LOGINFO_2(4, "SDO OpenDataObject parameter named %s[%d] was null", name, j);
+ }
+ operation.addParameter(&dataObjectData);
+ //Utils::printDO(dataObjectData);
+ }
+ }
+ break;
+ case Type::DateType:
+ LOGERROR_1(0, "SDO DateType parameters are not yet supported (%s)", name);
+ return NULL;
+ case Type::LongType:
+ LOGERROR_1(0, "SDO LongType (int64_t) parameters are not yet supported (%s)", name);
+ return NULL;
+ break;
+ case Type::UriType:
+ LOGERROR_1(0, "SDO UriType parameters are not yet supported (%s)", name);
+ return NULL;
+ break;
+ case Type::BigDecimalType:
+ LOGERROR_1(0, "SDO BigDecimalType parameters are not yet supported (%s)", name);
+ return NULL;
+ break;
+ case Type::BigIntegerType:
+ LOGERROR_1(0, "SDO BigIntegerType parameters are not yet supported (%s)", name);
+ return NULL;
+ break;
+ default:
+ LOGERROR_1(0, "Unknown SDO type parameter named %s has been found. Unknown types are not yet supported", name);
+ return NULL;
+ }
+ }
+
+ // Now go through outputDataObject to set the return value
+ pl = outputDataObject->getInstanceProperties();
+
+ // Set up the possible return value pointers
+ bool boolData = 0;
+ char byteData = 0;
+ wchar_t charData = 0;
+ long double doubleData = 0;
+ float floatData = 0;
+ long intData = 0;
+ short shortData = 0;
+ const char* stringData;
+ DataObjectPtr dataObjectData;
+
+
+ // There should only be one return value, but go through any list anyway?
+ if(pl.size() > 1)
+ {
+ LOGINFO(4, "More than one return value is defined in the WSDL, just defining the first");
+ }
+ else if(pl.size() == 0)
+ {
+ if(outputDataObject->getType().isOpenType() && outputDataObject->getType().isDataObjectType())
+ {
+ /*
+ * This code deals with returning xsd:any elements
+ * Return as a DataObject set within the outputDataObject
+ */
+
+ // An OpenDataObject for the data to return in
+ operation.setReturnValue(&dataObjectData);
+ }
+ else
+ {
+ LOGINFO(4, "No return values are defined in the WSDL");
+ }
+
+ }
+
+ if(pl.size() > 0)
+ {
+ const char* name = pl[0].getName();
+
+ switch (pl[0].getTypeEnum())
+ {
+ case Type::BooleanType:
+ {
+ //printf("outputDataObject has BooleanType named %s\n", name);
+ operation.setReturnValue(&boolData);
+ }
+ break;
+ case Type::ByteType:
+ {
+ //printf("outputDataObject has ByteType named %s\n", name);
+ operation.setReturnValue(&byteData);
+ }
+ break;
+ case Type::CharacterType:
+ {
+ //printf("outputDataObject has CharacterType named %s\n", name);
+ operation.setReturnValue(&charData);
+ }
+ break;
+ case Type::DoubleType:
+ {
+ //printf("outputDataObject has DoubleType named %s\n", name);
+ operation.setReturnValue((long double*) &doubleData);
+ }
+ break;
+ case Type::FloatType:
+ {
+ //printf("outputDataObject has FloatType named %s\n", name);
+ operation.setReturnValue(&floatData);
+ }
+ break;
+ case Type::IntegerType:
+ {
+ //printf("outputDataObject has IntegerType named %s\n", name);
+ operation.setReturnValue(&intData);
+ }
+ break;
+ case Type::ShortType:
+ {
+ //printf("outputDataObject has ShortType named %s\n", name);
+ operation.setReturnValue(&shortData);
+ }
+ break;
+ case Type::StringType:
+ case Type::BytesType:
+ {
+ //printf("outputDataObject has StringType or BytesType named %s\n", name);
+ operation.setReturnValue((const char**) &stringData);
+ }
+ break;
+ case Type::DataObjectType:
+ {
+ // printf("outputDataObject has DataObjectType named %s with type %s # %s\n", name, pl[0].getType().getURI(), pl[0].getType().getName());
+ operation.setReturnValue(&dataObjectData);
+ }
+ break;
+ case Type::DateType:
+ LOGERROR_1(0, "SDO DateType return values are not yet supported (%s)", name);
+ return NULL;
+ case Type::LongType:
+ LOGERROR_1(0, "SDO LongType (int64_t) return values are not yet supported (%s)", name);
+ return NULL;
+ case Type::UriType:
+ LOGERROR_1(0, "SDO UriType return values are not yet supported (%s)", name);
+ return NULL;
+ case Type::BigDecimalType:
+ LOGERROR_1(0, "SDO BigDecimalType return values are not yet supported (%s)", name);
+ return NULL;
+ case Type::BigIntegerType:
+ LOGERROR_1(0, "SDO BigIntegerType return values are not yet supported (%s)", name);
+ return NULL;
+ default:
+ LOGERROR_1(0, "Unknown SDO type return value named %s has been found. Unknown types are not yet supported", name);
+ return NULL;
+ }
+ }
+
+ try
+ {
+ // Call into the wired module
+ scaEntryPoint->invoke(operation);
+
+ // Set the data in the outputDataObject to be returned
+ setOutputData(operation, outputDataObject);
+ }
+ catch(SDORuntimeException &ex)
+ {
+ // TODO: Return more error information than just a null DataObject
+ LOGERROR_2(0, "%s has been caught: %s\n", ex.getEClassName(), ex.getMessageText());
+ return NULL;
+ }
+ catch(ServiceRuntimeException &ex)
+ {
+ // TODO: Return more error information than just a null DataObject
+ LOGERROR_2(0, "%s has been caught: %s\n", ex.getEClassName(), ex.getMessageText());
+ return NULL;
+ }
+
+ LOGEXIT(1,"EntryPointProxy::invoke");
+
+ return outputDataObject;
+}
+
+
+void EntryPointProxy::setOutputData(Operation operation, DataObjectPtr outputDataObject)
+{
+ // Go through data object to set the return value
+ PropertyList pl = outputDataObject->getInstanceProperties();
+
+ if(pl.size() == 0)
+ {
+ if(outputDataObject->getType().isOpenType() && outputDataObject->getType().isDataObjectType())
+ {
+ /*
+ * This code deals with returning xsd:any elements
+ * Return as a DataObject set within the outputDataObject
+ */
+
+ DataObjectPtr* dataObjectData = (DataObjectPtr*) operation.getReturnValue();
+ //Utils::printDO(*dataObjectData);
+
+ // Need to provide a name for the dataobject being returned, use the containment property name if there is one.
+ const char* rootName = "OpenDataObject";
+ try
+ {
+ const Property& prop = (*dataObjectData)->getContainmentProperty();
+ rootName = prop.getName();
+ (*dataObjectData)->detach();
+ }
+ catch(SDOPropertyNotFoundException&)
+ {
+ // DataObject has no containment property - use default rootName
+ }
+ outputDataObject->setDataObject(rootName, *dataObjectData);
+ }
+ else
+ {
+ LOGINFO(4, "No return values are defined in the WSDL");
+ }
+
+ }
+
+ // Should only be one return value.. This goes through all return values
+ for(int i=0; i<pl.size(); i++)
+ {
+ const char* name = pl[i].getName();
+
+ switch (pl[i].getTypeEnum())
+ {
+ case Type::BooleanType:
+ {
+ bool* boolData = (bool*)operation.getReturnValue();
+ //printf("outputDataObject has BooleanType named %s with value %d\n", name, *boolData);
+ outputDataObject->setBoolean(pl[i], *boolData);
+ }
+ break;
+ case Type::ByteType:
+ {
+ char* byteData = (char*) operation.getReturnValue();
+ //printf("outputDataObject has ByteType named %s with value %c (#%d)\n", name, *byteData, *byteData);
+ outputDataObject->setByte(pl[i], *byteData);
+ }
+ break;
+ case Type::BytesType:
+ {
+ const char** bytesData = (const char**) operation.getReturnValue();
+ // TODO This looks for the first NULL byte - this may not be the full length of the data...
+ int len = 0;
+ while((*bytesData)[len] != 0)
+ {
+ len++;
+ }
+ //printf("outputDataObject has BytesType named %s with value %s and length %d\n", name, *bytesData, len);
+ outputDataObject->setBytes(pl[i], *bytesData, len);
+ }
+ break;
+ case Type::CharacterType:
+ {
+ wchar_t* charData = (wchar_t*) operation.getReturnValue();
+ //printf("outputDataObject has CharacterType named %s with value %s\n", name, charData);
+ outputDataObject->setCharacter(pl[i], *charData);
+ }
+ break;
+ case Type::DoubleType:
+ {
+ long double* doubleData = (long double*) operation.getReturnValue();
+ //printf("outputDataObject has DoubleType named %s with value %f\n", name, *doubleData);
+ outputDataObject->setDouble(pl[i], *doubleData);
+ }
+ break;
+ case Type::FloatType:
+ {
+ float* floatData = (float*) operation.getReturnValue();
+ //printf("outputDataObject has FloatType named %s with value %f \n", name, *floatData);
+ outputDataObject->setFloat(pl[i], *floatData);
+ }
+ break;
+ case Type::IntegerType:
+ {
+ long* intData = (long*) operation.getReturnValue();
+ //printf("outputDataObject has IntegerType named %s with value %d\n", name, *intData);
+ outputDataObject->setInteger(pl[i], *intData);
+ }
+ break;
+ case Type::ShortType:
+ {
+ short* shortData = (short*) operation.getReturnValue();
+ //printf("outputDataObject has ShortType named %s with value %d\n", name, *shortData);
+ outputDataObject->setShort(pl[i], *shortData);
+ }
+ break;
+ case Type::StringType:
+ {
+ const char** stringData = (const char**) operation.getReturnValue();
+ //printf("outputDataObject has StringType named %s with value %s\n", name, *stringData);
+ outputDataObject->setCString(pl[i], *stringData);
+ }
+ break;
+ case Type::DataObjectType:
+ {
+ DataObjectPtr* dataObjectData = (DataObjectPtr*) operation.getReturnValue();
+ //printf("outputDataObject has DataObjectType named %s with value (%d)\n", name, (*dataObjectData));
+ outputDataObject->setDataObject(pl[i], *dataObjectData);
+ }
+ break;
+ case Type::DateType:
+ LOGERROR_1(0, "SDO DateType return values are not yet supported (%s)", name);
+ break;
+ case Type::LongType:
+ LOGERROR_1(0, "SDO LongType (int64_t) return values are not yet supported (%s)", name);
+ break;
+ case Type::UriType:
+ LOGERROR_1(0, "SDO UriType return values are not yet supported (%s)", name);
+ break;
+ case Type::BigDecimalType:
+ LOGERROR_1(0, "SDO BigDecimalType return values are not yet supported (%s)", name);
+ break;
+ case Type::BigIntegerType:
+ LOGERROR_1(0, "SDO BigIntegerType return values are not yet supported (%s)", name);
+ break;
+ default:
+ LOGERROR_1(0, "Unknown SDO type return value named %s has been found. Unknown types are not yet supported", name);
+ }
+ }
+}
+
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/ws/EntryPointProxy.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/ws/EntryPointProxy.h
new file mode 100644
index 0000000000..959a5ee07c
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/ws/EntryPointProxy.h
@@ -0,0 +1,63 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef tuscany_sca_ws_entrypointproxy_h
+#define tuscany_sca_ws_entrypointproxy_h
+
+#include "osoa/sca/export.h"
+
+#include "commonj/sdo/SDO.h"
+using commonj::sdo::DataObjectPtr;
+
+#include "tuscany/sca/core/SCAEntryPoint.h"
+using tuscany::sca::SCAEntryPoint;
+
+#include "tuscany/sca/core/TuscanyRuntime.h"
+using tuscany::sca::TuscanyRuntime;
+
+#include <string>
+using std::string;
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace ws
+ {
+ class SCA_API EntryPointProxy
+ {
+ public:
+ static EntryPointProxy* getInstance();
+ virtual ~EntryPointProxy();
+ virtual void init(const char* systemRoot, const char* entryPointName);
+ virtual DataFactoryPtr getDataFactory(void);
+ virtual DataObjectPtr invoke(const char* operationName, DataObjectPtr inputDataObject);
+ private:
+ EntryPointProxy();
+ static EntryPointProxy* entryPointProxyInstance;
+ virtual void setOutputData(Operation operation, DataObjectPtr outputDataObject);
+ string entryPointName;
+ string systemRoot;
+ string moduleComponent;
+ SCAEntryPoint* scaEntryPoint;
+ TuscanyRuntime* tuscanyRuntime;
+ };
+ } // End namespace ws
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_ws_entrypointproxy_h
diff --git a/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.h b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.h
new file mode 100644
index 0000000000..713c575735
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/src/tuscany/sca/ws/WSServiceWrapper.h
@@ -0,0 +1,47 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef tuscany_sca_ws_wsservicewrapper_h
+#define tuscany_sca_ws_wsservicewrapper_h
+#include "osoa/sca/export.h"
+
+#include "tuscany/sca/core/ExternalServiceWrapper.h"
+#include "tuscany/sca/model/ExternalService.h"
+#include "tuscany/sca/core/Operation.h"
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace ws
+ {
+
+ class SCA_API WSServiceWrapper : public tuscany::sca::ExternalServiceWrapper
+ {
+ public:
+ WSServiceWrapper(tuscany::sca::model::WireTarget* target);
+ virtual ~WSServiceWrapper();
+
+ virtual void invoke(Operation& operation);
+ };
+ } // End namespace ws
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_ws_wsservicewrapper_h
diff --git a/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/.cdtbuild b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/.cdtbuild
new file mode 100644
index 0000000000..ed308ead8d
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/.cdtbuild
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?fileVersion 3.0.0?>
+
+<ManagedProjectBuildInfo>
+<project id="tuscany_sca_test_CustomerInfo.cdt.managedbuild.target.gnu.so.1305856867" name="Shared Library (Gnu)" projectType="cdt.managedbuild.target.gnu.so">
+<configuration artifactExtension="so" artifactName="CustomerInfo" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.config.gnu.so.debug.180210457" name="Debug" parent="cdt.managedbuild.config.gnu.so.debug">
+<toolChain id="cdt.managedbuild.toolchain.gnu.so.debug.150489083" name="GCC Tool Chain" superClass="cdt.managedbuild.toolchain.gnu.so.debug">
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.compiler.so.debug.744339895" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.so.debug"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.compiler.so.debug.773936698" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.so.debug">
+<option id="gnu.cpp.compiler.option.preprocessor.def.1937348866" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
+<listOptionValue builtIn="false" value="_DEBUG"/>
+</option>
+<option id="gnu.cpp.compiler.option.include.paths.1481017815" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+<listOptionValue builtIn="false" value="${SCA4CPP_HOME}/runtime/core/src"/>
+<listOptionValue builtIn="false" value="${SDO4CPP}/include"/>
+</option>
+</tool>
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.linker.so.debug.2091259285" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.so.debug"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.linker.so.debug.509296678" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.so.debug"/>
+<tool command="as" id="cdt.managedbuild.tool.gnu.assembler.so.debug.187343736" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.so.debug"/>
+<macros/>
+</toolChain>
+</configuration>
+<configuration artifactExtension="so" artifactName="CustomerInfo" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.config.gnu.so.release.954607388" name="Release" parent="cdt.managedbuild.config.gnu.so.release">
+<toolChain id="cdt.managedbuild.toolchain.gnu.so.release.1899157892" name="GCC Tool Chain" superClass="cdt.managedbuild.toolchain.gnu.so.release">
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.compiler.so.release.1905763267" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.so.release"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.compiler.so.release.91975924" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.so.release">
+<option id="gnu.cpp.compiler.option.include.paths.695258843" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+<listOptionValue builtIn="false" value="${SCA4CPP_HOME}/runtime/core/src"/>
+<listOptionValue builtIn="false" value="${SDO4CPP}/include"/>
+</option>
+</tool>
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.linker.so.release.749931234" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.so.release"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.linker.so.release.636362934" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.so.release"/>
+<tool command="as" id="cdt.managedbuild.tool.gnu.assembler.so.release.1971799783" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.so.release"/>
+<macros/>
+</toolChain>
+</configuration>
+<macros/>
+</project>
+</ManagedProjectBuildInfo>
diff --git a/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/.cdtproject b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/.cdtproject
new file mode 100644
index 0000000000..48a12e6664
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/.cdtproject
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse-cdt version="2.0"?>
+
+<cdtproject id="org.eclipse.cdt.managedbuilder.core.managedMake">
+<extension id="org.eclipse.cdt.managedbuilder.core.ManagedBuildManager" point="org.eclipse.cdt.core.ScannerInfoProvider"/>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.domsourceindexer" point="org.eclipse.cdt.core.CIndexer"/>
+<data>
+<item id="org.eclipse.cdt.core.pathentry">
+<pathentry kind="src" path=""/>
+<pathentry kind="out" path=""/>
+<pathentry kind="con" path="org.eclipse.cdt.managedbuilder.MANAGED_CONTAINER"/>
+</item>
+</data>
+</cdtproject>
diff --git a/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/.project b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/.project
new file mode 100644
index 0000000000..60a0a75176
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/.project
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>tuscany_sca_test_CustomerInfo</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ </natures>
+</projectDescription>
diff --git a/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/.settings/org.eclipse.cdt.managedbuilder.core.prefs
new file mode 100644
index 0000000000..691a33706a
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/.settings/org.eclipse.cdt.managedbuilder.core.prefs
@@ -0,0 +1,9 @@
+#Tue Nov 29 15:05:50 GMT 2005
+eclipse.preferences.version=1
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.debug.180210457=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="CPATH" operation\="remove"/>\n<variable name\="CPLUS_INCLUDE_PATH" operation\="remove"/>\n</environment>\n
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.release.954607388=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="CPATH" operation\="remove"/>\n<variable name\="CPLUS_INCLUDE_PATH" operation\="remove"/>\n</environment>\n
+environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.debug.180210457=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="LIBRARY_PATH" operation\="remove"/>\n</environment>\n
+environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.release.954607388=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="LIBRARY_PATH" operation\="remove"/>\n</environment>\n
+environment/project=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment/>\n
+environment/project/cdt.managedbuild.config.gnu.so.debug.180210457=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment/>\n
+environment/project/cdt.managedbuild.config.gnu.so.release.954607388=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment/>\n
diff --git a/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfo.h b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfo.h
new file mode 100644
index 0000000000..6372a5a45a
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfo.h
@@ -0,0 +1,30 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef CustomerInfo_h
+#define CustomerInfo_h
+
+class CustomerInfo
+{
+public:
+ virtual const char* getCustomerInformation(const char* customerID) = 0;
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl.cpp b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl.cpp
new file mode 100644
index 0000000000..371ab74f14
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl.cpp
@@ -0,0 +1,80 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "CustomerInfoImpl.h"
+#include <ostream>
+#include <string.h>
+#include "osoa/sca/sca.h"
+#include "commonj/sdo/DataObjectInstance.h"
+using namespace osoa::sca;
+using namespace commonj::sdo;
+using namespace std;
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CustomerInfoImpl::CustomerInfoImpl()
+{
+ cout << "Construct CustomerInfoImpl" << endl;
+
+}
+
+CustomerInfoImpl::~CustomerInfoImpl()
+{
+ cout << "Destroy CustomerInfoImpl" << endl;
+}
+
+//////////////////////////////////////////////////////////////////////
+// Other methods
+//////////////////////////////////////////////////////////////////////
+const char* CustomerInfoImpl::getCustomerInformation(const char* customerID)
+{
+ cout << "In getCustomerInformation with customerid: " << customerID << endl;
+
+
+
+ ComponentContext myContext = ComponentContext::getCurrent();
+
+ DataObjectInstance properties = myContext.getProperties();
+ DataObjectInstance props2 = properties;
+ if (properties)
+ {
+ const char* fredVal = properties->getCString("Fred");
+ cout << "Property Fred value: " << fredVal <<endl;
+
+
+ DataObjectList& joeList = properties->getList("Joe");
+ for (int i=0; i<joeList.size();i++)
+ {
+ cout << "Property Joe value " << i << ": " << joeList.getInteger(i) <<endl;
+ }
+ }
+
+ if (!strcmp("12345", customerID))
+ {
+ return "xzderg";
+ }
+ else
+ {
+ throw "Wobbler";
+ }
+
+
+}
diff --git a/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl.h b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl.h
new file mode 100644
index 0000000000..7f70664f68
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl.h
@@ -0,0 +1,36 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef CustomerInfoImpl_h
+#define CustomerInfoImpl_h
+
+#include "CustomerInfo.h"
+
+
+
+class CustomerInfoImpl : public CustomerInfo
+{
+public:
+ CustomerInfoImpl();
+ virtual ~CustomerInfoImpl();
+ virtual const char* getCustomerInformation(const char* customerID);
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.cpp b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.cpp
new file mode 100644
index 0000000000..e6cb3b3426
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.cpp
@@ -0,0 +1,63 @@
+/*
+ * 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 "CustomerInfoImpl_CustomerInfoService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CustomerInfoImpl_CustomerInfoService_Proxy* CustomerInfoImpl_CustomerInfoService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new CustomerInfoImpl_CustomerInfoService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void CustomerInfoImpl_CustomerInfoService_Proxy_Destructor(void* proxy)
+ {
+ delete (CustomerInfoImpl_CustomerInfoService_Proxy*)proxy;
+ }
+}
+
+CustomerInfoImpl_CustomerInfoService_Proxy::CustomerInfoImpl_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+CustomerInfoImpl_CustomerInfoService_Proxy::~CustomerInfoImpl_CustomerInfoService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformation(const char* arg0)
+{
+ Operation operation("getCustomerInformation");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.h b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.h
new file mode 100644
index 0000000000..7173dacd34
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Proxy.h
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef CustomerInfoImpl_CustomerInfoService_Proxy_h
+#define CustomerInfoImpl_CustomerInfoService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "CustomerInfo.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class CustomerInfoImpl_CustomerInfoService_Proxy : public CustomerInfo
+{
+public:
+ CustomerInfoImpl_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~CustomerInfoImpl_CustomerInfoService_Proxy();
+ virtual const char* getCustomerInformation(const char* customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // CustomerInfoImpl_CustomerInfoService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp
new file mode 100644
index 0000000000..1f28bf5715
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp
@@ -0,0 +1,72 @@
+/*
+ * 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 "CustomerInfoImpl_CustomerInfoService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CustomerInfoImpl_CustomerInfoService_Wrapper* CustomerInfoImpl_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new CustomerInfoImpl_CustomerInfoService_Wrapper(target);
+ }
+}
+
+CustomerInfoImpl_CustomerInfoService_Wrapper::CustomerInfoImpl_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (CustomerInfoImpl*)getImplementation();
+}
+
+CustomerInfoImpl_CustomerInfoService_Wrapper::~CustomerInfoImpl_CustomerInfoService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* CustomerInfoImpl_CustomerInfoService_Wrapper::newImplementation()
+{
+ return new CustomerInfoImpl;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getCustomerInformation")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInformation(p0);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.h
new file mode 100644
index 0000000000..5fb82c4295
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/CustomerInfoImpl_CustomerInfoService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef CustomerInfoImpl_CustomerInfoService_Wrapper_h
+#define CustomerInfoImpl_CustomerInfoService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "CustomerInfoImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ CustomerInfoImpl_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~CustomerInfoImpl_CustomerInfoService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ CustomerInfoImpl* impl;
+};
+
+#endif // CustomerInfoImpl_CustomerInfoService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/Makefile.am b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/Makefile.am
new file mode 100644
index 0000000000..baf839d51a
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/CustomerInfo/Makefile.am
@@ -0,0 +1,15 @@
+lib_LTLIBRARIES = libCustomerInfo.la
+
+libCustomerInfo_la_SOURCES = \
+CustomerInfoImpl.cpp \
+CustomerInfoImpl_CustomerInfoService_Proxy.cpp \
+CustomerInfoImpl_CustomerInfoService_Wrapper.cpp
+
+noinst_HEADERS = *.h
+
+libCustomerInfo_la_LIBADD =
+
+INCLUDES = -I$(top_builddir)/runtime/core/src \
+ -I${TUSCANY_SDOCPP}/include
+
+install: \ No newline at end of file
diff --git a/branches/cpp-M1/sca/runtime/core/test/Makefile.am b/branches/cpp-M1/sca/runtime/core/test/Makefile.am
new file mode 100644
index 0000000000..52ea80e3fb
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/Makefile.am
@@ -0,0 +1,28 @@
+SUBDIRS = CustomerInfo MyValue src
+
+EXTRA_DIST = testSCASystem/subsystems \
+testSCASystem/modules/MyValueServiceModule/sca.module \
+testSCASystem/modules/MyValueServiceModule/*.fragment \
+testSCASystem/modules/MyValueServiceModule/*.componentType \
+testSCASystem/modules/MyValueServiceModule/*.wsdl \
+testSCASystem/modules/MyValueServiceModule/*.xsd \
+testSCASystem/modules/MyValueServiceModule/*.config
+
+
+BUILT_SOURCES = scagen
+
+scagen:
+ cp ./MyValue/MyValue.h ./testSCASystem/modules/MyValueServiceModule
+ cp ./MyValue/MyValueImpl.h ./testSCASystem/modules/MyValueServiceModule
+ cp ./MyValue/StockQuoteService.h ./testSCASystem/modules/MyValueServiceModule
+ cp ./CustomerInfo/CustomerInfo.h ./testSCASystem/modules/MyValueServiceModule
+ cp ./CustomerInfo/CustomerInfoImpl.h ./testSCASystem/modules/MyValueServiceModule
+ java -jar $(top_builddir)/tools/scagen/bld/scagen.jar -dir testSCASystem/modules/MyValueServiceModule -output tmp
+ cp tmp/CustomerInfoImpl*.* CustomerInfo
+ cp tmp/MyValueImpl*.* MyValue
+
+
+install-exec-local:
+ cp CustomerInfo/.libs/libCustomerInfo.so testSCASystem/modules/MyValueServiceModule
+ cp MyValue/.libs/libMyValue.so testSCASystem/modules/MyValueServiceModule
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/runtime/core/test/MyValue/.cdtbuild b/branches/cpp-M1/sca/runtime/core/test/MyValue/.cdtbuild
new file mode 100644
index 0000000000..acc65c20f2
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/MyValue/.cdtbuild
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?fileVersion 3.0.0?>
+
+<ManagedProjectBuildInfo>
+<project id="tuscany_sca_test_MyValue.cdt.managedbuild.target.gnu.so.757075771" name="Shared Library (Gnu)" projectType="cdt.managedbuild.target.gnu.so">
+<configuration artifactExtension="so" artifactName="MyValue" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.config.gnu.so.debug.903609302" name="Debug" parent="cdt.managedbuild.config.gnu.so.debug">
+<toolChain id="cdt.managedbuild.toolchain.gnu.so.debug.255326897" name="GCC Tool Chain" superClass="cdt.managedbuild.toolchain.gnu.so.debug">
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.compiler.so.debug.1055337069" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.so.debug"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.compiler.so.debug.1856329612" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.so.debug">
+<option id="gnu.cpp.compiler.option.preprocessor.def.1031467482" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
+<listOptionValue builtIn="false" value="_DEBUG"/>
+</option>
+<option id="gnu.cpp.compiler.option.include.paths.571240659" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+<listOptionValue builtIn="false" value="${SCA4CPP_HOME}/runtime/core/src"/>
+<listOptionValue builtIn="false" value="${SCA4CPP_HOME}/runtime/core/test/CustomerInfo"/>
+<listOptionValue builtIn="false" value="${SDO4CPP}/include"/>
+</option>
+</tool>
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.linker.so.debug.1169623816" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.so.debug"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.linker.so.debug.578216644" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.so.debug"/>
+<tool command="as" id="cdt.managedbuild.tool.gnu.assembler.so.debug.1431997590" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.so.debug"/>
+<macros/>
+</toolChain>
+</configuration>
+<configuration artifactExtension="so" artifactName="MyValue" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.config.gnu.so.release.1558347965" name="Release" parent="cdt.managedbuild.config.gnu.so.release">
+<toolChain id="cdt.managedbuild.toolchain.gnu.so.release.957726846" name="GCC Tool Chain" superClass="cdt.managedbuild.toolchain.gnu.so.release">
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.compiler.so.release.625045304" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.so.release"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.compiler.so.release.1998422811" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.so.release">
+<option id="gnu.cpp.compiler.option.include.paths.687314264" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+<listOptionValue builtIn="false" value="${SCA4CPP_HOME}/runtime/core/src"/>
+<listOptionValue builtIn="false" value="${SCA4CPP_HOME}/runtime/core/test/CustomerInfo"/>
+<listOptionValue builtIn="false" value="${SDO4CPP}/include"/>
+</option>
+</tool>
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.linker.so.release.1598091246" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.so.release"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.linker.so.release.1373242294" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.so.release"/>
+<tool command="as" id="cdt.managedbuild.tool.gnu.assembler.so.release.1820024298" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.so.release"/>
+<macros/>
+</toolChain>
+</configuration>
+<macros/>
+</project>
+</ManagedProjectBuildInfo>
diff --git a/branches/cpp-M1/sca/runtime/core/test/MyValue/.cdtproject b/branches/cpp-M1/sca/runtime/core/test/MyValue/.cdtproject
new file mode 100644
index 0000000000..48a12e6664
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/MyValue/.cdtproject
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse-cdt version="2.0"?>
+
+<cdtproject id="org.eclipse.cdt.managedbuilder.core.managedMake">
+<extension id="org.eclipse.cdt.managedbuilder.core.ManagedBuildManager" point="org.eclipse.cdt.core.ScannerInfoProvider"/>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.domsourceindexer" point="org.eclipse.cdt.core.CIndexer"/>
+<data>
+<item id="org.eclipse.cdt.core.pathentry">
+<pathentry kind="src" path=""/>
+<pathentry kind="out" path=""/>
+<pathentry kind="con" path="org.eclipse.cdt.managedbuilder.MANAGED_CONTAINER"/>
+</item>
+</data>
+</cdtproject>
diff --git a/branches/cpp-M1/sca/runtime/core/test/MyValue/.project b/branches/cpp-M1/sca/runtime/core/test/MyValue/.project
new file mode 100644
index 0000000000..113442bfd8
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/MyValue/.project
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>tuscany_sca_test_MyValue</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ </natures>
+</projectDescription>
diff --git a/branches/cpp-M1/sca/runtime/core/test/MyValue/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/branches/cpp-M1/sca/runtime/core/test/MyValue/.settings/org.eclipse.cdt.managedbuilder.core.prefs
new file mode 100644
index 0000000000..4c585d5bb1
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/MyValue/.settings/org.eclipse.cdt.managedbuilder.core.prefs
@@ -0,0 +1,9 @@
+#Tue Nov 29 15:11:39 GMT 2005
+eclipse.preferences.version=1
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.debug.903609302=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="CPATH" operation\="remove"/>\n<variable name\="CPLUS_INCLUDE_PATH" operation\="remove"/>\n</environment>\n
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.so.release.1558347965=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="CPATH" operation\="remove"/>\n<variable name\="CPLUS_INCLUDE_PATH" operation\="remove"/>\n</environment>\n
+environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.debug.903609302=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="LIBRARY_PATH" operation\="remove"/>\n</environment>\n
+environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.so.release.1558347965=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="LIBRARY_PATH" operation\="remove"/>\n</environment>\n
+environment/project=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment/>\n
+environment/project/cdt.managedbuild.config.gnu.so.debug.903609302=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment/>\n
+environment/project/cdt.managedbuild.config.gnu.so.release.1558347965=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment/>\n
diff --git a/branches/cpp-M1/sca/runtime/core/test/MyValue/Makefile.am b/branches/cpp-M1/sca/runtime/core/test/MyValue/Makefile.am
new file mode 100644
index 0000000000..0eb5f89ad3
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/MyValue/Makefile.am
@@ -0,0 +1,18 @@
+lib_LTLIBRARIES = libMyValue.la
+
+noinst_HEADERS = *.h
+
+libMyValue_la_SOURCES = \
+MyValueImpl.cpp \
+MyValueImpl_customerInfo_Proxy.cpp \
+MyValueImpl_MyValueService_Proxy.cpp \
+MyValueImpl_MyValueService_Wrapper.cpp \
+MyValueImpl_stockQuote_Proxy.cpp
+
+libMyValue_la_LIBADD =
+
+INCLUDES = -I$(top_builddir)/runtime/core/src \
+ -I${TUSCANY_SDOCPP}/include \
+ -I../CustomerInfo
+
+install: \ No newline at end of file
diff --git a/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValue.h b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValue.h
new file mode 100644
index 0000000000..710910f08c
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValue.h
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef MyValue_h
+#define MyValue_h
+#include <string>
+using std::string;
+class MyValue
+{
+public:
+ virtual float getMyValue(const char* customerID) = 0;
+ virtual float getMyValueS(const string& customerID) = 0;
+ virtual string getCustname(string& customerID) = 0;
+ virtual const string& getCustnamecs(string customerID) = 0;
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl.cpp b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl.cpp
new file mode 100644
index 0000000000..a6e10384e4
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl.cpp
@@ -0,0 +1,150 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "MyValueImpl.h"
+#include "CustomerInfo.h"
+#include "StockQuoteService.h"
+#include <iostream>
+using namespace std;
+
+#include "osoa/sca/sca.h"
+#include "commonj/sdo/SDO.h"
+
+using namespace osoa::sca;
+using namespace commonj::sdo;
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+MyValueImpl::MyValueImpl()
+{
+ cout << "Construct MyValueImpl" << endl;
+
+}
+
+MyValueImpl::~MyValueImpl()
+{
+ cout << "Destroy MyValueImpl" << endl;
+}
+
+//////////////////////////////////////////////////////////////////////
+// Other methods
+//////////////////////////////////////////////////////////////////////
+float MyValueImpl::getMyValue(const char *customerID)
+{
+ cout << "In getMyValue with customerid: " << customerID << endl;
+
+
+ ComponentContext myContext = ComponentContext::getCurrent();
+ CustomerInfo* customerInfoService = (CustomerInfo*)myContext.getService("customerInfo");
+
+ if (customerInfoService == 0)
+ {
+ cout << "unable to find customer info service" << endl;
+
+ return 0.0f;
+ }
+
+ const char * stock;
+ try
+ {
+ stock = customerInfoService->getCustomerInformation(customerID);
+ }
+ catch(const char* x)
+ {
+ cout << "Exception caught: " << x <<endl;
+ throw;
+ }
+
+ ServiceList serviceList = myContext.getServices("customerInfo");
+
+ for (unsigned int i=0; i<serviceList.size();i++)
+ {
+ CustomerInfo* service = (CustomerInfo*)(serviceList[i]);
+ stock = service->getCustomerInformation(customerID);
+ cout << "Stock from getServices " << i << " : " << stock <<endl;
+
+ }
+
+ // Use a second SCA reference to get the stock price
+ StockQuoteService* stockQuoteService = (StockQuoteService*)myContext.getService("stockQuote");
+
+ if (stockQuoteService == 0)
+ {
+ cout << "unable to find stock quote service" << endl;
+
+ return 0.1f;
+ }
+
+ // Create a data object representing the requests (use dynamic API until static is available)
+ DataObjectPtr requestDO;
+
+
+ // Invoke the service
+ string result = stockQuoteService->GetQuote("IBM");
+
+ cout << result<<endl;
+ float stockPrice = 0.0f;
+
+ try
+ {
+ XMLHelperPtr xmlHelper = HelperProvider::getXMLHelper(myContext.getDataFactory());
+ XMLDocumentPtr stockDoc = xmlHelper->load(result.c_str());
+ if (stockDoc->getRootDataObject())
+ {
+ stockPrice=stockDoc->getRootDataObject()->getFloat("Stock.0/Last");
+ }
+
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << e;
+ throw;
+ }
+
+ return stockPrice;
+}
+
+float MyValueImpl::getMyValueS(const string& customerID)
+{
+ cout << "In getMyValueS with customerid: " << customerID.c_str() << endl;
+ return 87.35f;
+}
+
+string MyValueImpl::getCustname(string& customerID)
+{
+ cout << "In getCustname with customerid: " << customerID.c_str() << endl;
+ customerID = "FRED";
+ cout << "setting customer name to " << customerID.c_str() <<endl;
+ return "done";
+}
+
+static string fred("FEREDDEYY");
+const string& MyValueImpl::getCustnamecs(string customerID)
+{
+ cout << "In getCustname with customerid: " << customerID.c_str() << endl;
+ customerID = "FRED";
+ cout << "setting customer name to " << customerID.c_str() <<endl;
+ return fred;
+}
diff --git a/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl.h b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl.h
new file mode 100644
index 0000000000..fa4053692e
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl.h
@@ -0,0 +1,39 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef MyValueImpl_h
+#define MyValueImpl_h
+
+#include "MyValue.h"
+
+
+
+class MyValueImpl : public MyValue
+{
+public:
+ MyValueImpl();
+ virtual ~MyValueImpl();
+ virtual float getMyValue(const char* customerID);
+ virtual float getMyValueS(const string& customerID);
+ virtual string getCustname(string& customerID);
+ virtual const string& getCustnamecs(string customerID);
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.cpp b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.cpp
new file mode 100644
index 0000000000..d34b63ea14
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.cpp
@@ -0,0 +1,91 @@
+/*
+ * 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 "MyValueImpl_MyValueService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_MyValueService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_MyValueService_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValue(const char* arg0)
+{
+ Operation operation("getMyValue");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValueS(const string& arg0)
+{
+ Operation operation("getMyValueS");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+string MyValueImpl_MyValueService_Proxy::getCustname( string& arg0)
+{
+ Operation operation("getCustname");
+ operation.addParameter(&arg0);
+ string ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const string& MyValueImpl_MyValueService_Proxy::getCustnamecs( string arg0)
+{
+ Operation operation("getCustnamecs");
+ operation.addParameter(&arg0);
+ target->invoke(operation);
+ return *(const string*)operation.getReturnValue();
+}
+
+
diff --git a/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.h b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.h
new file mode 100644
index 0000000000..742947ca69
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_MyValueService_Proxy.h
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Proxy_h
+#define MyValueImpl_MyValueService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "MyValue.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Proxy : public MyValue
+{
+public:
+ MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_MyValueService_Proxy();
+ virtual float getMyValue(const char* customerID);
+ virtual float getMyValueS(const string& customerID);
+ virtual string getCustname( string& customerID);
+ virtual const string& getCustnamecs( string customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_MyValueService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.cpp b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.cpp
new file mode 100644
index 0000000000..da60e4c1e3
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.cpp
@@ -0,0 +1,91 @@
+/*
+ * 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 "MyValueImpl_MyValueService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new MyValueImpl_MyValueService_Wrapper(target);
+ }
+}
+
+MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (MyValueImpl*)getImplementation();
+}
+
+MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* MyValueImpl_MyValueService_Wrapper::newImplementation()
+{
+ return new MyValueImpl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getMyValue")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->getMyValue(p0);
+ return;
+ }
+ if (operationName == "getMyValueS")
+ {
+ string& p0 = *(string*)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->getMyValueS(p0);
+ return;
+ }
+ if (operationName == "getCustname")
+ {
+ string& p0 = *(string*)operation.getParameterValue(0);
+ *(string*)operation.getReturnValue() = impl->getCustname(p0);
+ return;
+ }
+ if (operationName == "getCustnamecs")
+ {
+ string& p0 = *( string*)operation.getParameterValue(0);
+ const string& ret = impl->getCustnamecs(p0);
+ operation.setReturnValue(&ret);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.h b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.h
new file mode 100644
index 0000000000..82fbcf76cc
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_MyValueService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Wrapper_h
+#define MyValueImpl_MyValueService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "MyValueImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~MyValueImpl_MyValueService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ MyValueImpl* impl;
+};
+
+#endif // MyValueImpl_MyValueService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.cpp b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.cpp
new file mode 100644
index 0000000000..cda55a99c8
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.cpp
@@ -0,0 +1,63 @@
+/*
+ * 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 "MyValueImpl_customerInfo_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_customerInfo_Proxy* MyValueImpl_customerInfo_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_customerInfo_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_customerInfo_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_customerInfo_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_customerInfo_Proxy::MyValueImpl_customerInfo_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_customerInfo_Proxy::~MyValueImpl_customerInfo_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+const char* MyValueImpl_customerInfo_Proxy::getCustomerInformation(const char* arg0)
+{
+ Operation operation("getCustomerInformation");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.h b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.h
new file mode 100644
index 0000000000..6ac33b4ef6
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_customerInfo_Proxy.h
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_customerInfo_Proxy_h
+#define MyValueImpl_customerInfo_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "CustomerInfo.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_customerInfo_Proxy : public CustomerInfo
+{
+public:
+ MyValueImpl_customerInfo_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_customerInfo_Proxy();
+ virtual const char* getCustomerInformation(const char* customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_customerInfo_Proxy_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.cpp b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.cpp
new file mode 100644
index 0000000000..6b0e4df2d5
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.cpp
@@ -0,0 +1,63 @@
+/*
+ * 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 "MyValueImpl_stockQuote_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_stockQuote_Proxy* MyValueImpl_stockQuote_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_stockQuote_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_stockQuote_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_stockQuote_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_stockQuote_Proxy::MyValueImpl_stockQuote_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_stockQuote_Proxy::~MyValueImpl_stockQuote_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+string MyValueImpl_stockQuote_Proxy::GetQuote(const char* arg0)
+{
+ Operation operation("GetQuote");
+ operation.addParameter(&arg0);
+ string ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.h b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.h
new file mode 100644
index 0000000000..54b70fd684
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/MyValue/MyValueImpl_stockQuote_Proxy.h
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_stockQuote_Proxy_h
+#define MyValueImpl_stockQuote_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "StockQuoteService.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_stockQuote_Proxy : public StockQuoteService
+{
+public:
+ MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_stockQuote_Proxy();
+ virtual string GetQuote(const char* request);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_stockQuote_Proxy_h
+
diff --git a/branches/cpp-M1/sca/runtime/core/test/MyValue/StockQuoteService.h b/branches/cpp-M1/sca/runtime/core/test/MyValue/StockQuoteService.h
new file mode 100644
index 0000000000..e53f41c736
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/MyValue/StockQuoteService.h
@@ -0,0 +1,32 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#ifndef StockQuoteService_h
+#define StockQuoteService_h
+#include <string>
+#include "commonj/sdo/SDO.h"
+using std::string;
+class StockQuoteService
+{
+public:
+ virtual string GetQuote(const char* request) = 0;
+
+};
+
+#endif // StockQuoteService_h
diff --git a/branches/cpp-M1/sca/runtime/core/test/src/.cdtbuild b/branches/cpp-M1/sca/runtime/core/test/src/.cdtbuild
new file mode 100644
index 0000000000..73f28e14fd
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/src/.cdtbuild
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?fileVersion 3.0.0?>
+
+<ManagedProjectBuildInfo>
+<project id="tuscany_sca_test.cdt.managedbuild.target.gnu.exe.2075572137" name="Executable (Gnu)" projectType="cdt.managedbuild.target.gnu.exe">
+<configuration artifactName="tuscany_sca_test" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.config.gnu.exe.debug.961609061" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
+<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1940833295" name="GCC Tool Chain" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1305113089" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.526049094" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
+<option id="gnu.cpp.compiler.option.preprocessor.def.257257608" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
+<listOptionValue builtIn="false" value="_DEBUG"/>
+</option>
+<option id="gnu.cpp.compiler.option.include.paths.2142231807" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+<listOptionValue builtIn="false" value="${SCA4CPP_HOME}/runtime/core/src"/>
+<listOptionValue builtIn="false" value="${SDO4CPP}/include"/>
+<listOptionValue builtIn="false" value="${SCA4CPP_HOME}/runtime/core/test/MyValue"/>
+</option>
+</tool>
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.966487740" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1717129068" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
+<option id="gnu.cpp.link.option.libs.111258106" superClass="gnu.cpp.link.option.libs" valueType="libs">
+<listOptionValue builtIn="false" value="tuscany_sca"/>
+<listOptionValue builtIn="false" value="axis_clientC"/>
+<listOptionValue builtIn="false" value="axis_client"/>
+<listOptionValue builtIn="false" value="tuscany_sdo"/>
+<listOptionValue builtIn="false" value="xml2"/>
+</option>
+<option id="gnu.cpp.link.option.paths.746681481" superClass="gnu.cpp.link.option.paths" valueType="stringList">
+<listOptionValue builtIn="false" value="${SCA4CPP_HOME}/runtime/core/src/Debug"/>
+<listOptionValue builtIn="false" value="${AXISCPP_DEPLOY}/lib"/>
+<listOptionValue builtIn="false" value="${SDO4CPP}/lib"/>
+</option>
+</tool>
+<tool command="as" id="cdt.managedbuild.tool.gnu.assembler.exe.debug.888159856" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug"/>
+<macros/>
+</toolChain>
+</configuration>
+<configuration artifactName="tuscany_sca_test" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.config.gnu.exe.release.278641057" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
+<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.204044209" name="GCC Tool Chain" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.822246239" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1002800488" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
+<option id="gnu.cpp.compiler.option.include.paths.454857737" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+<listOptionValue builtIn="false" value="${SCA4CPP_HOME}/runtime/core/src"/>
+<listOptionValue builtIn="false" value="${SDO4CPP}/include"/>
+<listOptionValue builtIn="false" value="${SCA4CPP_HOME}/runtime/core/test/MyValue"/>
+</option>
+</tool>
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.linker.exe.release.1733957415" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.1578655729" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release">
+<option id="gnu.cpp.link.option.libs.18758324" superClass="gnu.cpp.link.option.libs" valueType="libs">
+<listOptionValue builtIn="false" value="xml2"/>
+<listOptionValue builtIn="false" value="tuscany_sca"/>
+<listOptionValue builtIn="false" value="tuscany_sdo"/>
+<listOptionValue builtIn="false" value="axis_clientC"/>
+<listOptionValue builtIn="false" value="axis_client"/>
+</option>
+<option id="gnu.cpp.link.option.paths.1663707007" superClass="gnu.cpp.link.option.paths" valueType="stringList">
+<listOptionValue builtIn="false" value="${SCA4CPP_HOME}/runtime/core/src/Release"/>
+<listOptionValue builtIn="false" value="${SDO4CPP}/lib"/>
+<listOptionValue builtIn="false" value="${AXISCPP_DEPLOY}/lib"/>
+</option>
+</tool>
+<tool command="as" id="cdt.managedbuild.tool.gnu.assembler.exe.release.464104013" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release"/>
+<macros/>
+</toolChain>
+</configuration>
+<macros/>
+</project>
+</ManagedProjectBuildInfo>
diff --git a/branches/cpp-M1/sca/runtime/core/test/src/.cdtproject b/branches/cpp-M1/sca/runtime/core/test/src/.cdtproject
new file mode 100644
index 0000000000..48a12e6664
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/src/.cdtproject
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse-cdt version="2.0"?>
+
+<cdtproject id="org.eclipse.cdt.managedbuilder.core.managedMake">
+<extension id="org.eclipse.cdt.managedbuilder.core.ManagedBuildManager" point="org.eclipse.cdt.core.ScannerInfoProvider"/>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.domsourceindexer" point="org.eclipse.cdt.core.CIndexer"/>
+<data>
+<item id="org.eclipse.cdt.core.pathentry">
+<pathentry kind="src" path=""/>
+<pathentry kind="out" path=""/>
+<pathentry kind="con" path="org.eclipse.cdt.managedbuilder.MANAGED_CONTAINER"/>
+</item>
+</data>
+</cdtproject>
diff --git a/branches/cpp-M1/sca/runtime/core/test/src/.project b/branches/cpp-M1/sca/runtime/core/test/src/.project
new file mode 100644
index 0000000000..5e5b12e9d8
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/src/.project
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>tuscany_sca_test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ </natures>
+</projectDescription>
diff --git a/branches/cpp-M1/sca/runtime/core/test/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/branches/cpp-M1/sca/runtime/core/test/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs
new file mode 100644
index 0000000000..fe629d7d5b
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/src/.settings/org.eclipse.cdt.managedbuilder.core.prefs
@@ -0,0 +1,9 @@
+#Tue Nov 29 17:30:33 GMT 2005
+eclipse.preferences.version=1
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.961609061=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="CPATH" operation\="remove"/>\n<variable name\="CPLUS_INCLUDE_PATH" operation\="remove"/>\n</environment>\n
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.release.278641057=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="CPATH" operation\="remove"/>\n<variable name\="CPLUS_INCLUDE_PATH" operation\="remove"/>\n</environment>\n
+environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.debug.961609061=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="LIBRARY_PATH" operation\="remove"/>\n</environment>\n
+environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.release.278641057=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="LIBRARY_PATH" operation\="remove"/>\n</environment>\n
+environment/project=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment/>\n
+environment/project/cdt.managedbuild.config.gnu.exe.debug.961609061=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment/>\n
+environment/project/cdt.managedbuild.config.gnu.exe.release.278641057=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment/>\n
diff --git a/branches/cpp-M1/sca/runtime/core/test/src/Makefile.am b/branches/cpp-M1/sca/runtime/core/test/src/Makefile.am
new file mode 100644
index 0000000000..e9a449aaf0
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/src/Makefile.am
@@ -0,0 +1,12 @@
+prgbindir=$(prefix)/bin/test
+prgbin_PROGRAMS = tuscany_sca_test
+SUBDIRS =
+AM_CPPFLAGS = $(CPPFLAGS)
+tuscany_sca_test_SOURCES = TestSCA.cpp
+
+tuscany_sca_test_LDADD = -L$(top_builddir)/runtime/core/src -ltuscany_sca \
+ -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo
+
+INCLUDES = -I$(top_builddir)/runtime/core/test/MyValue \
+ -I$(top_builddir)/runtime/core/src \
+ -I${TUSCANY_SDOCPP}/include
diff --git a/branches/cpp-M1/sca/runtime/core/test/src/TestSCA.cpp b/branches/cpp-M1/sca/runtime/core/test/src/TestSCA.cpp
new file mode 100644
index 0000000000..489fdab622
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/src/TestSCA.cpp
@@ -0,0 +1,86 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date: 2005/12/22 11:33:21 $ */
+
+#include "tuscany/sca/util/Logger.h"
+#include "commonj/sdo/Logger.h"
+#include "osoa/sca/sca.h"
+#include <iostream>
+using namespace std;
+
+using namespace osoa::sca;
+#include "tuscany/sca/core/TuscanyRuntime.h"
+using namespace tuscany::sca;
+#include "MyValue.h"
+
+int main(int argc, char* argv[])
+{
+ tuscany::sca::Logger::setLogging(4);
+ commonj::sdo::Logger::setLogging(20);
+ cout << "Start of SCA test" << endl;
+
+ // Set default module
+ TuscanyRuntime runtime("SubSystem1");
+
+ try
+ {
+ runtime.start();
+
+ // Locate a service
+ ModuleContext myContext = ModuleContext::getCurrent();
+ ModuleContext myContext2 = myContext;
+
+ MyValue* myService = (MyValue*) myContext.locateService("MyValueServiceComponent");
+ if (myService == 0)
+ {
+ cout << "Unable to find service" << endl;
+ }
+ else
+ {
+
+ try
+ {
+ float value = myService->getMyValue("12345");
+ cout << "My value is: " << value << endl;
+ value = myService->getMyValueS("12345");
+ cout << "My valueSS is: " << value << endl;
+ string custid = "fred";
+ string name = myService->getCustname(custid);
+ cout << "Returned string: " << name.c_str() << " custid now: " << custid.c_str() <<endl;
+ custid = "fred";
+ const string& csname = myService->getCustnamecs(custid);
+ cout << "Returned string: " << csname.c_str() << " custid now: " << custid.c_str() <<endl;
+ //value = myService->getMyValue("999");
+ cout << "My value is: " << value << endl;
+ }
+ catch (char* x)
+ {
+ cout << "Exception caught: " << x << endl;
+ }
+ }
+ cout << "End of SCA test" << endl;
+
+ }
+ catch (ServiceRuntimeException& ex)
+ {
+ cout << ex << endl;
+ }
+
+ runtime.stop();
+ return 0;
+}
diff --git a/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment b/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment
new file mode 100644
index 0000000000..f473f59748
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfo.fragment
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<moduleFragment xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="CustomerInfoComponent">
+
+
+ <component name="CustomerInfoComponent">
+ <implementation.cpp dll="libCustomerInfo.so" header="CustomerInfoImpl.h"></implementation.cpp>
+ <properties>
+ <v:Fred>x</v:Fred>
+ <v:Joe>23</v:Joe>
+ <Joe>42</Joe>
+ </properties>
+ <references>
+ </references>
+ </component>
+
+</moduleFragment>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType b/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType
new file mode 100644
index 0000000000..48651b63fe
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/CustomerInfoImpl.componentType
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="CustomerInfoService">
+ <interface.cpp header="CustomerInfo.h">
+ </interface.cpp>
+ </service>
+
+ <property name="Fred" type="xs:string"/>
+ <property name="Joe" type="xs:integer" many="true"/>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType b/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType
new file mode 100644
index 0000000000..ace4154966
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/MyValueImpl.componentType
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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/0.9">
+
+ <service name="MyValueService">
+ <interface.cpp header="MyValue.h">
+ </interface.cpp>
+ </service>
+
+ <reference name="customerInfo">
+ <interface.cpp header="CustomerInfo.h">
+ </interface.cpp>
+ </reference>
+
+ <reference name="stockQuote">
+ <interface.cpp header="StockQuoteService.h">
+ </interface.cpp>
+ </reference>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl b/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl
new file mode 100644
index 0000000000..5bce10d2f9
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/StockQuoteService.wsdl
@@ -0,0 +1,135 @@
+<?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.
+ -->
+<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/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/StockQuoteTypes.xsd b/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/StockQuoteTypes.xsd
new file mode 100644
index 0000000000..5bce3a63dc
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/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/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config b/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config
new file mode 100644
index 0000000000..cba35b444b
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/Tuscany-model.config
@@ -0,0 +1,25 @@
+<?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.
+ -->
+
+<tuscany-model xmlns="http://org.apache.tuscany/xmlns/cpp/1.0">
+ <wsdl>
+ <file name="StockQuoteService.wsdl"/>
+ </wsdl>
+ <xsd>
+ <file name="StockQuoteTypes.xsd"/>
+ </xsd>
+</tuscany-model> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/sca.module b/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/sca.module
new file mode 100644
index 0000000000..b9b9b51036
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/testSCASystem/modules/MyValueServiceModule/sca.module
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="MyValueServiceModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="MyValueServiceExport" multiplicity="1..1">
+ <interface.wsdl interface="" callbackInterface=""></interface.wsdl>
+ <binding.ws port="mvs:MyValueServiceSOAP"></binding.ws>
+ <reference>MyValueServiceComponent</reference>
+ </entryPoint>
+
+ <component name="MyValueServiceComponent">
+ <implementation.cpp dll="libMyValue.so" header="MyValueImpl.h"></implementation.cpp>
+ <properties>
+ </properties>
+ <references>
+ <stockQuote>StockQuoteService</stockQuote>
+ </references>
+ </component>
+
+ <externalService name="StockQuoteService">
+ <interface.cpp header="StockQuoteService.h"/>
+ <binding.ws port="http://www.webserviceX.NET/#wsdl.endpoint(StockQuote/StockQuoteSoap)"/>
+ </externalService>
+
+ <wire>
+ <source.uri>MyValueServiceComponent/customerInfo</source.uri>
+ <target.uri>CustomerInfoComponent</target.uri>
+ </wire>
+
+</module>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/runtime/core/test/testSCASystem/subsystems/SubSystem1/sca.subsystem b/branches/cpp-M1/sca/runtime/core/test/testSCASystem/subsystems/SubSystem1/sca.subsystem
new file mode 100644
index 0000000000..1b32bf8a93
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/core/test/testSCASystem/subsystems/SubSystem1/sca.subsystem
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<subsystem xmlns="http://www.osoa.org/xmlns/sca/0.9"
+
+ name="SubSystem1">
+
+ <moduleComponent name="MyValue" module="MyValueServiceModule">
+
+ </moduleComponent>
+
+</subsystem>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/runtime/ws_reference/Makefile.am b/branches/cpp-M1/sca/runtime/ws_reference/Makefile.am
new file mode 100644
index 0000000000..f3ba006041
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/ws_reference/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = axis2c
diff --git a/branches/cpp-M1/sca/runtime/ws_reference/axis2c/Makefile.am b/branches/cpp-M1/sca/runtime/ws_reference/axis2c/Makefile.am
new file mode 100644
index 0000000000..af437a64d6
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/ws_reference/axis2c/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = src
diff --git a/branches/cpp-M1/sca/runtime/ws_reference/axis2c/src/Axis2Client.cpp b/branches/cpp-M1/sca/runtime/ws_reference/axis2c/src/Axis2Client.cpp
new file mode 100644
index 0000000000..4064235062
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/ws_reference/axis2c/src/Axis2Client.cpp
@@ -0,0 +1,362 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * 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 "osoa/sca/export.h"
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4091)
+#endif
+
+#include <axis2_client.h>
+
+#include <axis2_error_default.h>
+#include <axis2_log_default.h>
+#include <axis2_defines.h>
+#include <axiom_soap_const.h>
+#include <platforms/axis2_platform_auto_sense.h>
+
+#include <sdo_axiom.h>
+#include "Axis2Client.h"
+
+
+#include <osoa/sca/sca.h>
+using namespace osoa::sca;
+#include "tuscany/sca/core/SCARuntime.h"
+#include "tuscany/sca/util/Logging.h"
+#include "tuscany/sca/model/WSBinding.h"
+#include "tuscany/sca/util/Utils.h"
+#include "tuscany/sca/util/Exceptions.h"
+
+using namespace tuscany::sca::ws;
+
+
+using namespace commonj::sdo;
+using namespace commonj::sdo_axiom;
+
+Axis2Client::Axis2Client(ExternalService* extService)
+ : externalService(extService)
+{
+}
+
+Axis2Client::~Axis2Client()
+{
+}
+
+void Axis2Client::invoke(tuscany::sca::Operation& operation)
+{
+ LOGENTRY(1, "Axis2Client::invoke");
+
+ // From the external service ws-binding, get the namespace of the wsdl endpoint
+ WSBinding* binding = (WSBinding *)externalService->getBinding();
+ // TODO check 0 throw
+
+ string portNamespace = binding->getWSDLNamespaceURL();
+
+ // Lookup the wsdl model from the module, keyed on the namespace
+ // (the wsdl will have been loaded at startup, based on the information in the config file)
+ Wsdl* wsdlDefinition = externalService->getContainingModule()->findWsdl(portNamespace);
+ if (wsdlDefinition == 0)
+ {
+ string msg = "WSDL not found for " + portNamespace;
+ throw SystemConfigurationException(msg.c_str());
+ }
+
+ const string& operationName = operation.getName();
+
+ // Match the operation in Operation to the operation in the wsdl port type.
+ const WsdlOperation& wsdlOperation = wsdlDefinition->findOperation(
+ binding->getServiceName(),
+ binding->getPortName(),
+ operationName);
+
+ // Initialize Axis2 stuff
+ axis2_allocator_t *allocator = axis2_allocator_init (NULL);
+ axis2_log_t *log = axis2_log_create(allocator, NULL, "tuscany_client.log");
+ axis2_error_t *error = axis2_error_create(allocator);
+ axis2_env_t *env = axis2_env_create_with_error_log(allocator, error, log);
+ env->log->level = AXIS2_LOG_LEVEL_TRACE;
+ axis2_error_init();
+
+ axis2_char_t* address = (axis2_char_t*)wsdlOperation.getEndpoint().c_str();
+ axis2_char_t* opName = (axis2_char_t*)operationName.c_str();
+ axis2_char_t* soap_action = (axis2_char_t*)wsdlOperation.getSoapAction().c_str();
+ axis2_char_t* serviceName = (axis2_char_t*)binding->getServiceName().c_str();
+
+ // create OM from Operation and wsdlOperation
+ axiom_node_t* payload = createPayload(operation, wsdlOperation, env);
+
+ /* Create EPR with given address */
+ axis2_endpoint_ref_t* endpoint_ref = axis2_endpoint_ref_create(env, address);
+
+ /* Setup options */
+ axis2_options_t* options = axis2_options_create(env);
+ AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref);
+ int soap_version = AXIOM_SOAP11;
+ if (wsdlOperation.getSoapVersion() == WsdlOperation::SOAP12)
+ {
+ soap_version = AXIOM_SOAP12;
+ }
+
+ AXIS2_OPTIONS_SET_SOAP_VERSION(options, env, soap_version);
+ AXIS2_OPTIONS_SET_ACTION(options, env, soap_action);
+
+ /* Create service client */
+
+ axis2_char_t* client_home = AXIS2_GETENV("AXIS2C_HOME");
+ if (!client_home)
+ {
+ throw SystemConfigurationException("Environment error: AXIS2C_HOME not set");
+ }
+ axis2_svc_client_t* svc_client = axis2_svc_client_create(env, client_home);
+ if (!svc_client)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "invoke FAILED: Error code:"
+ " %d :: %s", env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
+
+ throw ServiceRuntimeException("Axis2Client: axis2_svc_client_create failed");
+ }
+
+ /* Set service client options */
+ AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, env, options);
+
+ /* Send request */
+ axiom_node_t* ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload);
+ if(ret_node)
+ {
+ setReturn(ret_node, operation, wsdlOperation, env);
+ }
+ else
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Invoke failed: Error code:"
+ " %d :: %s", env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
+ throw ServiceRuntimeException("Axis2Client: Invoke failed");
+ }
+
+ if (svc_client)
+ {
+ AXIS2_SVC_CLIENT_FREE(svc_client, env);
+ svc_client = NULL;
+ }
+
+ LOGEXIT(1, "Axis2Client::invoke");
+}
+
+axiom_node_t* Axis2Client::createPayload(Operation& operation,
+ const WsdlOperation& wsdlOp,
+ axis2_env_t* env)
+{
+ LOGENTRY(1, "Axis2Client::createPayload");
+ axiom_node_t* requestOM = NULL;
+
+ // map the operation request to the wsdl
+ if (wsdlOp.isDocumentStyle())
+ {
+ // Document style
+ // only support single part messages - WS-I compliant
+
+ // Build up the payload as an SDO
+
+ // Get the data factory for the module (it will already have the typecreates loaded for the xsds)
+ DataFactoryPtr dataFactory = externalService->getContainingModule()->getDataFactory();
+ DataObjectPtr requestDO = dataFactory->create(wsdlOp.getInputTypeUri().c_str(),
+ wsdlOp.getInputTypeName().c_str());
+
+ // Each parameter in the operation should be a property on the request dataobject
+ for (int i=0; i<operation.getNParms(); i++)
+ {
+ Operation::Parameter& parm = operation.getParameter(i);
+ switch(parm.getType())
+ {
+ case Operation::BOOL:
+ {
+ requestDO->setBoolean(i, *(bool*)parm.getValue());
+ break;
+ }
+ case Operation::SHORT:
+ {
+ requestDO->setShort(i, *(short*)parm.getValue());
+ break;
+ }
+ case Operation::LONG:
+ {
+ requestDO->setLong(i, *(long*)parm.getValue());
+ break;
+ }
+ case Operation::USHORT:
+ {
+ requestDO->setInteger(i, *(unsigned short*)parm.getValue());
+ break;
+ }
+ case Operation::ULONG:
+ {
+ requestDO->setInteger(i, *(unsigned long*)parm.getValue());
+ break;
+ }
+ case Operation::FLOAT:
+ {
+ requestDO->setFloat(i, *(float*)parm.getValue());
+ break;
+ }
+ case Operation::DOUBLE:
+ {
+ requestDO->setDouble(i, *(double*)parm.getValue());
+ break;
+ }
+ case Operation::LONGDOUBLE:
+ {
+ requestDO->setDouble(i, *(long double*)parm.getValue());
+ break;
+ }
+ case Operation::CHARS:
+ {
+ requestDO->setCString(i, *(char**)parm.getValue());
+ break;
+ }
+ case Operation::STRING:
+ {
+ requestDO->setCString(i, (*(string*)parm.getValue()).c_str());
+ break;
+ }
+ case Operation::DATAOBJECT:
+ {
+ requestDO->setDataObject(i, *(DataObjectPtr*)parm.getValue());
+ break;
+ }
+ default: throw "unsupported parameter type";
+ }
+ }
+
+ // Create the Axiom object from the request dataobject
+ AxiomHelper myHelper;
+ requestOM = myHelper.toAxiomNode(requestDO);
+ }
+ else
+ {
+ // RPC
+ }
+
+ // Logging start
+ axiom_xml_writer_t* xml_writer = axiom_xml_writer_create_for_memory(env, NULL, AXIS2_FALSE, AXIS2_FALSE, AXIS2_XML_PARSER_TYPE_BUFFER);
+ axiom_output_t* om_output = axiom_output_create( env, xml_writer);
+
+ AXIOM_NODE_SERIALIZE(requestOM, env, om_output);
+ axis2_char_t* buffer = (axis2_char_t*)AXIOM_XML_WRITER_GET_XML(xml_writer, env);
+ LOGINFO_1(3, "Sending this OM node in XML : %s \n", buffer);
+ AXIOM_OUTPUT_FREE(om_output, env);
+ AXIS2_FREE((env)->allocator, buffer);
+ // Logging end
+
+ return requestOM;
+
+ LOGEXIT(1, "Axis2Client::createPayload");
+}
+
+void Axis2Client::setReturn(axiom_node_t* ret_node,
+ Operation& operation,
+ const WsdlOperation& wsdlOp,
+ axis2_env_t* env)
+{
+ LOGENTRY(1, "Axis2Client::setReturn");
+ /* Get the response value from the SOAP message */
+
+ // logging start
+ axiom_xml_writer_t* writer = axiom_xml_writer_create_for_memory(env, NULL, AXIS2_TRUE, 0, AXIS2_XML_PARSER_TYPE_BUFFER);
+ axiom_output_t* om_output = axiom_output_create (env, writer);
+ AXIOM_NODE_SERIALIZE (ret_node, env, om_output);
+ axis2_char_t* buffer = (axis2_char_t*)AXIOM_XML_WRITER_GET_XML(writer, env);
+ LOGINFO_1(3,"Received OM node in XML : %s\n", buffer);
+ AXIOM_OUTPUT_FREE(om_output, env);
+ AXIS2_FREE((env)->allocator, buffer);
+ // Logging end
+
+
+ if (wsdlOp.isDocumentStyle())
+ {
+ // Document style
+
+ DataFactoryPtr dataFactory = externalService->getContainingModule()->getDataFactory();
+ AxiomHelper myHelper;
+ DataObjectPtr returnDO = myHelper.toSdo(ret_node, dataFactory);
+
+ unsigned int index = 0;
+ switch(operation.getReturnType())
+ {
+ case Operation::BOOL:
+ {
+ *(bool*)operation.getReturnValue() = returnDO->getBoolean(index);
+ break;
+ }
+ case Operation::SHORT:
+ {
+ *(short*)operation.getReturnValue() = returnDO->getShort(index);
+ break;
+ }
+ case Operation::LONG:
+ {
+ *(long*)operation.getReturnValue() = returnDO->getLong(index);
+ break;
+ }
+ case Operation::USHORT:
+ {
+ *(unsigned short*)operation.getReturnValue() = (unsigned short)returnDO->getInteger(index);
+ break;
+ }
+ case Operation::ULONG:
+ {
+ *(unsigned long*)operation.getReturnValue() = (unsigned long)returnDO->getInteger(index);
+ break;
+ }
+ case Operation::FLOAT:
+ {
+ *(float*)operation.getReturnValue() = returnDO->getFloat(index);
+ break;
+ }
+ case Operation::DOUBLE:
+ {
+ *(double*)operation.getReturnValue() = returnDO->getDouble(index);
+ break;
+ }
+ case Operation::LONGDOUBLE:
+ {
+ *(long double*)operation.getReturnValue() = returnDO->getDouble(index);
+ break;
+ }
+ case Operation::CHARS:
+ {
+ *(char**)operation.getReturnValue() = strdup(returnDO->getCString(index));
+ break;
+ }
+ case Operation::STRING:
+ {
+ *(string*)operation.getReturnValue() = returnDO->getCString(index);
+ break;
+ }
+ case Operation::DATAOBJECT:
+ {
+ *(DataObjectPtr*)operation.getReturnValue() = returnDO->getDataObject(index);
+ break;
+ }
+ default:;
+ }
+ }
+ else
+ {
+ // RPC
+ }
+ LOGEXIT(1, "Axis2Client::setReturn");
+}
+
diff --git a/branches/cpp-M1/sca/runtime/ws_reference/axis2c/src/Axis2Client.h b/branches/cpp-M1/sca/runtime/ws_reference/axis2c/src/Axis2Client.h
new file mode 100644
index 0000000000..c07e1fee4e
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/ws_reference/axis2c/src/Axis2Client.h
@@ -0,0 +1,68 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef tuscany_sca_ws_axis2client_h
+#define tuscany_sca_ws_axis2client_h
+
+#include "osoa/sca/export.h"
+
+#include <axiom.h>
+
+#include <osoa/sca/export.h>
+
+#include "tuscany/sca/core/ExternalServiceWrapper.h"
+#include "tuscany/sca/model/ExternalService.h"
+
+#include "tuscany/sca/model/Wsdl.h"
+#include "tuscany/sca/core/Operation.h"
+using namespace tuscany::sca;
+using namespace tuscany::sca::model;
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace ws
+ {
+
+ class SCA_API Axis2Client
+ {
+ public:
+ Axis2Client(tuscany::sca::model::ExternalService* externalService);
+ virtual ~Axis2Client();
+
+ virtual void invoke(tuscany::sca::Operation& operation);
+
+ private:
+ tuscany::sca::model::ExternalService* externalService;
+
+ axiom_node_t* createPayload(Operation& operation,
+ const WsdlOperation& wsdlOp,
+ axis2_env_t* env);
+
+ void setReturn(axiom_node_t* returnNode,
+ Operation& operation,
+ const WsdlOperation& wsdlOp,
+ axis2_env_t* env);
+
+ };
+ } // End namespace ws
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_ws_axis2client_h
diff --git a/branches/cpp-M1/sca/runtime/ws_reference/axis2c/src/Makefile.am b/branches/cpp-M1/sca/runtime/ws_reference/axis2c/src/Makefile.am
new file mode 100644
index 0000000000..60678dd31b
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/ws_reference/axis2c/src/Makefile.am
@@ -0,0 +1,26 @@
+lib_LTLIBRARIES = libtuscany_sca_ws_reference.la
+
+libtuscany_sca_ws_reference_la_SOURCES = WSServiceWrapper.cpp Axis2Client.cpp
+
+noinst_HEADERS = *.h
+
+AM_CPPFLAGS = $(CPPFLAGS) -D_DEBUG
+
+libtuscany_sca_ws_reference_la_LIBADD = \
+ -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo -ltuscany_sdo_axiom \
+ -L$(AXIS2C_HOME)/lib \
+ -laxis2_util \
+ -laxis2_axiom \
+ -laxis2_wsdl \
+ -laxis2_engine \
+ -laxis2_parser \
+ -laxis2_minizip \
+ -lpthread \
+ -laxis2_http_sender \
+ -laxis2_http_receiver
+
+
+INCLUDES = -I$(top_builddir)/runtime/core/src \
+ -I${TUSCANY_SDOCPP}/include \
+ -I${AXIS2C_HOME}/include
+
diff --git a/branches/cpp-M1/sca/runtime/ws_reference/axis2c/src/WSServiceWrapper.cpp b/branches/cpp-M1/sca/runtime/ws_reference/axis2c/src/WSServiceWrapper.cpp
new file mode 100644
index 0000000000..2a4d6a1d8d
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/ws_reference/axis2c/src/WSServiceWrapper.cpp
@@ -0,0 +1,71 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date$ */
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4091)
+#endif
+
+#include "tuscany/sca/ws/WSServiceWrapper.h"
+
+#include "Axis2Client.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+
+#include "tuscany/sca/util/Logging.h"
+using namespace tuscany::sca;
+using namespace tuscany::sca::ws;
+
+
+
+
+WSServiceWrapper::WSServiceWrapper(tuscany::sca::model::WireTarget* target) : ExternalServiceWrapper(target)
+{
+
+}
+
+WSServiceWrapper::~WSServiceWrapper()
+{
+
+}
+
+///
+/// This method will be called when a web service call needs to be made.
+///
+void WSServiceWrapper::invoke(Operation& operation)
+{
+ LOGENTRY(1, "WSServiceWrapper::invoke");
+
+ const string& operationName = operation.getName();
+
+ LOGINFO_2(2,"External service: %s, Operation: %s", getTarget()->getName().c_str() , operationName.c_str());
+
+ for (unsigned int i=0; i<operation.getNParms(); i++)
+ {
+ LOGINFO_2(2, "Parameter %p, Type %u", operation.getParameterValue(i),(int) operation.getParameterType(i));
+ }
+
+ // From the external service ws-binding, get the namespace of the wsdl endpoint
+ ExternalService* externalService = getExternalService();
+
+ Axis2Client client(externalService);
+ client.invoke(operation);
+
+ LOGEXIT(1, "WSServiceWrapper::invoke");
+}
+
diff --git a/branches/cpp-M1/sca/runtime/ws_service/Makefile.am b/branches/cpp-M1/sca/runtime/ws_service/Makefile.am
new file mode 100644
index 0000000000..f3ba006041
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/ws_service/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = axis2c
diff --git a/branches/cpp-M1/sca/runtime/ws_service/axis2c/Makefile.am b/branches/cpp-M1/sca/runtime/ws_service/axis2c/Makefile.am
new file mode 100644
index 0000000000..af437a64d6
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/ws_service/axis2c/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = src
diff --git a/branches/cpp-M1/sca/runtime/ws_service/axis2c/src/Axis2EntryPointService_skeleton.cpp b/branches/cpp-M1/sca/runtime/ws_service/axis2c/src/Axis2EntryPointService_skeleton.cpp
new file mode 100644
index 0000000000..c2a06e05c0
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/ws_service/axis2c/src/Axis2EntryPointService_skeleton.cpp
@@ -0,0 +1,253 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * 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)
+#pragma warning(disable: 4091)
+#endif
+
+#include <axis2_svc_skeleton.h>
+#include <axis2_array_list.h>
+#include <axis2_log_default.h>
+#include <axis2_error_default.h>
+#include <axiom.h>
+#include <stdio.h>
+
+#include <sdo_axiom.h>
+using namespace commonj::sdo;
+using namespace commonj::sdo_axiom;
+
+#include "tuscany/sca/util/Utils.h"
+using namespace tuscany::sca;
+
+#include "tuscany/sca/ws/EntryPointProxy.h"
+#include "Axis2Utils.h"
+using namespace tuscany::sca::ws;
+
+
+int AXIS2_CALL
+Axis2EntryPointService_free(axis2_svc_skeleton_t *svc_skeleton,
+ const axis2_env_t *env);
+
+/*
+ * This method invokes the right service method
+ */
+axiom_node_t* AXIS2_CALL
+Axis2EntryPointService_invoke(axis2_svc_skeleton_t *svc_skeleton,
+ const axis2_env_t *env,
+ axiom_node_t *node,
+ axis2_msg_ctx_t *msg_ctx);
+
+int AXIS2_CALL Axis2EntryPointService_init(axis2_svc_skeleton_t *svc_skeleton,
+ const axis2_env_t *env);
+
+EntryPointProxy* entryPointProxy = NULL;
+
+axis2_svc_skeleton_t *
+axis2_Axis2EntryPointService_create(axis2_env_t *env)
+{
+ axis2_svc_skeleton_t *svc_skeleton = NULL;
+ svc_skeleton = (axis2_svc_skeleton_t *) AXIS2_MALLOC((env)->allocator,
+ sizeof(axis2_svc_skeleton_t));
+
+
+ svc_skeleton->ops = (axis2_svc_skeleton_ops_t *) AXIS2_MALLOC(
+ (env)->allocator, sizeof(axis2_svc_skeleton_ops_t));
+
+ svc_skeleton->func_array = NULL;
+
+ svc_skeleton->ops->free = Axis2EntryPointService_free;
+ svc_skeleton->ops->init = Axis2EntryPointService_init;
+ svc_skeleton->ops->invoke = Axis2EntryPointService_invoke;
+ /*svc_skeleton->ops->on_fault = Axis2Service_on_fault;*/
+
+ if(entryPointProxy == NULL)
+ {
+ entryPointProxy = EntryPointProxy::getInstance();
+ }
+
+ return svc_skeleton;
+}
+
+int AXIS2_CALL
+Axis2EntryPointService_init(axis2_svc_skeleton_t *svc_skeleton,
+ const axis2_env_t *env)
+{
+ // This method never seems to be called - an old Axis2C artifact?
+
+ svc_skeleton->func_array = axis2_array_list_create(env, 0);
+ return AXIS2_SUCCESS;
+}
+
+int AXIS2_CALL
+Axis2EntryPointService_free(axis2_svc_skeleton_t *svc_skeleton,
+ const axis2_env_t *env)
+{
+ /*if(svc_skeleton->func_array)
+ {
+ AXIS2_ARRAY_LIST_FREE(svc_skeleton->func_array, env);
+ svc_skeleton->func_array = NULL;
+ }*/
+
+ if(svc_skeleton->ops)
+ {
+ AXIS2_FREE((env)->allocator, svc_skeleton->ops);
+ svc_skeleton->ops = NULL;
+ }
+
+ if(svc_skeleton)
+ {
+ AXIS2_FREE((env)->allocator, svc_skeleton);
+ svc_skeleton = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+/*
+ * This method invokes the right service method
+ */
+axiom_node_t* AXIS2_CALL
+Axis2EntryPointService_invoke(axis2_svc_skeleton_t *svc_skeleton,
+ const axis2_env_t *env,
+ axiom_node_t *node,
+ axis2_msg_ctx_t *msg_ctx)
+{
+ axiom_node_t *returnNode = node;
+
+ /* Depending on the function name invoke the
+ * corresponding Axis2Service method
+ */
+ if (node)
+ {
+ if (AXIOM_NODE_GET_NODE_TYPE(node, env) == AXIOM_ELEMENT)
+ {
+ axiom_element_t *element = NULL;
+ element = (axiom_element_t *)AXIOM_NODE_GET_DATA_ELEMENT(node, env);
+ if (element)
+ {
+ // This gets the operation name from the root element name - this is correct for DocLit Wrapped style
+ axis2_char_t *op_name = AXIOM_ELEMENT_GET_LOCALNAME(element, env);
+ if (op_name)
+ {
+ char* systemRoot = Axis2Utils::getAxisServiceParameterValue(env, msg_ctx, "TuscanySystemRoot");
+ char* fullEntryPointName = Axis2Utils::getAxisServiceParameterValue(env, msg_ctx, "TuscanyEntryPoint");
+
+ AXIS2_LOG_INFO((env)->log, "Axis2EntryPointService invoke called with system root: %s entrypoint name: %s operation name: %s", systemRoot, fullEntryPointName, op_name);
+
+ //LOGINFO_2(4, "Axis2EntryPointService invoke called with system root: %s and entrypoint name: %s", systemRoot, fullEntryPointName);
+ //LOGINFO_1(4, "Axis2EntryPointService invoke called with operation", op_name);
+ entryPointProxy->init(systemRoot, fullEntryPointName);
+
+ //Utils::printTypes(entryPointProxy->getDataFactory());
+
+ AxiomHelper* axiomHelper = AxiomHelper::getHelper();
+ if (entryPointProxy->getDataFactory() == 0)
+ {
+ AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "Axis2EntryPointService_invoke: EntryPoint has no SCA implementation");
+ return 0;
+ }
+
+ char* om_str = NULL;
+ om_str = AXIOM_NODE_TO_STRING(node, env);
+ if (om_str)
+ {
+ AXIS2_LOG_INFO((env)->log, "Axis2EntryPointService invoke has request OM: %s\n", om_str);
+ }
+
+ DataObjectPtr inputDataObject = axiomHelper->toSdo(node, entryPointProxy->getDataFactory());
+
+ //printf("Axis2EntryPoint inputDataObject: (%d)\n", inputDataObject);
+
+ if(!inputDataObject)
+ {
+ AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "Axis2EntryPointService_invoke: Could not convert received Axiom node to SDO");
+ //LOGERROR(0, "Axis2EntryPointService_invoke: Failure whilst invoking EntryPoint");
+ /** TODO: return a SOAP fault here */
+ return 0;
+ }
+ //Utils::printDO(inputDataObject);
+
+ DataObjectPtr outputDataObject = entryPointProxy->invoke(op_name, inputDataObject);
+
+ //printf("Axis2EntryPoint outputDataObject: %d\n", outputDataObject);
+ //Utils::printDO(outputDataObject);
+ //printf("Axis2EntryPoint outputDataObject printed\n");
+ if(!outputDataObject)
+ {
+ AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "Axis2EntryPointService_invoke: Failure whilst invoking EntryPoint");
+ //LOGERROR(0, "Axis2EntryPointService_invoke: Failure whilst invoking EntryPoint");
+ /** TODO: return a SOAP fault here */
+ return 0;
+ }
+
+ returnNode = axiomHelper->toAxiomNode(outputDataObject);
+
+ om_str = NULL;
+ om_str = AXIOM_NODE_TO_STRING(returnNode, env);
+ if (om_str)
+ {
+ AXIS2_LOG_INFO((env)->log, "Axis2EntryPointService invoke has response OM : %s\n", om_str);
+ }
+
+ AxiomHelper::releaseHelper(axiomHelper);
+
+ //LOGEXIT(1, "Axis2EntryPointService_invoke");
+ return returnNode;
+ }
+ }
+ }
+ }
+
+ AXIS2_LOG_ERROR((env)->log, AXIS2_LOG_SI, "Axis2EntryPointService_invoke: invalid OM parameters in request");
+ //LOGERROR(0, "Axis2Service service ERROR: invalid OM parameters in request\n");
+
+ /** TODO: return a SOAP fault here */
+ return node;
+}
+
+
+extern "C"
+{
+/**
+ * Following block distinguish the exposed part of the dll.
+ */
+
+AXIS2_EXPORT int axis2_get_instance(axis2_svc_skeleton **inst,
+ axis2_env_t *env)
+{
+ *inst = axis2_Axis2EntryPointService_create(env);
+ /*if(NULL != *inst)
+ {
+ status = *inst->init();
+ }*/
+ if(!(*inst))
+ {
+ return AXIS2_FAILURE;
+ }
+
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXPORT int axis2_remove_instance(axis2_svc_skeleton_t *inst,
+ axis2_env_t *env)
+{
+ axis2_status_t status = AXIS2_FAILURE;
+ if (inst)
+ {
+ status = AXIS2_SVC_SKELETON_FREE(inst, env);
+ }
+ return status;
+}
+}
diff --git a/branches/cpp-M1/sca/runtime/ws_service/axis2c/src/Axis2Utils.cpp b/branches/cpp-M1/sca/runtime/ws_service/axis2c/src/Axis2Utils.cpp
new file mode 100644
index 0000000000..7007e71c96
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/ws_service/axis2c/src/Axis2Utils.cpp
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * 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)
+#pragma warning(disable: 4091)
+#endif
+#include "Axis2Utils.h"
+
+#include <axis2_svc_ctx.h>
+#include <axis2_defines.h>
+
+#include "tuscany/sca/util/Logging.h"
+
+using namespace tuscany::sca;
+using namespace tuscany::sca::ws;
+
+
+/* Static utility method to retrieve service parameters from the service.xml file
+ * Get an odd linking error if this method (or the header's it requires) are in
+ * a different class.
+ */
+char* Axis2Utils::getAxisServiceParameterValue(const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx, char* parameterName)
+{
+ struct axis2_svc *svc = NULL;
+ struct axis2_op_ctx *op_ctx = NULL;
+ struct axis2_svc_ctx *svc_ctx = NULL;
+ axis2_param_t *param = NULL;
+ char* paramValue = NULL;
+
+ LOGENTRY(1, "Axis2Utils::getAxisServiceParameterValue");
+
+ op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env);
+ svc_ctx = AXIS2_OP_CTX_GET_PARENT(op_ctx, env);
+ svc = AXIS2_SVC_CTX_GET_SVC(svc_ctx, env);
+ if(NULL == svc)
+ {
+ return NULL;
+ }
+
+ param = AXIS2_SVC_GET_PARAM(svc, env, parameterName);
+ if(!param)
+ {
+ LOGERROR_1(0,"Axis parameter %s cannot be found", parameterName);
+ }
+ else
+ {
+ paramValue = (char*) AXIS2_PARAM_GET_VALUE(param, env);
+ }
+
+ LOGEXIT(1, "Axis2Utils::getAxisServiceParameterValue");
+ return paramValue;
+}
+
diff --git a/branches/cpp-M1/sca/runtime/ws_service/axis2c/src/Axis2Utils.h b/branches/cpp-M1/sca/runtime/ws_service/axis2c/src/Axis2Utils.h
new file mode 100644
index 0000000000..a998ed8682
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/ws_service/axis2c/src/Axis2Utils.h
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef tuscany_sca_ws_axis2utils_h
+#define tuscany_sca_ws_axis2utils_h
+
+#include <axis2_env.h>
+#include <axis2_msg_ctx.h>
+
+
+namespace tuscany
+{
+ namespace sca
+ {
+ namespace ws
+ {
+
+ class Axis2Utils
+ {
+ public:
+ static char* getAxisServiceParameterValue(const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx, char* parameterName);
+ };
+ } // End namespace ws
+ } // End namespace sca
+} // End namespace tuscany
+
+#endif // tuscany_sca_ws_axis2utils_h
diff --git a/branches/cpp-M1/sca/runtime/ws_service/axis2c/src/Makefile.am b/branches/cpp-M1/sca/runtime/ws_service/axis2c/src/Makefile.am
new file mode 100644
index 0000000000..22bf2f2276
--- /dev/null
+++ b/branches/cpp-M1/sca/runtime/ws_service/axis2c/src/Makefile.am
@@ -0,0 +1,27 @@
+lib_LTLIBRARIES = libtuscany_sca_ws_service.la
+
+libtuscany_sca_ws_service_la_SOURCES = Axis2EntryPointService_skeleton.cpp Axis2Utils.cpp
+
+noinst_HEADERS = *.h
+
+AM_CPPFLAGS = $(CPPFLAGS) -D_DEBUG
+
+libtuscany_sca_ws_service_la_LIBADD = \
+ -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo -ltuscany_sdo_axiom \
+ -L$(top_builddir)/runtime/core/src -ltuscany_sca \
+ -L$(AXIS2C_HOME)/lib \
+ -laxis2_util \
+ -laxis2_axiom \
+ -laxis2_wsdl \
+ -laxis2_engine \
+ -laxis2_parser \
+ -lpthread \
+ -laxis2_minizip \
+ -laxis2_http_sender \
+ -laxis2_http_receiver
+
+
+INCLUDES = -I$(top_builddir)/runtime/core/src \
+ -I${TUSCANY_SDOCPP}/include \
+ -I${AXIS2C_HOME}/include
+
diff --git a/branches/cpp-M1/sca/samples/AUTHORS b/branches/cpp-M1/sca/samples/AUTHORS
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/AUTHORS
diff --git a/branches/cpp-M1/sca/samples/BigBank/AccountClient/AccountClient.cpp b/branches/cpp-M1/sca/samples/BigBank/AccountClient/AccountClient.cpp
new file mode 100644
index 0000000000..004c02fd9e
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/AccountClient/AccountClient.cpp
@@ -0,0 +1,130 @@
+/*
+ *
+ * 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/branches/cpp-M1/sca/samples/BigBank/AccountClient/AccountClient.dsp b/branches/cpp-M1/sca/samples/BigBank/AccountClient/AccountClient.dsp
new file mode 100644
index 0000000000..cf1c043ae2
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/AccountClient/AccountClient.dsp
@@ -0,0 +1,102 @@
+# 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/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataService.h b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataService.h
new file mode 100644
index 0000000000..1603ed2ccb
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataService.h
@@ -0,0 +1,62 @@
+/*
+ *
+ * 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 "commonj/sdo/SDO.h"
+
+namespace com
+{
+ namespace bigbank
+ {
+ namespace account
+ {
+
+ /*
+ * AccountDataService C interface
+ */
+
+ class AccountDataService {
+
+ public:
+
+ // CheckingAccount is a data object containing
+ // String "accountNumber"
+ // float balance
+
+ virtual commonj::sdo::DataObjectPtr /* CheckingAccount*/ getCheckingAccount(
+ const char *id) = 0;
+
+ // SavingsAccount is a data object containing
+ // String accountNumber
+ // float balance
+
+ virtual commonj::sdo::DataObjectPtr /* SavingsAccount */ getSavingsAccount(
+ const char *id) = 0;
+
+ // StockAccount is a data object containing
+ // String accountNumber
+ // String symbol
+ // int quantity
+
+ virtual commonj::sdo::DataObjectPtr /* StockAccount */ getStockAccount (
+ const char* id) = 0;
+
+
+ };
+
+}
+}
+} // namespace;
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl.componentType b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl.componentType
new file mode 100644
index 0000000000..740f9b01d6
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl.componentType
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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/0.9">
+
+ <service name="AccountDataService">
+ <interface.cpp header="AccountDataService.h">
+ </interface.cpp>
+ </service>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl.cpp b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl.cpp
new file mode 100644
index 0000000000..ec72b4d5b9
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl.cpp
@@ -0,0 +1,140 @@
+/*
+ *
+ * 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 "commonj/sdo/SDO.h"
+
+#include "AccountDataServiceImpl.h"
+
+using namespace commonj::sdo;
+
+namespace com
+{
+ namespace bigbank
+ {
+ namespace account
+ {
+
+ DataObjectPtr /* CheckingAccount*/ AccountDataServiceImpl::getCheckingAccount(
+ const char *id)
+ {
+ try {
+
+ DataFactoryPtr factory = DataFactory::getDataFactory();
+
+ XSDHelperPtr helper = HelperProvider::getXSDHelper(factory);
+
+ helper->defineFile("AccountService.wsdl");
+
+ DataObjectPtr newaccount =
+ factory->create("http://www.bigbank.com/AccountService","CheckingAccount");
+
+ char* name = new char[strlen(id) + 10];
+ strcpy(name,id);
+ 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 char *id)
+ {
+ try {
+
+ DataFactoryPtr factory = DataFactory::getDataFactory();
+
+ XSDHelperPtr helper = HelperProvider::getXSDHelper(factory);
+
+ helper->defineFile("AccountService.wsdl");
+
+ DataObjectPtr newaccount =
+ factory->create("http://www.bigbank.com/AccountService","SavingsAccount");
+
+ char* name = new char[strlen(id) + 10];
+ strcpy(name,id);
+ 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 char* id)
+ {
+ try {
+
+ DataFactoryPtr factory = DataFactory::getDataFactory();
+
+ XSDHelperPtr helper = HelperProvider::getXSDHelper(factory);
+
+ helper->defineFile("AccountService.wsdl");
+
+ DataObjectPtr newaccount =
+ factory->create("http://www.bigbank.com/AccountService","StockAccount");
+
+ char* name = new char[strlen(id) + 10];
+ strcpy(name,id);
+ strcat(name,"_STA12345");
+
+ newaccount->setCString("accountNumber",name);
+
+ delete name;
+
+ newaccount->setCString("symbol","IBM");
+
+ newaccount->setInteger("quantity",100);
+
+ return newaccount;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ return 0;
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl.h b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl.h
new file mode 100644
index 0000000000..6423c58795
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl.h
@@ -0,0 +1,61 @@
+/*
+ *
+ * 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 "AccountDataService.h"
+
+
+namespace com
+{
+ namespace bigbank
+ {
+ namespace account
+ {
+
+ /*
+ * AccountDataService C interface
+ */
+
+ class AccountDataServiceImpl : public AccountDataService {
+
+ public:
+ // CheckingAccount is a data object containing
+ // String "accountNumber"
+ // float balance
+
+ virtual DataObjectPtr /* CheckingAccount*/ getCheckingAccount(
+ const char *id);
+
+ // SavingsAccount is a data object containing
+ // String accountNumber
+ // float balance
+
+ virtual DataObjectPtr /* SavingsAccount */ getSavingsAccount(
+ const char *id);
+
+ // StockAccount is a data object containing
+ // String accountNumber
+ // String symbol
+ // int quantity
+
+ virtual DataObjectPtr /* StockAccount */ getStockAccount (
+ const char* id);
+
+ };
+ }
+ }
+}
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl_AccountDataService_Proxy.cpp b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl_AccountDataService_Proxy.cpp
new file mode 100644
index 0000000000..dbc1588881
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl_AccountDataService_Proxy.cpp
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "AccountDataServiceImpl_AccountDataService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ AccountDataServiceImpl_AccountDataService_Proxy* AccountDataServiceImpl_AccountDataService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new AccountDataServiceImpl_AccountDataService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void AccountDataServiceImpl_AccountDataService_Proxy_Destructor(void* proxy)
+ {
+ delete (AccountDataServiceImpl_AccountDataService_Proxy*)proxy;
+ }
+}
+
+AccountDataServiceImpl_AccountDataService_Proxy::AccountDataServiceImpl_AccountDataService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+AccountDataServiceImpl_AccountDataService_Proxy::~AccountDataServiceImpl_AccountDataService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+commonj::sdo::DataObjectPtr AccountDataServiceImpl_AccountDataService_Proxy::getCheckingAccount(const char* arg0)
+{
+ Operation operation("getCheckingAccount");
+ operation.addParameter(&arg0);
+ commonj::sdo::DataObjectPtr ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+commonj::sdo::DataObjectPtr AccountDataServiceImpl_AccountDataService_Proxy::getSavingsAccount(const char* arg0)
+{
+ Operation operation("getSavingsAccount");
+ operation.addParameter(&arg0);
+ commonj::sdo::DataObjectPtr ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+commonj::sdo::DataObjectPtr AccountDataServiceImpl_AccountDataService_Proxy::getStockAccount(const char* arg0)
+{
+ Operation operation("getStockAccount");
+ operation.addParameter(&arg0);
+ commonj::sdo::DataObjectPtr ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl_AccountDataService_Proxy.h b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl_AccountDataService_Proxy.h
new file mode 100644
index 0000000000..c86af7e128
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl_AccountDataService_Proxy.h
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+#ifndef AccountDataServiceImpl_AccountDataService_Proxy_h
+#define AccountDataServiceImpl_AccountDataService_Proxy_h
+
+#include "AccountDataService.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class AccountDataServiceImpl_AccountDataService_Proxy : public com::bigbank::account::AccountDataService
+{
+public:
+ AccountDataServiceImpl_AccountDataService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~AccountDataServiceImpl_AccountDataService_Proxy();
+ virtual commonj::sdo::DataObjectPtr getCheckingAccount(const char* id);
+ virtual commonj::sdo::DataObjectPtr getSavingsAccount(const char* id);
+ virtual commonj::sdo::DataObjectPtr getStockAccount(const char* id);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // AccountDataServiceImpl_AccountDataService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl_AccountDataService_Wrapper.cpp b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl_AccountDataService_Wrapper.cpp
new file mode 100644
index 0000000000..424ea7fdfb
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl_AccountDataService_Wrapper.cpp
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "AccountDataServiceImpl_AccountDataService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ AccountDataServiceImpl_AccountDataService_Wrapper* AccountDataServiceImpl_AccountDataService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new AccountDataServiceImpl_AccountDataService_Wrapper(target);
+ }
+}
+
+AccountDataServiceImpl_AccountDataService_Wrapper::AccountDataServiceImpl_AccountDataService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (com::bigbank::account::AccountDataServiceImpl*)getImplementation();
+}
+
+AccountDataServiceImpl_AccountDataService_Wrapper::~AccountDataServiceImpl_AccountDataService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* AccountDataServiceImpl_AccountDataService_Wrapper::newImplementation()
+{
+ return new com::bigbank::account::AccountDataServiceImpl;
+}
+
+void AccountDataServiceImpl_AccountDataService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void AccountDataServiceImpl_AccountDataService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getCheckingAccount")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(commonj::sdo::DataObjectPtr*)operation.getReturnValue() = impl->getCheckingAccount(p0);
+ return;
+ }
+ if (operationName == "getSavingsAccount")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(commonj::sdo::DataObjectPtr*)operation.getReturnValue() = impl->getSavingsAccount(p0);
+ return;
+ }
+ if (operationName == "getStockAccount")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(commonj::sdo::DataObjectPtr*)operation.getReturnValue() = impl->getStockAccount(p0);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl_AccountDataService_Wrapper.h b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl_AccountDataService_Wrapper.h
new file mode 100644
index 0000000000..af43114af0
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountDataServiceImpl_AccountDataService_Wrapper.h
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+#ifndef AccountDataServiceImpl_AccountDataService_Wrapper_h
+#define AccountDataServiceImpl_AccountDataService_Wrapper_h
+
+#include "AccountDataServiceImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class AccountDataServiceImpl_AccountDataService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ AccountDataServiceImpl_AccountDataService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~AccountDataServiceImpl_AccountDataService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ com::bigbank::account::AccountDataServiceImpl* impl;
+};
+
+#endif // AccountDataServiceImpl_AccountDataService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountService.h b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountService.h
new file mode 100644
index 0000000000..eb1a585c52
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountService.h
@@ -0,0 +1,58 @@
+/*
+ *
+ * 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.
+ */
+
+/**
+ * AccountService.h
+ *
+ */
+
+
+#include <commonj/sdo/SDO.h>
+
+
+namespace com
+{
+ namespace bigbank
+ {
+ namespace account
+ {
+
+ /*
+ * AccountService C interface
+ */
+
+ class AccountService {
+
+ public:
+
+ //The account report data object has one many-valued
+ // property "accountSummaries".
+ // This had properties
+ // String accountNumber
+ // String accountType
+ // Float balance.
+
+ virtual commonj::sdo::DataObjectPtr /*AccountReport*/
+ getAccountReport(DataObjectPtr cid) = 0;
+
+
+ };
+
+ }
+ }
+} // namespaces
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountService.wsdl b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountService.wsdl
new file mode 100644
index 0000000000..9362ab56c0
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountService.wsdl
@@ -0,0 +1,97 @@
+<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:complexType name="cid">
+ <xsd:sequence>
+ <xsd:element name="customerID" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="customerID" type="tns:cid" />
+
+ <xsd:element name="getAccountReportResponse" type="tns:AccountReport" />
+
+ <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:customerID" name="getAccountReportRequest" />
+</wsdl:message>
+
+<wsdl:message name="getAccountReportResponse">
+ <wsdl:part element="tns:AccountReport"
+ name="getAccountReportResponse" />
+</wsdl:message>
+
+<wsdl:portType name="AccountService">
+ SCA Sample Application 16 November 2005
+ <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/Account" />
+ </wsdl:port>
+</wsdl:service>
+</wsdl:definitions> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl.componenttype b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl.componenttype
new file mode 100644
index 0000000000..7ab7736069
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl.componenttype
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="AccountService">
+ <interface.cpp header="AccountService.h">
+ </interface.cpp>
+ </service>
+
+ <reference name="AccountDataService">
+ <interface.cpp header="AccountDataService.h">
+ </interface.cpp>
+ </reference>
+
+ <reference name="stockQuote">
+ <interface.cpp header="StockQuoteService.h">
+ </interface.cpp>
+ </reference>
+
+ <property name="currency" type="xs:string"/>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl.cpp b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl.cpp
new file mode 100644
index 0000000000..c78b5963bf
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl.cpp
@@ -0,0 +1,186 @@
+/**
+ *
+ * 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.
+ */
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "AccountServiceImpl.h"
+#include "StockQuoteService.h"
+#include "AccountDataService.h"
+
+#include "osoa/sca/sca.h"
+
+using namespace osoa::sca;
+
+
+namespace com
+{
+ namespace bigbank
+ {
+ namespace account
+ {
+
+ AccountServiceImpl::AccountServiceImpl()
+ {
+ initialized = false;
+ // Note - cannot use the component context within the constructor - need to move this
+ // code out to lazy init on first use.
+
+ //ComponentContext myContext = ComponentContext::getCurrent();
+
+ //dataService =
+ // (AccountDataService*)myContext.getService("AccountDataService");
+
+ //stockService =
+ // (StockQuoteService*)myContext.getService("StockQuoteService");
+
+ }
+
+ //void AccountServiceImpl::lazyGetDependencies()
+ //{
+ // cant do this either - the context cannot be instantiated
+ // resolve the references on call only
+
+ //theContext = ComponentContext::getCurrent();
+
+ //dataService =
+ // (AccountDataService*)theContext.getService("AccountDataService");
+
+ //stockService =
+ // (StockQuoteService*)theContext.getService("stockQuote");
+
+ //initialized = true;
+ //}
+
+ AccountServiceImpl::~AccountServiceImpl()
+ {
+ }
+
+ DataObjectPtr /*AccountReport**/
+ AccountServiceImpl::getAccountReport(DataObjectPtr cid)
+ {
+ try {
+
+ commonj::sdo::DataFactoryPtr factory =
+ commonj::sdo::DataFactory::getDataFactory();
+
+ commonj::sdo::XSDHelperPtr helper =
+ commonj::sdo::HelperProvider::getXSDHelper(factory);
+
+ helper->defineFile("AccountService.wsdl");
+
+ const char* id = cid->getCString("customerID");
+
+ commonj::sdo::DataObjectPtr newReport =
+ factory->create("http://www.bigbank.com/AccountService","AccountReport");
+
+ ComponentContext theContext = ComponentContext::getCurrent();
+
+ com::bigbank::account::AccountDataService *dataService =
+ (com::bigbank::account::AccountDataService*)theContext.getService("AccountDataService");
+
+ if (dataService == 0)
+ {
+ std::cout << "No Account Data Service registered" << std::endl;
+ return newReport;
+ }
+
+ // would be better to return a list of accounts - this only
+ // gets the first of each.
+
+ commonj::sdo::DataObjectPtr checking =
+ dataService->getCheckingAccount(id);
+
+ 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(id);
+
+ if (savings != 0)
+ {
+ commonj::sdo::DataObjectList& dl = newReport->getList("savings");
+ savings->setFloat("balance",
+ fromUSDollarToCurrency(savings->getFloat("balance")));
+ dl.append(savings);
+ }
+
+ com::bigbank::stockquote::StockQuoteService* stockService =
+ (StockQuoteService*)theContext.getService("stockQuote");
+
+ if (stockService == 0)
+ {
+ std::cout << "No Stock Quote Data Service registered" << std::endl;
+ return newReport;
+ }
+
+ commonj::sdo::DataObjectPtr stocks = dataService->getStockAccount(id);
+
+ 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;
+ }
+ catch (SDORuntimeException& e)
+ {
+ std::cout << "Error from SDO: " << e << std::endl;
+ return 0;
+ }
+ }
+
+
+ float AccountServiceImpl::fromUSDollarToCurrency(float value)
+ {
+ // get the property "currency"
+ 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;
+ }
+ }
+ }
+} // namespaces
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl.h b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl.h
new file mode 100644
index 0000000000..1e506f1ed1
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl.h
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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 com
+{
+ namespace bigbank
+ {
+ namespace account
+ {
+
+class AccountServiceImpl: public AccountService
+ {
+
+ public:
+
+
+ AccountServiceImpl();
+ virtual ~AccountServiceImpl();
+
+ // public API
+
+ virtual DataObjectPtr /*AccountReport*/
+ getAccountReport(DataObjectPtr cid);
+
+
+ //virtual void lazyGetDependencies();
+
+private:
+
+
+ float fromUSDollarToCurrency(float value);
+
+ bool initialized;
+
+};
+
+}
+}
+} // namespaces
+
+using namespace com::bigbank::account;
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountDataService_Proxy.cpp b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountDataService_Proxy.cpp
new file mode 100644
index 0000000000..a0441b213a
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountDataService_Proxy.cpp
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "AccountServiceImpl_AccountDataService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ AccountServiceImpl_AccountDataService_Proxy* AccountServiceImpl_AccountDataService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new AccountServiceImpl_AccountDataService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void AccountServiceImpl_AccountDataService_Proxy_Destructor(void* proxy)
+ {
+ delete (AccountServiceImpl_AccountDataService_Proxy*)proxy;
+ }
+}
+
+AccountServiceImpl_AccountDataService_Proxy::AccountServiceImpl_AccountDataService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+AccountServiceImpl_AccountDataService_Proxy::~AccountServiceImpl_AccountDataService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+commonj::sdo::DataObjectPtr AccountServiceImpl_AccountDataService_Proxy::getCheckingAccount(const char* arg0)
+{
+ Operation operation("getCheckingAccount");
+ operation.addParameter(&arg0);
+ commonj::sdo::DataObjectPtr ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+commonj::sdo::DataObjectPtr AccountServiceImpl_AccountDataService_Proxy::getSavingsAccount(const char* arg0)
+{
+ Operation operation("getSavingsAccount");
+ operation.addParameter(&arg0);
+ commonj::sdo::DataObjectPtr ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+commonj::sdo::DataObjectPtr AccountServiceImpl_AccountDataService_Proxy::getStockAccount(const char* arg0)
+{
+ Operation operation("getStockAccount");
+ operation.addParameter(&arg0);
+ commonj::sdo::DataObjectPtr ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountDataService_Proxy.h b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountDataService_Proxy.h
new file mode 100644
index 0000000000..ff5c6e6d87
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountDataService_Proxy.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#ifndef AccountServiceImpl_AccountDataService_Proxy_h
+#define AccountServiceImpl_AccountDataService_Proxy_h
+
+#include "AccountDataService.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class AccountServiceImpl_AccountDataService_Proxy : public com::bigbank::account::AccountDataService
+{
+public:
+ AccountServiceImpl_AccountDataService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~AccountServiceImpl_AccountDataService_Proxy();
+ virtual commonj::sdo::DataObjectPtr getCheckingAccount(const char* id);
+ virtual commonj::sdo::DataObjectPtr getSavingsAccount(const char* id);
+ virtual commonj::sdo::DataObjectPtr getStockAccount(const char* id);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // AccountServiceImpl_AccountDataService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountService_Proxy.cpp b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountService_Proxy.cpp
new file mode 100644
index 0000000000..1684266b3e
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountService_Proxy.cpp
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "AccountServiceImpl_AccountService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ AccountServiceImpl_AccountService_Proxy* AccountServiceImpl_AccountService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new AccountServiceImpl_AccountService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void AccountServiceImpl_AccountService_Proxy_Destructor(void* proxy)
+ {
+ delete (AccountServiceImpl_AccountService_Proxy*)proxy;
+ }
+}
+
+AccountServiceImpl_AccountService_Proxy::AccountServiceImpl_AccountService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+AccountServiceImpl_AccountService_Proxy::~AccountServiceImpl_AccountService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+commonj::sdo::DataObjectPtr AccountServiceImpl_AccountService_Proxy::getAccountReport( DataObjectPtr arg0)
+{
+ Operation operation("getAccountReport");
+ operation.addParameter(&arg0);
+ commonj::sdo::DataObjectPtr ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountService_Proxy.h b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountService_Proxy.h
new file mode 100644
index 0000000000..3b5df16198
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountService_Proxy.h
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+#ifndef AccountServiceImpl_AccountService_Proxy_h
+#define AccountServiceImpl_AccountService_Proxy_h
+
+#include "AccountService.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class AccountServiceImpl_AccountService_Proxy : public com::bigbank::account::AccountService
+{
+public:
+ AccountServiceImpl_AccountService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~AccountServiceImpl_AccountService_Proxy();
+ virtual commonj::sdo::DataObjectPtr getAccountReport( DataObjectPtr cid);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // AccountServiceImpl_AccountService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountService_Wrapper.cpp b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountService_Wrapper.cpp
new file mode 100644
index 0000000000..1b97e5c4d0
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountService_Wrapper.cpp
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "AccountServiceImpl_AccountService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ AccountServiceImpl_AccountService_Wrapper* AccountServiceImpl_AccountService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new AccountServiceImpl_AccountService_Wrapper(target);
+ }
+}
+
+AccountServiceImpl_AccountService_Wrapper::AccountServiceImpl_AccountService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (AccountServiceImpl*)getImplementation();
+}
+
+AccountServiceImpl_AccountService_Wrapper::~AccountServiceImpl_AccountService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* AccountServiceImpl_AccountService_Wrapper::newImplementation()
+{
+ return new AccountServiceImpl;
+}
+
+void AccountServiceImpl_AccountService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void AccountServiceImpl_AccountService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getAccountReport")
+ {
+ DataObjectPtr& p0 = *(DataObjectPtr*)operation.getParameterValue(0); *(commonj::sdo::DataObjectPtr*)operation.getReturnValue() = impl->getAccountReport(p0);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountService_Wrapper.h b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountService_Wrapper.h
new file mode 100644
index 0000000000..9dce3fd05d
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_AccountService_Wrapper.h
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+#ifndef AccountServiceImpl_AccountService_Wrapper_h
+#define AccountServiceImpl_AccountService_Wrapper_h
+
+#include "AccountServiceImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class AccountServiceImpl_AccountService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ AccountServiceImpl_AccountService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~AccountServiceImpl_AccountService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ AccountServiceImpl* impl;
+};
+
+#endif // AccountServiceImpl_AccountService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_stockQuote_Proxy.cpp b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_stockQuote_Proxy.cpp
new file mode 100644
index 0000000000..be1b432353
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_stockQuote_Proxy.cpp
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "AccountServiceImpl_stockQuote_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ AccountServiceImpl_stockQuote_Proxy* AccountServiceImpl_stockQuote_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new AccountServiceImpl_stockQuote_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void AccountServiceImpl_stockQuote_Proxy_Destructor(void* proxy)
+ {
+ delete (AccountServiceImpl_stockQuote_Proxy*)proxy;
+ }
+}
+
+AccountServiceImpl_stockQuote_Proxy::AccountServiceImpl_stockQuote_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+AccountServiceImpl_stockQuote_Proxy::~AccountServiceImpl_stockQuote_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+float AccountServiceImpl_stockQuote_Proxy::getQuote(const char* arg0)
+{
+ Operation operation("getQuote");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_stockQuote_Proxy.h b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_stockQuote_Proxy.h
new file mode 100644
index 0000000000..d63d507bf4
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/AccountServiceImpl_stockQuote_Proxy.h
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+#ifndef AccountServiceImpl_stockQuote_Proxy_h
+#define AccountServiceImpl_stockQuote_Proxy_h
+
+#include "StockQuoteService.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class AccountServiceImpl_stockQuote_Proxy : public com::bigbank::stockquote::StockQuoteService
+{
+public:
+ AccountServiceImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~AccountServiceImpl_stockQuote_Proxy();
+ virtual float getQuote(const char* symbol);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // AccountServiceImpl_stockQuote_Proxy_h
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/Accounts.dsp b/branches/cpp-M1/sca/samples/BigBank/Accounts/Accounts.dsp
new file mode 100644
index 0000000000..52c450a2bd
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/Accounts.dsp
@@ -0,0 +1,250 @@
+# Microsoft Developer Studio Project File - Name="Accounts" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=Accounts - 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 "Accounts.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 "Accounts.mak" CFG="Accounts - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Accounts - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "Accounts - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Accounts - 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 /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ACCOUNTS_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ACCOUNTS_EXPORTS" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# 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 /nologo /dll /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 /nologo /dll /machine:I386
+
+!ELSEIF "$(CFG)" == "Accounts - 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 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ACCOUNTS_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(TUSCANY_SCACPP)\include" /I "$(TUSCANY_SDOCPP)\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ACCOUNTS_EXPORTS" /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# 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 /nologo /dll /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 tuscany_sca.lib tuscany_sdo.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"$(TUSCANY_SCACPP)/lib" /libpath:"$(TUSCANY_SDOCPP)/lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "Accounts - Win32 Release"
+# Name "Accounts - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\AccountDataServiceImpl.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountDataServiceImpl_AccountDataService_Proxy.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountDataServiceImpl_AccountDataService_Wrapper.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountServiceImpl.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountServiceImpl_AccountDataService_Proxy.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountServiceImpl_AccountDataService_Proxy.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountServiceImpl_AccountService_Proxy.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountServiceImpl_AccountService_Wrapper.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountServiceImpl_stockQuote_Proxy.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\StockQuoteServiceImpl.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\StockQuoteServiceImpl_StockQuoteExternal_Proxy.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\StockQuoteServiceImpl_StockQuoteService_Proxy.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\StockQuoteServiceImpl_StockQuoteService_Wrapper.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\AccountDataService.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountDataServiceImpl.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountDataServiceImpl_AccountDataService_Proxy.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountDataServiceImpl_AccountDataService_Wrapper.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountService.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountServiceImpl.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountServiceImpl_AccountService_Proxy.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountServiceImpl_AccountService_Wrapper.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountServiceImpl_stockQuote_Proxy.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\StockQuoteExternalService.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\StockQuoteService.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\StockQuoteServiceImpl.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\StockQuoteServiceImpl_StockQuoteExternal_Proxy.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\StockQuoteServiceImpl_StockQuoteService_Proxy.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\StockQuoteServiceImpl_StockQuoteService_Wrapper.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=..\WSAccountClient\services.xml
+# End Source File
+# Begin Source File
+
+SOURCE="..\WSAccountClient\Tuscany-model.config"
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\AccountDataServiceImpl.componentType
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountService.wsdl
+# End Source File
+# Begin Source File
+
+SOURCE=.\AccountServiceImpl.componenttype
+# End Source File
+# Begin Source File
+
+SOURCE=.\sca.module
+# End Source File
+# Begin Source File
+
+SOURCE=.\sca.subsystem
+# End Source File
+# Begin Source File
+
+SOURCE=.\StockQuoteService.wsdl
+# End Source File
+# Begin Source File
+
+SOURCE=.\StockQuoteServiceImpl.componentType
+# End Source File
+# End Target
+# End Project
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteExternalService.h b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteExternalService.h
new file mode 100644
index 0000000000..d8df90651d
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteExternalService.h
@@ -0,0 +1,24 @@
+#include "commonj/sdo/SDO.h"
+using namespace commonj::sdo;
+
+
+namespace com
+{
+ namespace bigbank
+ {
+ namespace stockquote
+ {
+
+ /*
+ * AccountsService C interface
+ */
+
+ class StockQuoteExternalService {
+ public:
+ virtual const char* GetQuote(const char* symbol) = 0;
+
+ };
+
+ }
+ }
+} // namespace;
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteService.h b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteService.h
new file mode 100644
index 0000000000..cd61d4c4d2
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteService.h
@@ -0,0 +1,24 @@
+
+
+namespace com
+{
+ namespace bigbank
+ {
+ namespace stockquote
+ {
+
+ /*
+ * AccountsService C interface
+ */
+
+ class StockQuoteService {
+ public:
+ virtual float getQuote(const char* symbol) = 0;
+
+ };
+
+ }
+ }
+} // namespace;
+
+using namespace com::bigbank::stockquote;
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteService.wsdl b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteService.wsdl
new file mode 100644
index 0000000000..ba6caff22c
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteService.wsdl
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<wsdl:definitions
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.quickstockquote.com/StockQuoteService/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.quickstockquote.com/StockQuoteService/"
+ name="StockQuoteService">
+
+ <wsdl:types>
+ <xsd:schema
+ targetNamespace="http://www.quickstockquote.com/StockQuoteService/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:element name="getQuote">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="symbol" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="getQuoteResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="quote" type="xsd:float"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="getQuote">
+ <wsdl:part element="tns:getQuote" name="getQuote" />
+ </wsdl:message>
+ <wsdl:message name="getQuoteResponse">
+ <wsdl:part element="tns:getQuoteResponse" name="getQuoteResponse" />
+ </wsdl:message>
+
+ <wsdl:portType name="StockQuoteService">
+ <wsdl:operation name="getQuote">
+ <wsdl:input message="tns:getQuote" />
+ <wsdl:output message="tns:getQuoteResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="StockQuoteServiceSOAP"
+ type="tns:StockQuoteService">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="getQuote">
+ <soap:operation
+ soapAction="http://www.quickstockquote.com/StockQuoteService/getQuote" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="StockQuoteService">
+ <wsdl:port binding="tns:StockQuoteServiceSOAP"
+ name="StockQuoteServiceSOAP">
+ <soap:address location="http://www.quickstockquote.com/services/StockQuoteService"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl.componentType b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl.componentType
new file mode 100644
index 0000000000..92e46f2638
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl.componentType
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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/0.9">
+
+ <service name="StockQuoteService">
+ <interface.cpp header="StockQuoteService.h">
+ </interface.cpp>
+ </service>
+
+ <reference name="StockQuoteExternal">
+ <interface.cpp header="StockQuoteExternalService.h">
+ </interface.cpp>
+ </reference>
+
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl.cpp b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl.cpp
new file mode 100644
index 0000000000..8ce6d410c2
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl.cpp
@@ -0,0 +1,63 @@
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "StockQuoteServiceImpl.h"
+#include "StockQuoteExternalService.h"
+
+#include "osoa/sca/sca.h"
+#include "commonj/sdo/SDO.h"
+
+using namespace osoa::sca;
+using namespace commonj::sdo;
+
+namespace com{
+ namespace bigbank{
+ namespace stockquote {
+
+
+ float StockQuoteServiceImpl::getQuote(const char *symbol)
+ {
+ ComponentContext myContext = ComponentContext::getCurrent();
+
+ // Use an SCA reference to get the stock price
+ StockQuoteExternalService* stockQuoteExternalService =
+ (StockQuoteExternalService*)myContext.
+ getService("StockQuoteExternal");
+
+ if (stockQuoteExternalService == 0)
+ {
+ std::cout << "unable to find external stock quote service" << std::endl;
+ return 0.1f;
+ }
+
+ // Create a data object representing the requests (use dynamic API until static is available)
+ DataObjectPtr requestDO;
+
+ // Invoke the service
+ const char* result = stockQuoteExternalService->GetQuote(symbol);
+
+ //std::cout << result<< std::endl;
+
+ float stockPrice = 0.0f;
+
+ 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;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl.h b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl.h
new file mode 100644
index 0000000000..7611984e4e
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl.h
@@ -0,0 +1,25 @@
+
+#include "StockQuoteService.h"
+
+
+namespace com
+{
+ namespace bigbank
+ {
+ namespace stockquote
+ {
+
+ /*
+ * AccountsService C interface
+ */
+
+ class StockQuoteServiceImpl : public StockQuoteService {
+ public:
+ virtual float getQuote(const char* symbol);
+
+ };
+
+
+}
+}
+} // namespace;
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteExternal_Proxy.cpp b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteExternal_Proxy.cpp
new file mode 100644
index 0000000000..b618dd4a33
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteExternal_Proxy.cpp
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "StockQuoteServiceImpl_StockQuoteExternal_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ StockQuoteServiceImpl_StockQuoteExternal_Proxy* StockQuoteServiceImpl_StockQuoteExternal_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new StockQuoteServiceImpl_StockQuoteExternal_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void StockQuoteServiceImpl_StockQuoteExternal_Proxy_Destructor(void* proxy)
+ {
+ delete (StockQuoteServiceImpl_StockQuoteExternal_Proxy*)proxy;
+ }
+}
+
+StockQuoteServiceImpl_StockQuoteExternal_Proxy::StockQuoteServiceImpl_StockQuoteExternal_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+StockQuoteServiceImpl_StockQuoteExternal_Proxy::~StockQuoteServiceImpl_StockQuoteExternal_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+const char* StockQuoteServiceImpl_StockQuoteExternal_Proxy::GetQuote(const char* arg0)
+{
+ Operation operation("GetQuote");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteExternal_Proxy.h b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteExternal_Proxy.h
new file mode 100644
index 0000000000..45469174ce
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteExternal_Proxy.h
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+#ifndef StockQuoteServiceImpl_StockQuoteExternal_Proxy_h
+#define StockQuoteServiceImpl_StockQuoteExternal_Proxy_h
+
+#include "StockQuoteExternalService.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class StockQuoteServiceImpl_StockQuoteExternal_Proxy : public com::bigbank::stockquote::StockQuoteExternalService
+{
+public:
+ StockQuoteServiceImpl_StockQuoteExternal_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~StockQuoteServiceImpl_StockQuoteExternal_Proxy();
+ virtual const char* GetQuote(const char* symbol);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // StockQuoteServiceImpl_StockQuoteExternal_Proxy_h
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteService_Proxy.cpp b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteService_Proxy.cpp
new file mode 100644
index 0000000000..43dabb5307
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteService_Proxy.cpp
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "StockQuoteServiceImpl_StockQuoteService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ StockQuoteServiceImpl_StockQuoteService_Proxy* StockQuoteServiceImpl_StockQuoteService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new StockQuoteServiceImpl_StockQuoteService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void StockQuoteServiceImpl_StockQuoteService_Proxy_Destructor(void* proxy)
+ {
+ delete (StockQuoteServiceImpl_StockQuoteService_Proxy*)proxy;
+ }
+}
+
+StockQuoteServiceImpl_StockQuoteService_Proxy::StockQuoteServiceImpl_StockQuoteService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+StockQuoteServiceImpl_StockQuoteService_Proxy::~StockQuoteServiceImpl_StockQuoteService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+float StockQuoteServiceImpl_StockQuoteService_Proxy::getQuote(const char* arg0)
+{
+ Operation operation("getQuote");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteService_Proxy.h b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteService_Proxy.h
new file mode 100644
index 0000000000..e1b0ad1807
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteService_Proxy.h
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+#ifndef StockQuoteServiceImpl_StockQuoteService_Proxy_h
+#define StockQuoteServiceImpl_StockQuoteService_Proxy_h
+
+#include "StockQuoteService.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class StockQuoteServiceImpl_StockQuoteService_Proxy : public com::bigbank::stockquote::StockQuoteService
+{
+public:
+ StockQuoteServiceImpl_StockQuoteService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~StockQuoteServiceImpl_StockQuoteService_Proxy();
+ virtual float getQuote(const char* symbol);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // StockQuoteServiceImpl_StockQuoteService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteService_Wrapper.cpp b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteService_Wrapper.cpp
new file mode 100644
index 0000000000..00ac26c784
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteService_Wrapper.cpp
@@ -0,0 +1,74 @@
+/*
+ * 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.
+ */
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "StockQuoteServiceImpl_StockQuoteService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ StockQuoteServiceImpl_StockQuoteService_Wrapper* StockQuoteServiceImpl_StockQuoteService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new StockQuoteServiceImpl_StockQuoteService_Wrapper(target);
+ }
+}
+
+StockQuoteServiceImpl_StockQuoteService_Wrapper::StockQuoteServiceImpl_StockQuoteService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (StockQuoteServiceImpl*)getImplementation();
+}
+
+StockQuoteServiceImpl_StockQuoteService_Wrapper::~StockQuoteServiceImpl_StockQuoteService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* StockQuoteServiceImpl_StockQuoteService_Wrapper::newImplementation()
+{
+ return new StockQuoteServiceImpl;
+}
+
+void StockQuoteServiceImpl_StockQuoteService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void StockQuoteServiceImpl_StockQuoteService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getQuote")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->getQuote(p0);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteService_Wrapper.h b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteService_Wrapper.h
new file mode 100644
index 0000000000..a6d8580e5e
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/StockQuoteServiceImpl_StockQuoteService_Wrapper.h
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+#ifndef StockQuoteServiceImpl_StockQuoteService_Wrapper_h
+#define StockQuoteServiceImpl_StockQuoteService_Wrapper_h
+
+#include "StockQuoteServiceImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class StockQuoteServiceImpl_StockQuoteService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ StockQuoteServiceImpl_StockQuoteService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~StockQuoteServiceImpl_StockQuoteService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ StockQuoteServiceImpl* impl;
+};
+
+#endif // StockQuoteServiceImpl_StockQuoteService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/sca.module b/branches/cpp-M1/sca/samples/BigBank/Accounts/sca.module
new file mode 100644
index 0000000000..8560a3cb72
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/sca.module
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9" xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ name="AccountModule">
+
+ <component name="AccountServiceComponent">
+ <implementation.cpp dll="Accounts.dll" header="AccountServiceImpl.h"/>
+ <references>
+ <AccountDataService>AccountDataServiceComponent</AccountDataService>
+ <stockQuote>StockQuoteServiceComponent</stockQuote>
+ </references>
+ <properties>
+ <v:currency>EURO</v:currency>
+ </properties>
+ </component>
+
+ <component name="AccountDataServiceComponent">
+ <implementation.cpp dll="Accounts.dll" header="AccountDataServiceImpl.h"/>
+ </component>
+
+ <component name="StockQuoteServiceComponent">
+ <implementation.cpp dll="Accounts.dll" header="StockQuoteServiceImpl.h"/>
+ <references>
+ <StockQuoteExternal>StockQuoteExternalService</StockQuoteExternal>
+ </references>
+ </component>
+
+ <externalService name="StockQuoteExternalService">
+ <interface.cpp header="StockQuoteExternalService.h"/>
+ <binding.ws port="http://www.webserviceX.NET/#wsdl.endpoint(StockQuote/StockQuoteSoap)"/>
+ </externalService>
+
+ <entryPoint name="WSAccountEntrypoint" multiplicity="1..1">
+ <interface.wsdl interface="AccountService.wsdl" callbackInterface=""></interface.wsdl>
+ <binding.ws port="http://www.bigbank.com/AccountService#wsdl.endpoint(AccountService/AccountServiceSOAP)"></binding.ws>
+ <reference>AccountServiceComponent</reference>
+ </entryPoint>
+
+</module>
diff --git a/branches/cpp-M1/sca/samples/BigBank/Accounts/sca.subsystem b/branches/cpp-M1/sca/samples/BigBank/Accounts/sca.subsystem
new file mode 100644
index 0000000000..faaa828bf9
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/Accounts/sca.subsystem
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<subsystem xmlns="http://www.osoa.org/xmlns/sca/0.9"
+
+ name="AccountSubsystem">
+
+ <moduleComponent name="Account" module="AccountModule">
+
+ </moduleComponent>
+
+</subsystem>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/BigBank/BigBank.dsw b/branches/cpp-M1/sca/samples/BigBank/BigBank.dsw
new file mode 100644
index 0000000000..42d7f5a82e
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/BigBank.dsw
@@ -0,0 +1,53 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "AccountClient"=.\AccountClient\AccountClient.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Accounts"=.\Accounts\Accounts.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "WSAccountClient"=.\WSAccountClient\WSAccountClient.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/branches/cpp-M1/sca/samples/BigBank/BigBank.ncb b/branches/cpp-M1/sca/samples/BigBank/BigBank.ncb
new file mode 100644
index 0000000000..8b4beb8420
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/BigBank.ncb
Binary files differ
diff --git a/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/Tuscany-model.config b/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/Tuscany-model.config
new file mode 100644
index 0000000000..41a4ec3ebb
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/Tuscany-model.config
@@ -0,0 +1,24 @@
+<?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.
+ -->
+
+<tuscany-model xmlns="http://org.apache.tuscany/xmlns/cpp/1.0">
+ <wsdl>
+ <file name="AccountService.wsdl"/>
+ </wsdl>
+ <xsd>
+ </xsd>
+</tuscany-model>
diff --git a/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/WSAccountClient.cpp b/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/WSAccountClient.cpp
new file mode 100644
index 0000000000..f794dc6112
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/WSAccountClient.cpp
@@ -0,0 +1,179 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * 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 "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( "Account_blocking.log", AXIS2_LOG_LEVEL_TRACE);
+
+ client_home = AXIS2_GETENV("AXIS2C_HOME");
+ if (!client_home)
+ client_home = "../../deploy";
+
+ address = "http://localhost:9090/axis2/services/Account";
+ 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/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/WSAccountClient.dsp b/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/WSAccountClient.dsp
new file mode 100644
index 0000000000..db382db6ff
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/WSAccountClient.dsp
@@ -0,0 +1,109 @@
+# Microsoft Developer Studio Project File - Name="WSAccountClient" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=WSAccountClient - 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 "WSAccountClient.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 "WSAccountClient.mak" CFG="WSAccountClient - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "WSAccountClient - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "WSAccountClient - 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)" == "WSAccountClient - 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)" == "WSAccountClient - 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 "$(AXIS2C_HOME)/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# 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_sca.lib tuscany_sdo.lib axis2_engine.lib axis2_parser.lib axis2_util.lib axiom.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"$(TUSCANY_SCACPP)\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "WSAccountClient - Win32 Release"
+# Name "WSAccountClient - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\axis2_Account_stub.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\WSAccountClient.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\axis2_Account_stub.h
+# End Source File
+# 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/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/axis2_Account_stub.cpp b/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/axis2_Account_stub.cpp
new file mode 100644
index 0000000000..d9198b29ec
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/axis2_Account_stub.cpp
@@ -0,0 +1,106 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * 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 "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/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/axis2_Account_stub.h b/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/axis2_Account_stub.h
new file mode 100644
index 0000000000..53f07263b8
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/axis2_Account_stub.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * 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.
+ */
+
+#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/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/services.xml b/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/services.xml
new file mode 100644
index 0000000000..bb57c6edb6
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/WSAccountClient/services.xml
@@ -0,0 +1,30 @@
+
+<!--
+ 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.
+ -->
+<service name="BigBank">
+ <parameter name="ServiceClass" locked="xsd:false">tuscany_sca_ws_service</parameter>
+ <parameter name="TuscanySystemRoot" locked="xsd:false">c:/apache/apache_checkout/cpp/sca/samples/BigBank/deploy</parameter>
+ <parameter name="TuscanyEntryPoint" locked="xsd:false">AccountSubsystem/Account/WSAccountEntrypoint</parameter>
+
+ <description>
+ This is a testing service, named 'BigBank' to test multiple operations in the same service
+ </description>
+
+ <operation name="getAccountReport">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+
+</service>
diff --git a/branches/cpp-M1/sca/samples/BigBank/deploy.bat b/branches/cpp-M1/sca/samples/BigBank/deploy.bat
new file mode 100644
index 0000000000..d88112556b
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/BigBank/deploy.bat
@@ -0,0 +1,16 @@
+copy Accounts\Debug\Accounts.dll Deploy\modules\Accounts
+copy Accounts\Debug\Accounts.pdb Deploy\modules\Accounts
+copy Accounts\AccountServiceImpl.h Deploy\modules\Accounts
+copy Accounts\AccountService.h Deploy\modules\Accounts
+copy Accounts\AccountDataServiceImpl.h Deploy\modules\Accounts
+copy Accounts\AccountDataService.h Deploy\modules\Accounts
+copy Accounts\StockQuoteService.h Deploy\modules\Accounts
+copy Accounts\StockQuoteServiceImpl.h Deploy\modules\Accounts
+copy Accounts\StockQuoteExternalService.h Deploy\modules\Accounts
+copy AccountClient\Debug\AccountClient.exe Deploy\modules\Accounts
+copy AccountClient\Debug\AccountClient.pdb Deploy\modules\Accounts
+copy Accounts\sca.module Deploy\modules\Accounts
+copy Accounts\sca.subsystem Deploy\subsystems\Accounts
+copy Accounts\AccountServiceImpl.componentType Deploy\modules\Accounts
+copy Accounts\AccountDataServiceImpl.componentType Deploy\modules\Accounts
+copy Accounts\StockQuoteServiceImpl.componentType Deploy\modules\Accounts
diff --git a/branches/cpp-M1/sca/samples/COPYING b/branches/cpp-M1/sca/samples/COPYING
new file mode 100755
index 0000000000..6b0b1270ff
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/COPYING
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/Calculator.h b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/Calculator.h
new file mode 100644
index 0000000000..6f30e31550
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/Calculator.h
@@ -0,0 +1,31 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef CALCULATOR_H
+#define CALCULATOR_H
+class Calculator
+{
+public:
+ virtual float add(float arg1, float arg2) = 0;
+ virtual float sub(float arg1, float arg2) = 0;
+ virtual float mul(float arg1, float arg2) = 0;
+ virtual float div(float arg1, float arg2) = 0;
+};
+
+#endif
+
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/Calculator.wsdl b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/Calculator.wsdl
new file mode 100644
index 0000000000..6ec2df52bd
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/Calculator.wsdl
@@ -0,0 +1,161 @@
+<?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.
+ -->
+
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="tuscany/c/Calculator"
+ targetNamespace="tuscany/c/Calculator">
+ <types>
+ <xs:schema targetNamespace="tuscany/c/Calculator"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="tuscany/c/Calculator"
+ elementFormDefault="qualified">
+
+ <xs:element name="add">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="param1" type="xs:float" minOccurs="1"/>
+ <xs:element name="param2" type="xs:float" minOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="sub">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="param1" type="xs:float" minOccurs="1"/>
+ <xs:element name="param2" type="xs:float" minOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="mul">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="param1" type="xs:float" minOccurs="1"/>
+ <xs:element name="param2" type="xs:float" minOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="div">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="param1" type="xs:float" minOccurs="1"/>
+ <xs:element name="param2" type="xs:float" minOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+<!-- The data that axis2c math client expects to be returned. -->
+<!-- SDOCPP currently doesn't support this XML. Jira TUSCANY-xxx -->
+<!-- <xs:element name="result"> -->
+<!-- <xs:simpleType> -->
+<!-- <xs:restriction base="xs:float"/> -->
+<!-- </xs:simpleType> -->
+<!-- </xs:element> -->
+ <xs:element name="result">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="data" type="xs:float" minOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ </xs:schema>
+ </types>
+
+ <message name="addRequestMsg">
+ <part name="body" element="tns:add"/>
+ </message>
+ <message name="subRequestMsg">
+ <part name="body" element="tns:sub"/>
+ </message>
+ <message name="mulRequestMsg">
+ <part name="body" element="tns:mul"/>
+ </message>
+ <message name="divRequestMsg">
+ <part name="body" element="tns:div"/>
+ </message>
+
+ <message name="calculatorResponseMsg">
+ <part name="body" element="tns:result"/>
+ </message>
+
+ <portType name="CalculatorServicePortType">
+ <operation name="add">
+ <input message="tns:addRequestMsg"/>
+ <output message="tns:calculatorResponseMsg"/>
+ </operation>
+ <operation name="sub">
+ <input message="tns:subRequestMsg"/>
+ <output message="tns:calculatorResponseMsg"/>
+ </operation>
+ <operation name="mul">
+ <input message="tns:mulRequestMsg"/>
+ <output message="tns:calculatorResponseMsg"/>
+ </operation>
+ <operation name="div">
+ <input message="tns:divRequestMsg"/>
+ <output message="tns:calculatorResponseMsg"/>
+ </operation>
+ </portType>
+
+ <binding name="CalculatorServiceBinding" type="tns:CalculatorServicePortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="add">
+ <soap:operation soapAction="CalculatorService#add"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ <operation name="sub">
+ <soap:operation soapAction="CalculatorService#sub"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ <operation name="mul">
+ <soap:operation soapAction="CalculatorService#nul"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ <operation name="div">
+ <soap:operation soapAction="CalculatorService#div"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="CalculatorService">
+ <port name="CalculatorServicePort" binding="tns:CalculatorServiceBinding">
+ <soap:address location="http://localhost:9090/axis2/services/Calculator"/>
+ </port>
+ </service>
+</definitions>
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl.componentType b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl.componentType
new file mode 100644
index 0000000000..39d6698e02
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl.componentType
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="CalculatorService">
+ <interface.cpp header="Calculator.h"/>
+ </service>
+
+ <reference name="CalculatorDivideService">
+ <interface.cpp header="DivideService.h"/>
+ </reference>
+
+
+</componentType> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl.cpp b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl.cpp
new file mode 100644
index 0000000000..746a1db689
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl.cpp
@@ -0,0 +1,85 @@
+/*
+ *
+ * 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 "CalculatorImpl.h"
+#include <stdio.h>
+
+#include "DivideService.h"
+#include "osoa/sca/ComponentContext.h"
+#include "osoa/sca/ServiceRuntimeException.h"
+
+CalculatorImpl::CalculatorImpl()
+{
+}
+
+CalculatorImpl::~CalculatorImpl()
+{
+}
+
+// Calculator interface
+float CalculatorImpl::add(float arg1, float arg2)
+{
+ float result = arg1 + arg2;
+
+ printf("CalculatorImpl::add %f + %f = %f\n", arg1, arg2, result);
+ return result;
+}
+
+float CalculatorImpl::sub(float arg1, float arg2)
+{
+ float result = arg1 - arg2;
+ printf("CalculatorImpl::sub %f - %f = %f\n", arg1, arg2, result);
+ return result;
+}
+
+float CalculatorImpl::mul(float arg1, float arg2)
+{
+ float result = arg1 * arg2;
+ printf("CalculatorImpl::mul %f * %f = %f\n", arg1, arg2, result);
+ return result;
+}
+
+float CalculatorImpl::div(float arg1, float arg2)
+{
+ float result = 0;
+
+ // This method shows how to invoke a service on a different component from within a component
+
+ // First, get the current ComponentContext
+ osoa::sca::ComponentContext myContext = osoa::sca::ComponentContext::getCurrent();
+
+ try
+ {
+ // Find the required service, as referenced in CalculatorImpl.componentType
+ DivideService* divideService = (DivideService*)myContext.getService("CalculatorDivideService");
+
+ // Finally, invoke the service
+ result = divideService->divide(arg1, arg2);
+
+ printf("CalculatorImpl::div DivideService returned result: %f\n", result);
+
+ }
+ catch (osoa::sca::ServiceRuntimeException& e)
+ {
+ // Print out error message and carry on
+ printf("CalculatorImpl::div Error whilst invoking DivideService: %s", e.getMessageText());
+ }
+
+ return result;
+}
+
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl.h b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl.h
new file mode 100644
index 0000000000..2e4b6aa4dc
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl.h
@@ -0,0 +1,37 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef CALCULATORIMPL_H
+#define CALCULATORIMPL_H
+
+#include "Calculator.h"
+
+class CalculatorImpl : public Calculator
+{
+public:
+ CalculatorImpl();
+ virtual ~CalculatorImpl();
+
+ // Calculator interface
+ virtual float add(float arg1, float arg2);
+ virtual float sub(float arg1, float arg2);
+ virtual float mul(float arg1, float arg2);
+ virtual float div(float arg1, float arg2);
+};
+
+#endif
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorDivideService_Proxy.cpp b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorDivideService_Proxy.cpp
new file mode 100644
index 0000000000..0ff0891406
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorDivideService_Proxy.cpp
@@ -0,0 +1,64 @@
+/*
+ * 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 "CalculatorImpl_CalculatorDivideService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CalculatorImpl_CalculatorDivideService_Proxy* CalculatorImpl_CalculatorDivideService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new CalculatorImpl_CalculatorDivideService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void CalculatorImpl_CalculatorDivideService_Proxy_Destructor(void* proxy)
+ {
+ delete (CalculatorImpl_CalculatorDivideService_Proxy*)proxy;
+ }
+}
+
+CalculatorImpl_CalculatorDivideService_Proxy::CalculatorImpl_CalculatorDivideService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+CalculatorImpl_CalculatorDivideService_Proxy::~CalculatorImpl_CalculatorDivideService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+float CalculatorImpl_CalculatorDivideService_Proxy::divide( float arg0, float arg1)
+{
+ Operation operation("divide");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorDivideService_Proxy.h b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorDivideService_Proxy.h
new file mode 100644
index 0000000000..3312005d32
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorDivideService_Proxy.h
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef CalculatorImpl_CalculatorDivideService_Proxy_h
+#define CalculatorImpl_CalculatorDivideService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "DivideService.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class CalculatorImpl_CalculatorDivideService_Proxy : public DivideService
+{
+public:
+ CalculatorImpl_CalculatorDivideService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~CalculatorImpl_CalculatorDivideService_Proxy();
+ virtual float divide( float arg1, float arg2);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // CalculatorImpl_CalculatorDivideService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Proxy.cpp b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Proxy.cpp
new file mode 100644
index 0000000000..c601ebcdc2
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Proxy.cpp
@@ -0,0 +1,97 @@
+/*
+ * 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 "CalculatorImpl_CalculatorService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CalculatorImpl_CalculatorService_Proxy* CalculatorImpl_CalculatorService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new CalculatorImpl_CalculatorService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void CalculatorImpl_CalculatorService_Proxy_Destructor(void* proxy)
+ {
+ delete (CalculatorImpl_CalculatorService_Proxy*)proxy;
+ }
+}
+
+CalculatorImpl_CalculatorService_Proxy::CalculatorImpl_CalculatorService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+CalculatorImpl_CalculatorService_Proxy::~CalculatorImpl_CalculatorService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+float CalculatorImpl_CalculatorService_Proxy::add( float arg0, float arg1)
+{
+ Operation operation("add");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+float CalculatorImpl_CalculatorService_Proxy::sub( float arg0, float arg1)
+{
+ Operation operation("sub");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+float CalculatorImpl_CalculatorService_Proxy::mul( float arg0, float arg1)
+{
+ Operation operation("mul");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+float CalculatorImpl_CalculatorService_Proxy::div( float arg0, float arg1)
+{
+ Operation operation("div");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Proxy.h b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Proxy.h
new file mode 100644
index 0000000000..d3de5a79c6
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Proxy.h
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+#ifndef CalculatorImpl_CalculatorService_Proxy_h
+#define CalculatorImpl_CalculatorService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "Calculator.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class CalculatorImpl_CalculatorService_Proxy : public Calculator
+{
+public:
+ CalculatorImpl_CalculatorService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~CalculatorImpl_CalculatorService_Proxy();
+ virtual float add( float arg1, float arg2);
+ virtual float sub( float arg1, float arg2);
+ virtual float mul( float arg1, float arg2);
+ virtual float div( float arg1, float arg2);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // CalculatorImpl_CalculatorService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Wrapper.cpp b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Wrapper.cpp
new file mode 100644
index 0000000000..97805d0e4b
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Wrapper.cpp
@@ -0,0 +1,94 @@
+/*
+ * 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 "CalculatorImpl_CalculatorService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CalculatorImpl_CalculatorService_Wrapper* CalculatorImpl_CalculatorService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new CalculatorImpl_CalculatorService_Wrapper(target);
+ }
+}
+
+CalculatorImpl_CalculatorService_Wrapper::CalculatorImpl_CalculatorService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (CalculatorImpl*)getImplementation();
+}
+
+CalculatorImpl_CalculatorService_Wrapper::~CalculatorImpl_CalculatorService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* CalculatorImpl_CalculatorService_Wrapper::newImplementation()
+{
+ return new CalculatorImpl;
+}
+
+void CalculatorImpl_CalculatorService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void CalculatorImpl_CalculatorService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "add")
+ {
+ float& p0 = *( float*)operation.getParameterValue(0);
+ float& p1 = *( float*)operation.getParameterValue(1);
+ *(float*)operation.getReturnValue() = impl->add(p0, p1);
+ return;
+ }
+ if (operationName == "sub")
+ {
+ float& p0 = *( float*)operation.getParameterValue(0);
+ float& p1 = *( float*)operation.getParameterValue(1);
+ *(float*)operation.getReturnValue() = impl->sub(p0, p1);
+ return;
+ }
+ if (operationName == "mul")
+ {
+ float& p0 = *( float*)operation.getParameterValue(0);
+ float& p1 = *( float*)operation.getParameterValue(1);
+ *(float*)operation.getReturnValue() = impl->mul(p0, p1);
+ return;
+ }
+ if (operationName == "div")
+ {
+ float& p0 = *( float*)operation.getParameterValue(0);
+ float& p1 = *( float*)operation.getParameterValue(1);
+ *(float*)operation.getReturnValue() = impl->div(p0, p1);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Wrapper.h b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Wrapper.h
new file mode 100644
index 0000000000..c881576ca2
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/CalculatorImpl_CalculatorService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef CalculatorImpl_CalculatorService_Wrapper_h
+#define CalculatorImpl_CalculatorService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "CalculatorImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class CalculatorImpl_CalculatorService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ CalculatorImpl_CalculatorService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~CalculatorImpl_CalculatorService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ CalculatorImpl* impl;
+};
+
+#endif // CalculatorImpl_CalculatorService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideService.h b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideService.h
new file mode 100644
index 0000000000..f6033c9020
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideService.h
@@ -0,0 +1,29 @@
+/*
+ *
+ * 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.
+ */
+
+
+#ifndef DIVIDESERVICE_H
+#define DIVIDESERVICE_H
+class DivideService
+{
+public:
+ virtual float divide(float arg1, float arg2) = 0;
+};
+
+#endif
+
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.componentType b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.componentType
new file mode 100644
index 0000000000..bda8aed044
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.componentType
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ASCII"?>
+<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="DivideService">
+ <interface.cpp header="DivideService.h">
+ </interface.cpp>
+ </service>
+
+</componentType>
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.cpp b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.cpp
new file mode 100644
index 0000000000..4797498103
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.cpp
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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 "DivideServiceImpl.h"
+#include <stdio.h>
+
+DivideServiceImpl::DivideServiceImpl()
+{
+}
+
+DivideServiceImpl::~DivideServiceImpl()
+{
+}
+
+// DivideService interface
+float DivideServiceImpl::divide(float arg1, float arg2)
+{
+ if(arg2 == 0.0)
+ {
+ printf("DivideServiceImpl::div %f / %f !! Cannot divide by zero, so returning 0\n", arg1, arg2);
+ return 0;
+ }
+
+ float result = arg1 / arg2;
+ printf("DivideServiceImpl::div %f / %f = %f\n", arg1, arg2, result);
+ return result;
+}
+
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.h b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.h
new file mode 100644
index 0000000000..00216b53b3
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl.h
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef DIVIDESERVICEIMPL_H
+#define DIVIDESERVICEIMPL_H
+
+#include "DivideService.h"
+
+class DivideServiceImpl : public DivideService
+{
+public:
+ DivideServiceImpl();
+ virtual ~DivideServiceImpl();
+
+ // DivideService interface
+ virtual float divide(float arg1, float arg2);
+};
+
+#endif
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Proxy.cpp b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Proxy.cpp
new file mode 100644
index 0000000000..945f407327
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Proxy.cpp
@@ -0,0 +1,64 @@
+/*
+ * 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 "DivideServiceImpl_DivideService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ DivideServiceImpl_DivideService_Proxy* DivideServiceImpl_DivideService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new DivideServiceImpl_DivideService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void DivideServiceImpl_DivideService_Proxy_Destructor(void* proxy)
+ {
+ delete (DivideServiceImpl_DivideService_Proxy*)proxy;
+ }
+}
+
+DivideServiceImpl_DivideService_Proxy::DivideServiceImpl_DivideService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+DivideServiceImpl_DivideService_Proxy::~DivideServiceImpl_DivideService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+float DivideServiceImpl_DivideService_Proxy::divide( float arg0, float arg1)
+{
+ Operation operation("divide");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Proxy.h b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Proxy.h
new file mode 100644
index 0000000000..957ad43168
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Proxy.h
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef DivideServiceImpl_DivideService_Proxy_h
+#define DivideServiceImpl_DivideService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "DivideService.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class DivideServiceImpl_DivideService_Proxy : public DivideService
+{
+public:
+ DivideServiceImpl_DivideService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~DivideServiceImpl_DivideService_Proxy();
+ virtual float divide( float arg1, float arg2);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // DivideServiceImpl_DivideService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Wrapper.cpp b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Wrapper.cpp
new file mode 100644
index 0000000000..4257caa46c
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Wrapper.cpp
@@ -0,0 +1,73 @@
+/*
+ * 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 "DivideServiceImpl_DivideService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ DivideServiceImpl_DivideService_Wrapper* DivideServiceImpl_DivideService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new DivideServiceImpl_DivideService_Wrapper(target);
+ }
+}
+
+DivideServiceImpl_DivideService_Wrapper::DivideServiceImpl_DivideService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (DivideServiceImpl*)getImplementation();
+}
+
+DivideServiceImpl_DivideService_Wrapper::~DivideServiceImpl_DivideService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* DivideServiceImpl_DivideService_Wrapper::newImplementation()
+{
+ return new DivideServiceImpl;
+}
+
+void DivideServiceImpl_DivideService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void DivideServiceImpl_DivideService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "divide")
+ {
+ float& p0 = *( float*)operation.getParameterValue(0);
+ float& p1 = *( float*)operation.getParameterValue(1);
+ *(float*)operation.getReturnValue() = impl->divide(p0, p1);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Wrapper.h b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Wrapper.h
new file mode 100644
index 0000000000..9be9796ee2
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/DivideServiceImpl_DivideService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef DivideServiceImpl_DivideService_Wrapper_h
+#define DivideServiceImpl_DivideService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "DivideServiceImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class DivideServiceImpl_DivideService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ DivideServiceImpl_DivideService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~DivideServiceImpl_DivideService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ DivideServiceImpl* impl;
+};
+
+#endif // DivideServiceImpl_DivideService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/Makefile.am b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/Makefile.am
new file mode 100644
index 0000000000..aff769b36a
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/Makefile.am
@@ -0,0 +1,35 @@
+deploydir=$(prefix)/samples/Calculator/deploy
+moduledir=$(deploydir)/modules/CalculatorModule
+
+BUILT_SOURCES = CalculatorImpl_CalculatorService_Proxy.cpp \
+CalculatorImpl_CalculatorService_Wrapper.cpp \
+CalculatorImpl_CalculatorDivideService_Proxy.cpp \
+DivideServiceImpl_DivideService_Proxy.cpp \
+DivideServiceImpl_DivideService_Wrapper.cpp
+
+noinst_HEADERS = *.h
+
+CalculatorImpl_CalculatorService_Proxy.cpp:
+ java -jar $(TUSCANY_SCACPP)/bin/scagen.jar -dir . -output .
+
+module_LTLIBRARIES = libCalculatorModule.la
+module_DATA = sca.module.lin Tuscany-model.config *.componentType *.wsdl services.xml
+EXTRA_DIST = sca.module.lin Tuscany-model.config *.componentType *.wsdl services.xml
+
+libCalculatorModule_la_SOURCES = \
+CalculatorImpl.cpp \
+CalculatorImpl_CalculatorService_Proxy.cpp \
+CalculatorImpl_CalculatorService_Wrapper.cpp \
+CalculatorImpl_CalculatorDivideService_Proxy.cpp \
+DivideServiceImpl.cpp \
+DivideServiceImpl_DivideService_Proxy.cpp \
+DivideServiceImpl_DivideService_Wrapper.cpp
+
+libCalculatorModule_la_LIBADD = -L${TUSCANY_SCACPP}/lib -ltuscany_sca
+
+INCLUDES = \
+ -I$(TUSCANY_SCACPP)/include \
+ -I${TUSCANY_SDOCPP}/include
+
+install-data-hook:
+ mv $(moduledir)/sca.module.lin $(moduledir)/sca.module \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/Tuscany-model.config b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/Tuscany-model.config
new file mode 100644
index 0000000000..b8f96a01a1
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/Tuscany-model.config
@@ -0,0 +1,23 @@
+<?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.
+ -->
+
+<tuscany-model xmlns="http://org.apache.tuscany/xmlns/cpp/1.0">
+ <wsdl>
+ <file name="Calculator.wsdl"/>
+ </wsdl>
+ <xsd/>
+</tuscany-model>
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/sca.module b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/sca.module
new file mode 100644
index 0000000000..e07fbeb9e2
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/sca.module
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:cs="tuscany/c/Calculator/"
+ name="CalculatorModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="WSCalculatorEntrypoint" multiplicity="1..1">
+ <interface.wsdl interface="Calculator.wsdl" callbackInterface=""></interface.wsdl>
+ <binding.ws port="tuscany/c/Calculator#wsdl.endpoint(CalculatorService/CalculatorServicePort)"></binding.ws>
+ <reference>CalculatorServiceComponent</reference>
+ </entryPoint>
+
+
+ <component name="CalculatorServiceComponent">
+ <implementation.cpp dll="Calculator.dll" header="CalculatorImpl.h"></implementation.cpp>
+ <properties> </properties>
+ <references>
+ <v:CalculatorDivideService>DivideServiceComponent/DivideService</v:CalculatorDivideService>
+ </references>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.cpp dll="Calculator.dll" header="DivideServiceImpl.h"></implementation.cpp>
+ <properties> </properties>
+ <references> </references>
+ </component>
+
+
+
+</module> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/sca.module.lin b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/sca.module.lin
new file mode 100644
index 0000000000..4bd96ac774
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/sca.module.lin
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ name="CalculatorModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="WSCalculatorEntrypoint" multiplicity="1..1">
+ <interface.wsdl interface="Calculator.wsdl" callbackInterface=""></interface.wsdl>
+ <binding.ws port="tuscany/c/Calculator#wsdl.endpoint(CalculatorService/CalculatorServicePort)"></binding.ws>
+ <reference>CalculatorServiceComponent</reference>
+ </entryPoint>
+
+ <component name="CalculatorServiceComponent">
+ <implementation.cpp dll="libCalculatorModule.so" header="CalculatorImpl.h"></implementation.cpp>
+ <properties> </properties>
+ <references>
+ <v:CalculatorDivideService>DivideServiceComponent/DivideService</v:CalculatorDivideService>
+ </references>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.cpp dll="libCalculatorModule.so" header="DivideServiceImpl.h"></implementation.cpp>
+ <properties> </properties>
+ <references> </references>
+ </component>
+</module> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/services.xml b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/services.xml
new file mode 100644
index 0000000000..b5f234e988
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorModule/services.xml
@@ -0,0 +1,42 @@
+
+<!--
+ 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.
+ -->
+<service name="Calculator">
+ <parameter name="ServiceClass" locked="xsd:false">tuscany_sca_ws_service</parameter>
+ <parameter name="TuscanySystemRoot" locked="xsd:false">PATH-TO-THE-SYSTEM-ROOT</parameter>
+ <parameter name="TuscanyEntryPoint" locked="xsd:false">CalculatorSubsystem/CalculatorService/WSCalculatorEntrypoint</parameter>
+
+ <description>
+ This is a testing service, named 'Calculator' to test multiple operations in the same service
+ </description>
+
+ <operation name="add">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+
+ <operation name="sub">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+
+ <operation name="mul">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+
+ <operation name="div">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+
+</service>
diff --git a/branches/cpp-M1/sca/samples/Calculator/CalculatorSubsystem/sca.subsystem b/branches/cpp-M1/sca/samples/Calculator/CalculatorSubsystem/sca.subsystem
new file mode 100644
index 0000000000..4b9fdd1511
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/CalculatorSubsystem/sca.subsystem
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<subsystem xmlns="http://www.osoa.org/xmlns/sca/0.9" name="CalculatorSubsystem">
+
+ <moduleComponent name="CalculatorService" module="CalculatorModule" />
+
+</subsystem>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/Calculator/Client/Calc.cpp b/branches/cpp-M1/sca/samples/Calculator/Client/Calc.cpp
new file mode 100644
index 0000000000..124cf96c63
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/Client/Calc.cpp
@@ -0,0 +1,172 @@
+/*
+ *
+ * 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 "Calculator.h"
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace std;
+#include "tuscany/sca/core/TuscanyRuntime.h"
+using namespace tuscany::sca;
+
+#include <iostream>
+#include <stdlib.h>
+using namespace std;
+
+
+void usage();
+bool IsNumber(const char *p);
+
+int main(int argc, char* argv[])
+{
+ const char *operation;
+ float arg1 = 0;
+ float arg2 = 0;
+
+ if (argc == 4)
+ {
+ operation = argv[1];
+
+ if (!IsNumber(argv[2]))
+ {
+ cout << "Calc.exe: Argument 1 is not a number" << endl;
+ usage();
+ }
+ else
+ {
+ arg1 = atof(argv[2]);
+ }
+
+ if (!IsNumber(argv[3]))
+ {
+ cout << "Calc.exe: Argument 2 is not a number" << endl;
+ usage();
+ }
+ else
+ {
+ arg2 = atof(argv[3]);
+ }
+ }
+ else
+ {
+ usage();
+ }
+
+ try
+ {
+ // Set the default module environment variable: <subsystem>/<moduleName>
+ string systemRoot = getenv("TUSCANY_SCACPP");
+ if (systemRoot == "")
+ {
+ cout << "TUSCANY_SCACPP environment variable not set" <<endl;
+ return -1;
+ }
+ systemRoot += "/../samples/Calculator/deploy";
+
+ char *defaultModule = "CalculatorSubsystem/CalculatorService";
+
+// TuscanyRuntime rt;
+// rt.setSystemRoot(systemRoot);
+// rt.setDefaultModuleComponent(defaultModule);
+// rt.start();
+
+ // Locate a service
+ ModuleContext myContext = ModuleContext::getCurrent();
+ Calculator *calcService = (Calculator*) myContext.locateService("CalculatorServiceComponent");
+ if (calcService == 0)
+ {
+ cout << "Calc.exe: Unable to find Calculator service" << endl;
+ }
+ else
+ {
+ try
+ {
+ float result = 0;
+ if (strcmp(operation, "add") == 0)
+ {
+ result = calcService->add(arg1, arg2);
+ cout << "Calculator: add(" << arg1 << "," << arg2 << ") = " << result << endl;
+ }
+ else
+ if (strcmp(operation, "sub") == 0)
+ {
+ result = calcService->sub(arg1, arg2);
+ cout << "Calculator: sub(" << arg1 << "," << arg2 << ") = " << result << endl;
+ }
+ else
+ if (strcmp(operation, "mul") == 0)
+ {
+ result = calcService->mul(arg1, arg2);
+ cout << "Calculator: mul(" << arg1 << "," << arg2 << ") = " << result << endl;
+ }
+ else
+ if (strcmp(operation, "div") == 0)
+ {
+ result = calcService->div(arg1, arg2);
+ cout << "Calculator: div(" << arg1 << "," << arg2 << ") = " << result << endl;
+ }
+ else
+ {
+ cout << "Calculator: Unrecognized operation: " << operation << endl;
+ }
+ }
+ catch (char* x)
+ {
+ cout << "Calc.exe: exception caught: " << x << endl;
+ }
+ }
+
+ }
+ catch (ServiceRuntimeException& ex)
+ {
+ cout << ex << endl;
+ }
+ return 0;
+}
+
+void usage()
+{
+ cout << "Usage: calc add|sub|mul|div arg1 arg2" << endl;
+ exit(1);
+}
+
+bool IsNumber (const char *p)
+{
+ int len = strlen(p);
+ int pointcount = 0;
+
+ if (!isdigit (p[0]) && p[0] != '-' && p[0] != '+')
+ {
+ return false;
+ }
+ for (int i = 1; i < len; i++)
+ {
+ if (!isdigit (p[i]))
+ {
+ if (p[i] == '.')
+ {
+ if (pointcount > 0) return false;
+ pointcount++;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ }
+ return true;
+}
diff --git a/branches/cpp-M1/sca/samples/Calculator/Client/Calculator.h b/branches/cpp-M1/sca/samples/Calculator/Client/Calculator.h
new file mode 100644
index 0000000000..57975548c1
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/Client/Calculator.h
@@ -0,0 +1,32 @@
+/*
+ *
+ * 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.
+ */
+
+
+#ifndef CALCULATOR_H
+#define CALCULATOR_H
+class Calculator
+{
+public:
+ virtual float add(float arg1, float arg2) = 0;
+ virtual float sub(float arg1, float arg2) = 0;
+ virtual float mul(float arg1, float arg2) = 0;
+ virtual float div(float arg1, float arg2) = 0;
+};
+
+#endif
+
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/Client/Makefile.am b/branches/cpp-M1/sca/samples/Calculator/Client/Makefile.am
new file mode 100644
index 0000000000..75052b5bc0
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/Client/Makefile.am
@@ -0,0 +1,27 @@
+deploydir=$(prefix)/samples/Calculator/deploy
+prgbindir=$(deploydir)/bin
+
+prgbin_PROGRAMS = calculator_client
+prgbin_SCRIPTS = runclient.sh
+EXTRA_DIST = runclient.sh
+
+AM_CPPFLAGS = $(CPPFLAGS)
+calculator_client_SOURCES = Calc.cpp
+
+calculator_client_LDADD = -L${TUSCANY_SCACPP}/lib -ltuscany_sca -ltuscany_sca_ws_reference \
+ -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo -ltuscany_sdo_axiom \
+ -L$(AXIS2C_HOME)/lib \
+ -laxis2_util \
+ -laxis2_axiom \
+ -laxis2_wsdl \
+ -laxis2_engine \
+ -laxis2_parser \
+ -laxis2_minizip \
+ -lpthread \
+ -laxis2_http_sender \
+ -laxis2_http_receiver
+
+
+INCLUDES = -I$(top_builddir)/Calculator/CalculatorModule \
+ -I${TUSCANY_SCACPP}/include \
+ -I${TUSCANY_SDOCPP}/include
diff --git a/branches/cpp-M1/sca/samples/Calculator/Client/readme.txt b/branches/cpp-M1/sca/samples/Calculator/Client/readme.txt
new file mode 100644
index 0000000000..62672483af
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/Client/readme.txt
@@ -0,0 +1,64 @@
+Tuscany SCA for C++ Samples - Calculator Sample
+===============================================
+
+This is a very simple sample to show how an SCA module with a single component
+can be built and called from an executable.
+
+There are three sub projects in this workspace:
+ - CalculatorModule
+ This contains the source code and SCA artifacts for the SCA module. This
+ is the module that will be deployed into the SCA runtime.
+ - CalculatorSubsystem
+ This contains the sca.subsystem file which describes a subsystem to the
+ SCA runtime.
+ - Client
+ An example client which will call the service exposed by the single component
+ in the CalculatorModule.
+
+
+Build instructions
+------------------
+
+Notes:
+
+The projects are set up to locate SCA and SDO libraries using the environment variables
+TUSCANY_SCACPP and TUSCANY_SDOCPP. These must be set before building.
+
+scagan is a code generation tool written in java. This will need to be built before you
+can run it. To build scagen, you must go to the tools/scagen directory, and type "ant".
+(You must have apache ant installed, and have a valid java virtual machine installed -
+upwards of version 1.4.2). Once scagen has successfully built, it can be run from the
+sca/bin directory.
+
+1) Build the SCA module.
+ - Set CalculatorModule project as the active project.
+ Right click->Set as active project
+
+ - Run the SCA generation tool to create the proxy and wrapper classes.
+ Either Tools->SCA Gen if you have added SCA Gen as an external tool
+ Or run from the command line:
+ scagen -dir <projectDirectory> -output <projectDirectory>
+ where the projectDirectory is the directory with the sca.module file.
+
+ - Rebuild All
+ Build->Rebuild All
+
+2) Package and deploy the SCA module
+ - There is a script file in the sca/samples/Calculator directory which will
+ copy across all the files needed for deployment to the Tuscany runtime.
+ On a command line run pack_deploy.cmd
+ As a default, the sample will be copied to sca/samples/runtime directory
+ Both the SCA module and the subsystem will be copied.
+
+3) Build the client
+ - Set the Client project as the active project.
+ Right click->Set as active project
+
+ - Rebuild All
+ Build->Rebuild All
+
+4) Run the client
+ - Use the command file in the sca/samples/Calculator/Client directory to run the
+ client. This command file will set the SCA environment variables before running
+ the client. For example,
+ runclient add 4 9
diff --git a/branches/cpp-M1/sca/samples/Calculator/Client/runclient.cmd b/branches/cpp-M1/sca/samples/Calculator/Client/runclient.cmd
new file mode 100644
index 0000000000..1758d12ef5
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/Client/runclient.cmd
@@ -0,0 +1,51 @@
+@echo off
+
+
+@REM Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM 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, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+rem Runs the client after setting the SCA environment variables to use the
+rem CalculatorSubsystem
+setlocal
+
+if "%AXIS2C_HOME%" == "" (
+echo "AXIS2C_HOME not set"
+goto end
+)
+echo using Axis2C: %AXIS2C_HOME%
+
+if "%TUSCANY_SDOCPP%" == "" (
+echo "TUSCANY_SDOCPP not set"
+goto end
+)
+echo using TUSCANY_SDOCPP: %TUSCANY_SDOCPP%
+
+if "%TUSCANY_SCACPP%" == "" (
+echo "TUSCANY_SCACPP not set"
+goto end
+)
+echo using TUSCANY_SCACPP: %TUSCANY_SCACPP%
+
+set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\
+
+rem Only need to specify the subsystem (and not the moduleComponent as well) because
+rem there is only one moduleComponent in the subsystem - it is a very simple sample.
+set TUSCANY_SCACPP_DEFAULT_MODULE=CalculatorSubsystem
+
+rem Run the client
+
+set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH%
+Client.exe %*
+:end
+endlocal
diff --git a/branches/cpp-M1/sca/samples/Calculator/Client/runclient.sh b/branches/cpp-M1/sca/samples/Calculator/Client/runclient.sh
new file mode 100755
index 0000000000..4dfea2f4a8
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/Client/runclient.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# 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.
+
+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/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH
+
+export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM
+export TUSCANY_SCACPP_DEFAULT_MODULE=CalculatorSubsystem
+
+./calculator_client add 4.7 9
+./calculator_client div 7.2 3.6
+./calculator_client mul 7 6
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/Makefile.am b/branches/cpp-M1/sca/samples/Calculator/Makefile.am
new file mode 100644
index 0000000000..cbeaeb0f96
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/Makefile.am
@@ -0,0 +1,4 @@
+deploydir=$(prefix)/samples/Calculator/deploy/subsystems/CalculatorSubsystem
+SUBDIRS = CalculatorModule Client WSClient
+EXTRA_DIST = CalculatorSubsystem
+deploy_DATA = CalculatorSubsystem/sca.subsystem \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/Calculator/WSClient/Calculator_Client.cpp b/branches/cpp-M1/sca/samples/Calculator/WSClient/Calculator_Client.cpp
new file mode 100644
index 0000000000..5d6cd9e1bb
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/WSClient/Calculator_Client.cpp
@@ -0,0 +1,181 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * 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 "axis2_Calculator_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,
+ const axis2_char_t *param2);
+
+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 = "add";
+ const axis2_char_t *param1 = "40";
+ const axis2_char_t *param2 = "8";
+
+ env = axis2_env_create_all( "Calculator_blocking.log", AXIS2_LOG_LEVEL_TRACE);
+
+ client_home = AXIS2_GETENV("AXIS2C_HOME");
+ if (!client_home)
+ client_home = "../../deploy";
+
+ address = "http://localhost:9090/axis2/services/Calculator";
+ if (argc > 1 )
+ operation = argv[1];
+ if (AXIS2_STRCMP(operation, "-h") == 0)
+ {
+ printf("Usage : %s [operation] [param1] [param2] [endpoint_url]\n", argv[0]);
+ printf("use -h for help\n");
+ printf("default operation add\n");
+ printf("default param1 %s\n", param1);
+ printf("default param2 %s\n", param2);
+ 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 )
+ param2 = argv[3];
+ if (argc > 4 )
+ address = argv[4];
+
+ printf ("Using endpoint : %s\n", address);
+ printf ("\nInvoking operation %s with params %s and %s\n", operation, param1, param2);
+
+ node = build_om_programatically(env, operation, param1, param2);
+ stub =
+ axis2_Calculator_stub_create_with_endpoint_uri_and_client_home(env, address, client_home);
+ /* create node and invoke Calculator */
+ ret_node = axis2_Calculator_stub_add(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("Calculator 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,
+ const axis2_char_t *param2)
+{
+ axiom_node_t *Calculator_om_node = NULL;
+ axiom_element_t* Calculator_om_ele = NULL;
+ axiom_node_t* text_om_node = NULL;
+ axiom_element_t * text_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, "tuscany/c/Calculator", "ns1");
+
+ Calculator_om_ele = axiom_element_create(env, NULL, operation, ns1, &Calculator_om_node);
+
+ text_om_ele = axiom_element_create(env, Calculator_om_node, "param1", NULL, &text_om_node);
+ AXIOM_ELEMENT_SET_TEXT(text_om_ele, env, param1, text_om_node);
+
+ text_om_ele = axiom_element_create(env, Calculator_om_node, "param2", NULL, &text_om_node);
+ AXIOM_ELEMENT_SET_TEXT(text_om_ele, env, param2, 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(Calculator_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 Calculator_om_node;
+}
diff --git a/branches/cpp-M1/sca/samples/Calculator/WSClient/Makefile.am b/branches/cpp-M1/sca/samples/Calculator/WSClient/Makefile.am
new file mode 100644
index 0000000000..706c0927b5
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/WSClient/Makefile.am
@@ -0,0 +1,24 @@
+deploydir=$(prefix)/samples/Calculator/deploy
+prgbindir=$(deploydir)/bin
+
+prgbin_PROGRAMS = calculator_wsclient
+prgbin_SCRIPTS = runwsclient.sh
+EXTRA_DIST = runwsclient.sh
+
+AM_CPPFLAGS = $(CPPFLAGS)
+calculator_wsclient_SOURCES = axis2_Calculator_stub.cpp Calculator_Client.cpp
+noinst_HEADERS = *.h
+
+calculator_wsclient_LDADD = -L$(AXIS2C_HOME)/lib \
+ -laxis2_util \
+ -laxis2_axiom \
+ -laxis2_wsdl \
+ -laxis2_engine \
+ -laxis2_parser \
+ -laxis2_minizip \
+ -lpthread \
+ -laxis2_http_sender \
+ -laxis2_http_receiver
+
+
+INCLUDES = -I${AXIS2C_HOME}/include
diff --git a/branches/cpp-M1/sca/samples/Calculator/WSClient/axis2_Calculator_stub.cpp b/branches/cpp-M1/sca/samples/Calculator/WSClient/axis2_Calculator_stub.cpp
new file mode 100644
index 0000000000..8455c0d209
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/WSClient/axis2_Calculator_stub.cpp
@@ -0,0 +1,173 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * 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 "axis2_Calculator_stub.h"
+
+
+axis2_stub_t *
+axis2_Calculator_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,"add" , "", 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);
+
+ op_qname = axis2_qname_create(env,"sub" , "", 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);
+
+ op_qname = axis2_qname_create(env,"mul" , "", 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);
+
+ op_qname = axis2_qname_create(env,"div" , "", 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_Calculator_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_Calculator_stub_add(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, "add" , "", NULL);
+ ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME( svc_client, env, op_qname, node);
+
+ return ret_node;
+}
+
+axiom_node_t *
+axis2_Calculator_stub_sub(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, "sub" , "", NULL);
+ ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME( svc_client, env, op_qname, node);
+
+ return ret_node;
+}
+
+axiom_node_t *
+axis2_Calculator_stub_mul(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, "mul" , "", NULL);
+ ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME( svc_client, env, op_qname, node);
+
+ return ret_node;
+}
+
+axiom_node_t *
+axis2_Calculator_stub_div(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, "div" , "", NULL);
+ ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME( svc_client, env, op_qname, node);
+
+ return ret_node;
+}
+
diff --git a/branches/cpp-M1/sca/samples/Calculator/WSClient/axis2_Calculator_stub.h b/branches/cpp-M1/sca/samples/Calculator/WSClient/axis2_Calculator_stub.h
new file mode 100644
index 0000000000..54cce17562
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/WSClient/axis2_Calculator_stub.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * 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.
+ */
+
+#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_Calculator_stub_add(axis2_stub_t *stub,
+ const axis2_env_t *env,
+ axiom_node_t *node);
+
+axiom_node_t *
+axis2_Calculator_stub_sub(axis2_stub_t *stub,
+ const axis2_env_t *env,
+ axiom_node_t *node);
+
+axiom_node_t *
+axis2_Calculator_stub_mul(axis2_stub_t *stub,
+ const axis2_env_t *env,
+ axiom_node_t *node);
+
+axiom_node_t *
+axis2_Calculator_stub_div(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_Calculator_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_Calculator_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/branches/cpp-M1/sca/samples/Calculator/WSClient/runwsclient.cmd b/branches/cpp-M1/sca/samples/Calculator/WSClient/runwsclient.cmd
new file mode 100644
index 0000000000..ba387a4bab
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/WSClient/runwsclient.cmd
@@ -0,0 +1,28 @@
+@echo off
+
+@REM Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM 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, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+setlocal
+
+if "%AXIS2C_HOME%" == "" (
+echo "AXIS2C_HOME not set"
+goto end
+)
+echo using Axis2C: %AXIS2C_HOME%"
+
+rem Run the client
+WSClient.exe %*
+:end
+endlocal
diff --git a/branches/cpp-M1/sca/samples/Calculator/WSClient/runwsclient.sh b/branches/cpp-M1/sca/samples/Calculator/WSClient/runwsclient.sh
new file mode 100755
index 0000000000..2e8e79fc9c
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Calculator/WSClient/runwsclient.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# 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.
+
+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
+
+./calculator_wsclient add 4.7 9
+./calculator_wsclient div 7.2 3.6
+./calculator_wsclient mul 7 6
+
diff --git a/branches/cpp-M1/sca/samples/ChangeLog b/branches/cpp-M1/sca/samples/ChangeLog
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ChangeLog
diff --git a/branches/cpp-M1/sca/samples/GettingStarted.html b/branches/cpp-M1/sca/samples/GettingStarted.html
new file mode 100644
index 0000000000..604de50ff9
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/GettingStarted.html
@@ -0,0 +1,261 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<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 C++ Samples - Getting Started</TITLE>
+</HEAD>
+
+<BODY>
+<DIV ID="bodyColumn">
+ <DIV ID="contentBox">
+ <DIV CLASS="section">
+ <H2>Tuscany Samples - Getting Started - SCA C++ Milestone release 1</H2>
+
+ <P>Tuscany SCA C++ includes a simple technology sample that demonstrates some of the functionality of
+ the Tuscany SCA C++ runtime. This page describes what is needed to install and run the sample.
+ </P>
+ </DIV>
+
+ <DIV CLASS="section">
+ <H2>Contents</H2>
+ <OL>
+ <LI><A HREF="#linuxbld">Building the samples on Linux</A></LI>
+ <LI><A HREF="#linuxrun">Running the samples on Linux:</A></LI>
+ <UL>
+ <LI><A HREF="#linuxcalcbasic">Calculator with basic client</A></LI>
+ <LI><A HREF="#linuxcalcws">Calculator with Web Service client</A></LI>
+ </UL>
+ <LI><A HREF="#winbld">Building the samples on Windows</A></LI>
+ <LI><A HREF="#winrun">Running the samples on Windows:</A></LI>
+ <UL>
+ <LI><A HREF="#wincalcbasic">Calculator with basic client</A></LI>
+ <LI><A HREF="#wincalcws">Calculator with Web Service client</A></LI>
+ </UL>
+ </OL>
+ </DIV>
+
+
+ <DIV CLASS="section">
+ <A NAME="linuxbld"><H2>Building the 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.92&gt;</LI>
+ </UL></LI>
+ </LI>
+ <LI>Build the source with the following command sequence:
+ <UL>
+ <LI>cd &lt;tuscany_sca_install_dir&gt;/samples</LI>
+ <LI>./configure</LI>
+ <LI>make</LI>
+ <LI>make install</LI>
+ </UL>
+ NOTE: If you don't provide a --prefix configure option, it will by default install into
+ /usr/local/tuscany/sca/samples/Calculator</LI>
+ </OL>
+ </DIV>
+
+ <DIV CLASS="section">
+ <A NAME="linuxrun"><H2>Running the samples on Linux</H2></A>
+ <A NAME="linuxcalcbasic"><H3>Calculator 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/Calculator/deploy/bin</LI>
+ <LI>./runclient.sh</LI>
+ </UL>
+ </LI>
+ </OL>
+ <A NAME="linuxcalcws"><H3>Calculator with Web Service client</H3></A>
+ <OL>
+ <LI>Deploy the Calculator as an Axis2C service:
+ <OL>
+ <LI>Create a new service folder in axis2:<BR/>
+ &lt;AXIS2C_HOME&gt;/services/Calculator</LI>
+ <LI>Copy the &lt;TUSCANY_SCACPP&gt;/samples/Calculator/CalculatorModule/services.xml
+ to &lt;AXIS2C_HOME&gt;/services/Calculator/services.xml</LI>
+ <LI>Edit the &lt;AXIS2C_HOME&gt;/services/Calculator/services.xml file to set the TuscanySystemRoot parameter to<BR/>
+ &lt;parameter name="TuscanySystemRoot" locked="xsd:false"&gt;&lt;tuscany_sca_install_dir&gt;/samples/Calculator/deploy&lt;/parameter&gt;<BR/>
+ replacing &lt;tuscany_sca_install_dir&gt; with the install path of Tuscany SCA</LI>
+ <LI>Copy the &lt;TUSCANY_SCACPP&gt;/lib/libtuscany_sca_ws_service.so library into &lt;AXIS2C_HOME&gt;/services/Calculator</LI>
+ </OL>
+ </LI>
+ <LI>Start the Axis2C simple http server:
+ <OL>
+ <LI>cd &lt;AXIS2C_HOME&gt;/bin</LI>
+ <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>Add &lt;TUSCANY_SCACPP&gt;/lib, &lt;TUSCANY_SDOCPP&gt;/lib and &lt;AXIS2C_HOME&gt;/lib
+ to the LD_LIBRARY_PATH environment variable
+ </LI>
+ <LI>./axis2_http_server</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.92&gt;</LI>
+ </UL>
+ </LI>
+ <LI>cd &lt;tuscany_sca_install_dir&gt;/samples/Calculator/deploy/bin</LI>
+ <LI>./runwsclient.sh</LI>
+ </OL>
+ </LI>
+ </OL>
+ </DIV>
+
+ <DIV CLASS="section">
+ <A NAME="winbld"><H2>Building the samples 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.92&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\Calculator\build.cmd
+ which will build and deploy the samples.
+ </LI>
+ </OL>
+ </DIV>
+
+ <DIV CLASS="section">
+ <A NAME="winrun"><H2>Running the samples on Windows</H2></A>
+ <A NAME="wincalcbasic"><H3>Calculator 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/Calculator/deploy/bin</LI>
+ <LI>runclient add 5 6<BR/>
+ (can also use sub, div, mul).</LI>
+ </UL>
+ </LI>
+ </OL>
+ <A NAME="wincalcws"><H3>Calculator with Web Service client</H3></A>
+ <OL>
+ <LI>Deploy the Calculator as an Axis2C service:
+ <OL>
+ <LI>Create a new service folder in axis2:<BR/>
+ &lt;AXIS2C_HOME&gt;/services/Calculator</LI>
+ <LI>Copy the &lt;TUSCANY_SCACPP&gt;/samples/Calculator/CalculatorModule/services.xml
+ to &lt;AXIS2C_HOME&gt;/services/Calculator/services.xml</LI>
+ <LI>Edit the &lt;AXIS2C_HOME&gt;/services/Calculator/services.xml file to set the TuscanySystemRoot parameter to<BR/>
+ &lt;parameter name="TuscanySystemRoot" locked="xsd:false"&gt;&lt;TUSCANY_SCACPP&gt;/samples/Calculator/deploy&lt;/parameter&gt;<BR/>
+ replacing &lt;TUSCANY_SCACPP&gt; with the install path of Tuscany SCA</LI>
+ <LI>Copy the &lt;TUSCANY_SCACPP&gt;/lib/tuscany_sca_ws_service.dll (and .pdb if debugging) file(s)
+ into &lt;AXIS2C_HOME&gt;/services/Calculator</LI>
+ </OL>
+ </LI>
+ <LI>Start the Axis2C simple http server:
+ <OL>
+ <LI>cd &lt;AXIS2C_HOME&gt;/bin</LI>
+ <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>Add &lt;TUSCANY_SCACPP&gt;\bin, &lt;TUSCANY_SDOCPP&gt;\bin and &lt;AXIS2C_HOME&gt;/lib
+ to the PATH environment variable
+ </LI>
+ <LI>axis2_http_server</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.92&gt;</LI>
+ </UL>
+ </LI>
+ <LI>cd &lt;tuscany_sca_install_dir&gt;/samples/Calculator/deploy/bin</LI>
+ <LI>runwsclient</LI>
+ </OL>
+ </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>
+
+
+ <P>&nbsp;</P>
+
+ <P>&nbsp;</P>
+
+ <P>&nbsp;</P>
+ <TABLE CLASS="bodyTable">
+ <TBODY>
+ <TR CLASS="a">
+ <TD>
+
+ <P>Thank you for your interest in Tuscany.</P> <STRONG><EM>-The
+ Tuscany Development Team</EM></STRONG>
+
+ <P></P>
+
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+
+ <P></P>
+ </DIV>
+ </DIV>
+</DIV>
+</BODY>
+
+</HTML>
diff --git a/branches/cpp-M1/sca/samples/INSTALL b/branches/cpp-M1/sca/samples/INSTALL
new file mode 100644
index 0000000000..2a6a072bf5
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/INSTALL
@@ -0,0 +1,2 @@
+Please read the GettingStarted.html document for information on
+building and installing the Tuscany SCA for C++ samples
diff --git a/branches/cpp-M1/sca/samples/LICENSE b/branches/cpp-M1/sca/samples/LICENSE
new file mode 100755
index 0000000000..f433b1a53f
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/LICENSE
@@ -0,0 +1,177 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
diff --git a/branches/cpp-M1/sca/samples/Makefile.am b/branches/cpp-M1/sca/samples/Makefile.am
new file mode 100644
index 0000000000..2531254930
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS = Calculator
+
+EXTRA_DIST = GettingStarted.html
diff --git a/branches/cpp-M1/sca/samples/MyValue/Client/Makefile.am b/branches/cpp-M1/sca/samples/MyValue/Client/Makefile.am
new file mode 100644
index 0000000000..b1586cc752
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/Client/Makefile.am
@@ -0,0 +1,11 @@
+prgbindir=$(prefix)/samples/bin
+prgbin_PROGRAMS = MyValueClient
+
+MyValueClient_SOURCES = MyValueClient.cpp
+
+MyValueClient_LDADD = -L$(top_builddir)/runtime/core/src -ltuscany_sca \
+ -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo -lxml2
+
+INCLUDES = -I.. \
+ -I$(top_builddir)/runtime/core/src \
+ -I${TUSCANY_SDOCPP}/include
diff --git a/branches/cpp-M1/sca/samples/MyValue/Client/MyValueClient.cpp b/branches/cpp-M1/sca/samples/MyValue/Client/MyValueClient.cpp
new file mode 100755
index 0000000000..1e5c038e2e
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/Client/MyValueClient.cpp
@@ -0,0 +1,179 @@
+/*
+ *
+ * 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.
+ */
+#pragma warning(disable: 4786)
+
+#include "commonj/sdo/Logger.h"
+#include "commonj/sdo/SDO.h"
+#include "commonj/sdo/HelperProvider.h"
+#include "osoa/sca/sca.h"
+#include "tuscany/sca/util/Logger.h"
+#include "tuscany/sca/util/Utils.h"
+#include <iostream>
+
+using namespace std;
+using namespace osoa::sca;
+using namespace tuscany::sca;
+using namespace commonj::sdo;
+using namespace tuscany::sca::ws;
+
+void usage();
+
+//
+// MyValueClient is a sample application that invokes operations on the
+// MyValueService Web Service.
+//
+int main(int argc, char* argv[])
+{
+
+ //
+ // Schema file for the types used by MyValueService
+ //
+ char *pszXSD;
+
+ //
+ // The WebService endpoint uri.
+ //
+ char *pszEndpoint;
+
+ //
+ // TargetNamespace
+ //
+ const char *pszTargetNamespace;
+
+ //
+ // SOAPAction
+ //
+ // Axis 1.5: SoapAction must be <serviceName>#<operationName>.
+ const char *pcszSoapAction = "MyValueService#getMyValue";
+
+ //
+ // Operation Name
+ //
+ const char *pcszOperationName = "getMyValue";
+
+ //
+ // Operation Response Name
+ //
+ const char *pcszOperationResponseName = "getMyValueResponse";
+
+
+ // Get the input parameters.
+ if (argc == 3)
+ {
+ // Schema file.
+ pszXSD = argv[1];
+ // Web Service endpoint.
+ pszEndpoint = argv[2];
+ }
+ else
+ {
+ usage();
+ }
+
+ // The current version of SDO does not support the embedded schema in the wsdl file,
+ // so we have to load an external schema.
+ XSDHelperPtr xsdHelper = HelperProvider::getXSDHelper();
+
+ try
+ {
+ cout << "define file: " << pszXSD <<endl;
+ pszTargetNamespace = xsdHelper->defineFile(pszXSD);
+ }
+ catch (SDORuntimeException ex)
+ {
+ cout << ex << endl;
+ exit(1);
+ }
+ cout << "define file done: " << pszTargetNamespace <<endl;
+
+
+ // Create an SDO for the request
+ DataFactoryPtr factory = xsdHelper->getDataFactory();
+ DataObjectPtr requestDO = 0;
+
+ try
+ {
+ // Create the root element for the operation and then add the parameters
+ // we need to invoke the operation.
+ requestDO = factory->create(pszTargetNamespace, pcszOperationName);
+ requestDO->setCString("customerID", "12345");
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "SDORuntimeException: " << e << endl;
+ exit(1);
+ }
+
+ //
+ // Create an SDOStub that will use the request SDO to invoke the operation.
+ //
+ SDOStub *stub = new SDOStub();
+ stub->setEndpoint(pszEndpoint);
+ stub->setOperationName(pcszOperationName);
+ stub->setTargetNamespace(pszTargetNamespace);
+ stub->setOperationResponseName(pcszOperationResponseName);
+ stub->setSoapAction(pcszSoapAction);
+ // DEBUG - Don't let the soap transport timeout while debugging.
+ stub->setTransportTimeout(0);
+ // DEBUG
+
+ try
+ {
+ // Invoke the operation.
+ DataObjectPtr responseDO = stub->invoke(requestDO, factory);
+ // Print the response.
+ if (responseDO != 0)
+ {
+ cout << "MyValueClient: response DataObject = " << endl;
+ Utils::printDO(responseDO);
+ cout << endl;
+ float fValue = responseDO->getFloat("myValue");
+ cout << "MyValueClient: myValue = " << fValue;
+ }
+ else
+ {
+ cout << "MyValueClient: MyValueService did not return a result" << endl;
+ }
+ }
+ catch (SDORuntimeException& e)
+ {
+ cout << "SDORuntimeException: " << e << endl;
+ }
+ catch (ServiceRuntimeException& e)
+ {
+ cout << "ServiceRuntimeException: " << e << endl;
+ }
+ catch(exception& e)
+ {
+ cout << "Exception: " << e.what() << endl;
+ }
+
+
+ return 0;
+}
+
+//
+// Print usage message.
+//
+void usage()
+{
+ cout << "MyValueClient.exe: Invoke operations on MyValueService Web Service" << endl;
+ cout << "Usage: MyValueClient XSD endpoint" << endl;
+ cout << "where XSD = path and name of XSD file that defines the MyValue types" << endl;
+ cout << " endpoint = web service endpoint" << endl;
+ exit(1);
+}
diff --git a/branches/cpp-M1/sca/samples/MyValue/Makefile.am b/branches/cpp-M1/sca/samples/MyValue/Makefile.am
new file mode 100644
index 0000000000..7541093280
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/Makefile.am
@@ -0,0 +1,23 @@
+SUBDIRS = MyValueModule Client
+
+deploy_dir = $(top_builddir)/samples/runtime
+deploy_module = $(deploy_dir)/modules/MyValueModule
+
+install-exec-local:
+ cp MyValueSubsystem/sca.subsystem $(deploy_dir)/subsystems/MyValueSubsystem
+ cp MyValueModule/sca.module $(deploy_module)
+ cp MyValueModule/CustomerInfo.fragment $(deploy_module)
+ cp MyValueModule/Tuscany-model.config $(deploy_module)
+ cp MyValueModule/CustomerInfo/CustomerInfoImpl.componentType $(deploy_module)/CustomerInfo
+ cp MyValueModule/CustomerInfo/.libs/libCustomerInfo.so $(deploy_module)/CustomerInfo
+ cp MyValueModule/CustomerInfo/CustomerInfo.h $(deploy_module)/CustomerInfo
+ cp MyValueModule/CustomerInfo/CustomerInfoImpl.h $(deploy_module)/CustomerInfo
+ cp MyValueModule/MyValue/MyValueImpl.componentType $(deploy_module)/MyValue
+ cp MyValueModule/MyValue/MyValue.h $(deploy_module)/MyValue
+ cp MyValueModule/MyValue/MyValueImpl.h $(deploy_module)/MyValue
+ cp MyValueModule/MyValue/MyValueService.wsdl $(deploy_module)/MyValue
+ cp MyValueModule/MyValue/.libs/libMyValue.so $(deploy_module)/MyValue
+ cp MyValueModule/StockQuoteService/StockQuoteService.h $(deploy_module)/StockQuoteService
+ cp MyValueModule/StockQuoteService/StockQuoteService.wsdl $(deploy_module)/StockQuoteService
+
+
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo.fragment b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo.fragment
new file mode 100755
index 0000000000..b7f79799b5
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo.fragment
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<moduleFragment xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="CustomerInfoComponent">
+
+
+ <component name="CustomerInfoComponent">
+ <implementation.cpp dll="CustomerInfo/libCustomerInfo.so" header="CustomerInfo/CustomerInfoImpl.h"></implementation.cpp>
+ <properties>
+ <v:Fred>x</v:Fred>
+ <v:Joe>23</v:Joe>
+ <Joe>42</Joe>
+ </properties>
+ <references>
+ </references>
+ </component>
+
+</moduleFragment>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfo.h b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfo.h
new file mode 100755
index 0000000000..766fc55fe6
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfo.h
@@ -0,0 +1,30 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date$ */
+
+#ifndef CustomerInfo_h
+#define CustomerInfo_h
+
+class CustomerInfo
+{
+public:
+ virtual const char* getCustomerInformation(const char* customerID) = 0;
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.componentType b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.componentType
new file mode 100755
index 0000000000..52988cb90a
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.componentType
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="CustomerInfoService">
+ <interface.cpp header="CustomerInfo/CustomerInfo.h">
+ </interface.cpp>
+ </service>
+
+ <property name="Fred" type="xs:string"/>
+ <property name="Joe" type="xs:integer" many="true"/>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.cpp b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.cpp
new file mode 100755
index 0000000000..ed3ff5e2ff
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.cpp
@@ -0,0 +1,79 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date$ */
+
+#include "CustomerInfoImpl.h"
+#include <ostream>
+#include <string.h>
+#include "osoa/sca/sca.h"
+#include "commonj/sdo/DataObjectInstance.h"
+using namespace osoa::sca;
+using namespace commonj::sdo;
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CustomerInfoImpl::CustomerInfoImpl()
+{
+ cout << "Construct CustomerInfoImpl" << endl;
+
+}
+
+CustomerInfoImpl::~CustomerInfoImpl()
+{
+ cout << "Destroy CustomerInfoImpl" << endl;
+}
+
+//////////////////////////////////////////////////////////////////////
+// Other methods
+//////////////////////////////////////////////////////////////////////
+const char* CustomerInfoImpl::getCustomerInformation(const char* customerID)
+{
+ cout << "In getCustomerInformation with customerid: " << customerID << endl;
+
+
+
+ ComponentContext myContext = ComponentContext::getCurrent();
+
+ DataObjectInstance properties = myContext.getProperties();
+ DataObjectInstance props2 = properties;
+ if (properties)
+ {
+ const char* fredVal = properties->getCString("Fred");
+ cout << "Property Fred value: " << fredVal <<endl;
+
+
+ DataObjectList& joeList = properties->getList("Joe");
+ for (int i=0; i<joeList.size();i++)
+ {
+ cout << "Property Joe value " << i << ": " << joeList.getInteger(i) <<endl;
+ }
+ }
+
+ if (!strcmp("12345", customerID))
+ {
+ return "IBM";
+ }
+ else
+ {
+ throw "Wobbler";
+ }
+
+
+}
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.h b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.h
new file mode 100755
index 0000000000..c943b1d666
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/CustomerInfoImpl.h
@@ -0,0 +1,36 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date$ */
+
+#ifndef CustomerInfoImpl_h
+#define CustomerInfoImpl_h
+
+#include "CustomerInfo.h"
+
+
+
+class CustomerInfoImpl : public CustomerInfo
+{
+public:
+ CustomerInfoImpl();
+ virtual ~CustomerInfoImpl();
+ virtual const char* getCustomerInformation(const char* customerID);
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/Makefile.am b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/Makefile.am
new file mode 100644
index 0000000000..78161c429c
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/CustomerInfo/Makefile.am
@@ -0,0 +1,15 @@
+lib_LTLIBRARIES = libCustomerInfo.la
+
+libCustomerInfo_la_SOURCES = \
+CustomerInfoImpl.cpp \
+CustomerInfoImpl_CustomerInfoService_Proxy.cpp \
+CustomerInfoImpl_CustomerInfoService_Wrapper.cpp
+
+libCustomerInfo_la_LIBADD = -L$(top_builddir)/runtime/core/src -ltuscany_sca \
+ -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo
+
+INCLUDES = -I.. \
+ -I$(top_builddir)/runtime/core/src \
+ -I${TUSCANY_SDOCPP}/include
+
+install: \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/Makefile.am b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/Makefile.am
new file mode 100644
index 0000000000..7d57c06f3d
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/Makefile.am
@@ -0,0 +1,10 @@
+SUBDIRS = CustomerInfo MyValue
+
+BUILT_SOURCES = scagen
+
+scagen:
+ cd $(top_builddir)/bin && \
+ ./scagen.sh -dir $(prefix)/samples/MyValue/MyValueModule -output $(prefix)/samples/MyValue/MyValueModule
+ mv CustomerInfoImpl_* CustomerInfo
+ mv MyValueImpl_* MyValue
+
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/Makefile.am b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/Makefile.am
new file mode 100644
index 0000000000..85e1077998
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/Makefile.am
@@ -0,0 +1,17 @@
+lib_LTLIBRARIES = libMyValue.la
+
+libMyValue_la_SOURCES = \
+MyValueImpl.cpp \
+MyValueImpl_customerInfo_Proxy.cpp \
+MyValueImpl_MyValueService_Proxy.cpp \
+MyValueImpl_MyValueService_Wrapper.cpp \
+MyValueImpl_stockQuote_Proxy.cpp
+
+libMyValue_la_LIBADD = -L$(top_builddir)/runtime/core/src -ltuscany_sca \
+ -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo
+
+INCLUDES = -I.. \
+ -I$(top_builddir)/runtime/core/src \
+ -I${TUSCANY_SDOCPP}/include
+
+install: \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValue.h b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValue.h
new file mode 100755
index 0000000000..3efa7ecc61
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValue.h
@@ -0,0 +1,30 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef MyValue_h
+#define MyValue_h
+
+#include "commonj/sdo/SDO.h"
+using commonj::sdo::DataObjectPtr;
+
+class MyValue
+{
+public:
+ virtual DataObjectPtr getMyValue(DataObjectPtr inDataObject) = 0;
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueImpl.componentType b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueImpl.componentType
new file mode 100755
index 0000000000..16530400b5
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueImpl.componentType
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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/0.9">
+
+ <service name="MyValueService">
+ <interface.cpp header="MyValue/MyValue.h">
+ </interface.cpp>
+ </service>
+
+ <reference name="customerInfo">
+ <interface.cpp header="CustomerInfo/CustomerInfo.h">
+ </interface.cpp>
+ </reference>
+
+ <reference name="stockQuote">
+ <interface.cpp header="StockQuoteService/StockQuoteService.h">
+ </interface.cpp>
+ </reference>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueImpl.cpp b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueImpl.cpp
new file mode 100755
index 0000000000..4a2d64ea6d
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueImpl.cpp
@@ -0,0 +1,143 @@
+/*
+ *
+ * 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.
+ */
+
+//
+// MyValueImpl.cpp: implementation of the MyValueImpl class.
+//
+
+#include "commonj/sdo/HelperProvider.h"
+#include "commonj/sdo/SDO.h"
+#include "osoa/sca/sca.h"
+#include "MyValueImpl.h"
+#include "CustomerInfo/CustomerInfo.h"
+#include "StockQuoteService/StockQuoteService.h"
+#include <iostream>
+
+using namespace std;
+using namespace osoa::sca;
+using namespace commonj::sdo;
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+MyValueImpl::MyValueImpl()
+{
+ cout << "Construct MyValueImpl" << endl;
+
+}
+
+MyValueImpl::~MyValueImpl()
+{
+ cout << "Destroy MyValueImpl" << endl;
+}
+
+//////////////////////////////////////////////////////////////////////
+// Other methods
+//////////////////////////////////////////////////////////////////////
+DataObjectPtr MyValueImpl::getMyValue(DataObjectPtr inDataObject)
+{
+ DataObjectPtr responseDO = 0;
+
+ string customerID = inDataObject->getCString("customerID");
+ cout << "In getMyValue with customerid: " << customerID << endl;
+
+ // Get the CustomerInfo service.
+ ComponentContext myContext = ComponentContext::getCurrent();
+ CustomerInfo* customerInfoService = (CustomerInfo*)myContext.getService("customerInfo");
+
+ if (customerInfoService == 0)
+ {
+ cout << "Unable to find customer info service" << endl;
+
+ return responseDO;
+ }
+
+ // Get the name of the stock for customer 'customerID' from the customerInfoService.
+ const char * stock;
+ try
+ {
+ stock = customerInfoService->getCustomerInformation(customerID.c_str());
+ }
+ catch(const char* x)
+ {
+ cout << "Exception caught: " << x <<endl;
+ throw;
+ }
+
+
+ // Check that we get the same stock back when iterating over the customerInfo services.
+ ServiceList serviceList = myContext.getServices("customerInfo");
+ for (int i=0; i<serviceList.size();i++)
+ {
+ CustomerInfo* service = (CustomerInfo*)(serviceList[i]);
+ stock = service->getCustomerInformation(customerID.c_str());
+ cout << "Stock from getServices " << i << " : " << stock <<endl;
+
+ }
+
+ // Use a second SCA reference to get the stock price for the customer's stock.
+ StockQuoteService* stockQuoteService = (StockQuoteService*)myContext.getService("stockQuote");
+
+ if (stockQuoteService == 0)
+ {
+ cout << "Unable to find stock quote service" << endl;
+
+ return responseDO;
+ }
+
+ // Create a data object representing the requests (use dynamic API until static is available)
+ DataObjectPtr stockQuoteRequestDO;
+ DataFactoryPtr factory;
+ try
+ {
+ // Create the request DO for the StockQuoteService.
+ factory = myContext.getDataFactory();
+ stockQuoteRequestDO = factory->create("http://swanandmokashi.com", "GetQuotes");
+ stockQuoteRequestDO->setCString("QuoteTicker", stock);
+
+ // Invoke the StockQuoteService
+ DataObjectPtr stockQuoteResponseDO = stockQuoteService->GetStockQuotes(stockQuoteRequestDO);
+
+ // DEBUG (Print the response from the StockQuoteService)
+ XMLHelperPtr xmlHelper = HelperProvider::getXMLHelper(factory);;
+ XMLDocumentPtr responseDoc =
+ xmlHelper->createDocument(stockQuoteResponseDO, "http://swanandmokashi.com", "GetQuotesResponse");
+ responseDoc->setXMLDeclaration(false);
+ char *responseXML = xmlHelper->save(responseDoc);
+ cout << "Response XML from StockQuoteService = " << endl;
+ cout << responseXML << endl;
+ cout << endl;
+ // DEBUG
+
+ // Create the MyValueService response DataObject using the results of the StockQuoteService.
+ responseDO = factory->create("http://www.myvalue.org/MyValueService/", "getMyValueResponse");
+ DataObjectPtr getQuotesResultDO = stockQuoteResponseDO->getDataObject("GetQuotesResult");
+ DataObjectList& quoteList = getQuotesResultDO->getList("Quote");
+ float fQuote = quoteList[0]->getFloat("StockQuote");
+
+ responseDO->setFloat("myValue", fQuote);
+ }
+ catch (SDORuntimeException sdoE)
+ {
+ cout << sdoE;
+ }
+
+ return responseDO;
+
+}
+
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueImpl.h b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueImpl.h
new file mode 100755
index 0000000000..05aa7066c1
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueImpl.h
@@ -0,0 +1,32 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef MyValueImpl_h
+#define MyValueImpl_h
+
+#include "MyValue.h"
+
+
+class MyValueImpl : public MyValue
+{
+public:
+ MyValueImpl();
+ virtual ~MyValueImpl();
+ virtual DataObjectPtr getMyValue(DataObjectPtr inDataObject);
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueService.wsdl b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueService.wsdl
new file mode 100755
index 0000000000..3bc1a12d5c
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueService.wsdl
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.myvalue.org/MyValueService/"
+ targetNamespace="http://www.myvalue.org/MyValueService/">
+ <types>
+ <xs:schema targetNamespace="http://www.myvalue.org/MyValueService/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.myvalue.org/MyValueService/"
+ elementFormDefault="qualified">
+
+ <xs:element name="getMyValue">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="customerID" type="xs:string" minOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="getMyValueResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="myValue" type="xs:float" minOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ </xs:schema>
+ </types>
+
+ <message name="getMyValueRequestMsg">
+ <part name="body" element="tns:getMyValue"/>
+ </message>
+
+ <message name="getMyValueResponseMsg">
+ <part name="body" element="tns:getMyValueResponse"/>
+ </message>
+
+ <portType name="MyValueServicePortType">
+ <operation name="getMyValue">
+ <input message="tns:getMyValueRequestMsg"/>
+ <output message="tns:getMyValueResponseMsg"/>
+ </operation>
+ </portType>
+
+ <binding name="MyValueServiceBinding" type="tns:MyValueServicePortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="getMyValue">
+ <soap:operation soapAction="MyValueService#getMyValue"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="MyValueService">
+ <port name="MyValueServicePort" binding="tns:MyValueServiceBinding">
+ <soap:address location="http://localhost/axis/MyValueService"/>
+ </port>
+ </service>
+</definitions>
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueService.xsd b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueService.xsd
new file mode 100755
index 0000000000..bf41ea511a
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/MyValue/MyValueService.xsd
@@ -0,0 +1,39 @@
+
+<!--
+ 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 targetNamespace="http://www.myvalue.org/MyValueService/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.myvalue.org/MyValueService/"
+ elementFormDefault="qualified">
+
+ <xs:element name="getMyValue">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="customerID" type="xs:string" minOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="getMyValueResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="myValue" type="xs:float" minOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.h b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.h
new file mode 100755
index 0000000000..7da4069bd1
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.h
@@ -0,0 +1,32 @@
+/*
+ *
+ * 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.
+ */
+
+/* $Rev$ $Date$ */
+
+#ifndef StockQuoteService_h
+#define StockQuoteService_h
+#include <string>
+#include "commonj/sdo/SDO.h"
+using std::string;
+class StockQuoteService
+{
+public:
+ virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr request) = 0;
+
+};
+
+#endif // StockQuoteService_h
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.wsdl b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.wsdl
new file mode 100755
index 0000000000..4917cde583
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/StockQuoteService/StockQuoteService.wsdl
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<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:s0="http://swanandmokashi.com"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
+ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+ targetNamespace="http://swanandmokashi.com"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <s:schema elementFormDefault="qualified"
+ targetNamespace="http://swanandmokashi.com"
+ xmlns:s="http://www.w3.org/2001/XMLSchema">
+ <s:element name="GetQuotes">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+ name="QuoteTicker" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetQuotesResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+ name="GetQuotesResult" type="s0:ArrayOfQuote" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="ArrayOfQuote">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded"
+ name="Quote" type="s0:Quote" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="Quote">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+ name="CompanyName" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="StockTicker" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="StockQuote" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="LastUpdated" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Change"
+ type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="OpenPrice" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="DayHighPrice" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="DayLowPrice" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Volume"
+ type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="MarketCap" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="YearRange" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="ArrayOfQuote" nillable="true"
+ type="s0:ArrayOfQuote" />
+ </s:schema>
+ </types>
+ <message name="GetQuotesSoapIn">
+ <part name="parameters" element="s0:GetQuotes" />
+ </message>
+ <message name="GetQuotesSoapOut">
+ <part name="parameters" element="s0:GetQuotesResponse" />
+ </message>
+ <message name="GetQuotesHttpGetIn">
+ <part name="QuoteTicker" type="s:string" />
+ </message>
+ <message name="GetQuotesHttpGetOut">
+ <part name="Body" element="s0:ArrayOfQuote" />
+ </message>
+ <message name="GetQuotesHttpPostIn">
+ <part name="QuoteTicker" type="s:string" />
+ </message>
+ <message name="GetQuotesHttpPostOut">
+ <part name="Body" element="s0:ArrayOfQuote" />
+ </message>
+ <portType name="StockQuotesSoap">
+ <operation name="GetStockQuotes">
+ <input name="GetQuotes" message="s0:GetQuotesSoapIn" />
+ <output name="GetQuotes" message="s0:GetQuotesSoapOut" />
+ </operation>
+ </portType>
+ <portType name="StockQuotesHttpGet">
+ <operation name="GetStockQuotes">
+ <input name="GetQuotes" message="s0:GetQuotesHttpGetIn" />
+ <output name="GetQuotes" message="s0:GetQuotesHttpGetOut" />
+ </operation>
+ </portType>
+ <portType name="StockQuotesHttpPost">
+ <operation name="GetStockQuotes">
+ <input name="GetQuotes" message="s0:GetQuotesHttpPostIn" />
+ <output name="GetQuotes" message="s0:GetQuotesHttpPostOut" />
+ </operation>
+ </portType>
+ <binding name="StockQuotesSoap" type="s0:StockQuotesSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
+ style="document" />
+ <operation name="GetStockQuotes">
+ <soap:operation
+ soapAction="http://swanandmokashi.com/GetQuotes" style="document" />
+ <input name="GetQuotes">
+ <soap:body use="literal" />
+ </input>
+ <output name="GetQuotes">
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <binding name="StockQuotesHttpGet" type="s0:StockQuotesHttpGet">
+ <http:binding verb="GET" />
+ <operation name="GetStockQuotes">
+ <http:operation location="/GetQuotes" />
+ <input name="GetQuotes">
+ <http:urlEncoded />
+ </input>
+ <output name="GetQuotes">
+ <mime:mimeXml part="Body" />
+ </output>
+ </operation>
+ </binding>
+ <binding name="StockQuotesHttpPost" type="s0:StockQuotesHttpPost">
+ <http:binding verb="POST" />
+ <operation name="GetStockQuotes">
+ <http:operation location="/GetQuotes" />
+ <input name="GetQuotes">
+ <mime:content type="application/x-www-form-urlencoded" />
+ </input>
+ <output name="GetQuotes">
+ <mime:mimeXml part="Body" />
+ </output>
+ </operation>
+ </binding>
+ <service name="StockQuotes">
+ <port name="StockQuotesSoap" binding="s0:StockQuotesSoap">
+ <soap:address
+ location="http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx" />
+ </port>
+ <port name="StockQuotesHttpGet"
+ binding="s0:StockQuotesHttpGet">
+ <http:address
+ location="http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx" />
+ </port>
+ <port name="StockQuotesHttpPost"
+ binding="s0:StockQuotesHttpPost">
+ <http:address
+ location="http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx" />
+ </port>
+ </service>
+</definitions>
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/Tuscany-model.config b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/Tuscany-model.config
new file mode 100755
index 0000000000..2667f62990
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/Tuscany-model.config
@@ -0,0 +1,25 @@
+<?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.
+ -->
+
+<tuscany-model xmlns="http://org.apache.tuscany/xmlns/cpp/1.0">
+ <wsdl>
+ <file name="StockQuoteService/StockQuoteService.wsdl"/>
+ <file name="MyValue/MyValueService.wsdl"/>
+ </wsdl>
+ <xsd>
+ </xsd>
+</tuscany-model> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueModule/sca.module b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/sca.module
new file mode 100755
index 0000000000..bda42e04bc
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueModule/sca.module
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="MyValueModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="MyValueService" multiplicity="1..1">
+ <interface.wsdl interface="MyValue/MyValueService.wsdl" callbackInterface=""></interface.wsdl>
+ <binding.ws port="mvs:MyValueServiceBinding"></binding.ws>
+ <reference>MyValueServiceComponent</reference>
+ </entryPoint>
+
+ <component name="MyValueServiceComponent">
+ <implementation.cpp dll="MyValue/libMyValue.so" header="MyValue/MyValueImpl.h"></implementation.cpp>
+ <properties>
+ </properties>
+ <references>
+ <customerInfo>CustomerInfoComponent</customerInfo>
+ <stockQuote>StockQuoteService</stockQuote>
+ </references>
+ </component>
+
+ <externalService name="StockQuoteService">
+ <interface.cpp header="StockQuoteService/StockQuoteService.h"/>
+ <binding.ws port="http://swanandmokashi.com#wsdl.endpoint(StockQuotes/StockQuotesSoap)"/>
+ </externalService>
+
+ <!--wire>
+ <source.uri>MyValueServiceComponent/customerInfo</source.uri>
+ <target.uri>CustomerInfoComponent</target.uri>
+ </wire-->
+
+</module>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/MyValue/MyValueSubsystem/sca.subsystem b/branches/cpp-M1/sca/samples/MyValue/MyValueSubsystem/sca.subsystem
new file mode 100755
index 0000000000..ae858ea331
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/MyValueSubsystem/sca.subsystem
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<subsystem xmlns="http://www.osoa.org/xmlns/sca/0.9"
+
+ name="MyValueSubsystem">
+
+ <moduleComponent name="MyValue" module="MyValueModule">
+
+ </moduleComponent>
+
+</subsystem>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/MyValue/runMyValueClient.sh b/branches/cpp-M1/sca/samples/MyValue/runMyValueClient.sh
new file mode 100755
index 0000000000..e5feeda1f0
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/runMyValueClient.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# 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.
+
+
+APFULLDIR=`pwd`
+
+export SCA4CPP_HOME="$APFULLDIR"
+if [ x$SCA4CPP = x ]; then
+export TUSCANY_SCACPP="$SCA4CPP_HOME"
+fi
+echo "Using SCA installed at $SCA4CPP_HOME"
+
+if [ x$AXISCPP_DEPLOY = x ]; then
+echo "AXISCPP_DEPLOY not set"
+exit;
+fi
+echo "Using Axis C++ installed at $AXISCPP_DEPLOY"
+
+if [ x$XERCES_DEPLOY = x ]; then
+echo "XERCES_DEPLOY not set"
+exit;
+fi
+echo "Using Xerces C++ installed at $XERCES_DEPLOY"
+
+if [ x$TUSCANY_SDOCPP = x ]; then
+echo "TUSCANY_SDOCPP not set"exit;
+fi
+echo "Using SDO installed at $TUSCANY_SDOCPP"
+
+TEST_ROOT=$SCA4CPP_HOME/runtime/core/test
+
+export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$LD_LIBRARY_PATH:$AXISCPP_DEPLOY/lib:$XERCES_DEPLOY/lib
+
+export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_ROOT/testSCASystem
+export TUSCANY_SCACPP_DEFAULT_MODULE=SubSystem1
+
+cd $TUSCANY_SCACPP/bin/test
+./tuscany_sca_test
diff --git a/branches/cpp-M1/sca/samples/MyValue/server.wsdd b/branches/cpp-M1/sca/samples/MyValue/server.wsdd
new file mode 100755
index 0000000000..8b80b4b6ec
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/MyValue/server.wsdd
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- The Entity, wspath in the following internal subset allows setting a path for the webservices location -->
+<!--<!DOCTYPE vars [ <!ENTITY wspath "/Apache2.0.54/Apache2/Axis/webservices/"> ]>-->
+
+<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:C="http://xml.apache.org/axis/wsdd/providers/C" xmlns:CPP="http://xml.apache.org/axis/wsdd/providers/CPP">
+ <globalConfiguration>
+ </globalConfiguration>
+
+ <service name="MyValueService" provider="CPP:DOCUMENT" description="MyValueService">
+ <requestFlow>
+ <handler name="SCAWSHandler" type="C:\Apache2.0.54\Apache2\Axis\handlers\tuscany_sca_axis_handler.dll">
+ <parameter name="targetNamespace" value="http://www.myvalue.org/MyValueService/"/>
+ <parameter name="scaEntryPoint" value="MyValueSubsystem/MyValue/MyValueService"/>
+ </handler>
+ </requestFlow>
+
+ <parameter name="className" value="C:\Apache2.0.54\Apache2\Axis\webservices\tuscany_sca_axis_wrapper.dll"/>
+ <parameter name="allowedMethods" value="getMyValue "/>
+ </service>
+
+</deployment>
diff --git a/branches/cpp-M1/sca/samples/NEWS b/branches/cpp-M1/sca/samples/NEWS
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/NEWS
diff --git a/branches/cpp-M1/sca/samples/NOTICE b/branches/cpp-M1/sca/samples/NOTICE
new file mode 100644
index 0000000000..bfb81409ad
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/NOTICE
@@ -0,0 +1,2 @@
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/) \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/README b/branches/cpp-M1/sca/samples/README
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/README
diff --git a/branches/cpp-M1/sca/samples/autogen.sh b/branches/cpp-M1/sca/samples/autogen.sh
new file mode 100755
index 0000000000..3cebb0a380
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/autogen.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+for i in "libtoolize --force" aclocal autoconf autoheader
+do
+ echo -n "Running $i..."
+ $i || exit 1
+ echo 'done.'
+done
+
+echo -n 'Running automake...'
+automake --add-missing
+echo 'done.'
+exit 0
+
diff --git a/branches/cpp-M1/sca/samples/build.sh b/branches/cpp-M1/sca/samples/build.sh
new file mode 100755
index 0000000000..72e1466c1f
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/build.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# 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.
+
+
+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"
+
+./configure --prefix=${TUSCANY_SCACPP} --enable-static=no
+make
+make install
+
diff --git a/branches/cpp-M1/sca/samples/configure.ac b/branches/cpp-M1/sca/samples/configure.ac
new file mode 100644
index 0000000000..e4c9932dbb
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/configure.ac
@@ -0,0 +1,26 @@
+dnl run autogen.sh to generate the configure script.
+
+AC_PREREQ(2.59)
+AC_INIT(tuscany_sca_samples, 0.1.incubating-M1)
+AC_CANONICAL_SYSTEM
+AM_CONFIG_HEADER(config.h)
+AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+AC_PREFIX_DEFAULT(/usr/local/tuscany/sca/samples)
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PROG_LIBTOOL
+
+AC_CONFIG_FILES([Makefile
+ Calculator/Makefile
+ Calculator/CalculatorModule/Makefile
+ Calculator/Client/Makefile
+ Calculator/WSClient/Makefile
+ ])
+AC_OUTPUT
+
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator.dsw b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator.dsw
new file mode 100644
index 0000000000..5dbc8fdd57
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator.dsw
@@ -0,0 +1,62 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "Calculator"=.\Calculator\Calculator.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Client"=.\Client\Client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name Calculator
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "WSClient"=.\WSClient\WSClient.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name Calculator
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name Client
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator.ncb b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator.ncb
new file mode 100644
index 0000000000..c9c6664018
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator.ncb
Binary files differ
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator.opt b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator.opt
new file mode 100644
index 0000000000..9de734b76e
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator.opt
Binary files differ
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator/Calculator.dsp b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator/Calculator.dsp
new file mode 100644
index 0000000000..19c7866d5f
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator/Calculator.dsp
@@ -0,0 +1,189 @@
+# Microsoft Developer Studio Project File - Name="Calculator" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=Calculator - 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 "Calculator.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 "Calculator.mak" CFG="Calculator - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Calculator - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "Calculator - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Calculator - 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 Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATOR_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "$(TUSCANY_SDOCPP)/include" /I "$(TUSCANY_SCACPP)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATOR_EXPORTS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# 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 /nologo /dll /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 tuscany_sca.lib tuscany_sdo.lib /nologo /dll /machine:I386 /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(TUSCANY_SCACPP)/lib"
+
+!ELSEIF "$(CFG)" == "Calculator - 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 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATOR_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(TUSCANY_SDOCPP)/include" /I "$(TUSCANY_SCACPP)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATOR_EXPORTS" /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# 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 /nologo /dll /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 tuscany_sca.lib tuscany_sdo.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(TUSCANY_SCACPP)/lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "Calculator - Win32 Release"
+# Name "Calculator - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\Calculator.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl_CalculatorDivideService_Proxy.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl_CalculatorService_Proxy.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl_CalculatorService_Proxy.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl_CalculatorService_Wrapper.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl_CalculatorService_Wrapper.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\DivideService.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\DivideServiceImpl.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\DivideServiceImpl.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\DivideServiceImpl_DivideService_Proxy.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\DivideServiceImpl_DivideService_Proxy.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\DivideServiceImpl_DivideService_Wrapper.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\DivideServiceImpl_DivideService_Wrapper.h
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl_CalculatorDivideService_Proxy.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\Calculator.wsdl
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\sca.module
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorSubsystem\sca.subsystem
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\services.xml
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\..\..\..\Calculator\CalculatorModule\Tuscany-model.config"
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator/Calculator.mak b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator/Calculator.mak
new file mode 100644
index 0000000000..17fdd321de
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Calculator/Calculator.mak
@@ -0,0 +1,254 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on Calculator.dsp
+!IF "$(CFG)" == ""
+CFG=Calculator - Win32 Debug
+!MESSAGE No configuration specified. Defaulting to Calculator - Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "Calculator - Win32 Release" && "$(CFG)" != "Calculator - Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!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 "Calculator.mak" CFG="Calculator - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Calculator - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "Calculator - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+!IF "$(CFG)" == "Calculator - Win32 Release"
+
+OUTDIR=.\Release
+INTDIR=.\Release
+# Begin Custom Macros
+OutDir=.\Release
+# End Custom Macros
+
+ALL : "$(OUTDIR)\Calculator.dll"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\CalculatorImpl.obj"
+ -@erase "$(INTDIR)\CalculatorImpl_CalculatorDivideService_Proxy.obj"
+ -@erase "$(INTDIR)\CalculatorImpl_CalculatorService_Proxy.obj"
+ -@erase "$(INTDIR)\CalculatorImpl_CalculatorService_Wrapper.obj"
+ -@erase "$(INTDIR)\DivideServiceImpl.obj"
+ -@erase "$(INTDIR)\DivideServiceImpl_DivideService_Proxy.obj"
+ -@erase "$(INTDIR)\DivideServiceImpl_DivideService_Wrapper.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(OUTDIR)\Calculator.dll"
+ -@erase "$(OUTDIR)\Calculator.exp"
+ -@erase "$(OUTDIR)\Calculator.lib"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "$(TUSCANY_SDOCPP)/include" /I "$(TUSCANY_SCACPP)/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATOR_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\Calculator.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=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_sca.lib tuscany_sdo.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\Calculator.pdb" /machine:I386 /out:"$(OUTDIR)\Calculator.dll" /implib:"$(OUTDIR)\Calculator.lib" /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(TUSCANY_SCACPP)/lib"
+LINK32_OBJS= \
+ "$(INTDIR)\CalculatorImpl.obj" \
+ "$(INTDIR)\CalculatorImpl_CalculatorDivideService_Proxy.obj" \
+ "$(INTDIR)\CalculatorImpl_CalculatorService_Proxy.obj" \
+ "$(INTDIR)\CalculatorImpl_CalculatorService_Wrapper.obj" \
+ "$(INTDIR)\DivideServiceImpl.obj" \
+ "$(INTDIR)\DivideServiceImpl_DivideService_Proxy.obj" \
+ "$(INTDIR)\DivideServiceImpl_DivideService_Wrapper.obj"
+
+"$(OUTDIR)\Calculator.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "Calculator - Win32 Debug"
+
+OUTDIR=.\Debug
+INTDIR=.\Debug
+# Begin Custom Macros
+OutDir=.\Debug
+# End Custom Macros
+
+ALL : "$(OUTDIR)\Calculator.dll"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\CalculatorImpl.obj"
+ -@erase "$(INTDIR)\CalculatorImpl_CalculatorDivideService_Proxy.obj"
+ -@erase "$(INTDIR)\CalculatorImpl_CalculatorService_Proxy.obj"
+ -@erase "$(INTDIR)\CalculatorImpl_CalculatorService_Wrapper.obj"
+ -@erase "$(INTDIR)\DivideServiceImpl.obj"
+ -@erase "$(INTDIR)\DivideServiceImpl_DivideService_Proxy.obj"
+ -@erase "$(INTDIR)\DivideServiceImpl_DivideService_Wrapper.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(OUTDIR)\Calculator.dll"
+ -@erase "$(OUTDIR)\Calculator.exp"
+ -@erase "$(OUTDIR)\Calculator.ilk"
+ -@erase "$(OUTDIR)\Calculator.lib"
+ -@erase "$(OUTDIR)\Calculator.pdb"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(TUSCANY_SDOCPP)/include" /I "$(TUSCANY_SCACPP)/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALCULATOR_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\Calculator.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=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_sca.lib tuscany_sdo.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\Calculator.pdb" /debug /machine:I386 /out:"$(OUTDIR)\Calculator.dll" /implib:"$(OUTDIR)\Calculator.lib" /pdbtype:sept /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(TUSCANY_SCACPP)/lib"
+LINK32_OBJS= \
+ "$(INTDIR)\CalculatorImpl.obj" \
+ "$(INTDIR)\CalculatorImpl_CalculatorDivideService_Proxy.obj" \
+ "$(INTDIR)\CalculatorImpl_CalculatorService_Proxy.obj" \
+ "$(INTDIR)\CalculatorImpl_CalculatorService_Wrapper.obj" \
+ "$(INTDIR)\DivideServiceImpl.obj" \
+ "$(INTDIR)\DivideServiceImpl_DivideService_Proxy.obj" \
+ "$(INTDIR)\DivideServiceImpl_DivideService_Wrapper.obj"
+
+"$(OUTDIR)\Calculator.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("Calculator.dep")
+!INCLUDE "Calculator.dep"
+!ELSE
+!MESSAGE Warning: cannot find "Calculator.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "Calculator - Win32 Release" || "$(CFG)" == "Calculator - Win32 Debug"
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl.cpp
+
+"$(INTDIR)\CalculatorImpl.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl_CalculatorDivideService_Proxy.cpp
+
+"$(INTDIR)\CalculatorImpl_CalculatorDivideService_Proxy.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl_CalculatorService_Proxy.cpp
+
+"$(INTDIR)\CalculatorImpl_CalculatorService_Proxy.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl_CalculatorService_Wrapper.cpp
+
+"$(INTDIR)\CalculatorImpl_CalculatorService_Wrapper.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\DivideServiceImpl.cpp
+
+"$(INTDIR)\DivideServiceImpl.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\DivideServiceImpl_DivideService_Proxy.cpp
+
+"$(INTDIR)\DivideServiceImpl_DivideService_Proxy.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\..\..\Calculator\CalculatorModule\DivideServiceImpl_DivideService_Wrapper.cpp
+
+"$(INTDIR)\DivideServiceImpl_DivideService_Wrapper.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+
+!ENDIF
+
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Client/Client.dsp b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Client/Client.dsp
new file mode 100644
index 0000000000..0964957127
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Client/Client.dsp
@@ -0,0 +1,117 @@
+# Microsoft Developer Studio Project File - Name="Client" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=Client - 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 "Client.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 "Client.mak" CFG="Client - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Client - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Client - 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)" == "Client - 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 Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "$(TUSCANY_SDOCPP)/include" /I "$(TUSCANY_SCACPP)/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# 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 tuscany_sdo.lib tuscany_sca.lib /nologo /subsystem:console /machine:I386 /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(TUSCANY_SCACPP)/lib"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=..\deploy.cmd Release
+# End Special Build Tool
+
+!ELSEIF "$(CFG)" == "Client - 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 /MDd /W3 /Gm /GX /ZI /Od /I "$(TUSCANY_SDOCPP)/include" /I "$(TUSCANY_SCACPP)/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# SUBTRACT CPP /YX
+# 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:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(TUSCANY_SCACPP)/lib"
+# SUBTRACT LINK32 /pdb:none
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=..\deploy.cmd Debug
+# End Special Build Tool
+
+!ENDIF
+
+# Begin Target
+
+# Name "Client - Win32 Release"
+# Name "Client - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\Client\Calc.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\Client\Calculator.h
+# 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/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Client/Client.mak b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Client/Client.mak
new file mode 100644
index 0000000000..bf8f403e25
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/Client/Client.mak
@@ -0,0 +1,262 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on Client.dsp
+!IF "$(CFG)" == ""
+CFG=Client - Win32 Debug
+!MESSAGE No configuration specified. Defaulting to Client - Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "Client - Win32 Release" && "$(CFG)" != "Client - Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!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 "Client.mak" CFG="Client - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Client - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Client - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+!IF "$(CFG)" == "Client - Win32 Release"
+
+OUTDIR=.\Release
+INTDIR=.\Release
+# Begin Custom Macros
+OutDir=.\Release
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : "$(OUTDIR)\Client.exe"
+
+!ELSE
+
+ALL : "Calculator - Win32 Release" "$(OUTDIR)\Client.exe"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"Calculator - Win32 ReleaseCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\Calc.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(OUTDIR)\Client.exe"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "$(TUSCANY_SDOCPP)/include" /I "$(TUSCANY_SCACPP)/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\Client.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=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:no /pdb:"$(OUTDIR)\Client.pdb" /machine:I386 /out:"$(OUTDIR)\Client.exe" /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(TUSCANY_SCACPP)/lib"
+LINK32_OBJS= \
+ "$(INTDIR)\Calc.obj" \
+ "..\Calculator\Release\Calculator.lib"
+
+"$(OUTDIR)\Client.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+SOURCE="$(InputPath)"
+DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
+
+ALL : $(DS_POSTBUILD_DEP)
+
+# Begin Custom Macros
+OutDir=.\Release
+# End Custom Macros
+
+$(DS_POSTBUILD_DEP) : "Calculator - Win32 Release" "$(OUTDIR)\Client.exe"
+ ..\deploy.cmd Release
+ echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
+
+!ELSEIF "$(CFG)" == "Client - Win32 Debug"
+
+OUTDIR=.\Debug
+INTDIR=.\Debug
+# Begin Custom Macros
+OutDir=.\Debug
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : "$(OUTDIR)\Client.exe"
+
+!ELSE
+
+ALL : "Calculator - Win32 Debug" "$(OUTDIR)\Client.exe"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"Calculator - Win32 DebugCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\Calc.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(OUTDIR)\Client.exe"
+ -@erase "$(OUTDIR)\Client.ilk"
+ -@erase "$(OUTDIR)\Client.pdb"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(TUSCANY_SDOCPP)/include" /I "$(TUSCANY_SCACPP)/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\Client.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=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:"$(OUTDIR)\Client.pdb" /debug /machine:I386 /out:"$(OUTDIR)\Client.exe" /pdbtype:sept /libpath:"$(TUSCANY_SDOCPP)/lib" /libpath:"$(TUSCANY_SCACPP)/lib"
+LINK32_OBJS= \
+ "$(INTDIR)\Calc.obj" \
+ "..\Calculator\Debug\Calculator.lib"
+
+"$(OUTDIR)\Client.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+SOURCE="$(InputPath)"
+DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
+
+ALL : $(DS_POSTBUILD_DEP)
+
+# Begin Custom Macros
+OutDir=.\Debug
+# End Custom Macros
+
+$(DS_POSTBUILD_DEP) : "Calculator - Win32 Debug" "$(OUTDIR)\Client.exe"
+ ..\deploy.cmd Debug
+ echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
+
+!ENDIF
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("Client.dep")
+!INCLUDE "Client.dep"
+!ELSE
+!MESSAGE Warning: cannot find "Client.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "Client - Win32 Release" || "$(CFG)" == "Client - Win32 Debug"
+SOURCE=..\..\..\..\..\Calculator\Client\Calc.cpp
+
+"$(INTDIR)\Calc.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!IF "$(CFG)" == "Client - Win32 Release"
+
+"Calculator - Win32 Release" :
+ cd "..\Calculator"
+ $(MAKE) /$(MAKEFLAGS) /F .\Calculator.mak CFG="Calculator - Win32 Release"
+ cd "..\Client"
+
+"Calculator - Win32 ReleaseCLEAN" :
+ cd "..\Calculator"
+ $(MAKE) /$(MAKEFLAGS) /F .\Calculator.mak CFG="Calculator - Win32 Release" RECURSE=1 CLEAN
+ cd "..\Client"
+
+!ELSEIF "$(CFG)" == "Client - Win32 Debug"
+
+"Calculator - Win32 Debug" :
+ cd "..\Calculator"
+ $(MAKE) /$(MAKEFLAGS) /F .\Calculator.mak CFG="Calculator - Win32 Debug"
+ cd "..\Client"
+
+"Calculator - Win32 DebugCLEAN" :
+ cd "..\Calculator"
+ $(MAKE) /$(MAKEFLAGS) /F .\Calculator.mak CFG="Calculator - Win32 Debug" RECURSE=1 CLEAN
+ cd "..\Client"
+
+!ENDIF
+
+
+!ENDIF
+
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/WSClient/BuildInstructions.txt b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/WSClient/BuildInstructions.txt
new file mode 100644
index 0000000000..ff50bdbedc
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/WSClient/BuildInstructions.txt
@@ -0,0 +1,93 @@
+
+These sample projects will build:
+
+A basic calculator SCA service.
+A client to test that service.
+A WSClient to test the service as exposed by AXIS2C as a web service.
+
+The sample depdends on the current versions of Tuscany SDO and Tuscany SCA, which in turn
+depend on axis2c version 0.92, and libxml2. See the SCA and SDO project installation
+details.
+
+The sample already has the pre-generated proxy and wrapper code in it, but should
+you need to regenerate these, you will need the command line tool "scagen" which is
+part of the Tuscany SCA project.
+
+The projects expect to following environment variables to be set:
+TUSCANY_SCACPP:
+The directory in which the sca runtime is deployed - probably something ending in sca/deploy.
+
+TUSCANY_SDOCPP:
+The directory where the sdo runtime is deployed - probably something ending in sdo/deploy.
+
+TUSCANY_SCACPP_DEFAULT_MODULE=CalculatorSubsystem
+This is the default module to be loaded by SCA. It consists of <subsystem>/<component>
+
+TUSCANY_SCACPP_SYSTEM_ROOT
+This is the point from which SCA will start looking for modules to load. Again this is
+set programmatically by the sample.
+
+AXIS2C_HOME:
+This is where axis2c is deployed- this is only required by the WSClient project.
+
+The Calculator project contains a simple calculator service, and the descriptive files
+which help the runtime to find the service.
+
+
+Rebuilding the proxy and wrapper classes
+========================================
+
+If required, go to the Calculator sample main directory, and
+type:
+"scagen -dir CalculatorModule -output CalculatorModule"
+
+The generated code is put into the CalculatorModule subdirectory.
+
+Building the Client project
+===========================
+
+Set the active project to be "Client", and then build all.
+This will re-build Calculator, then rebuild the Client,
+The final step of the build will call a batch file "deploy.cmd",
+which copies all the required files to the directory samples/Calculator/deploy
+
+Use Project..Settings..Debug and check the path to the executable, check also the
+path to the working directory. Alter these to match your configuration.
+
+Run the project, and your SCA service should be called.
+
+Building the WSClient project
+=============================
+
+Modify the services.xml file, and make the SCA system root defined
+within it comply with your SCA system root.
+
+Set the active project to WSClient and build all.
+
+The last step of the build will run a wsdeploy script, which
+tries to use the environment variable AXIS2C_HOME, to create
+a services/Calculator directory, and deploy the services.xml file.
+The dll which resolves SCA services is called
+tuscany_sca_ws_service.dll - this will be copied to the axis
+tree by the same script file.
+
+To run the axis2 http server, go to the %AXIS2C_HOME%/bin
+directory, and launch the executable.
+
+Now verify that the path to the WSClient executable makes sense
+in your project settings, and run the project.
+
+
+Note
+====
+
+It can be quite hard to debug services which are invoked through axis, as the
+dll including the service is loaded on call. One useful technique is to
+load the axis http server in visual studio (create an empty project and make
+the executable path point to axis2_http_server.exe).
+Now use the Project..Settings..Debug..Addition DLLs option and add
+services/Calculator/tuscany_sca_ws_service.dll.
+You will now be able to set breakpoints in the dll (Axis2EntryPointService_invoke
+is a good place - in Axis2EntryPointService_skeleton.cpp).
+Run your WSclient from another debugger, and the server debugger will break
+on the service code.
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/WSClient/WSClient.dsp b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/WSClient/WSClient.dsp
new file mode 100644
index 0000000000..5b3739598a
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/WSClient/WSClient.dsp
@@ -0,0 +1,122 @@
+# Microsoft Developer Studio Project File - Name="WSClient" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=WSClient - 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 "WSClient.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 "WSClient.mak" CFG="WSClient - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "WSClient - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "WSClient - 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)" == "WSClient - 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 /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# 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 tuscany_sca.lib tuscany_sdo.lib axis2_engine.lib axis2_parser.lib axis2_util.lib axiom.lib /nologo /subsystem:console /machine:I386 /libpath:"$(TUSCANY_SCACPP)\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=..\wsdeploy.cmd Release
+# End Special Build Tool
+
+!ELSEIF "$(CFG)" == "WSClient - 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 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 "$(AXIS2C_HOME)/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# SUBTRACT CPP /YX
+# 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_sca.lib tuscany_sdo.lib axis2_engine.lib axis2_parser.lib axis2_util.lib axiom.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"$(TUSCANY_SCACPP)\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=..\wsdeploy.cmd Debug
+# End Special Build Tool
+
+!ENDIF
+
+# Begin Target
+
+# Name "WSClient - Win32 Release"
+# Name "WSClient - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\WSClient\axis2_Calculator_stub.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\WSClient\axis2_Calculator_stub.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\Calculator\WSClient\Calculator_Client.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
+# Begin Source File
+
+SOURCE=.\BuildInstructions.txt
+# End Source File
+# End Target
+# End Project
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/WSClient/WSClient.mak b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/WSClient/WSClient.mak
new file mode 100644
index 0000000000..4ce51c68bb
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/WSClient/WSClient.mak
@@ -0,0 +1,298 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on WSClient.dsp
+!IF "$(CFG)" == ""
+CFG=WSClient - Win32 Debug
+!MESSAGE No configuration specified. Defaulting to WSClient - Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "WSClient - Win32 Release" && "$(CFG)" != "WSClient - Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!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 "WSClient.mak" CFG="WSClient - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "WSClient - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "WSClient - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+!IF "$(CFG)" == "WSClient - Win32 Release"
+
+OUTDIR=.\Release
+INTDIR=.\Release
+# Begin Custom Macros
+OutDir=.\Release
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : "$(OUTDIR)\WSClient.exe"
+
+!ELSE
+
+ALL : "Client - Win32 Release" "Calculator - Win32 Release" "$(OUTDIR)\WSClient.exe"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"Calculator - Win32 ReleaseCLEAN" "Client - Win32 ReleaseCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\axis2_Calculator_stub.obj"
+ -@erase "$(INTDIR)\Calculator_Client.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(OUTDIR)\WSClient.exe"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\WSClient.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=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_sca.lib tuscany_sdo.lib axis2_engine.lib axis2_parser.lib axis2_util.lib axiom.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\WSClient.pdb" /machine:I386 /out:"$(OUTDIR)\WSClient.exe" /libpath:"$(TUSCANY_SCACPP)\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib"
+LINK32_OBJS= \
+ "$(INTDIR)\axis2_Calculator_stub.obj" \
+ "$(INTDIR)\Calculator_Client.obj" \
+ "..\Calculator\Release\Calculator.lib"
+
+"$(OUTDIR)\WSClient.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+SOURCE="$(InputPath)"
+DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
+
+ALL : $(DS_POSTBUILD_DEP)
+
+# Begin Custom Macros
+OutDir=.\Release
+# End Custom Macros
+
+$(DS_POSTBUILD_DEP) : "Client - Win32 Release" "Calculator - Win32 Release" "$(OUTDIR)\WSClient.exe"
+ ..\wsdeploy.cmd Release
+ echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
+
+!ELSEIF "$(CFG)" == "WSClient - Win32 Debug"
+
+OUTDIR=.\Debug
+INTDIR=.\Debug
+# Begin Custom Macros
+OutDir=.\Debug
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : "$(OUTDIR)\WSClient.exe"
+
+!ELSE
+
+ALL : "Client - Win32 Debug" "Calculator - Win32 Debug" "$(OUTDIR)\WSClient.exe"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"Calculator - Win32 DebugCLEAN" "Client - Win32 DebugCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\axis2_Calculator_stub.obj"
+ -@erase "$(INTDIR)\Calculator_Client.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(OUTDIR)\WSClient.exe"
+ -@erase "$(OUTDIR)\WSClient.ilk"
+ -@erase "$(OUTDIR)\WSClient.pdb"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MLd /W3 /Gm /GX /ZI /Od /I "$(TUSCANY_SDOCPP)/include" /I "$(AXIS2C_HOME)/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\WSClient.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=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_sca.lib tuscany_sdo.lib axis2_engine.lib axis2_parser.lib axis2_util.lib axiom.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\WSClient.pdb" /debug /machine:I386 /out:"$(OUTDIR)\WSClient.exe" /pdbtype:sept /libpath:"$(TUSCANY_SCACPP)\lib" /libpath:"$(TUSCANY_SDOCPP)\lib" /libpath:"$(AXIS2C_HOME)\lib"
+LINK32_OBJS= \
+ "$(INTDIR)\axis2_Calculator_stub.obj" \
+ "$(INTDIR)\Calculator_Client.obj" \
+ "..\Calculator\Debug\Calculator.lib"
+
+"$(OUTDIR)\WSClient.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+SOURCE="$(InputPath)"
+DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
+
+ALL : $(DS_POSTBUILD_DEP)
+
+# Begin Custom Macros
+OutDir=.\Debug
+# End Custom Macros
+
+$(DS_POSTBUILD_DEP) : "Client - Win32 Debug" "Calculator - Win32 Debug" "$(OUTDIR)\WSClient.exe"
+ ..\wsdeploy.cmd Debug
+ echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
+
+!ENDIF
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("WSClient.dep")
+!INCLUDE "WSClient.dep"
+!ELSE
+!MESSAGE Warning: cannot find "WSClient.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "WSClient - Win32 Release" || "$(CFG)" == "WSClient - Win32 Debug"
+SOURCE=..\..\..\..\..\Calculator\WSClient\axis2_Calculator_stub.cpp
+
+"$(INTDIR)\axis2_Calculator_stub.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\..\..\..\Calculator\WSClient\Calculator_Client.cpp
+
+"$(INTDIR)\Calculator_Client.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!IF "$(CFG)" == "WSClient - Win32 Release"
+
+"Calculator - Win32 Release" :
+ cd "..\Calculator"
+ $(MAKE) /$(MAKEFLAGS) /F .\Calculator.mak CFG="Calculator - Win32 Release"
+ cd "..\WSClient"
+
+"Calculator - Win32 ReleaseCLEAN" :
+ cd "..\Calculator"
+ $(MAKE) /$(MAKEFLAGS) /F .\Calculator.mak CFG="Calculator - Win32 Release" RECURSE=1 CLEAN
+ cd "..\WSClient"
+
+!ELSEIF "$(CFG)" == "WSClient - Win32 Debug"
+
+"Calculator - Win32 Debug" :
+ cd "..\Calculator"
+ $(MAKE) /$(MAKEFLAGS) /F .\Calculator.mak CFG="Calculator - Win32 Debug"
+ cd "..\WSClient"
+
+"Calculator - Win32 DebugCLEAN" :
+ cd "..\Calculator"
+ $(MAKE) /$(MAKEFLAGS) /F .\Calculator.mak CFG="Calculator - Win32 Debug" RECURSE=1 CLEAN
+ cd "..\WSClient"
+
+!ENDIF
+
+!IF "$(CFG)" == "WSClient - Win32 Release"
+
+"Client - Win32 Release" :
+ cd "..\Client"
+ $(MAKE) /$(MAKEFLAGS) /F .\Client.mak CFG="Client - Win32 Release"
+ cd "..\WSClient"
+
+"Client - Win32 ReleaseCLEAN" :
+ cd "..\Client"
+ $(MAKE) /$(MAKEFLAGS) /F .\Client.mak CFG="Client - Win32 Release" RECURSE=1 CLEAN
+ cd "..\WSClient"
+
+!ELSEIF "$(CFG)" == "WSClient - Win32 Debug"
+
+"Client - Win32 Debug" :
+ cd "..\Client"
+ $(MAKE) /$(MAKEFLAGS) /F .\Client.mak CFG="Client - Win32 Debug"
+ cd "..\WSClient"
+
+"Client - Win32 DebugCLEAN" :
+ cd "..\Client"
+ $(MAKE) /$(MAKEFLAGS) /F .\Client.mak CFG="Client - Win32 Debug" RECURSE=1 CLEAN
+ cd "..\WSClient"
+
+!ENDIF
+
+
+!ENDIF
+
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/build.cmd b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/build.cmd
new file mode 100644
index 0000000000..4590d670f0
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/build.cmd
@@ -0,0 +1,21 @@
+@echo off
+
+@REM Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM 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, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+setlocal
+call vcvars32
+cd WSClient
+nmake -f WSClient.mak CFG="WSClient - Win32 Release"
+cd ..
+endlocal
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/deploy.cmd b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/deploy.cmd
new file mode 100644
index 0000000000..864dca4652
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/deploy.cmd
@@ -0,0 +1,61 @@
+@echo off
+
+@REM Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM 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, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+rem Will copy the correct files from the source tree for packaging and deployment of the
+rem SCA sample.
+setlocal
+set currentPath=%~d0%~p0
+set sourcePath=%currentPath%..\..\..\..\Calculator
+
+set buildMode=Release
+if .Debug == .%1 (
+set buildMode=Debug
+)
+
+
+if . == %2. (
+set destinationPath=%sourcePath%\deploy
+) ELSE (
+set destinationPath=%2
+)
+
+if not exist %destinationPath%\modules mkdir %destinationPath%\modules
+if not exist %destinationPath%\modules\CalculatorModule mkdir %destinationPath%\modules\CalculatorModule
+
+copy %sourcePath%\CalculatorModule\*.componentType %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\sca.module %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\Calculator.h %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\CalculatorImpl.h %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\DivideService.h %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\DivideServiceImpl.h %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\Tuscany-model.config %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\Calculator.wsdl %destinationPath%\modules\CalculatorModule
+copy %currentPath%\Calculator\%buildMode%\Calculator.dll %destinationPath%\modules\CalculatorModule
+
+if not exist %destinationPath%\bin mkdir %destinationPath%\bin
+copy %currentPath%\Client\%buildMode%\Client.exe %destinationPath%\bin
+if %buildMode% == Debug (
+copy %currentPath%\Client\%buildMode%\Client.pdb %destinationPath%\bin
+)
+copy %sourcePath%\Client\runclient.cmd %destinationPath%\bin
+
+
+if not exist %destinationPath%\subsystems mkdir %destinationPath%\subsystems
+if not exist %destinationPath%\subsystems\CalculatorSubsystem mkdir %destinationPath%\subsystems\CalculatorSubsystem
+
+copy %sourcePath%\CalculatorSubsystem\sca.subsystem %destinationPath%\subsystems\CalculatorSubsystem
+
+endlocal \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/wsdeploy.cmd b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/wsdeploy.cmd
new file mode 100644
index 0000000000..8d39a4c10d
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio6/projects/Calculator/wsdeploy.cmd
@@ -0,0 +1,63 @@
+@echo off
+
+@REM Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM 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, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+rem Will copy the correct files from the source tree for packaging and deployment of the
+rem SCA sample.
+setlocal
+set currentPath=%~d0%~p0
+set sourcePath=%currentPath%..\..\..\..\Calculator
+
+set buildMode=Release
+if .Debug == .%1 (
+set buildMode=Debug
+)
+
+
+if . == %2. (
+set destinationPath=%sourcePath%\deploy
+) ELSE (
+set destinationPath=%2
+)
+
+
+if not exist %destinationPath%\modules mkdir %destinationPath%\modules
+if not exist %destinationPath%\modules\CalculatorModule mkdir %destinationPath%\modules\CalculatorModule
+
+copy %sourcePath%\CalculatorModule\*.componentType %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\sca.module %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\Calculator.h %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\CalculatorImpl.h %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\DivideService.h %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\DivideServiceImpl.h %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\Tuscany-model.config %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\Calculator.wsdl %destinationPath%\modules\CalculatorModule
+copy %currentPath%\Calculator\%buildMode%\Calculator.dll %destinationPath%\modules\CalculatorModule
+
+if not exist %destinationPath%\bin mkdir %destinationPath%\bin
+copy %currentPath%\WSClient\%buildMode%\WSClient.exe %destinationPath%\bin
+if %buildMode% == Debug (
+copy %currentPath%\WSClient\%buildMode%\WSClient.pdb %destinationPath%\bin
+)
+copy %sourcePath%\WSClient\runwsclient.cmd %destinationPath%\bin
+
+
+if not exist %destinationPath%\subsystems mkdir %destinationPath%\subsystems
+if not exist %destinationPath%\subsystems\CalculatorSubsystem mkdir %destinationPath%\subsystems\CalculatorSubsystem
+
+copy %sourcePath%\CalculatorSubsystem\sca.subsystem %destinationPath%\subsystems\CalculatorSubsystem
+
+
+endlocal \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/Calculator.sln b/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/Calculator.sln
new file mode 100644
index 0000000000..07c78db063
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/Calculator.sln
@@ -0,0 +1,35 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Calculator", "Calculator\Calculator.vcproj", "{B1C1917A-4423-456D-9F68-3C600C885A1F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Client", "Client\Client.vcproj", "{CA2CB545-D0E2-416C-BE93-90BC4DD82B90}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WSClient", "WSClient\WSClient.vcproj", "{3CDD5BC2-9722-4F7D-8B0E-1A49D34E7A17}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = Debug
+ ConfigName.1 = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ {CA2CB545-D0E2-416C-BE93-90BC4DD82B90}.0 = {B1C1917A-4423-456D-9F68-3C600C885A1F}
+ {3CDD5BC2-9722-4F7D-8B0E-1A49D34E7A17}.0 = {B1C1917A-4423-456D-9F68-3C600C885A1F}
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {B1C1917A-4423-456D-9F68-3C600C885A1F}.Debug.ActiveCfg = Debug|Win32
+ {B1C1917A-4423-456D-9F68-3C600C885A1F}.Debug.Build.0 = Debug|Win32
+ {B1C1917A-4423-456D-9F68-3C600C885A1F}.Release.ActiveCfg = Release|Win32
+ {B1C1917A-4423-456D-9F68-3C600C885A1F}.Release.Build.0 = Release|Win32
+ {CA2CB545-D0E2-416C-BE93-90BC4DD82B90}.Debug.ActiveCfg = Debug|Win32
+ {CA2CB545-D0E2-416C-BE93-90BC4DD82B90}.Debug.Build.0 = Debug|Win32
+ {CA2CB545-D0E2-416C-BE93-90BC4DD82B90}.Release.ActiveCfg = Release|Win32
+ {CA2CB545-D0E2-416C-BE93-90BC4DD82B90}.Release.Build.0 = Release|Win32
+ {3CDD5BC2-9722-4F7D-8B0E-1A49D34E7A17}.Debug.ActiveCfg = Debug|Win32
+ {3CDD5BC2-9722-4F7D-8B0E-1A49D34E7A17}.Debug.Build.0 = Debug|Win32
+ {3CDD5BC2-9722-4F7D-8B0E-1A49D34E7A17}.Release.ActiveCfg = Release|Win32
+ {3CDD5BC2-9722-4F7D-8B0E-1A49D34E7A17}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/Calculator.suo b/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/Calculator.suo
new file mode 100644
index 0000000000..cee3b2f73d
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/Calculator.suo
Binary files differ
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/Calculator/Calculator.vcproj b/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/Calculator/Calculator.vcproj
new file mode 100644
index 0000000000..5a081e088b
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/Calculator/Calculator.vcproj
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.00"
+ Name="Calculator"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="$(TUSCANY_SDOCPP)/include,$(TUSCANY_SCACPP)/include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CALCULATOR_EXPORTS"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/Calculator.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib"
+ OutputFile=".\Debug/Calculator.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="$(TUSCANY_SDOCPP)/lib,$(TUSCANY_SCACPP)/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/Calculator.pdb"
+ ImportLibrary=".\Debug/Calculator.lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/Calculator.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(TUSCANY_SDOCPP)/include,$(TUSCANY_SCACPP)/include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CALCULATOR_EXPORTS"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/Calculator.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib"
+ OutputFile=".\Release/Calculator.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="$(TUSCANY_SDOCPP)/lib,$(TUSCANY_SCACPP)/lib"
+ ProgramDatabaseFile=".\Release/Calculator.pdb"
+ ImportLibrary=".\Release/Calculator.lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/Calculator.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ </Configurations>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\Calculator.h">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl.h">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl_CalculatorDivideService_Proxy.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl_CalculatorDivideService_Proxy.h">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl_CalculatorService_Proxy.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl_CalculatorService_Proxy.h">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl_CalculatorService_Wrapper.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\CalculatorImpl_CalculatorService_Wrapper.h">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\DivideService.h">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\DivideServiceImpl.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\DivideServiceImpl.h">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\DivideServiceImpl_DivideService_Proxy.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\DivideServiceImpl_DivideService_Proxy.h">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\DivideServiceImpl_DivideService_Wrapper.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\DivideServiceImpl_DivideService_Wrapper.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\Calculator.wsdl">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCustomBuildTool"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCustomBuildTool"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\Tuscany-model.config">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\sca.module">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorSubsystem\sca.subsystem">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\CalculatorModule\services.xml">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/Client/Client.vcproj b/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/Client/Client.vcproj
new file mode 100644
index 0000000000..0988c9a18c
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/Client/Client.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.00"
+ Name="Client"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="$(TUSCANY_SDOCPP)/include,$(TUSCANY_SCACPP)/include"
+ PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile=".\Debug/Client.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib tuscany_sdo.lib tuscany_sca.lib"
+ OutputFile="./Debug/Client.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="$(TUSCANY_SDOCPP)/lib,$(TUSCANY_SCACPP)/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/Calc.pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/Client.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="..\deploy.cmd Debug"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(TUSCANY_SDOCPP)/include,$(TUSCANY_SCACPP)/include"
+ PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/Client.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib tuscany_sdo.lib tuscany_sca.lib"
+ OutputFile=".\Release/Client.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="$(TUSCANY_SDOCPP)/lib,$(TUSCANY_SCACPP)/lib"
+ ProgramDatabaseFile=".\Release/Client.pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/Client.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="..\deploy.cmd Release"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ </Configurations>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+ <File
+ RelativePath="..\..\..\..\..\Calculator\Client\Calc.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\Client\Calculator.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl">
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/WSClient/BuildInstructions.txt b/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/WSClient/BuildInstructions.txt
new file mode 100644
index 0000000000..3716551f14
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/WSClient/BuildInstructions.txt
@@ -0,0 +1,95 @@
+
+These sample projects will build:
+
+A basic calculator SCA service.
+A client to test that service.
+A WSClient to test the service as exposed by AXIS2C as a web service.
+
+The sample depdends on the current versions of Tuscany SDO and Tuscany SCA, which in turn
+depend on axis2c version 0.92, and libxml2. See the SCA and SDO project installation
+details.
+
+The sample already has the pre-generated proxy and wrapper code in it, but should
+you need to regenerate these, you will need the command line tool "scagen" which is
+part of the Tuscany SCA project.
+
+The projects expect to following environment variables to be set:
+TUSCANY_SCACPP:
+The directory in which the sca runtime is deployed - probably something ending in sca/deploy.
+
+TUSCANY_SDOCPP:
+The directory where the sdo runtime is deployed - probably something ending in sdo/deploy.
+
+TUSCANY_SCACPP_DEFAULT_MODULE:
+This is the default module to be loaded by SCA. It consists of <subsystem>/<component>.
+In the case of this sample - its set programatically by the client - thats easier when
+using visual studio.
+
+TUSCANY_SCACPP_SYSTEM_ROOT
+This is the point from which SCA will start looking for modules to load. Again this is
+set programmatically by the sample.
+
+AXIS2C_HOME:
+This is where axis2c is deployed- this is only required by the WSClient project.
+
+The Calculator project contains a simple calculator service, and the descriptive files
+which help the runtime to find the service.
+
+
+Rebuilding the proxy and wrapper classes
+========================================
+
+If required, go to the Calculator sample main directory, and
+type:
+"scagen -dir CalculatorModule -output CalculatorModule"
+
+The generated code is put into the CalculatorModule subdirectory.
+
+Building the Client project
+===========================
+
+Set the active project to be "Client", and then build all.
+This will re-build Calculator, then rebuild the Client,
+The final step of the build will call a batch file "deploy.cmd",
+which copies all the required files to the directory samples/Calculator/deploy
+
+Use Project..Settings..Debug and check the path to the executable, check also the
+path to the working directory. Alter these to match your configuration.
+
+Run the project, and your SCA service should be called.
+
+Building the WSClient project
+=============================
+
+Modify the services.xml file, and make the SCA system root defined
+within it comply with your SCA system root.
+
+Set the active project to WSClient and build all.
+
+The last step of the build will run a wsdeploy script, which
+tries to use the environment variable AXIS2C_HOME, to create
+a services/Calculator directory, and deploy the services.xml file.
+The dll which resolves SCA services is called
+tuscany_sca_ws_service.dll - this will be copied to the axis
+tree by the same script file.
+
+To run the axis2 http server, go to the %AXIS2C_HOME%/bin
+directory, and launch the executable.
+
+Now verify that the path to the WSClient executable makes sense
+in your project settings, and run the project.
+
+
+Note
+====
+
+It can be quite hard to debug services which are invoked through axis, as the
+dll including the service is loaded on call. One useful technique is to
+load the axis http server in visual studio (create an empty project and make
+the executable path point to axis2_http_server.exe).
+Now use the Project..Settings..Debug..Addition DLLs option and add
+services/Calculator/tuscany_sca_ws_service.dll.
+You will now be able to set breakpoints in the dll (Axis2EntryPointService_invoke
+is a good place - in Axis2EntryPointService_skeleton.cpp).
+Run your WSclient from another debugger, and the server debugger will break
+on the service code.
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/WSClient/WSClient.vcproj b/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/WSClient/WSClient.vcproj
new file mode 100644
index 0000000000..f76277238b
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/WSClient/WSClient.vcproj
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.00"
+ Name="WSClient"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="$(TUSCANY_SCACPP),$(TUSCANY_SDOCPP)/include,$(AXIS2C_HOME)/include"
+ PreprocessorDefinitions="WIN32,_DEBUG,_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/WSClient.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib axis2_engine.lib axis2_parser.lib axis2_util.lib axiom.lib"
+ OutputFile=".\Debug/WSClient.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="$(TUSCANY_SCACPP)\lib,$(TUSCANY_SDOCPP)\lib,$(AXIS2C_HOME)\lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/WSClient.pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/WSClient.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="..\wsdeploy.cmd Debug"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="$(TUSCANY_SCACPP),$(TUSCANY_SDOCPP)/include,$(AXIS2C_HOME)/include"
+ PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/WSClient.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib tuscany_sca.lib tuscany_sdo.lib axis2_engine.lib axis2_parser.lib axis2_util.lib axiom.lib"
+ OutputFile=".\Release/WSClient.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="$(TUSCANY_SCACPP)\lib,$(TUSCANY_SDOCPP)\lib,$(AXIS2C_HOME)\lib"
+ ProgramDatabaseFile=".\Release/WSClient.pdb"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/WSClient.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="..\wsdeploy.cmd Release"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ </Configurations>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+ <File
+ RelativePath="..\..\..\..\..\Calculator\WSClient\Calculator_Client.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\WSClient\axis2_Calculator_stub.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\Calculator\WSClient\axis2_Calculator_stub.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl">
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+ </Filter>
+ <File
+ RelativePath=".\BuildInstructions.txt">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/deploy.cmd b/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/deploy.cmd
new file mode 100644
index 0000000000..b7b7ba1c05
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/deploy.cmd
@@ -0,0 +1,61 @@
+@echo off
+
+@REM Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM 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, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+rem Will copy the correct files from the source tree for packaging and deployment of the
+rem SCA sample.
+setlocal
+set currentPath=%~d0%~p0
+set sourcePath=%currentPath%..\..\..\..\Calculator
+
+set buildMode=Release
+if .Debug == %1. (
+set buildMode=Debug
+)
+
+
+if . == %2. (
+set destinationPath=%sourcePath%\deploy
+) ELSE (
+set destinationPath=%2
+)
+
+if not exist %destinationPath%\modules mkdir %destinationPath%\modules
+if not exist %destinationPath%\modules\CalculatorModule mkdir %destinationPath%\modules\CalculatorModule
+
+copy %sourcePath%\CalculatorModule\*.componentType %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\sca.module %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\Calculator.h %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\CalculatorImpl.h %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\DivideService.h %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\DivideServiceImpl.h %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\Tuscany-model.config %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\Calculator.wsdl %destinationPath%\modules\CalculatorModule
+copy %currentPath%\Calculator\%buildMode%\Calculator.dll %destinationPath%\modules\CalculatorModule
+
+if not exist %destinationPath%\bin mkdir %destinationPath%\bin
+copy %currentPath%\Client\%buildMode%\Client.exe %destinationPath%\bin
+if %buildMode% == Debug (
+copy %currentPath%\Client\%buildMode%\Client.pdb %destinationPath%\bin
+)
+copy %sourcePath%\Client\runclient.cmd %destinationPath%\bin
+
+
+if not exist %destinationPath%\subsystems mkdir %destinationPath%\subsystems
+if not exist %destinationPath%\subsystems\CalculatorSubsystem mkdir %destinationPath%\subsystems\CalculatorSubsystem
+
+copy %sourcePath%\CalculatorSubsystem\sca.subsystem %destinationPath%\subsystems\CalculatorSubsystem
+
+endlocal \ No newline at end of file
diff --git a/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/wsdeploy.cmd b/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/wsdeploy.cmd
new file mode 100644
index 0000000000..68a5090820
--- /dev/null
+++ b/branches/cpp-M1/sca/samples/ides/devstudio7/projects/Calculator/wsdeploy.cmd
@@ -0,0 +1,63 @@
+@echo off
+
+@REM Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM 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, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+rem Will copy the correct files from the source tree for packaging and deployment of the
+rem SCA sample.
+setlocal
+set currentPath=%~d0%~p0
+set sourcePath=%currentPath%..\..\..\..\Calculator
+
+set buildMode=Release
+if .Debug == %1. (
+set buildMode=Debug
+)
+
+
+if . == %2. (
+set destinationPath=%sourcePath%\deploy
+) ELSE (
+set destinationPath=%2
+)
+
+
+if not exist %destinationPath%\modules mkdir %destinationPath%\modules
+if not exist %destinationPath%\modules\CalculatorModule mkdir %destinationPath%\modules\CalculatorModule
+
+copy %sourcePath%\CalculatorModule\*.componentType %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\sca.module %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\Calculator.h %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\CalculatorImpl.h %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\DivideService.h %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\DivideServiceImpl.h %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\Tuscany-model.config %destinationPath%\modules\CalculatorModule
+copy %sourcePath%\CalculatorModule\Calculator.wsdl %destinationPath%\modules\CalculatorModule
+copy %currentPath%\Calculator\%buildMode%\Calculator.dll %destinationPath%\modules\CalculatorModule
+
+if not exist %destinationPath%\bin mkdir %destinationPath%\bin
+copy %currentPath%\WSClient\%buildMode%\WSClient.exe %destinationPath%\bin
+if %buildMode% == Debug (
+copy %currentPath%\WSClient\%buildMode%\WSClient.pdb %destinationPath%\bin
+)
+copy %sourcePath%\WSClient\runwsclient.cmd %destinationPath%\bin
+
+
+if not exist %destinationPath%\subsystems mkdir %destinationPath%\subsystems
+if not exist %destinationPath%\subsystems\CalculatorSubsystem mkdir %destinationPath%\subsystems\CalculatorSubsystem
+
+copy %sourcePath%\CalculatorSubsystem\sca.subsystem %destinationPath%\subsystems\CalculatorSubsystem
+
+
+endlocal \ No newline at end of file
diff --git a/branches/cpp-M1/sca/scatest.bat b/branches/cpp-M1/sca/scatest.bat
new file mode 100644
index 0000000000..42e56a6189
--- /dev/null
+++ b/branches/cpp-M1/sca/scatest.bat
@@ -0,0 +1,45 @@
+@echo off
+
+@REM Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM 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, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+
+
+@setlocal
+
+if "%TUSCANY_SCACPP%" == "" (
+echo "TUSCANY_SCACPP not set"
+set TUSCANY_SCACPP=%cd%\deploy
+)
+echo using TUSCANY_SCACPP: %TUSCANY_SCACPP%
+
+if "%AXIS2C_HOME%" == "" (
+echo "AXIS2C_HOME not set"
+goto end
+)
+echo using Axis2C: %AXIS2C_HOME%"
+
+if "%TUSCANY_SDOCPP%" == "" (
+echo "TUSCANY_SDOCPP not set"
+goto end
+)
+echo using TUSCANY_SDOCPP: %TUSCANY_SDOCPP%
+
+set TUSCANY_SCACPP_SYSTEM_ROOT=%cd%\projects\tuscany_sca\tuscany_sca_test\testSCASystem
+set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH%
+
+cd projects\tuscany_sca\tuscany_sca_test
+Release\tuscany_sca_test
+:end
+@endlocal
diff --git a/branches/cpp-M1/sca/scatest.sh b/branches/cpp-M1/sca/scatest.sh
new file mode 100755
index 0000000000..e2924678a9
--- /dev/null
+++ b/branches/cpp-M1/sca/scatest.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+# 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.
+
+
+SCA4CPP_HOME=`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_ROOT=$SCA4CPP_HOME/runtime/core/test
+
+export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_ROOT
+
+export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH
+
+cd $TUSCANY_SCACPP/bin/test
+./tuscany_sca_test
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestClient/WSEntryPointTestClient.c b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestClient/WSEntryPointTestClient.c
new file mode 100644
index 0000000000..66e90c2fc2
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestClient/WSEntryPointTestClient.c
@@ -0,0 +1,414 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * 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 <stdio.h>
+#include <axiom.h>
+#include <axis2_util.h>
+#include <axiom_soap.h>
+#include <axis2_client.h>
+
+axiom_node_t *
+build_om_payload_for_doDataObject(axis2_env_t *env);
+
+axiom_node_t *
+build_om_payload_for_doDataObject_Failure(axis2_env_t *env);
+
+axiom_node_t *
+build_om_payload_for_doAny(axis2_env_t *env);
+
+axiom_node_t *
+build_om_payload_for_doMixed(axis2_env_t *env);
+
+axiom_node_t *
+build_om_payload_for_doSingleData(axis2_env_t *env, char* name, char* data);
+
+void runCall(axis2_env_t* env, char* endpoint, char* opName, axiom_node_t* payload, int expectFailure);
+
+int main(int argc, char** argv)
+{
+ axis2_env_t *env = NULL;
+ axis2_char_t *address = NULL;
+ axis2_endpoint_ref_t* endpoint_ref = NULL;
+ axis2_options_t *options = NULL;
+ axis2_char_t *client_home = NULL;
+ axis2_svc_client_t* svc_client = NULL;
+ axiom_node_t *payload = NULL;
+ axiom_node_t *ret_node = NULL;
+
+ /* Set up the envioronment */
+ env = axis2_env_create_all("wsentrypointtest.log", AXIS2_LOG_LEVEL_TRACE);
+
+ /* Set end point reference of echo service */
+ address = "http://localhost:9090/axis2/services/WSEntryPointTest";
+ if (argc > 1 )
+ address = argv[1];
+ if (AXIS2_STRCMP(address, "-h") == 0)
+ {
+ printf("Usage : %s [endpoint_url]\n", argv[0]);
+ printf("use -h for help\n");
+ return 0;
+ }
+ printf ("Using endpoint : %s\n", address);
+
+
+ /* do all the single data types */
+ payload = build_om_payload_for_doSingleData(env, "doChars", "Here is some char* data");
+ runCall(env, address, "doChars", payload, 0);
+ payload = build_om_payload_for_doSingleData(env, "doLong", "123456789");
+ runCall(env, address, "doLong", payload, 0);
+ payload = build_om_payload_for_doSingleData(env, "doInt", "123456789");
+ runCall(env, address, "doInt", payload, 0);
+ payload = build_om_payload_for_doSingleData(env, "doFloat", "123.45");
+ runCall(env, address, "doFloat", payload, 0);
+ payload = build_om_payload_for_doSingleData(env, "doLongDouble", "12345.67891");
+ runCall(env, address, "doLongDouble", payload, 0);
+ payload = build_om_payload_for_doSingleData(env, "doDouble", "1234.4567");
+ runCall(env, address, "doDouble", payload, 0);
+ payload = build_om_payload_for_doSingleData(env, "doBool", "true");
+ runCall(env, address, "doBool", payload, 0);
+ payload = build_om_payload_for_doSingleData(env, "doShort", "12345");
+ runCall(env, address, "doShort", payload, 0);
+ payload = build_om_payload_for_doSingleData(env, "doBytes", "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef");
+ runCall(env, address, "doBytes", payload, 0);
+ payload = build_om_payload_for_doSingleData(env, "doByte", "66");
+ runCall(env, address, "doByte", payload, 0);
+ payload = build_om_payload_for_doDataObject(env);
+ runCall(env, address, "doDataObject", payload, 0);
+ payload = build_om_payload_for_doMixed(env);
+ runCall(env, address, "doMixed", payload, 0);
+ payload = build_om_payload_for_doAny(env);
+ runCall(env, address, "doAny", payload, 0);
+
+ payload = build_om_payload_for_doDataObject_Failure(env);
+ runCall(env, address, "doDataObject", payload, 1);
+
+ return 0;
+}
+
+void runCall(axis2_env_t *env, char* endpoint, char* opName, axiom_node_t* payload, int expectFailure)
+{
+ axis2_char_t *address = endpoint;
+ axis2_endpoint_ref_t* endpoint_ref = NULL;
+ axis2_options_t *options = NULL;
+ axis2_char_t *client_home = NULL;
+ axis2_svc_client_t* svc_client = NULL;
+ axiom_node_t *ret_node = NULL;
+ char action [100];
+ int len = 0;
+
+ printf("runSingleDataCall with endpoint %s, opName %s\n", endpoint, opName);
+
+ client_home = AXIS2_GETENV("AXIS2C_HOME");
+
+ /* Create EPR with given address */
+ endpoint_ref = axis2_endpoint_ref_create(env, address);
+
+ svc_client = axis2_svc_client_create(env, client_home);
+ if (!svc_client)
+ {
+ printf("Error creating service client\n");
+ 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));
+ }
+
+ options = axis2_options_create(env);
+
+ AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref);
+
+ len = sprintf(action, "http://www.WSEntryPointTest.org/WSEntryPointTest/%s", opName);
+ AXIS2_OPTIONS_SET_ACTION(options, env, action);
+
+ /* Set service client options */
+ AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, env, options);
+
+ /* Engage addressing module */
+ AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, env, AXIS2_MODULE_ADDRESSING);
+
+ /* Send request */
+ ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload);
+ if(ret_node)
+ {
+ axis2_char_t *om_str = NULL;
+ om_str = AXIOM_NODE_TO_STRING(ret_node, env);
+ if (om_str)
+ printf("\nReceived OM : %s\n", om_str);
+ printf("\nWSEntryPointTest %s invoke SUCCESSFUL!\n", opName);
+ }
+ else
+ {
+ if(expectFailure)
+ {
+ printf("\nWSEntryPointTest %s failure as expected: SUCCESSFUL!\n", opName);
+ }
+ 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("WSEntryPointTest %s invoke FAILED!\n", opName);
+ }
+ }
+
+ if (svc_client)
+ {
+ AXIS2_SVC_CLIENT_FREE(svc_client, env);
+ svc_client = NULL;
+ }
+ if (endpoint_ref)
+ {
+ AXIS2_ENDPOINT_REF_FREE(endpoint_ref, env);
+ endpoint_ref = NULL;
+ }
+}
+
+/* build SOAP request message content using OM */
+axiom_node_t *
+build_om_payload_for_doDataObject(axis2_env_t *env)
+{
+ axiom_node_t* req_om_node = NULL;
+ axiom_element_t* req_om_elem = NULL;
+ axiom_node_t* someData_om_node = NULL;
+ axiom_element_t* someData_om_elem = NULL;
+ axiom_node_t* someStringData_om_node = NULL;
+ axiom_element_t* someStringData_om_elem = NULL;
+ axiom_node_t* someIntData_om_node = NULL;
+ axiom_element_t* someIntData_om_elem = NULL;
+ axiom_node_t* someFloatData_om_node = NULL;
+ axiom_element_t* someFloatData_om_elem = NULL;
+ axiom_node_t* someDateData_om_node = NULL;
+ axiom_element_t* someDateData_om_elem = NULL;
+ axiom_node_t* someListData_om_node = NULL;
+ axiom_element_t* someListData_om_elem = NULL;
+ axiom_node_t* listItem1_om_node = NULL;
+ axiom_element_t* listItem1_om_elem = NULL;
+ axiom_node_t* listItem2_om_node = NULL;
+ axiom_element_t* listItem2_om_elem = NULL;
+ axiom_namespace_t *ns1 = NULL;
+ axis2_char_t *om_str = NULL;
+
+ ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTest/", "ns1");
+ req_om_elem = axiom_element_create(env, NULL, "doDataObject", ns1, &req_om_node);
+ someData_om_elem = axiom_element_create(env, req_om_node, "someData", ns1, &someData_om_node);
+ someStringData_om_elem = axiom_element_create(env, someData_om_node, "someStringData", ns1, &someStringData_om_node);
+ AXIOM_ELEMENT_SET_TEXT(someStringData_om_elem, env, "Here is some string data", someStringData_om_node);
+ someIntData_om_elem = axiom_element_create(env, someData_om_node, "someIntData", ns1, &someIntData_om_node);
+ AXIOM_ELEMENT_SET_TEXT(someIntData_om_elem, env, "12345678", someIntData_om_node);
+ someFloatData_om_elem = axiom_element_create(env, someData_om_node, "someFloatData", ns1, &someFloatData_om_node);
+ AXIOM_ELEMENT_SET_TEXT(someFloatData_om_elem, env, "1234.5678", someFloatData_om_node);
+ someDateData_om_elem = axiom_element_create(env, someData_om_node, "someDateData", ns1, &someDateData_om_node);
+ AXIOM_ELEMENT_SET_TEXT(someDateData_om_elem, env, "1977-06-27", someDateData_om_node);
+ someListData_om_elem = axiom_element_create(env, someData_om_node, "someListData", ns1, &someListData_om_node);
+ listItem1_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem1_om_node);
+ AXIOM_ELEMENT_SET_TEXT(listItem1_om_elem, env, "Here is list item 1", listItem1_om_node);
+ listItem2_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem2_om_node);
+ AXIOM_ELEMENT_SET_TEXT(listItem2_om_elem, env, "Here is list item 2", listItem2_om_node);
+
+ om_str = AXIOM_NODE_TO_STRING(req_om_node, env);
+ if (om_str)
+ printf("\nSending OM : %s\n", om_str);
+
+ return req_om_node;
+}
+
+/* build SOAP request message content using OM */
+axiom_node_t *
+build_om_payload_for_doDataObject_Failure(axis2_env_t *env)
+{
+ axiom_node_t* req_om_node = NULL;
+ axiom_element_t* req_om_elem = NULL;
+ axiom_node_t* someData_om_node = NULL;
+ axiom_element_t* someData_om_elem = NULL;
+ axiom_node_t* someStringData_om_node = NULL;
+ axiom_element_t* someStringData_om_elem = NULL;
+ axiom_node_t* someIntData_om_node = NULL;
+ axiom_element_t* someIntData_om_elem = NULL;
+ axiom_node_t* someFloatData_om_node = NULL;
+ axiom_element_t* someFloatData_om_elem = NULL;
+ axiom_node_t* someDateData_om_node = NULL;
+ axiom_element_t* someDateData_om_elem = NULL;
+ axiom_node_t* someListData_om_node = NULL;
+ axiom_element_t* someListData_om_elem = NULL;
+ axiom_node_t* listItem1_om_node = NULL;
+ axiom_element_t* listItem1_om_elem = NULL;
+ axiom_node_t* listItem2_om_node = NULL;
+ axiom_element_t* listItem2_om_elem = NULL;
+ axiom_namespace_t *ns1 = NULL;
+ axis2_char_t *om_str = NULL;
+
+ // Create bad Axiom doc
+ ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTest/", "ns1");
+ req_om_elem = axiom_element_create(env, NULL, "doDataObject", ns1, &req_om_node);
+ someData_om_elem = axiom_element_create(env, req_om_node, "someUnknownData", ns1, &someData_om_node);
+ someStringData_om_elem = axiom_element_create(env, someData_om_node, "someStringData", ns1, &someStringData_om_node);
+ AXIOM_ELEMENT_SET_TEXT(someStringData_om_elem, env, "Here is some string data", someStringData_om_node);
+ someIntData_om_elem = axiom_element_create(env, someData_om_node, "someIntData", ns1, &someIntData_om_node);
+ AXIOM_ELEMENT_SET_TEXT(someIntData_om_elem, env, "12345678", someIntData_om_node);
+ someFloatData_om_elem = axiom_element_create(env, someData_om_node, "someFloatData", ns1, &someFloatData_om_node);
+ AXIOM_ELEMENT_SET_TEXT(someFloatData_om_elem, env, "1234.5678", someFloatData_om_node);
+ someDateData_om_elem = axiom_element_create(env, someData_om_node, "someDateData", ns1, &someDateData_om_node);
+ AXIOM_ELEMENT_SET_TEXT(someDateData_om_elem, env, "1977-06-27", someDateData_om_node);
+ someListData_om_elem = axiom_element_create(env, someData_om_node, "someListData", ns1, &someListData_om_node);
+ listItem1_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem1_om_node);
+ AXIOM_ELEMENT_SET_TEXT(listItem1_om_elem, env, "Here is list item 1", listItem1_om_node);
+ listItem2_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem2_om_node);
+ AXIOM_ELEMENT_SET_TEXT(listItem2_om_elem, env, "Here is list item 2", listItem2_om_node);
+
+ om_str = AXIOM_NODE_TO_STRING(req_om_node, env);
+ if (om_str)
+ printf("\nSending OM : %s\n", om_str);
+
+ return req_om_node;
+}
+
+
+
+/* build SOAP request message content using OM */
+axiom_node_t *
+build_om_payload_for_doMixed(axis2_env_t *env)
+{
+ axiom_node_t* req_om_node = NULL;
+ axiom_element_t* req_om_elem = NULL;
+ axiom_node_t* arg1_om_node = NULL;
+ axiom_element_t* arg1_om_elem = NULL;
+ axiom_node_t* arg2_om_node = NULL;
+ axiom_element_t* arg2_om_elem = NULL;
+ axiom_node_t* arg3_om_node = NULL;
+ axiom_element_t* arg3_om_elem = NULL;
+ axiom_node_t* arg4_om_node = NULL;
+ axiom_element_t* arg4_om_elem = NULL;
+ axiom_node_t* arg5_om_node = NULL;
+ axiom_element_t* arg5_om_elem = NULL;
+ axiom_node_t* someStringData_om_node = NULL;
+ axiom_element_t* someStringData_om_elem = NULL;
+ axiom_node_t* someIntData_om_node = NULL;
+ axiom_element_t* someIntData_om_elem = NULL;
+ axiom_node_t* someFloatData_om_node = NULL;
+ axiom_element_t* someFloatData_om_elem = NULL;
+ axiom_node_t* someDateData_om_node = NULL;
+ axiom_element_t* someDateData_om_elem = NULL;
+ axiom_node_t* someListData_om_node = NULL;
+ axiom_element_t* someListData_om_elem = NULL;
+ axiom_node_t* listItem1_om_node = NULL;
+ axiom_element_t* listItem1_om_elem = NULL;
+ axiom_node_t* listItem2_om_node = NULL;
+ axiom_element_t* listItem2_om_elem = NULL;
+ axiom_namespace_t *ns1 = NULL;
+ axis2_char_t *om_str = NULL;
+
+ ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTest/", "ns1");
+ req_om_elem = axiom_element_create(env, NULL, "doMixed", ns1, &req_om_node);
+ arg1_om_elem = axiom_element_create(env, req_om_node, "arg1", ns1, &arg1_om_node);
+ AXIOM_ELEMENT_SET_TEXT(arg1_om_elem, env, "Here is some char* data", arg1_om_node);
+ arg2_om_elem = axiom_element_create(env, req_om_node, "arg2", ns1, &arg2_om_node);
+ AXIOM_ELEMENT_SET_TEXT(arg2_om_elem, env, "123456789", arg2_om_node);
+ arg3_om_elem = axiom_element_create(env, req_om_node, "arg3", ns1, &arg3_om_node);
+ arg4_om_elem = axiom_element_create(env, req_om_node, "arg4", ns1, &arg4_om_node);
+ AXIOM_ELEMENT_SET_TEXT(arg4_om_elem, env, "true", arg4_om_node);
+ arg5_om_elem = axiom_element_create(env, req_om_node, "arg5", ns1, &arg5_om_node);
+ AXIOM_ELEMENT_SET_TEXT(arg5_om_elem, env, "1234.5678", arg5_om_node);
+ someStringData_om_elem = axiom_element_create(env, arg3_om_node, "someStringData", ns1, &someStringData_om_node);
+ AXIOM_ELEMENT_SET_TEXT(someStringData_om_elem, env, "Here is some string data", someStringData_om_node);
+ someIntData_om_elem = axiom_element_create(env, arg3_om_node, "", ns1, &someIntData_om_node);
+ AXIOM_ELEMENT_SET_TEXT(someIntData_om_elem, env, "12345678", someIntData_om_node);
+ someFloatData_om_elem = axiom_element_create(env, arg3_om_node, "someFloatData", ns1, &someFloatData_om_node);
+ AXIOM_ELEMENT_SET_TEXT(someFloatData_om_elem, env, "1234.5678", someFloatData_om_node);
+ someDateData_om_elem = axiom_element_create(env, arg3_om_node, "someDateData", ns1, &someDateData_om_node);
+ AXIOM_ELEMENT_SET_TEXT(someDateData_om_elem, env, "1977-06-27", someDateData_om_node);
+ someListData_om_elem = axiom_element_create(env, arg3_om_node, "someListData", ns1, &someListData_om_node);
+ listItem1_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem1_om_node);
+ AXIOM_ELEMENT_SET_TEXT(listItem1_om_elem, env, "Here is list item 1", listItem1_om_node);
+ listItem2_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem2_om_node);
+ AXIOM_ELEMENT_SET_TEXT(listItem2_om_elem, env, "Here is list item 2", listItem2_om_node);
+
+ om_str = AXIOM_NODE_TO_STRING(req_om_node, env);
+ if (om_str)
+ printf("\nSending OM : %s\n", om_str);
+
+ return req_om_node;
+}
+
+
+axiom_node_t *
+build_om_payload_for_doSingleData(axis2_env_t *env, char* name, char* data)
+{
+ axiom_node_t* req_om_node = NULL;
+ axiom_element_t* req_om_elem = NULL;
+ axiom_node_t* someData_om_node = NULL;
+ axiom_element_t* someData_om_elem = NULL;
+ axiom_namespace_t *ns1 = NULL;
+ axis2_char_t *om_str = NULL;
+
+ ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTest/", "ns1");
+ req_om_elem = axiom_element_create(env, NULL, name, ns1, &req_om_node);
+ someData_om_elem = axiom_element_create(env, req_om_node, "someData", ns1, &someData_om_node);
+ AXIOM_ELEMENT_SET_TEXT(someData_om_elem, env, data, someData_om_node);
+
+ om_str = AXIOM_NODE_TO_STRING(req_om_node, env);
+ if (om_str)
+ printf("\nSending OM : %s\n", om_str);
+
+ return req_om_node;
+}
+
+
+axiom_node_t *
+build_om_payload_for_doAny(axis2_env_t *env)
+{
+ axiom_node_t* req_om_node = NULL;
+ axiom_element_t* req_om_elem = NULL;
+ axiom_node_t* someData_om_node = NULL;
+ axiom_element_t* someData_om_elem = NULL;
+ axiom_node_t* someStringData_om_node = NULL;
+ axiom_element_t* someStringData_om_elem = NULL;
+ axiom_node_t* someIntData_om_node = NULL;
+ axiom_element_t* someIntData_om_elem = NULL;
+ axiom_node_t* someFloatData_om_node = NULL;
+ axiom_element_t* someFloatData_om_elem = NULL;
+ axiom_node_t* someDateData_om_node = NULL;
+ axiom_element_t* someDateData_om_elem = NULL;
+ axiom_node_t* someListData_om_node = NULL;
+ axiom_element_t* someListData_om_elem = NULL;
+ axiom_node_t* listItem1_om_node = NULL;
+ axiom_element_t* listItem1_om_elem = NULL;
+ axiom_node_t* listItem2_om_node = NULL;
+ axiom_element_t* listItem2_om_elem = NULL;
+ axiom_namespace_t *ns1 = NULL;
+ axis2_char_t *om_str = NULL;
+
+ ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTest/", "ns1");
+ req_om_elem = axiom_element_create(env, NULL, "doAny", ns1, &req_om_node);
+ someData_om_elem = axiom_element_create(env, req_om_node, "anElem", ns1, &someData_om_node);
+ someStringData_om_elem = axiom_element_create(env, someData_om_node, "hello", ns1, &someStringData_om_node);
+ AXIOM_ELEMENT_SET_TEXT(someStringData_om_elem, env, "world", someStringData_om_node);
+ someIntData_om_elem = axiom_element_create(env, someData_om_node, "someIntData", ns1, &someIntData_om_node);
+ AXIOM_ELEMENT_SET_TEXT(someIntData_om_elem, env, "12345678", someIntData_om_node);
+ someFloatData_om_elem = axiom_element_create(env, someData_om_node, "someFloatData", ns1, &someFloatData_om_node);
+ AXIOM_ELEMENT_SET_TEXT(someFloatData_om_elem, env, "1234.5678", someFloatData_om_node);
+ someDateData_om_elem = axiom_element_create(env, someData_om_node, "someDateData", ns1, &someDateData_om_node);
+ AXIOM_ELEMENT_SET_TEXT(someDateData_om_elem, env, "1977-06-27", someDateData_om_node);
+ someListData_om_elem = axiom_element_create(env, someData_om_node, "someListData", ns1, &someListData_om_node);
+ listItem1_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem1_om_node);
+ AXIOM_ELEMENT_SET_TEXT(listItem1_om_elem, env, "Here is list item 1", listItem1_om_node);
+ listItem2_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem2_om_node);
+ AXIOM_ELEMENT_SET_TEXT(listItem2_om_elem, env, "Here is list item 2", listItem2_om_node);
+
+ om_str = AXIOM_NODE_TO_STRING(req_om_node, env);
+ if (om_str)
+ printf("\nSending OM : %s\n", om_str);
+
+ return req_om_node;
+}
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestClient/WSEntryPointTestClient.vcproj b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestClient/WSEntryPointTestClient.vcproj
new file mode 100644
index 0000000000..e540e44c49
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestClient/WSEntryPointTestClient.vcproj
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="WSEntryPointTestClient"
+ ProjectGUID="{70DD49A1-4E7B-4CE4-B7A3-FD7AFE2A0DDC}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="$(AXIS2C_HOME)/include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="axiom.lib axis2_engine.lib axis2_parser.lib axis2_util.lib"
+ OutputFile="$(OutDir)/WSEntryPointTestClient.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="$(AXIS2C_HOME)/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/WSEntryPointTestClient.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="4"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/WSEntryPointTestClient.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath=".\WSEntryPointTestClient.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/Tuscany-model.config b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/Tuscany-model.config
new file mode 100644
index 0000000000..982f7bc271
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/Tuscany-model.config
@@ -0,0 +1,24 @@
+<?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.
+ -->
+
+<tuscany-model xmlns="http://org.apache.tuscany/xmlns/cpp/1.0">
+ <wsdl>
+ <file name="WSEntryPointTest.wsdl"/>
+ </wsdl>
+ <xsd>
+ </xsd>
+</tuscany-model>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTest.h b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTest.h
new file mode 100644
index 0000000000..19f7aa0b75
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTest.h
@@ -0,0 +1,53 @@
+/*
++----------------------------------------------------------------------+
+| (c) Copyright IBM Corporation 2005. |
+| All Rights Reserved. |
++----------------------------------------------------------------------+
+| |
+| 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. |
++----------------------------------------------------------------------+
+*/
+
+#ifndef WSEENTRYPOINTTEST_H
+#define WSEENTRYPOINTTEST_H
+
+#include <commonj/sdo/SDO.h>
+#include <stdio.h>
+
+class WSEntryPointTest
+{
+public:
+ virtual char* doChars(char* arg1) = 0;
+ virtual long doLong(long arg1) = 0;
+ virtual int doInt(int arg1) = 0;
+ virtual float doFloat(float arg1) = 0;
+ virtual long double doLongDouble(long double arg1) = 0;
+ virtual double doDouble(double arg1) = 0;
+ virtual bool doBool(bool arg1) = 0;
+ virtual short doShort(short arg1) = 0;
+ virtual char* doBytes(char* arg1) = 0;
+ virtual char doByte(char arg1) = 0;
+ virtual DataObjectPtr doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5) = 0;
+ virtual DataObjectPtr doDataObject(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr doAny(DataObjectPtr arg1) = 0;
+// These don't work because they are passing pointers around
+// virtual int[] doIntArray(int[] arg1, int arg2);
+// virtual string doString(string arg1);
+// This doesn't work because there is no mapping from XSD types to SDO CharacterType
+// virtual wchar_t doWChar(wchar_t arg1);
+// This doesn't work because Operation does not support int64_t yet
+// virtual int64_t doInt64(int64_t arg1);
+};
+
+#endif
+
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTest.wsdl b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTest.wsdl
new file mode 100644
index 0000000000..b6328f46f6
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTest.wsdl
@@ -0,0 +1,526 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.WSEntryPointTest.org/WSEntryPointTest/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WSEntryPointTest" targetNamespace="http://www.WSEntryPointTest.org/WSEntryPointTest/">
+ <wsdl:types>
+ <xsd:schema targetNamespace="http://www.WSEntryPointTest.org/WSEntryPointTest/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:element name="doChars">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:string" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doCharsResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:string" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doString">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:string" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doLong">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:int" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doLongResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:int" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doInt">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:int" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doIntResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:int" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doFloat">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:float" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doFloatResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:float" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doLongDouble">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:double" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doLongDoubleResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:double" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doDouble">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:double" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doDoubleResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:double" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doBool">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:boolean" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doBoolResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:boolean" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doShort">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:short" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doShortResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:short" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doBytes">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:hexBinary" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doBytesResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:hexBinary" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doByte">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:byte" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doByteResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:byte" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+
+
+ <xsd:element name="doMixed">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="arg1" type="xsd:string" minOccurs="1"/>
+ <xsd:element name="arg2" type="xsd:int" minOccurs="1"/>
+ <xsd:element name="arg3" type="dataObjectData" minOccurs="1"/>
+ <xsd:element name="arg4" type="xsd:boolean" minOccurs="1"/>
+ <xsd:element name="arg5" type="xsd:float" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doMixedResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="dataObjectData" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doDataObject">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="dataObjectData" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doDataObjectResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="dataObjectData" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:complexType name="dataObjectData">
+ <xsd:sequence>
+ <xsd:element name="someStringData" type="xsd:string" minOccurs="1"/>
+ <xsd:element name="someIntData" type="xsd:int" minOccurs="1"/>
+ <xsd:element name="someFloatData" type="xsd:float" minOccurs="1"/>
+ <xsd:element name="someDateData" type="xsd:date" minOccurs="1"/>
+ <xsd:element name="someListData" type="tns:listData" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="listData">
+ <xsd:sequence>
+ <xsd:element name="listItem" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="doAny">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doAnyResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <!-- Can't do wchar - no mapping from XSD type to SDO:Character type
+
+ <xsd:element name="doWChar">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" minOccurs="1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:length value="1"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doWChar">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" minOccurs="1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:length value="1"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ -->
+
+ <!-- Int64 not yet supported - see Jira TUSCANY-439
+ <xsd:element name="doInt64">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:long" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doInt64Response">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:long" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ -->
+
+ <!-- Can't do doIntArray -->
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="doDataObjectRequestMsg">
+ <wsdl:part element="tns:doDataObject" name="doDataObjectRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doDataObjectResponseMsg">
+ <wsdl:part element="tns:doDataObjectResponse" name="doDataObjectResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doCharsRequestMsg">
+ <wsdl:part element="tns:doChars" name="doCharsRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doCharsResponseMsg">
+ <wsdl:part element="tns:doCharsResponse" name="doCharsResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doStringRequestMsg">
+ <wsdl:part element="tns:doString" name="doStringRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doStringResponseMsg">
+ <wsdl:part element="tns:doCharsResponse" name="doStringResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doLongRequestMsg">
+ <wsdl:part element="tns:doLong" name="doLongRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doLongResponseMsg">
+ <wsdl:part element="tns:doLongResponse" name="doLongResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doIntRequestMsg">
+ <wsdl:part element="tns:doInt" name="doIntRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doIntResponseMsg">
+ <wsdl:part element="tns:doIntResponse" name="doIntResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doFloatRequestMsg">
+ <wsdl:part element="tns:doFloat" name="doFloatRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doFloatResponseMsg">
+ <wsdl:part element="tns:doFloatResponse" name="doFloatResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doLongDoubleRequestMsg">
+ <wsdl:part element="tns:doLongDouble" name="doLongDoubleRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doLongDoubleResponseMsg">
+ <wsdl:part element="tns:doLongDoubleResponse" name="doLongDoubleResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doDoubleRequestMsg">
+ <wsdl:part element="tns:doDouble" name="doDoubleRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doDoubleResponseMsg">
+ <wsdl:part element="tns:doDoubleResponse" name="doDoubleResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doBoolRequestMsg">
+ <wsdl:part element="tns:doBool" name="doBoolRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doBoolResponseMsg">
+ <wsdl:part element="tns:doBoolResponse" name="doBoolResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doShortRequestMsg">
+ <wsdl:part element="tns:doShort" name="doShortRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doShortResponseMsg">
+ <wsdl:part element="tns:doShortResponse" name="doShortResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doBytesRequestMsg">
+ <wsdl:part element="tns:doBytes" name="doBytesRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doBytesResponseMsg">
+ <wsdl:part element="tns:doBytesResponse" name="doBytesResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doByteRequestMsg">
+ <wsdl:part element="tns:doByte" name="doByteRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doByteResponseMsg">
+ <wsdl:part element="tns:doByteResponse" name="doByteResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doMixedRequestMsg">
+ <wsdl:part element="tns:doMixed" name="doMixedRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doMixedResponseMsg">
+ <wsdl:part element="tns:doMixedResponse" name="doMixedResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doAnyRequestMsg">
+ <wsdl:part element="tns:doAny" name="doAnyRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doAnyResponseMsg">
+ <wsdl:part element="tns:doAnyResponse" name="doAnyResponsePart"/>
+ </wsdl:message>
+
+
+ <wsdl:portType name="WSEntryPointTest">
+ <wsdl:operation name="doDataObject">
+ <wsdl:input message="tns:doDataObjectRequestMsg"/>
+ <wsdl:output message="tns:doDataObjectResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doChars">
+ <wsdl:input message="tns:doCharsRequestMsg"/>
+ <wsdl:output message="tns:doCharsResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doString">
+ <wsdl:input message="tns:doStringRequestMsg"/>
+ <wsdl:output message="tns:doStringResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doLong">
+ <wsdl:input message="tns:doLongRequestMsg"/>
+ <wsdl:output message="tns:doLongResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doInt">
+ <wsdl:input message="tns:doIntRequestMsg"/>
+ <wsdl:output message="tns:doIntResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doFloat">
+ <wsdl:input message="tns:doFloatRequestMsg"/>
+ <wsdl:output message="tns:doFloatResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doLongDouble">
+ <wsdl:input message="tns:doLongDoubleRequestMsg"/>
+ <wsdl:output message="tns:doLongDoubleResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doDouble">
+ <wsdl:input message="tns:doDoubleRequestMsg"/>
+ <wsdl:output message="tns:doDoubleResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doBool">
+ <wsdl:input message="tns:doBoolRequestMsg"/>
+ <wsdl:output message="tns:doBoolResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doShort">
+ <wsdl:input message="tns:doShortRequestMsg"/>
+ <wsdl:output message="tns:doShortResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doBytes">
+ <wsdl:input message="tns:doBytesRequestMsg"/>
+ <wsdl:output message="tns:doBytesResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doByte">
+ <wsdl:input message="tns:doByteRequestMsg"/>
+ <wsdl:output message="tns:doByteResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doMixed">
+ <wsdl:input message="tns:doMixedRequestMsg"/>
+ <wsdl:output message="tns:doMixedResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doAny">
+ <wsdl:input message="tns:doAnyRequestMsg"/>
+ <wsdl:output message="tns:doAnyResponseMsg"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+
+ <wsdl:binding name="WSEntryPointTestSOAP" type="tns:WSEntryPointTest">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="doDataObject">
+ <soap:operation soapAction="WSEntryPointTest/doDataObject"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doChars">
+ <soap:operation soapAction="WSEntryPointTest/doChars"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doString">
+ <soap:operation soapAction="WSEntryPointTest/doString"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doLong">
+ <soap:operation soapAction="WSEntryPointTest/doLong"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doInt">
+ <soap:operation soapAction="WSEntryPointTest/doInt"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doFloat">
+ <soap:operation soapAction="WSEntryPointTest/doFloat"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doLongDouble">
+ <soap:operation soapAction="WSEntryPointTest/doLongDouble"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doDouble">
+ <soap:operation soapAction="WSEntryPointTest/doDouble"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doBool">
+ <soap:operation soapAction="WSEntryPointTest/doBool"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doShort">
+ <soap:operation soapAction="WSEntryPointTest/doShort"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doBytes">
+ <soap:operation soapAction="WSEntryPointTest/doBytes"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doByte">
+ <soap:operation soapAction="WSEntryPointTest/doByte"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doMixed">
+ <soap:operation soapAction="WSEntryPointTest/doMixed"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doAny">
+ <soap:operation soapAction="WSEntryPointTest/doAny"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="WSEntryPointTest">
+ <wsdl:port binding="tns:WSEntryPointTestSOAP" name="WSEntryPointTestSOAP">
+ <soap:address location="http://localhost:9090/axis2/services/WSEntryPointTest"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.componentType b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.componentType
new file mode 100644
index 0000000000..cd58a345e6
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.componentType
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ASCII"?>
+<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="WSEntryPointTestService">
+ <interface.cpp header="WSEntryPointTest.h">
+ </interface.cpp>
+ </service>
+
+</componentType>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.cpp b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.cpp
new file mode 100644
index 0000000000..462ee1ac4d
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.cpp
@@ -0,0 +1,159 @@
+/*
++----------------------------------------------------------------------+
+| (c) Copyright IBM Corporation 2005. |
+| All Rights Reserved. |
++----------------------------------------------------------------------+
+| |
+| 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 "WSEntryPointTestImpl.h"
+#include <stdio.h>
+#include <tuscany/sca/util/Utils.h>
+using namespace tuscany::sca;
+#include <commonj/sdo/SDO.h>
+#include <sdo_axiom.h>
+using namespace commonj::sdo;
+using namespace commonj::sdo_axiom;
+
+WSEntryPointTestImpl::WSEntryPointTestImpl()
+{
+}
+
+WSEntryPointTestImpl::~WSEntryPointTestImpl()
+{
+}
+
+// WSEntryPointTest interface
+char* WSEntryPointTestImpl::doChars(char* arg1)
+{
+ printf("WSEntryPointTestImpl::doChars %s\n", arg1);
+ return arg1;
+}
+
+
+long WSEntryPointTestImpl::doLong(long arg1)
+{
+ printf("WSEntryPointTestImpl::doLong %d\n", arg1);
+ return arg1;
+}
+
+int WSEntryPointTestImpl::doInt(int arg1)
+{
+ printf("WSEntryPointTestImpl::doInt %d\n", arg1);
+ return arg1;
+}
+
+float WSEntryPointTestImpl::doFloat(float arg1)
+{
+ printf("WSEntryPointTestImpl::doFloat %f\n", arg1);
+ return arg1;
+}
+
+long double WSEntryPointTestImpl::doLongDouble(long double arg1)
+{
+ printf("WSEntryPointTestImpl::doLongDouble %f\n", arg1);
+ return arg1;
+}
+
+double WSEntryPointTestImpl::doDouble(double arg1)
+{
+ printf("WSEntryPointTestImpl::doDouble %f\n", arg1);
+ return arg1;
+}
+
+
+bool WSEntryPointTestImpl::doBool(bool arg1)
+{
+ printf("WSEntryPointTestImpl::doBool %d\n", arg1);
+ return arg1;
+}
+
+short WSEntryPointTestImpl::doShort(short arg1)
+{
+ printf("WSEntryPointTestImpl::doShort %d\n", arg1);
+ return arg1;
+}
+
+char* WSEntryPointTestImpl::doBytes(char* arg1)
+{
+ printf("WSEntryPointTestImpl::doBytes %s\n", arg1);
+ return arg1;
+}
+
+char WSEntryPointTestImpl::doByte(char arg1)
+{
+ printf("WSEntryPointTestImpl::doByte %c\n", arg1);
+ return arg1;
+}
+
+DataObjectPtr WSEntryPointTestImpl::doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5)
+{
+ printf("WSEntryPointTestImpl::doMixed %s %d %s %d %d\n", arg1, arg2, arg3->getType().getURI(), arg4, arg5);
+ Utils::printDO(arg3);
+ return arg3;
+}
+
+DataObjectPtr WSEntryPointTestImpl::doDataObject(DataObjectPtr arg1)
+{
+ printf("WSEntryPointTestImpl::doDataObject %s\n", arg1->getType().getURI());
+ Utils::printDO(arg1);
+ return arg1;
+}
+
+DataObjectPtr WSEntryPointTestImpl::doAny(DataObjectPtr arg1)
+{
+ printf("WSEntryPointTestImpl::doAny %s#%s\n", arg1->getType().getURI(), arg1->getType().getName());
+ Utils::printDO(arg1);
+ //return arg1;
+
+ DataFactoryPtr factory = arg1->getDataFactory();
+ DataObjectPtr data = factory->create(Type::SDOTypeNamespaceURI, "OpenDataObject");
+ data->setCString("stringData", "Here is some string data");
+ data->setBoolean("boolData", true);
+ DataObjectList& list = data->getList("intDataList");
+ list.append((long)123456789);
+ list.append((long)111111111);
+ list.append((long)222222222);
+ Utils::printDO(data);
+ return data;
+}
+
+//int[] WSEntryPointTestImpl::doIntArray(int[] arg1, int arg2)
+//{
+// printf("WSEntryPointTestImpl::doIntArray with length %d\n", arg2);
+// for(int i=0; i<arg2; i++)
+// {
+// printf("%d\n", arg1[i]);
+// }
+// return arg1;
+//}
+//
+//string WSEntryPointTestImpl::doString(string arg1)
+//{
+// printf("WSEntryPointTestImpl::doString %s\n", arg1.c_str());
+// return arg1;
+//}
+//
+//wchar_t WSEntryPointTestImpl::doWChar(wchar_t arg1)
+//{
+// printf("WSEntryPointTestImpl::doWChar %s\n", arg1);
+// return arg1;
+//}
+//
+//int64_t WSEntryPointTestImpl::doInt64(int64_t arg1)
+//{
+// printf("WSEntryPointTestImpl::doInt64 %d\n", arg1);
+// return arg1;
+//}
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.h b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.h
new file mode 100644
index 0000000000..926b6073d4
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.h
@@ -0,0 +1,57 @@
+/*
++----------------------------------------------------------------------+
+| (c) Copyright IBM Corporation 2005. |
+| All Rights Reserved. |
++----------------------------------------------------------------------+
+| |
+| 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. |
++----------------------------------------------------------------------+
+*/
+
+#ifndef WSEENTRYPOINTTESTIMPL_H
+#define WSEENTRYPOINTTESTIMPL_H
+
+#include "WSEntryPointTest.h"
+
+class WSEntryPointTestImpl : public WSEntryPointTest
+{
+public:
+ WSEntryPointTestImpl();
+ virtual ~WSEntryPointTestImpl();
+
+ // WSEntryPointTest interface
+ virtual char* doChars(char* arg1);
+ virtual long doLong(long arg1);
+ virtual int doInt(int arg1);
+ virtual float doFloat(float arg1);
+ virtual long double doLongDouble(long double arg1);
+ virtual double doDouble(double arg1);
+ virtual bool doBool(bool arg1);
+ virtual short doShort(short arg1);
+ virtual char* doBytes(char* arg1);
+ virtual char doByte(char arg1);
+ virtual DataObjectPtr doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5);
+ virtual DataObjectPtr doDataObject(DataObjectPtr arg1);
+ virtual DataObjectPtr doAny(DataObjectPtr arg1);
+
+// These don't work because they are passing pointers around
+// virtual int[] doIntArray(int[] arg1, int arg2);
+// virtual string doString(string arg1);
+// This doesn't work because there is no mapping from XSD types to SDO CharacterType
+// virtual wchar_t doWChar(wchar_t arg1);
+// This doesn't work because Operation does not support int64_t yet
+// virtual int64_t doInt64(int64_t arg1);
+
+};
+
+#endif
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Proxy.cpp b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Proxy.cpp
new file mode 100644
index 0000000000..8f564ff5bc
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Proxy.cpp
@@ -0,0 +1,187 @@
+/*
+ * 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 "WSEntryPointTestImpl_WSEntryPointTestService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ WSEntryPointTestImpl_WSEntryPointTestService_Proxy* WSEntryPointTestImpl_WSEntryPointTestService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new WSEntryPointTestImpl_WSEntryPointTestService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void WSEntryPointTestImpl_WSEntryPointTestService_Proxy_Destructor(void* proxy)
+ {
+ delete (WSEntryPointTestImpl_WSEntryPointTestService_Proxy*)proxy;
+ }
+}
+
+WSEntryPointTestImpl_WSEntryPointTestService_Proxy::WSEntryPointTestImpl_WSEntryPointTestService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+WSEntryPointTestImpl_WSEntryPointTestService_Proxy::~WSEntryPointTestImpl_WSEntryPointTestService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+char* WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doChars( char* arg0)
+{
+ Operation operation("doChars");
+ operation.addParameter(&arg0);
+ char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+long WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doLong( long arg0)
+{
+ Operation operation("doLong");
+ operation.addParameter(&arg0);
+ long ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+int WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doInt( int arg0)
+{
+ Operation operation("doInt");
+ operation.addParameter(&arg0);
+ int ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+float WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doFloat( float arg0)
+{
+ Operation operation("doFloat");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+long double WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doLongDouble( long double arg0)
+{
+ Operation operation("doLongDouble");
+ operation.addParameter(&arg0);
+ long double ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+double WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doDouble( double arg0)
+{
+ Operation operation("doDouble");
+ operation.addParameter(&arg0);
+ double ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+bool WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doBool( bool arg0)
+{
+ Operation operation("doBool");
+ operation.addParameter(&arg0);
+ bool ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+short WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doShort( short arg0)
+{
+ Operation operation("doShort");
+ operation.addParameter(&arg0);
+ short ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+char* WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doBytes( char* arg0)
+{
+ Operation operation("doBytes");
+ operation.addParameter(&arg0);
+ char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+char WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doByte( char arg0)
+{
+ Operation operation("doByte");
+ operation.addParameter(&arg0);
+ char ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+DataObjectPtr WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doMixed( char* arg0, long arg1, DataObjectPtr arg2, bool arg3, double arg4)
+{
+ Operation operation("doMixed");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ operation.addParameter(&arg2);
+ operation.addParameter(&arg3);
+ operation.addParameter(&arg4);
+ DataObjectPtr ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+DataObjectPtr WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doDataObject( DataObjectPtr arg0)
+{
+ Operation operation("doDataObject");
+ operation.addParameter(&arg0);
+ DataObjectPtr ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+DataObjectPtr WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doAny( DataObjectPtr arg0)
+{
+ Operation operation("doAny");
+ operation.addParameter(&arg0);
+ DataObjectPtr ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Proxy.h b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Proxy.h
new file mode 100644
index 0000000000..9dca8a61bc
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Proxy.h
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+#ifndef WSEntryPointTestImpl_WSEntryPointTestService_Proxy_h
+#define WSEntryPointTestImpl_WSEntryPointTestService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "WSEntryPointTest.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class WSEntryPointTestImpl_WSEntryPointTestService_Proxy : public WSEntryPointTest
+{
+public:
+ WSEntryPointTestImpl_WSEntryPointTestService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~WSEntryPointTestImpl_WSEntryPointTestService_Proxy();
+ virtual char* doChars( char* arg1);
+ virtual long doLong( long arg1);
+ virtual int doInt( int arg1);
+ virtual float doFloat( float arg1);
+ virtual long double doLongDouble( long double arg1);
+ virtual double doDouble( double arg1);
+ virtual bool doBool( bool arg1);
+ virtual short doShort( short arg1);
+ virtual char* doBytes( char* arg1);
+ virtual char doByte( char arg1);
+ virtual DataObjectPtr doMixed( char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5);
+ virtual DataObjectPtr doDataObject( DataObjectPtr arg1);
+ virtual DataObjectPtr doAny( DataObjectPtr arg1);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // WSEntryPointTestImpl_WSEntryPointTestService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.cpp b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.cpp
new file mode 100644
index 0000000000..7a879a310b
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.cpp
@@ -0,0 +1,145 @@
+/*
+ * 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 "WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ WSEntryPointTestImpl_WSEntryPointTestService_Wrapper* WSEntryPointTestImpl_WSEntryPointTestService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new WSEntryPointTestImpl_WSEntryPointTestService_Wrapper(target);
+ }
+}
+
+WSEntryPointTestImpl_WSEntryPointTestService_Wrapper::WSEntryPointTestImpl_WSEntryPointTestService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (WSEntryPointTestImpl*)getImplementation();
+}
+
+WSEntryPointTestImpl_WSEntryPointTestService_Wrapper::~WSEntryPointTestImpl_WSEntryPointTestService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* WSEntryPointTestImpl_WSEntryPointTestService_Wrapper::newImplementation()
+{
+ return new WSEntryPointTestImpl;
+}
+
+void WSEntryPointTestImpl_WSEntryPointTestService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void WSEntryPointTestImpl_WSEntryPointTestService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "doChars")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ *(char**)operation.getReturnValue() = impl->doChars(p0);
+ return;
+ }
+ if (operationName == "doLong")
+ {
+ long& p0 = *( long*)operation.getParameterValue(0);
+ *(long*)operation.getReturnValue() = impl->doLong(p0);
+ return;
+ }
+ if (operationName == "doInt")
+ {
+ int& p0 = *( int*)operation.getParameterValue(0);
+ *(int*)operation.getReturnValue() = impl->doInt(p0);
+ return;
+ }
+ if (operationName == "doFloat")
+ {
+ float& p0 = *( float*)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->doFloat(p0);
+ return;
+ }
+ if (operationName == "doLongDouble")
+ {
+ long double& p0 = *( long double*)operation.getParameterValue(0);
+ *(long double*)operation.getReturnValue() = impl->doLongDouble(p0);
+ return;
+ }
+ if (operationName == "doDouble")
+ {
+ double& p0 = *( double*)operation.getParameterValue(0);
+ *(double*)operation.getReturnValue() = impl->doDouble(p0);
+ return;
+ }
+ if (operationName == "doBool")
+ {
+ bool& p0 = *( bool*)operation.getParameterValue(0);
+ *(bool*)operation.getReturnValue() = impl->doBool(p0);
+ return;
+ }
+ if (operationName == "doShort")
+ {
+ short& p0 = *( short*)operation.getParameterValue(0);
+ *(short*)operation.getReturnValue() = impl->doShort(p0);
+ return;
+ }
+ if (operationName == "doBytes")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ *(char**)operation.getReturnValue() = impl->doBytes(p0);
+ return;
+ }
+ if (operationName == "doByte")
+ {
+ char& p0 = *( char*)operation.getParameterValue(0);
+ *(char*)operation.getReturnValue() = impl->doByte(p0);
+ return;
+ }
+ if (operationName == "doMixed")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ long& p1 = *( long*)operation.getParameterValue(1);
+ DataObjectPtr& p2 = *(DataObjectPtr*)operation.getParameterValue(2); bool& p3 = *( bool*)operation.getParameterValue(3);
+ double& p4 = *( double*)operation.getParameterValue(4);
+ *(DataObjectPtr*)operation.getReturnValue() = impl->doMixed(p0, p1, p2, p3, p4);
+ return;
+ }
+ if (operationName == "doDataObject")
+ {
+ DataObjectPtr& p0 = *(DataObjectPtr*)operation.getParameterValue(0); *(DataObjectPtr*)operation.getReturnValue() = impl->doDataObject(p0);
+ return;
+ }
+ if (operationName == "doAny")
+ {
+ DataObjectPtr& p0 = *(DataObjectPtr*)operation.getParameterValue(0); *(DataObjectPtr*)operation.getReturnValue() = impl->doAny(p0);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.h b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.h
new file mode 100644
index 0000000000..7bcd09b7c8
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef WSEntryPointTestImpl_WSEntryPointTestService_Wrapper_h
+#define WSEntryPointTestImpl_WSEntryPointTestService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "WSEntryPointTestImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class WSEntryPointTestImpl_WSEntryPointTestService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ WSEntryPointTestImpl_WSEntryPointTestService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~WSEntryPointTestImpl_WSEntryPointTestService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ WSEntryPointTestImpl* impl;
+};
+
+#endif // WSEntryPointTestImpl_WSEntryPointTestService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestModule.vcproj b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestModule.vcproj
new file mode 100644
index 0000000000..6ff73c3f1c
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestModule.vcproj
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="WSEntryPointTestModule"
+ ProjectGUID="{19C4CE76-4E08-4C22-8198-010B837C565A}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="$(TUSCANY_SCACPP)/include,$(TUSCANY_SDOCPP)/include,$(AXIS2C_HOME)/include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WSENTRYPOINTTESTMODULE_EXPORTS"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="tuscany_sca.lib tuscany_sdo.lib tuscany_sdo_axiom.lib axis2_parser.lib axis2_util.lib axiom.lib"
+ OutputFile="$(OutDir)/WSEntryPointTestModule.dll"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="$(TUSCANY_SCACPP)/lib,$(TUSCANY_SDOCPP)/lib,$(AXIS2C_HOME)/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/WSEntryPointTestModule.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/WSEntryPointTestModule.lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WSENTRYPOINTTESTMODULE_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/WSEntryPointTestModule.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)/WSEntryPointTestModule.lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath=".\WSEntryPointTestImpl.cpp">
+ </File>
+ <File
+ RelativePath=".\WSEntryPointTestImpl_WSEntryPointTestService_Proxy.cpp">
+ </File>
+ <File
+ RelativePath=".\WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath=".\WSEntryPointTest.h">
+ </File>
+ <File
+ RelativePath=".\WSEntryPointTestImpl.h">
+ </File>
+ <File
+ RelativePath=".\WSEntryPointTestImpl_WSEntryPointTestService_Proxy.h">
+ </File>
+ <File
+ RelativePath=".\WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ <File
+ RelativePath=".\sca.module">
+ </File>
+ <File
+ RelativePath="..\WSEntryPointTestSubsystem\sca.subsystem">
+ </File>
+ <File
+ RelativePath=".\services.xml">
+ </File>
+ <File
+ RelativePath=".\Tuscany-model.config">
+ </File>
+ <File
+ RelativePath=".\WSEntryPointTest.wsdl">
+ </File>
+ <File
+ RelativePath=".\WSEntryPointTestImpl.componentType">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/sca.module b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/sca.module
new file mode 100644
index 0000000000..f92fae8110
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/sca.module
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ASCII"?>
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ name="WSEntryPointTestModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="WSEntryPointTestEntrypoint" multiplicity="1..1">
+ <interface.wsdl interface="WSEntryPointTest.wsdl" callbackInterface=""></interface.wsdl>
+ <binding.ws port="http://www.WSEntryPointTest.org/WSEntryPointTest/#wsdl.endpoint(WSEntryPointTest/WSEntryPointTestSOAP)"></binding.ws>
+ <reference>WSEntryPointTestServiceComponent</reference>
+ </entryPoint>
+
+
+ <component name="WSEntryPointTestServiceComponent">
+ <implementation.cpp dll="WSEntryPointTestModule.dll" header="WSEntryPointTestImpl.h"></implementation.cpp>
+ <properties> </properties>
+ <references> </references>
+ </component>
+</module>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/services.xml b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/services.xml
new file mode 100644
index 0000000000..b863c79409
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestModule/services.xml
@@ -0,0 +1,62 @@
+
+<!--
+ 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.
+ -->
+<service name="WSEntryPointTest">
+ <parameter name="ServiceClass" locked="xsd:false">tuscany_sca_ws_service</parameter>
+ <parameter name="TuscanySystemRoot" locked="xsd:false">D:/tuscany/cpp/sca/test/WSEntryPointTest/runtime</parameter>
+ <parameter name="TuscanyEntryPoint" locked="xsd:false">WSEntryPointTestSubsystem/WSEntryPointTestService/WSEntryPointTestEntrypoint</parameter>
+
+ <description>
+ This is a testing service , to test the system is working or not
+ </description>
+
+ <operation name="doChars">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+ <operation name="doLong">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+ <operation name="doInt">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+ <operation name="doFloat">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+ <operation name="doLongDouble">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+ <operation name="doDouble">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+ <operation name="doBool">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+ <operation name="doShort">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+ <operation name="doBytes">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+ <operation name="doMixed">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+ <operation name="doDataObject">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+ <operation name="doAny">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+</service>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestSubsystem/sca.subsystem b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestSubsystem/sca.subsystem
new file mode 100644
index 0000000000..45ae34fd42
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/WSEntryPointTestSubsystem/sca.subsystem
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<subsystem xmlns="http://www.osoa.org/xmlns/sca/0.9" name="WSEntryPointTestSubsystem">
+
+ <moduleComponent name="WSEntryPointTestService" module="WSEntryPointTestModule" />
+
+</subsystem>
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/Tuscany-model.config b/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/Tuscany-model.config
new file mode 100644
index 0000000000..982f7bc271
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/Tuscany-model.config
@@ -0,0 +1,24 @@
+<?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.
+ -->
+
+<tuscany-model xmlns="http://org.apache.tuscany/xmlns/cpp/1.0">
+ <wsdl>
+ <file name="WSEntryPointTest.wsdl"/>
+ </wsdl>
+ <xsd>
+ </xsd>
+</tuscany-model>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTest.h b/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTest.h
new file mode 100644
index 0000000000..19f7aa0b75
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTest.h
@@ -0,0 +1,53 @@
+/*
++----------------------------------------------------------------------+
+| (c) Copyright IBM Corporation 2005. |
+| All Rights Reserved. |
++----------------------------------------------------------------------+
+| |
+| 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. |
++----------------------------------------------------------------------+
+*/
+
+#ifndef WSEENTRYPOINTTEST_H
+#define WSEENTRYPOINTTEST_H
+
+#include <commonj/sdo/SDO.h>
+#include <stdio.h>
+
+class WSEntryPointTest
+{
+public:
+ virtual char* doChars(char* arg1) = 0;
+ virtual long doLong(long arg1) = 0;
+ virtual int doInt(int arg1) = 0;
+ virtual float doFloat(float arg1) = 0;
+ virtual long double doLongDouble(long double arg1) = 0;
+ virtual double doDouble(double arg1) = 0;
+ virtual bool doBool(bool arg1) = 0;
+ virtual short doShort(short arg1) = 0;
+ virtual char* doBytes(char* arg1) = 0;
+ virtual char doByte(char arg1) = 0;
+ virtual DataObjectPtr doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5) = 0;
+ virtual DataObjectPtr doDataObject(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr doAny(DataObjectPtr arg1) = 0;
+// These don't work because they are passing pointers around
+// virtual int[] doIntArray(int[] arg1, int arg2);
+// virtual string doString(string arg1);
+// This doesn't work because there is no mapping from XSD types to SDO CharacterType
+// virtual wchar_t doWChar(wchar_t arg1);
+// This doesn't work because Operation does not support int64_t yet
+// virtual int64_t doInt64(int64_t arg1);
+};
+
+#endif
+
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTest.wsdl b/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTest.wsdl
new file mode 100644
index 0000000000..294ae076a7
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTest.wsdl
@@ -0,0 +1,526 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.WSEntryPointTest.org/WSEntryPointTest/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WSEntryPointTest" targetNamespace="http://www.WSEntryPointTest.org/WSEntryPointTest/">
+ <wsdl:types>
+ <xsd:schema targetNamespace="http://www.WSEntryPointTest.org/WSEntryPointTest/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:element name="doChars">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:string" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doCharsResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:string" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doString">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:string" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doLong">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:int" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doLongResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:int" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doInt">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:int" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doIntResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:int" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doFloat">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:float" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doFloatResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:float" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doLongDouble">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:double" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doLongDoubleResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:double" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doDouble">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:double" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doDoubleResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:double" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doBool">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:boolean" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doBoolResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:boolean" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doShort">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:short" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doShortResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:short" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doBytes">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:hexBinary" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doBytesResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:hexBinary" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doByte">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:byte" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doByteResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:byte" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+
+
+ <xsd:element name="doMixed">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="arg1" type="xsd:string" minOccurs="1"/>
+ <xsd:element name="arg2" type="xsd:int" minOccurs="1"/>
+ <xsd:element name="arg3" type="dataObjectData" minOccurs="1"/>
+ <xsd:element name="arg4" type="xsd:boolean" minOccurs="1"/>
+ <xsd:element name="arg5" type="xsd:float" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doMixedResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="dataObjectData" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doDataObject">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="dataObjectData" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doDataObjectResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="dataObjectData" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:complexType name="dataObjectData">
+ <xsd:sequence>
+ <xsd:element name="someStringData" type="xsd:string" minOccurs="1"/>
+ <xsd:element name="someIntData" type="xsd:int" minOccurs="1"/>
+ <xsd:element name="someFloatData" type="xsd:float" minOccurs="1"/>
+ <xsd:element name="someDateData" type="xsd:date" minOccurs="1"/>
+ <xsd:element name="someListData" type="listData" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="listData">
+ <xsd:sequence>
+ <xsd:element name="listItem" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="doAny">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="doAnyResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <!-- Can't do wchar - no mapping from XSD type to SDO:Character type
+
+ <xsd:element name="doWChar">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" minOccurs="1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:length value="1"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doWChar">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" minOccurs="1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:length value="1"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ -->
+
+ <!-- Int64 not yet supported - see Jira TUSCANY-439
+ <xsd:element name="doInt64">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:long" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="doInt64Response">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="someData" type="xsd:long" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ -->
+
+ <!-- Can't do doIntArray -->
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="doDataObjectRequestMsg">
+ <wsdl:part element="tns:doDataObject" name="doDataObjectRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doDataObjectResponseMsg">
+ <wsdl:part element="tns:doDataObjectResponse" name="doDataObjectResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doCharsRequestMsg">
+ <wsdl:part element="tns:doChars" name="doCharsRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doCharsResponseMsg">
+ <wsdl:part element="tns:doCharsResponse" name="doCharsResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doStringRequestMsg">
+ <wsdl:part element="tns:doString" name="doStringRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doStringResponseMsg">
+ <wsdl:part element="tns:doCharsResponse" name="doStringResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doLongRequestMsg">
+ <wsdl:part element="tns:doLong" name="doLongRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doLongResponseMsg">
+ <wsdl:part element="tns:doLongResponse" name="doLongResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doIntRequestMsg">
+ <wsdl:part element="tns:doInt" name="doIntRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doIntResponseMsg">
+ <wsdl:part element="tns:doIntResponse" name="doIntResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doFloatRequestMsg">
+ <wsdl:part element="tns:doFloat" name="doFloatRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doFloatResponseMsg">
+ <wsdl:part element="tns:doFloatResponse" name="doFloatResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doLongDoubleRequestMsg">
+ <wsdl:part element="tns:doLongDouble" name="doLongDoubleRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doLongDoubleResponseMsg">
+ <wsdl:part element="tns:doLongDoubleResponse" name="doLongDoubleResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doDoubleRequestMsg">
+ <wsdl:part element="tns:doDouble" name="doDoubleRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doDoubleResponseMsg">
+ <wsdl:part element="tns:doDoubleResponse" name="doDoubleResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doBoolRequestMsg">
+ <wsdl:part element="tns:doBool" name="doBoolRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doBoolResponseMsg">
+ <wsdl:part element="tns:doBoolResponse" name="doBoolResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doShortRequestMsg">
+ <wsdl:part element="tns:doShort" name="doShortRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doShortResponseMsg">
+ <wsdl:part element="tns:doShortResponse" name="doShortResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doBytesRequestMsg">
+ <wsdl:part element="tns:doBytes" name="doBytesRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doBytesResponseMsg">
+ <wsdl:part element="tns:doBytesResponse" name="doBytesResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doByteRequestMsg">
+ <wsdl:part element="tns:doByte" name="doByteRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doByteResponseMsg">
+ <wsdl:part element="tns:doByteResponse" name="doByteResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doMixedRequestMsg">
+ <wsdl:part element="tns:doMixed" name="doMixedRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doMixedResponseMsg">
+ <wsdl:part element="tns:doMixedResponse" name="doMixedResponsePart"/>
+ </wsdl:message>
+
+ <wsdl:message name="doAnyRequestMsg">
+ <wsdl:part element="tns:doAny" name="doAnyRequestPart"/>
+ </wsdl:message>
+ <wsdl:message name="doAnyResponseMsg">
+ <wsdl:part element="tns:doAnyResponse" name="doAnyResponsePart"/>
+ </wsdl:message>
+
+
+ <wsdl:portType name="WSEntryPointTest">
+ <wsdl:operation name="doDataObject">
+ <wsdl:input message="tns:doDataObjectRequestMsg"/>
+ <wsdl:output message="tns:doDataObjectResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doChars">
+ <wsdl:input message="tns:doCharsRequestMsg"/>
+ <wsdl:output message="tns:doCharsResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doString">
+ <wsdl:input message="tns:doStringRequestMsg"/>
+ <wsdl:output message="tns:doStringResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doLong">
+ <wsdl:input message="tns:doLongRequestMsg"/>
+ <wsdl:output message="tns:doLongResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doInt">
+ <wsdl:input message="tns:doIntRequestMsg"/>
+ <wsdl:output message="tns:doIntResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doFloat">
+ <wsdl:input message="tns:doFloatRequestMsg"/>
+ <wsdl:output message="tns:doFloatResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doLongDouble">
+ <wsdl:input message="tns:doLongDoubleRequestMsg"/>
+ <wsdl:output message="tns:doLongDoubleResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doDouble">
+ <wsdl:input message="tns:doDoubleRequestMsg"/>
+ <wsdl:output message="tns:doDoubleResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doBool">
+ <wsdl:input message="tns:doBoolRequestMsg"/>
+ <wsdl:output message="tns:doBoolResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doShort">
+ <wsdl:input message="tns:doShortRequestMsg"/>
+ <wsdl:output message="tns:doShortResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doBytes">
+ <wsdl:input message="tns:doBytesRequestMsg"/>
+ <wsdl:output message="tns:doBytesResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doByte">
+ <wsdl:input message="tns:doByteRequestMsg"/>
+ <wsdl:output message="tns:doByteResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doMixed">
+ <wsdl:input message="tns:doMixedRequestMsg"/>
+ <wsdl:output message="tns:doMixedResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="doAny">
+ <wsdl:input message="tns:doAnyRequestMsg"/>
+ <wsdl:output message="tns:doAnyResponseMsg"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+
+ <wsdl:binding name="WSEntryPointTestSOAP" type="tns:WSEntryPointTest">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="doDataObject">
+ <soap:operation soapAction="WSEntryPointTest/doDataObject"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doChars">
+ <soap:operation soapAction="WSEntryPointTest/doChars"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doString">
+ <soap:operation soapAction="WSEntryPointTest/doString"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doLong">
+ <soap:operation soapAction="WSEntryPointTest/doLong"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doInt">
+ <soap:operation soapAction="WSEntryPointTest/doInt"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doFloat">
+ <soap:operation soapAction="WSEntryPointTest/doFloat"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doLongDouble">
+ <soap:operation soapAction="WSEntryPointTest/doLongDouble"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doDouble">
+ <soap:operation soapAction="WSEntryPointTest/doDouble"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doBool">
+ <soap:operation soapAction="WSEntryPointTest/doBool"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doShort">
+ <soap:operation soapAction="WSEntryPointTest/doShort"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doBytes">
+ <soap:operation soapAction="WSEntryPointTest/doBytes"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doByte">
+ <soap:operation soapAction="WSEntryPointTest/doByte"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doMixed">
+ <soap:operation soapAction="WSEntryPointTest/doMixed"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doAny">
+ <soap:operation soapAction="WSEntryPointTest/doAny"/>
+ <wsdl:input><soap:body use="literal"/></wsdl:input>
+ <wsdl:output><soap:body use="literal"/></wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="WSEntryPointTest">
+ <wsdl:port binding="tns:WSEntryPointTestSOAP" name="WSEntryPointTestSOAP">
+ <soap:address location="http://localhost:9090/axis2/services/WSEntryPointTest"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTestImpl.componentType b/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTestImpl.componentType
new file mode 100644
index 0000000000..cd58a345e6
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTestImpl.componentType
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ASCII"?>
+<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="WSEntryPointTestService">
+ <interface.cpp header="WSEntryPointTest.h">
+ </interface.cpp>
+ </service>
+
+</componentType>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTestImpl.h b/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTestImpl.h
new file mode 100644
index 0000000000..926b6073d4
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTestImpl.h
@@ -0,0 +1,57 @@
+/*
++----------------------------------------------------------------------+
+| (c) Copyright IBM Corporation 2005. |
+| All Rights Reserved. |
++----------------------------------------------------------------------+
+| |
+| 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. |
++----------------------------------------------------------------------+
+*/
+
+#ifndef WSEENTRYPOINTTESTIMPL_H
+#define WSEENTRYPOINTTESTIMPL_H
+
+#include "WSEntryPointTest.h"
+
+class WSEntryPointTestImpl : public WSEntryPointTest
+{
+public:
+ WSEntryPointTestImpl();
+ virtual ~WSEntryPointTestImpl();
+
+ // WSEntryPointTest interface
+ virtual char* doChars(char* arg1);
+ virtual long doLong(long arg1);
+ virtual int doInt(int arg1);
+ virtual float doFloat(float arg1);
+ virtual long double doLongDouble(long double arg1);
+ virtual double doDouble(double arg1);
+ virtual bool doBool(bool arg1);
+ virtual short doShort(short arg1);
+ virtual char* doBytes(char* arg1);
+ virtual char doByte(char arg1);
+ virtual DataObjectPtr doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5);
+ virtual DataObjectPtr doDataObject(DataObjectPtr arg1);
+ virtual DataObjectPtr doAny(DataObjectPtr arg1);
+
+// These don't work because they are passing pointers around
+// virtual int[] doIntArray(int[] arg1, int arg2);
+// virtual string doString(string arg1);
+// This doesn't work because there is no mapping from XSD types to SDO CharacterType
+// virtual wchar_t doWChar(wchar_t arg1);
+// This doesn't work because Operation does not support int64_t yet
+// virtual int64_t doInt64(int64_t arg1);
+
+};
+
+#endif
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/sca.module b/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/sca.module
new file mode 100644
index 0000000000..f92fae8110
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/sca.module
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ASCII"?>
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ name="WSEntryPointTestModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="WSEntryPointTestEntrypoint" multiplicity="1..1">
+ <interface.wsdl interface="WSEntryPointTest.wsdl" callbackInterface=""></interface.wsdl>
+ <binding.ws port="http://www.WSEntryPointTest.org/WSEntryPointTest/#wsdl.endpoint(WSEntryPointTest/WSEntryPointTestSOAP)"></binding.ws>
+ <reference>WSEntryPointTestServiceComponent</reference>
+ </entryPoint>
+
+
+ <component name="WSEntryPointTestServiceComponent">
+ <implementation.cpp dll="WSEntryPointTestModule.dll" header="WSEntryPointTestImpl.h"></implementation.cpp>
+ <properties> </properties>
+ <references> </references>
+ </component>
+</module>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/subsystems/WSEntryPointTestSubsystem/sca.subsystem b/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/subsystems/WSEntryPointTestSubsystem/sca.subsystem
new file mode 100644
index 0000000000..45ae34fd42
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTest/runtime/subsystems/WSEntryPointTestSubsystem/sca.subsystem
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<subsystem xmlns="http://www.osoa.org/xmlns/sca/0.9" name="WSEntryPointTestSubsystem">
+
+ <moduleComponent name="WSEntryPointTestService" module="WSEntryPointTestModule" />
+
+</subsystem>
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.c b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.c
new file mode 100644
index 0000000000..c23e845691
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.c
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * 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 <stdio.h>
+#include <axiom.h>
+#include <axis2_util.h>
+#include <axiom_soap.h>
+#include <axis2_client.h>
+
+axiom_node_t *
+build_om_payload_for_WSEntryPointTestRPC_svc(axis2_env_t *env);
+
+
+int main(int argc, char** argv)
+{
+ axis2_env_t *env = NULL;
+ axis2_char_t *address = NULL;
+ axis2_endpoint_ref_t* endpoint_ref = NULL;
+ axis2_options_t *options = NULL;
+ axis2_char_t *client_home = NULL;
+ axis2_svc_client_t* svc_client = NULL;
+ axiom_node_t *payload = NULL;
+ axiom_node_t *ret_node = NULL;
+
+ /* Set up the envioronment */
+ env = axis2_env_create_all("wsentrypointtestrpc.log", AXIS2_LOG_LEVEL_TRACE);
+
+ /* Set end point reference of echo service */
+ address = "http://localhost:9090/axis2/services/WSEntryPointTestRPC";
+ if (argc > 1 )
+ address = argv[1];
+ if (AXIS2_STRCMP(address, "-h") == 0)
+ {
+ printf("Usage : %s [endpoint_url]\n", argv[0]);
+ printf("use -h for help\n");
+ return 0;
+ }
+ printf ("Using endpoint : %s\n", address);
+
+ /* Create EPR with given address */
+ endpoint_ref = axis2_endpoint_ref_create(env, address);
+
+ /* Setup options */
+ options = axis2_options_create(env);
+ AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref);
+ AXIS2_OPTIONS_SET_ACTION(options, env,
+ "http://www.WSEntryPointTest.org/WSEntryPointTestRPC/doString");
+
+ /* Set up deploy folder. It is from the deploy folder, the configuration is picked up
+ * using the axis2.xml file.
+ * In this sample client_home points to the Axis2/C default deploy folder. The client_home can
+ * be different from this folder on your system. For example, you may have a different folder
+ * (say, my_client_folder) with its own axis2.xml file. my_client_folder/modules will have the
+ * modules that the client uses
+ */
+ client_home = AXIS2_GETENV("AXIS2C_HOME");
+ if (!client_home)
+ {
+ printf("Please ensure AXIS2C_HOME is set as an env variable\n");
+ return 0;
+ }
+
+ /* Create service client */
+ svc_client = axis2_svc_client_create(env, client_home);
+ if (!svc_client)
+ {
+ printf("Error creating service client\n");
+ 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));
+ }
+
+ /* Set service client options */
+ AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, &env, options);
+
+ /* Engage addressing module */
+ AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, &env, AXIS2_MODULE_ADDRESSING);
+
+ /* Build the SOAP request message payload using OM API.*/
+ payload = build_om_payload_for_WSEntryPointTestRPC_svc(env);
+
+ /* Send request */
+ ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload);
+
+ if(ret_node)
+ {
+ axis2_char_t *om_str = NULL;
+ om_str = AXIOM_NODE_TO_STRING(ret_node, env);
+ if (om_str)
+ printf("\nReceived OM : %s\n", om_str);
+ printf("\nWSEntryPointTestRPC client invoke SUCCESSFUL!\n");
+ }
+ 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("WSEntryPointTestRPC client invoke FAILED!\n");
+ }
+
+ if (svc_client)
+ {
+ AXIS2_SVC_CLIENT_FREE(svc_client, env);
+ svc_client = NULL;
+ }
+ if (endpoint_ref)
+ {
+ AXIS2_ENDPOINT_REF_FREE(endpoint_ref, &env);
+ endpoint_ref = NULL;
+ }
+ return 0;
+}
+
+/* build SOAP request message content using OM */
+axiom_node_t *
+build_om_payload_for_WSEntryPointTestRPC_svc(axis2_env_t *env)
+{
+ axiom_node_t* req_om_node = NULL;
+ axiom_element_t* req_om_elem = NULL;
+ axiom_node_t* param_om_node = NULL;
+ axiom_element_t* param_om_elem = NULL;
+ axiom_namespace_t *ns1 = NULL;
+ axis2_char_t *om_str = NULL;
+
+ ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTestRPC/", "ns1");
+ req_om_elem = axiom_element_create(env, NULL, "doString", ns1, &req_om_node);
+ param_om_elem = axiom_element_create(env, req_om_node, "doStringRequest", ns1, &param_om_node);
+ AXIOM_ELEMENT_SET_TEXT(param_om_elem, env, "WSEntryPointTestRPC Client Call", param_om_node);
+
+ om_str = AXIOM_NODE_TO_STRING(req_om_node, env);
+ if (om_str)
+ printf("\nSending OM : %s\n", om_str);
+
+ return req_om_node;
+}
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.vcproj b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.vcproj
new file mode 100644
index 0000000000..5c48a3a683
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.vcproj
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="WSEntryPointTestRPCClient"
+ ProjectGUID="{F0972250-9F56-45B3-AFB9-0A4124A8B3D2}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="$(AXIS2C_HOME)/include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="axiom.lib axis2_engine.lib axis2_parser.lib axis2_util.lib"
+ OutputFile="$(OutDir)/WSEntryPointTestRPCClient.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="$(AXIS2C_HOME)/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/WSEntryPointTestRPCClient.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="4"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/WSEntryPointTestRPCClient.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath=".\WSEntryPointTestRPCClient.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/Tuscany-model.config b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/Tuscany-model.config
new file mode 100644
index 0000000000..42ad3ccfe3
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/Tuscany-model.config
@@ -0,0 +1,24 @@
+<?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.
+ -->
+
+<tuscany-model xmlns="http://org.apache.tuscany/xmlns/cpp/1.0">
+ <wsdl>
+ <file name="WSEntryPointTestRPC.wsdl"/>
+ </wsdl>
+ <xsd>
+ </xsd>
+</tuscany-model>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h
new file mode 100644
index 0000000000..5bd20f103a
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h
@@ -0,0 +1,30 @@
+/*
++----------------------------------------------------------------------+
+| (c) Copyright IBM Corporation 2005. |
+| All Rights Reserved. |
++----------------------------------------------------------------------+
+| |
+| 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. |
++----------------------------------------------------------------------+
+*/
+
+#ifndef WSEENTRYPOINTTESTRPC_H
+#define WSEENTRYPOINTTESTRPC_H
+class WSEntryPointTestRPC
+{
+public:
+ virtual char* doString(char* arg1) = 0;
+};
+
+#endif
+
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl
new file mode 100644
index 0000000000..1706534042
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WSEntryPointTestRPC" targetNamespace="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/">
+
+ <wsdl:types>
+ <xs:schema targetNamespace="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/"
+ elementFormDefault="qualified">
+
+ <xs:element name="doStringRequest">
+ <xs:simpleType>
+ <xs:restriction base="xs:string"/>
+ </xs:simpleType>
+ </xs:element>
+ <xs:element name="doStringResponse">
+ <xs:simpleType>
+ <xs:restriction base="xs:string"/>
+ </xs:simpleType>
+ </xs:element>
+
+ </xs:schema>
+ </wsdl:types>
+
+ <wsdl:message name="doStringResponseMsg">
+ <wsdl:part name="doStringResponse" element="tns:doStringResponse"/>
+ </wsdl:message>
+ <wsdl:message name="doStringRequestMsg">
+ <wsdl:part name="doStringRequest" element="tns:doStringRequest"/>
+ </wsdl:message>
+
+<!--
+ <wsdl:message name="doStringResponseMsg">
+ <wsdl:part name="doStringResponse" type="xsd:string"/>
+ </wsdl:message>
+ <wsdl:message name="doStringRequestMsg">
+ <wsdl:part name="doStringRequest" type="xsd:string"/>
+ </wsdl:message>
+-->
+ <wsdl:portType name="WSEntryPointTestRPC">
+ <wsdl:operation name="doString">
+ <wsdl:input message="tns:doStringRequestMsg"/>
+ <wsdl:output message="tns:doStringResponseMsg"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="WSEntryPointTestRPCSOAP" type="tns:WSEntryPointTestRPC">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="doString">
+ <soap:operation soapAction="WSEntryPointTestRPC/doString"/>
+ <wsdl:input>
+ <soap:body namespace="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/" use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body namespace="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/" use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="WSEntryPointTestRPC">
+ <wsdl:port binding="tns:WSEntryPointTestRPCSOAP" name="WSEntryPointTestRPCSOAP">
+ <soap:address location="http://localhost:9090/axis2/services/WSEntryPointTestRPC"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType
new file mode 100644
index 0000000000..15287150e0
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ASCII"?>
+<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="WSEntryPointTestRPCService">
+ <interface.cpp header="WSEntryPointTestRPC.h">
+ </interface.cpp>
+ </service>
+
+</componentType>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.cpp b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.cpp
new file mode 100644
index 0000000000..f46d64db18
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.cpp
@@ -0,0 +1,38 @@
+/*
++----------------------------------------------------------------------+
+| (c) Copyright IBM Corporation 2005. |
+| All Rights Reserved. |
++----------------------------------------------------------------------+
+| |
+| 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 "WSEntryPointTestRPCImpl.h"
+#include <stdio.h>
+
+WSEntryPointTestRPCImpl::WSEntryPointTestRPCImpl()
+{
+}
+
+WSEntryPointTestRPCImpl::~WSEntryPointTestRPCImpl()
+{
+}
+
+// WSEntryPointTestRPC interface
+char* WSEntryPointTestRPCImpl::doString(char* arg1)
+{
+ printf("WSEntryPointTestRPCImpl::doString %s\n", arg1);
+
+ return "WSEntryPointTestRPCImpl::doString response";
+}
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h
new file mode 100644
index 0000000000..82023992c7
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h
@@ -0,0 +1,36 @@
+/*
++----------------------------------------------------------------------+
+| (c) Copyright IBM Corporation 2005. |
+| All Rights Reserved. |
++----------------------------------------------------------------------+
+| |
+| 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. |
++----------------------------------------------------------------------+
+*/
+
+#ifndef WSEENTRYPOINTTESTRPCIMPL_H
+#define WSEENTRYPOINTTESTRPCIMPL_H
+
+#include "WSEntryPointTestRPC.h"
+
+class WSEntryPointTestRPCImpl : public WSEntryPointTestRPC
+{
+public:
+ WSEntryPointTestRPCImpl();
+ virtual ~WSEntryPointTestRPCImpl();
+
+ // WSEntryPointTestRPC interface
+ virtual char* doString(char* arg1);
+};
+
+#endif
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp
new file mode 100644
index 0000000000..b3799db850
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp
@@ -0,0 +1,63 @@
+/*
+ * 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 "WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy* WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy_Destructor(void* proxy)
+ {
+ delete (WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy*)proxy;
+ }
+}
+
+WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy::WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy::~WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+char* WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy::doString( char* arg0)
+{
+ Operation operation("doString");
+ operation.addParameter(&arg0);
+ char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h
new file mode 100644
index 0000000000..36aa7a6992
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+#ifndef WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy_h
+#define WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy_h
+
+#include "WSEntryPointTestRPC.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy : public WSEntryPointTestRPC
+{
+public:
+ WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy();
+ virtual char* doString( char* arg1);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp
new file mode 100644
index 0000000000..c20a5fb027
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp
@@ -0,0 +1,70 @@
+/*
+ * 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 "WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper* WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper(target);
+ }
+}
+
+WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper::WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (WSEntryPointTestRPCImpl*)getImplementation();
+}
+
+WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper::~WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper::newImplementation()
+{
+ return new WSEntryPointTestRPCImpl;
+}
+
+void WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "doString")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ *(char**)operation.getReturnValue() = impl->doString(p0);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h
new file mode 100644
index 0000000000..875143461a
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+#ifndef WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper_h
+#define WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper_h
+
+#include "WSEntryPointTestRPCImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ WSEntryPointTestRPCImpl* impl;
+};
+
+#endif // WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCModule.vcproj b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCModule.vcproj
new file mode 100644
index 0000000000..d3bc172bcd
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCModule.vcproj
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="WSEntryPointTestRPCModule"
+ ProjectGUID="{6F98DD05-6B3D-4C06-9E1C-AF3256DCA7EA}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="$(TUSCANY_SCACPP)/include,$(TUSCANY_SDOCPP)/include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WSENTRYPOINTTESTRPCMODULE_EXPORTS"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="tuscany_sca.lib tuscany_sdo.lib"
+ OutputFile="$(OutDir)/WSEntryPointTestRPCModule.dll"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="$(TUSCANY_SCACPP)/lib,$(TUSCANY_SDOCPP)/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/WSEntryPointTestRPCModule.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/WSEntryPointTestRPCModule.lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WSENTRYPOINTTESTRPCMODULE_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/WSEntryPointTestRPCModule.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)/WSEntryPointTestRPCModule.lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath=".\WSEntryPointTestRPCImpl.cpp">
+ </File>
+ <File
+ RelativePath=".\WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp">
+ </File>
+ <File
+ RelativePath=".\WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath=".\WSEntryPointTestRPC.h">
+ </File>
+ <File
+ RelativePath=".\WSEntryPointTestRPCImpl.h">
+ </File>
+ <File
+ RelativePath=".\WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h">
+ </File>
+ <File
+ RelativePath=".\WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ <File
+ RelativePath=".\sca.module">
+ </File>
+ <File
+ RelativePath=".\services.xml">
+ </File>
+ <File
+ RelativePath=".\Tuscany-model.config">
+ </File>
+ <File
+ RelativePath=".\WSEntryPointTestRPC.wsdl">
+ </File>
+ <File
+ RelativePath=".\WSEntryPointTestRPCImpl.componentType">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/sca.module b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/sca.module
new file mode 100644
index 0000000000..a6d397653e
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/sca.module
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ASCII"?>
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ name="WSEntryPointTestRPCModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="WSEntryPointTestRPCEntrypoint" multiplicity="1..1">
+ <interface.wsdl interface="WSEntryPointTestRPC.wsdl" callbackInterface=""></interface.wsdl>
+ <binding.ws port="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/#wsdl.endpoint(WSEntryPointTestRPC/WSEntryPointTestRPCSOAP)"></binding.ws>
+ <reference>WSEntryPointTestRPCServiceComponent</reference>
+ </entryPoint>
+
+
+ <component name="WSEntryPointTestRPCServiceComponent">
+ <implementation.cpp dll="WSEntryPointTestRPCModule.dll" header="WSEntryPointTestRPCImpl.h"></implementation.cpp>
+ <properties> </properties>
+ <references> </references>
+ </component>
+</module>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/services.xml b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/services.xml
new file mode 100644
index 0000000000..2fd4580526
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/services.xml
@@ -0,0 +1,30 @@
+
+<!--
+ 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.
+ -->
+<service name="WSEntryPointTestRPC">
+ <parameter name="ServiceClass" locked="xsd:false">tuscany_sca</parameter>
+ <parameter name="TuscanySystemRoot" locked="xsd:false">D:/tuscany/cpp/sca/test/WSEntryPointTestRPC/runtime</parameter>
+ <parameter name="TuscanyEntryPoint" locked="xsd:false">WSEntryPointTestRPCSubsystem/WSEntryPointTestRPCService/WSEntryPointTestRPCEntrypoint</parameter>
+
+ <description>
+ This is a testing service , to test the system is working or not
+ </description>
+
+ <operation name="doString">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+
+</service>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCSubsystem/sca.subsystem b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCSubsystem/sca.subsystem
new file mode 100644
index 0000000000..c37d656a57
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCSubsystem/sca.subsystem
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<subsystem xmlns="http://www.osoa.org/xmlns/sca/0.9" name="WSEntryPointTestRPCSubsystem">
+
+ <moduleComponent name="WSEntryPointTestRPCService" module="WSEntryPointTestRPCModule" />
+
+</subsystem>
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/Tuscany-model.config b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/Tuscany-model.config
new file mode 100644
index 0000000000..42ad3ccfe3
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/Tuscany-model.config
@@ -0,0 +1,24 @@
+<?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.
+ -->
+
+<tuscany-model xmlns="http://org.apache.tuscany/xmlns/cpp/1.0">
+ <wsdl>
+ <file name="WSEntryPointTestRPC.wsdl"/>
+ </wsdl>
+ <xsd>
+ </xsd>
+</tuscany-model>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h
new file mode 100644
index 0000000000..5bd20f103a
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h
@@ -0,0 +1,30 @@
+/*
++----------------------------------------------------------------------+
+| (c) Copyright IBM Corporation 2005. |
+| All Rights Reserved. |
++----------------------------------------------------------------------+
+| |
+| 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. |
++----------------------------------------------------------------------+
+*/
+
+#ifndef WSEENTRYPOINTTESTRPC_H
+#define WSEENTRYPOINTTESTRPC_H
+class WSEntryPointTestRPC
+{
+public:
+ virtual char* doString(char* arg1) = 0;
+};
+
+#endif
+
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl
new file mode 100644
index 0000000000..1706534042
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WSEntryPointTestRPC" targetNamespace="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/">
+
+ <wsdl:types>
+ <xs:schema targetNamespace="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/"
+ elementFormDefault="qualified">
+
+ <xs:element name="doStringRequest">
+ <xs:simpleType>
+ <xs:restriction base="xs:string"/>
+ </xs:simpleType>
+ </xs:element>
+ <xs:element name="doStringResponse">
+ <xs:simpleType>
+ <xs:restriction base="xs:string"/>
+ </xs:simpleType>
+ </xs:element>
+
+ </xs:schema>
+ </wsdl:types>
+
+ <wsdl:message name="doStringResponseMsg">
+ <wsdl:part name="doStringResponse" element="tns:doStringResponse"/>
+ </wsdl:message>
+ <wsdl:message name="doStringRequestMsg">
+ <wsdl:part name="doStringRequest" element="tns:doStringRequest"/>
+ </wsdl:message>
+
+<!--
+ <wsdl:message name="doStringResponseMsg">
+ <wsdl:part name="doStringResponse" type="xsd:string"/>
+ </wsdl:message>
+ <wsdl:message name="doStringRequestMsg">
+ <wsdl:part name="doStringRequest" type="xsd:string"/>
+ </wsdl:message>
+-->
+ <wsdl:portType name="WSEntryPointTestRPC">
+ <wsdl:operation name="doString">
+ <wsdl:input message="tns:doStringRequestMsg"/>
+ <wsdl:output message="tns:doStringResponseMsg"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="WSEntryPointTestRPCSOAP" type="tns:WSEntryPointTestRPC">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="doString">
+ <soap:operation soapAction="WSEntryPointTestRPC/doString"/>
+ <wsdl:input>
+ <soap:body namespace="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/" use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body namespace="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/" use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="WSEntryPointTestRPC">
+ <wsdl:port binding="tns:WSEntryPointTestRPCSOAP" name="WSEntryPointTestRPCSOAP">
+ <soap:address location="http://localhost:9090/axis2/services/WSEntryPointTestRPC"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType
new file mode 100644
index 0000000000..15287150e0
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ASCII"?>
+<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="WSEntryPointTestRPCService">
+ <interface.cpp header="WSEntryPointTestRPC.h">
+ </interface.cpp>
+ </service>
+
+</componentType>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h
new file mode 100644
index 0000000000..82023992c7
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h
@@ -0,0 +1,36 @@
+/*
++----------------------------------------------------------------------+
+| (c) Copyright IBM Corporation 2005. |
+| All Rights Reserved. |
++----------------------------------------------------------------------+
+| |
+| 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. |
++----------------------------------------------------------------------+
+*/
+
+#ifndef WSEENTRYPOINTTESTRPCIMPL_H
+#define WSEENTRYPOINTTESTRPCIMPL_H
+
+#include "WSEntryPointTestRPC.h"
+
+class WSEntryPointTestRPCImpl : public WSEntryPointTestRPC
+{
+public:
+ WSEntryPointTestRPCImpl();
+ virtual ~WSEntryPointTestRPCImpl();
+
+ // WSEntryPointTestRPC interface
+ virtual char* doString(char* arg1);
+};
+
+#endif
+
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/sca.module b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/sca.module
new file mode 100644
index 0000000000..a6d397653e
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/sca.module
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ASCII"?>
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ name="WSEntryPointTestRPCModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="WSEntryPointTestRPCEntrypoint" multiplicity="1..1">
+ <interface.wsdl interface="WSEntryPointTestRPC.wsdl" callbackInterface=""></interface.wsdl>
+ <binding.ws port="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/#wsdl.endpoint(WSEntryPointTestRPC/WSEntryPointTestRPCSOAP)"></binding.ws>
+ <reference>WSEntryPointTestRPCServiceComponent</reference>
+ </entryPoint>
+
+
+ <component name="WSEntryPointTestRPCServiceComponent">
+ <implementation.cpp dll="WSEntryPointTestRPCModule.dll" header="WSEntryPointTestRPCImpl.h"></implementation.cpp>
+ <properties> </properties>
+ <references> </references>
+ </component>
+</module>
diff --git a/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/subsystems/WSEntryPointTestRPCSubsystem/sca.subsystem b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/subsystems/WSEntryPointTestRPCSubsystem/sca.subsystem
new file mode 100644
index 0000000000..c37d656a57
--- /dev/null
+++ b/branches/cpp-M1/sca/test/WSEntryPointTestRPC/runtime/subsystems/WSEntryPointTestRPCSubsystem/sca.subsystem
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+
+<subsystem xmlns="http://www.osoa.org/xmlns/sca/0.9" name="WSEntryPointTestRPCSubsystem">
+
+ <moduleComponent name="WSEntryPointTestRPCService" module="WSEntryPointTestRPCModule" />
+
+</subsystem>
+
diff --git a/branches/cpp-M1/sca/tools/Makefile.am b/branches/cpp-M1/sca/tools/Makefile.am
new file mode 100644
index 0000000000..0bea197e35
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = scagen \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/META-INF/LICENSE b/branches/cpp-M1/sca/tools/scagen/META-INF/LICENSE
new file mode 100755
index 0000000000..f433b1a53f
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/META-INF/LICENSE
@@ -0,0 +1,177 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
diff --git a/branches/cpp-M1/sca/tools/scagen/META-INF/NOTICE b/branches/cpp-M1/sca/tools/scagen/META-INF/NOTICE
new file mode 100644
index 0000000000..bfb81409ad
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/META-INF/NOTICE
@@ -0,0 +1,2 @@
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/) \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/META-INF/README b/branches/cpp-M1/sca/tools/scagen/META-INF/README
new file mode 100644
index 0000000000..2831dadd94
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/META-INF/README
@@ -0,0 +1,19 @@
+Apache Tuscany C++ M1 build (July, 2006)
+===================================
+
+http://incubator.apache.org/tuscany
+
+Tuscany is an effort undergoing incubation at the Apache Software Foundation
+(ASF), sponsored by the Web Services PMC.
+
+Incubation is required of all newly accepted projects until a further review
+indicates that the infrastructure, communications, and decision making process
+have stabilized in a manner consistent with other successful ASF projects.
+
+While incubation status is not necessarily a reflection of the completeness or
+stability of the code, it does indicate that the project has yet to be fully
+endorsed by the ASF.
+
+Thank you for using Tuscany!
+
+The Tuscany Team.
diff --git a/branches/cpp-M1/sca/tools/scagen/Makefile.am b/branches/cpp-M1/sca/tools/scagen/Makefile.am
new file mode 100644
index 0000000000..0d8e880488
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/Makefile.am
@@ -0,0 +1,19 @@
+SUBDIRS =
+
+BUILT_SOURCES = scagen_build
+EXTRA_DIST = build.xml scagen.sh scagen.cmd src META-INF
+bin_SCRIPTS = scagen.sh scagen.cmd
+
+scagen_build:
+ ant
+ touch scagen_build
+
+clean:
+ rm -f scagen_build
+
+install-exec-hook:
+ cp bld/scagen.jar $(bindir)
+
+
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/build.xml b/branches/cpp-M1/sca/tools/scagen/build.xml
new file mode 100644
index 0000000000..1b8e66e50a
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/build.xml
@@ -0,0 +1,151 @@
+<?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.
+ -->
+
+<project name="org.apache.tuscany.sca.cpp.tools" default="all" basedir=".">
+
+ <target name="init">
+ <property name="build.result.folder" value="${basedir}/bld" />
+ <property name="temp.folder" value="${basedir}/tmp" />
+ <property name="junit.jar.folder" value="${basedir}/lib" />
+ <property name="tool.name" value="scagen" />
+ <property name="bin.dir" value="${basedir}/../../deploy/bin" />
+ </target>
+
+ <!-- Add "test" to the depends list below to add auto-testing to the build -->
+ <!-- a junit.jar is needed at ${junit.jar.folder}/junit.jar though -->
+ <target name="all" depends="init,jars,doc,scripts,zip.all">
+ </target>
+
+ <target name="test" depends="init,jars,test.jar">
+ <java classname="org.apache.tuscany.sca.cpp.tools.junit.TestAllModulesTest">
+ <classpath>
+ <pathelement location="${build.result.folder}/test.jar" />
+ <pathelement location="${junit.jar.folder}/junit.jar" />
+ <pathelement location="${build.result.folder}/scagen.jar" />
+ <pathelement path="${java.class.path}" />
+ </classpath>
+ </java>
+ </target>
+
+
+
+ <target name="doc">
+ <javadoc packagenames="org.apache.tuscany.sca.cpp.tools.*" sourcepath="src" defaultexcludes="yes" destdir="docs/api" author="true" version="true" use="true" windowtitle="SCA for C++ Tools">
+ <doctitle>
+ <![CDATA[<h1>SCA for C++ Tools</h1>]]>
+ </doctitle>
+ <bottom>
+ <![CDATA[<i>Copyright 2005 The Apache Software Foundation or its licensors, as applicable.</i>]]></bottom>
+ <group title="C++ Parser" packages="org.apache.tuscany.sca.cpp.tools.common" />
+ <group title="SCA Services Generator" packages="org.apache.tuscany.sca.cpp.tools.services" />
+ <link offline="true" href="http://java.sun.com/products/jdk/1.2/docs/api/" packagelistLoc="C:\tmp" />
+</javadoc>
+</target>
+
+<target name="jars" depends="init, scagen.jar, src.jar">
+</target>
+
+<target name="scripts" depends="init">
+<mkdir dir="${build.result.folder}" />
+<copy file="scagen.cmd" todir="${build.result.folder}" />
+<copy file="scagen.sh" todir="${build.result.folder}" />
+</target>
+
+
+
+<target name="src.jar" depends="init">
+<delete dir="${temp.folder}/src.jar.bin" />
+<mkdir dir="${temp.folder}/src.jar.bin" />
+<!-- Copy necessary resources i.e XSL stylesheets, test input etc
+ for the src jar too
+ -->
+<copy todir="${temp.folder}/src.jar.bin" failonerror="true">
+ <fileset dir="src/" />
+</copy>
+<mkdir dir="${build.result.folder}" />
+<jar jarfile="${build.result.folder}/src.jar" basedir="${temp.folder}/src.jar.bin" />
+<delete dir="${temp.folder}/test.jar.bin" />
+</target>
+
+<target name="test.jar" depends="init, scagen.jar" unless="test.jar" description="Create jar for unit tests: test.jar.">
+<delete dir="${temp.folder}/test.jar.bin" />
+<mkdir dir="${temp.folder}/test.jar.bin" />
+<!-- compile the source code -->
+<javac srcdir="junit" destdir="${temp.folder}/test.jar.bin" failonerror="true" includeAntRuntime="no">
+ <src path="junit/" />
+ <classpath>
+ <pathelement path="${junit.jar.folder}/junit.jar" />
+ <pathelement path="${build.result.folder}/scagen.jar" />
+ </classpath>
+</javac>
+<!-- Copy necessary resources i.e XSL stylesheets, test input etc -->
+<copy todir="${temp.folder}/test.jar.bin" failonerror="true">
+ <fileset dir="junit/" excludes="testoutput/**" />
+</copy>
+<mkdir dir="${build.result.folder}" />
+<jar jarfile="${build.result.folder}/test.jar" basedir="${temp.folder}/test.jar.bin" />
+<delete dir="${temp.folder}/test.jar.bin" />
+</target>
+
+<target name="scagen.jar" depends="init" unless="scagen.jar" description="Create main jar: scagen.jar">
+<delete dir="${temp.folder}/scagen.jar.bin" />
+<mkdir dir="${temp.folder}/scagen.jar.bin" />
+<!-- compile the source code -->
+<javac srcdir="src" destdir="${temp.folder}/scagen.jar.bin" failonerror="true" includeAntRuntime="no">
+ <src path="src/" />
+</javac>
+<!-- Copy necessary resources i.e XSL stylesheets, test input etc -->
+<copy todir="${temp.folder}/scagen.jar.bin" failonerror="true">
+ <fileset dir="src/" excludes="**/*.java" />
+</copy>
+
+<copy todir="${temp.folder}/scagen.jar.bin/META-INF" failonerror="true">
+ <fileset dir="META-INF/"/>
+</copy>
+
+<mkdir dir="${build.result.folder}" />
+<jar jarfile="${build.result.folder}/scagen.jar" basedir="${temp.folder}/scagen.jar.bin">
+ <manifest>
+ <attribute name="Main-Class" value="org.apache.tuscany.sca.cpp.tools.services.Scagen" />
+ </manifest>
+</jar>
+<delete dir="${temp.folder}/scagen.jar.bin" />
+</target>
+
+<target name="tobin" depends="jars, scripts" description="move the desired stuff to bin">
+ <move file="${build.result.folder}/scagen.cmd" todir="${bin.dir}" />
+ <move file="${build.result.folder}/scagen.sh" todir="${bin.dir}" />
+ <move file="${build.result.folder}/scagen.jar" todir="${bin.dir}" />
+</target>
+
+
+
+<target name="clean" depends="init" description="Clean of all the files created.">
+<delete file="${build.result.folder}/test.jar" />
+<delete file="${build.result.folder}/src.jar" />
+<delete file="${build.result.folder}/scagen.jar" />
+<delete file="${build.result.folder}/org.apache.tuscany.sca.cpp.tools.zip" />
+<delete dir="${temp.folder}" />
+</target>
+
+<target name="zip.all" depends="jars" description="Create a zip containing everything">
+<delete file="${build.result.folder}/org.apache.tuscany.sca.cpp.tools.zip" />
+<zip zipfile="${build.result.folder}/org.apache.tuscany.sca.cpp.tools.zip" excludes="bin/**,tmp/**,lib/**,junit/testoutput/**" basedir="." filesonly="true" whenempty="skip" update="false" />
+<delete dir="${temp.folder}" />
+</target>
+
+</project> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/CalculatorTest.java b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/CalculatorTest.java
new file mode 100644
index 0000000000..448fd6dd7d
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/CalculatorTest.java
@@ -0,0 +1,29 @@
+/*
+ *
+ * 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.
+ */
+package org.apache.tuscany.sca.cpp.tools.junit;
+
+import org.apache.tuscany.sca.cpp.tools.junit.TuscanyTestCase;
+
+/**
+ * This test case tests a simple Calculator service tools generation
+ */
+public class CalculatorTest extends TuscanyTestCase {
+
+ public void testCalculatorModuleAndComponent() {
+ testModule("CalculatorModuleAndComponent", check_results);
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/EnvHandlerTest.java b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/EnvHandlerTest.java
new file mode 100644
index 0000000000..82bdce4dd4
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/EnvHandlerTest.java
@@ -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.
+*/
+package org.apache.tuscany.sca.cpp.tools.junit;
+
+/**
+ * This is a "run this first" testcase that just tests some simple operations of
+ * the scagen tools it uses the
+ * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as
+ * input data.
+ */
+public class EnvHandlerTest extends TuscanyTestCase {
+
+ /**
+ * Constructor for CustomerInfoTestOLD.
+ *
+ * @param arg0
+ */
+ public EnvHandlerTest(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule
+ * proxy and wrapper generation.
+ */
+ public void testEnvHandler() {
+ testModule("MyValueServiceModule", check_results);
+ }
+
+}
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceButNotInClassAttrTest.java b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceButNotInClassAttrTest.java
new file mode 100644
index 0000000000..35b3416057
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceButNotInClassAttrTest.java
@@ -0,0 +1,88 @@
+/*
+/*
+*
+* 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.
+*/
+package org.apache.tuscany.sca.cpp.tools.junit;
+
+/**
+ * This is a "run this first" testcase that just tests some simple operations of
+ * the scagen tools it uses the
+ * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr SCA module as
+ * input data.
+ */
+public class ImplClassWithNameSpaceButNotInClassAttrTest extends TuscanyTestCase {
+
+ /**
+ * Constructor for CustomerInfoTestOLD.
+ *
+ * @param arg0
+ */
+ public ImplClassWithNameSpaceButNotInClassAttrTest(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr
+ * proxy and wrapper generation.
+ */
+ public void testEnvHandler() {
+ testModule("MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr", check_results);
+ }
+
+}
+*
+* 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.
+*/
+package org.apache.tuscany.sca.cpp.tools.junit;
+
+/**
+ * This is a "run this first" testcase that just tests some simple operations of
+ * the scagen tools it uses the
+ * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr SCA module as
+ * input data.
+ */
+public class ImplClassWithNameSpaceButNotInClassAttrTest extends TuscanyTestCase {
+
+ /**
+ * Constructor for CustomerInfoTestOLD.
+ *
+ * @param arg0
+ */
+ public ImplClassWithNameSpaceButNotInClassAttrTest(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr
+ * proxy and wrapper generation.
+ */
+ public void testEnvHandler() {
+ testModule("MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr", check_results);
+ }
+
+}
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceTest.java b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceTest.java
new file mode 100644
index 0000000000..5c38f6fe31
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/ImplClassWithNameSpaceTest.java
@@ -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.
+*/
+package org.apache.tuscany.sca.cpp.tools.junit;
+
+/**
+ * This is a "run this first" testcase that just tests some simple operations of
+ * the scagen tools it uses the
+ * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as
+ * input data.
+ */
+public class ImplClassWithNameSpaceTest extends TuscanyTestCase {
+
+ /**
+ * Constructor for CustomerInfoTestOLD.
+ *
+ * @param arg0
+ */
+ public ImplClassWithNameSpaceTest(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule
+ * proxy and wrapper generation.
+ */
+ public void testEnvHandler() {
+ testModule("MyValueServiceModuleImplClassWithNamespace", check_results);
+ }
+
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceButNotInClassAttrTest.java b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceButNotInClassAttrTest.java
new file mode 100644
index 0000000000..b4b025bcba
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceButNotInClassAttrTest.java
@@ -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.
+*/
+package org.apache.tuscany.sca.cpp.tools.junit;
+
+/**
+ * This is a "run this first" testcase that just tests some simple operations of
+ * the scagen tools it uses the
+ * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as
+ * input data.
+ */
+public class IntfClassWithNameSpaceButNotInClassAttrTest extends TuscanyTestCase {
+
+ /**
+ * Constructor for CustomerInfoTestOLD.
+ *
+ * @param arg0
+ */
+ public IntfClassWithNameSpaceButNotInClassAttrTest(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule
+ * proxy and wrapper generation.
+ */
+ public void testEnvHandler() {
+ testModule("MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr", check_results);
+ }
+
+}
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceTest.java b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceTest.java
new file mode 100644
index 0000000000..90ea9751ad
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/IntfClassWithNameSpaceTest.java
@@ -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.
+*/
+package org.apache.tuscany.sca.cpp.tools.junit;
+
+/**
+ * This is a "run this first" testcase that just tests some simple operations of
+ * the scagen tools it uses the
+ * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as
+ * input data.
+ */
+public class IntfClassWithNameSpaceTest extends TuscanyTestCase {
+
+ /**
+ * Constructor for CustomerInfoTestOLD.
+ *
+ * @param arg0
+ */
+ public IntfClassWithNameSpaceTest(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule
+ * proxy and wrapper generation.
+ */
+ public void testEnvHandler() {
+ testModule("MyValueServiceModuleIntfClassWithNamespace", check_results);
+ }
+
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/MissingModuleAndFragmentTest.java b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/MissingModuleAndFragmentTest.java
new file mode 100644
index 0000000000..d45e9eb941
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/MissingModuleAndFragmentTest.java
@@ -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.
+*/
+package org.apache.tuscany.sca.cpp.tools.junit;
+
+/**
+ * This is a "run this first" testcase that just tests some simple operations of
+ * the scagen tools it uses the
+ * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as
+ * input data.
+ */
+public class MissingModuleAndFragmentTest extends TuscanyTestCase {
+
+ /**
+ * Constructor for CustomerInfoTestOLD.
+ *
+ * @param arg0
+ */
+ public MissingModuleAndFragmentTest(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule
+ * proxy and wrapper generation.
+ */
+ public void testEnvHandler() {
+ testModule("MyValueServiceModuleMissingScaModule",check_results);
+ }
+
+}
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/SimplePublicPrivateProtectedTest.java b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/SimplePublicPrivateProtectedTest.java
new file mode 100644
index 0000000000..baf5ad6c61
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/SimplePublicPrivateProtectedTest.java
@@ -0,0 +1,45 @@
+/*
+ *
+ * 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.
+ */
+package org.apache.tuscany.sca.cpp.tools.junit;
+
+/**
+ * This is a "run this first" testcase that just tests some simple operations of
+ * the scagen tools it uses the
+ * Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule SCA module as
+ * input data.
+ */
+public class SimplePublicPrivateProtectedTest extends TuscanyTestCase {
+
+ /**
+ * Constructor for CustomerInfoTestOLD.
+ *
+ * @param arg0
+ */
+ public SimplePublicPrivateProtectedTest(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * Test the Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule
+ * proxy and wrapper generation.
+ */
+ public void testEnvHandler() {
+
+ testModule("SimplePublicPrivateProtectedTest", check_results);
+ }
+
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllModulesTest.java b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllModulesTest.java
new file mode 100644
index 0000000000..d0d85db1ea
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestAllModulesTest.java
@@ -0,0 +1,83 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * <PID TBD>
+ *
+ * (C) Copyright IBM Corp. 2005
+ *
+ * The source code for this program is not published
+ * or otherwise divested of its trade secrets,
+ * irrespective of what has been deposited with the
+ * U. S. Copyright Office.
+ */
+package org.apache.tuscany.sca.cpp.tools.junit;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.tuscany.sca.cpp.tools.junit.TuscanyTestCase;
+
+/**
+ * This test case will test all the modules placed in the "modules" directory
+ * against the results in their repectice "expected_results" folders.
+ */
+public class TestAllModulesTest extends TuscanyTestCase {
+
+ String testsDir = TuscanyTestCase.junit_modules;
+
+ Set excludes = new HashSet();
+
+ public TestAllModulesTest(String arg0) {
+ super(arg0);
+ excludes.add("MyValueServiceModuleMissingScaModule");
+ excludes.add("CVS");
+ excludes.add(".svn");
+ }
+
+
+ /* main exists to allow running from the java ant task */
+ public static void main(String[] args) {
+ TestAllModulesTest test = new TestAllModulesTest("");
+ test.testAllModulesRegression();
+ }
+
+ public void testAllModulesRegression() {
+ File dir = new File(testsDir);
+
+ if (dir.isDirectory()) {
+ System.out.println("Testing all modules under "
+ + dir.getAbsolutePath());
+ String[] test_modules = dir.list();
+
+ for (int i = 0; i < test_modules.length; i++) {
+ File test_module = new File(testsDir, test_modules[i]);
+
+ String module_name = null;
+ if (test_module.isDirectory()) {
+ module_name = test_module.getName();
+ if (!excludes.contains(module_name.intern())) {
+ testModule(module_name, check_results);
+ System.out.println("Test of module \"" + module_name
+ + "\" passed.");
+ continue;
+ } else {
+ System.out
+ .println("Ignoring excluded module subdirectory \""
+ + module_name + "\"");
+ }
+ }
+ }
+
+ } else {
+
+ fail("Test directory is not a directory! \r The variable org.apache.tuscany.sca.cpp.tools.junit.TuscanyTestCase.root sets the location of the junit input data,\r it is currently set as "
+ + TuscanyTestCase.root + "\rand we expect to find a testinput\\modules directory under there.");
+ }
+
+ System.out.println("testAllModules test passed.");
+ }
+
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestDeployAssistTool.java b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestDeployAssistTool.java
new file mode 100644
index 0000000000..8210ca9a5c
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TestDeployAssistTool.java
@@ -0,0 +1,91 @@
+/*
+ * IBM Confidential
+ *
+ * OCO Source Materials
+ *
+ * <PID TBD>
+ *
+ * (C) Copyright IBM Corp. 2005
+ *
+ * The source code for this program is not published
+ * or otherwise divested of its trade secrets,
+ * irrespective of what has been deposited with the
+ * U. S. Copyright Office.
+ */
+package org.apache.tuscany.sca.cpp.tools.junit;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * This test case will test all the modules placed in the "modules" directory
+ * against the results in their repectice "expected_results" folders.
+ */
+public class TestDeployAssistTool extends TuscanyTestCase {
+
+ String testsDir = TuscanyTestCase.junit_modules;
+
+ Set excludes = new HashSet();
+
+ public TestDeployAssistTool(String arg0) {
+ super(arg0);
+ excludes.add("MyValueServiceModuleMissingScaModule");
+ excludes.add("CVS");
+ }
+
+ /* main exists to allow running from the test script which will
+ * wrap this test case and pipe the satandard output to somewhere
+ * for checking.
+ */
+
+ public static void main(String[] args) {
+ TestDeployAssistTool test = new TestDeployAssistTool("");
+ test.testDeployToolNullParms();
+ }
+
+ public void testDeployTool() {
+ //Utils.setReportArtefacts(true);
+ TestAllModulesTest t = new TestAllModulesTest("");
+ File dir = new File(testsDir);
+
+ if (dir.isDirectory()) {
+ String[] test_modules = dir.list();
+
+ for (int i = 0; i < test_modules.length; i++) {
+ File test_module = new File(testsDir, test_modules[i]);
+ String module_name = null;
+ if (test_module.isDirectory()) {
+ module_name = test_module.getName();
+ if (!excludes.contains(module_name.intern())) {
+ t.testModuleDeploy(module_name, create_results, "c:\\colin", "cp");
+ }
+ }
+ System.out.println("");
+ }
+ }
+ }
+
+ public void testDeployToolNullParms() {
+ //Utils.setReportArtefacts(true);
+ TestAllModulesTest t = new TestAllModulesTest("");
+ File dir = new File(testsDir);
+
+ if (dir.isDirectory()) {
+ String[] test_modules = dir.list();
+
+ for (int i = 0; i < test_modules.length; i++) {
+ File test_module = new File(testsDir, test_modules[i]);
+ String module_name = null;
+ if (test_module.isDirectory()) {
+ module_name = test_module.getName();
+ if (!excludes.contains(module_name.intern())) {
+ t.testModuleDeploy(module_name, create_results, null, null);
+ }
+ }
+ System.out.println("");
+ }
+ }
+ }
+}
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TuscanyTestCase.java b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TuscanyTestCase.java
new file mode 100644
index 0000000000..7eae483fb4
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/org/apache/tuscany/sca/cpp/tools/junit/TuscanyTestCase.java
@@ -0,0 +1,337 @@
+/*
+ *
+ * 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.
+ */
+package org.apache.tuscany.sca.cpp.tools.junit;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.cpp.tools.common.Options;
+import org.apache.tuscany.sca.cpp.tools.services.Scagen;
+
+/**
+ * A superclass for testcases that can be used to store common functions.
+ */
+public class TuscanyTestCase extends TestCase {
+
+ public static String root = "d:\\tuscany\\cpp\\sca\\tools\\scagen\\junit\\";
+
+ public static String junit_modules = root + "testinput\\modules\\";
+
+ public static String junit_output = root + "testoutput\\";
+
+ private String testcase = "TESTCASE NOT SET BY SUBCLASS";
+
+ String input = null;
+
+ String output = null;
+
+ /**
+ * Check the resulting files with the contents of the expected_results
+ * folder in the testModule method
+ */
+ public final static boolean check_results = true;
+
+ /**
+ * Create test output but do not check it (useful for setting up new
+ * expected test output
+ */
+ public final static boolean create_results = false;
+
+ /**
+ *
+ */
+ public TuscanyTestCase() {
+ super();
+ }
+
+ /**
+ * @param arg0
+ */
+ public TuscanyTestCase(String arg0) {
+ super(arg0);
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /**
+ * Tests to see if two files are the same - this is just a scratch method at
+ * the moment that flags up testcase output files not matching expected
+ * results rather than needing to be a fully robust implementation and needs
+ * a little further work.
+ *
+ * @param file1
+ * the first file to compare
+ * @param file2
+ * the second file to compare
+ *
+ */
+ protected boolean areFilesEqual(String file1, String file2) {
+
+ try {
+ FileInputStream fis1 = new java.io.FileInputStream(file1);
+ FileInputStream fis2 = new java.io.FileInputStream(file2);
+
+ BufferedReader br1 = new BufferedReader(new InputStreamReader(fis1));
+ BufferedReader br2 = new BufferedReader(new InputStreamReader(fis2));
+
+ String line1 = br1.readLine();
+ String line2 = br2.readLine();
+ boolean moretodo = (line1 != null) && (line2 != null);
+
+ for (int line = 1; moretodo; line++) {
+
+ if (line1.equals(line2)) {
+
+ line1 = br1.readLine();
+ line2 = br2.readLine();
+
+ } else {
+
+ int l1i, l2i;
+
+ if ((l1i = line1.lastIndexOf("$Id")) > 0) {
+ //allow CVS strings
+ line1 = br1.readLine();
+ }
+
+ if ((l2i = line2.lastIndexOf("$Id")) > 0) {
+ //allow CVS strings
+ line2 = br2.readLine();
+ }
+
+ if (l1i == -1 && l2i == -1) {
+
+ // they don't match
+ System.out.println("file " + file1 + " and file "
+ + file2);
+ System.out.println(" don't match at line " + line);
+ System.out.println("1 is :" + line1);
+ System.out.println("2 is :" + line2);
+
+ return false;
+ }
+ }
+
+ moretodo = (line1 != null) && (line2 != null);
+ }
+
+ System.out.println("MATCH FOR: file " + file1 + " and file "
+ + file2);
+ return true;
+
+ } catch (Throwable t) {
+ t.printStackTrace();
+ return true;
+ }
+
+ }
+
+ /**
+ * @param outputDir
+ */
+ protected void clearDirButNotExpectedOutputSubDir(String outputDir) {
+ File dir = new File(outputDir);
+ if (dir.isDirectory()) {
+ String[] files = dir.list();
+ for (int i = 0; i < files.length; i++) {
+ File child = new File(dir, files[i]);
+ if (child.isDirectory()) {
+ if (!(child.getName().equals("expected_output") || child.getName().equals(".svn"))) {
+ clearDirButNotExpectedOutputSubDir(dir
+ .getAbsolutePath()
+ + File.separator + files[i]);
+ }
+ }
+ else
+ {
+ if( !child.delete() )
+ {
+ System.out.println("File "+outputDir+"/"+child.getName()+" could not be deleted");
+ }
+ }
+ }
+ }
+
+ }
+
+ public void testModule(String module, boolean check) {
+
+ Options.reset();
+ setTestcase(module);
+ clearDirButNotExpectedOutputSubDir(output);
+
+ String[] commandLine = new String[] { "-dir", input, "-output", output };
+ try {
+ Scagen.main(commandLine);
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+
+ if (check) {
+ checkDirWithExpected(output);
+ }
+ }
+
+ public void testModuleDeploy(String module, boolean check,
+ String deployDir, String command) {
+
+ Options.reset();
+ setTestcase(module);
+ clearDirButNotExpectedOutputSubDir(output);
+
+ String[] commandLine;
+ if (null == deployDir) {
+ commandLine = new String[] { "-dir", input, "-output",
+ output, "-deploy"};
+ } else {
+ commandLine = new String[] { "-dir", input, "-output",
+ output, "-deploy", deployDir, "-command", command };
+ }
+ try {
+ Scagen.main(commandLine);
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+
+ if (check) {
+ checkDirWithExpected(output);
+ }
+ }
+
+ /**
+ * @param outputDirName
+ */
+ private void checkDirWithExpected(String outputDirName) {
+
+ File actualDir = new File(outputDirName);
+ if (actualDir == null || !actualDir.isDirectory()) {
+ fail("result directory does not exist");
+ }
+
+ File expectedDir = new File(outputDirName + File.separator
+ + "expected_output");
+ if (expectedDir == null || !actualDir.isDirectory()) {
+ fail("can't check results as expected directory does not exist");
+ }
+
+ //Check every file in the expected output directory is present
+ //in the actual directory
+
+ String[] expectedFiles = expectedDir.list();
+
+ if (expectedFiles == null) {
+ fail("no expected results for " + expectedDir.getPath());
+ }
+ for (int i = 0; expectedFiles != null && i < expectedFiles.length; i++) {
+ File expectedFile = new File(expectedDir, expectedFiles[i]);
+ if (expectedFile.isDirectory()) {
+ // we can't check subdirectories yet
+ // and it conveniently skips over "CVS"
+ } else {
+ File actualFile = checkFileExistsFailIfNot(actualDir,
+ expectedFile.getName());
+ checkFileHasNoTabsAndEndsInNewline(actualDir, expectedFile
+ .getName());
+ if (!areFilesEqual(expectedFile.getAbsolutePath(), actualFile
+ .getAbsolutePath())) {
+ fail("odd output for " + expectedFile.getPath());
+ }
+
+ }
+
+ }
+
+ }
+
+ /**
+ * @param actualDir
+ * @param name
+ */
+ private File checkFileExistsFailIfNot(File dir, String name) {
+
+ File f = new File(dir, name);
+ if (f == null || !f.exists() || !f.isFile()) {
+ fail("Expected result file " + f + " does not exist");
+ }
+ return f;
+
+ }
+
+ /**
+ * @param actualDir
+ * @param name
+ */
+ private void checkFileHasNoTabsAndEndsInNewline(File dir, String name) {
+
+ try {
+ File f = new File(dir, name);
+ FileInputStream fis = new FileInputStream(f);
+ InputStreamReader isr = new InputStreamReader(fis);
+ Reader br = new BufferedReader(isr);
+ int ch, charBeforeMinusOne = -1;
+ while ((ch = br.read()) > -1) {
+ if (ch == '\t') {
+ fail("found tab in output " + f.getPath());
+ }
+ charBeforeMinusOne = ch;
+ }
+ //The last char must be newline;
+ if (charBeforeMinusOne != '\n') {
+ fail("last char in file is not a newline in " + "(char is:"
+ + ch + " " + dir.getName() + File.separator + name);
+ }
+
+ br.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ fail("io exception in tab/newline checker for " + dir.getName()
+ + File.separator + name);
+ return;
+ }
+
+ }
+
+ /**
+ * @param testcase
+ * The testcase to set.
+ */
+ void setTestcase(String testcase) {
+ this.testcase = testcase;
+ input = TuscanyTestCase.junit_modules + testcase;
+ output = TuscanyTestCase.junit_output + testcase;
+ }
+
+ /**
+ * @return Returns the testcase.
+ */
+ String getTestcase() {
+ return testcase;
+ }
+
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/go.cmd b/branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/go.cmd
new file mode 100644
index 0000000000..6a303b1471
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/go.cmd
@@ -0,0 +1,2 @@
+rm -rf out
+java -jar scagen.jar -dir c:\workspaces\wid60-no-core\Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule -output c:\hydra\out
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_dir_option.cmd b/branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_dir_option.cmd
new file mode 100644
index 0000000000..13834b3aae
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_dir_option.cmd
@@ -0,0 +1 @@
+java -jar scagen.jar -dirX c:\workspaces\wid60-no-core\Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule -output c:\hydra\out
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_input_dir.cmd b/branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_input_dir.cmd
new file mode 100644
index 0000000000..4fa9a86b1f
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_input_dir.cmd
@@ -0,0 +1 @@
+java -jar scagen.jar -dir x:\not_there -output c:\hydra\irrelevant
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_output_dir.cmd b/branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_output_dir.cmd
new file mode 100644
index 0000000000..5e6b818ae3
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/go_no_output_dir.cmd
@@ -0,0 +1 @@
+java -jar scagen.jar -dir c:\workspaces\wid60-no-core\Hydra.sca.core\test\testSCASystem\modules\MyValueServiceModule -output r:\hydra\out
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/refresh-tools-jar.cmd b/branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/refresh-tools-jar.cmd
new file mode 100644
index 0000000000..2640ed87de
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/scripts_for_standalone_testing/refresh-tools-jar.cmd
@@ -0,0 +1 @@
+copy c:\workspaces\wid60-no-core\Hydra.sca.tools\scagen.jar . \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/Calculator.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/Calculator.h
new file mode 100644
index 0000000000..3ab503ef1d
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/Calculator.h
@@ -0,0 +1,32 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef CALCULATOR_H
+#define CALCULATOR_H
+
+
+class Calculator {
+
+private:
+ virtual long add(long a, long b) = 0;
+public:
+
+ virtual long subtract(long a, long b) = 0;
+};
+
+
+#endif // CALCULATOR_H
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.componentType b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.componentType
new file mode 100644
index 0000000000..ef0f346ba0
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.componentType
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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/0.9">
+ <service name="CalculatorService">
+ <interface.cpp header="Calculator.h"/> <!-- Header is relative to the module root -->
+ </service>
+</componentType> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.h
new file mode 100644
index 0000000000..daa9b25627
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/CalculatorImpl.h
@@ -0,0 +1,33 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef CALCULATORIMPL_H
+#define CALCULATORIMPL_H
+
+#include "Calculator.h"
+
+class CalculatorImpl : public Calculator
+{
+public:
+ CalculatorImpl();
+ virtual ~CalculatorImpl();
+ virtual long add(long a, long b);
+ virtual long subtract(long a, long b);
+
+};
+
+#endif //
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/sca.module b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/sca.module
new file mode 100644
index 0000000000..f74d5f690c
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorModuleAndComponent/sca.module
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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.
+ */
+-->
+
+
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9" name="Calculator">
+
+ <component name="Calculator">
+ <implementation.cpp dll="debug/Calculator.dll" header="CalculatorImpl.h"/>
+ </component>
+
+</module>
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorBack.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorBack.h
new file mode 100644
index 0000000000..da74be77a6
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorBack.h
@@ -0,0 +1,31 @@
+/*
+ *
+ * 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.
+ */
+#ifndef CALCULATOR_H
+#define CALCULATOR_H
+
+
+class CalculatorBack {
+
+
+
+public:
+ virtual long subtractBack(long a, long b) = 0;
+ virtual long addBack(long a, long b) = 0;
+};
+
+
+#endif // CALCULATOR_H
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorForward.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorForward.h
new file mode 100644
index 0000000000..48a5ff5018
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/otherSubFolder/CalculatorForward.h
@@ -0,0 +1,30 @@
+/*
+ *
+ * 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.
+ */
+#ifndef CALCULATOR_H
+#define CALCULATOR_H
+
+
+class CalculatorForward {
+
+public:
+
+ virtual long subtractForward(long a, long b) = 0;
+ virtual long addForward(long a, long b) = 0;
+};
+
+
+#endif // CALCULATOR_H
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/sca.module b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/sca.module
new file mode 100644
index 0000000000..b4aaa37a4c
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/sca.module
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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.
+ */
+ -->
+
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9" name="Calculator">
+
+ <component name="CalculatorForward">
+ <implementation.cpp header="subFolder/CalculatorForwardImpl.h"/>
+ </component>
+
+ <component name="CalculatorBack">
+ <implementation.cpp header="subFolder\CalculatorBackImpl.h"/>
+ </component>
+
+</module>
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.componentType b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.componentType
new file mode 100644
index 0000000000..6a5a152266
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.componentType
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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/0.9">
+ <service name="CalculatorService">
+ <interface.cpp header="otherSubFolder\CalculatorBack.h"/> <!-- Header is relative to the module root -->
+ </service>
+</componentType> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.h
new file mode 100644
index 0000000000..0cacc5916c
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorBackImpl.h
@@ -0,0 +1,33 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef CALCULATORIMPL_H
+#define CALCULATORIMPL_H
+
+#include "Calculator.h"
+
+class CalculatorBackImpl : public Calculator
+{
+public:
+ CalculatorImpl();
+ virtual ~CalculatorImpl();
+ virtual long addBack(long a, long b);
+ virtual long subtractBack(long a, long b);
+
+};
+
+#endif //
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.componentType b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.componentType
new file mode 100644
index 0000000000..9617b22aee
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.componentType
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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/0.9">
+ <service name="CalculatorService">
+ <interface.cpp header="otherSubFolder/CalculatorForward.h"/> <!-- Header is relative to the module root -->
+ </service>
+</componentType> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.h
new file mode 100644
index 0000000000..f3b0467002
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CalculatorSlashDirectionTest/subFolder/CalculatorForwardImpl.h
@@ -0,0 +1,32 @@
+/*
+ *
+ * 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.
+ */
+#ifndef CALCULATORIMPL_H
+#define CALCULATORIMPL_H
+
+#include "Calculator.h"
+
+class CalculatorForwardImpl : public Calculator
+{
+public:
+ CalculatorImpl();
+ virtual ~CalculatorImpl();
+ virtual long addForward(long a, long b);
+ virtual long subtractForward(long a, long b);
+
+};
+
+#endif //
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.fragment b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.fragment
new file mode 100644
index 0000000000..29fd03c399
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.fragment
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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.
+ */
+ -->
+
+<moduleFragment xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="CustomerInfoComponent">
+
+
+ <component name="CustomerInfoComponent">
+ <implementation.cpp dll="CustomerInfo.dll" class="CustomerInfoImpl" header="CustomerInfoImpl.h"></implementation.cpp>
+ <properties>
+ <v:Fred>x</v:Fred>
+ <v:Joe>23</v:Joe>
+ <Joe>42</Joe>
+ </properties>
+ <references>
+ </references>
+ </component>
+
+</moduleFragment>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.h
new file mode 100644
index 0000000000..d5e1a702c6
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfo.h
@@ -0,0 +1,94 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef CustomerInfo_h
+#define CustomerInfo_h
+
+class CustomerInfo
+{
+public:
+//char (simple extra type)
+ virtual const char* getCustomerInformationChar(char * p1, const char* customerID ) = 0;
+ virtual const char* getCustomerInfoAChar(char * p1,const char*) = 0;
+ virtual const char* getCustomerInfoBChar(char * p1, char* customerID ) = 0;
+ virtual const char* getCustomerInfoCChar(char * p1, char customerID ) = 0;
+ virtual const char* getCustomerInfoDChar(char * p1,char) = 0;
+ virtual const char* getCustomerInfoEChar(char * p1 , char *) = 0;
+ virtual const char* getCustomerInfoFChar(char * p1, char * p1, char *customerID ) = 0;
+ virtual const char* getCustomerInfoGChar(char * p1, char *, char * p1,signed char *customerID ) = 0;
+ virtual const char* getCustomerInfoHChar(unsigned char *customerID, const char, ) = 0;
+ virtual const char* getCustomerInfoHChar(unsigned char *customerID, const char*) = 0;
+
+//long (duplicate the types)
+ virtual const long* getCustomerInformationLong(const long* customerID, const long* customerID ) = 0;
+ virtual const long* getCustomerInfoALong(const long*,const long*) = 0;
+ virtual const long* getCustomerInfoBLong(long* customerID, long* customerID2 ) = 0;
+ virtual const long* getCustomerInfoCLong(long customerID , long customerID2 ) = 0;
+ virtual const long* getCustomerInfoDLong(long,long) = 0;
+ virtual const long* getCustomerInfoELong(long *, long*) = 0;
+ virtual const long* getCustomerInfoFLong(long *customerID, long* customerID2 ) = 0;
+ virtual const long* getCustomerInfoGLong(signed long *customerID, signed long *customerID2 ) = 0;
+ virtual const long* getCustomerInfoHLong(signed long *customerID, signed long *customerID2 ) = 0;
+
+//int
+ virtual const int* getCustomerInformationInt(char*, const int* customerID ) = 0;
+ virtual const int* getCustomerInfoAInt(char*,const int*) = 0;
+ virtual const int* getCustomerInfoBInt(char*,int* customerID ) = 0;
+ virtual const int* getCustomerInfoCInt(char*,int customerID ) = 0;
+ virtual const int* getCustomerInfoDInt(char*,int) = 0;
+ virtual const int* getCustomerInfoEInt(char*,int *) = 0;
+ virtual const int* getCustomerInfoFInt(char*,int *customerID ) = 0;
+ virtual const int* getCustomerInfoGInt(char*,signed int *customerID ) = 0;
+ virtual const int* getCustomerInfoHInt(char*,unsigned int *customerID ) = 0;
+
+
+//__int64
+ virtual const __int64* getCustomerInformationint64(Diamond&,const __int64* customerID ) = 0;
+ virtual const __int64* getCustomerInfoAint64(Diamond&, const __int64*) = 0;
+ virtual const __int64* getCustomerInfoBint64( Diamond&, __int64* customerID ) = 0;
+ virtual const __int64* getCustomerInfoCint64(Diamond&,__int64 customerID ) = 0;
+ virtual const __int64* getCustomerInfoDint64(Diamond& myDiamond,__int64) = 0;
+ virtual const __int64* getCustomerInfoEint64(Diamond& myDiamond, __int64 *) = 0;
+ virtual const __int64* getCustomerInfoFint64(Diamond& myDiamond, __int64 *customerID ) = 0;
+ virtual const __int64* getCustomerInfoGint64(Diamond& myDiamond, signed __int64 *customerID ) = 0;
+ virtual const __int64* getCustomerInfoHint64(const Diamond& myDiamond, unsigned int64 *customerID ) = 0;
+
+//void
+ virtual const void* getCustomerInformationVoid(float& f, const __int64* customerID ) = 0;
+ virtual void getCustomerInfoAVoid(const float& f, const __int64*) = 0;
+ virtual void getCustomerInfoBVoid( ) = 0;
+ virtual void getCustomerInfoCVoid() = 0;
+ virtual void getCustomerInfoDVoid(void) = 0;
+ virtual char getCustomerInfoEVoid(void) = 0;
+ virtual char getCustomerInfoFVoid() = 0;
+ virtual char getCustomerInfoGVoid( void ) = 0;
+
+//inline
+ virtual inline const char * getCustomerInfoAInline(int,int,int,int, char* customer id) = 0;
+ inline int getCustomerInfoBInline(int*,int* f, int* g, char* customer id) = 0;
+ virtual inline friend const unsigned int * getCustomerInfoCInline(char* customer id) = 0;
+
+//tricky examples
+ int getCustomerInfoTrickyA(const char, const char) = 0;
+ int getCustomerInfoTrickyB(int myInt, int myInt) = 0;
+
+
+
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.componentType b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.componentType
new file mode 100644
index 0000000000..d39a3bdadf
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.componentType
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="CustomerInfoService">
+ <interface.cpp header="/CustomerInfo.h">
+ </interface.cpp>
+ </service>
+
+ <property name="Fred" type="xs:string"/>
+ <property name="Joe" type="xs:integer" many="true"/>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.h
new file mode 100644
index 0000000000..546df093a3
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplMultiParamDiffTypesTest/CustomerInfoImpl.h
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef CustomerInfoImpl_h
+#define CustomerInfoImpl_h
+
+#include "CustomerInfo.h"
+
+
+
+class CustomerInfoImpl : public CustomerInfo
+{
+public:
+ CustomerInfoImpl();
+ virtual ~CustomerInfoImpl();
+ virtual const char* getCustomerInformation(const char* customerID);
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.fragment b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.fragment
new file mode 100644
index 0000000000..fa6d101363
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.fragment
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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.
+ */
+ -->
+
+<moduleFragment xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="CustomerInfoComponent">
+
+
+ <component name="CustomerInfoComponent">
+ <implementation.cpp dll="CustomerInfo" class="CustomerInfoImpl" header="CustomerInfoImpl.h"></implementation.cpp>
+ <properties>
+ <v:Fred>x</v:Fred>
+ <v:Joe>23</v:Joe>
+ <Joe>42</Joe>
+ </properties>
+ <references>
+ </references>
+ </component>
+
+</moduleFragment>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.h
new file mode 100644
index 0000000000..d3be176bfd
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfo.h
@@ -0,0 +1,89 @@
+/*
+ *
+ * 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.
+ */
+#ifndef CustomerInfo_h
+#define CustomerInfo_h
+
+class CustomerInfo
+{
+public:
+//char
+ virtual const char* getCustomerInformationChar(const char* customerID ) = 0;
+ virtual const char* getCustomerInfoAChar(const char*) = 0;
+ virtual const char* getCustomerInfoBChar(char* customerID ) = 0;
+ virtual const char* getCustomerInfoCChar(char customerID ) = 0;
+ virtual const char* getCustomerInfoDChar(char) = 0;
+ virtual const char* getCustomerInfoEChar(char *) = 0;
+ virtual const char* getCustomerInfoFChar(char *customerID ) = 0;
+ virtual const char* getCustomerInfoGChar(signed char *customerID ) = 0;
+ virtual const char* getCustomerInfoHChar(unsigned char *customerID ) = 0;
+
+//long
+ virtual const long* getCustomerInformationLong(const long* customerID ) = 0;
+ virtual const long* getCustomerInfoALong(const long*) = 0;
+ virtual const long* getCustomerInfoBLong(long* customerID ) = 0;
+ virtual const long* getCustomerInfoCLong(long customerID ) = 0;
+ virtual const long* getCustomerInfoDLong(long) = 0;
+ virtual const long* getCustomerInfoELong(long *) = 0;
+ virtual const long* getCustomerInfoFLong(long *customerID ) = 0;
+ virtual const long* getCustomerInfoGLong(signed long *customerID ) = 0;
+ virtual const long* getCustomerInfoHLong(unsigned long *customerID ) = 0;
+
+//int
+ virtual const int* getCustomerInformationInt(const int* customerID ) = 0;
+ virtual const int* getCustomerInfoAInt(const int*) = 0;
+ virtual const int* getCustomerInfoBInt(int* customerID ) = 0;
+ virtual const int* getCustomerInfoCInt(int customerID ) = 0;
+ virtual const int* getCustomerInfoDInt(int) = 0;
+ virtual const int* getCustomerInfoEInt(int *) = 0;
+ virtual const int* getCustomerInfoFInt(int *customerID ) = 0;
+ virtual const int* getCustomerInfoGInt(signed int *customerID ) = 0;
+ virtual const int* getCustomerInfoHInt(unsigned int *customerID ) = 0;
+
+
+//__int64
+ virtual const __int64* getCustomerInformationint64(const __int64* customerID ) = 0;
+ virtual const __int64* getCustomerInfoAint64(const __int64*) = 0;
+ virtual const __int64* getCustomerInfoBint64(__int64* customerID ) = 0;
+ virtual const __int64* getCustomerInfoCint64(__int64 customerID ) = 0;
+ virtual const __int64* getCustomerInfoDint64(__int64) = 0;
+ virtual const __int64* getCustomerInfoEint64(__int64 *) = 0;
+ virtual const __int64* getCustomerInfoFint64(__int64 *customerID ) = 0;
+ virtual const __int64* getCustomerInfoGint64(signed __int64 *customerID ) = 0;
+ virtual const __int64* getCustomerInfoHint64(unsigned int64 *customerID ) = 0;
+
+//void
+ virtual const void* getCustomerInformationVoid(const __int64* customerID ) = 0;
+ virtual void getCustomerInfoAVoid(const __int64*) = 0;
+ virtual void getCustomerInfoBVoid( ) = 0;
+ virtual void getCustomerInfoCVoid() = 0;
+ virtual void getCustomerInfoDVoid(void) = 0;
+
+//inline
+ virtual inline const char * getCustomerInfoAInline(char* customer id) = 0;
+ inline int getCustomerInfoBInline(char* customer id) = 0;
+ virtual inline friend const unsigned int * getCustomerInfoCInline(char* customer id) = 0;
+
+//tricky examples
+ int getCustomerInfoTrickyA(const char) = 0;
+ int getCustomerInfoTrickyB(int myInt) = 0;
+
+
+
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.componentType b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.componentType
new file mode 100644
index 0000000000..d39a3bdadf
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.componentType
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="CustomerInfoService">
+ <interface.cpp header="/CustomerInfo.h">
+ </interface.cpp>
+ </service>
+
+ <property name="Fred" type="xs:string"/>
+ <property name="Joe" type="xs:integer" many="true"/>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.h
new file mode 100644
index 0000000000..50d37ee4f2
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/CustomerInfoImplSingleParamDiffTypesTest/CustomerInfoImpl.h
@@ -0,0 +1,43 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef CustomerInfoImpl_h
+#define CustomerInfoImpl_h
+
+#include "CustomerInfo.h"
+
+
+
+class CustomerInfoImpl : public CustomerInfo
+{
+public:
+ CustomerInfoImpl();
+ virtual ~CustomerInfoImpl();
+ virtual const char* getCustomerInformation(const char* customerID);
+
+};
+
+class CustomerInfoImpl2 : public CustomerInfo
+{
+public:
+ CustomerInfoImpl();
+ virtual ~CustomerInfoImpl();
+ virtual const char* getCustomerInformation2(const char* customerID);
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.fragment b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.fragment
new file mode 100644
index 0000000000..491e79f5e4
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.fragment
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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.
+ */
+ -->
+<moduleFragment xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="CustomerInfoComponent">
+
+
+ <component name="CustomerInfoComponent">
+ <implementation.cpp dll="CustomerInfo" class="CustomerInfoImpl2" header="CustomerInfoImpl.h"></implementation.cpp>
+ <properties>
+ <v:Fred>x</v:Fred>
+ <v:Joe>23</v:Joe>
+ <Joe>42</Joe>
+ </properties>
+ <references>
+ </references>
+ </component>
+
+</moduleFragment>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.h
new file mode 100644
index 0000000000..7bd355b3ab
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfo.h
@@ -0,0 +1,36 @@
+/*
+ *
+ * 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.
+ */
+#ifndef CustomerInfo_h
+#define CustomerInfo_h
+
+class CustomerInfo
+{
+public:
+ virtual const char* getCustomerInformation(const char* customerID) = 0;
+
+};
+
+
+class CustomerInfoSecond
+{
+public:
+ virtual const char* getCustomerInformationSecond(const char* customerID) = 0;
+
+};
+
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.componentType b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.componentType
new file mode 100644
index 0000000000..179af71dca
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.componentType
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="CustomerInfoService">
+ <interface.cpp header="/CustomerInfo.h">
+ </interface.cpp>
+ </service>
+
+ <property name="Fred" type="xs:string"/>
+ <property name="Joe" type="xs:integer" many="true"/>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.h
new file mode 100644
index 0000000000..85e96bb348
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/CustomerInfoImpl.h
@@ -0,0 +1,46 @@
+/*
+ *
+ * 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.
+ */
+
+
+// Class definition for the implementation
+
+#ifndef CustomerInfoImpl_h
+#define CustomerInfoImpl_h
+
+#include "CustomerInfo.h"
+
+
+
+class CustomerInfoImpl : public CustomerInfo
+{
+public:
+ CustomerInfoImpl();
+ virtual ~CustomerInfoImpl();
+ virtual const char* getCustomerInformation(const char* customerID);
+
+};
+
+class CustomerInfoImpl2 : public CustomerInfo
+{
+public:
+ CustomerInfoImpl();
+ virtual ~CustomerInfoImpl();
+ virtual const char* getCustomerInformation2(const char* customerID);
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValue.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValue.h
new file mode 100644
index 0000000000..a65b1f944c
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValue.h
@@ -0,0 +1,35 @@
+/*
+ *
+ * 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.
+ */
+// MyValue.h: interface for the MyValueImpl class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#ifndef MyValue_h
+#define MyValue_h
+#include <string>
+using std::string;
+class MyValue
+{
+public:
+ virtual float getMyValue(const char* customerID) = 0;
+ virtual float getMyValueS(const string& customerID) = 0;
+ virtual string getCustname(string& customerID) = 0;
+ virtual const string& getCustnamecs(string customerID) = 0;
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.componentType b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.componentType
new file mode 100644
index 0000000000..df0d97a438
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.componentType
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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/0.9">
+
+ <service name="MyValueService">
+ <interface.cpp class="MyValue" header="MyValue.h">
+ </interface.cpp>
+ </service>
+
+ <reference name="customerInfo">
+ <interface.cpp header="CustomerInfo.h">
+ </interface.cpp>
+ </reference>
+
+ <reference name="stockQuote">
+ <interface.cpp header="StockQuoteService.h">
+ </interface.cpp>
+ </reference>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.hpp b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.hpp
new file mode 100644
index 0000000000..f7a8171a65
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl.hpp
@@ -0,0 +1,38 @@
+/*
+ *
+ * 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.
+ */
+// Class definition for the implementation
+
+#ifndef MyValueImpl_h
+#define MyValueImpl_h
+
+#include "MyValue.h"
+
+
+
+class MyValueImpl : public MyValue
+{
+public:
+ MyValueImpl();
+ virtual ~MyValueImpl();
+ virtual float getMyValue(const char* customerID);
+ virtual float getMyValueS(const string& customerID);
+ virtual string getCustname(string& customerID);
+ virtual const string& getCustnamecs(string customerID);
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl_stockQuote_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl_stockQuote_Proxy.h
new file mode 100644
index 0000000000..5c8293b51e
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/MyValueImpl_stockQuote_Proxy.h
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef MyValueImpl_stockQuote_Proxy_h
+#define MyValueImpl_stockQuote_Proxy_h
+
+#include "StockQuoteService.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_stockQuote_Proxy : public StockQuoteService
+{
+public:
+ MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_stockQuote_Proxy();
+ virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_stockQuote_Proxy_h
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/StockQuoteService.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/StockQuoteService.h
new file mode 100644
index 0000000000..d96115fb3f
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/StockQuoteService.h
@@ -0,0 +1,33 @@
+/*
+ *
+ * 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.
+ */
+
+//
+//////////////////////////////////////////////////////////////////////
+
+#ifndef StockQuoteService_h
+#define StockQuoteService_h
+#include <string>
+#include "commonj/sdo/sdo.h"
+using std::string;
+class StockQuoteService
+{
+public:
+ virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr request) = 0;
+
+};
+
+#endif // StockQuoteService_h
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/sca.module b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/sca.module
new file mode 100644
index 0000000000..565f4a74ec
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModule/sca.module
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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.
+ */
+ -->
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="MyValueServiceModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="MyValueServiceExport" multiplicity="1..1">
+ <interface.wsdl interface="" callbackInterface=""></interface.wsdl>
+ <binding.ws port="mvs:MyValueServiceSOAP"></binding.ws>
+ <reference>MyValueServiceComponent</reference>
+ </entryPoint>
+
+ <component name="MyValueServiceComponent">
+ <implementation.cpp dll="MyValue" header="MyValueImpl.hpp"></implementation.cpp>
+ <properties>
+ </properties>
+ <references>
+ <customerInfo>CustomerInfoComponent</customerInfo>
+ <stockQuote>StockQuoteService</stockQuote>
+ </references>
+ </component>
+
+ <!--
+ <component name="Calculator">
+ <implementation.cpp dll="debug/Calculator.dll" header="CalculatorImpl.h"/>
+ </component>
+ -->
+
+ <externalService name="StockQuoteService">
+ <interface.cpp header="StockQuoteService.h"/>
+ <binding.ws port="http://swanandmokashi.com#wsdl.endpoint(StockQuotes/StockQuotesSoap)"/>
+ </externalService>
+
+ <!--wire>
+ <source.uri>MyValueServiceComponent/customerInfo</source.uri>
+ <target.uri>CustomerInfoComponent</target.uri>
+ </wire-->
+
+</module>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.fragment b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.fragment
new file mode 100644
index 0000000000..5666c51a41
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.fragment
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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.
+ */
+ -->
+<moduleFragment xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="CustomerInfoComponent">
+
+
+ <component name="CustomerInfoComponent">
+ <implementation.cpp dll="CustomerInfo" class="Other::CustomerInfoImpl" header="CustomerInfoImpl.h"></implementation.cpp>
+ <properties>
+ <v:Fred>x</v:Fred>
+ <v:Joe>23</v:Joe>
+ <Joe>42</Joe>
+ </properties>
+ <references>
+ </references>
+ </component>
+
+</moduleFragment>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.h
new file mode 100644
index 0000000000..e41f9e8287
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfo.h
@@ -0,0 +1,37 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef CustomerInfo_h
+#define CustomerInfo_h
+
+class CustomerInfo
+{
+public:
+ virtual const char* getCustomerInformation(const char* customerID) = 0;
+
+};
+
+
+class CustomerInfoSecond
+{
+public:
+ virtual const char* getCustomerInformationSecond(const char* customerID) = 0;
+
+};
+
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.componentType b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.componentType
new file mode 100644
index 0000000000..179af71dca
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.componentType
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="CustomerInfoService">
+ <interface.cpp header="/CustomerInfo.h">
+ </interface.cpp>
+ </service>
+
+ <property name="Fred" type="xs:string"/>
+ <property name="Joe" type="xs:integer" many="true"/>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.h
new file mode 100644
index 0000000000..b1360c5994
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/CustomerInfoImpl.h
@@ -0,0 +1,47 @@
+/*
+ *
+ * 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.
+ */
+// Class definition for the implementation
+
+#ifndef CustomerInfoImpl_h
+#define CustomerInfoImpl_h
+
+#include "CustomerInfo.h"
+
+
+/*
+class CustomerInfoImpl : public CustomerInfo
+{
+public:
+ CustomerInfoImpl();
+ virtual ~CustomerInfoImpl();
+ virtual const char* getCustomerInformation(const char* customerID);
+
+};
+
+*/
+namespace Other {
+ class CustomerInfoImpl : public CustomerInfo
+ {
+ public:
+ CustomerInfoImpl();
+ virtual ~CustomerInfoImpl();
+ virtual const char* getCustomerInformationOther(const char* customerID);
+
+ };
+}
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValue.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValue.h
new file mode 100644
index 0000000000..8b921bc2bf
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValue.h
@@ -0,0 +1,36 @@
+/*
+ *
+ * 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.
+ */
+
+// MyValue.h: interface for the MyValueImpl class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#ifndef MyValue_h
+#define MyValue_h
+#include <string>
+using std::string;
+class MyValue
+{
+public:
+ virtual float getMyValue(const char* customerID) = 0;
+ virtual float getMyValueS(const string& customerID) = 0;
+ virtual string getCustname(string& customerID) = 0;
+ virtual const string& getCustnamecs(string customerID) = 0;
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.componentType b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.componentType
new file mode 100644
index 0000000000..df0d97a438
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.componentType
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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/0.9">
+
+ <service name="MyValueService">
+ <interface.cpp class="MyValue" header="MyValue.h">
+ </interface.cpp>
+ </service>
+
+ <reference name="customerInfo">
+ <interface.cpp header="CustomerInfo.h">
+ </interface.cpp>
+ </reference>
+
+ <reference name="stockQuote">
+ <interface.cpp header="StockQuoteService.h">
+ </interface.cpp>
+ </reference>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.hpp b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.hpp
new file mode 100644
index 0000000000..f7a8171a65
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl.hpp
@@ -0,0 +1,38 @@
+/*
+ *
+ * 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.
+ */
+// Class definition for the implementation
+
+#ifndef MyValueImpl_h
+#define MyValueImpl_h
+
+#include "MyValue.h"
+
+
+
+class MyValueImpl : public MyValue
+{
+public:
+ MyValueImpl();
+ virtual ~MyValueImpl();
+ virtual float getMyValue(const char* customerID);
+ virtual float getMyValueS(const string& customerID);
+ virtual string getCustname(string& customerID);
+ virtual const string& getCustnamecs(string customerID);
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl_stockQuote_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl_stockQuote_Proxy.h
new file mode 100644
index 0000000000..5c8293b51e
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/MyValueImpl_stockQuote_Proxy.h
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef MyValueImpl_stockQuote_Proxy_h
+#define MyValueImpl_stockQuote_Proxy_h
+
+#include "StockQuoteService.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_stockQuote_Proxy : public StockQuoteService
+{
+public:
+ MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_stockQuote_Proxy();
+ virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_stockQuote_Proxy_h
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/StockQuoteService.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/StockQuoteService.h
new file mode 100644
index 0000000000..919b514e1a
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/StockQuoteService.h
@@ -0,0 +1,32 @@
+/*
+ *
+ * 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.
+ */
+//
+//////////////////////////////////////////////////////////////////////
+
+#ifndef StockQuoteService_h
+#define StockQuoteService_h
+#include <string>
+#include "commonj/sdo/sdo.h"
+using std::string;
+class StockQuoteService
+{
+public:
+ virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr request) = 0;
+
+};
+
+#endif // StockQuoteService_h
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/sca.module b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/sca.module
new file mode 100644
index 0000000000..565f4a74ec
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespace/sca.module
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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.
+ */
+ -->
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="MyValueServiceModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="MyValueServiceExport" multiplicity="1..1">
+ <interface.wsdl interface="" callbackInterface=""></interface.wsdl>
+ <binding.ws port="mvs:MyValueServiceSOAP"></binding.ws>
+ <reference>MyValueServiceComponent</reference>
+ </entryPoint>
+
+ <component name="MyValueServiceComponent">
+ <implementation.cpp dll="MyValue" header="MyValueImpl.hpp"></implementation.cpp>
+ <properties>
+ </properties>
+ <references>
+ <customerInfo>CustomerInfoComponent</customerInfo>
+ <stockQuote>StockQuoteService</stockQuote>
+ </references>
+ </component>
+
+ <!--
+ <component name="Calculator">
+ <implementation.cpp dll="debug/Calculator.dll" header="CalculatorImpl.h"/>
+ </component>
+ -->
+
+ <externalService name="StockQuoteService">
+ <interface.cpp header="StockQuoteService.h"/>
+ <binding.ws port="http://swanandmokashi.com#wsdl.endpoint(StockQuotes/StockQuotesSoap)"/>
+ </externalService>
+
+ <!--wire>
+ <source.uri>MyValueServiceComponent/customerInfo</source.uri>
+ <target.uri>CustomerInfoComponent</target.uri>
+ </wire-->
+
+</module>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/MyValue.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/MyValue.h
new file mode 100644
index 0000000000..73af9ae562
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/MyValue.h
@@ -0,0 +1,72 @@
+/*
+/*
+ *
+ * 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.
+ */
+
+// MyValue.h: interface for the MyValueImpl class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#ifndef MyValue_h
+#define MyValue_h
+#include <string>
+using std::string;
+
+class MyValue
+{
+ public:
+ virtual float getMyValueOther(const char* customerID) = 0;
+ virtual float getMyValueSOther(const string& customerID) = 0;
+ virtual string getCustnameOther(string& customerID) = 0;
+ virtual const string& getCustnamecsOther(string customerID) = 0;
+}
+
+#endif
+ *
+ * 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.
+ */
+
+// MyValue.h: interface for the MyValueImpl class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#ifndef MyValue_h
+#define MyValue_h
+#include <string>
+using std::string;
+
+class MyValue
+{
+ public:
+ virtual float getMyValueOther(const char* customerID) = 0;
+ virtual float getMyValueSOther(const string& customerID) = 0;
+ virtual string getCustnameOther(string& customerID) = 0;
+ virtual const string& getCustnamecsOther(string customerID) = 0;
+}
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType
new file mode 100644
index 0000000000..ff4ff50e9b
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="ASCII"?>
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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/0.9">
+
+ <service name="MyValueService">
+ <interface.cpp header="MyValue.h">
+ </interface.cpp>
+ </service>
+
+</componentType>
+
+<!--
+/*
+ *
+ * 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/0.9">
+
+ <service name="MyValueService">
+ <interface.cpp header="MyValue.h">
+ </interface.cpp>
+ </service>
+
+</componentType>
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp
new file mode 100644
index 0000000000..77950477ce
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp
@@ -0,0 +1,86 @@
+/*
+/*
+ *
+ * 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.
+ */
+// Class definition for the implementation
+
+#ifndef MyValueImpl_h
+#define MyValueImpl_h
+
+#include "MyValue.h"
+
+
+namespace myvaluecorp
+{
+ namespace implns
+ {
+
+ class MyValueImpl : public MyValue
+ {
+ public:
+ MyValueImpl();
+ virtual ~MyValueImpl();
+ virtual float getMyValue(const char* customerID);
+ virtual float getMyValueS(const string& customerID);
+ virtual string getCustname(string& customerID);
+ virtual const string& getCustnamecs(string customerID);
+
+ };
+ }
+}
+#endif
+ *
+ * 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.
+ */
+// Class definition for the implementation
+
+#ifndef MyValueImpl_h
+#define MyValueImpl_h
+
+#include "MyValue.h"
+
+
+namespace myvaluecorp
+{
+ namespace implns
+ {
+
+ class MyValueImpl : public MyValue
+ {
+ public:
+ MyValueImpl();
+ virtual ~MyValueImpl();
+ virtual float getMyValue(const char* customerID);
+ virtual float getMyValueS(const string& customerID);
+ virtual string getCustname(string& customerID);
+ virtual const string& getCustnamecs(string customerID);
+
+ };
+ }
+}
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/sca.module b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/sca.module
new file mode 100644
index 0000000000..ab49065c21
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/sca.module
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="ASCII"?>
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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.
+ */
+ -->
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="MyValueServiceModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="MyValueServiceExport" multiplicity="1..1">
+ <interface.wsdl interface="" callbackInterface=""></interface.wsdl>
+ <binding.ws port="mvs:MyValueServiceSOAP"></binding.ws>
+ <reference>MyValueServiceComponent</reference>
+ </entryPoint>
+
+ <component name="MyValueServiceComponent">
+ <implementation.cpp dll="MyValue" header="MyValueImpl.hpp"></implementation.cpp>
+ <properties>
+ </properties>
+ <references>
+ <customerInfo>CustomerInfoComponent</customerInfo>
+ <stockQuote>StockQuoteService</stockQuote>
+ </references>
+ </component>
+
+ <!--wire>
+ <source.uri>MyValueServiceComponent/customerInfo</source.uri>
+ <target.uri>CustomerInfoComponent</target.uri>
+ </wire-->
+
+</module>
+
+<!--
+/*
+ *
+ * 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.
+ */
+ -->
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="MyValueServiceModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="MyValueServiceExport" multiplicity="1..1">
+ <interface.wsdl interface="" callbackInterface=""></interface.wsdl>
+ <binding.ws port="mvs:MyValueServiceSOAP"></binding.ws>
+ <reference>MyValueServiceComponent</reference>
+ </entryPoint>
+
+ <component name="MyValueServiceComponent">
+ <implementation.cpp dll="MyValue" header="MyValueImpl.hpp"></implementation.cpp>
+ <properties>
+ </properties>
+ <references>
+ <customerInfo>CustomerInfoComponent</customerInfo>
+ <stockQuote>StockQuoteService</stockQuote>
+ </references>
+ </component>
+
+ <!--wire>
+ <source.uri>MyValueServiceComponent/customerInfo</source.uri>
+ <target.uri>CustomerInfoComponent</target.uri>
+ </wire-->
+
+</module>
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValue.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValue.h
new file mode 100644
index 0000000000..503f771bb2
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValue.h
@@ -0,0 +1,39 @@
+/*
+ *
+ * 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.
+ */
+
+// MyValue.h: interface for the MyValueImpl class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#ifndef MyValue_h
+#define MyValue_h
+#include <string>
+using std::string;
+
+namespace Other {
+ class MyValue
+ {
+ public:
+ virtual float getMyValueOther(const char* customerID) = 0;
+ virtual float getMyValueSOther(const string& customerID) = 0;
+ virtual string getCustnameOther(string& customerID) = 0;
+ virtual const string& getCustnamecsOther(string customerID) = 0;
+ }
+}
+
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.componentType b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.componentType
new file mode 100644
index 0000000000..8673c813a6
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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/0.9">
+
+ <service name="MyValueService">
+ <interface.cpp class="Other::MyValue" header="MyValue.h">
+ </interface.cpp>
+ </service>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.hpp b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.hpp
new file mode 100644
index 0000000000..f7a8171a65
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/MyValueImpl.hpp
@@ -0,0 +1,38 @@
+/*
+ *
+ * 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.
+ */
+// Class definition for the implementation
+
+#ifndef MyValueImpl_h
+#define MyValueImpl_h
+
+#include "MyValue.h"
+
+
+
+class MyValueImpl : public MyValue
+{
+public:
+ MyValueImpl();
+ virtual ~MyValueImpl();
+ virtual float getMyValue(const char* customerID);
+ virtual float getMyValueS(const string& customerID);
+ virtual string getCustname(string& customerID);
+ virtual const string& getCustnamecs(string customerID);
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/sca.module b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/sca.module
new file mode 100644
index 0000000000..6572621f1d
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespace/sca.module
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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.
+ */
+ -->
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="MyValueServiceModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="MyValueServiceExport" multiplicity="1..1">
+ <interface.wsdl interface="" callbackInterface=""></interface.wsdl>
+ <binding.ws port="mvs:MyValueServiceSOAP"></binding.ws>
+ <reference>MyValueServiceComponent</reference>
+ </entryPoint>
+
+ <component name="MyValueServiceComponent">
+ <implementation.cpp dll="MyValue" header="MyValueImpl.hpp"></implementation.cpp>
+ <properties>
+ </properties>
+ <references>
+ <customerInfo>CustomerInfoComponent</customerInfo>
+ <stockQuote>StockQuoteService</stockQuote>
+ </references>
+ </component>
+
+ <!--wire>
+ <source.uri>MyValueServiceComponent/customerInfo</source.uri>
+ <target.uri>CustomerInfoComponent</target.uri>
+ </wire-->
+
+</module>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValue.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValue.h
new file mode 100644
index 0000000000..ea8ebbb792
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValue.h
@@ -0,0 +1,37 @@
+/*
+ *
+ * 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.
+ */
+
+// MyValue.h: interface for the MyValueImpl class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#ifndef MyValue_h
+#define MyValue_h
+#include <string>
+using std::string;
+
+namespace Other {
+ class MyValue
+ {
+ public:
+ virtual float getMyValueOther(const char* customerID) = 0;
+ virtual float getMyValueSOther(const string& customerID) = 0;
+ virtual string getCustnameOther(string& customerID) = 0;
+ virtual const string& getCustnamecsOther(string customerID) = 0;
+ }
+}
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType
new file mode 100644
index 0000000000..c8d68fba5a
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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/0.9">
+
+ <service name="MyValueService">
+ <interface.cpp header="MyValue.h">
+ </interface.cpp>
+ </service>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp
new file mode 100644
index 0000000000..f7a8171a65
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/MyValueImpl.hpp
@@ -0,0 +1,38 @@
+/*
+ *
+ * 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.
+ */
+// Class definition for the implementation
+
+#ifndef MyValueImpl_h
+#define MyValueImpl_h
+
+#include "MyValue.h"
+
+
+
+class MyValueImpl : public MyValue
+{
+public:
+ MyValueImpl();
+ virtual ~MyValueImpl();
+ virtual float getMyValue(const char* customerID);
+ virtual float getMyValueS(const string& customerID);
+ virtual string getCustname(string& customerID);
+ virtual const string& getCustnamecs(string customerID);
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/sca.module b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/sca.module
new file mode 100644
index 0000000000..6572621f1d
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/sca.module
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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.
+ */
+ -->
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="MyValueServiceModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="MyValueServiceExport" multiplicity="1..1">
+ <interface.wsdl interface="" callbackInterface=""></interface.wsdl>
+ <binding.ws port="mvs:MyValueServiceSOAP"></binding.ws>
+ <reference>MyValueServiceComponent</reference>
+ </entryPoint>
+
+ <component name="MyValueServiceComponent">
+ <implementation.cpp dll="MyValue" header="MyValueImpl.hpp"></implementation.cpp>
+ <properties>
+ </properties>
+ <references>
+ <customerInfo>CustomerInfoComponent</customerInfo>
+ <stockQuote>StockQuoteService</stockQuote>
+ </references>
+ </component>
+
+ <!--wire>
+ <source.uri>MyValueServiceComponent/customerInfo</source.uri>
+ <target.uri>CustomerInfoComponent</target.uri>
+ </wire-->
+
+</module>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/CustomerInfo.fragmentX b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/CustomerInfo.fragmentX
new file mode 100644
index 0000000000..10c1805244
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/CustomerInfo.fragmentX
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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.
+ */
+ -->
+<moduleFragment xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="CustomerInfoComponent">
+
+
+ <component name="CustomerInfoComponent">
+ <implementation.cpp dll="CustomerInfo" class="CustomerInfoImpl2" header="CustomerInfoImpl.h"></implementation.cpp>
+ <properties>
+ <v:Fred>x</v:Fred>
+ <v:Joe>23</v:Joe>
+ <Joe>42</Joe>
+ </properties>
+ <references>
+ </references>
+ </component>
+
+</moduleFragment>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/sca.moduleX b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/sca.moduleX
new file mode 100644
index 0000000000..3eea80439f
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleMissingScaModule/sca.moduleX
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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.
+ */
+ -->
+
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="MyValueServiceModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="MyValueServiceExport" multiplicity="1..1">
+ <interface.wsdl interface="" callbackInterface=""></interface.wsdl>
+ <binding.ws port="mvs:MyValueServiceSOAP"></binding.ws>
+ <reference>MyValueServiceComponent</reference>
+ </entryPoint>
+
+ <component name="MyValueServiceComponent">
+ <implementation.cpp dll="MyValue" header="MyValueImpl.hpp"></implementation.cpp>
+ <properties>
+ </properties>
+ <references>
+ <customerInfo>CustomerInfoComponent</customerInfo>
+ <stockQuote>StockQuoteService</stockQuote>
+ </references>
+ </component>
+
+ <!--
+ <component name="Calculator">
+ <implementation.cpp dll="debug/Calculator.dll" header="CalculatorImpl.h"/>
+ </component>
+ -->
+
+ <externalService name="StockQuoteService">
+ <interface.cpp header="StockQuoteService.h"/>
+ <binding.ws port="http://swanandmokashi.com#wsdl.endpoint(StockQuotes/StockQuotesSoap)"/>
+ </externalService>
+
+ <!--wire>
+ <source.uri>MyValueServiceComponent/customerInfo</source.uri>
+ <target.uri>CustomerInfoComponent</target.uri>
+ </wire-->
+
+</module>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.fragment b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.fragment
new file mode 100644
index 0000000000..491e79f5e4
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.fragment
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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.
+ */
+ -->
+<moduleFragment xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="CustomerInfoComponent">
+
+
+ <component name="CustomerInfoComponent">
+ <implementation.cpp dll="CustomerInfo" class="CustomerInfoImpl2" header="CustomerInfoImpl.h"></implementation.cpp>
+ <properties>
+ <v:Fred>x</v:Fred>
+ <v:Joe>23</v:Joe>
+ <Joe>42</Joe>
+ </properties>
+ <references>
+ </references>
+ </component>
+
+</moduleFragment>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.h
new file mode 100644
index 0000000000..7bd355b3ab
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfo.h
@@ -0,0 +1,36 @@
+/*
+ *
+ * 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.
+ */
+#ifndef CustomerInfo_h
+#define CustomerInfo_h
+
+class CustomerInfo
+{
+public:
+ virtual const char* getCustomerInformation(const char* customerID) = 0;
+
+};
+
+
+class CustomerInfoSecond
+{
+public:
+ virtual const char* getCustomerInformationSecond(const char* customerID) = 0;
+
+};
+
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.componentType b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.componentType
new file mode 100644
index 0000000000..179af71dca
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.componentType
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="CustomerInfoService">
+ <interface.cpp header="/CustomerInfo.h">
+ </interface.cpp>
+ </service>
+
+ <property name="Fred" type="xs:string"/>
+ <property name="Joe" type="xs:integer" many="true"/>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.h
new file mode 100644
index 0000000000..e247a9b0bb
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/CustomerInfoImpl.h
@@ -0,0 +1,45 @@
+/*
+ *
+ * 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.
+ */
+
+// Class definition for the implementation
+
+#ifndef CustomerInfoImpl_h
+#define CustomerInfoImpl_h
+
+#include "CustomerInfo.h"
+
+
+
+class CustomerInfoImpl : public CustomerInfo
+{
+public:
+ CustomerInfoImpl();
+ virtual ~CustomerInfoImpl();
+ virtual const char* getCustomerInformation(const char* customerID);
+
+};
+
+class CustomerInfoImpl2 : public CustomerInfo
+{
+public:
+ CustomerInfoImpl();
+ virtual ~CustomerInfoImpl();
+ virtual const char* getCustomerInformation(const char* customerID);
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValue.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValue.h
new file mode 100644
index 0000000000..a65b1f944c
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValue.h
@@ -0,0 +1,35 @@
+/*
+ *
+ * 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.
+ */
+// MyValue.h: interface for the MyValueImpl class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#ifndef MyValue_h
+#define MyValue_h
+#include <string>
+using std::string;
+class MyValue
+{
+public:
+ virtual float getMyValue(const char* customerID) = 0;
+ virtual float getMyValueS(const string& customerID) = 0;
+ virtual string getCustname(string& customerID) = 0;
+ virtual const string& getCustnamecs(string customerID) = 0;
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.componentType b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.componentType
new file mode 100644
index 0000000000..df0d97a438
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.componentType
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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/0.9">
+
+ <service name="MyValueService">
+ <interface.cpp class="MyValue" header="MyValue.h">
+ </interface.cpp>
+ </service>
+
+ <reference name="customerInfo">
+ <interface.cpp header="CustomerInfo.h">
+ </interface.cpp>
+ </reference>
+
+ <reference name="stockQuote">
+ <interface.cpp header="StockQuoteService.h">
+ </interface.cpp>
+ </reference>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.hpp b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.hpp
new file mode 100644
index 0000000000..f7a8171a65
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl.hpp
@@ -0,0 +1,38 @@
+/*
+ *
+ * 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.
+ */
+// Class definition for the implementation
+
+#ifndef MyValueImpl_h
+#define MyValueImpl_h
+
+#include "MyValue.h"
+
+
+
+class MyValueImpl : public MyValue
+{
+public:
+ MyValueImpl();
+ virtual ~MyValueImpl();
+ virtual float getMyValue(const char* customerID);
+ virtual float getMyValueS(const string& customerID);
+ virtual string getCustname(string& customerID);
+ virtual const string& getCustnamecs(string customerID);
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl_stockQuote_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl_stockQuote_Proxy.h
new file mode 100644
index 0000000000..5c8293b51e
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/MyValueImpl_stockQuote_Proxy.h
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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.
+ */
+
+#ifndef MyValueImpl_stockQuote_Proxy_h
+#define MyValueImpl_stockQuote_Proxy_h
+
+#include "StockQuoteService.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_stockQuote_Proxy : public StockQuoteService
+{
+public:
+ MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_stockQuote_Proxy();
+ virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_stockQuote_Proxy_h
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/StockQuoteService.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/StockQuoteService.h
new file mode 100644
index 0000000000..919b514e1a
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/StockQuoteService.h
@@ -0,0 +1,32 @@
+/*
+ *
+ * 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.
+ */
+//
+//////////////////////////////////////////////////////////////////////
+
+#ifndef StockQuoteService_h
+#define StockQuoteService_h
+#include <string>
+#include "commonj/sdo/sdo.h"
+using std::string;
+class StockQuoteService
+{
+public:
+ virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr request) = 0;
+
+};
+
+#endif // StockQuoteService_h
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/sca.module b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/sca.module
new file mode 100644
index 0000000000..565f4a74ec
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/MyValueServiceModuleTwoClasses/sca.module
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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.
+ */
+ -->
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="MyValueServiceModule">
+
+ <!-- Expose as a web service -->
+ <entryPoint name="MyValueServiceExport" multiplicity="1..1">
+ <interface.wsdl interface="" callbackInterface=""></interface.wsdl>
+ <binding.ws port="mvs:MyValueServiceSOAP"></binding.ws>
+ <reference>MyValueServiceComponent</reference>
+ </entryPoint>
+
+ <component name="MyValueServiceComponent">
+ <implementation.cpp dll="MyValue" header="MyValueImpl.hpp"></implementation.cpp>
+ <properties>
+ </properties>
+ <references>
+ <customerInfo>CustomerInfoComponent</customerInfo>
+ <stockQuote>StockQuoteService</stockQuote>
+ </references>
+ </component>
+
+ <!--
+ <component name="Calculator">
+ <implementation.cpp dll="debug/Calculator.dll" header="CalculatorImpl.h"/>
+ </component>
+ -->
+
+ <externalService name="StockQuoteService">
+ <interface.cpp header="StockQuoteService.h"/>
+ <binding.ws port="http://swanandmokashi.com#wsdl.endpoint(StockQuotes/StockQuotesSoap)"/>
+ </externalService>
+
+ <!--wire>
+ <source.uri>MyValueServiceComponent/customerInfo</source.uri>
+ <target.uri>CustomerInfoComponent</target.uri>
+ </wire-->
+
+</module>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.fragment b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.fragment
new file mode 100644
index 0000000000..687162ec2a
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.fragment
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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.
+ */
+ -->
+<moduleFragment xmlns="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ xmlns:mvs="http://www.myvalue.org/MyValueService/"
+ name="CustomerInfoComponent">
+
+
+ <component name="CustomerInfoComponent">
+ <implementation.cpp dll="CustomerInfo" header="CustomerInfoImpl.h">
+ </implementation.cpp>
+ <properties>
+ <v:Fred>x</v:Fred>
+ <v:Joe>23</v:Joe>
+ <Joe>42</Joe>
+ </properties>
+ <references>
+ </references>
+ </component>
+
+</moduleFragment>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.h
new file mode 100644
index 0000000000..b944d161eb
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfo.h
@@ -0,0 +1,40 @@
+/*
+ *
+ * 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.
+ */
+#ifndef CustomerInfo_h
+#define CustomerInfo_h
+
+class CustomerInfo
+{
+public:
+ virtual const char* getCustomerInformationCharPublic(char * p1, const char* customerID ) = 0;
+ virtual const char* getCustomerInfoACharPublic(char * p1,const char*) = 0;
+ virtual const char* getCustomerInfoBCharPublic(char * p1, char* customerID ) = 0;
+
+private:
+ virtual const char* getCustomerInformationCharPrivate(char * p1, const char* customerID ) = 0;
+ virtual const char* getCustomerInfoACharPrivate(char * p1,const char*) = 0;
+ virtual const char* getCustomerInfoBCharPrivate(char * p1, char* customerID ) = 0;
+
+protected:
+ virtual const char* getCustomerInformationCharProtected(char * p1, const char* customerID ) = 0;
+ virtual const char* getCustomerInfoACharProtected(char * p1,const char*) = 0;
+ virtual const char* getCustomerInfoBCharProtected(char * p1, char* customerID ) = 0;
+
+
+};
+
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.componentType b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.componentType
new file mode 100644
index 0000000000..179af71dca
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.componentType
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ * 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/0.9"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <service name="CustomerInfoService">
+ <interface.cpp header="/CustomerInfo.h">
+ </interface.cpp>
+ </service>
+
+ <property name="Fred" type="xs:string"/>
+ <property name="Joe" type="xs:integer" many="true"/>
+
+</componentType>
+ \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.h b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.h
new file mode 100644
index 0000000000..87cac61085
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testinput/modules/SimplePublicPrivateProtectedTest/CustomerInfoImpl.h
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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.
+ */
+// Class definition for the implementation
+
+#ifndef CustomerInfoImpl_h
+#define CustomerInfoImpl_h
+
+#include "CustomerInfo.h"
+
+
+
+class CustomerInfoImpl : public CustomerInfo
+{
+public:
+ CustomerInfoImpl();
+ virtual ~CustomerInfoImpl();
+ virtual const char* getCustomerInformation(const char* customerID);
+
+};
+#endif
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.cpp
new file mode 100644
index 0000000000..3b04e26b05
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.cpp
@@ -0,0 +1,64 @@
+/*
+ * 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 "CalculatorImpl_CalculatorService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CalculatorImpl_CalculatorService_Proxy* CalculatorImpl_CalculatorService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new CalculatorImpl_CalculatorService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void CalculatorImpl_CalculatorService_Proxy_Destructor(void* proxy)
+ {
+ delete (CalculatorImpl_CalculatorService_Proxy*)proxy;
+ }
+}
+
+CalculatorImpl_CalculatorService_Proxy::CalculatorImpl_CalculatorService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+CalculatorImpl_CalculatorService_Proxy::~CalculatorImpl_CalculatorService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+long CalculatorImpl_CalculatorService_Proxy::subtract( long arg0, long arg1)
+{
+ Operation operation("subtract");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ long ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.h
new file mode 100644
index 0000000000..ad8f588ede
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Proxy.h
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef CalculatorImpl_CalculatorService_Proxy_h
+#define CalculatorImpl_CalculatorService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "Calculator.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class CalculatorImpl_CalculatorService_Proxy : public Calculator
+{
+public:
+ CalculatorImpl_CalculatorService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~CalculatorImpl_CalculatorService_Proxy();
+ virtual long subtract( long a, long b);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // CalculatorImpl_CalculatorService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.cpp
new file mode 100644
index 0000000000..787314f817
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.cpp
@@ -0,0 +1,73 @@
+/*
+ * 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 "CalculatorImpl_CalculatorService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CalculatorImpl_CalculatorService_Wrapper* CalculatorImpl_CalculatorService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new CalculatorImpl_CalculatorService_Wrapper(target);
+ }
+}
+
+CalculatorImpl_CalculatorService_Wrapper::CalculatorImpl_CalculatorService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (CalculatorImpl*)getImplementation();
+}
+
+CalculatorImpl_CalculatorService_Wrapper::~CalculatorImpl_CalculatorService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* CalculatorImpl_CalculatorService_Wrapper::newImplementation()
+{
+ return new CalculatorImpl;
+}
+
+void CalculatorImpl_CalculatorService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void CalculatorImpl_CalculatorService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "subtract")
+ {
+ long& p0 = *( long*)operation.getParameterValue(0);
+ long& p1 = *( long*)operation.getParameterValue(1);
+ *(long*)operation.getReturnValue() = impl->subtract(p0, p1);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.h
new file mode 100644
index 0000000000..c881576ca2
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorModuleAndComponent/expected_output/CalculatorImpl_CalculatorService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef CalculatorImpl_CalculatorService_Wrapper_h
+#define CalculatorImpl_CalculatorService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "CalculatorImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class CalculatorImpl_CalculatorService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ CalculatorImpl_CalculatorService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~CalculatorImpl_CalculatorService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ CalculatorImpl* impl;
+};
+
+#endif // CalculatorImpl_CalculatorService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.cpp
new file mode 100644
index 0000000000..aeb9642130
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.cpp
@@ -0,0 +1,75 @@
+/*
+ * 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 "CalculatorBackImpl_CalculatorService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CalculatorBackImpl_CalculatorService_Proxy* CalculatorBackImpl_CalculatorService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new CalculatorBackImpl_CalculatorService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void CalculatorBackImpl_CalculatorService_Proxy_Destructor(void* proxy)
+ {
+ delete (CalculatorBackImpl_CalculatorService_Proxy*)proxy;
+ }
+}
+
+CalculatorBackImpl_CalculatorService_Proxy::CalculatorBackImpl_CalculatorService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+CalculatorBackImpl_CalculatorService_Proxy::~CalculatorBackImpl_CalculatorService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+long CalculatorBackImpl_CalculatorService_Proxy::subtractBack( long arg0, long arg1)
+{
+ Operation operation("subtractBack");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ long ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+long CalculatorBackImpl_CalculatorService_Proxy::addBack( long arg0, long arg1)
+{
+ Operation operation("addBack");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ long ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.h
new file mode 100644
index 0000000000..4a263154e0
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Proxy.h
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+#ifndef CalculatorBackImpl_CalculatorService_Proxy_h
+#define CalculatorBackImpl_CalculatorService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "otherSubFolder/CalculatorBack.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class CalculatorBackImpl_CalculatorService_Proxy : public CalculatorBack
+{
+public:
+ CalculatorBackImpl_CalculatorService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~CalculatorBackImpl_CalculatorService_Proxy();
+ virtual long subtractBack( long a, long b);
+ virtual long addBack( long a, long b);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // CalculatorBackImpl_CalculatorService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.cpp
new file mode 100644
index 0000000000..6f71734763
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.cpp
@@ -0,0 +1,80 @@
+/*
+ * 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 "CalculatorBackImpl_CalculatorService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CalculatorBackImpl_CalculatorService_Wrapper* CalculatorBackImpl_CalculatorService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new CalculatorBackImpl_CalculatorService_Wrapper(target);
+ }
+}
+
+CalculatorBackImpl_CalculatorService_Wrapper::CalculatorBackImpl_CalculatorService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (CalculatorBackImpl*)getImplementation();
+}
+
+CalculatorBackImpl_CalculatorService_Wrapper::~CalculatorBackImpl_CalculatorService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* CalculatorBackImpl_CalculatorService_Wrapper::newImplementation()
+{
+ return new CalculatorBackImpl;
+}
+
+void CalculatorBackImpl_CalculatorService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void CalculatorBackImpl_CalculatorService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "subtractBack")
+ {
+ long& p0 = *( long*)operation.getParameterValue(0);
+ long& p1 = *( long*)operation.getParameterValue(1);
+ *(long*)operation.getReturnValue() = impl->subtractBack(p0, p1);
+ return;
+ }
+ if (operationName == "addBack")
+ {
+ long& p0 = *( long*)operation.getParameterValue(0);
+ long& p1 = *( long*)operation.getParameterValue(1);
+ *(long*)operation.getReturnValue() = impl->addBack(p0, p1);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.h
new file mode 100644
index 0000000000..1dbfdd58c1
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorBackImpl_CalculatorService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef CalculatorBackImpl_CalculatorService_Wrapper_h
+#define CalculatorBackImpl_CalculatorService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "subFolder/CalculatorBackImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class CalculatorBackImpl_CalculatorService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ CalculatorBackImpl_CalculatorService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~CalculatorBackImpl_CalculatorService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ CalculatorBackImpl* impl;
+};
+
+#endif // CalculatorBackImpl_CalculatorService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.cpp
new file mode 100644
index 0000000000..33b66fbc28
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.cpp
@@ -0,0 +1,75 @@
+/*
+ * 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 "CalculatorForwardImpl_CalculatorService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CalculatorForwardImpl_CalculatorService_Proxy* CalculatorForwardImpl_CalculatorService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new CalculatorForwardImpl_CalculatorService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void CalculatorForwardImpl_CalculatorService_Proxy_Destructor(void* proxy)
+ {
+ delete (CalculatorForwardImpl_CalculatorService_Proxy*)proxy;
+ }
+}
+
+CalculatorForwardImpl_CalculatorService_Proxy::CalculatorForwardImpl_CalculatorService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+CalculatorForwardImpl_CalculatorService_Proxy::~CalculatorForwardImpl_CalculatorService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+long CalculatorForwardImpl_CalculatorService_Proxy::subtractForward( long arg0, long arg1)
+{
+ Operation operation("subtractForward");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ long ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+long CalculatorForwardImpl_CalculatorService_Proxy::addForward( long arg0, long arg1)
+{
+ Operation operation("addForward");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ long ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.h
new file mode 100644
index 0000000000..9b87ee9d7e
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Proxy.h
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+#ifndef CalculatorForwardImpl_CalculatorService_Proxy_h
+#define CalculatorForwardImpl_CalculatorService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "otherSubFolder/CalculatorForward.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class CalculatorForwardImpl_CalculatorService_Proxy : public CalculatorForward
+{
+public:
+ CalculatorForwardImpl_CalculatorService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~CalculatorForwardImpl_CalculatorService_Proxy();
+ virtual long subtractForward( long a, long b);
+ virtual long addForward( long a, long b);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // CalculatorForwardImpl_CalculatorService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.cpp
new file mode 100644
index 0000000000..ce20b11941
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.cpp
@@ -0,0 +1,80 @@
+/*
+ * 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 "CalculatorForwardImpl_CalculatorService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CalculatorForwardImpl_CalculatorService_Wrapper* CalculatorForwardImpl_CalculatorService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new CalculatorForwardImpl_CalculatorService_Wrapper(target);
+ }
+}
+
+CalculatorForwardImpl_CalculatorService_Wrapper::CalculatorForwardImpl_CalculatorService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (CalculatorForwardImpl*)getImplementation();
+}
+
+CalculatorForwardImpl_CalculatorService_Wrapper::~CalculatorForwardImpl_CalculatorService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* CalculatorForwardImpl_CalculatorService_Wrapper::newImplementation()
+{
+ return new CalculatorForwardImpl;
+}
+
+void CalculatorForwardImpl_CalculatorService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void CalculatorForwardImpl_CalculatorService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "subtractForward")
+ {
+ long& p0 = *( long*)operation.getParameterValue(0);
+ long& p1 = *( long*)operation.getParameterValue(1);
+ *(long*)operation.getReturnValue() = impl->subtractForward(p0, p1);
+ return;
+ }
+ if (operationName == "addForward")
+ {
+ long& p0 = *( long*)operation.getParameterValue(0);
+ long& p1 = *( long*)operation.getParameterValue(1);
+ *(long*)operation.getReturnValue() = impl->addForward(p0, p1);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.h
new file mode 100644
index 0000000000..bb035ccb2b
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CalculatorSlashDirectionTest/expected_output/CalculatorForwardImpl_CalculatorService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef CalculatorForwardImpl_CalculatorService_Wrapper_h
+#define CalculatorForwardImpl_CalculatorService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "subFolder/CalculatorForwardImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class CalculatorForwardImpl_CalculatorService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ CalculatorForwardImpl_CalculatorService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~CalculatorForwardImpl_CalculatorService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ CalculatorForwardImpl* impl;
+};
+
+#endif // CalculatorForwardImpl_CalculatorService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp
new file mode 100644
index 0000000000..9f09ba8d6f
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp
@@ -0,0 +1,593 @@
+/*
+ * 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 "CustomerInfoImpl_CustomerInfoService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CustomerInfoImpl_CustomerInfoService_Proxy* CustomerInfoImpl_CustomerInfoService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new CustomerInfoImpl_CustomerInfoService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void CustomerInfoImpl_CustomerInfoService_Proxy_Destructor(void* proxy)
+ {
+ delete (CustomerInfoImpl_CustomerInfoService_Proxy*)proxy;
+ }
+}
+
+CustomerInfoImpl_CustomerInfoService_Proxy::CustomerInfoImpl_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+CustomerInfoImpl_CustomerInfoService_Proxy::~CustomerInfoImpl_CustomerInfoService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationChar( char* arg0, const char* arg1)
+{
+ Operation operation("getCustomerInformationChar");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAChar( char* arg0, const char* arg1)
+{
+ Operation operation("getCustomerInfoAChar");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBChar( char* arg0, char* arg1)
+{
+ Operation operation("getCustomerInfoBChar");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCChar( char* arg0, char arg1)
+{
+ Operation operation("getCustomerInfoCChar");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDChar( char* arg0, char arg1)
+{
+ Operation operation("getCustomerInfoDChar");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEChar( char* arg0, char* arg1)
+{
+ Operation operation("getCustomerInfoEChar");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFChar( char* arg0, char* arg1, char* arg2)
+{
+ Operation operation("getCustomerInfoFChar");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ operation.addParameter(&arg2);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGChar( char* arg0, char* arg1, char* arg2, signed char* arg3)
+{
+ Operation operation("getCustomerInfoGChar");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ operation.addParameter(&arg2);
+ operation.addParameter(&arg3);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHChar( unsigned char* arg0, const char arg1)
+{
+ Operation operation("getCustomerInfoHChar");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHChar( unsigned char* arg0, const char* arg1)
+{
+ Operation operation("getCustomerInfoHChar");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationLong(const long* arg0, const long* arg1)
+{
+ Operation operation("getCustomerInformationLong");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoALong(const long* arg0, const long* arg1)
+{
+ Operation operation("getCustomerInfoALong");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBLong( long* arg0, long* arg1)
+{
+ Operation operation("getCustomerInfoBLong");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCLong( long arg0, long arg1)
+{
+ Operation operation("getCustomerInfoCLong");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDLong( long arg0, long arg1)
+{
+ Operation operation("getCustomerInfoDLong");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoELong( long* arg0, long* arg1)
+{
+ Operation operation("getCustomerInfoELong");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFLong( long* arg0, long* arg1)
+{
+ Operation operation("getCustomerInfoFLong");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGLong( signed long* arg0, signed long* arg1)
+{
+ Operation operation("getCustomerInfoGLong");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHLong( signed long* arg0, signed long* arg1)
+{
+ Operation operation("getCustomerInfoHLong");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationInt( char* arg0, const int* arg1)
+{
+ Operation operation("getCustomerInformationInt");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAInt( char* arg0, const int* arg1)
+{
+ Operation operation("getCustomerInfoAInt");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBInt( char* arg0, int* arg1)
+{
+ Operation operation("getCustomerInfoBInt");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCInt( char* arg0, int arg1)
+{
+ Operation operation("getCustomerInfoCInt");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDInt( char* arg0, int arg1)
+{
+ Operation operation("getCustomerInfoDInt");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEInt( char* arg0, int* arg1)
+{
+ Operation operation("getCustomerInfoEInt");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFInt( char* arg0, int* arg1)
+{
+ Operation operation("getCustomerInfoFInt");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGInt( char* arg0, signed int* arg1)
+{
+ Operation operation("getCustomerInfoGInt");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHInt( char* arg0, unsigned int* arg1)
+{
+ Operation operation("getCustomerInfoHInt");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationint64( Diamond& arg0, const __int64* arg1)
+{
+ Operation operation("getCustomerInformationint64");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAint64( Diamond& arg0, const __int64* arg1)
+{
+ Operation operation("getCustomerInfoAint64");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBint64( Diamond& arg0, __int64* arg1)
+{
+ Operation operation("getCustomerInfoBint64");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCint64( Diamond& arg0, __int64 arg1)
+{
+ Operation operation("getCustomerInfoCint64");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDint64( Diamond& arg0, __int64 arg1)
+{
+ Operation operation("getCustomerInfoDint64");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEint64( Diamond& arg0, __int64* arg1)
+{
+ Operation operation("getCustomerInfoEint64");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFint64( Diamond& arg0, __int64* arg1)
+{
+ Operation operation("getCustomerInfoFint64");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGint64( Diamond& arg0, signed __int64* arg1)
+{
+ Operation operation("getCustomerInfoGint64");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHint64(const Diamond& arg0, unsigned int64* arg1)
+{
+ Operation operation("getCustomerInfoHint64");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const void* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationVoid( float& arg0, const __int64* arg1)
+{
+ Operation operation("getCustomerInformationVoid");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const void* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAVoid(const float& arg0, const __int64* arg1)
+{
+ Operation operation("getCustomerInfoAVoid");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ target->invoke(operation);
+ return;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBVoid()
+{
+ Operation operation("getCustomerInfoBVoid");
+ target->invoke(operation);
+ return;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCVoid()
+{
+ Operation operation("getCustomerInfoCVoid");
+ target->invoke(operation);
+ return;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDVoid()
+{
+ Operation operation("getCustomerInfoDVoid");
+ operation.addParameter(&arg0);
+ target->invoke(operation);
+ return;
+}
+
+char CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEVoid()
+{
+ Operation operation("getCustomerInfoEVoid");
+ operation.addParameter(&arg0);
+ char ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+char CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFVoid()
+{
+ Operation operation("getCustomerInfoFVoid");
+ char ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+char CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGVoid()
+{
+ Operation operation("getCustomerInfoGVoid");
+ operation.addParameter(&arg0);
+ char ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAInline( int arg0, int arg1, int arg2, int arg3, char* customer arg4)
+{
+ Operation operation("getCustomerInfoAInline");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ operation.addParameter(&arg2);
+ operation.addParameter(&arg3);
+ operation.addParameter(&arg4);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBInline( int* arg0, int* arg1, int* arg2, char* customer arg3)
+{
+ Operation operation("getCustomerInfoBInline");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ operation.addParameter(&arg2);
+ operation.addParameter(&arg3);
+ int ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+friend const unsigned int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCInline( char* customer arg0)
+{
+ Operation operation("getCustomerInfoCInline");
+ operation.addParameter(&arg0);
+ friend const unsigned int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoTrickyA(const char arg0, const char arg1)
+{
+ Operation operation("getCustomerInfoTrickyA");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ int ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoTrickyB( int arg0, int arg1)
+{
+ Operation operation("getCustomerInfoTrickyB");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ int ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h
new file mode 100644
index 0000000000..baa55ac5b8
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+
+#ifndef CustomerInfoImpl_CustomerInfoService_Proxy_h
+#define CustomerInfoImpl_CustomerInfoService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "/CustomerInfo.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class CustomerInfoImpl_CustomerInfoService_Proxy : public CustomerInfo
+{
+public:
+ CustomerInfoImpl_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~CustomerInfoImpl_CustomerInfoService_Proxy();
+ virtual const char* getCustomerInformationChar( char* p1, const char* customerID);
+ virtual const char* getCustomerInfoAChar( char* p1, const char* );
+ virtual const char* getCustomerInfoBChar( char* p1, char* customerID);
+ virtual const char* getCustomerInfoCChar( char* p1, char customerID);
+ virtual const char* getCustomerInfoDChar( char* p1, char );
+ virtual const char* getCustomerInfoEChar( char* p1, char* );
+ virtual const char* getCustomerInfoFChar( char* p1, char* p1, char* customerID);
+ virtual const char* getCustomerInfoGChar( char* p1, char* , char* p1, signed char* customerID);
+ virtual const char* getCustomerInfoHChar( unsigned char* customerID, const char );
+ virtual const char* getCustomerInfoHChar( unsigned char* customerID, const char* );
+ virtual const long* getCustomerInformationLong(const long* customerID, const long* customerID);
+ virtual const long* getCustomerInfoALong(const long* , const long* );
+ virtual const long* getCustomerInfoBLong( long* customerID, long* customerID2);
+ virtual const long* getCustomerInfoCLong( long customerID, long customerID2);
+ virtual const long* getCustomerInfoDLong( long , long );
+ virtual const long* getCustomerInfoELong( long* , long* );
+ virtual const long* getCustomerInfoFLong( long* customerID, long* customerID2);
+ virtual const long* getCustomerInfoGLong( signed long* customerID, signed long* customerID2);
+ virtual const long* getCustomerInfoHLong( signed long* customerID, signed long* customerID2);
+ virtual const int* getCustomerInformationInt( char* , const int* customerID);
+ virtual const int* getCustomerInfoAInt( char* , const int* );
+ virtual const int* getCustomerInfoBInt( char* , int* customerID);
+ virtual const int* getCustomerInfoCInt( char* , int customerID);
+ virtual const int* getCustomerInfoDInt( char* , int );
+ virtual const int* getCustomerInfoEInt( char* , int* );
+ virtual const int* getCustomerInfoFInt( char* , int* customerID);
+ virtual const int* getCustomerInfoGInt( char* , signed int* customerID);
+ virtual const int* getCustomerInfoHInt( char* , unsigned int* customerID);
+ virtual const __int64* getCustomerInformationint64( Diamond& , const __int64* customerID);
+ virtual const __int64* getCustomerInfoAint64( Diamond& , const __int64* );
+ virtual const __int64* getCustomerInfoBint64( Diamond& , __int64* customerID);
+ virtual const __int64* getCustomerInfoCint64( Diamond& , __int64 customerID);
+ virtual const __int64* getCustomerInfoDint64( Diamond& myDiamond, __int64 );
+ virtual const __int64* getCustomerInfoEint64( Diamond& myDiamond, __int64* );
+ virtual const __int64* getCustomerInfoFint64( Diamond& myDiamond, __int64* customerID);
+ virtual const __int64* getCustomerInfoGint64( Diamond& myDiamond, signed __int64* customerID);
+ virtual const __int64* getCustomerInfoHint64(const Diamond& myDiamond, unsigned int64* customerID);
+ virtual const void* getCustomerInformationVoid( float& f, const __int64* customerID);
+ virtual void getCustomerInfoAVoid(const float& f, const __int64* );
+ virtual void getCustomerInfoBVoid();
+ virtual void getCustomerInfoCVoid();
+ virtual void getCustomerInfoDVoid( void );
+ virtual char getCustomerInfoEVoid( void );
+ virtual char getCustomerInfoFVoid();
+ virtual char getCustomerInfoGVoid( void );
+ virtual const char* getCustomerInfoAInline( int , int , int , int , char* customer id);
+ virtual int getCustomerInfoBInline( int* , int* f, int* g, char* customer id);
+ virtual friend const unsigned int* getCustomerInfoCInline( char* customer id);
+ virtual int getCustomerInfoTrickyA(const char , const char );
+ virtual int getCustomerInfoTrickyB( int myInt, int myInt);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // CustomerInfoImpl_CustomerInfoService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp
new file mode 100644
index 0000000000..25d73c326c
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp
@@ -0,0 +1,411 @@
+/*
+ * 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 "CustomerInfoImpl_CustomerInfoService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CustomerInfoImpl_CustomerInfoService_Wrapper* CustomerInfoImpl_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new CustomerInfoImpl_CustomerInfoService_Wrapper(target);
+ }
+}
+
+CustomerInfoImpl_CustomerInfoService_Wrapper::CustomerInfoImpl_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (CustomerInfoImpl*)getImplementation();
+}
+
+CustomerInfoImpl_CustomerInfoService_Wrapper::~CustomerInfoImpl_CustomerInfoService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* CustomerInfoImpl_CustomerInfoService_Wrapper::newImplementation()
+{
+ return new CustomerInfoImpl;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getCustomerInformationChar")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ const char* p1 = *(const char**)operation.getParameterValue(1);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInformationChar(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoAChar")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ const char* p1 = *(const char**)operation.getParameterValue(1);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoAChar(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoBChar")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ char* p1 = *( char**)operation.getParameterValue(1);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoBChar(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoCChar")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ char& p1 = *( char*)operation.getParameterValue(1);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoCChar(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoDChar")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ char& p1 = *( char*)operation.getParameterValue(1);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoDChar(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoEChar")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ char* p1 = *( char**)operation.getParameterValue(1);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoEChar(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoFChar")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ char* p1 = *( char**)operation.getParameterValue(1);
+ char* p2 = *( char**)operation.getParameterValue(2);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoFChar(p0, p1, p2);
+ return;
+ }
+ if (operationName == "getCustomerInfoGChar")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ char* p1 = *( char**)operation.getParameterValue(1);
+ char* p2 = *( char**)operation.getParameterValue(2);
+ signed char* p3 = *( signed char**)operation.getParameterValue(3);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoGChar(p0, p1, p2, p3);
+ return;
+ }
+ if (operationName == "getCustomerInfoHChar")
+ {
+ unsigned char* p0 = *( unsigned char**)operation.getParameterValue(0);
+ const char& p1 = *(const char*)operation.getParameterValue(1);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoHChar(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoHChar")
+ {
+ unsigned char* p0 = *( unsigned char**)operation.getParameterValue(0);
+ const char* p1 = *(const char**)operation.getParameterValue(1);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoHChar(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInformationLong")
+ {
+ const long* p0 = *(const long**)operation.getParameterValue(0);
+ const long* p1 = *(const long**)operation.getParameterValue(1);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInformationLong(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoALong")
+ {
+ const long* p0 = *(const long**)operation.getParameterValue(0);
+ const long* p1 = *(const long**)operation.getParameterValue(1);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInfoALong(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoBLong")
+ {
+ long* p0 = *( long**)operation.getParameterValue(0);
+ long* p1 = *( long**)operation.getParameterValue(1);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInfoBLong(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoCLong")
+ {
+ long& p0 = *( long*)operation.getParameterValue(0);
+ long& p1 = *( long*)operation.getParameterValue(1);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInfoCLong(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoDLong")
+ {
+ long& p0 = *( long*)operation.getParameterValue(0);
+ long& p1 = *( long*)operation.getParameterValue(1);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInfoDLong(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoELong")
+ {
+ long* p0 = *( long**)operation.getParameterValue(0);
+ long* p1 = *( long**)operation.getParameterValue(1);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInfoELong(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoFLong")
+ {
+ long* p0 = *( long**)operation.getParameterValue(0);
+ long* p1 = *( long**)operation.getParameterValue(1);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInfoFLong(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoGLong")
+ {
+ signed long* p0 = *( signed long**)operation.getParameterValue(0);
+ signed long* p1 = *( signed long**)operation.getParameterValue(1);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInfoGLong(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoHLong")
+ {
+ signed long* p0 = *( signed long**)operation.getParameterValue(0);
+ signed long* p1 = *( signed long**)operation.getParameterValue(1);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInfoHLong(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInformationInt")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ const int* p1 = *(const int**)operation.getParameterValue(1);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInformationInt(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoAInt")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ const int* p1 = *(const int**)operation.getParameterValue(1);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInfoAInt(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoBInt")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ int* p1 = *( int**)operation.getParameterValue(1);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInfoBInt(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoCInt")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ int& p1 = *( int*)operation.getParameterValue(1);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInfoCInt(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoDInt")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ int& p1 = *( int*)operation.getParameterValue(1);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInfoDInt(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoEInt")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ int* p1 = *( int**)operation.getParameterValue(1);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInfoEInt(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoFInt")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ int* p1 = *( int**)operation.getParameterValue(1);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInfoFInt(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoGInt")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ signed int* p1 = *( signed int**)operation.getParameterValue(1);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInfoGInt(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoHInt")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ unsigned int* p1 = *( unsigned int**)operation.getParameterValue(1);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInfoHInt(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInformationint64")
+ {
+ Diamond& p0 = *(Diamond*)operation.getParameterValue(0);
+ const __int64* p1 = *(const __int64**)operation.getParameterValue(1);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInformationint64(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoAint64")
+ {
+ Diamond& p0 = *(Diamond*)operation.getParameterValue(0);
+ const __int64* p1 = *(const __int64**)operation.getParameterValue(1);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoAint64(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoBint64")
+ {
+ Diamond& p0 = *(Diamond*)operation.getParameterValue(0);
+ __int64* p1 = *( __int64**)operation.getParameterValue(1);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoBint64(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoCint64")
+ {
+ Diamond& p0 = *(Diamond*)operation.getParameterValue(0);
+ __int64& p1 = *( __int64*)operation.getParameterValue(1);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoCint64(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoDint64")
+ {
+ Diamond& p0 = *(Diamond*)operation.getParameterValue(0);
+ __int64& p1 = *( __int64*)operation.getParameterValue(1);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoDint64(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoEint64")
+ {
+ Diamond& p0 = *(Diamond*)operation.getParameterValue(0);
+ __int64* p1 = *( __int64**)operation.getParameterValue(1);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoEint64(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoFint64")
+ {
+ Diamond& p0 = *(Diamond*)operation.getParameterValue(0);
+ __int64* p1 = *( __int64**)operation.getParameterValue(1);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoFint64(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoGint64")
+ {
+ Diamond& p0 = *(Diamond*)operation.getParameterValue(0);
+ signed __int64* p1 = *( signed __int64**)operation.getParameterValue(1);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoGint64(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoHint64")
+ {
+ Diamond& p0 = *(Diamond*)operation.getParameterValue(0);
+ unsigned int64* p1 = *( unsigned int64**)operation.getParameterValue(1);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoHint64(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInformationVoid")
+ {
+ float& p0 = *(float*)operation.getParameterValue(0);
+ const __int64* p1 = *(const __int64**)operation.getParameterValue(1);
+ *(const void**)operation.getReturnValue() = impl->getCustomerInformationVoid(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoAVoid")
+ {
+ float& p0 = *(float*)operation.getParameterValue(0);
+ const __int64* p1 = *(const __int64**)operation.getParameterValue(1);
+ impl->getCustomerInfoAVoid(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoBVoid")
+ {
+ impl->getCustomerInfoBVoid();
+ return;
+ }
+ if (operationName == "getCustomerInfoCVoid")
+ {
+ impl->getCustomerInfoCVoid();
+ return;
+ }
+ if (operationName == "getCustomerInfoDVoid")
+ {
+ impl->getCustomerInfoDVoid();
+ return;
+ }
+ if (operationName == "getCustomerInfoEVoid")
+ {
+ *(char*)operation.getReturnValue() = impl->getCustomerInfoEVoid();
+ return;
+ }
+ if (operationName == "getCustomerInfoFVoid")
+ {
+ *(char*)operation.getReturnValue() = impl->getCustomerInfoFVoid();
+ return;
+ }
+ if (operationName == "getCustomerInfoGVoid")
+ {
+ *(char*)operation.getReturnValue() = impl->getCustomerInfoGVoid();
+ return;
+ }
+ if (operationName == "getCustomerInfoAInline")
+ {
+ int& p0 = *( int*)operation.getParameterValue(0);
+ int& p1 = *( int*)operation.getParameterValue(1);
+ int& p2 = *( int*)operation.getParameterValue(2);
+ int& p3 = *( int*)operation.getParameterValue(3);
+ char* customer p4 = *( char* customer*)operation.getParameterValue(4);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoAInline(p0, p1, p2, p3, p4);
+ return;
+ }
+ if (operationName == "getCustomerInfoBInline")
+ {
+ int* p0 = *( int**)operation.getParameterValue(0);
+ int* p1 = *( int**)operation.getParameterValue(1);
+ int* p2 = *( int**)operation.getParameterValue(2);
+ char* customer p3 = *( char* customer*)operation.getParameterValue(3);
+ *(int*)operation.getReturnValue() = impl->getCustomerInfoBInline(p0, p1, p2, p3);
+ return;
+ }
+ if (operationName == "getCustomerInfoCInline")
+ {
+ char* customer p0 = *( char* customer*)operation.getParameterValue(0);
+ *(friend const unsigned int**)operation.getReturnValue() = impl->getCustomerInfoCInline(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoTrickyA")
+ {
+ const char& p0 = *(const char*)operation.getParameterValue(0);
+ const char& p1 = *(const char*)operation.getParameterValue(1);
+ *(int*)operation.getReturnValue() = impl->getCustomerInfoTrickyA(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoTrickyB")
+ {
+ int& p0 = *( int*)operation.getParameterValue(0);
+ int& p1 = *( int*)operation.getParameterValue(1);
+ *(int*)operation.getReturnValue() = impl->getCustomerInfoTrickyB(p0, p1);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h
new file mode 100644
index 0000000000..5fb82c4295
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplMultiParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef CustomerInfoImpl_CustomerInfoService_Wrapper_h
+#define CustomerInfoImpl_CustomerInfoService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "CustomerInfoImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ CustomerInfoImpl_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~CustomerInfoImpl_CustomerInfoService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ CustomerInfoImpl* impl;
+};
+
+#endif // CustomerInfoImpl_CustomerInfoService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp
new file mode 100644
index 0000000000..531ca6c010
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp
@@ -0,0 +1,503 @@
+/*
+ * 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 "CustomerInfoImpl_CustomerInfoService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CustomerInfoImpl_CustomerInfoService_Proxy* CustomerInfoImpl_CustomerInfoService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new CustomerInfoImpl_CustomerInfoService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void CustomerInfoImpl_CustomerInfoService_Proxy_Destructor(void* proxy)
+ {
+ delete (CustomerInfoImpl_CustomerInfoService_Proxy*)proxy;
+ }
+}
+
+CustomerInfoImpl_CustomerInfoService_Proxy::CustomerInfoImpl_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+CustomerInfoImpl_CustomerInfoService_Proxy::~CustomerInfoImpl_CustomerInfoService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationChar(const char* arg0)
+{
+ Operation operation("getCustomerInformationChar");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAChar(const char* arg0)
+{
+ Operation operation("getCustomerInfoAChar");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBChar( char* arg0)
+{
+ Operation operation("getCustomerInfoBChar");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCChar( char arg0)
+{
+ Operation operation("getCustomerInfoCChar");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDChar( char arg0)
+{
+ Operation operation("getCustomerInfoDChar");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEChar( char* arg0)
+{
+ Operation operation("getCustomerInfoEChar");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFChar( char* arg0)
+{
+ Operation operation("getCustomerInfoFChar");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGChar( signed char* arg0)
+{
+ Operation operation("getCustomerInfoGChar");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHChar( unsigned char* arg0)
+{
+ Operation operation("getCustomerInfoHChar");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationLong(const long* arg0)
+{
+ Operation operation("getCustomerInformationLong");
+ operation.addParameter(&arg0);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoALong(const long* arg0)
+{
+ Operation operation("getCustomerInfoALong");
+ operation.addParameter(&arg0);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBLong( long* arg0)
+{
+ Operation operation("getCustomerInfoBLong");
+ operation.addParameter(&arg0);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCLong( long arg0)
+{
+ Operation operation("getCustomerInfoCLong");
+ operation.addParameter(&arg0);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDLong( long arg0)
+{
+ Operation operation("getCustomerInfoDLong");
+ operation.addParameter(&arg0);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoELong( long* arg0)
+{
+ Operation operation("getCustomerInfoELong");
+ operation.addParameter(&arg0);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFLong( long* arg0)
+{
+ Operation operation("getCustomerInfoFLong");
+ operation.addParameter(&arg0);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGLong( signed long* arg0)
+{
+ Operation operation("getCustomerInfoGLong");
+ operation.addParameter(&arg0);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const long* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHLong( unsigned long* arg0)
+{
+ Operation operation("getCustomerInfoHLong");
+ operation.addParameter(&arg0);
+ const long* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationInt(const int* arg0)
+{
+ Operation operation("getCustomerInformationInt");
+ operation.addParameter(&arg0);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAInt(const int* arg0)
+{
+ Operation operation("getCustomerInfoAInt");
+ operation.addParameter(&arg0);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBInt( int* arg0)
+{
+ Operation operation("getCustomerInfoBInt");
+ operation.addParameter(&arg0);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCInt( int arg0)
+{
+ Operation operation("getCustomerInfoCInt");
+ operation.addParameter(&arg0);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDInt( int arg0)
+{
+ Operation operation("getCustomerInfoDInt");
+ operation.addParameter(&arg0);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEInt( int* arg0)
+{
+ Operation operation("getCustomerInfoEInt");
+ operation.addParameter(&arg0);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFInt( int* arg0)
+{
+ Operation operation("getCustomerInfoFInt");
+ operation.addParameter(&arg0);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGInt( signed int* arg0)
+{
+ Operation operation("getCustomerInfoGInt");
+ operation.addParameter(&arg0);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHInt( unsigned int* arg0)
+{
+ Operation operation("getCustomerInfoHInt");
+ operation.addParameter(&arg0);
+ const int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationint64(const __int64* arg0)
+{
+ Operation operation("getCustomerInformationint64");
+ operation.addParameter(&arg0);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAint64(const __int64* arg0)
+{
+ Operation operation("getCustomerInfoAint64");
+ operation.addParameter(&arg0);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBint64( __int64* arg0)
+{
+ Operation operation("getCustomerInfoBint64");
+ operation.addParameter(&arg0);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCint64( __int64 arg0)
+{
+ Operation operation("getCustomerInfoCint64");
+ operation.addParameter(&arg0);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDint64( __int64 arg0)
+{
+ Operation operation("getCustomerInfoDint64");
+ operation.addParameter(&arg0);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoEint64( __int64* arg0)
+{
+ Operation operation("getCustomerInfoEint64");
+ operation.addParameter(&arg0);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoFint64( __int64* arg0)
+{
+ Operation operation("getCustomerInfoFint64");
+ operation.addParameter(&arg0);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoGint64( signed __int64* arg0)
+{
+ Operation operation("getCustomerInfoGint64");
+ operation.addParameter(&arg0);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const __int64* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoHint64( unsigned int64* arg0)
+{
+ Operation operation("getCustomerInfoHint64");
+ operation.addParameter(&arg0);
+ const __int64* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const void* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationVoid(const __int64* arg0)
+{
+ Operation operation("getCustomerInformationVoid");
+ operation.addParameter(&arg0);
+ const void* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAVoid(const __int64* arg0)
+{
+ Operation operation("getCustomerInfoAVoid");
+ operation.addParameter(&arg0);
+ target->invoke(operation);
+ return;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBVoid()
+{
+ Operation operation("getCustomerInfoBVoid");
+ target->invoke(operation);
+ return;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCVoid()
+{
+ Operation operation("getCustomerInfoCVoid");
+ target->invoke(operation);
+ return;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoDVoid()
+{
+ Operation operation("getCustomerInfoDVoid");
+ operation.addParameter(&arg0);
+ target->invoke(operation);
+ return;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoAInline( char* customer arg0)
+{
+ Operation operation("getCustomerInfoAInline");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBInline( char* customer arg0)
+{
+ Operation operation("getCustomerInfoBInline");
+ operation.addParameter(&arg0);
+ int ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+friend const unsigned int* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoCInline( char* customer arg0)
+{
+ Operation operation("getCustomerInfoCInline");
+ operation.addParameter(&arg0);
+ friend const unsigned int* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoTrickyA(const char arg0)
+{
+ Operation operation("getCustomerInfoTrickyA");
+ operation.addParameter(&arg0);
+ int ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+int CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoTrickyB( int arg0)
+{
+ Operation operation("getCustomerInfoTrickyB");
+ operation.addParameter(&arg0);
+ int ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h
new file mode 100644
index 0000000000..f35d841b12
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+#ifndef CustomerInfoImpl_CustomerInfoService_Proxy_h
+#define CustomerInfoImpl_CustomerInfoService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "/CustomerInfo.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class CustomerInfoImpl_CustomerInfoService_Proxy : public CustomerInfo
+{
+public:
+ CustomerInfoImpl_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~CustomerInfoImpl_CustomerInfoService_Proxy();
+ virtual const char* getCustomerInformationChar(const char* customerID);
+ virtual const char* getCustomerInfoAChar(const char* );
+ virtual const char* getCustomerInfoBChar( char* customerID);
+ virtual const char* getCustomerInfoCChar( char customerID);
+ virtual const char* getCustomerInfoDChar( char );
+ virtual const char* getCustomerInfoEChar( char* );
+ virtual const char* getCustomerInfoFChar( char* customerID);
+ virtual const char* getCustomerInfoGChar( signed char* customerID);
+ virtual const char* getCustomerInfoHChar( unsigned char* customerID);
+ virtual const long* getCustomerInformationLong(const long* customerID);
+ virtual const long* getCustomerInfoALong(const long* );
+ virtual const long* getCustomerInfoBLong( long* customerID);
+ virtual const long* getCustomerInfoCLong( long customerID);
+ virtual const long* getCustomerInfoDLong( long );
+ virtual const long* getCustomerInfoELong( long* );
+ virtual const long* getCustomerInfoFLong( long* customerID);
+ virtual const long* getCustomerInfoGLong( signed long* customerID);
+ virtual const long* getCustomerInfoHLong( unsigned long* customerID);
+ virtual const int* getCustomerInformationInt(const int* customerID);
+ virtual const int* getCustomerInfoAInt(const int* );
+ virtual const int* getCustomerInfoBInt( int* customerID);
+ virtual const int* getCustomerInfoCInt( int customerID);
+ virtual const int* getCustomerInfoDInt( int );
+ virtual const int* getCustomerInfoEInt( int* );
+ virtual const int* getCustomerInfoFInt( int* customerID);
+ virtual const int* getCustomerInfoGInt( signed int* customerID);
+ virtual const int* getCustomerInfoHInt( unsigned int* customerID);
+ virtual const __int64* getCustomerInformationint64(const __int64* customerID);
+ virtual const __int64* getCustomerInfoAint64(const __int64* );
+ virtual const __int64* getCustomerInfoBint64( __int64* customerID);
+ virtual const __int64* getCustomerInfoCint64( __int64 customerID);
+ virtual const __int64* getCustomerInfoDint64( __int64 );
+ virtual const __int64* getCustomerInfoEint64( __int64* );
+ virtual const __int64* getCustomerInfoFint64( __int64* customerID);
+ virtual const __int64* getCustomerInfoGint64( signed __int64* customerID);
+ virtual const __int64* getCustomerInfoHint64( unsigned int64* customerID);
+ virtual const void* getCustomerInformationVoid(const __int64* customerID);
+ virtual void getCustomerInfoAVoid(const __int64* );
+ virtual void getCustomerInfoBVoid();
+ virtual void getCustomerInfoCVoid();
+ virtual void getCustomerInfoDVoid( void );
+ virtual const char* getCustomerInfoAInline( char* customer id);
+ virtual int getCustomerInfoBInline( char* customer id);
+ virtual friend const unsigned int* getCustomerInfoCInline( char* customer id);
+ virtual int getCustomerInfoTrickyA(const char );
+ virtual int getCustomerInfoTrickyB( int myInt);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // CustomerInfoImpl_CustomerInfoService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp
new file mode 100644
index 0000000000..892b92c524
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp
@@ -0,0 +1,339 @@
+/*
+ * 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 "CustomerInfoImpl_CustomerInfoService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CustomerInfoImpl_CustomerInfoService_Wrapper* CustomerInfoImpl_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new CustomerInfoImpl_CustomerInfoService_Wrapper(target);
+ }
+}
+
+CustomerInfoImpl_CustomerInfoService_Wrapper::CustomerInfoImpl_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (CustomerInfoImpl*)getImplementation();
+}
+
+CustomerInfoImpl_CustomerInfoService_Wrapper::~CustomerInfoImpl_CustomerInfoService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* CustomerInfoImpl_CustomerInfoService_Wrapper::newImplementation()
+{
+ return new CustomerInfoImpl;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getCustomerInformationChar")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInformationChar(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoAChar")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoAChar(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoBChar")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoBChar(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoCChar")
+ {
+ char& p0 = *( char*)operation.getParameterValue(0);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoCChar(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoDChar")
+ {
+ char& p0 = *( char*)operation.getParameterValue(0);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoDChar(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoEChar")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoEChar(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoFChar")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoFChar(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoGChar")
+ {
+ signed char* p0 = *( signed char**)operation.getParameterValue(0);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoGChar(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoHChar")
+ {
+ unsigned char* p0 = *( unsigned char**)operation.getParameterValue(0);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoHChar(p0);
+ return;
+ }
+ if (operationName == "getCustomerInformationLong")
+ {
+ const long* p0 = *(const long**)operation.getParameterValue(0);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInformationLong(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoALong")
+ {
+ const long* p0 = *(const long**)operation.getParameterValue(0);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInfoALong(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoBLong")
+ {
+ long* p0 = *( long**)operation.getParameterValue(0);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInfoBLong(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoCLong")
+ {
+ long& p0 = *( long*)operation.getParameterValue(0);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInfoCLong(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoDLong")
+ {
+ long& p0 = *( long*)operation.getParameterValue(0);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInfoDLong(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoELong")
+ {
+ long* p0 = *( long**)operation.getParameterValue(0);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInfoELong(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoFLong")
+ {
+ long* p0 = *( long**)operation.getParameterValue(0);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInfoFLong(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoGLong")
+ {
+ signed long* p0 = *( signed long**)operation.getParameterValue(0);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInfoGLong(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoHLong")
+ {
+ unsigned long* p0 = *( unsigned long**)operation.getParameterValue(0);
+ *(const long**)operation.getReturnValue() = impl->getCustomerInfoHLong(p0);
+ return;
+ }
+ if (operationName == "getCustomerInformationInt")
+ {
+ const int* p0 = *(const int**)operation.getParameterValue(0);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInformationInt(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoAInt")
+ {
+ const int* p0 = *(const int**)operation.getParameterValue(0);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInfoAInt(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoBInt")
+ {
+ int* p0 = *( int**)operation.getParameterValue(0);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInfoBInt(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoCInt")
+ {
+ int& p0 = *( int*)operation.getParameterValue(0);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInfoCInt(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoDInt")
+ {
+ int& p0 = *( int*)operation.getParameterValue(0);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInfoDInt(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoEInt")
+ {
+ int* p0 = *( int**)operation.getParameterValue(0);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInfoEInt(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoFInt")
+ {
+ int* p0 = *( int**)operation.getParameterValue(0);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInfoFInt(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoGInt")
+ {
+ signed int* p0 = *( signed int**)operation.getParameterValue(0);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInfoGInt(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoHInt")
+ {
+ unsigned int* p0 = *( unsigned int**)operation.getParameterValue(0);
+ *(const int**)operation.getReturnValue() = impl->getCustomerInfoHInt(p0);
+ return;
+ }
+ if (operationName == "getCustomerInformationint64")
+ {
+ const __int64* p0 = *(const __int64**)operation.getParameterValue(0);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInformationint64(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoAint64")
+ {
+ const __int64* p0 = *(const __int64**)operation.getParameterValue(0);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoAint64(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoBint64")
+ {
+ __int64* p0 = *( __int64**)operation.getParameterValue(0);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoBint64(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoCint64")
+ {
+ __int64& p0 = *( __int64*)operation.getParameterValue(0);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoCint64(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoDint64")
+ {
+ __int64& p0 = *( __int64*)operation.getParameterValue(0);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoDint64(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoEint64")
+ {
+ __int64* p0 = *( __int64**)operation.getParameterValue(0);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoEint64(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoFint64")
+ {
+ __int64* p0 = *( __int64**)operation.getParameterValue(0);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoFint64(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoGint64")
+ {
+ signed __int64* p0 = *( signed __int64**)operation.getParameterValue(0);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoGint64(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoHint64")
+ {
+ unsigned int64* p0 = *( unsigned int64**)operation.getParameterValue(0);
+ *(const __int64**)operation.getReturnValue() = impl->getCustomerInfoHint64(p0);
+ return;
+ }
+ if (operationName == "getCustomerInformationVoid")
+ {
+ const __int64* p0 = *(const __int64**)operation.getParameterValue(0);
+ *(const void**)operation.getReturnValue() = impl->getCustomerInformationVoid(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoAVoid")
+ {
+ const __int64* p0 = *(const __int64**)operation.getParameterValue(0);
+ impl->getCustomerInfoAVoid(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoBVoid")
+ {
+ impl->getCustomerInfoBVoid();
+ return;
+ }
+ if (operationName == "getCustomerInfoCVoid")
+ {
+ impl->getCustomerInfoCVoid();
+ return;
+ }
+ if (operationName == "getCustomerInfoDVoid")
+ {
+ impl->getCustomerInfoDVoid();
+ return;
+ }
+ if (operationName == "getCustomerInfoAInline")
+ {
+ char* customer p0 = *( char* customer*)operation.getParameterValue(0);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoAInline(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoBInline")
+ {
+ char* customer p0 = *( char* customer*)operation.getParameterValue(0);
+ *(int*)operation.getReturnValue() = impl->getCustomerInfoBInline(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoCInline")
+ {
+ char* customer p0 = *( char* customer*)operation.getParameterValue(0);
+ *(friend const unsigned int**)operation.getReturnValue() = impl->getCustomerInfoCInline(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoTrickyA")
+ {
+ const char& p0 = *(const char*)operation.getParameterValue(0);
+ *(int*)operation.getReturnValue() = impl->getCustomerInfoTrickyA(p0);
+ return;
+ }
+ if (operationName == "getCustomerInfoTrickyB")
+ {
+ int& p0 = *( int*)operation.getParameterValue(0);
+ *(int*)operation.getReturnValue() = impl->getCustomerInfoTrickyB(p0);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h
new file mode 100644
index 0000000000..5fb82c4295
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/CustomerInfoImplSingleParamDiffTypesTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef CustomerInfoImpl_CustomerInfoService_Wrapper_h
+#define CustomerInfoImpl_CustomerInfoService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "CustomerInfoImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ CustomerInfoImpl_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~CustomerInfoImpl_CustomerInfoService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ CustomerInfoImpl* impl;
+};
+
+#endif // CustomerInfoImpl_CustomerInfoService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp
new file mode 100644
index 0000000000..b875e97a95
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp
@@ -0,0 +1,63 @@
+/*
+ * 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 "CustomerInfoImpl2_CustomerInfoService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CustomerInfoImpl2_CustomerInfoService_Proxy* CustomerInfoImpl2_CustomerInfoService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new CustomerInfoImpl2_CustomerInfoService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void CustomerInfoImpl2_CustomerInfoService_Proxy_Destructor(void* proxy)
+ {
+ delete (CustomerInfoImpl2_CustomerInfoService_Proxy*)proxy;
+ }
+}
+
+CustomerInfoImpl2_CustomerInfoService_Proxy::CustomerInfoImpl2_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+CustomerInfoImpl2_CustomerInfoService_Proxy::~CustomerInfoImpl2_CustomerInfoService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+const char* CustomerInfoImpl2_CustomerInfoService_Proxy::getCustomerInformation(const char* arg0)
+{
+ Operation operation("getCustomerInformation");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h
new file mode 100644
index 0000000000..90cf63c66a
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef CustomerInfoImpl2_CustomerInfoService_Proxy_h
+#define CustomerInfoImpl2_CustomerInfoService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "/CustomerInfo.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class CustomerInfoImpl2_CustomerInfoService_Proxy : public CustomerInfo
+{
+public:
+ CustomerInfoImpl2_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~CustomerInfoImpl2_CustomerInfoService_Proxy();
+ virtual const char* getCustomerInformation(const char* customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // CustomerInfoImpl2_CustomerInfoService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp
new file mode 100644
index 0000000000..03c4b2af44
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp
@@ -0,0 +1,72 @@
+/*
+ * 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 "CustomerInfoImpl2_CustomerInfoService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CustomerInfoImpl2_CustomerInfoService_Wrapper* CustomerInfoImpl2_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new CustomerInfoImpl2_CustomerInfoService_Wrapper(target);
+ }
+}
+
+CustomerInfoImpl2_CustomerInfoService_Wrapper::CustomerInfoImpl2_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (CustomerInfoImpl2*)getImplementation();
+}
+
+CustomerInfoImpl2_CustomerInfoService_Wrapper::~CustomerInfoImpl2_CustomerInfoService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* CustomerInfoImpl2_CustomerInfoService_Wrapper::newImplementation()
+{
+ return new CustomerInfoImpl2;
+}
+
+void CustomerInfoImpl2_CustomerInfoService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void CustomerInfoImpl2_CustomerInfoService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getCustomerInformation")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInformation(p0);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h
new file mode 100644
index 0000000000..2a73893241
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef CustomerInfoImpl2_CustomerInfoService_Wrapper_h
+#define CustomerInfoImpl2_CustomerInfoService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "CustomerInfoImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class CustomerInfoImpl2_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ CustomerInfoImpl2_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~CustomerInfoImpl2_CustomerInfoService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ CustomerInfoImpl2* impl;
+};
+
+#endif // CustomerInfoImpl2_CustomerInfoService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.cpp
new file mode 100644
index 0000000000..d34b63ea14
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.cpp
@@ -0,0 +1,91 @@
+/*
+ * 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 "MyValueImpl_MyValueService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_MyValueService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_MyValueService_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValue(const char* arg0)
+{
+ Operation operation("getMyValue");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValueS(const string& arg0)
+{
+ Operation operation("getMyValueS");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+string MyValueImpl_MyValueService_Proxy::getCustname( string& arg0)
+{
+ Operation operation("getCustname");
+ operation.addParameter(&arg0);
+ string ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const string& MyValueImpl_MyValueService_Proxy::getCustnamecs( string arg0)
+{
+ Operation operation("getCustnamecs");
+ operation.addParameter(&arg0);
+ target->invoke(operation);
+ return *(const string*)operation.getReturnValue();
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.h
new file mode 100644
index 0000000000..742947ca69
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Proxy.h
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Proxy_h
+#define MyValueImpl_MyValueService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "MyValue.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Proxy : public MyValue
+{
+public:
+ MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_MyValueService_Proxy();
+ virtual float getMyValue(const char* customerID);
+ virtual float getMyValueS(const string& customerID);
+ virtual string getCustname( string& customerID);
+ virtual const string& getCustnamecs( string customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_MyValueService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.cpp
new file mode 100644
index 0000000000..da60e4c1e3
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.cpp
@@ -0,0 +1,91 @@
+/*
+ * 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 "MyValueImpl_MyValueService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new MyValueImpl_MyValueService_Wrapper(target);
+ }
+}
+
+MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (MyValueImpl*)getImplementation();
+}
+
+MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* MyValueImpl_MyValueService_Wrapper::newImplementation()
+{
+ return new MyValueImpl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getMyValue")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->getMyValue(p0);
+ return;
+ }
+ if (operationName == "getMyValueS")
+ {
+ string& p0 = *(string*)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->getMyValueS(p0);
+ return;
+ }
+ if (operationName == "getCustname")
+ {
+ string& p0 = *(string*)operation.getParameterValue(0);
+ *(string*)operation.getReturnValue() = impl->getCustname(p0);
+ return;
+ }
+ if (operationName == "getCustnamecs")
+ {
+ string& p0 = *( string*)operation.getParameterValue(0);
+ const string& ret = impl->getCustnamecs(p0);
+ operation.setReturnValue(&ret);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.h
new file mode 100644
index 0000000000..f8b8b11724
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_MyValueService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Wrapper_h
+#define MyValueImpl_MyValueService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "MyValueImpl.hpp"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~MyValueImpl_MyValueService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ MyValueImpl* impl;
+};
+
+#endif // MyValueImpl_MyValueService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.cpp
new file mode 100644
index 0000000000..cda55a99c8
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.cpp
@@ -0,0 +1,63 @@
+/*
+ * 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 "MyValueImpl_customerInfo_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_customerInfo_Proxy* MyValueImpl_customerInfo_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_customerInfo_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_customerInfo_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_customerInfo_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_customerInfo_Proxy::MyValueImpl_customerInfo_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_customerInfo_Proxy::~MyValueImpl_customerInfo_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+const char* MyValueImpl_customerInfo_Proxy::getCustomerInformation(const char* arg0)
+{
+ Operation operation("getCustomerInformation");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.h
new file mode 100644
index 0000000000..6ac33b4ef6
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_customerInfo_Proxy.h
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_customerInfo_Proxy_h
+#define MyValueImpl_customerInfo_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "CustomerInfo.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_customerInfo_Proxy : public CustomerInfo
+{
+public:
+ MyValueImpl_customerInfo_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_customerInfo_Proxy();
+ virtual const char* getCustomerInformation(const char* customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_customerInfo_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.cpp
new file mode 100644
index 0000000000..3656acbaad
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.cpp
@@ -0,0 +1,63 @@
+/*
+ * 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 "MyValueImpl_stockQuote_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_stockQuote_Proxy* MyValueImpl_stockQuote_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_stockQuote_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_stockQuote_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_stockQuote_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_stockQuote_Proxy::MyValueImpl_stockQuote_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_stockQuote_Proxy::~MyValueImpl_stockQuote_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+commonj::sdo::DataObjectPtr MyValueImpl_stockQuote_Proxy::GetStockQuotes( commonj::sdo::DataObjectPtr arg0)
+{
+ Operation operation("GetStockQuotes");
+ operation.addParameter(&arg0);
+ commonj::sdo::DataObjectPtr ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.h
new file mode 100644
index 0000000000..7619b6c9cd
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModule/expected_output/MyValueImpl_stockQuote_Proxy.h
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_stockQuote_Proxy_h
+#define MyValueImpl_stockQuote_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "StockQuoteService.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_stockQuote_Proxy : public StockQuoteService
+{
+public:
+ MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_stockQuote_Proxy();
+ virtual commonj::sdo::DataObjectPtr GetStockQuotes( commonj::sdo::DataObjectPtr request);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_stockQuote_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp
new file mode 100644
index 0000000000..e6cb3b3426
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp
@@ -0,0 +1,63 @@
+/*
+ * 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 "CustomerInfoImpl_CustomerInfoService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CustomerInfoImpl_CustomerInfoService_Proxy* CustomerInfoImpl_CustomerInfoService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new CustomerInfoImpl_CustomerInfoService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void CustomerInfoImpl_CustomerInfoService_Proxy_Destructor(void* proxy)
+ {
+ delete (CustomerInfoImpl_CustomerInfoService_Proxy*)proxy;
+ }
+}
+
+CustomerInfoImpl_CustomerInfoService_Proxy::CustomerInfoImpl_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+CustomerInfoImpl_CustomerInfoService_Proxy::~CustomerInfoImpl_CustomerInfoService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformation(const char* arg0)
+{
+ Operation operation("getCustomerInformation");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h
new file mode 100644
index 0000000000..1e2c47225e
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef CustomerInfoImpl_CustomerInfoService_Proxy_h
+#define CustomerInfoImpl_CustomerInfoService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "/CustomerInfo.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class CustomerInfoImpl_CustomerInfoService_Proxy : public CustomerInfo
+{
+public:
+ CustomerInfoImpl_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~CustomerInfoImpl_CustomerInfoService_Proxy();
+ virtual const char* getCustomerInformation(const char* customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // CustomerInfoImpl_CustomerInfoService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp
new file mode 100644
index 0000000000..57404925d2
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp
@@ -0,0 +1,72 @@
+/*
+ * 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 "CustomerInfoImpl_CustomerInfoService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+using Other::CustomerInfoImpl;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CustomerInfoImpl_CustomerInfoService_Wrapper* CustomerInfoImpl_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new CustomerInfoImpl_CustomerInfoService_Wrapper(target);
+ }
+}
+
+CustomerInfoImpl_CustomerInfoService_Wrapper::CustomerInfoImpl_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (CustomerInfoImpl*)getImplementation();
+}
+
+CustomerInfoImpl_CustomerInfoService_Wrapper::~CustomerInfoImpl_CustomerInfoService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* CustomerInfoImpl_CustomerInfoService_Wrapper::newImplementation()
+{
+ return new CustomerInfoImpl;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getCustomerInformation")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInformation(p0);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h
new file mode 100644
index 0000000000..cbb77ab41e
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef CustomerInfoImpl_CustomerInfoService_Wrapper_h
+#define CustomerInfoImpl_CustomerInfoService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "CustomerInfoImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ CustomerInfoImpl_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~CustomerInfoImpl_CustomerInfoService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ Other::CustomerInfoImpl* impl;
+};
+
+#endif // CustomerInfoImpl_CustomerInfoService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp
new file mode 100644
index 0000000000..d34b63ea14
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp
@@ -0,0 +1,91 @@
+/*
+ * 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 "MyValueImpl_MyValueService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_MyValueService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_MyValueService_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValue(const char* arg0)
+{
+ Operation operation("getMyValue");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValueS(const string& arg0)
+{
+ Operation operation("getMyValueS");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+string MyValueImpl_MyValueService_Proxy::getCustname( string& arg0)
+{
+ Operation operation("getCustname");
+ operation.addParameter(&arg0);
+ string ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const string& MyValueImpl_MyValueService_Proxy::getCustnamecs( string arg0)
+{
+ Operation operation("getCustnamecs");
+ operation.addParameter(&arg0);
+ target->invoke(operation);
+ return *(const string*)operation.getReturnValue();
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h
new file mode 100644
index 0000000000..742947ca69
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Proxy_h
+#define MyValueImpl_MyValueService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "MyValue.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Proxy : public MyValue
+{
+public:
+ MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_MyValueService_Proxy();
+ virtual float getMyValue(const char* customerID);
+ virtual float getMyValueS(const string& customerID);
+ virtual string getCustname( string& customerID);
+ virtual const string& getCustnamecs( string customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_MyValueService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp
new file mode 100644
index 0000000000..d5eaade5b1
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp
@@ -0,0 +1,91 @@
+/*
+ * 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 "MyValueImpl_MyValueService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+using Other::MyValueImpl;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new MyValueImpl_MyValueService_Wrapper(target);
+ }
+}
+
+MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (MyValueImpl*)getImplementation();
+}
+
+MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* MyValueImpl_MyValueService_Wrapper::newImplementation()
+{
+ return new MyValueImpl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getMyValue")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->getMyValue(p0);
+ return;
+ }
+ if (operationName == "getMyValueS")
+ {
+ string& p0 = *(string*)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->getMyValueS(p0);
+ return;
+ }
+ if (operationName == "getCustname")
+ {
+ string& p0 = *(string*)operation.getParameterValue(0);
+ *(string*)operation.getReturnValue() = impl->getCustname(p0);
+ return;
+ }
+ if (operationName == "getCustnamecs")
+ {
+ string& p0 = *( string*)operation.getParameterValue(0);
+ const string& ret = impl->getCustnamecs(p0);
+ operation.setReturnValue(&ret);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h
new file mode 100644
index 0000000000..bcaff5b880
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Wrapper_h
+#define MyValueImpl_MyValueService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "MyValueImpl.hpp"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~MyValueImpl_MyValueService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ Other::MyValueImpl* impl;
+};
+
+#endif // MyValueImpl_MyValueService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.cpp
new file mode 100644
index 0000000000..cda55a99c8
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.cpp
@@ -0,0 +1,63 @@
+/*
+ * 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 "MyValueImpl_customerInfo_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_customerInfo_Proxy* MyValueImpl_customerInfo_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_customerInfo_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_customerInfo_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_customerInfo_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_customerInfo_Proxy::MyValueImpl_customerInfo_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_customerInfo_Proxy::~MyValueImpl_customerInfo_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+const char* MyValueImpl_customerInfo_Proxy::getCustomerInformation(const char* arg0)
+{
+ Operation operation("getCustomerInformation");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.h
new file mode 100644
index 0000000000..6ac33b4ef6
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_customerInfo_Proxy.h
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_customerInfo_Proxy_h
+#define MyValueImpl_customerInfo_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "CustomerInfo.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_customerInfo_Proxy : public CustomerInfo
+{
+public:
+ MyValueImpl_customerInfo_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_customerInfo_Proxy();
+ virtual const char* getCustomerInformation(const char* customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_customerInfo_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.cpp
new file mode 100644
index 0000000000..3656acbaad
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.cpp
@@ -0,0 +1,63 @@
+/*
+ * 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 "MyValueImpl_stockQuote_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_stockQuote_Proxy* MyValueImpl_stockQuote_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_stockQuote_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_stockQuote_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_stockQuote_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_stockQuote_Proxy::MyValueImpl_stockQuote_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_stockQuote_Proxy::~MyValueImpl_stockQuote_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+commonj::sdo::DataObjectPtr MyValueImpl_stockQuote_Proxy::GetStockQuotes( commonj::sdo::DataObjectPtr arg0)
+{
+ Operation operation("GetStockQuotes");
+ operation.addParameter(&arg0);
+ commonj::sdo::DataObjectPtr ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.h
new file mode 100644
index 0000000000..7619b6c9cd
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespace/expected_output/MyValueImpl_stockQuote_Proxy.h
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_stockQuote_Proxy_h
+#define MyValueImpl_stockQuote_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "StockQuoteService.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_stockQuote_Proxy : public StockQuoteService
+{
+public:
+ MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_stockQuote_Proxy();
+ virtual commonj::sdo::DataObjectPtr GetStockQuotes( commonj::sdo::DataObjectPtr request);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_stockQuote_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp
new file mode 100644
index 0000000000..b1f76af778
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp
@@ -0,0 +1,182 @@
+/*
+/*
+ * 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 "MyValueImpl_MyValueService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_MyValueService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_MyValueService_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValueOther(const char* arg0)
+{
+ Operation operation("getMyValueOther");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValueSOther(const string& arg0)
+{
+ Operation operation("getMyValueSOther");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+string MyValueImpl_MyValueService_Proxy::getCustnameOther( string& arg0)
+{
+ Operation operation("getCustnameOther");
+ operation.addParameter(&arg0);
+ string ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const string& MyValueImpl_MyValueService_Proxy::getCustnamecsOther( string arg0)
+{
+ Operation operation("getCustnamecsOther");
+ operation.addParameter(&arg0);
+ target->invoke(operation);
+ return *(const string*)operation.getReturnValue();
+}
+
+
+ * 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 "MyValueImpl_MyValueService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_MyValueService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_MyValueService_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValueOther(const char* arg0)
+{
+ Operation operation("getMyValueOther");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValueSOther(const string& arg0)
+{
+ Operation operation("getMyValueSOther");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+string MyValueImpl_MyValueService_Proxy::getCustnameOther( string& arg0)
+{
+ Operation operation("getCustnameOther");
+ operation.addParameter(&arg0);
+ string ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const string& MyValueImpl_MyValueService_Proxy::getCustnamecsOther( string arg0)
+{
+ Operation operation("getCustnamecsOther");
+ operation.addParameter(&arg0);
+ target->invoke(operation);
+ return *(const string*)operation.getReturnValue();
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h
new file mode 100644
index 0000000000..d9459ece24
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h
@@ -0,0 +1,82 @@
+/*
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Proxy_h
+#define MyValueImpl_MyValueService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "MyValue.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Proxy : public MyValue
+{
+public:
+ MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_MyValueService_Proxy();
+ virtual float getMyValueOther(const char* customerID);
+ virtual float getMyValueSOther(const string& customerID);
+ virtual string getCustnameOther( string& customerID);
+ virtual const string& getCustnamecsOther( string customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_MyValueService_Proxy_h
+
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Proxy_h
+#define MyValueImpl_MyValueService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "MyValue.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Proxy : public MyValue
+{
+public:
+ MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_MyValueService_Proxy();
+ virtual float getMyValueOther(const char* customerID);
+ virtual float getMyValueSOther(const string& customerID);
+ virtual string getCustnameOther( string& customerID);
+ virtual const string& getCustnamecsOther( string customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_MyValueService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp
new file mode 100644
index 0000000000..d77b4a302d
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp
@@ -0,0 +1,182 @@
+/*
+/*
+ * 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 "MyValueImpl_MyValueService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+using myvaluecorp::implns::MyValueImpl;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new MyValueImpl_MyValueService_Wrapper(target);
+ }
+}
+
+MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (MyValueImpl*)getImplementation();
+}
+
+MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* MyValueImpl_MyValueService_Wrapper::newImplementation()
+{
+ return new MyValueImpl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getMyValueOther")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->getMyValueOther(p0);
+ return;
+ }
+ if (operationName == "getMyValueSOther")
+ {
+ string& p0 = *(string*)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0);
+ return;
+ }
+ if (operationName == "getCustnameOther")
+ {
+ string& p0 = *(string*)operation.getParameterValue(0);
+ *(string*)operation.getReturnValue() = impl->getCustnameOther(p0);
+ return;
+ }
+ if (operationName == "getCustnamecsOther")
+ {
+ string& p0 = *( string*)operation.getParameterValue(0);
+ const string& ret = impl->getCustnamecsOther(p0);
+ operation.setReturnValue(&ret);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
+ * 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 "MyValueImpl_MyValueService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+using myvaluecorp::implns::MyValueImpl;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new MyValueImpl_MyValueService_Wrapper(target);
+ }
+}
+
+MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (MyValueImpl*)getImplementation();
+}
+
+MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* MyValueImpl_MyValueService_Wrapper::newImplementation()
+{
+ return new MyValueImpl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getMyValueOther")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->getMyValueOther(p0);
+ return;
+ }
+ if (operationName == "getMyValueSOther")
+ {
+ string& p0 = *(string*)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0);
+ return;
+ }
+ if (operationName == "getCustnameOther")
+ {
+ string& p0 = *(string*)operation.getParameterValue(0);
+ *(string*)operation.getReturnValue() = impl->getCustnameOther(p0);
+ return;
+ }
+ if (operationName == "getCustnamecsOther")
+ {
+ string& p0 = *( string*)operation.getParameterValue(0);
+ const string& ret = impl->getCustnamecsOther(p0);
+ operation.setReturnValue(&ret);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h
new file mode 100644
index 0000000000..3992f0445f
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleImplClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h
@@ -0,0 +1,80 @@
+/*
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Wrapper_h
+#define MyValueImpl_MyValueService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "MyValueImpl.hpp"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~MyValueImpl_MyValueService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ myvaluecorp::implns::MyValueImpl* impl;
+};
+
+#endif // MyValueImpl_MyValueService_Wrapper_h
+
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Wrapper_h
+#define MyValueImpl_MyValueService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "MyValueImpl.hpp"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~MyValueImpl_MyValueService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ myvaluecorp::implns::MyValueImpl* impl;
+};
+
+#endif // MyValueImpl_MyValueService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp
new file mode 100644
index 0000000000..4cdd4899b0
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.cpp
@@ -0,0 +1,91 @@
+/*
+ * 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 "MyValueImpl_MyValueService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_MyValueService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_MyValueService_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValueOther(const char* arg0)
+{
+ Operation operation("getMyValueOther");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValueSOther(const string& arg0)
+{
+ Operation operation("getMyValueSOther");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+string MyValueImpl_MyValueService_Proxy::getCustnameOther( string& arg0)
+{
+ Operation operation("getCustnameOther");
+ operation.addParameter(&arg0);
+ string ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const string& MyValueImpl_MyValueService_Proxy::getCustnamecsOther( string arg0)
+{
+ Operation operation("getCustnamecsOther");
+ operation.addParameter(&arg0);
+ target->invoke(operation);
+ return *(const string*)operation.getReturnValue();
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h
new file mode 100644
index 0000000000..5bb75abd5b
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Proxy.h
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Proxy_h
+#define MyValueImpl_MyValueService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "MyValue.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Proxy : public Other::MyValue
+{
+public:
+ MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_MyValueService_Proxy();
+ virtual float getMyValueOther(const char* customerID);
+ virtual float getMyValueSOther(const string& customerID);
+ virtual string getCustnameOther( string& customerID);
+ virtual const string& getCustnamecsOther( string customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_MyValueService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp
new file mode 100644
index 0000000000..34125fa6a3
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.cpp
@@ -0,0 +1,91 @@
+/*
+ * 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 "MyValueImpl_MyValueService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new MyValueImpl_MyValueService_Wrapper(target);
+ }
+}
+
+MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (MyValueImpl*)getImplementation();
+}
+
+MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* MyValueImpl_MyValueService_Wrapper::newImplementation()
+{
+ return new MyValueImpl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getMyValueOther")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->getMyValueOther(p0);
+ return;
+ }
+ if (operationName == "getMyValueSOther")
+ {
+ string& p0 = *(string*)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0);
+ return;
+ }
+ if (operationName == "getCustnameOther")
+ {
+ string& p0 = *(string*)operation.getParameterValue(0);
+ *(string*)operation.getReturnValue() = impl->getCustnameOther(p0);
+ return;
+ }
+ if (operationName == "getCustnamecsOther")
+ {
+ string& p0 = *( string*)operation.getParameterValue(0);
+ const string& ret = impl->getCustnamecsOther(p0);
+ operation.setReturnValue(&ret);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h
new file mode 100644
index 0000000000..f8b8b11724
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespace/expected_output/MyValueImpl_MyValueService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Wrapper_h
+#define MyValueImpl_MyValueService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "MyValueImpl.hpp"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~MyValueImpl_MyValueService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ MyValueImpl* impl;
+};
+
+#endif // MyValueImpl_MyValueService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp
new file mode 100644
index 0000000000..4cdd4899b0
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.cpp
@@ -0,0 +1,91 @@
+/*
+ * 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 "MyValueImpl_MyValueService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_MyValueService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_MyValueService_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValueOther(const char* arg0)
+{
+ Operation operation("getMyValueOther");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValueSOther(const string& arg0)
+{
+ Operation operation("getMyValueSOther");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+string MyValueImpl_MyValueService_Proxy::getCustnameOther( string& arg0)
+{
+ Operation operation("getCustnameOther");
+ operation.addParameter(&arg0);
+ string ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const string& MyValueImpl_MyValueService_Proxy::getCustnamecsOther( string arg0)
+{
+ Operation operation("getCustnamecsOther");
+ operation.addParameter(&arg0);
+ target->invoke(operation);
+ return *(const string*)operation.getReturnValue();
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h
new file mode 100644
index 0000000000..5bb75abd5b
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Proxy.h
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Proxy_h
+#define MyValueImpl_MyValueService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "MyValue.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Proxy : public Other::MyValue
+{
+public:
+ MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_MyValueService_Proxy();
+ virtual float getMyValueOther(const char* customerID);
+ virtual float getMyValueSOther(const string& customerID);
+ virtual string getCustnameOther( string& customerID);
+ virtual const string& getCustnamecsOther( string customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_MyValueService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp
new file mode 100644
index 0000000000..34125fa6a3
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.cpp
@@ -0,0 +1,91 @@
+/*
+ * 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 "MyValueImpl_MyValueService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new MyValueImpl_MyValueService_Wrapper(target);
+ }
+}
+
+MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (MyValueImpl*)getImplementation();
+}
+
+MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* MyValueImpl_MyValueService_Wrapper::newImplementation()
+{
+ return new MyValueImpl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getMyValueOther")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->getMyValueOther(p0);
+ return;
+ }
+ if (operationName == "getMyValueSOther")
+ {
+ string& p0 = *(string*)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->getMyValueSOther(p0);
+ return;
+ }
+ if (operationName == "getCustnameOther")
+ {
+ string& p0 = *(string*)operation.getParameterValue(0);
+ *(string*)operation.getReturnValue() = impl->getCustnameOther(p0);
+ return;
+ }
+ if (operationName == "getCustnamecsOther")
+ {
+ string& p0 = *( string*)operation.getParameterValue(0);
+ const string& ret = impl->getCustnamecsOther(p0);
+ operation.setReturnValue(&ret);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h
new file mode 100644
index 0000000000..f8b8b11724
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleIntfClassWithNamespaceButNotInClassAttr/expected_output/MyValueImpl_MyValueService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Wrapper_h
+#define MyValueImpl_MyValueService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "MyValueImpl.hpp"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~MyValueImpl_MyValueService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ MyValueImpl* impl;
+};
+
+#endif // MyValueImpl_MyValueService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp
new file mode 100644
index 0000000000..b875e97a95
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.cpp
@@ -0,0 +1,63 @@
+/*
+ * 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 "CustomerInfoImpl2_CustomerInfoService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CustomerInfoImpl2_CustomerInfoService_Proxy* CustomerInfoImpl2_CustomerInfoService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new CustomerInfoImpl2_CustomerInfoService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void CustomerInfoImpl2_CustomerInfoService_Proxy_Destructor(void* proxy)
+ {
+ delete (CustomerInfoImpl2_CustomerInfoService_Proxy*)proxy;
+ }
+}
+
+CustomerInfoImpl2_CustomerInfoService_Proxy::CustomerInfoImpl2_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+CustomerInfoImpl2_CustomerInfoService_Proxy::~CustomerInfoImpl2_CustomerInfoService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+const char* CustomerInfoImpl2_CustomerInfoService_Proxy::getCustomerInformation(const char* arg0)
+{
+ Operation operation("getCustomerInformation");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h
new file mode 100644
index 0000000000..90cf63c66a
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Proxy.h
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef CustomerInfoImpl2_CustomerInfoService_Proxy_h
+#define CustomerInfoImpl2_CustomerInfoService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "/CustomerInfo.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class CustomerInfoImpl2_CustomerInfoService_Proxy : public CustomerInfo
+{
+public:
+ CustomerInfoImpl2_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~CustomerInfoImpl2_CustomerInfoService_Proxy();
+ virtual const char* getCustomerInformation(const char* customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // CustomerInfoImpl2_CustomerInfoService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp
new file mode 100644
index 0000000000..12d3a1a3d1
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.cpp
@@ -0,0 +1,70 @@
+/*
+ * 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 "CustomerInfoImpl2_CustomerInfoService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CustomerInfoImpl2_CustomerInfoService_Wrapper* CustomerInfoImpl2_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new CustomerInfoImpl2_CustomerInfoService_Wrapper(target);
+ }
+}
+
+CustomerInfoImpl2_CustomerInfoService_Wrapper::CustomerInfoImpl2_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (CustomerInfoImpl2*)getImplementation();
+}
+
+CustomerInfoImpl2_CustomerInfoService_Wrapper::~CustomerInfoImpl2_CustomerInfoService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* CustomerInfoImpl2_CustomerInfoService_Wrapper::newImplementation()
+{
+ return new CustomerInfoImpl2;
+}
+
+void CustomerInfoImpl2_CustomerInfoService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void CustomerInfoImpl2_CustomerInfoService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getCustomerInformation")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInformation(p0);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h
new file mode 100644
index 0000000000..2a73893241
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/CustomerInfoImpl2_CustomerInfoService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef CustomerInfoImpl2_CustomerInfoService_Wrapper_h
+#define CustomerInfoImpl2_CustomerInfoService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "CustomerInfoImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class CustomerInfoImpl2_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ CustomerInfoImpl2_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~CustomerInfoImpl2_CustomerInfoService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ CustomerInfoImpl2* impl;
+};
+
+#endif // CustomerInfoImpl2_CustomerInfoService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp
new file mode 100644
index 0000000000..d34b63ea14
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.cpp
@@ -0,0 +1,91 @@
+/*
+ * 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 "MyValueImpl_MyValueService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Proxy* MyValueImpl_MyValueService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_MyValueService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_MyValueService_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_MyValueService_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_MyValueService_Proxy::MyValueImpl_MyValueService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_MyValueService_Proxy::~MyValueImpl_MyValueService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValue(const char* arg0)
+{
+ Operation operation("getMyValue");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+float MyValueImpl_MyValueService_Proxy::getMyValueS(const string& arg0)
+{
+ Operation operation("getMyValueS");
+ operation.addParameter(&arg0);
+ float ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+string MyValueImpl_MyValueService_Proxy::getCustname( string& arg0)
+{
+ Operation operation("getCustname");
+ operation.addParameter(&arg0);
+ string ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const string& MyValueImpl_MyValueService_Proxy::getCustnamecs( string arg0)
+{
+ Operation operation("getCustnamecs");
+ operation.addParameter(&arg0);
+ target->invoke(operation);
+ return *(const string*)operation.getReturnValue();
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h
new file mode 100644
index 0000000000..742947ca69
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Proxy.h
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Proxy_h
+#define MyValueImpl_MyValueService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "MyValue.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Proxy : public MyValue
+{
+public:
+ MyValueImpl_MyValueService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_MyValueService_Proxy();
+ virtual float getMyValue(const char* customerID);
+ virtual float getMyValueS(const string& customerID);
+ virtual string getCustname( string& customerID);
+ virtual const string& getCustnamecs( string customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_MyValueService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp
new file mode 100644
index 0000000000..83857169e5
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.cpp
@@ -0,0 +1,89 @@
+/*
+ * 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 "MyValueImpl_MyValueService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_MyValueService_Wrapper* MyValueImpl_MyValueService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new MyValueImpl_MyValueService_Wrapper(target);
+ }
+}
+
+MyValueImpl_MyValueService_Wrapper::MyValueImpl_MyValueService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (MyValueImpl*)getImplementation();
+}
+
+MyValueImpl_MyValueService_Wrapper::~MyValueImpl_MyValueService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* MyValueImpl_MyValueService_Wrapper::newImplementation()
+{
+ return new MyValueImpl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void MyValueImpl_MyValueService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getMyValue")
+ {
+ const char* p0 = *(const char**)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->getMyValue(p0);
+ return;
+ }
+ if (operationName == "getMyValueS")
+ {
+ string& p0 = *(string*)operation.getParameterValue(0);
+ *(float*)operation.getReturnValue() = impl->getMyValueS(p0);
+ return;
+ }
+ if (operationName == "getCustname")
+ {
+ string& p0 = *(string*)operation.getParameterValue(0);
+ *(string*)operation.getReturnValue() = impl->getCustname(p0);
+ return;
+ }
+ if (operationName == "getCustnamecs")
+ {
+ string& p0 = *( string*)operation.getParameterValue(0);
+ const string& ret = impl->getCustnamecs(p0);
+ operation.setReturnValue(&ret);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h
new file mode 100644
index 0000000000..f8b8b11724
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_MyValueService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_MyValueService_Wrapper_h
+#define MyValueImpl_MyValueService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "MyValueImpl.hpp"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class MyValueImpl_MyValueService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ MyValueImpl_MyValueService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~MyValueImpl_MyValueService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ MyValueImpl* impl;
+};
+
+#endif // MyValueImpl_MyValueService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp
new file mode 100644
index 0000000000..cda55a99c8
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.cpp
@@ -0,0 +1,63 @@
+/*
+ * 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 "MyValueImpl_customerInfo_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_customerInfo_Proxy* MyValueImpl_customerInfo_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_customerInfo_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_customerInfo_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_customerInfo_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_customerInfo_Proxy::MyValueImpl_customerInfo_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_customerInfo_Proxy::~MyValueImpl_customerInfo_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+const char* MyValueImpl_customerInfo_Proxy::getCustomerInformation(const char* arg0)
+{
+ Operation operation("getCustomerInformation");
+ operation.addParameter(&arg0);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.h
new file mode 100644
index 0000000000..6ac33b4ef6
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_customerInfo_Proxy.h
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_customerInfo_Proxy_h
+#define MyValueImpl_customerInfo_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "CustomerInfo.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_customerInfo_Proxy : public CustomerInfo
+{
+public:
+ MyValueImpl_customerInfo_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_customerInfo_Proxy();
+ virtual const char* getCustomerInformation(const char* customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_customerInfo_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp
new file mode 100644
index 0000000000..3656acbaad
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.cpp
@@ -0,0 +1,63 @@
+/*
+ * 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 "MyValueImpl_stockQuote_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ MyValueImpl_stockQuote_Proxy* MyValueImpl_stockQuote_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new MyValueImpl_stockQuote_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void MyValueImpl_stockQuote_Proxy_Destructor(void* proxy)
+ {
+ delete (MyValueImpl_stockQuote_Proxy*)proxy;
+ }
+}
+
+MyValueImpl_stockQuote_Proxy::MyValueImpl_stockQuote_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+MyValueImpl_stockQuote_Proxy::~MyValueImpl_stockQuote_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+commonj::sdo::DataObjectPtr MyValueImpl_stockQuote_Proxy::GetStockQuotes( commonj::sdo::DataObjectPtr arg0)
+{
+ Operation operation("GetStockQuotes");
+ operation.addParameter(&arg0);
+ commonj::sdo::DataObjectPtr ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.h
new file mode 100644
index 0000000000..7619b6c9cd
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/MyValueServiceModuleTwoClasses/expected_output/MyValueImpl_stockQuote_Proxy.h
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef MyValueImpl_stockQuote_Proxy_h
+#define MyValueImpl_stockQuote_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "StockQuoteService.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class MyValueImpl_stockQuote_Proxy : public StockQuoteService
+{
+public:
+ MyValueImpl_stockQuote_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~MyValueImpl_stockQuote_Proxy();
+ virtual commonj::sdo::DataObjectPtr GetStockQuotes( commonj::sdo::DataObjectPtr request);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // MyValueImpl_stockQuote_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp
new file mode 100644
index 0000000000..074406c606
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.cpp
@@ -0,0 +1,86 @@
+/*
+ * 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 "CustomerInfoImpl_CustomerInfoService_Proxy.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CustomerInfoImpl_CustomerInfoService_Proxy* CustomerInfoImpl_CustomerInfoService_Proxy_Factory(ServiceWrapper* target)
+ {
+ return new CustomerInfoImpl_CustomerInfoService_Proxy(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void CustomerInfoImpl_CustomerInfoService_Proxy_Destructor(void* proxy)
+ {
+ delete (CustomerInfoImpl_CustomerInfoService_Proxy*)proxy;
+ }
+}
+
+CustomerInfoImpl_CustomerInfoService_Proxy::CustomerInfoImpl_CustomerInfoService_Proxy(ServiceWrapper* targ) : target(targ)
+{
+}
+
+CustomerInfoImpl_CustomerInfoService_Proxy::~CustomerInfoImpl_CustomerInfoService_Proxy()
+{
+ if (target)
+ delete target;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInformationCharPublic( char* arg0, const char* arg1)
+{
+ Operation operation("getCustomerInformationCharPublic");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoACharPublic( char* arg0, const char* arg1)
+{
+ Operation operation("getCustomerInfoACharPublic");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+const char* CustomerInfoImpl_CustomerInfoService_Proxy::getCustomerInfoBCharPublic( char* arg0, char* arg1)
+{
+ Operation operation("getCustomerInfoBCharPublic");
+ operation.addParameter(&arg0);
+ operation.addParameter(&arg1);
+ const char* ret;
+ operation.setReturnValue(&ret);
+ target->invoke(operation);
+ return ret;
+}
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h
new file mode 100644
index 0000000000..ddb678c094
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Proxy.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef CustomerInfoImpl_CustomerInfoService_Proxy_h
+#define CustomerInfoImpl_CustomerInfoService_Proxy_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "/CustomerInfo.h"
+#include "tuscany/sca/core/ServiceWrapper.h"
+
+class CustomerInfoImpl_CustomerInfoService_Proxy : public CustomerInfo
+{
+public:
+ CustomerInfoImpl_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~CustomerInfoImpl_CustomerInfoService_Proxy();
+ virtual const char* getCustomerInformationCharPublic( char* p1, const char* customerID);
+ virtual const char* getCustomerInfoACharPublic( char* p1, const char* );
+ virtual const char* getCustomerInfoBCharPublic( char* p1, char* customerID);
+private:
+ tuscany::sca::ServiceWrapper* target;
+};
+
+#endif // CustomerInfoImpl_CustomerInfoService_Proxy_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp
new file mode 100644
index 0000000000..09000f9040
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.cpp
@@ -0,0 +1,87 @@
+/*
+ * 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 "CustomerInfoImpl_CustomerInfoService_Wrapper.h"
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+
+
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ CustomerInfoImpl_CustomerInfoService_Wrapper* CustomerInfoImpl_CustomerInfoService_Wrapper_Factory(tuscany::sca::model::Service* target)
+ {
+ return new CustomerInfoImpl_CustomerInfoService_Wrapper(target);
+ }
+}
+
+CustomerInfoImpl_CustomerInfoService_Wrapper::CustomerInfoImpl_CustomerInfoService_Wrapper(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (CustomerInfoImpl*)getImplementation();
+}
+
+CustomerInfoImpl_CustomerInfoService_Wrapper::~CustomerInfoImpl_CustomerInfoService_Wrapper()
+{
+ releaseImplementation();
+}
+
+void* CustomerInfoImpl_CustomerInfoService_Wrapper::newImplementation()
+{
+ return new CustomerInfoImpl;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Wrapper::deleteImplementation()
+{
+ delete impl;
+}
+
+void CustomerInfoImpl_CustomerInfoService_Wrapper::invokeService(Operation& operation)
+{
+ const string& operationName = operation.getName();
+
+ if (operationName == "getCustomerInformationCharPublic")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ const char* p1 = *(const char**)operation.getParameterValue(1);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInformationCharPublic(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoACharPublic")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ const char* p1 = *(const char**)operation.getParameterValue(1);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoACharPublic(p0, p1);
+ return;
+ }
+ if (operationName == "getCustomerInfoBCharPublic")
+ {
+ char* p0 = *( char**)operation.getParameterValue(0);
+ char* p1 = *( char**)operation.getParameterValue(1);
+ *(const char**)operation.getReturnValue() = impl->getCustomerInfoBCharPublic(p0, p1);
+ return;
+ }
+
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}
+
diff --git a/branches/cpp-M1/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h
new file mode 100644
index 0000000000..5fb82c4295
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/junit/testoutput/SimplePublicPrivateProtectedTest/expected_output/CustomerInfoImpl_CustomerInfoService_Wrapper.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef CustomerInfoImpl_CustomerInfoService_Wrapper_h
+#define CustomerInfoImpl_CustomerInfoService_Wrapper_h
+
+#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif
+
+#include "CustomerInfoImpl.h"
+#include "tuscany/sca/core/ComponentServiceWrapper.h"
+
+class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ CustomerInfoImpl_CustomerInfoService_Wrapper(tuscany::sca::model::Service* target);
+ virtual ~CustomerInfoImpl_CustomerInfoService_Wrapper();
+ virtual void invokeService(tuscany::sca::Operation& operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+private:
+ CustomerInfoImpl* impl;
+};
+
+#endif // CustomerInfoImpl_CustomerInfoService_Wrapper_h
+
diff --git a/branches/cpp-M1/sca/tools/scagen/lib/readme.txt b/branches/cpp-M1/sca/tools/scagen/lib/readme.txt
new file mode 100644
index 0000000000..d99c666c6a
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/lib/readme.txt
@@ -0,0 +1,4 @@
+Place a junit.jar file (not shipped as part of Tuscany)
+in this directory to get the scagen build.xml Ant build
+file to find it and Junit classes (without setting the
+property "junit.jar.folder".
diff --git a/branches/cpp-M1/sca/tools/scagen/scagen.cmd b/branches/cpp-M1/sca/tools/scagen/scagen.cmd
new file mode 100644
index 0000000000..a655d5d217
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/scagen.cmd
@@ -0,0 +1,15 @@
+@REM Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM 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, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+@java -jar %~d0%~p0scagen.jar %*
diff --git a/branches/cpp-M1/sca/tools/scagen/scagen.sh b/branches/cpp-M1/sca/tools/scagen/scagen.sh
new file mode 100755
index 0000000000..23d6dedc47
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/scagen.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# 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.
+
+java -jar scagen.jar -dir $2 -output $4 \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/BodyPart.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/BodyPart.java
new file mode 100644
index 0000000000..65b1e2f6fa
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/BodyPart.java
@@ -0,0 +1,90 @@
+/*
+ *
+ * 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.
+ */
+
+/*
+ * Branched from the original class that was also contributed to the
+ * org.apache.axis.tools.common package.
+ */
+
+package org.apache.tuscany.sca.cpp.tools.common;
+
+/**
+ * A snippet of C or C++ source code. If this snippet ends with a return
+ * statement, this body part also contains the return value.
+ */
+public class BodyPart {
+ public final static int TRAILING = 0;
+
+ public final static int RETURN = 1;
+
+ public final static int CATCH = 2;
+
+ private String codeFragment;
+
+ private String returnValue = null;
+
+ private Parameter caughtValue = null;
+
+ private int type;
+
+ BodyPart(String cf) {
+ codeFragment = cf;
+ type = TRAILING;
+ }
+
+ BodyPart(String cf, String rv) {
+ codeFragment = cf;
+ if (null != rv && !Utils.isSpace(rv)) {
+ type = RETURN;
+ returnValue = rv;
+ } else
+ type = TRAILING;
+ }
+
+ BodyPart(String cf, Parameter cv) {
+ codeFragment = cf;
+ caughtValue = cv;
+ type = CATCH;
+ }
+
+ public String getCodeFragment() {
+ return codeFragment;
+ }
+
+ public boolean isTrailing() {
+ return TRAILING == type;
+ }
+
+ public boolean isReturn() {
+ return RETURN == type;
+ }
+
+ public boolean isCatch() {
+ return CATCH == type;
+ }
+
+ public String getReturnValue() {
+ if (returnValue != null)
+ return returnValue.trim();
+ else
+ return null;
+ }
+
+ public Parameter getCaughtValue() {
+ return caughtValue;
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.java
new file mode 100644
index 0000000000..6846bb4096
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/CParsingTool.java
@@ -0,0 +1,119 @@
+/*
+ *
+ * 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.
+ */
+
+/*
+ * Branched from the original class that was also contributed to the
+ * org.apache.axis.tools.common package.
+ */
+package org.apache.tuscany.sca.cpp.tools.common;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * The superclass of tools that parse C/C++ code. This CParsingTool provides
+ * some useful common methods.
+ */
+public class CParsingTool {
+ protected boolean failed = false;
+
+ protected Headers headers = new Headers();
+
+ protected CParsingTool(String[] args) throws Exception {
+ String text = new String();
+ for (int i = 0; i < args.length; i++)
+ text += args[i] + " ";
+ Utils.outputDebugString(text);
+
+ Options.set(args);
+ String config = (String) Options.getOption("-config");
+ if (null != config)
+ Configuration.initialise(config);
+ }
+
+ /**
+ * Read in any include files before the main processing of the tool is done.
+ * This constructs the Headers.
+ */
+ protected Headers preparseHeaders(String option) throws Exception {
+ Headers headers = new Headers();
+ Object o = Options.getOption(option);
+ if (null != o) {
+ Utils.outputDebugString("Pre-parsing headers...");
+ List includeList;
+ if (o instanceof List)
+ includeList = (List) o;
+ else {
+ includeList = new ArrayList();
+ includeList.add(o);
+ }
+ Iterator it = includeList.iterator();
+ while (it.hasNext()) {
+ File include = new File((String) it.next());
+ if (!include.isDirectory())
+ Utils.rude("Bad include directory " + include);
+
+ DirectoryTree tree = new DirectoryTree(headers, new HashSet(
+ Arrays.asList(new Object[] { "hpp", "h" })));
+ tree.walkTree(include, null, 0);
+ }
+ Utils.outputDebugString("Parsing files...");
+ }
+
+ return headers;
+ }
+
+ /**
+ * Checks the source directory looks good.
+ */
+ protected File checkFile(String option) throws Exception {
+ String name = (String) Options.getOption(option);
+ if (null == name) {
+ printUsage();
+ System.exit(-1);
+ }
+
+ File file = new File(name);
+ if (!file.isFile() && !file.isDirectory())
+ Utils.rude("Bad file or directory " + file);
+ return file;
+ }
+
+ /**
+ * Checks the target directory and creates it if it doesn't already exist.
+ */
+ protected File maybeCreateDirectory(String option) throws Exception {
+ String name = (String) Options.getOption(option);
+ if (null == name) {
+ printUsage();
+ System.exit(-1);
+ }
+
+ File file = new File(name);
+ if (!file.exists() && !file.mkdir())
+ Utils.screenMessage("Failed to create directory " + file);
+ return file;
+ }
+
+ protected void printUsage() {
+ System.out.println("usage: ??");
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Configuration.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Configuration.java
new file mode 100644
index 0000000000..1a900ff711
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Configuration.java
@@ -0,0 +1,126 @@
+/*
+ *
+ * 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.
+ */
+
+/*
+ * Branched from the original class that was also contributed to the
+ * org.apache.axis.tools.common package.
+ */
+package org.apache.tuscany.sca.cpp.tools.common;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Encapsulates the tool's configuration file
+ */
+public class Configuration {
+ private static Set files = new HashSet();
+
+ private static Set classes = new HashSet();
+
+ private static Set methods = new HashSet();
+
+ private static Set macros = new HashSet();
+
+ private static Set defines = new HashSet();
+
+ private static Set attributes = new HashSet();
+
+ private static Map others = new HashMap();
+
+ /**
+ * No one creates an instance of this class.
+ */
+ private Configuration() {
+ }
+
+ /**
+ * Reads in the configuration file
+ */
+ public static void initialise(String filename) throws Exception {
+ File file = new File(filename);
+ FileReader fr = new FileReader(file);
+ BufferedReader br = new BufferedReader(fr);
+ String line = br.readLine();
+ for (int lineno = 1; null != line; lineno++, line = br.readLine()) {
+ // Ignore lines starting with a # (comments) and blank lines
+ if (line.startsWith("#"))
+ continue;
+ boolean blank = true;
+ for (int i = 0; i < line.length() && blank; i++)
+ if (!Character.isWhitespace(line.charAt(i)))
+ blank = false;
+ if (blank)
+ continue;
+
+ int equals = line.indexOf("=");
+ if (-1 == equals)
+ Utils.rude("Bad line in configuration file " + filename
+ + " lineno " + lineno);
+ String key = line.substring(0, equals).trim();
+ String value = line.substring(equals + 1).trim();
+ if ("excludefile".equals(key)) {
+ files.add(value);
+ } else if ("excludeclass".equals(key)) {
+ classes.add(value);
+ } else if ("excludemethod".equals(key)) {
+ methods.add(value);
+ } else if ("macro".equals(key)) {
+ macros.add(value);
+ } else if ("define".equals(key)) {
+ defines.add(value);
+ } else if ("attribute".equals(key)) {
+ attributes.add(value);
+ } else {
+ others.put(key, value);
+ }
+ }
+ }
+
+ public static boolean fileExcluded(String s) {
+ return files.contains(s);
+ }
+
+ public static boolean classExcluded(String s) {
+ return classes.contains(s);
+ }
+
+ public static boolean methodExcluded(String className, String method) {
+ return methods.contains(className + "::" + method);
+ }
+
+ public static boolean isMacro(String s) {
+ return macros.contains(s);
+ }
+
+ public static boolean isDefine(String s) {
+ return defines.contains(s);
+ }
+
+ public static boolean isAttribute(String s) {
+ return attributes.contains(s);
+ }
+
+ public static String getConfigured(String key) {
+ return (String) others.get(key);
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.java
new file mode 100644
index 0000000000..a4f1ca9a21
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/DirectoryTree.java
@@ -0,0 +1,100 @@
+/*
+ *
+ * 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.
+ */
+
+/*
+ * Branched from the original class that was also contributed to the
+ * org.apache.axis.tools.common package.
+ */
+package org.apache.tuscany.sca.cpp.tools.common;
+
+import java.io.File;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+public class DirectoryTree {
+ private FileActor actor;
+
+ private Set extensions;
+
+ public DirectoryTree(FileActor actor, Set extensions) {
+ this.actor = actor;
+ this.extensions = extensions;
+ }
+
+ /**
+ * Starts adding trace into the given file. If the given file is a directory
+ * then this the starting directory and all code beneath and in this
+ * directory will be given trace.
+ *
+ * @param source -
+ * either the starting directory or one file to add trace to.
+ */
+ public void walkTree(File source, File target, int depth) throws Exception {
+ depth++;
+ boolean noTarget = (null == target);
+
+ if (!source.canRead())
+ Utils.rude("Cannot read from source directory " + source);
+ if (!noTarget && !target.canWrite())
+ Utils.rude("Cannot write to target directory " + target);
+
+ if (source.isDirectory()) {
+ File[] filesInDirectory = source.listFiles();
+ for (int i = 0; i < filesInDirectory.length; i++) {
+ File file = filesInDirectory[i];
+ String name = file.getName();
+ int dot = name.lastIndexOf('.');
+ String ext = null;
+ if (-1 != dot)
+ ext = name.substring(dot + 1);
+
+ if (file.isDirectory()) {
+ File newTarget = null;
+ if (!noTarget) {
+ StringTokenizer st = new StringTokenizer(
+ file.getPath(), "\\/");
+ String newdir = null;
+ while (st.hasMoreTokens())
+ newdir = st.nextToken();
+ String targetName = maybeAppendSeparator(target
+ .toString());
+ newTarget = new File(targetName + newdir);
+ if (!newTarget.mkdir())
+ Utils.rude("Failed to create target directory "
+ + newTarget);
+ }
+
+ // recurse
+ walkTree(file, newTarget, depth);
+ } else if (file.isFile()
+ && (extensions == null || (!file.isHidden() && extensions
+ .contains(ext)))) {
+ // this is a file and we need to add trace into it !
+ actor.actOnFile(file, target, depth);
+ }
+ }
+ } else {
+ actor.actOnFile(source, target, depth);
+ }
+ }
+
+ public static String maybeAppendSeparator(String name) {
+ if (!name.endsWith("/") && !name.endsWith("\\"))
+ name += "/";
+ return name;
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FileActor.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FileActor.java
new file mode 100644
index 0000000000..fc1c8ec5c3
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FileActor.java
@@ -0,0 +1,32 @@
+/*
+ *
+ * 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.
+ */
+
+/*
+ * Branched from the original class that was also contributed to the
+ * org.apache.axis.tools.common package.
+ */
+package org.apache.tuscany.sca.cpp.tools.common;
+
+import java.io.File;
+
+/**
+ * DirectoryTree calls this interface to allow implementations of this interface
+ * to act on a file in the directory tree.
+ */
+public interface FileActor {
+ public void actOnFile(File source, File target, int depth) throws Exception;
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FilePart.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FilePart.java
new file mode 100644
index 0000000000..e629751ea4
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/FilePart.java
@@ -0,0 +1,75 @@
+/*
+ *
+ * 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.
+ */
+
+/*
+ * Branched from the original class that was also contributed to the
+ * org.apache.axis.tools.common package.
+ */
+
+package org.apache.tuscany.sca.cpp.tools.common;
+
+/**
+ * A piece of C++ source code
+ */
+public class FilePart {
+ public final static int UNKNOWN = 0;
+
+ public final static int COMMENT = 1;
+
+ public final static int METHOD = 2;
+
+ public final static int FIELD = 3;
+
+ public final static int BEGINSCOPE = 4;
+
+ public final static int ENDSCOPE = 5;
+
+ public final static int DIRECTIVE = 6;
+
+ public final static int WHITESPACE = 7;
+
+ public final static int MACRO = 8;
+
+ public final static int CLASSATTRIBUTE = 9;
+
+ public final static int ENUM = 10;
+
+ public final static int PROTOTYPE = 11;
+
+ public final static int TYPEDEF = 12;
+
+ protected String cppsource;
+
+ protected int type;
+
+ FilePart(String s, int type) {
+ cppsource = s;
+ this.type = type;
+ }
+
+ public int getType() {
+ return type;
+ }
+
+ int length() {
+ return cppsource.length();
+ }
+
+ public String toString() {
+ return cppsource;
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Headers.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Headers.java
new file mode 100644
index 0000000000..8deba2401d
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Headers.java
@@ -0,0 +1,162 @@
+/*
+ *
+ * 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.
+ */
+
+/*
+ * Branched from the original class that was also contributed to the
+ * org.apache.axis.tools.common package.
+ */
+package org.apache.tuscany.sca.cpp.tools.common;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+public class Headers implements FileActor {
+ private ArrayList instanceMethods = new ArrayList();
+
+ private ArrayList staticMethods = new ArrayList();
+
+ private ArrayList allMethods = new ArrayList();
+
+ private ArrayList classNames = new ArrayList();
+
+ private boolean failed = false;
+
+ public void actOnFile(File header, File ignored, int depth)
+ throws Exception {
+ if (Configuration.fileExcluded(header.getName())) {
+ Utils.outputDebugString("excluding " + header + "...");
+ return;
+ }
+
+ Utils.outputDebugString("pre-parsing " + header + "...");
+ FileReader fr = null;
+ try {
+ fr = new FileReader(header);
+ } catch (FileNotFoundException fnfe) {
+ throw fnfe;
+ }
+ BufferedReader inputFile = new BufferedReader(fr);
+
+ try {
+ InputCppSourceCode code = new InputCppSourceCode(inputFile, header
+ .getName());
+ Iterator it = code.getPartIterator();
+ while (it.hasNext()) {
+ FilePart fp = (FilePart) (it.next());
+ if (fp.getType() != FilePart.PROTOTYPE)
+ continue;
+ PrototypePart pp = (PrototypePart) fp;
+ String className = pp.className();
+ if (null == className)
+ continue;
+ String trimClassName = className;
+ if (className.endsWith("::"))
+ trimClassName = className.substring(0,
+ className.length() - 2);
+ if (!classNames.contains(trimClassName))
+ classNames.add(trimClassName);
+
+ Signature sign = new Signature(fp.toString());
+ sign.setClassName(className);
+ //Tuscany
+ sign.setScope(pp.getSignature().getScope());
+ sign.setNamespace(pp.getSignature().getNamespace());
+
+ // "Clean" the signature by stripping off attributes,
+ // semicolons, etc
+ Signature cleaned = new Signature(sign.toStringWithoutAttrs());
+ //Tuscany - problem
+ cleaned.setClassName(className);
+ cleaned.setScope(pp.getSignature().getScope());
+ cleaned.setNamespace(pp.getSignature().getNamespace());
+ //Tuscany - end of problem
+
+
+ if (-1 == sign.getAttributes().indexOf("static"))
+ instanceMethods.add(cleaned);
+ else
+ staticMethods.add(cleaned);
+ }
+ } catch (ParsingException pe) {
+ failed = true;
+ }
+
+ inputFile.close();
+ allMethods.addAll(staticMethods);
+ allMethods.addAll(instanceMethods);
+ }
+
+ public boolean failed() {
+ return failed;
+ }
+
+ public boolean isInstanceMethod(Signature sign) {
+ Iterator it = instanceMethods.iterator();
+ while (it.hasNext()) {
+ Signature s = (Signature) it.next();
+ if (s.equals(sign))
+ return true;
+ }
+ return false;
+ }
+
+ public boolean isStaticMethod(Signature sign) {
+ Iterator it = staticMethods.iterator();
+ while (it.hasNext()) {
+ Signature s = (Signature) it.next();
+ if (s.equals(sign))
+ return true;
+ }
+ return false;
+ }
+
+ public List getMethods(String method) {
+ ArrayList list = new ArrayList();
+ if (null == method)
+ return list;
+
+ Iterator it = allMethods.iterator();
+ while (it.hasNext()) {
+ Signature s = (Signature) it.next();
+ if (method.equals(s.getMethodName()))
+ list.add(s);
+ }
+ return list;
+ }
+
+ /**
+ * Tuscany change - a method to get all the method signatures at once
+ */
+ public List getAllMethods() {
+ ArrayList list = new ArrayList();
+ Iterator it = allMethods.iterator();
+ while (it.hasNext()) {
+ Signature s = (Signature) it.next();
+ list.add(s);
+ }
+ return list;
+ }
+
+ public boolean isClassName(String text) {
+ return classNames.contains(text);
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.java
new file mode 100644
index 0000000000..6fa68b14a3
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/InputCppSourceCode.java
@@ -0,0 +1,420 @@
+/*
+ *
+ * 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.
+ */
+
+/*
+ * Branched from the original class that was also contributed to the
+ * org.apache.axis.tools.common package.
+ */
+package org.apache.tuscany.sca.cpp.tools.common;
+
+import java.io.BufferedReader;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.StringTokenizer;
+
+public class InputCppSourceCode {
+
+ private ArrayList parts = new ArrayList();
+
+ private String name;
+
+ public InputCppSourceCode(BufferedReader br, String name) throws Exception {
+ this.name = name;
+
+ String s = null;
+ StringBuffer buff = new StringBuffer();
+ for (int i = 1;; i++) {
+ try {
+ s = br.readLine();
+ } catch (Exception e) {
+ System.err.println("Ignoring exception thrown parsing file "
+ + name + " line number " + i);
+ e.printStackTrace();
+ break;
+ }
+ if (s == null)
+ break;
+ buff.append(s + "\n");
+ }
+ String str = buff.toString();
+
+ // TODO: When checking for rest.startsWith("struct") should
+ // check the next letter after struct is not alphanumeric otherwise
+ // we'll get false matches on a function called structify() for
+ // instance. Also applies to enum, union, public, typedef, etc
+
+ String rest, text = "";
+ int scopedepth = 0;
+ String scope = "public";
+ String currentClass = null;
+ String currentNamespace = null;
+ for (int idx = 0; idx < str.length(); /* No idx++ */
+ ) {
+ rest = str.substring(idx);
+ if (Character.isWhitespace(rest.charAt(0))) {
+ int ridx = 0;
+ while (ridx < rest.length()
+ && Character.isWhitespace(rest.charAt(ridx)))
+ ridx++;
+ text = rest.substring(0, ridx);
+ FilePart fp = new FilePart(text, FilePart.WHITESPACE);
+ parts.add(fp);
+ idx += ridx;
+
+ } else if (rest.startsWith("/*")) {
+ int ridx = rest.indexOf("*/"); // Don't use Utils here
+ text = str.substring(idx, idx + ridx + 2);
+ FilePart fp = new FilePart(text, FilePart.COMMENT);
+ parts.add(fp);
+ idx += text.length();
+
+ } else if (rest.startsWith("//")) {
+ text = str.substring(idx, idx + rest.indexOf("\n"));
+ FilePart fp = new FilePart(text, FilePart.COMMENT);
+ parts.add(fp);
+ idx += text.length();
+
+ } else if (rest.startsWith("#")) {
+ int ridx = rest.indexOf("\n");
+ char c = rest.charAt(ridx - 1);
+ while (-1 != ridx && '\\' == c) {
+ String rest2 = rest.substring(ridx + 1);
+ ridx += rest2.indexOf("\n") + 1;
+ c = rest.charAt(ridx - 1);
+ }
+ text = str.substring(idx, idx + ridx);
+ FilePart fp = new FilePart(text, FilePart.DIRECTIVE);
+ parts.add(fp);
+ idx += text.length();
+
+ } else if (rest.startsWith("}")) {
+ if (scopedepth <= 0) //Tuscany need to increase scopedepth for
+ // namespaces?
+ Utils.rude("Braces do not match", name, lineNo(str, idx),
+ rest.substring(0, rest.indexOf("\n")));
+ else
+ scopedepth--;
+ // TODO: better checking that this brace really ends the class
+ if (0 == scopedepth)
+ currentClass = null;
+ scope = "public";
+ parts.add(new FilePart("}", FilePart.ENDSCOPE));
+ idx++;
+
+ } else if (rest.startsWith(";")) {
+ parts.add(new FilePart(";", FilePart.FIELD));
+ idx++;
+
+ } else if (!Character.isLetter(rest.charAt(0))
+ && '~' != rest.charAt(0) && '_' != rest.charAt(0)) {
+ Utils.rude("Lines must start with a letter ", name, lineNo(str,
+ idx), rest.substring(0, rest.indexOf("\n")));
+
+ } else if (MacroPart.isAMacro(rest)) {
+ MacroPart mp = MacroPart.create(rest);
+ parts.add(mp);
+ idx += mp.length();
+
+ } else if (beginsScope(rest)) {
+
+ //Tuscany a namespace comes in here
+ scopedepth++;
+ text = rest.substring(0, Utils.indexOf(rest, "{") + 1);
+ FilePart fp = new FilePart(text, FilePart.BEGINSCOPE);
+ parts.add(fp);
+ idx += text.length();
+ if (Utils.startsWith(text, "class")) {
+ // TODO: cope with comments here
+ // TODO: split out classes into a ClassPart
+ StringTokenizer st = new StringTokenizer(text,
+ Utils.whitespace + ":");
+ st.nextToken(); // step over "class"
+ while (st.hasMoreTokens()) {
+ String word = st.nextToken();
+ if (Configuration.isAttribute(word))
+ continue;
+ currentClass = word;
+ break;
+ }
+ }
+
+ //Tuscany
+ if (Utils.startsWith(text, "namespace")) {
+ // TODO: cope with comments here
+ StringTokenizer st = new StringTokenizer(text,
+ Utils.whitespace + "{");
+ st.nextToken(); // step over "namespace"
+ String word = "";
+ while (st.hasMoreTokens()) {
+ word = st.nextToken();
+ if (word.equals("{")) {
+ break;
+ }
+
+ }
+
+ if(currentNamespace == null)
+ {
+ currentNamespace = word;
+ }
+ else
+ {
+ currentNamespace += "::" + word;
+ }
+ //We have not got to the class yet
+ //so will need ot deal with the namespace
+ //when we do
+ }
+ // Tuscany end
+
+ } else if (isEnumOrUnion(rest)) {
+ int ridx = Utils.findMatching(rest, '{', '}') + 1;
+ String rest2 = rest.substring(ridx);
+ ridx = idx + ridx + Utils.indexOf(rest2, ';') + 1;
+ text = str.substring(idx, ridx);
+ FilePart fp = new FilePart(text, FilePart.ENUM);
+ parts.add(fp);
+ idx += text.length();
+
+ } else if (scopedepth > 0
+ && (rest.startsWith("public")
+ || rest.startsWith("protected") || rest
+ .startsWith("private"))) {
+ int colon = rest.indexOf(":");
+ if (-1 == colon)
+ Utils.rude("No colon found after public or private ", name,
+ lineNo(str, idx), rest.substring(0, rest
+ .indexOf("\n")));
+ scope = str.substring(idx, idx + colon);
+ text = str.substring(idx, idx + colon + 1);
+ FilePart fp = new FilePart(text, FilePart.CLASSATTRIBUTE);
+ parts.add(fp);
+ idx += text.length();
+
+ } else if (Utils.startsWith(rest, "typedef")) {
+ int semicolon = Utils.indexOf(rest, ';');
+ int brace = Utils.indexOf(rest, '{');
+
+ if (-1 == semicolon)
+ Utils.rude("No semicolon found after typedef", name,
+ lineNo(str, idx), rest.substring(0, rest
+ .indexOf("\n")));
+
+ if (-1 == brace || semicolon < brace) {
+ // Simple typedef
+ text = str.substring(idx, idx + semicolon + 1);
+ } else {
+ // Typedef of a struct, etc
+ int endbrace = Utils.findMatching(rest, '{', '}');
+ String rest2 = rest.substring(endbrace);
+ semicolon = Utils.indexOf(rest2, ';');
+ text = str.substring(idx, idx + endbrace + semicolon + 1);
+ }
+ FilePart fp = new FilePart(text, FilePart.TYPEDEF);
+ parts.add(fp);
+ idx += text.length();
+
+ } else {
+ if (isMethod(rest)) {
+
+ int brace = Utils.indexOf(rest, '{');
+ Signature signature = new Signature(str.substring(idx, idx
+ + brace));
+ if (signature.failed())
+ Utils.rude("Signature parsing failed", name, lineNo(
+ str, idx), signature.getOriginal());
+ if (null != currentClass
+ && null == signature.getClassName())
+ signature.setClassName(currentClass);
+ signature.setScope(scope);
+ signature.setNamespace(currentNamespace);
+
+ String body = rest.substring(brace);
+ int endBrace = Utils.findMatching(body, '{', '}');
+ body = body.substring(0, endBrace + 1);
+ int endIdx = idx + signature.originalLength()
+ + body.length();
+ text = str.substring(idx, endIdx);
+ MethodPart mp = new MethodPart(text, signature, body);
+ parts.add(mp);
+ idx += text.length();
+
+ } else if (isField(rest)) {
+ int semicolon = Utils.indexOf(rest, ';');
+ text = str.substring(idx, idx + semicolon + 1);
+ FilePart fp = new FilePart(text, FilePart.FIELD);
+ parts.add(fp);
+ idx += text.length();
+
+ } else if (isPrototype(rest)) {
+ int semicolon = Utils.indexOf(rest, ';');
+ text = str.substring(idx, idx + semicolon + 1);
+ PrototypePart pp = new PrototypePart(text, currentClass, currentNamespace);
+ pp.setScope(scope);
+ parts.add(pp);
+ idx += text.length();
+
+ } else {
+ //TODO other file parts here - not sure if there are any
+ // others?
+ Utils.rude("Unrecognised file part", name,
+ lineNo(str, idx), rest.substring(0, rest
+ .indexOf("\n")));
+ } // end if
+ } // end if
+ } // end for
+ }
+
+ public Iterator getPartIterator() {
+ return parts.iterator();
+ }
+
+ private int lineNo(String s, int idx) {
+ int n = 0;
+ for (int i = 0; i < idx && i < s.length(); i++)
+ if ('\n' == s.charAt(i))
+ n++;
+ return n;
+ }
+
+ /**
+ * Find out whether we are defining a class, struct or extern "C" which may
+ * contain function implementations. These will have braces which begin a
+ * new scope. Ignore function prototypes that return a struct. struct mystr {
+ * int f1; }; struct mystr func(); struct mystr func() { struct mystr a;
+ * return a; }
+ */
+ private static boolean beginsScope(String s) throws ParsingException {
+ if (isMethod(s))
+ return false;
+
+ int brace = Utils.indexOf(s, '{');
+ int semicolon = Utils.indexOf(s, ';');
+
+ // Return false for class prototypes, but true for class definitions.
+ if (Utils.startsWith(s, "class")) {
+ if (-1 == brace)
+ return false;
+ if (-1 == semicolon)
+ return true;
+ return brace < semicolon;
+ }
+
+ if (Utils.startsWith(s, "struct")) {
+ if (-1 == brace || -1 == semicolon)
+ return false;
+ return brace < semicolon;
+ }
+
+ //Tuscany handle namespace for prototypes
+ //in a similar way to "class"
+ if (Utils.startsWith(s, "namespace")) {
+ if (-1 == brace || -1 == semicolon)
+ return false;
+ return brace < semicolon;
+ }
+
+ return startsWithExternScope(s);
+ }
+
+ /**
+ * There are 4 types of extern ... extern int field; extern int func();
+ * extern "C" int func() { return 2; } extern "C" { int func() { return 2; } }
+ * This method should return true only for the last of these three examples
+ * since only the last one creates a new scope using braces.
+ */
+ private static boolean startsWithExternScope(String s)
+ throws ParsingException {
+ if (!s.startsWith("extern"))
+ return false;
+
+ int brace = Utils.indexOf(s, '{');
+ int semicolon = Utils.indexOf(s, ';');
+ int bracket = Utils.indexOf(s, '(');
+
+ if (-1 == brace)
+ return false;
+ return (-1 == semicolon || brace < semicolon)
+ && (-1 == bracket || brace < bracket);
+ }
+
+ /**
+ * Find out whether we are defining an enum or union which will contain
+ * braces. Ignore function prototypes that return an enum or union. enum
+ * colour { red, blue }; enum colour func(); enum colour func() { return
+ * colour.red; }
+ */
+ private static boolean isEnumOrUnion(String s) throws ParsingException {
+ if ((!Utils.startsWith(s, "enum") && !Utils.startsWith(s, "union"))
+ || isMethod(s))
+ return false;
+
+ int brace = Utils.indexOf(s, '{');
+ int semicolon = Utils.indexOf(s, ';');
+ return -1 != brace && (-1 == semicolon || brace < semicolon);
+ }
+
+ /**
+ * Rules to recognise fields and methods...
+ *
+ * Fields must contain a semicolon Methods may or may not contain a
+ * semicolon Prototypes must contain a semicolon Fields may or may not
+ * contain a brace (array initialisers do) Methods must contain a brace
+ * Prototypes must not contain a brace Fields may or may not contain a
+ * bracket (casts do) Methods must contain a bracket Prototypes must contain
+ * a bracket
+ *
+ * It's a method if it contains a bracket and then a brace before the first
+ * semicolon (if there is a semicolon). It's a prototype if it's not a
+ * method and it contains brackets before a semicolon. It's a field if it's
+ * not a method or a prototype and it contains a semicolon. If it's not a
+ * field, a method or a prototype and we haven't recognised it previously
+ * then it's an error.
+ */
+ private static boolean isMethod(String s) throws ParsingException {
+ int semicolon = Utils.indexOf(s, ';');
+ int brace = Utils.indexOf(s, '{');
+ int bracket = Utils.indexOf(s, '(');
+
+ return (-1 != bracket && -1 != brace && bracket < brace && (-1 == semicolon || brace < semicolon));
+ }
+
+ private static boolean isPrototype(String s) throws ParsingException {
+ int semicolon = Utils.indexOf(s, ';');
+ int bracket = Utils.indexOf(s, '(');
+ return !isMethod(s) && -1 != semicolon && -1 != bracket
+ && bracket < semicolon;
+ }
+
+ private static boolean isField(String s) throws ParsingException {
+ int semicolon = Utils.indexOf(s, ';');
+ return !isMethod(s) && !isPrototype(s) && -1 != semicolon;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String toString() {
+ StringBuffer text = new StringBuffer();
+ for (int i = 0; i < parts.size(); i++) {
+ text.append(((FilePart) (parts.get(i))).toString());
+ }
+ return text.toString();
+ }
+
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MacroPart.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MacroPart.java
new file mode 100644
index 0000000000..813de0ff56
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MacroPart.java
@@ -0,0 +1,82 @@
+/*
+ *
+ * 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.
+ */
+
+/*
+ * Branched from the original class that was also contributed to the
+ * org.apache.axis.tools.common package.
+ */
+
+/*
+ * A C or C++ macro as it is used in the source code
+ */
+package org.apache.tuscany.sca.cpp.tools.common;
+
+class MacroPart extends FilePart {
+ /**
+ * Factory method to create a MacroPart.
+ *
+ * @param s
+ * unparsed source code which may start with a define or macro.
+ */
+ static MacroPart create(String s) {
+ String orig = getOriginalText(s);
+ if (null == orig)
+ return null;
+ return new MacroPart(orig);
+ }
+
+ MacroPart(String s) {
+ super(s, FilePart.MACRO);
+ }
+
+ /**
+ * @param s
+ * unparsed source code which may start with a define or macro.
+ * @return all of s up to the end of the define or macro.
+ */
+ private static String getOriginalText(String s) {
+ String name = getName(s);
+ int len = name.length();
+ if (null == name)
+ return null;
+ else if (Configuration.isDefine(name)) {
+ return s.substring(0, len);
+ } else if (Configuration.isMacro(name)) {
+ String rest = s.substring(len);
+ len += Utils.findMatching(rest, '(', ')');
+ return s.substring(0, len + 1);
+ } else
+ return null;
+ }
+
+ static boolean isAMacro(String s) {
+ if (s == null || 0 == s.length())
+ return false;
+ String name = getName(s);
+ return Configuration.isMacro(name) || Configuration.isDefine(name);
+ }
+
+ private static String getName(String s) {
+ int i;
+ for (i = 0; i < s.length(); i++)
+ if (!Character.isLetterOrDigit(s.charAt(i)) && '_' != s.charAt(i))
+ break;
+ if (s.length() == i)
+ return null;
+ return s.substring(0, i);
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MethodPart.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MethodPart.java
new file mode 100644
index 0000000000..facebe84ef
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/MethodPart.java
@@ -0,0 +1,128 @@
+/*
+ *
+ * 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.
+ */
+
+/*
+ * Branched from the original class that was also contributed to the
+ * org.apache.axis.tools.common package.
+ */
+package org.apache.tuscany.sca.cpp.tools.common;
+
+import java.util.ArrayList;
+
+/**
+ * A C or C++ method from a piece of source code. The method has a signature and
+ * a body (the bit between the braces).
+ */
+public class MethodPart extends FilePart {
+ private Signature signature;
+
+ private String body;
+
+ MethodPart(String s, Signature signature, String body) {
+ super(s, METHOD);
+ this.signature = signature;
+ this.body = body;
+ }
+
+ public Signature getSignature() {
+ return signature;
+ }
+
+ public String getOriginalSignature() {
+ return signature.getOriginal();
+ }
+
+ /**
+ * Returns the method body as code snippets, each ending with a place where
+ * a trace statement belongs. The end of the first code snippet is where the
+ * entry trace should go. The end of every other snippet is a return from
+ * the method.
+ */
+ public BodyPart[] getBodyParts() throws ParsingException {
+ String b = body; // Don't alter field member
+ if (b.startsWith("{"))
+ b = b.substring(1);
+
+ // Add in trace exit at all the return statements in the method.
+ ArrayList al = new ArrayList();
+ int idxR = Utils.indexOf(b, "return");
+ int idxC = Utils.indexOf(b, "catch");
+ while (-1 != idxR || -1 != idxC) {
+ if (-1 == idxC || (-1 != idxR && idxR < idxC)) {
+ String frag = b.substring(0, idxR);
+ String rest = b.substring(idxR + "return".length());
+
+ int semicolon = Utils.indexOf(rest, ';');
+ if (-1 == semicolon)
+ Utils.rude("Missing semicolon in " + signature);
+ String retVal = rest.substring(0, semicolon);
+ BodyPart bp = new BodyPart(frag, retVal);
+ al.add(bp);
+ b = b.substring(idxR + "return".length() + retVal.length() + 1);
+ } else {
+ String frag = b.substring(0, idxC);
+ String rest = b.substring(idxC);
+
+ int brace = Utils.indexOf(rest, "{");
+ if (-1 == brace)
+ Utils.rude("Missing open brace in " + signature);
+ Signature signature = new Signature(rest.substring(0, brace));
+ frag = frag + rest.substring(0, brace + 1);
+ BodyPart bp = new BodyPart(frag, signature.getParameters()[0]);
+ al.add(bp);
+ b = rest.substring(brace + 1);
+ }
+ idxR = Utils.indexOf(b, "return");
+ idxC = Utils.indexOf(b, "catch");
+ }
+
+ // Add in trace exit before the last } if there are no returns in
+ // the method or there is code after the last return and the method
+ // returns void.
+ // int f1(){try{return f2();}catch(Exception& e){throw;}}
+ // has code after the last return but having a traceexit before the
+ // last brace wouldn't compile since the method returns an int. We
+ // cope with this by only adding in a traceexit before the last brace
+ // if the method returns void. That may mean we add in an unreachable
+ // traceexit which may give a compiler warning, but that should be
+ // benign.
+ //
+ // TODO: Not quite good enough for
+ // void f(int a){if(a){printf("a");}else{printf("!a");return;}}
+ // as a trace exit is needed before the last } in case a>0 but
+ // void f(int a){if(a){printf("a");return;}else{printf("!a");return;}}
+ // would give compiler warnings about unreachable code if a trace
+ // exit is added before the last brace. This could be tricky to fix.
+ if ((0 == al.size() || -1 != Utils.indexOf(b, ';'))
+ && null == signature.getReturnType().getType()) {
+
+ int last = b.lastIndexOf('}');
+ if (-1 == last)
+ Utils.rude("Missing end brace in " + signature);
+ String b2 = b.substring(0, last);
+ al.add(new BodyPart(b2));
+ b = b.substring(last);
+ }
+
+ // The final body part is the last }
+ al.add(new BodyPart(b));
+
+ BodyPart[] bps = new BodyPart[al.size()];
+ System.arraycopy(al.toArray(), 0, bps, 0, al.size());
+ return bps;
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Options.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Options.java
new file mode 100644
index 0000000000..dc9d941849
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Options.java
@@ -0,0 +1,159 @@
+/*
+ *
+ * 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.
+ */
+
+/*
+ * Branched from the original class that was also contributed to the
+ * org.apache.axis.tools.common package.
+ *
+ */
+package org.apache.tuscany.sca.cpp.tools.common;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * Command line options passed to a tool's main program. All command line
+ * options should begin with a dash "-". Some command line options take a value
+ * which is the next parameter after the option. Others do not.
+ */
+public class Options {
+ static HashMap pairs = new HashMap();
+
+ static List values = new ArrayList();
+
+ /**
+ * No one constructs this class.
+ */
+ private Options() {
+ }
+
+ public static void reset() {
+ pairs = new HashMap();
+ values = new ArrayList();
+ }
+
+ /**
+ * Initialises the options based on the args passed to main
+ */
+ public static void set(String args[]) {
+ for (int i = 0; i < args.length; i++) {
+ if (args[i].startsWith("-")) {
+ if ((i + 1 <= args.length - 1) && // next one is testable
+ !args[i + 1].startsWith("-") // and it starts with a "-"
+ ) {
+ String key = args[i];
+ Object pairValue = pairs.get(key);
+ if (null == pairValue) {
+ pairs.put(args[i], args[i + 1]);
+ } else if (pairValue instanceof String) {
+ List l = new ArrayList();
+ l.add(pairValue);
+ l.add(args[i + 1]);
+ pairs.put(key, l);
+ } else if (pairValue instanceof List) {
+ ((List) pairValue).add(args[i + 1]);
+ }
+ i++; // Step over value for this key
+ } else
+ values.add(args[i]);
+ }
+ }
+ }
+
+ public static Object getOption(String key) {
+ return pairs.get(key);
+ }
+
+ static boolean isOptionSet(String key) {
+ return values.contains(key) || null!=pairs.get(key);
+ }
+
+ /**
+ * This option will cause scagen to print out messages
+ * about the artefacts it is processing
+ * @return
+ */
+ public static boolean verbose() {
+ return isOptionSet("-verbose");
+ }
+
+ /**
+ * This option will cause scagen to print out some
+ * basic internal log type messages
+ * @return
+ */
+ public static boolean debug() {
+ return isOptionSet("-debug");
+ }
+
+ /**
+ * This option will cause scagen to print out some
+ * text that can be used or pasted into a command
+ * file to copy all the relevant artefacts from
+ * where they are found or generated to a specific
+ * deployment location
+ *
+ * @return
+ */
+ public static boolean deploy() {
+ return isOptionSet("-deploy");
+ }
+
+ /**
+ * This option will prevent scagen from actually writing out
+ * the generated files. It is useful if used in conjunction
+ * with the "-deploy" option.
+ * @return
+ */
+ public static boolean noGenerate() {
+ return isOptionSet("-nogenerate");
+ }
+
+ /**
+ * This option is useful only when used in conjunction with
+ * the "-deploy" option. It changes the output to be more like the
+ * source code of a command script to copy the files to a
+ * specific place.
+ * @return
+ */
+ public static boolean outputCommand() {
+ return isOptionSet("-outputCommand");
+ }
+
+ /**
+ * This option is useful only when used in conjunction with
+ * the "-deploy" option. It changes the output to be a simple
+ * list of artefacts. It has no effect if the "-outputCommand"
+ * option is set.
+ *
+ * @return
+ */
+ public static boolean list() {
+ return isOptionSet("-list");
+ }
+
+ /**
+ * This option is maintained for compatibility with the
+ * original package source. It is not used by new scagen code.
+ *
+ * @return
+ */
+ public static boolean quiet() {
+ return isOptionSet("-quiet");
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Parameter.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Parameter.java
new file mode 100644
index 0000000000..3f4b3e971e
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Parameter.java
@@ -0,0 +1,211 @@
+/*
+ *
+ * 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.
+ */
+
+/*
+ * Branched from the original class that was also contributed to the
+ * org.apache.axis.tools.common package.
+ *
+ */
+package org.apache.tuscany.sca.cpp.tools.common;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * A parameter from a method signature. The parameter is the datatype plus its
+ * name but not its value.
+ */
+public class Parameter {
+ private ArrayList type = new ArrayList();
+
+ private String name = null;
+
+ private boolean failed = false;
+
+ /**
+ * Defaults to a parameter in a parameter list so it HAS a parameter name in
+ * it
+ */
+ Parameter(List parts) {
+ this(parts, false);
+ }
+
+ /**
+ * A parameter which is a return type does not have a parameter name.
+ * Parameters in a parameter list do have parameter names embedded in them
+ */
+ Parameter(List parts, boolean isRetType) {
+ if (parts == null || parts.size() == 0)
+ return;
+
+ // Tuscany: The original code below from apache axis blocks int
+ // getCustomer(long)
+ // i.e. no spaces in parameter list.
+ // We do not need to deal with "..." as parameters to SCS methods.
+ //
+ // if (!isRetType && parts.size() == 1) {
+ // if ("...".equals(parts.get(0))) {
+ // type.add("...");
+ // name = "";
+ // } else if (!"void".equals(parts.get(0)))
+ // failed = true; // Seems like bad C++ code here
+ // return;
+ // }
+
+ if (isRetType) {
+ Iterator it = parts.iterator();
+ while (it.hasNext())
+ type.add(it.next());
+
+ // Some methods return have void on their signature and others
+ // have nothing. So to make them both the same, if a method
+ // doesn't return anything make type null.
+ // TODO: This assumption is wrong - methods that return nothing
+ // default to returning an int!
+ if (1 == type.size() && "void".equals(type.get(0)))
+ type = new ArrayList();
+
+ } else {
+ // Cope with array subscripts [] after the name
+ int arrIdx = -1;
+ for (int i = 0; i < parts.size(); i++) {
+ String tok = (String) parts.get(i);
+ if ("[".equals(tok)) {
+ arrIdx = i;
+ break;
+ }
+ }
+
+ // Find the name
+ int nameIdx = parts.size() - 1;
+ if (-1 != arrIdx)
+ nameIdx = arrIdx - 1;
+
+ // Even in real method declarations, parameters may not have a name
+ boolean noName = false;
+ name = (String) parts.get(nameIdx);
+ // Tuscany: The original code below from apache axis
+ // was updated to work with signatures of
+ // the form fn(int) a non-named, no-space, parameter list.
+ // if (Utils.cPrimitives.contains(name) ||
+ // Utils.cTypeQualifiers.contains(name) )
+ //
+ if (Utils.cPrimitives.contains(name)
+ || Utils.cTypeQualifiers.contains(name)
+ || parts.size() == 1)
+ noName = true;
+
+ if (noName) {
+ name = null;
+ for (int i = 0; i < parts.size(); i++)
+ type.add(parts.get(i));
+ } else {
+ // Construct the type
+ for (int i = 0; i < nameIdx; i++)
+ type.add(parts.get(i));
+
+ if (-1 != arrIdx)
+ for (int i = arrIdx; i < parts.size(); i++)
+ type.add(parts.get(i));
+ }
+ }
+ }
+
+ public boolean failed() {
+ return failed;
+ }
+
+ public String getType() {
+ String s = null;
+ Iterator it = type.iterator();
+ while (it.hasNext()) {
+ String next = (String) it.next();
+ if (null == s)
+ s = next;
+ else if ("*".equals(next) || "&".equals(next))
+ s += next;
+ else
+ s += " " + next;
+ }
+ return s;
+ }
+
+ public String getTypeWithoutConst() {
+ String s = null;
+ Iterator it = type.iterator();
+ while (it.hasNext()) {
+ String next = (String) it.next();
+ if ("const".equals(next))
+ continue;
+ else if (null == s)
+ s = next;
+ else if ("*".equals(next) || "&".equals(next))
+ s += next;
+ else
+ s += " " + next;
+ }
+ return s;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public boolean isVoid() {
+ return 0 == type.size();
+ }
+
+ public boolean isDotDotDot() {
+ return 1 == type.size() && "...".equals(type.get(0));
+ }
+
+ /**
+ * For two parameters to match their types must match or both be null, but
+ * the parameters names don't have to match. Just because a parameter is
+ * called something different in a header file as in the the source file
+ * doesn't mean it's a different parameter.
+ */
+ public boolean equals(Object o) {
+ if (null == o || !(o instanceof Parameter))
+ return false;
+ Parameter that = (Parameter) o;
+ if (type.size() != that.type.size())
+ return false;
+ for (int i = 0; i < type.size(); i++) {
+ String s1 = (String) type.get(i);
+ String s2 = (String) that.type.get(i);
+ if (!Utils.safeEquals(s1, s2))
+ return false;
+ }
+ return true;
+ }
+
+ public String toString() {
+ if (0 == type.size())
+ return "void";
+ if (null == name)
+ return getType();
+ return getType() + " " + name;
+ }
+
+ public Iterator iterator() {
+ if (null == type)
+ return null;
+ return type.iterator();
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/ParsingException.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/ParsingException.java
new file mode 100644
index 0000000000..3f140c0f9f
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/ParsingException.java
@@ -0,0 +1,42 @@
+/*
+ *
+ * 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.
+ */
+
+/*
+ * Branched from the original class that was also contributed to the
+ * org.apache.axis.tools.common package.
+ *
+ */
+package org.apache.tuscany.sca.cpp.tools.common;
+
+public class ParsingException extends Exception {
+
+ public ParsingException() {
+ super();
+ }
+
+ public ParsingException(String message) {
+ super(message);
+ }
+
+ public ParsingException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public ParsingException(Throwable cause) {
+ super(cause);
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.java
new file mode 100644
index 0000000000..64ed2e9542
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/PrototypePart.java
@@ -0,0 +1,51 @@
+/*
+ *
+ * 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.
+ */
+
+/*
+ * Branched from the original class that was also contributed to the
+ * org.apache.axis.tools.common package.
+ *
+ */
+package org.apache.tuscany.sca.cpp.tools.common;
+
+/**
+ * A function prototype in an include file and possibly in a class definition.
+ */
+public class PrototypePart extends FilePart {
+ private Signature signature;
+
+ public PrototypePart(String s, String className, String namespace) {
+ super(s, PROTOTYPE);
+ signature = new Signature(s);
+ if (null != className)
+ signature.setClassName(className);
+ if (null != namespace && namespace.length()>0)
+ signature.setNamespace(namespace);
+ }
+
+ String className() {
+ return signature.getClassName();
+ }
+
+ public Signature getSignature() {
+ return signature;
+ }
+
+ public void setScope(String scope) {
+ signature.setScope(scope);
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Signature.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Signature.java
new file mode 100644
index 0000000000..3650839cab
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Signature.java
@@ -0,0 +1,501 @@
+/*
+ *
+ * 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.
+ */
+
+/*
+ * Branched from the original class that was also contributed to the
+ * org.apache.axis.tools.common package.
+ *
+ */
+package org.apache.tuscany.sca.cpp.tools.common;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * A C or C++ method signature with the ability to parse it. TODO: properly
+ * support variable length argument lists using "..." TODO: passing or returning
+ * function pointers (hopefully not needed) TODO: Cope with ~ <space>Classname()
+ */
+public class Signature {
+ private String originalText;
+
+ private String attributes;
+
+ private String className = null;
+
+ private String namespace = null;
+
+ private String methodName = null;
+
+ private Parameter returnType = null;
+
+ private Parameter[] params = null;
+
+ private String trailingAttributes;
+
+ private String scope = "public";
+
+ private boolean failed = false;
+
+ private boolean traceable = true;
+
+ private final static Set knownAttrs = new HashSet(Arrays
+ .asList(new Object[] { "public", "private", "extern", "\"C\"",
+ "virtual", "static", "inline" }));
+
+ private final static Set specialOperators = new HashSet(
+ Arrays.asList(new Object[] { "(", ")", "*", ",", "&", "]", "[",
+ "=", "~" }));
+
+ /**
+ * Takes an unparsed signature string and parses it.
+ *
+ * TODO: Should optionally pass in the className here in case it's an inline
+ * method implementation inside the class{}. Just so the className comes out
+ * in the trace.
+ */
+ Signature(String s) {
+ originalText = s;
+
+ try {
+ List tokens = tokenise(s);
+
+ ArrayList alAttrs = new ArrayList();
+ ArrayList alName = new ArrayList();
+ ArrayList alParms = new ArrayList();
+ ArrayList alTrailAttrs = new ArrayList();
+ ArrayList alInits = new ArrayList();
+ if (!splitUp(tokens, alAttrs, alName, alParms, alTrailAttrs,
+ alInits)) {
+ failed = true;
+ return;
+ }
+
+ parseAttributes(alAttrs);
+ parseNameAndRetType(alName);
+ parseParameters(alParms);
+ parseTrailingAttributes(alTrailAttrs);
+
+ // Ignore any tokens after the ) since these are (hopefully)
+ // constructor initialisers
+
+ traceable = !Configuration.methodExcluded(className, methodName);
+ } catch (NullPointerException npe) {
+ failed = true;
+ traceable = false;
+ }
+ }
+
+ /**
+ * Parse the signature into tokens. This removes whitespace and comments and
+ * separates out "*", ",", "(", ")", "&", "[" and "]".
+ */
+ private static List tokenise(String s) {
+ ArrayList tokens = new ArrayList();
+ String tok = null;
+ boolean space = true;
+ for (int i = 0; i < s.length(); i++) {
+ char c = s.charAt(i);
+ if (Character.isWhitespace(c)) {
+ space = true;
+ continue;
+ }
+ if (space) {
+ if (tok != null)
+ tokens.add(tok);
+ tok = "" + c;
+ } else
+ tok += c;
+ space = false;
+
+ if (tok.endsWith("/*")) {
+ String sub = s.substring(i);
+ int endcomm = sub.indexOf("*/");
+ if (endcomm == -1)
+ break;
+ i += endcomm + 1;
+ if (tok.equals("/*"))
+ tok = "";
+ else
+ tok = tok.substring(0, tok.length() - 2);
+ continue;
+ }
+
+ if (tok.endsWith("//")) {
+ String sub = s.substring(i);
+ int endcomm = sub.indexOf("\n");
+ if (endcomm == -1)
+ break;
+ i += endcomm;
+ if (tok.equals("//"))
+ tok = "";
+ else
+ tok = tok.substring(0, tok.length() - 1);
+ continue;
+ }
+
+ if (tok.endsWith("::"))
+ space = true;
+
+ String sc = "" + c;
+ if (specialOperators.contains(sc)) {
+ if (!tok.equals(sc)) {
+ tokens.add(tok.substring(0, tok.length() - 1));
+ tok = sc;
+ }
+ space = true;
+ }
+ }
+ tokens.add(tok);
+ return tokens;
+ }
+
+ /**
+ * Split up a tokenised method signature into a list of attributes, a list
+ * of name and return type tokens, a list of parameter tokens and a list of
+ * initialiser tokens.
+ */
+ private static boolean splitUp(List tokens, List attrs, List nameAndRet,
+ List parms, List trailAttrs, List inits) {
+
+ // nameStart points to the start of the return type if there is one
+ // else the start of the method name
+ int nameStart;
+ for (nameStart = 0; nameStart < tokens.size(); nameStart++) {
+ String tok = (String) (tokens.get(nameStart));
+ if (!knownAttrs.contains(tok) && !Configuration.isAttribute(tok))
+ break;
+ }
+ if (nameStart == tokens.size())
+ return false;
+
+ // initStart points to the initialisers, or thrown exceptions after
+ // the parameter list. throw is a keyword so we can safely search for
+ // it.
+ int initStart = tokens.size();
+ for (int i = nameStart; i < tokens.size(); i++) {
+ String tok = (String) tokens.get(i);
+ if ((tok.startsWith(":") && !tok.startsWith("::"))
+ || "throw".equals(tok))
+ initStart = i;
+ }
+
+ int parmEnd;
+ for (parmEnd = initStart - 1; parmEnd > nameStart; parmEnd--)
+ if (")".equals(tokens.get(parmEnd)))
+ break;
+ if (parmEnd == nameStart)
+ return false;
+
+ int parmStart = parmEnd;
+ for (parmStart = parmEnd; parmStart > nameStart; parmStart--)
+ if ("(".equals(tokens.get(parmStart)))
+ break;
+
+ for (int i = 0; i < tokens.size(); i++) {
+ Object tok = tokens.get(i);
+ if (i < nameStart || Configuration.isAttribute((String) tok))
+ attrs.add(tok);
+ else if (i < parmStart)
+ nameAndRet.add(tok);
+ else if (i <= parmEnd)
+ parms.add(tok);
+ else if (i < initStart)
+ trailAttrs.add(tok);
+ else
+ inits.add(tok);
+ }
+ return true;
+ }
+
+ private void parseAttributes(List list) {
+ attributes = new String();
+ Iterator it = list.iterator();
+ while (it.hasNext()) {
+ if (attributes.length() > 0)
+ attributes += " ";
+ String next = (String) it.next();
+
+ //Tuscancy
+ //the scope is not present in the attributes
+ //but is set later in the InputCppSource contructor
+ if ("public".equals(next) || "protected".equals(next)
+ || "private".equals(next))
+ scope = next;
+ attributes += next;
+ }
+ }
+
+ private void parseNameAndRetType(List list) {
+ int size = list.size();
+ int idx;
+ // "operator" is a key word so if it's present we know we're
+ // dealing with operator overloading. The operator that's been
+ // overloaded might have been split up into multiple tokens.
+ for (idx = 0; idx < size; idx++)
+ if ("operator".equals(list.get(idx)))
+ break;
+
+ if (idx < size) {
+ methodName = "";
+ for (int i = idx; i < size; i++)
+ methodName += (String) list.get(i);
+ } else { // No operator overloading
+ methodName = "" + list.get(size - 1);
+ idx = size - 1;
+ }
+
+ // If it's a destructor, the "~" will be split out into a separate
+ // token, so add it onto the methodName here.
+ if (idx > 0 && "~".equals(list.get(idx - 1))) {
+ methodName = "~" + methodName;
+ idx--;
+ }
+
+ // The class name comes before the method name
+ while (idx > 0 && ((String) list.get(idx - 1)).endsWith("::")) {
+ if (null == className)
+ className = (String) list.get(idx - 1);
+ else
+ className = (String) list.get(idx - 1) + className;
+ idx--;
+ }
+
+ // Whatever's left before the classname/methodname must be the
+ // return type
+ ArrayList retParm = new ArrayList();
+ for (int i = 0; i < idx; i++)
+ retParm.add(list.get(i));
+
+ returnType = new Parameter(retParm, true);
+ }
+
+ /**
+ * Constructs the parameter list
+ */
+ private void parseParameters(List list) {
+ ArrayList alParams = new ArrayList();
+ Iterator it = list.iterator();
+ String token = (String) it.next(); // step over the (
+ while (it.hasNext() && !")".equals(token)) {
+ token = (String) it.next();
+
+ int template = 0; // Depth of template scope
+ boolean foundEquals = false;
+ // Ignore default value for an optional parameter
+ ArrayList parm = new ArrayList();
+ while (!token.equals(")") && (!token.equals(",") || template > 0)) {
+ if (token.equals("="))
+ foundEquals = true;
+ if (!foundEquals)
+ parm.add(token);
+ if (contains(token, "<"))
+ template++;
+ if (contains(token, ">"))
+ template--;
+ token = (String) it.next();
+ }
+
+ // No parameters so break out
+ if (token.equals(")") && 0 == parm.size())
+ break;
+
+ Parameter p = new Parameter(parm);
+ if (p.failed()) {
+ failed = true;
+ return;
+ }
+
+ // Copes with void func(void)
+ if (!p.isVoid())
+ alParams.add(p);
+ }
+
+ int size = alParams.size();
+ if (size > 0) {
+ params = new Parameter[size];
+ System.arraycopy(alParams.toArray(), 0, params, 0, size);
+ }
+ }
+
+ private void parseTrailingAttributes(List list) {
+ trailingAttributes = new String();
+ Iterator it = list.iterator();
+ while (it.hasNext()) {
+ if (trailingAttributes.length() > 0)
+ trailingAttributes += " ";
+ trailingAttributes += (String) it.next();
+ }
+ }
+
+ public String getOriginal() {
+ return originalText;
+ }
+
+ public int originalLength() {
+ return originalText.length();
+ }
+
+ public boolean failed() {
+ return failed;
+ }
+
+ public String getAttributes() {
+ return attributes;
+ }
+
+ public String getClassName() {
+ return className;
+ }
+
+ /**
+ * @param namespace The namespace to set.
+ */
+ public void setNamespace(String namespace) {
+ this.namespace = namespace;
+ }
+
+ /**
+ * @return Returns the namespace.
+ */
+ public String getNamespace() {
+ return namespace;
+ }
+
+ public String getTrimClassName() {
+ return trimClassName(className);
+ }
+
+ public String getMethodName() {
+ return methodName;
+ }
+
+ public Parameter getReturnType() {
+ return returnType;
+ }
+
+ public Parameter[] getParameters() {
+ return params;
+ }
+
+ public boolean isConstructor() {
+ return className != null && methodName != null
+ && trimClassName(className).equals(methodName);
+ }
+
+ public boolean isDestructor() {
+ return className != null && methodName != null
+ && methodName.startsWith("~")
+ && methodName.endsWith(trimClassName(className));
+ }
+
+ private static String trimClassName(String name) {
+ if (name.endsWith("::"))
+ return name.substring(0, name.length() - 2);
+ return name;
+ }
+
+ void setClassName(String className) {
+ if (null == className)
+ return;
+ if (!className.endsWith("::"))
+ className += "::";
+ this.className = className;
+ }
+
+ public String getScope() {
+ return scope;
+ }
+
+ /**
+ * Sets the scope, but only if the scope is not set by an explicit attribute
+ * in the signature.
+ */
+ public void setScope(String scope) {
+ if (-1 == attributes.indexOf(this.scope))
+ this.scope = scope;
+ }
+
+ /**
+ * Should this method be traced?
+ */
+ public boolean traceable() {
+ return traceable;
+ }
+
+ private static boolean contains(String src, String tgt) {
+ if (src == null || tgt == null)
+ return false;
+ if (-1 == src.indexOf(tgt))
+ return false;
+ return true;
+ }
+
+ public boolean equals(Object obj) {
+ if (null == obj || !(obj instanceof Signature))
+ return false;
+ Signature that = (Signature) obj;
+ if (!Utils.safeEquals(className, that.className))
+ return false;
+ if (!Utils.safeEquals(methodName, that.methodName))
+ return false;
+ if (!Utils.safeEquals(returnType, that.returnType))
+ return false;
+ if (null == params && null == that.params)
+ return true;
+ if (null != params && null == that.params)
+ return false;
+ if (null == params && null != that.params)
+ return false;
+ if (params.length != that.params.length)
+ return false;
+ for (int i = 0; i < params.length; i++)
+ if (!Utils.safeEquals(params[i], that.params[i]))
+ return false;
+ return true;
+ }
+
+ public String toStringWithoutAttrs() {
+ String s = new String();
+ if (returnType != null)
+ s += returnType + " ";
+ if (className != null)
+ s += className;
+ s += methodName + "(";
+ for (int i = 0; params != null && i < params.length; i++) {
+ if (i > 0)
+ s += ", ";
+ s += params[i].toString();
+ }
+ s += ")";
+ return s;
+ }
+
+ public String toString() {
+ String s = attributes;
+ if (attributes.length() > 0)
+ s += " ";
+ s += toStringWithoutAttrs();
+ if (trailingAttributes.length() > 0)
+ s += " " + trailingAttributes;
+ return s;
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java
new file mode 100644
index 0000000000..5bd80fc37a
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java
@@ -0,0 +1,543 @@
+/*
+*
+* 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.
+*/
+
+/*
+* Branched from the original class that was also contributed to the
+* org.apache.axis.tools.common package.
+*
+*/
+package org.apache.tuscany.sca.cpp.tools.common;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+//Apache Common Logging
+//import org.apache.commons.logging.Log;
+//import org.apache.commons.logging.LogFactory;
+
+/**
+* Static utility methods. Some of these methods are similar to the methods on
+* java.lang.String except they are aware of C/C++ comments and string literals.
+*
+* TODO: Many of these methods would perform better using StringBuffer not
+* String
+*/
+public final class Utils {
+ // All the C primitive data types
+ public final static Set cPrimitives = new HashSet(Arrays
+ .asList(new Object[] { "void", "byte", "char", "unsigned",
+ "signed", "int", "short", "long", "double", "float",
+ "struct", "class", "enum", "union" }));
+
+ // All the qualifiers that can affect C types
+ public final static Set cTypeQualifiers = new HashSet(
+ Arrays.asList(new Object[] { "(", ")", "*", ",", "&", "]", "[",
+ "const" }));
+
+ public final static String whitespace = " \t\r\n";
+
+ //private static Log log = LogFactory.getLog(CLASS.class);
+
+ /**
+ * Never instantiate this class
+ */
+ private Utils() {
+ }
+
+ /**
+ * Is this string all whitespace?
+ */
+ static boolean isSpace(String s) {
+ for (int i = 0; i < s.length(); i++)
+ if (!Character.isWhitespace(s.charAt(i)))
+ return false;
+ return true;
+ }
+
+ // TODO look for other trailing chars like { (because of class{)
+ static boolean startsWith(String source, String target) {
+ if (source == null || target == null)
+ return false;
+ if (!source.startsWith(target))
+ return false;
+ if (source.length() == target.length())
+ return true;
+ if (Character.isWhitespace(source.charAt(target.length())))
+ return true;
+ return false;
+ }
+
+ /**
+ * Performs a C-aware version of String.indexOf(char) in that it skips
+ * characters in string literals and comments.
+ */
+ static int indexOf(String s, char c) throws ParsingException {
+ if ('"' == c)
+ rude("Utils.indexOf cannot be passed quotes");
+
+ for (int i = 0; i < s.length(); i++) {
+ if (s.charAt(i) == c)
+ return i;
+
+ i = skip(s.substring(i), i);
+ if (-1 == i)
+ return -1;
+ }
+ return -1;
+ }
+
+ /**
+ * Performs a C-aware version of String.indexOf(String) in that it skips
+ * characters in string literals and comments and makes sure that the target
+ * string is not embedded in a longer word.
+ */
+ static int indexOf(String s, String t) {
+ char t0 = t.charAt(0);
+ for (int i = 0; i < s.length(); i++) {
+ if (s.charAt(i) == t0
+ && s.substring(i).startsWith(t)
+ && (0 == i || !Character.isLetterOrDigit(s.charAt(i - 1)))
+ && (s.length() == (i + t.length()) || !Character
+ .isLetterOrDigit(s.charAt(i + t.length()))))
+ return i;
+
+ i = skip(s.substring(i), i);
+ if (-1 == i)
+ return -1;
+ }
+ return -1;
+ }
+
+ /**
+ * Matches braces or quotes and is C-aware. It skips characters in string
+ * literals and comments.
+ */
+ static int findMatching(String s, char c1, char c2) {
+ int depth = 0;
+ for (int i = 0; i < s.length(); i++) {
+ if (s.charAt(i) == c1)
+ depth++;
+ else if (s.charAt(i) == c2) {
+ depth--;
+ if (depth == 0)
+ return i;
+ } else {
+ i = skip(s.substring(i), i);
+ if (-1 == i)
+ return -1;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Failed to parse the source code for some reason. This method prints out a
+ * suitably rude message, and then what? I haven't quite decided yet.
+ *
+ * TODO: Do something sensible here like throw an Exception which will give
+ * up on this file completely and tidy up the output file. It may be just
+ * too dangerous to try to carry on. But we need to fail in such a way that
+ * the build system knows that we've failed for this file and can build this
+ * file without trace.
+ */
+ public static void rude(String reason, String filename, int lineno,
+ String codefragment) throws ParsingException {
+
+ String text = "Bad C++ code!! ";
+ if (reason != null)
+ text += reason;
+ if (filename != null)
+ text += " " + filename + " lineno=" + lineno;
+ if (codefragment != null)
+ text += " <" + codefragment + ">";
+ System.err.println(text);
+ throw new ParsingException();
+ }
+
+ /**
+ * This method reports an error level problem
+ *
+ * @param reason
+ * why we have an error level problem
+ */
+ public static void rude(String reason) throws ParsingException {
+ // Apache commons logging
+ // log.error(Object line, null);
+ // or for now....
+ rude(reason, null, 0, null);
+ }
+
+ /**
+ * This method reports an error level problem
+ *
+ * @param reason
+ * why we have an error level problem
+ */
+ public static void screenMessage(String msg) {
+ // Apache commons logging
+ // log.error(Object line, null);
+ // or for now....
+ System.out.println(msg);
+ }
+
+ /**
+ * Escapes special characters like " so that they can be output in a C
+ * string literal. Also removes newlines, since C string literals can't be
+ * split over lines.
+ */
+ String pretty(String s) {
+ StringBuffer sb = new StringBuffer(s);
+ for (int i = 0; i < sb.length(); i++)
+ switch (sb.charAt(i)) {
+ case '"':
+ sb = sb.insert(i, '\\');
+ i++;
+ break;
+ case '\n':
+ sb = sb.deleteCharAt(i);
+ i--;
+ break;
+ }
+ return sb.toString();
+ }
+
+ private static boolean startsWithComment(String s) {
+ if (null == s || s.length() < 2)
+ return false;
+ if (s.startsWith("//"))
+ return true;
+ if (s.startsWith("/*"))
+ return true;
+ return false;
+ }
+
+ private static int endOfComment(String s) {
+ int idx;
+ if (s.startsWith("//"))
+ idx = s.indexOf("\n");
+ else {
+ idx = s.indexOf("*/");
+ if (-1 != idx)
+ idx++; // Step over */
+ }
+ return idx;
+ }
+
+ private static boolean startsWithStringLiteral(String s) {
+ if (null == s || s.length() < 1)
+ return false;
+ if (s.startsWith("\"") || s.startsWith("'"))
+ return true;
+ return false;
+ }
+
+ private static int endOfStringLiteral(String s) {
+ boolean escape = false;
+ char c0 = s.charAt(0);
+ for (int i = 1; i < s.length(); i++) {
+ if (!escape && s.charAt(i) == c0)
+ return i;
+
+ // \" or \' does not end the literal
+ if ('\\' == s.charAt(i))
+ // Escaping a \ should switch escape off so \\' does end
+ // the literal
+ escape = !escape;
+ else
+ escape = false;
+ }
+ return -1;
+ }
+
+ /**
+ * If the String s starts with a string literal or a comment, return i plus
+ * the index of the end of the literal or comment. String literals are
+ * enclosed in " or ' and comments start with /* or //.
+ */
+ private static int skip(String s, int i) {
+ int j = 0;
+ if (startsWithStringLiteral(s)) {
+ j = endOfStringLiteral(s);
+ if (-1 == j)
+ return -1;
+ } else if (startsWithComment(s)) {
+ j = endOfComment(s);
+ if (-1 == j)
+ return -1;
+ }
+ return i + j;
+ }
+
+ /**
+ * A better method than .equals() because it doesn't NullPointerException
+ * when one of the parameters is null.
+ */
+ public static boolean safeEquals(Object o1, Object o2) {
+ if (null == o1 && null == o2)
+ return true;
+ if (null == o1 && null != o2)
+ return false;
+ if (null != o1 && null == o2)
+ return false;
+ return o1.equals(o2);
+ }
+
+ public static void outputDebugString(String line) {
+ if (!Options.quiet()) {
+ if (Options.debug())
+ // Apache commons logging
+ // log.debug(Object line, null);
+ // or for now
+ System.out.println(line);
+ }
+ }
+
+ /**
+ * This static method allows different parts of the code to inform about
+ * significant events. Code interested in specific types of event can
+ * register a listener against that type (not written yet)
+ *
+ * @param eventType
+ * An int type enum indicating the type of event.
+ * @param message
+ * A message that can be output to the user.
+ */
+ public static final int EVENT_TYPE_XML_ITEM_PARSED = 1;
+
+ public static final int EVENT_TYPE_FILE_PARSED = 2;
+
+ public static final int EVENT_TYPE_FILE_CREATE = 3;
+
+ public static final int VERBOSE_LIMIT = 1024;
+
+ public static final int DEPLOYMENT_ARTEFACT = VERBOSE_LIMIT;
+
+ public static final int DEPLOYMENT_ARTEFACT_ENCOUNTERED = DEPLOYMENT_ARTEFACT + 1;
+
+ public static final int DEPLOYMENT_ARTEFACT_GENERATED = DEPLOYMENT_ARTEFACT + 2;
+
+ public static final int DEPLOYMENT_INPUT_DIRECTORY = DEPLOYMENT_ARTEFACT + 3;
+
+ public static final int DEPLOYMENT_OUTPUT_DIRECTORY = DEPLOYMENT_ARTEFACT + 4;
+
+ private static boolean reportArtefacts = false;
+
+ /**
+ * An easily callable method to allow tracking/reposting of events in scagen
+ * and other tools.
+ *
+ * @param eventType
+ * used for classifying event
+ * @param message
+ * a user readable message
+ */
+ public static void postEvent(int eventType, String message) {
+ if (Options.verbose() && eventType < VERBOSE_LIMIT) {
+ screenMessage(message);
+ }
+
+ if ((eventType & DEPLOYMENT_ARTEFACT) > 0) {
+ reportArtefact(message, eventType);
+ }
+
+ }
+
+ /**
+ * @param message
+ * The user message
+ * @param eventType
+ * The type of event (input or output). This is used to determine
+ * if the path name of the file starts with the MODULE_ROOT
+ * directory or the given output directory as the one of these
+ * prefixes is removed from the path name in order to give the
+ * new (destination) path relative to the new module root
+ *
+ *
+ */
+
+ static String scagenInputDir = "MODULE_ROOT";
+
+ static String scagenOutputDir = "SCAGEN_OUTPUT";
+
+ static String newModuleRoot = "NEW_MODULE_ROOT";
+
+ static String generatedDirName = "$sourceDir1";
+
+ private static void reportArtefact(String message, int eventType) {
+
+ if (Utils.isReportArtefacts()) {
+
+ // Changing the value of the variable below will alter the output of
+ // the
+ // deploy assist strings:
+ // true will result in a "copy source NEW_MODULE_ROOT\dest" output
+ // and
+ // false will result in a "inputDir c:\fred"
+ // "outputDir c:\bob"
+ // "input c:\fred\sca.module"
+ // "output c:\bob\proxy.h" type output
+ String command = null;
+
+ try {
+ newModuleRoot = (String) Options.getOption("-deploy");
+ command = (String) Options.getOption("-command");
+ } catch (Exception e) {
+ // let it default
+ }
+
+ if (null == newModuleRoot) {
+ newModuleRoot = "DEPLOY_MODULE_ROOT";
+ }
+
+ if (null == command) {
+ command = "copy";
+ }
+
+ if (Options.outputCommand()) {
+
+ String tail = message;
+ switch (eventType) {
+ case DEPLOYMENT_ARTEFACT_ENCOUNTERED:
+ if (message.startsWith(scagenInputDir)) {
+ tail = message.substring(scagenInputDir.length());
+ }
+
+ String dest = joinPathElements(newModuleRoot, tail);
+
+ System.out.println(command + " " + platformSlashes(message)
+ + " " + platformSlashes(dest));
+ break;
+
+ case DEPLOYMENT_ARTEFACT_GENERATED:
+ if (message.startsWith(scagenOutputDir)) {
+ tail = message.substring(scagenOutputDir.length());
+ }
+
+ dest = joinPathElements(newModuleRoot, tail);
+ System.out.println(command + " " + platformSlashes(message)
+ + " " + platformSlashes(dest));
+ break;
+ case DEPLOYMENT_INPUT_DIRECTORY:
+ scagenInputDir = message;
+ //System.out.println("inputDir " + message);
+ break;
+ case DEPLOYMENT_OUTPUT_DIRECTORY:
+ scagenOutputDir = message;
+ //System.out.println("outputDir " + message);
+ break;
+ default:
+ break;
+ }
+
+ } else {
+
+ if (Options.list()) {
+ switch (eventType) {
+ case DEPLOYMENT_ARTEFACT_ENCOUNTERED:
+ case DEPLOYMENT_ARTEFACT_GENERATED:
+ System.out.println(platformSlashes(message));
+ break;
+ case DEPLOYMENT_INPUT_DIRECTORY:
+ case DEPLOYMENT_OUTPUT_DIRECTORY:
+ default:
+ break;
+ }
+ } else {
+ switch (eventType) {
+ case DEPLOYMENT_ARTEFACT_ENCOUNTERED:
+ //TODO make efficient
+ System.out.println("$sourceDir1"
+ + platformSlashes(message.substring(scagenInputDir.length())));
+ break;
+ case DEPLOYMENT_ARTEFACT_GENERATED:
+ //TODO make efficient
+ System.out.println(generatedDirName
+ + platformSlashes(message.substring(scagenOutputDir.length())));
+ break;
+ case DEPLOYMENT_INPUT_DIRECTORY:
+ scagenInputDir = platformSlashes(message);
+ System.out.println("sourceDir1=" + scagenInputDir);
+ break;
+ case DEPLOYMENT_OUTPUT_DIRECTORY:
+ scagenOutputDir = platformSlashes(message);
+ if (!scagenInputDir.equals(scagenOutputDir)) {
+ generatedDirName = "$sourceDir2";
+ System.out.println("sourceDir2=" + scagenOutputDir);
+ } else {
+ //generatedDirName = "sourceDir1";
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * @param tail
+ * @param tail
+ * @return
+ */
+ public static String joinPathElements(String root, String tail) {
+ String separator;
+ // Stick in a "/" (File.separator) if required.
+ if ((tail.substring(0, 1).equals("/") || newModuleRoot.substring(
+ root.length() - 1, root.length()).equals("/"))
+ || (tail.substring(0, 1).equals("\\") || root.substring(
+ root.length() - 1, root.length()).equals("\\"))
+
+ ) {
+ separator = "";
+ } else {
+ separator = File.separator;
+ }
+ String dest = newModuleRoot + separator + tail;
+ return dest;
+ }
+
+ /**
+ * @param reportArtefacts
+ * The reportArtefacts to set.
+ */
+ public static void setReportArtefacts(boolean reportArtefacts) {
+ Utils.reportArtefacts = reportArtefacts;
+ }
+
+ /**
+ * @return Returns the reportArtefacts.
+ */
+ private static boolean isReportArtefacts() {
+ return reportArtefacts;
+ }
+
+ private static String platformSlashes(String path) {
+ if (null == path) {
+ return path;
+ }
+ // We need a double level of \\ escapes if the slashes are
+ // this way round.
+ String separatorForRegex = File.separator
+ .replaceAll("\\\\", "\\\\\\\\");
+ return path.replaceAll("[/\\\\]+", separatorForRegex);
+
+ }
+
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/package.html b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/package.html
new file mode 100644
index 0000000000..c86184f441
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/package.html
@@ -0,0 +1,39 @@
+<html>
+
+<head>
+<title>Design documentation for org\apache\tuscany\sca\cpp\tools\common</title>
+</head>
+
+<body lang=EN-GB>
+
+<div class=Section1>
+
+<h1>Overview</h1>
+
+This package can be used to reflect across C++ source code. It can produce
+a network of descriptive objects describing C++ Headers, Signatures, Parameters and so
+on that it finds in a given location of the file system.
+Each of the descriptive objects has a set of getters that return either
+the descriptive child objects, or for primitives, the string that represents the actual
+value such as "int" or "myFunction".
+<p>
+There are also various utility methods that help with navigating the information, for example the Signature
+class has an isConstructor method. The API Javadoc contains further details of these.
+<p>
+The package can scan a directory using a file mask to identify what types
+of files are to be scanned. In this application we are interested only
+in the function prototypes in the C++ header files.
+<p>
+The implementation was originated using some java code that was also
+contributed to the Apache org.apache.axis.tools.common package. Care
+has been taken that the original code was not sourced via Apache. If
+this project is adopted by Apache then it is very possible that this
+package could be merged with or made obsolete by org.apache.axis.tools.common
+and because of this the design and interfaces have been preserved from
+the original code as much as possible.
+
+<p>
+</div>
+</body>
+
+</html>
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java
new file mode 100644
index 0000000000..60bc8395e1
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java
@@ -0,0 +1,360 @@
+/*
+ *
+ * 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.
+ */
+package org.apache.tuscany.sca.cpp.tools.services;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tuscany.sca.cpp.tools.common.Headers;
+import org.apache.tuscany.sca.cpp.tools.common.Signature;
+import org.apache.tuscany.sca.cpp.tools.common.Utils;
+import org.w3c.dom.Node;
+
+/**
+ * This class will do the required processing for the <component>element of a
+ * sca module or fragment file.
+ */
+public class ComponentDomNodeHandler extends GenericDomNodeHandler {
+
+ /**
+ * This method will do the "normal" processing and then trigger a call to
+ * processComponentNode.
+ *
+ * @param node
+ * the node being processed
+ * @param contextXPath
+ * the XPath to the node
+ * @param handlers
+ * the map pf element names to DomNodeHandlers
+ * @param parameters
+ * a map of XPaths to parameters values found so far
+ */
+
+ public void handleNode(Node node, String contextXPath, Map handlers,
+ Map parameters) {
+
+ // Pick up attrs and the interface.cpp child elements
+ super.handleNode(node, contextXPath, handlers, parameters);
+
+ try {
+ //OK now go and create the wrapper and proxy for the service
+ processComponentNode(contextXPath, parameters);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ /**
+ * This method basically moved from the text names of things to operating on
+ * the actual Files. It will also verify or work out the correct class name
+ * for the implmentation and complain if this does match at least one
+ * potential service method in the class.
+ *
+ * @param contextXPath
+ * used to pull the correct values from the parameters map (as
+ * there can be multiple implementation.cpp elelements in there).
+ * @param parameters
+ * a map of XPath keys to attribute values
+ * @throws Exception
+ */
+ private void processComponentNode(String contextXPath, Map parameters)
+ throws Exception {
+
+ String implHeader = (String) parameters.get(contextXPath
+ + "/implementation.cpp/@header");
+ String implClass = (String) parameters.get(contextXPath
+ + "/implementation.cpp/@class");
+
+ File moduleOrFragmentFile = (File) parameters
+ .get("moduleOrFragmentFile");
+ File implHeaderFile = null;
+ if (null != moduleOrFragmentFile) {
+ File dir = moduleOrFragmentFile.getParentFile();
+ implHeaderFile = new File(dir, implHeader);
+ } else {
+ throw new InternalError(
+ "Internal error: sca.module or fragment file not present in interal parameters");
+ }
+
+ try {
+ String resolvedImplClassName = getClassName(implHeaderFile,
+ implClass);
+
+ // Check or retrieve the impl Class name.
+ if (null == resolvedImplClassName) {
+ try {
+ //A class attribute was set but there were no methods of
+ // the
+ // class in the header
+ System.out
+ .println("Classname given ("
+ + implClass
+ + ") does not match any header file method's classes in file: "
+ + implHeaderFile.getCanonicalPath());
+ } catch (IOException e) {
+ System.out
+ .println("Classname given ("
+ + implClass
+ + ") does not match any header file method's classes in file: "
+ + implHeaderFile.getAbsolutePath());
+ }
+ return;
+ } else {
+ File target = (File) parameters.get("targetFile");
+ // go into the .componentType file and generate the cpp
+ processComponentTypeFile(implHeaderFile, target,
+ resolvedImplClassName);
+
+ }
+ } catch (Exception e) {
+ String compName = (String) parameters
+ .get("/moduleFragment/component/@name");
+ Utils
+ .screenMessage("Problem interpreting header or class attributes in "
+ + compName
+ + " component, in "
+ + moduleOrFragmentFile.getPath() + " file");
+ System.exit(-2);
+ }
+
+ }
+
+ /**
+ * The purpose of this method is to move from the DOM parameters to dealing
+ * with the actual Files involved. It is from this method that we kick off
+ * the processing of the componentType file.
+ *
+ * @param header
+ * the implementation header
+ * @param target
+ * the directory for the output
+ * @param implClass
+ * @throws Exception
+ */
+ private void processComponentTypeFile(File header, File target,
+ String implClass) throws Exception {
+
+ // The componentType files should be in the same dir as the Impl
+ // header...
+ if (header == null || target == null) {
+ return;
+ }
+
+ File componentTypeDirectory = header.getParentFile();
+ String headerFileName = header.getName();
+ String componentTypeName = headerFileName.substring(0, headerFileName
+ .lastIndexOf("."));
+
+ File componentTypeFile = new File(componentTypeDirectory,
+ componentTypeName + ".componentType");
+
+ ComponentTypeFileHandler ctParser = new ComponentTypeFileHandler();
+
+ // The implClass is used in the generated wrapper code so we need to
+ // store
+ // it so we can tunnel through the standard actOnFile signature.
+
+ int namespaceEnd = -1;
+ if (null != implClass) {
+ namespaceEnd = implClass.lastIndexOf("::");
+ }
+
+ String namespace = null;
+
+ if (-1 != namespaceEnd) {
+ namespace = implClass.substring(0, namespaceEnd);
+ ctParser.setParameter("implNamespace", namespace);
+ implClass = implClass.substring(namespaceEnd + 2);
+ }
+
+ if (implClass != null) {
+ ctParser.setParameter("implClass", implClass);
+ }
+
+ try {
+ ctParser.handleComponentTypeFile(componentTypeFile, target);
+ } catch (Exception e) {
+ Utils
+ .screenMessage("There has been a problem parsing the componentType file: "
+ + componentTypeFile.getCanonicalPath());
+ Utils.screenMessage(" the reported errors is "
+ + e.getLocalizedMessage());
+ Utils.screenMessage(" and the java exception stack is below.");
+ e.printStackTrace();
+ throw e;
+ }
+ }
+
+ /**
+ * The resolve and check the classname of the service. If we have an
+ * implementation class name we have to check that there is: at least one
+ * (non-private, non constructor or finalizer) method of that class in the
+ * header If there is no implementation class then we will return the class
+ * of the first non-private/constructor/finalizer method we find.
+ *
+ * @param header
+ * @param implementationCppClass
+ * @return
+ * @throws Exception
+ */
+ private String getClassName(File header, String implementationCppClass)
+ throws Exception {
+ String methodClassName = null;
+ List methods = null;
+
+ if (null == header) {
+ return null;
+ }
+
+ Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_ENCOUNTERED, header
+ .getAbsolutePath());
+ Utils.postEvent(Utils.EVENT_TYPE_FILE_PARSED,
+ "Scagen processing C++ implementation header "
+ + header.getAbsolutePath());
+
+ try {
+ Headers headers = new Headers();
+
+ headers.actOnFile(header, null, 1);
+
+ methods = headers.getAllMethods();
+
+ } catch (FileNotFoundException fnfe) {
+ String path;
+ try {
+ path = header.getCanonicalPath();
+ } catch (IOException e1) {
+ path = header.getPath();
+ }
+ Utils.screenMessage("The header file: " + path
+ + " referenced cannot be found.");
+ throw fnfe;
+ } catch (Exception e) {
+ String path = header.getPath();
+ Utils.screenMessage("The header file: " + path
+ + " referenced is not valid. Reason given is "
+ + e.getLocalizedMessage());
+ throw e;
+ }
+
+ // We need at least some methods
+ if (null == methods) {
+ return null;
+ }
+
+ // We need at least one service method of to do anything
+ methods = trimMethodsOfPrivatesConstructorsAndDestrutors(methods);
+ if (null == methods || methods.size() == 0) {
+ return null;
+ }
+
+ // If the user specifies an implementation class then we need at
+ // least one service method of that class
+ if (implementationCppClass != null) {
+ methods = filterMethodsToOneClass(methods, implementationCppClass);
+
+ if (null == methods || methods.size() == 0) {
+ return null;
+ } else {
+ // There was at least one method of the correct type
+ return implementationCppClass;
+ }
+ } else {
+ // Implementation class is null so we return the fully qualified classname of the
+ // first service method
+ Signature s = (Signature) methods.get(0);
+ String className = s.getTrimClassName();
+ String namespace = s.getNamespace();
+ if( namespace != null && namespace.length() > 0)
+ {
+ className = namespace + "::" + className;
+ }
+
+ return className;
+ }
+ }
+
+ /**
+ * Filter the mthods supplied to only ones fo the supplied class.
+ *
+ * @param methods
+ * the list of methods
+ * @param implementationCppClass
+ * the class we wish
+ * @return a list of methods of the correct class
+ */
+ private List filterMethodsToOneClass(List methods,
+ String implementationCppClass) {
+
+ if (null == methods) {
+ return null;
+ }
+
+ if (null == implementationCppClass
+ || implementationCppClass.length() == 0) {
+ return null;
+ }
+
+ for (Iterator iter = methods.listIterator(); iter.hasNext();) {
+ Signature method = (Signature) iter.next();
+
+ String className = method.getTrimClassName();
+ String namespace = method.getNamespace();
+
+ if (namespace != null && namespace.length() > 0) {
+ className = namespace + "::" + className;
+ }
+
+ if (!implementationCppClass.equals(className)) {
+ iter.remove();
+ }
+ }
+
+ return methods;
+
+ }
+
+ /**
+ * This method removes contructor and destructor methods from the list.
+ *
+ * @param methods
+ * the list of methods
+ * @return
+ */
+ private List trimMethodsOfPrivatesConstructorsAndDestrutors(List methods) {
+
+ if (null == methods) {
+ return null;
+ }
+
+ for (Iterator iter = methods.listIterator(); iter.hasNext();) {
+ Signature method = (Signature) iter.next();
+
+ if (method.isConstructor() || method.isDestructor()) {
+ iter.remove();
+ }
+ }
+
+ return methods;
+ }
+
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java
new file mode 100644
index 0000000000..0ee9b97138
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java
@@ -0,0 +1,124 @@
+/*
+ *
+ * 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.
+ */
+package org.apache.tuscany.sca.cpp.tools.services;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.cpp.tools.common.FileActor;
+import org.apache.tuscany.sca.cpp.tools.common.Utils;
+
+/**
+ * The purpose of this class is to specialise the map of XML element handlers
+ * for a XXX.componentType file that is used by the XMLFileActor
+ */
+public class ComponentTypeFileHandler extends XMLFileActor {
+
+ static {
+ // We set up a map for each element type we wish to handle
+ // this alows the XML handling code to be generic and type free
+ // while the handlers don't have to do mcuh XML handling.
+
+ GenericDomNodeHandler gdnh = new GenericDomNodeHandler();
+ handlers.put("componentType", gdnh);
+ handlers.put("interface.cpp", gdnh);
+
+ ServiceDomNodeHandler sdnh = new ServiceDomNodeHandler();
+ handlers.put("service", sdnh);
+
+ ReferenceDomNodeHandler rdnh = new ReferenceDomNodeHandler();
+ handlers.put("reference", rdnh);
+ }
+
+ /**
+ * This method just exists to add the default starting depth of 1 to the
+ * underlying actOnFile interface
+ *
+ * @param componentTypeXML
+ * @param target
+ * @throws Exception
+ */
+ public void handleComponentTypeFile(File componentTypeXML, File target)
+ throws Exception {
+ // We have already set up the XML element handlers.
+ actOnFile(componentTypeXML, target, 1);
+ // We need do no more, the service and reference handlers
+ // ServiceDomNodeHandler and ReferenceDomNodeHandler
+ // will take appropriate action.
+ }
+
+ /**
+ * This method is the main FileActor method
+ *
+ * @see FileActor#actOnFile(File, File, int) Here we create an initial DOM
+ * and kick off the processing (using the handler map that has been set
+ * up by the concrete subclass).
+ *
+ * @param moduleXML
+ * the sca.module or fragment file
+ * @param target
+ * the target directory
+ * @param depth
+ * not uesed here but in the
+ * @see FileActor#actOnFile(File, File, int) interface to allow for
+ * recursive diving into a directory structure.
+ */
+ public void actOnFile(File fileXML, File target, int depth)
+ throws Exception {
+
+ if (null == fileXML || null == target) {
+ return;
+ }
+
+ parameters.put("componentTypeFile", fileXML);
+
+ Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_ENCOUNTERED, fileXML.getAbsolutePath());
+ Utils.postEvent(Utils.EVENT_TYPE_FILE_PARSED, "Scagen processing SCA componentType file " + fileXML.getAbsolutePath());
+
+ super.actOnFile(fileXML, target, depth);
+
+ }
+
+ /**
+ * @return an error message - usually over-ridden.
+ */
+ protected String getContextMessage() {
+
+ String module = ((File) parameters.get("moduleOrFragmentFile")).getPath();
+ if (null == module) {
+ module = "unknown";
+ }
+
+ String component = (String) parameters.get("/module/component/@name");
+ if (null == component) {
+ component = (String) parameters
+ .get("/moduleFragment/component/@name");
+ }
+ if (null == component) {
+ module = "unknown";
+ }
+
+ String msg = "when processing module " + module;
+
+ msg = msg
+ + "\nin this module file, the component \""
+ + component
+ + "\" has an implementation.cpp element with a header attribute \nwhere the C++ header can be found but it has no matching .componentType file present in\nthe same directory as the header.";
+
+ return msg;
+ }
+
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java
new file mode 100644
index 0000000000..1ff4504fff
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java
@@ -0,0 +1,87 @@
+/*
+ *
+ * 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.
+ */
+package org.apache.tuscany.sca.cpp.tools.services;
+
+import java.io.File;
+import java.util.Set;
+
+import org.apache.tuscany.sca.cpp.tools.common.FileActor;
+import org.apache.tuscany.sca.cpp.tools.common.Utils;
+
+public class DirectoryScanner {
+ private FileActor actor;
+
+ private Set actOnTheseFileExtensions;
+
+ public DirectoryScanner(FileActor actor, Set extensions) {
+ this.actor = actor;
+ this.actOnTheseFileExtensions = extensions;
+ }
+
+ /**
+ *
+ * @param source
+ * The module root directory
+ * @param target
+ * The directory that will hold the generated output
+ * @param depth
+ * The depth from the initial starting point, not significant for
+ * the Scagen tool as we are only interested in the module root
+ * directory but present due to the FileActor actOnFile interface
+ * method. This code is pulled from the code in the CParsingTool
+ * class and further work is needed to remove the duplication.
+ * Tnterface has been left unchanged as we hope to reconverge the
+ * parser here with the original one once the changes are fed
+ * back into the original code.
+ * @throws Exception
+ */
+ public void walkTree(File source, File target, int depth) throws Exception {
+ depth++;
+ boolean noTarget = (null == target);
+
+ if (!source.canRead())
+ Utils.rude("Cannot read from source directory " + source);
+ if (!noTarget && !target.canWrite())
+ Utils.rude("Cannot write to target directory " + target);
+
+ if (source.isDirectory()) {
+ File[] filesInDirectory = source.listFiles();
+ for (int i = 0; i < filesInDirectory.length; i++) {
+ File file = filesInDirectory[i];
+ String name = file.getName();
+ int dot = name.lastIndexOf('.');
+ String ext = null;
+ if (-1 != dot) {
+ ext = name.substring(dot + 1);
+ }
+
+ if (file.isFile()
+ && (actOnTheseFileExtensions == null || (!file
+ .isHidden() && actOnTheseFileExtensions
+ .contains(ext)))) {
+ // this is a file we need to act on!
+ actor.actOnFile(file, target, depth);
+ }
+ }
+ } else {
+ return; // Do not act on single files for now we expect a module
+ // root directory
+ // and the "main" class checks its parameters to ensure this is so.
+ }
+ }
+
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomHandler.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomHandler.java
new file mode 100644
index 0000000000..2ca4c7c881
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomHandler.java
@@ -0,0 +1,77 @@
+/*
+*
+* 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.
+*/
+package org.apache.tuscany.sca.cpp.tools.services;
+
+import java.util.Map;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * The purpose of this class it to provide a generic class that can handle both
+ * a DOM and a DOM node.
+ *
+ */
+public class DomHandler extends GenericDomNodeHandler {
+ /**
+ * This method will run through the initial level of the DOM using the
+ * handlers map
+ *
+ * @param dom
+ * the document being consumed
+ * @param handlers
+ * the map from element name to node handler
+ * @param parameters
+ * a map of parameters - this is often used by a handler to place
+ * a name-value pair, the name is often an Xpath representation
+ * of the location of the data in the DOM but handlers are free
+ * to use whatever they like - the contextXpath is generated as
+ * an Xpath prefix for those handlers that wish to use it.
+ */
+ public static void handleDom(Document dom, Map handlers, Map parameters) {
+ if (dom != null) {
+ NodeList childNodes = dom.getChildNodes();
+ for (int i = 0; i < childNodes.getLength(); i++) {
+ Node childNode = childNodes.item(i);
+ mapNodeToHandlerAndHandle(childNode, "/"
+ + childNode.getNodeName(), handlers, parameters);
+ }
+ }
+ }
+
+ /**
+ *
+ * @param node
+ * The DOM node being consumed
+ * @param contextXPath
+ * The XPath to this node
+ * @param handlers
+ * The map from element name to node handler
+ * @param parameters
+ * A map of parameters - this is often used by a handler to place
+ * a name-value pair, the name is often an Xpath representation
+ * of the location of the data in the DOM but handlers are free
+ * to use whatever they like - the contextXpath is generated as
+ * an Xpath prefix for those handlers that wish to use it.
+ */
+ public void handleNode(Node node, String contextXPath, Map handlers,
+ Map parameters) {
+ mapNodeToHandlerAndHandle(node, contextXPath, handlers, parameters);
+ }
+
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.java
new file mode 100644
index 0000000000..00942bd9ca
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DomNodeHandler.java
@@ -0,0 +1,40 @@
+/*
+*
+* 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.
+*/
+package org.apache.tuscany.sca.cpp.tools.services;
+
+import java.util.Map;
+
+import org.w3c.dom.Node;
+
+public interface DomNodeHandler {
+
+ public static int ELEMENT = 1;
+ /**
+ * An interface for classes that can process DOM nodes.
+ *
+ * @param node the DOM node being consumed
+ * @param contextXPath the XPath to this node
+ * @param handlers The map from element name to node handler
+ * @param parameters A map of parameters - this is often used by a handler to place
+ * a name-value pair, the name is often an Xpath like representation of the
+ * location of the data in the DOM but handlers are free to use whatever
+ * they like - the contextXpath is generated as an Xpath prefix for those
+ * handlers that wish to use it.
+ */
+ void handleNode( Node node, String contextXPath, Map handlers, Map parameters );
+
+}
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java
new file mode 100644
index 0000000000..3f9fb359f5
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java
@@ -0,0 +1,214 @@
+/*
+ *
+ * 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.
+ */
+package org.apache.tuscany.sca.cpp.tools.services;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+
+import org.apache.tuscany.sca.cpp.tools.common.Utils;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ *
+ *
+ *
+ *
+ */
+public class GenericDomNodeHandler implements DomNodeHandler {
+ /**
+ * This method parses the DOM attributes into name value pairs in the
+ * parameter map each valued keyed by its XPath.
+ *
+ * @param node
+ * the DOM node being processed
+ * @param contextPath
+ * the XPath to the DOM node being processed
+ * @param parameters
+ * a scratchpad map of name value pairs
+ */
+ public void transferAttrsToParameters(Node node, String contextPath,
+ Map parameters) {
+
+ if (node == null || contextPath == null || parameters == null)
+ return;
+
+ NamedNodeMap attrs = node.getAttributes();
+ if (attrs != null) {
+ for (int i = 0; i < attrs.getLength(); i++) {
+ Node attr = attrs.item(i);
+ parameters.put(contextPath + "/" + "@" + attr.getNodeName(),
+ attr.getNodeValue());
+
+ // Report the dll name to the deployment tool if required.
+ if ("dll".equals(attr.getNodeName())) {
+ //This is a path relative to the module root.
+ //so we need to add it in.
+ File mod = (File) parameters.get("moduleOrFragmentFile");
+ if (null != mod) {
+ String separatorForRegex = File.separator.replaceAll(
+ "\\\\", "\\\\\\\\");
+
+ String end = attr.getNodeValue().replaceAll("[/\\\\]+",
+ separatorForRegex);
+
+ if (!end.startsWith(File.separator)) {
+ end = File.separator + end;
+ }
+
+ String fullPath = mod.getParentFile().getAbsolutePath()
+ + end;
+ Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_ENCOUNTERED,
+ fullPath);
+ }
+
+ }
+
+ }
+ }
+ return;
+ }
+
+ /**
+ * This method will iterate through the DOM node's children and call the
+ * appropriate handler for each one.
+ *
+ * @param node
+ * the DOM node being processed
+ * @param contextPath
+ * the XPath to the DOM node being processed
+ * @param handlers
+ * a map of element name to handler objects
+ * @param parameters
+ * a scratchpad map of name value pairs
+ */
+ public void handleChildElements(Node node, String contextPath,
+ Map handlers, Map parameters) {
+
+ if (node == null || contextPath == null)
+ return;
+
+ NodeList children = node.getChildNodes();
+ if (children != null) {
+ for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ mapNodeToHandlerAndHandle(child, contextPath + "/"
+ + child.getNodeName(), handlers, parameters);
+ }
+ }
+ return;
+ }
+
+ /**
+ * This method will resolve any registered handler for a particular DOM
+ * element and call the handleNode method on it. If the handlers map has a
+ * mapping from "entity" to an instance of EntityHandler which implements
+ * the DomNodeHandler interface then any node that looks like <entity>
+ * <any_other/><stuff/></entity>
+ *
+ * Will be passed to the EntityHandler to process.
+ *
+ * @param node
+ * the DOM node being processed
+ * @param contextPath
+ * the XPath to the DOM node being processed
+ * @param handlers
+ * a map of element name to handler objects
+ * @param parameters
+ * a scratchpad map of name value pairs
+ */
+ public static void mapNodeToHandlerAndHandle(Node node, String contextPath,
+ Map handlers, Map parameters) {
+ if (node != null && node.getNodeType() == DomNodeHandler.ELEMENT) {
+ String nodeName = node.getNodeName();
+ if (nodeName != null && nodeName.length() > 0) {
+ DomNodeHandler handler = (DomNodeHandler) handlers
+ .get(nodeName);
+ if (handler != null) {
+ handler.handleNode(node, contextPath, handlers, parameters);
+ }
+ }
+ }
+ }
+
+ /**
+ * This method will place the attributes in this node into the parameter map
+ * keyed by the XPath and recursively continue processing for any
+ * sub-elements of the node.
+ *
+ * @param node
+ * The DOM node being consumed
+ * @param contextXPath
+ * The XPath to this node
+ * @param handlers
+ * The map from element name to node handler
+ * @param parameters
+ * A map of parameters - this is often used by a handler to place
+ * a name-value pair, the name is often an Xpath representation
+ * of the location of the data in the DOM but handlers are free
+ * to use whatever they like - the contextXpath is generated as
+ * an Xpath prefix for those handlers that wish to use it.
+ */
+ public void handleNode(Node node, String contextXPath, Map handlers,
+ Map parameters) {
+
+ clearParametersAtThisXPath(contextXPath, parameters);
+ transferAttrsToParameters(node, contextXPath, parameters);
+ handleChildElements(node, contextXPath, handlers, parameters);
+ }
+
+ /**
+ * @param contextXPath
+ * @param parameters
+ */
+ private void clearParametersAtThisXPath(String contextXPath, Map parameters) {
+
+ // TODO: Slow but works, improve parameters mechanism overall
+ // to make this unecessary
+ if (contextXPath == null || parameters == null) {
+ return;
+ }
+
+ // We want to clear both /moduleFragment and /module
+ // subtrees when we come across the root of either..
+ if (contextXPath.equals("/moduleFragment")) {
+ //clear both this and "module"
+ contextXPath = "/module";
+ }
+
+ Set parms = parameters.entrySet();
+ if (null != parms) {
+ Iterator iter = parms.iterator();
+ Map.Entry item = null;
+ String thisKey;
+
+ while (iter.hasNext()) {
+ item = (Entry) iter.next();
+ thisKey = (String) item.getKey();
+ if (thisKey.startsWith(contextXPath)) {
+ //System.out.println(" removing " + thisKey + " for " +
+ // item.getValue().toString() + " against " + contextXPath);
+ iter.remove();
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/LittleClass.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/LittleClass.java
new file mode 100644
index 0000000000..699abf7a08
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/LittleClass.java
@@ -0,0 +1,27 @@
+/*
+ *
+ * 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.
+ */
+package org.apache.tuscany.sca.cpp.tools.services;
+
+/**
+ * This class is just a convenient application class that is loaded in order to
+ * get the application class loader. We are interested in the application class
+ * loader as we use its getResource method to resolve XML files independantly of
+ * where they are.
+ */
+public class LittleClass {
+
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.java
new file mode 100644
index 0000000000..3bd8129401
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ModuleOrFragmentFileHandler.java
@@ -0,0 +1,85 @@
+/*
+ *
+ * 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.
+ */
+package org.apache.tuscany.sca.cpp.tools.services;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.cpp.tools.common.FileActor;
+import org.apache.tuscany.sca.cpp.tools.common.Utils;
+
+/**
+ * The purpose of this class is purely to specialise the handler map to one with
+ * a specific ComponentDomNodeHandler.
+ */
+public class ModuleOrFragmentFileHandler extends XMLFileActor {
+
+ static {
+
+ GenericDomNodeHandler gdnh = new GenericDomNodeHandler();
+
+ /*
+ * We use a specific Component node handler in order to be able to
+ * process multiple components in the same XML file
+ */
+ ComponentDomNodeHandler componentdnh = new ComponentDomNodeHandler();
+ handlers.put("component", componentdnh);
+
+ /*
+ * We are interested inthe elements below but they only need standard
+ * processing
+ */
+ handlers.put("module", gdnh);
+ handlers.put("moduleFragment", gdnh);
+ handlers.put("implementation.cpp", gdnh);
+ }
+
+ /**
+ * This method is the main FileActor method
+ *
+ * @see FileActor#actOnFile(File, File, int) Here we create an initial DOM
+ * and kick off the processing (using the handler map that has been set
+ * up by the concrete subclass).
+ *
+ * @param moduleXML
+ * the sca.module or fragment file
+ * @param target
+ * the target directory
+ * @param depth
+ * not uesed here but in the
+ * @see FileActor#actOnFile(File, File, int) interface to allow for
+ * recursive diving into a directory structure.
+ */
+ public void actOnFile(File moduleXML, File target, int depth)
+ throws Exception {
+
+ if (null == moduleXML || null == target) {
+ return;
+ }
+
+ parameters.put("moduleOrFragmentFile", moduleXML);
+
+ Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_ENCOUNTERED, moduleXML
+ .getAbsolutePath());
+
+ Utils.postEvent(Utils.EVENT_TYPE_FILE_PARSED,
+ "Scagen processing SCA module file "
+ + moduleXML.getAbsolutePath());
+
+ super.actOnFile(moduleXML, target, depth);
+
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java
new file mode 100644
index 0000000000..a490d184d1
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java
@@ -0,0 +1,67 @@
+/*
+ *
+ * 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.
+ */
+package org.apache.tuscany.sca.cpp.tools.services;
+
+import java.util.Map;
+
+import org.apache.tuscany.sca.cpp.tools.common.Options;
+import org.w3c.dom.Node;
+
+/**
+ * The purpose of this class is to process a <reference>element in a
+ * componentType file and then trigger a call to the method in ServicesGenerator
+ * to process the interface header file
+ */
+public class ReferenceDomNodeHandler extends GenericDomNodeHandler {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.tuscany.sca.cpp.services.DomNodeHandler#handleNode(org.w3c.dom.Node,
+ * java.lang.String, java.util.Map, java.util.Map)
+ */
+ public void handleNode(Node node, String contextXPath, Map handlers,
+ Map parameters) {
+
+ // Pick up attrs and children
+ super.handleNode(node, contextXPath, handlers, parameters);
+
+ //OK we know we are handling a reference
+ //now go and create the wrapper and proxy for it
+ createProxyForReference(parameters);
+
+ }
+
+ /**
+ * This method is really just an adapter that adapts the -dir Option to a
+ * value int he parameters map for "module_root"
+ *
+ * @param parameters
+ * the map of name-value parameters.
+ */
+ private void createProxyForReference(Map parameters) {
+ try {
+ String mr = (String) Options.getOption("-dir");
+ parameters.put("module_root", mr);
+ ServicesGenerator.handleInterfaceHeader(parameters, true);
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java
new file mode 100644
index 0000000000..a6f6f58644
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java
@@ -0,0 +1,170 @@
+/*
+ *
+ * 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.
+ */
+package org.apache.tuscany.sca.cpp.tools.services;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.tuscany.sca.cpp.tools.common.CParsingTool;
+import org.apache.tuscany.sca.cpp.tools.common.Options;
+import org.apache.tuscany.sca.cpp.tools.common.Utils;
+
+/**
+ * This is the main top level class. Its purpose is to create a
+ * Module/FragmentFile handler visitor and pass it to a DirectoryScanner for
+ * processing.
+ */
+public class Scagen extends CParsingTool {
+
+ public static Set MODULE_EXTENSIONS = new HashSet(Arrays
+ .asList(new Object[] { "module", "fragment" }));
+
+ /**
+ * @throws Exception
+ *
+ */
+ public Scagen(String[] args) throws Exception {
+ super(args);
+ }
+
+ /**
+ * Take a directory scanning class and create a vistor that knows how to
+ * handle any sca.module or .fragment that the scanner comes across.
+ *
+ * @param args
+ * standard main args. THe values we expect in this class are
+ * scagen -dir input_dir -output output_dir
+ *
+ */
+ public static void main(String[] args) {
+ boolean failed = false;
+ try {
+ Scagen env = new Scagen(args);
+ ModuleOrFragmentFileHandler module_handler = new ModuleOrFragmentFileHandler();
+
+ // Check and access the input SCA module directory
+ String name = (String) Options.getOption("-dir");
+ if (null == name) {
+ Utils
+ .screenMessage("Please provide a SCA module directory name as a \"-dir\" option.");
+ env.printUsage();
+ System.exit(-1);
+ }
+ File source = new File(name);
+ if (!source.isFile() && !source.isDirectory()) {
+ Utils
+ .screenMessage("The SCA module directory provided as the \"-dir\" option cannot be accessed,");
+ Utils.screenMessage("the option given was: " + source);
+ env.printUsage();
+ System.exit(-1);
+ }
+
+ String deployDir = null;
+ try {
+ deployDir = (String) Options.getOption("-deploy");
+ if (null != deployDir || Options.deploy()) {
+ Utils.setReportArtefacts(true);
+ }
+ } catch (Exception e) {
+ // let it default to null
+ }
+
+ Utils.postEvent(Utils.DEPLOYMENT_INPUT_DIRECTORY, source
+ .getAbsolutePath());
+
+ // We check the -output option here as we wish to
+ // reuse the env.maybeCreateDirectory method
+ // unchanged from the original that went into axis and it will do a
+ // System.exit if there is no matching Option
+ String outputDirName = (String) Options.getOption("-output");
+ if (null == outputDirName) {
+ Utils
+ .screenMessage("Please provide an output directory name for the generated files as a \"-output\" option.");
+ env.printUsage();
+ System.exit(-1);
+ }
+
+ File outputDir = new File(outputDirName);
+
+ // Check we can create the output directory
+ if (outputDir == null || !outputDir.exists() && !outputDir.mkdir()) {
+ Utils.screenMessage("Failed to create output directory: "
+ + outputDirName);
+ env.printUsage();
+ System.exit(-1);
+ }
+
+ Utils.postEvent(Utils.DEPLOYMENT_OUTPUT_DIRECTORY, outputDir
+ .getAbsolutePath());
+
+ DirectoryScanner scanner = new DirectoryScanner(module_handler,
+ MODULE_EXTENSIONS);
+ scanner.walkTree(source, outputDir, 1);
+
+ if (0 == module_handler.getFilesActedOn()) {
+ Utils
+ .screenMessage("No SCA module or fragment files were found in: "
+ + source);
+ }
+
+ failed = module_handler.failed;
+
+ } catch (Exception exception) {
+ Utils
+ .screenMessage("Unexpected error occurred while runnning the Scagen tool. The Java exception is below.");
+ exception.printStackTrace();
+ failed = true;
+ }
+
+ if (failed) {
+ Utils
+ .outputDebugString("Finished! (but encountered problems parsing modules)");
+ System.exit(-2);
+ }
+
+ Utils.outputDebugString("Finished!");
+ }
+
+ /**
+ * Provide a hint to the user on how to call this class
+ */
+ protected void printUsage() {
+ System.out
+ .println("usage: Java Scagen -dir <input_directory> -output <output_directory> [-verbose] [-deploy <deploy_dir>] [-nogenerate] [-outputCommand] [-command <copy_cmd>]");
+ System.out
+ .println(" -dir <input_directory>: the SCA module root directory");
+ System.out
+ .println(" -output <output_directory>: a directory to put the generated output into");
+ System.out.println(" [-verbose]: report on what scagen is doing");
+ System.out
+ .println(" [-deploy <deploy_dir>]: output text to help in deploying the module's artefacts");
+ System.out
+ .println(" [-command <copy_cmd>]: a string that is injected into the deploy text");
+ System.out
+ .println(" [-list]: change the deploy output text to a simple list of artefacts");
+ System.out
+ .println(" [-outputCommand]: change the deploy output text to command text format");
+ System.out
+ .println(" output is of form \"copy_cmd <dir>file1 <deploy_dir>file1\"");
+ System.out
+ .println(" [-nogenerate]: do not generate proxies and wrappers");
+
+ }
+
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java
new file mode 100644
index 0000000000..79b74c0450
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java
@@ -0,0 +1,62 @@
+/*
+ *
+ * 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.
+ */
+package org.apache.tuscany.sca.cpp.tools.services;
+
+import java.util.Map;
+
+import org.apache.tuscany.sca.cpp.tools.common.Options;
+import org.w3c.dom.Node;
+
+public class ServiceDomNodeHandler extends GenericDomNodeHandler {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.tuscany.sca.cpp.services.DomNodeHandler#handleNode(org.w3c.dom.Node,
+ * java.lang.String, java.util.Map, java.util.Map)
+ */
+ public void handleNode(Node node, String contextXPath, Map handlers,
+ Map parameters) {
+
+ // Pick up attrs and the interface.cpp child elements
+ super.handleNode(node, contextXPath, handlers, parameters);
+
+ //OK now go and create the wrapper and proxy for the service
+ createWrapperAndProxyForService(parameters);
+
+ }
+
+ /**
+ * This method will generate the wrapper and proxy C++ and header files for
+ * the service.
+ *
+ * @param parameters
+ * a map of name-value parameters
+ */
+ private void createWrapperAndProxyForService(Map parameters) {
+
+ try {
+ String mr = (String) Options.getOption("-dir");
+ parameters.put("module_root", mr);
+ ServicesGenerator.handleInterfaceHeader(parameters, false);
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java
new file mode 100644
index 0000000000..465762050b
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java
@@ -0,0 +1,825 @@
+/*
+ *
+ * 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.
+ */
+package org.apache.tuscany.sca.cpp.tools.services;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.tuscany.sca.cpp.tools.common.CParsingTool;
+import org.apache.tuscany.sca.cpp.tools.common.Headers;
+import org.apache.tuscany.sca.cpp.tools.common.Options;
+import org.apache.tuscany.sca.cpp.tools.common.Parameter;
+import org.apache.tuscany.sca.cpp.tools.common.Signature;
+import org.apache.tuscany.sca.cpp.tools.common.Utils;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Text;
+
+/**
+ * This class is the main class that handles the function that parses a C++
+ * interface header file into a DOM that holds all the semantic information
+ * about the interface - method names, parameters and return values. It then
+ * uses XSLT to generate different "views" of this data plus the parameter map
+ * from other sources that are the C++ programs for the proxy and wrapper
+ * implementations and headers.
+ */
+public class ServicesGenerator extends CParsingTool {
+
+ private static final String OPERATION_NAME_ATTR = "operationNameAttr";
+
+ private static final String HEADER_NAME_ATTR = "headerNameAttr";
+
+ private static final String SCA_OPERATION = "scaOperation";
+
+ private static final String SCA_SERVICE = "scaService";
+
+ private static final String SCA_OPERATION_RETURN_TYPE = "scaOperationReturnType";
+
+ private static final String SCA_OPERATION_PARAMETER = "scaOperationParameter";
+
+ private static final String SCA_OPERATION_PARAMETER_NAME_ATTR = "scaOperationParameterNameAttr";
+
+ private static final String SCA_OPERATION_PARAMETER_CONST_ATTR = "scaOperationParameterConstAttr";
+
+ private static final String SCA_INTERFACE_NAME_ATTR = "scaInterfaceNameAttr";
+
+ private static final String CPP_HEADER = "cppHeader";
+
+ private static boolean TESTING = true;
+
+ private static TransformerFactory txmf = null;
+
+ private static ServicesGenerator instance = null;
+
+ public ServicesGenerator(String[] args) throws Exception {
+ super(args);
+ txmf = TransformerFactory.newInstance();
+ }
+
+ /**
+ *
+ * @param parameters
+ * @param forReference
+ * true if we are creating a proxy for a reference (rather than
+ * for a service)
+ * @throws Exception
+ *
+ * The design is
+ * <ul>
+ * <li>handleInterfaceHeader
+ * <li>createDOMofMethods
+ * <li>createProxyCPPFromDom(outputDir, dom);
+ * <li>createProxyHeaderFromDom(outputDir, dom);
+ * </ul>
+ *
+ * plus if we are not generating for a reference element
+ * <ul>
+ * <li>createWrapperCPPFromDom(outputDir, dom);
+ * <li>createWrapperHeaderFromDom(outputDir, dom);
+ * <ul>
+ * Each of the create.... methods calls createOutputFromDom with a different
+ * style sheet.
+ *
+ */
+ public static void handleInterfaceHeader(Map parameters,
+ boolean forReference) throws Exception {
+ boolean failed = false;
+
+ String type = null;
+ if (forReference) {
+ type = "reference";
+ } else {
+ type = "service";
+ }
+ String interfaceHeaderFilename = (String) parameters
+ .get("/componentType/" + type + "/interface.cpp/@header");
+
+ String componentTypeFileHeaderName = interfaceHeaderFilename;
+
+ String sca_module_root = (String) Options.getOption("-dir");
+ parameters.put("module_root", sca_module_root);
+
+ if (sca_module_root != null && interfaceHeaderFilename != null
+ && interfaceHeaderFilename.length() > 0) {
+ String separator;
+ // Stick in a "/" (File.separator) if required.
+ if ((interfaceHeaderFilename.substring(0, 1).equals("/") || sca_module_root
+ .substring(sca_module_root.length() - 1,
+ sca_module_root.length()).equals("/"))
+ || (interfaceHeaderFilename.substring(0, 1).equals("\\") || sca_module_root
+ .substring(sca_module_root.length() - 1,
+ sca_module_root.length()).equals("\\"))
+
+ ) {
+ separator = "";
+ } else {
+ separator = File.separator;
+ }
+ interfaceHeaderFilename = sca_module_root + separator
+ + interfaceHeaderFilename;
+ }
+
+ File outputDir = (File) parameters.get("targetDirectoryFile");
+
+ String[] args = new String[] { "-source", interfaceHeaderFilename,
+ "-target", outputDir.getPath() };
+ ServicesGenerator gen = new ServicesGenerator(args);
+ File file;
+ try {
+ if (null == interfaceHeaderFilename) {
+ gen.printUsage();
+ System.exit(-1);
+ }
+
+ file = new File(interfaceHeaderFilename);
+ if (!file.isFile()) {
+ if (file.isDirectory()) {
+ Utils
+ .rude("This tool works at the header file level and not for directories like "
+ + file);
+ }
+ Utils.rude("Bad file or directory " + file);
+ }
+ File source = file;
+ if (!outputDir.exists() && !outputDir.mkdir())
+ Utils.rude("Failed to create directory " + outputDir);
+
+ // The class below is the one that will go through the header
+ // file(s)
+ Headers headers = new Headers();
+
+ if (null != interfaceHeaderFilename) {
+ Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_ENCOUNTERED, file
+ .getAbsolutePath());
+ Utils.postEvent(Utils.EVENT_TYPE_FILE_PARSED,
+ "Scagen processing C++ interface header "
+ + file.getAbsolutePath());
+ headers.actOnFile(file, outputDir, 1);
+ Utils.outputDebugString("Parsing files...");
+ }
+
+ String nameOfSorR = null;
+ String referenceName = null;
+ String serviceName = null;
+
+ if (forReference) {
+
+ Object rn = parameters.get("/componentType/reference/@name");
+
+ if (rn instanceof String) {
+ referenceName = (String) rn;
+ nameOfSorR = referenceName;
+ }
+ } else {
+
+ Object sn = parameters.get("/componentType/service/@name");
+
+ if (sn instanceof String) {
+ serviceName = (String) sn;
+ nameOfSorR = serviceName;
+ }
+ }
+
+ String moduleXmlFileHeader = null;
+ String moduleXmlFileHeaderNoExt = null;
+ Object moduleh = parameters
+ .get("/module/component/implementation.cpp/@header");
+
+ if (moduleh == null) {
+ moduleh = parameters
+ .get("/moduleFragment/component/implementation.cpp/@header");
+ }
+
+ if (moduleh instanceof String) {
+ File f = new File((String) moduleh);
+ moduleXmlFileHeader = (String) moduleh;
+
+ String fname = f.getName();
+ moduleXmlFileHeaderNoExt = fname.substring(0, fname
+ .lastIndexOf('.'));
+
+ }
+
+ String implClassNameAttrFromModuleFile = (String) parameters
+ .get("implClass");
+ String implClassNamespaceAttrFromModuleFile = (String) parameters
+ .get("implNamespace");
+
+ if(implClassNamespaceAttrFromModuleFile == null || implClassNamespaceAttrFromModuleFile.length() == 0)
+ {
+ implClassNamespaceAttrFromModuleFile = "";
+ }
+ else
+ {
+ implClassNamespaceAttrFromModuleFile += "::";
+ }
+
+ String interfaceClassNameAttrFromComponentTypeFile;
+ if (forReference) {
+ interfaceClassNameAttrFromComponentTypeFile = (String) parameters
+ .get("/componentType/reference/interface.cpp/@class");
+ } else {
+ interfaceClassNameAttrFromComponentTypeFile = (String) parameters
+ .get("/componentType/service/interface.cpp/@class");
+ }
+
+ List methods = headers.getAllMethods();
+
+ // Pull out one of the methods' namespace attributes.
+ String intfNamespace = null;
+ if (methods.size() > 0) {
+ Signature method = (Signature) methods.get(0);
+ intfNamespace = method.getNamespace();
+ }
+
+ if (interfaceClassNameAttrFromComponentTypeFile != null) {
+ methods = filterToPublicMethodsOfGivenClass(methods,
+ interfaceClassNameAttrFromComponentTypeFile, true);
+ } else {
+ //We want to filter to methods of the class whose
+ //name matches the header file name.
+ // String intfClassName = (String) parameters.get("intfClass");
+ //
+ String headerFileBase = file.getName().replaceAll(
+ "\\.h|\\.hpp|\\.h++", "");
+
+ methods = filterToPublicMethodsOfGivenClass(methods,
+ headerFileBase, false);
+ }
+
+ Document dom = createDOMofMethods(methods, source, serviceName,
+ referenceName, nameOfSorR, null,
+ componentTypeFileHeaderName, moduleXmlFileHeader,
+ moduleXmlFileHeaderNoExt, intfNamespace,
+ interfaceClassNameAttrFromComponentTypeFile,
+ implClassNameAttrFromModuleFile, implClassNamespaceAttrFromModuleFile);
+
+// // Print out the generated DOM
+// StringWriter sw = new StringWriter();
+// OutputFormat outputFormat = new OutputFormat("xml", "UTF-8", true);
+// XMLSerializer serializer = new XMLSerializer(sw, outputFormat);
+// serializer.serialize(dom);
+// System.out.println("DOM:\n"+sw.toString());
+
+
+ createProxyCPPFromDom(outputDir, dom);
+ createProxyHeaderFromDom(outputDir, dom);
+
+ if (!forReference) {
+ createWrapperCPPFromDom(outputDir, dom);
+ createWrapperHeaderFromDom(outputDir, dom);
+ }
+
+ } catch (Exception exception) {
+ exception.printStackTrace();
+ failed = true;
+ }
+
+ if (failed) {
+ Utils.outputDebugString("Finished! (but encountered problems)");
+ System.exit(-2);
+ }
+ }
+
+ /**
+ * This methods takes a list of methods and filters them to only contain the
+ * public methods of the given class
+ *
+ * @param methods
+ * a list of methods
+ * @param className
+ * we will return a list of only this classes methods from the
+ * methods parameter
+ * @param attrSpecified
+ * if the user does not specify one we ignore namespaces
+ * @return
+ */
+ private static List filterToPublicMethodsOfGivenClass(List methods,
+ String className, boolean useNamespace) {
+ if (methods != null && className != null && className.length() > 0) {
+ for (Iterator iter = methods.listIterator(); iter.hasNext();) {
+ Signature method = (Signature) iter.next();
+ String scope = method.getScope();
+ String sig = method.getOriginal();
+ String namespace = method.getNamespace();
+
+ String qualifiedClassName;
+ if (useNamespace && null != namespace && 0 < namespace.length()) {
+ qualifiedClassName = namespace + "::"
+ + method.getTrimClassName();
+ } else {
+ qualifiedClassName = method.getTrimClassName();
+ }
+
+ // If we are not public or the classname does not match
+ // remove...
+ if (!qualifiedClassName.equals(className)
+ || -1 == scope.indexOf("public")) {
+ iter.remove();
+ }
+ }
+ }
+ return methods;
+ }
+
+ /**
+ * Use an XSLT transformation to create a Proxy "view" of the DOM
+ * information
+ *
+ * @param outputDir
+ * where to put the C++
+ * @param dom
+ * the DOM of semantic method information
+ * @throws TransformerException
+ */
+ private static void createProxyCPPFromDom(File outputDir, Document dom)
+ throws TransformerException {
+
+ //Create the Filename from the Service Name in the DOM
+ if (dom == null) {
+ return;
+ }
+
+ String serviceOrReferenceName = "noSorRNameDefined";
+
+ String implClass = "nomoduleXmlFileHeaderDefined";
+
+ Element topNode = dom.getDocumentElement();
+ if (null != topNode) {
+ Attr attr = topNode.getAttributeNode("nameOfSorR");
+ if (attr != null) {
+ serviceOrReferenceName = attr.getNodeValue();
+ }
+
+ attr = topNode.getAttributeNode("implClass");
+ if (attr != null) {
+ implClass = attr.getNodeValue();
+ }
+ }
+
+ File proxyCPP = new File(outputDir, implClass + "_"
+ + serviceOrReferenceName + "_Proxy.cpp");
+ if (null != proxyCPP) {
+
+ Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_GENERATED, proxyCPP
+ .getAbsolutePath());
+ Utils.postEvent(Utils.EVENT_TYPE_FILE_CREATE,
+ "Scagen creating SCA for C++ proxy implementation "
+ + proxyCPP.getAbsolutePath());
+ }
+
+ createOutputFromDom(dom, proxyCPP,
+ "org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl");
+
+ }
+
+ /**
+ * Use an XSLT transformation to create a Wrapper "view" of the DOM
+ * information
+ *
+ * @param outputDir
+ * where to put the C++
+ * @param dom
+ * the DOM of semantic method information
+ * @throws TransformerException
+ */
+ private static void createWrapperCPPFromDom(File outputDir, Document dom)
+ throws TransformerException {
+
+ //Create the Filename from the Service Name in the DOM
+ if (dom == null) {
+ return;
+ }
+
+ String serviceName = "noServiceDefined";
+
+ String implClass = "nomoduleXmlFileHeaderDefined";
+
+ Element topNode = dom.getDocumentElement();
+ if (null != topNode) {
+ Attr attr = topNode.getAttributeNode("serviceName");
+ if (attr != null) {
+ serviceName = attr.getNodeValue();
+ }
+
+ attr = topNode.getAttributeNode("implClass");
+ if (attr != null) {
+ implClass = attr.getNodeValue();
+ }
+ }
+
+ File wrapperCPP = new File(outputDir, implClass + "_" + serviceName
+ + "_Wrapper.cpp");
+ if (null != wrapperCPP) {
+ Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_GENERATED, wrapperCPP
+ .getAbsolutePath());
+ Utils.postEvent(Utils.EVENT_TYPE_FILE_CREATE,
+ "Scagen creating SCA for C++ wrapper implementation "
+ + wrapperCPP.getAbsolutePath());
+ }
+ createOutputFromDom(dom, wrapperCPP,
+ "org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl");
+
+ }
+
+ /**
+ * Use an XSLT transformation to create a Proxy header "view" of the DOM
+ * information
+ *
+ * @param outputDir
+ * where to put the C++
+ * @param dom
+ * the DOM of sematic method information
+ * @throws TransformerException
+ */
+ private static void createProxyHeaderFromDom(File outputDir, Document dom)
+ throws TransformerException {
+
+ //Create the Filename from the Service Name in the DOM
+ if (dom == null) {
+ return;
+ }
+
+ String serviceOrReferenceName = "noServiceDefined";
+ String intfClass = "noInterfaceClassNameOrDefaultDefined";
+ String implClass = "noImplementationClassOrDefaultDefined";
+
+ Element topNode = dom.getDocumentElement();
+ if (null != topNode) {
+ Attr attr = topNode.getAttributeNode("nameOfSorR");
+ if (attr != null) {
+ serviceOrReferenceName = attr.getNodeValue();
+ }
+ attr = topNode.getAttributeNode("intfClass");
+ if (attr != null) {
+ intfClass = attr.getNodeValue();
+ }
+ attr = topNode.getAttributeNode("implClass");
+ if (attr != null) {
+ implClass = attr.getNodeValue();
+ }
+ }
+
+ File proxyHeader = new File(outputDir, implClass + "_"
+ + serviceOrReferenceName + "_Proxy.h");
+ if (null != proxyHeader) {
+ Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_GENERATED, proxyHeader
+ .getAbsolutePath());
+ Utils.postEvent(Utils.EVENT_TYPE_FILE_CREATE,
+ "Scagen creating SCA for C++ proxy header "
+ + proxyHeader.getAbsolutePath());
+ }
+
+ createOutputFromDom(dom, proxyHeader,
+ "org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl");
+
+ }
+
+ /**
+ * Use an XSLT transformation to create a Wrapper header "view" of the DOM
+ * information
+ *
+ * @param outputDir
+ * where to put the C++
+ * @param dom
+ * the DOM of sematic method information
+ * @throws TransformerException
+ */
+ private static void createWrapperHeaderFromDom(File outputDir, Document dom)
+ throws TransformerException {
+
+ //Create the Filename from the Service Name in the DOM
+ if (dom == null) {
+ return;
+ }
+
+ String serviceName = "noServiceDefined";
+
+ String implClass = "nomoduleXmlFileHeaderDefined";
+
+ Element topNode = dom.getDocumentElement();
+ if (null != topNode) {
+ Attr attr = topNode.getAttributeNode("serviceName");
+ if (attr != null) {
+ serviceName = attr.getNodeValue();
+ }
+
+ attr = topNode.getAttributeNode("implClass");
+ if (attr != null) {
+ implClass = attr.getNodeValue();
+ }
+ }
+
+ File wrapperHeader = new File(outputDir, implClass + "_" + serviceName
+ + "_Wrapper.h");
+
+ if (null != wrapperHeader) {
+ Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_GENERATED, wrapperHeader
+ .getAbsolutePath());
+ Utils.postEvent(Utils.EVENT_TYPE_FILE_CREATE,
+ "Scagen creating SCA for C++ wrapper header "
+ + wrapperHeader.getAbsolutePath());
+ }
+ createOutputFromDom(dom, wrapperHeader,
+ "org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl");
+
+ }
+
+ /**
+ * This method will return a class loader that can see the resources that
+ * are parts of "this" package.
+ */
+ private static ClassLoader getALoader() {
+
+ LittleClass lc;
+ try {
+ lc = new LittleClass();
+ return lc.getClass().getClassLoader();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ /**
+ * This method will generically process the DOM using a stylesheet passed
+ * in.
+ *
+ * @param dom
+ * the source of data (the model)
+ * @param outputFile
+ * where to put the result
+ * @param xslTransformationFileName
+ * the xsl file containing the "view"
+ * @throws TransformerException
+ */
+ private static void createOutputFromDom(Document dom, File outputFile,
+ String xslTransformationFileName) throws TransformerException {
+
+ if(Options.noGenerate()){
+ return;
+ }
+
+ InputStream stream = getALoader().getResourceAsStream(
+ xslTransformationFileName);
+ StreamSource ss = new StreamSource(stream);
+ StreamResult out = new StreamResult(outputFile);
+ try {
+ Transformer xslt = txmf.newTransformer(ss);
+
+ // Unless a width is set, there will be only line breaks but no
+ // indentation.
+ // The IBM JDK and the Sun JDK don't agree on the property name,
+ // so we set them both.
+ //
+ try {
+ xslt.setOutputProperty(
+ "{http://xml.apache.org/xalan}indent-amount", "2");
+ } catch (Throwable t) {
+ //OK to ignore this, depends on XSLT engine and one will fail
+ }
+ try {
+ xslt.setOutputProperty(
+ "{http://xml.apache.org/xslt}indent-amount", "2");
+ } catch (Throwable t) {
+ //OK to ignore this, depends on XSLT engine and one will fail
+ }
+
+ DOMSource from = new DOMSource(dom);
+
+ xslt.transform(from, out);
+
+ } catch (TransformerConfigurationException e) {
+ e.printStackTrace();
+ throw (e);
+ } catch (TransformerException e) {
+ e.printStackTrace();
+ throw (e);
+ } finally {
+ try {
+ stream.close();
+ } catch (IOException e1) {
+ // unlikely but if
+ // we can't close it, we can't close it
+ }
+ }
+
+ }
+
+ //TODO clear up the parameter list below to make it smaller if
+ // possible
+ /**
+ * This method will create A DOM containing all the semantic information
+ * that it can extract from a C++ header file.
+ *
+ * @param methods
+ * a list of methods that are going into the DOM
+ * @param source
+ * the header file the methods came from
+ * @param serviceName
+ * the name of the service
+ * @referenceName the name of the reference
+ * @nameOfSorR the non null one of the two parameters above
+ * @headerClassName the name of the header class
+ * @param moduleXmlFileImplHeaderNameWithPathAndExt
+ * the source filename
+ * @param moduleXmlFileHeaderNoExtorPath
+ * the shortname of the source file
+ * @param implClass
+ * the implementation class
+ * @param intfClass
+ * the interface we are turning into a service
+ * @return
+ */
+ private static Document createDOMofMethods(List methods, File source,
+ String serviceName, String referenceName, String nameOfSorR,
+ String headerClassName,
+ String componentTypeXmlFileIntfHeaderNameWithPathAndExt,
+ String moduleXmlFileImplHeaderNameWithPathAndExt,
+ String moduleXmlFileHeaderNoExtorPath, String intfNamespace,
+ String intfClass, String implClass, String implNamespace) {
+
+ if (methods == null) {
+ return null;
+ }
+
+ // Create a DOM of the methods
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ Document document = null;
+ try {
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ document = builder.newDocument();
+
+ Element root = (Element) document.createElement(CPP_HEADER);
+
+ root.setAttribute(HEADER_NAME_ATTR, source.getPath());
+
+ document.appendChild(root);
+
+ Element intf = (Element) document.createElement(SCA_SERVICE);
+ root.appendChild(intf);
+
+ // Go through all the signatures we have collected...
+ Signature s = null;
+ for (Iterator iter = methods.iterator(); iter.hasNext();) {
+ s = (Signature) iter.next();
+
+ // Each signature is an operation
+ Element op = document.createElement(SCA_OPERATION);
+ op.setAttribute(OPERATION_NAME_ATTR, s.getMethodName());
+ intf.appendChild(op);
+
+ Parameter[] parms = s.getParameters();
+ if (parms != null) {
+
+ for (int i = 0; i < parms.length; i++) {
+ Element parm = (Element) document
+ .createElement(SCA_OPERATION_PARAMETER);
+ String type_string = parms[i].getTypeWithoutConst()
+ .toString();
+
+ type_string = type_string.replaceAll(":: ", "::");
+
+ Text text = document.createTextNode(type_string);
+ parm.appendChild(text);
+ parm.setAttribute(SCA_OPERATION_PARAMETER_NAME_ATTR,
+ parms[i].getName());
+
+ if (parms[i].getTypeWithoutConst().intern() != parms[i]
+ .getType().intern()) {
+ parm.setAttribute(
+ SCA_OPERATION_PARAMETER_CONST_ATTR, "true");
+ }
+
+ op.appendChild(parm);
+ // TO DO only really stores the value
+ // unsafely/temporarily
+ // which is fine while we handle everything at the
+ // end of parsing the "leaf" that represents that actual
+ // interface/service but the below will cause the second
+ // service
+ // processed to overwite the first one in the DOM. I we
+ // wish
+ // to do some overall processing at the end we will have
+ // to
+ // use a better more XPath like key that varies by
+ // instance
+ // of the service.
+ intf.setAttribute(SCA_INTERFACE_NAME_ATTR, s
+ .getTrimClassName());
+ }
+ }
+
+ Element rc = document.createElement(SCA_OPERATION_RETURN_TYPE);
+ rc.appendChild(document.createTextNode(s.getReturnType()
+ .toString().replaceAll(":: ", "::")));
+ op.appendChild(rc);
+
+ root.appendChild(intf);
+ }
+
+ // Set the name of the Service
+ // here, if we are not passed one we use
+ // the classname from the last header function signature...
+ if (serviceName == null && s != null) {
+ serviceName = s.getTrimClassName();
+ }
+
+ // this is used for the proxy file name but we need to
+ // use the reference name if this is pulled in due to it
+ // being a reference!!!
+ if (serviceName != null)
+ root.setAttribute("serviceName", serviceName);
+ if (referenceName != null)
+ root.setAttribute("referenceName", referenceName);
+ if (nameOfSorR != null)
+ root.setAttribute("nameOfSorR", nameOfSorR);
+
+ if (implClass != null) {
+ root.setAttribute("implClass", implClass);
+ } else {
+ root.setAttribute("implClass", moduleXmlFileHeaderNoExtorPath);
+ }
+
+ if (implClass != null) {
+ root.setAttribute("implNamespace", implNamespace);
+ }
+
+ // default class name to the name of the header...
+ if (headerClassName == null && source != null) {
+ headerClassName = source.getName().replaceAll(
+ "\\.h|\\.hpp|\\.h++", "");
+ }
+ root.setAttribute("headerClassName", headerClassName);
+
+ if (null == intfClass) {
+ intfClass = headerClassName;
+ }
+
+ if (null != intfNamespace) {
+ root.setAttribute("namespace", intfNamespace);
+ if (null != intfClass && !intfClass.startsWith(intfNamespace)) {
+ intfClass = intfNamespace + "::" + intfClass;
+ }
+ }
+
+ root.setAttribute("intfClass", intfClass);
+
+ if (componentTypeXmlFileIntfHeaderNameWithPathAndExt == null) {
+ componentTypeXmlFileIntfHeaderNameWithPathAndExt = "componentTypeHeader";
+ }
+ root.setAttribute("componentTypeHeader",
+ componentTypeXmlFileIntfHeaderNameWithPathAndExt);
+
+ if (moduleXmlFileImplHeaderNameWithPathAndExt == null) {
+ moduleXmlFileImplHeaderNameWithPathAndExt = "moduleXmlFileImplHeader";
+ }
+ root.setAttribute("moduleXmlFileHeader",
+ moduleXmlFileImplHeaderNameWithPathAndExt);
+
+ if (moduleXmlFileHeaderNoExtorPath == null) {
+ moduleXmlFileHeaderNoExtorPath = "moduleXmlFileHeaderNoExt";
+ }
+ root.setAttribute("moduleXmlFileHeaderNoExt",
+ moduleXmlFileHeaderNoExtorPath);
+
+ } catch (ParserConfigurationException pce) {
+ // Parser with specified options can't be built
+ pce.printStackTrace();
+ }
+
+ return document;
+
+ }
+
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java
new file mode 100644
index 0000000000..047e1ab3f1
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java
@@ -0,0 +1,202 @@
+/*
+ *
+ * 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.
+ */
+package org.apache.tuscany.sca.cpp.tools.services;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.dom.DOMSource;
+
+import org.apache.tuscany.sca.cpp.tools.common.FileActor;
+import org.apache.tuscany.sca.cpp.tools.common.Utils;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+/**
+ * The purpose of this abstract class is to provide a home for the standard
+ * processing that is involved in turning a XML file into an internal DOM.
+ */
+public abstract class XMLFileActor implements FileActor {
+
+ protected static Map handlers = new HashMap();
+
+ protected static Map parameters = new HashMap();
+
+ public boolean failed;
+
+ private int filesActedOn=0;
+
+ protected static TransformerFactory transformerFactory = TransformerFactory
+ .newInstance();
+
+ /**
+ * This method is the main FileActor method
+ *
+ * @see FileActor#actOnFile(File, File, int) Here we create an initial DOM
+ * and kick off the processing (using the handler map that has been set
+ * up by the concrete subclass).
+ *
+ * @param moduleXML
+ * the sca.module or fragment file
+ * @param target
+ * the target directory
+ * @param depth
+ * not uesed here but in the
+ * @see FileActor#actOnFile(File, File, int) interface to allow for
+ * recursive diving into a directory structure.
+ */
+ public void actOnFile(File moduleXML, File target, int depth)
+ throws Exception {
+
+ if (null == moduleXML || null == target) {
+ return;
+ }
+
+ filesActedOn++;
+
+ parameters.put("sourceFile", moduleXML);
+ parameters.put("targetFile", target);
+
+ if (transformerFactory.getFeature(DOMSource.FEATURE)
+ && transformerFactory.getFeature(DOMResult.FEATURE)) {
+ Document dom = createDomFromXMLFile(moduleXML);
+ if (dom != null) {
+ parameters.put("targetDirectoryFile", target);
+ DomHandler.handleDom(dom, handlers, parameters);
+ }
+ }
+ }
+
+ /**
+ * This method builds an in memory DOM from an XML file
+ *
+ * @param xmlSourceFile
+ * the XML file we are handling
+ * @return the resulting document
+ */
+ protected Document createDomFromXMLFile(File xmlSourceFile) {
+ Document dom = null;
+ DocumentBuilderFactory f = DocumentBuilderFactory.newInstance();
+ //We do not validate via f.setValidating(true);
+ f.setNamespaceAware(true);
+
+ try {
+ DocumentBuilder parser = f.newDocumentBuilder();
+ dom = parser.parse(xmlSourceFile);
+ } catch (SAXException sxe) {
+ String path;
+ try {
+ path = xmlSourceFile.getCanonicalPath();
+ } catch (IOException e) {
+ path = xmlSourceFile.getPath();
+ }
+ Utils.screenMessage("There has been a SAXException of type "
+ + sxe.getLocalizedMessage());
+ if (null != xmlSourceFile) {
+ Utils.screenMessage(" when processing file " + path);
+ } else {
+ Utils.screenMessage(" as the input file is null.");
+ }
+
+// Leave for possible future debug option
+// Utils.screenMessage(" The returned Java exception is below.");
+// if (sxe.getException() != null)
+// sxe.getException().printStackTrace();
+// else
+// sxe.printStackTrace();
+ } catch (ParserConfigurationException pce) {
+ String path;
+ try {
+ path = xmlSourceFile.getCanonicalPath();
+ } catch (IOException e) {
+ path = xmlSourceFile.getPath();
+ }
+ Utils
+ .screenMessage("There has been a ParserConfigurationException of type "
+ + pce.getLocalizedMessage());
+ if (null != xmlSourceFile) {
+ Utils.screenMessage(" when processing file " + path);
+ } else {
+ Utils.screenMessage(" as the input file is null.");
+ }
+
+// Leave for possible future debug option
+// Utils.screenMessage(" The returned Java exception is below.");
+// pce.printStackTrace();
+
+ } catch (IOException ioe) {
+ String path;
+ try {
+ path = xmlSourceFile.getCanonicalPath();
+ } catch (IOException e) {
+ path = xmlSourceFile.getPath();
+ }
+
+ Utils.screenMessage("Unable to open file " + path);
+ Utils.screenMessage(this.getContextMessage());
+
+
+
+ }
+
+ return dom;
+ }
+
+ /**
+ * @return an error message - usually over-ridden.
+ */
+ private String getContextMessage() {
+ return "Check the file exists and can be read.";
+ }
+
+ /**
+ * Set a parameter
+ *
+ * @param name
+ * @param value
+ */
+ public void setParameter(String name, Object value) {
+ parameters.put(name, value);
+ }
+
+ /**
+ * Get a parameter
+ *
+ * @param name
+ * @param value
+ * @return the value of the parameter
+ */
+ public Object getParameter(String name, Object value) {
+ return parameters.get(name);
+ }
+
+
+
+ /**
+ * @return Returns the filesActedOn.
+ */
+ public int getFilesActedOn() {
+ return filesActedOn;
+ }
+} \ No newline at end of file
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html
new file mode 100644
index 0000000000..316e4cd56e
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html
@@ -0,0 +1,140 @@
+<html>
+
+<head>
+<title>Design documentation for org\apache\tuscany\sca\cpp\tools\services</title>
+</head>
+
+<body lang=EN-GB>
+
+<div class=Section1>
+
+<h1>Overview</h1>
+
+
+
+<p>This package contains classes that generate C++ wrappers and
+proxies for C++ implementations of SCA services. </p>
+
+<h2>What the package does</h2>
+
+<p>The Scagen class main method will take in an input and
+output directory name. The input directory is taken to be the SCA module root
+directory.  The tool will generate the wrapper and proxy headers and methods
+bodies in the output directory. </p>
+
+<p>These proxies and wrappers enable the SCA for C++ runtime to
+act as a conduit for SCA C++ calls in a type free manner. Client code can call
+the type specific functions that are in the generated proxy classes. The call
+is marshalled into a generic format and a SCA for C++ runtime function with a
+standard signature is invoked. The details of the call are passed as data. </p>
+
+<p>On the other end of the runtime, a generated function with a
+standard signature is called, this function will inspect the data that
+represents the call’s method name and call the appropriate type specific
+function in the C++ implementation. </p>
+
+<h2>The Input Data Used</h2>
+
+<p>The input directory passed to the Scagen method is taken to
+be the SCA module root directory. All the sca.module and .fragment files in
+that directory are inspected to resolve all the &lt;component/&gt; elements
+within them. </p>
+
+<p>Each &lt;component/&gt; element found is inspected to see if
+it has a &lt;implementation.cpp/&gt; element within it. </p>
+
+<p>Each &lt;implementation.cpp/&gt; element should have a
+header attribute that represents a C++ header file that contains function
+prototypes for the C++ implementation of the service. An optional class
+attribute can be used to select one class if more than one that is present in
+the header file. The default class is the one with the same name as the header
+file. The tool will verify that the implementation header contains an
+appropriate class prototype. </p>
+
+
+
+<p>The directory that contains the implementation header should
+also contain a matching .componentType file for the equivalent SCA component. So
+for example, a MyServiceImpl.h file would have a corresponding MyServiceImpl.componentType
+file in the same directory. </p>
+
+
+
+<p>Each componentType file is inspected for &lt;service/&gt;
+and &lt;reference/&gt; elements. For each &lt;service/&gt; element that is
+found that contains a &lt;interface.cpp/&gt; element within it,</p>
+
+<p>the header attribute of the &lt;interface.cpp/&gt; is taken
+as the filename of the C++ interface header for the SCA service.  This C++
+header file is opened and used as a means for specifying the SCA service
+resulting in an appropriate wrapper and proxy being generated for this service
+interface. Both method bodies and headers are generated in the given output
+directory. The processing of a &lt;reference/&gt; element is the same except
+that only a proxy header and implementation are generated. </p>
+
+
+
+
+
+<h2>Outline Design: How it Works</h2>
+
+
+
+<p>The basic approach is to scan in the XML files by first
+creating a DOM document tree of them and then recursively rifling through the DOM 
+with some generic code in the XMLFileActorClass by default this processing will
+build up a map which maps the XPath location of attributes to their values.
+Additionally subclasses can add to a “handlers map” which maps from the name of
+a particular element to an object that implements the DomNodeHandler interface.
+If the XMLFileActor code comes across any element that has an equivalent handler
+in the handler map the objects handleNode method will be called. </p>
+
+<p>Typically the DomNodeHandler’s handle node interface will
+use XPath to pull out the parameters that it is interested in from the
+parameters map that is being built up by the generic code. </p>
+
+<p>This design was chosen as the Java level specified for the
+original implementation did not have direct XPath query of XML data but it was
+known that this would be available in Java 1.5 onwards. The design allows the
+DOM and parameters map handling to be replaced in the future with JRE 1.5 code
+with less impact on the rest of the code.</p>
+
+
+
+<p>The processing leads to the parsing of the C++ interface
+files using the org\apache\tuscany\sca\cpp\tools\common package. This results
+in a Headers object</p>
+
+<p>that contains a List of Signature objects, each one
+representing a function prototype found in the header. </p>
+
+
+
+<p>We are aiming to get all the semantic data we want to use
+into a DOM document (this represents the model of our input data) and then use
+XSLT to create the 4 different views of this data:</p>
+
+<p>Proxy C++ header</p>
+
+<p>Proxy C++  body</p>
+
+<p>Wrapper C++ header</p>
+
+<p>Wrapper C++ body</p>
+
+
+
+<p>So we prepopulate the DOM with parameter data that comes
+from the XML files and then iterate through the Signatures that are returned
+from the C++ header parser transferring the useful data into the DOM. </p>
+
+
+
+<p>We than use 4 XSLT stylesheets to generate the C++ output
+files as required. </p>
+
+</div>
+
+</body>
+
+</html>
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl
new file mode 100644
index 0000000000..d6e564599a
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyCPP.xsl
@@ -0,0 +1,274 @@
+<!--
+/*
+ *
+ * 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 WARRANTY
+ */
+
+ TODO There is duplication in the "..no_parms" templates with
+ the equivalent templates they are based on - that it would be
+ fairly easy to factor out.
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!-- Part of the org.apache.tuscany.sca.cpp.tools.services packages
+
+ This stylesheet creates the CPP implementation of the
+ proxy body for a given SCA service
+ -->
+<xsl:output method="text"/>
+
+<!-- We do not generate output sourced from cppScopes -->
+<xsl:template match="cppScope"></xsl:template>
+
+<!-- We do not generate output sourced from private scaOperations -->
+<xsl:template match="scaOperation[@cppScope='private']">
+</xsl:template>
+
+<!-- We do not generate output sourced from the operation return types -->
+<xsl:template match="scaOperationReturnType">
+</xsl:template>
+
+
+<!--
+ CPP Header/Root
+-->
+<xsl:template match="cppHeader">/*
+ * 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.
+ */
+
+<xsl:apply-templates select="scaService" mode="include_header"/>
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;<!-- thats the prologue over nad done with
+ now continue with the scaServiceElement -->
+<xsl:apply-templates/> <!-- should go on to generic scaService below -->
+</xsl:template>
+
+<!-- -->
+<!-- Service -->
+<!-- -->
+<xsl:template match="scaService">
+<xsl:variable name="clazz">
+ <xsl:value-of select="../@implClass"/>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="../@nameOfSorR"/>
+ <xsl:text>_Proxy</xsl:text>
+</xsl:variable>
+<xsl:text>
+extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ </xsl:text><xsl:value-of select="$clazz"/>
+<xsl:text>* </xsl:text>
+<xsl:value-of select="$clazz"/>
+<xsl:text>_Factory(ServiceWrapper* target)
+ {
+ return new </xsl:text><xsl:value-of select="$clazz"/><xsl:text>(target);
+ }
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ void </xsl:text>
+<xsl:value-of select="$clazz"/>
+<xsl:text>_Destructor(void* proxy)
+ {
+ delete (</xsl:text><xsl:value-of select="$clazz"/><xsl:text>*)proxy;
+ }
+}
+
+</xsl:text>
+<xsl:value-of select="$clazz"/><xsl:text>::</xsl:text><xsl:value-of select="$clazz"/>(ServiceWrapper* targ) : target(targ)
+{
+}
+
+<xsl:value-of select="$clazz"/><xsl:text>::~</xsl:text><xsl:value-of select="$clazz"/>()
+{
+ if (target)
+ delete target;
+}<!--
+OK we have done the stuff that is not specific to any function in the service
+now we can do another apply-templates to pick up on the 0, 1 or more scaOperation
+DOM nodes that each relate to a function in the service
+ -->
+<xsl:apply-templates/>
+<!-- Always make sure we have a (visible) final newline -->
+<xsl:text>
+
+</xsl:text>
+</xsl:template>
+
+<!-- This template is just a small function that will generate the
+ #include that pulls in the correct C++ header
+ -->
+<xsl:template match="scaService" mode="include_header">
+<xsl:variable name="clazz">
+ <xsl:value-of select="../@implClass"/>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="../@nameOfSorR"/>
+ <xsl:text>_Proxy</xsl:text>
+</xsl:variable>
+<xsl:text>#include "</xsl:text>
+<xsl:value-of select="$clazz"/>
+<xsl:text>.h"</xsl:text>
+</xsl:template>
+
+
+
+<!-- -->
+<!-- Operation -->
+<!-- -->
+<xsl:template match="scaOperation">
+<xsl:variable name="clazz">
+ <xsl:value-of select="../../@implClass"/>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="../../@nameOfSorR"/>
+ <xsl:text>_Proxy</xsl:text>
+</xsl:variable>
+
+<!-- ignore the constructor and destructor -->
+<xsl:if test="@operationNameAttr != $clazz
+ and @operationNameAttr != concat('~', $clazz)" >
+<xsl:text>
+</xsl:text>
+<xsl:value-of select="scaOperationReturnType"/>
+<xsl:text> </xsl:text>
+<xsl:value-of select="$clazz"/><xsl:text>::</xsl:text>
+<xsl:value-of select="@operationNameAttr"/><xsl:text>(</xsl:text>
+<xsl:for-each select="scaOperationParameter">
+<xsl:if test=".!='void'">
+ <xsl:variable name="scaOperationParameterNameAttr">
+ <xsl:value-of select="concat('arg', position()-1 )"/>
+ </xsl:variable>
+ <xsl:variable name="isConst">
+ <xsl:value-of select="@scaOperationParameterConstAttr"/>
+ </xsl:variable>
+ <xsl:if test="contains($isConst,'true')">const</xsl:if><xsl:text> </xsl:text>
+ <xsl:value-of select="."/> <!-- get the actual type -->
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$scaOperationParameterNameAttr"/>
+ <xsl:choose>
+ <xsl:when test="position()=last()">
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>, </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:if> <!-- test=".!='void'" -->
+
+</xsl:for-each>
+<xsl:text>)
+{</xsl:text>
+<xsl:call-template name="proxy_method_body"/>
+<xsl:text>
+}
+</xsl:text>
+</xsl:if>
+</xsl:template>
+
+
+<xsl:template name="proxy_method_body">
+ <xsl:variable name="noOfParms">
+ <xsl:choose>
+ <xsl:when test=".='void'">
+<xsl:text>0</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="last()"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+<xsl:text>
+ Operation operation("</xsl:text>
+ <xsl:value-of select="@operationNameAttr"/>
+ <xsl:text>");</xsl:text>
+ <xsl:if test="$noOfParms!=0">
+ <xsl:for-each select="scaOperationParameter">
+ <xsl:call-template name="proxy_method_body_set_parameter"/>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:call-template name="proxy_method_body_prepare_return_var"/>
+ <xsl:text>
+ target-&gt;invoke(operation);</xsl:text>
+ <xsl:call-template name="proxy_method_body_return"/>
+</xsl:template>
+
+
+<xsl:template name="proxy_method_body_return">
+ <xsl:variable name="type">
+ <xsl:value-of select="scaOperationReturnType/text()"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$type='void'"><!-- nothing -->
+ <xsl:text>
+ return;</xsl:text>
+ </xsl:when>
+ <xsl:when test="contains($type, '&amp;')"><!-- reference -->
+ <xsl:variable name="type_no_amp">
+ <xsl:value-of select="substring-before($type, '&amp;')"/>
+ </xsl:variable>
+ <xsl:text>
+ return *(</xsl:text><xsl:value-of select="$type_no_amp"/><xsl:text>*)operation.getReturnValue();</xsl:text>
+ </xsl:when>
+ <xsl:otherwise><!-- simple type -->
+ <xsl:text>
+ return ret;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="proxy_method_body_prepare_return_var">
+ <xsl:variable name="type">
+ <xsl:value-of select="scaOperationReturnType/text()"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$type='void'"><!-- nothing -->
+ <!-- nothing -->
+ </xsl:when>
+ <xsl:when test="contains($type, '&amp;')"><!-- reference -->
+ </xsl:when>
+ <xsl:otherwise>
+<xsl:text>
+ </xsl:text> <xsl:value-of select="$type"/><xsl:text> ret;
+ operation.setReturnValue(&amp;ret);</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+
+</xsl:template>
+
+
+<xsl:template name="proxy_method_body_set_parameter">
+ <xsl:variable name="scaOperationParameterNameAttrInner">
+ <xsl:value-of select="concat('arg', position()-1 )"/>
+ </xsl:variable>
+ <xsl:variable name="type">
+ <xsl:value-of select="."/>
+ </xsl:variable>
+ operation.addParameter(&amp;<xsl:value-of select="$scaOperationParameterNameAttrInner"/><xsl:text>);</xsl:text>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl
new file mode 100644
index 0000000000..8c19b20727
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfProxyHeader.xsl
@@ -0,0 +1,222 @@
+<!--
+/*
+ *
+ * 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 WARRANTY
+ */
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!-- Part of the org.apache.tuscany.sca.cpp.tools.services packages
+ -
+ - This stylesheet creates the CPP implementation of the
+ - proxy header for a given SCA service
+ -->
+
+ <xsl:output method="text" />
+
+ <!-- Delete cppScopes -->
+ <xsl:template match="cppScope"></xsl:template>
+
+ <!-- Delete private methods cppScopes -->
+ <xsl:template match="scaOperation[@cppScope='private']">
+ </xsl:template>
+
+ <!-- Delete private methods cppScopes -->
+ <xsl:template match="scaOperationReturnType"></xsl:template>
+
+
+ <!-- -->
+ <!-- CPP Header/Root -->
+ <!-- -->
+ <xsl:template match="cppHeader">
+ <xsl:variable name="class">
+ <xsl:value-of select="concat(@implClass, '_', @nameOfSorR, '_Proxy')"/>
+ </xsl:variable>
+<xsl:text>/*
+ * 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.
+ */
+
+</xsl:text>
+ <xsl:call-template name="ifndef_start">
+ <xsl:with-param name="class"
+ select="$class"/>
+ </xsl:call-template>
+
+
+ <xsl:call-template name="include_headers">
+ <xsl:with-param name="componentTypeHeader"
+ select="@componentTypeHeader"/>
+ </xsl:call-template>
+
+ <xsl:apply-templates select="scaService" mode="class_body"/>
+
+ <xsl:call-template name="ifndef_end">
+ <xsl:with-param name="class"
+ select="$class"/>
+ </xsl:call-template>
+<!-- Always make sure we have a (visible) final newline -->
+<xsl:text>
+
+</xsl:text>
+</xsl:template>
+
+
+<!-- Here are the subroutine templates in order -->
+
+ <xsl:template name="ifndef_start">
+ <!--For example,
+ #ifndef CustomerInfoImpl_CustomerInfoService_Proxy_h
+ #define CustomerInfoImpl_CustomerInfoService_Proxy_h
+ -->
+ <xsl:param name="class"/>
+ <xsl:text>#ifndef </xsl:text><xsl:value-of select="$class"/><xsl:text>_h</xsl:text>
+<!-- newline -->
+<xsl:text>
+</xsl:text>
+ <xsl:text>#define </xsl:text><xsl:value-of select="$class"/><xsl:text>_h</xsl:text>
+<!-- newline -->
+<xsl:text>
+
+</xsl:text>
+ <xsl:text>#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif </xsl:text>
+<!-- newline -->
+<xsl:text>
+
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="include_headers">
+ <!--For example,
+ #include "CustomerInfo.h"
+ #include "tuscany/sca/core/ServiceWrapper.h"
+ -->
+ <xsl:param name="componentTypeHeader"/>
+ <xsl:text>#include "</xsl:text><xsl:value-of select="translate($componentTypeHeader,'\','/')"/><xsl:text>"</xsl:text>
+<!-- newline -->
+<xsl:text>
+</xsl:text>
+ <xsl:text>#include "tuscany/sca/core/ServiceWrapper.h"</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="scaService" mode="class_body">
+ <!--For example
+ class proxyclassname : public interface_class
+ {
+ constructor
+ destructor
+ then apply operation templates for operations
+ };
+
+ E.g. Specifically
+
+ class CustomerInfoImpl_CustomerInfoService_Proxy : public CustomerInfo
+ {
+ public:
+ CustomerInfoImpl_CustomerInfoService_Proxy(tuscany::sca::ServiceWrapper*);
+ virtual ~CustomerInfoImpl_CustomerInfoService_Proxy();
+ virtual const char* getCustomerInformation(const char* customerID);
+ private:
+ tuscany::sca::ServiceWrapper* target;
+ };
+ -->
+ <!-- TODO second definition, remove? -->
+ <xsl:variable name="class">
+ <xsl:value-of select="concat(../@implClass, '_', ../@nameOfSorR, '_Proxy')"/>
+ </xsl:variable>
+<xsl:text>
+
+class </xsl:text>
+<xsl:value-of select="$class"/>
+<xsl:text> : public </xsl:text><xsl:value-of select="../@intfClass"/>
+<xsl:text>
+{
+public:
+ </xsl:text><xsl:value-of select="$class"/><xsl:text>(tuscany::sca::ServiceWrapper*);</xsl:text>
+ <xsl:text>
+ virtual ~</xsl:text><xsl:value-of select="$class"/><xsl:text>();
+</xsl:text>
+ <!-- operations -->
+ <xsl:apply-templates/>
+<xsl:text>private:
+ tuscany::sca::ServiceWrapper* target;
+};
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="ifndef_end">
+ <!--For example,
+ #endif // CustomerInfoImpl_CustomerInfoService_Proxy_h
+ -->
+ <xsl:param name="class"/>
+ <xsl:text>
+#endif // </xsl:text><xsl:value-of select="$class"/><xsl:text>_h</xsl:text>
+ </xsl:template>
+
+
+
+
+
+
+<!-- Operation -->
+<!--For example
+ virtual const char* getCustomerInformation(const char* customerID);
+-->
+<xsl:template match="scaOperation">
+<xsl:variable name="class">
+ <xsl:value-of select="concat(../../@implClass, '_', ../../@nameOfSorR, '_Proxy')"/>
+</xsl:variable>
+<xsl:if test="@operationNameAttr != $class
+ and @operationNameAttr != concat('~', $class)" >
+<xsl:text> virtual </xsl:text>
+<xsl:value-of select="scaOperationReturnType"/>
+<xsl:text> </xsl:text>
+<xsl:value-of select="@operationNameAttr"/><xsl:text>(</xsl:text>
+<xsl:for-each select="scaOperationParameter">
+ <xsl:variable name="isConst">
+ <xsl:value-of select="@scaOperationParameterConstAttr"/>
+ </xsl:variable>
+ <xsl:variable name="noOfParms">
+ <xsl:value-of select="last()"/>
+ </xsl:variable>
+ <xsl:if test="contains($isConst,'true')">const</xsl:if><xsl:text> </xsl:text>
+ <xsl:value-of select="."/> <!-- get the actual type -->
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@scaOperationParameterNameAttr"/>
+ <xsl:choose>
+ <xsl:when test="position()=last()"></xsl:when>
+ <xsl:otherwise>
+ <xsl:text>, </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+<xsl:text>);
+</xsl:text>
+</xsl:if>
+</xsl:template>
+</xsl:stylesheet>
+
+
+
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl
new file mode 100644
index 0000000000..303ce9921d
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl
@@ -0,0 +1,276 @@
+<!--
+/*
+ *
+ * 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 WARRANTY
+ */
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!-- Part of the org.apache.tuscany.sca.cpp.tools.services packages
+ -
+ - This stylesheet creates the CPP implementation of the
+ - wrapper body for a given SCA service
+ -->
+<xsl:output method="text"/>
+
+<!-- Delete cppScopes -->
+<xsl:template match="cppScope"></xsl:template>
+
+<!-- Delete private methods cppScopes -->
+<xsl:template match="scaOperation[@cppScope='private']">
+</xsl:template>
+
+<!-- Don't act on return types -->
+<xsl:template match="scaOperationReturnType">
+</xsl:template>
+
+
+<!-- -->
+<!-- CPP Header/Root -->
+<!-- -->
+<xsl:template match="cppHeader">/*
+ * 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.
+ */
+
+<xsl:apply-templates select="scaService" mode="include_header"/>
+
+#include "osoa/sca/sca.h"
+using namespace osoa::sca;
+using namespace tuscany::sca;
+
+<xsl:if test="not(@implNamespace = '')">using <xsl:value-of select="@implNamespace"/><xsl:value-of select="@implClass"/>;</xsl:if>
+<xsl:text><!-- newline -->
+
+</xsl:text>
+<!-- thats the prologue over and done with
+ now continue with the scaServiceElement -->
+<xsl:apply-templates/> <!-- will be applied to scaService -->
+<!-- Always make sure we have a final newline -->
+<xsl:text>
+
+</xsl:text>
+</xsl:template>
+
+<!-- -->
+<!-- Service -->
+<!-- -->
+<xsl:template match="scaService">
+<xsl:variable name="class">
+ <xsl:value-of select="../@implClass"/>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="../@serviceName"/>
+ <xsl:text>_Wrapper</xsl:text>
+</xsl:variable>
+<xsl:text>extern "C"
+{
+
+ #if defined(WIN32) || defined(_WINDOWS)
+ __declspec(dllexport)
+ #endif
+ </xsl:text><xsl:value-of select="$class"/>
+<xsl:text>* </xsl:text>
+<xsl:value-of select="$class"/>
+<xsl:text>_Factory(tuscany::sca::model::Service* target)
+ {
+ return new </xsl:text><xsl:value-of select="$class"/><xsl:text>(target);
+ }
+}
+
+</xsl:text>
+<xsl:value-of select="$class"/><xsl:text>::</xsl:text><xsl:value-of select="$class"/><xsl:text>(Service* target) : ComponentServiceWrapper(target)
+{
+ impl = (</xsl:text><xsl:value-of select="../@implClass"/><xsl:text>*)getImplementation();
+}
+
+</xsl:text>
+<xsl:value-of select="$class"/><xsl:text>::~</xsl:text><xsl:value-of select="$class"/><xsl:text>()
+{
+ releaseImplementation();
+}
+
+void* </xsl:text>
+<xsl:value-of select="$class"/><xsl:text>::newImplementation()
+{
+ return new </xsl:text><xsl:value-of select="../@implClass"/><xsl:text>;
+}
+
+void </xsl:text>
+<xsl:value-of select="$class"/><xsl:text>::deleteImplementation()
+{
+ delete impl;
+}
+
+void </xsl:text><xsl:value-of select="$class"/><xsl:text>::invokeService(Operation&amp; operation)
+{
+ const string&amp; operationName = operation.getName();
+
+</xsl:text>
+<xsl:apply-templates/><!-- an if statment for each operation -->
+<xsl:text>
+
+ throw ServiceRuntimeException("Invalid operation");
+
+}</xsl:text>
+</xsl:template>
+
+<xsl:template match="scaService" mode="include_header">
+<xsl:variable name="class">
+ <xsl:value-of select="../@implClass"/>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="../@serviceName"/>
+ <xsl:text>_Wrapper</xsl:text>
+</xsl:variable>
+<xsl:text>#include "</xsl:text>
+<xsl:value-of select="$class"/>
+<xsl:text>.h"</xsl:text>
+</xsl:template>
+
+<!-- -->
+<!-- Operation -->
+<!-- -->
+<xsl:template match="scaOperation">
+<!--For example
+ if (operationName == "getCustomerInformation")
+ {
+ operation.setReturnValue(impl->getCustomerInformation((const char*)parms[0]));
+ return;
+ }
+-->
+<xsl:if test="@operationNameAttr != ../../@intfClass
+ and @operationNameAttr != concat('~', ../../@intfClass)" >
+<xsl:text> if (operationName == "</xsl:text>
+<xsl:value-of select="@operationNameAttr"/>
+<xsl:text>")
+ {
+</xsl:text>
+ <xsl:call-template name="this_operation_body"/>
+<xsl:text>
+ }
+</xsl:text>
+
+</xsl:if>
+</xsl:template>
+
+<xsl:template name="this_operation_body">
+<xsl:if test="./scaOperationParameter/text() != 'void' ">
+ <xsl:if test="normalize-space(./scaOperationParameter/text()) != ' ' ">
+ <xsl:if test="./scaOperationParameter/text() != '' ">
+ <xsl:for-each select="scaOperationParameter">
+ <xsl:call-template name="prepare_parameter_n"/>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:if>
+</xsl:if>
+<xsl:call-template name="invoke_for_return_type"/>
+<xsl:text>
+ return;</xsl:text>
+</xsl:template>
+
+<xsl:template name="prepare_parameter_n">
+ <xsl:variable name="isConst">
+ <xsl:value-of select="@scaOperationParameterConstAttr"/>
+ </xsl:variable>
+ <xsl:variable name="type">
+ <xsl:value-of select="."/>
+ </xsl:variable>
+<xsl:text> </xsl:text>
+ <xsl:choose>
+ <xsl:when test="contains($type, '&amp;')"><!-- reference -->
+ <xsl:variable name="type_no_amp">
+ <xsl:value-of select="substring-before($type, '&amp;')"/>
+ </xsl:variable>
+ <xsl:value-of select="$type"/><xsl:text> p</xsl:text><xsl:value-of select="position()-1"/><xsl:text> = *(</xsl:text><xsl:value-of select="$type_no_amp"/>
+ <xsl:text>*)operation.getParameterValue(</xsl:text><xsl:value-of select="position()-1"/><xsl:text>);
+</xsl:text>
+ </xsl:when>
+ <xsl:when test="contains($type, '*')"><!-- pointer -->
+ <xsl:if test="contains($isConst,'true')">const </xsl:if>
+ <xsl:value-of select="."/><xsl:text> p</xsl:text><xsl:value-of select="position()-1"/><xsl:text> = *(</xsl:text>
+ <xsl:if test="contains($isConst,'true')">const</xsl:if><xsl:text> </xsl:text>
+ <xsl:value-of select="$type"/>
+ <xsl:text>*)operation.getParameterValue(</xsl:text><xsl:value-of select="position()-1"/><xsl:text>);
+</xsl:text>
+ </xsl:when>
+ <xsl:when test="contains($type, 'DataObjectPtr')"><!-- DataObjectPtr -->
+ <xsl:text>DataObjectPtr&amp; p</xsl:text><xsl:value-of select="position()-1"/><xsl:text> = *(DataObjectPtr*)operation.getParameterValue(</xsl:text><xsl:value-of select="position()-1"/><xsl:text>);</xsl:text>
+ </xsl:when>
+ <xsl:otherwise><!-- simple type -->
+ <xsl:if test="contains($isConst,'true')">const </xsl:if><xsl:value-of select="$type"/><xsl:text>&amp; p</xsl:text><xsl:value-of select="position()-1"/><xsl:text> = *(</xsl:text>
+ <xsl:if test="contains($isConst,'true')">const</xsl:if><xsl:text> </xsl:text>
+ <xsl:value-of select="$type"/>
+ <xsl:text>*)operation.getParameterValue(</xsl:text><xsl:value-of select="position()-1"/><xsl:text>);
+</xsl:text>
+
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="invoke_for_return_type">
+ <xsl:variable name="type">
+ <xsl:value-of select="./scaOperationReturnType/text()"/>
+ </xsl:variable>
+ <xsl:choose>
+ <!-- VOID -->
+ <xsl:when test="$type='void'">
+<xsl:text> </xsl:text>
+ <xsl:call-template name="impl_arrow_op_brackets_and_parms"/><xsl:text>;</xsl:text>
+ </xsl:when>
+ <xsl:when test="contains($type, '&amp;')"><!-- reference -->
+ <xsl:text> </xsl:text><xsl:value-of select="$type"/><xsl:text> ret = </xsl:text><xsl:call-template name="impl_arrow_op_brackets_and_parms"/><xsl:text>;</xsl:text>
+ <xsl:text>
+ operation.setReturnValue(&amp;ret);</xsl:text>
+ </xsl:when>
+ <xsl:otherwise><!-- simple type -->
+ <xsl:text> *(</xsl:text><xsl:value-of select="$type"/><xsl:text>*)operation.getReturnValue() = </xsl:text><xsl:call-template name="impl_arrow_op_brackets_and_parms"/><xsl:text>;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="impl_arrow_op_brackets_and_parms"><!-- context is "scaOperation" -->
+ <xsl:text>impl-></xsl:text><xsl:value-of select="./@operationNameAttr"/><xsl:text>(</xsl:text>
+<xsl:if test="./scaOperationParameter/text() != 'void' ">
+ <xsl:if test="./scaOperationParameter/text() != '' ">
+ <xsl:if test="normalize-space(./scaOperationParameter/text()) != ' ' ">
+ <xsl:for-each select="scaOperationParameter">
+ <xsl:call-template name="parameter_for_parameter_list"/>
+ </xsl:for-each>
+</xsl:if>
+</xsl:if>
+</xsl:if>
+<xsl:text>)</xsl:text>
+</xsl:template>
+
+<xsl:template name="parameter_for_parameter_list">
+<xsl:text>p</xsl:text><xsl:value-of select="position()-1"/>
+ <xsl:choose>
+ <xsl:when test="position()=last()"></xsl:when>
+ <xsl:otherwise>
+ <xsl:text>, </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+
+</xsl:stylesheet>
diff --git a/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl
new file mode 100644
index 0000000000..f2afc37a07
--- /dev/null
+++ b/branches/cpp-M1/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl
@@ -0,0 +1,185 @@
+<!--
+/*
+ *
+ * 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 WARRANTY
+ */
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!-- Part of the org.apache.tuscany.sca.cpp.tools.services packages
+ -
+ - This stylesheet creates the CPP implementation of the
+ - wrapper header for a given SCA service
+ -->
+ <xsl:output method="text" />
+
+ <!-- Delete cppScopes -->
+ <xsl:template match="cppScope"></xsl:template>
+
+ <!-- Delete private methods cppScopes -->
+ <xsl:template match="scaOperation[@cppScope='private']">
+ </xsl:template>
+
+ <!-- Delete private methods cppScopes -->
+ <xsl:template match="scaOperationReturnType"></xsl:template>
+
+
+ <!-- -->
+ <!-- CPP Header/Root -->
+ <!-- -->
+ <xsl:template match="cppHeader">
+ <xsl:variable name="class">
+ <xsl:value-of select="concat(@implClass, '_', @serviceName, '_Wrapper')"/>
+ </xsl:variable>
+<xsl:text>/*
+ * 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.
+ */
+
+</xsl:text>
+ <xsl:call-template name="ifndef_start">
+ <xsl:with-param name="class"
+ select="$class"/>
+ </xsl:call-template>
+
+
+ <xsl:call-template name="include_headers">
+ <xsl:with-param name="header"
+ select="@moduleXmlFileHeader"/>
+ </xsl:call-template>
+
+ <xsl:apply-templates select="scaService" mode="class_body"/>
+
+ <xsl:call-template name="ifndef_end">
+ <xsl:with-param name="class"
+ select="$class"/>
+ </xsl:call-template>
+<!-- Always make sure we have a (visible) final return -->
+<xsl:text>
+
+</xsl:text>
+</xsl:template>
+
+
+<!-- Here are the subroutine templates in order -->
+
+ <xsl:template name="ifndef_start">
+ <!--For example,
+ #ifndef CustomerInfoImpl_CustomerInfoService_Wrapper_h
+ #define CustomerInfoImpl_CustomerInfoService_Wrapper_h
+ -->
+ <xsl:param name="class"/>
+ <xsl:text>#ifndef </xsl:text><xsl:value-of select="$class"/><xsl:text>_h</xsl:text>
+<!-- newline -->
+<xsl:text>
+</xsl:text>
+ <xsl:text>#define </xsl:text><xsl:value-of select="$class"/><xsl:text>_h</xsl:text>
+<!-- newline -->
+<xsl:text>
+
+</xsl:text>
+ <xsl:text>#if defined(WIN32) || defined (_WINDOWS)
+#pragma warning(disable: 4786)
+#endif </xsl:text>
+<!-- newline -->
+<xsl:text>
+
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="include_headers">
+ <!--For example,
+ #include "CustomerInfoImpl.h"
+ #include "tuscany/sca/core/ComponentServiceWrapper.h"
+ -->
+ <xsl:param name="header"/>
+ <xsl:text>#include "</xsl:text><xsl:value-of select="translate($header,'\','/')"/><xsl:text>"</xsl:text>
+<!-- newline -->
+<xsl:text>
+</xsl:text>
+ <xsl:text>#include "tuscany/sca/core/ComponentServiceWrapper.h"</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="scaService" mode="class_body">
+ <!--For example
+ class wrapperclassname : public tuscany::sca::ComponentServiceWrapper
+ {
+ constructor
+ destructor
+ then apply operation templates for operations
+ };
+
+ E.g. Specifically
+
+ class CustomerInfoImpl_CustomerInfoService_Wrapper : public tuscany::sca::ComponentServiceWrapper
+ {
+ public:
+ CustomerInfoImpl_CustomerInfoService_Wrapper(tuscany::sca::model::Component*);
+ virtual ~CustomerInfoImpl_CustomerInfoService_Wrapper();
+ virtual void invoke(tuscany::sca::Operation& operation);
+
+ private:
+ CustomerInfoImpl* impl;
+ };
+ -->
+ <!-- TODO second definition, remove? -->
+ <xsl:variable name="class">
+ <xsl:value-of select="concat(../@implClass, '_', ../@serviceName, '_Wrapper')"/>
+ </xsl:variable>
+<xsl:text>
+
+class </xsl:text>
+<xsl:value-of select="$class"/>
+<xsl:text> : public tuscany::sca::ComponentServiceWrapper
+{
+public:
+ </xsl:text><xsl:value-of select="$class"/><xsl:text>(tuscany::sca::model::Service* target);</xsl:text>
+ <xsl:text>
+ virtual ~</xsl:text><xsl:value-of select="$class"/><xsl:text>();
+ virtual void invokeService(tuscany::sca::Operation&amp; operation);
+ virtual void* newImplementation();
+ virtual void deleteImplementation();
+</xsl:text>
+<xsl:text>private:
+ </xsl:text>
+ <xsl:value-of select="../@implNamespace"/><xsl:value-of select="../@implClass"/><xsl:text>* impl;
+};
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="ifndef_end">
+ <!--For example,
+ #endif // CustomerInfoImpl_CustomerInfoService_Wrapper_h
+ -->
+ <xsl:param name="class"/>
+ <xsl:text>
+#endif // </xsl:text><xsl:value-of select="$class"/><xsl:text>_h</xsl:text>
+ </xsl:template>
+
+<xsl:template match="scaOperation">
+</xsl:template>
+
+</xsl:stylesheet>
+
+
+
diff --git a/branches/cpp-M1/sca/xsd/readme.txt b/branches/cpp-M1/sca/xsd/readme.txt
new file mode 100644
index 0000000000..7252f56a11
--- /dev/null
+++ b/branches/cpp-M1/sca/xsd/readme.txt
@@ -0,0 +1,2 @@
+The XSDs describing the SCA model
+
diff --git a/branches/cpp-M1/sca/xsd/sca-binding-sca.xsd b/branches/cpp-M1/sca/xsd/sca-binding-sca.xsd
new file mode 100644
index 0000000000..293c63e83a
--- /dev/null
+++ b/branches/cpp-M1/sca/xsd/sca-binding-sca.xsd
@@ -0,0 +1,37 @@
+<?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.
+ -->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="binding.sca" type="sca:SCABinding" substitutionGroup="sca:binding" sdo:name="bindingSca"/>
+ <complexType name="SCABinding">
+ <complexContent>
+ <extension base="sca:Binding">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/xsd/sca-binding-webservice.xsd b/branches/cpp-M1/sca/xsd/sca-binding-webservice.xsd
new file mode 100644
index 0000000000..95052a52aa
--- /dev/null
+++ b/branches/cpp-M1/sca/xsd/sca-binding-webservice.xsd
@@ -0,0 +1,38 @@
+<?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.
+ -->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+<element name="binding.ws" type="sca:WebServiceBinding" substitutionGroup="sca:binding" sdo:name="bindingWs"/>
+ <complexType name="WebServiceBinding">
+ <complexContent>
+ <extension base="sca:Binding">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="port" type="anyURI" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/xsd/sca-core.xsd b/branches/cpp-M1/sca/xsd/sca-core.xsd
new file mode 100644
index 0000000000..48fac92913
--- /dev/null
+++ b/branches/cpp-M1/sca/xsd/sca-core.xsd
@@ -0,0 +1,240 @@
+<?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.
+ -->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <element name="componentType" type="sca:ComponentType"/>
+ <complexType name="ComponentType">
+ <sequence>
+ <element minOccurs="0" maxOccurs="unbounded" name="service" type="sca:Service"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="reference" type="sca:Reference"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="property" type="sca:Property"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <complexType name="Service">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <element name="interface" type="sca:Interface"/>
+ <complexType name="Interface"/>
+
+ <complexType name="Reference">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <attribute name="multiplicity" type="sca:Multiplicity" use="optional" default="1..1"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <complexType name="Property"> <!-- abstract="true"-->
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <attribute name="type" type="QName" use="required"/>
+ <attribute name="many" type="boolean" default="false" use="optional"/>
+ <attribute name="required" type="boolean" default="false" use="optional"/>
+ <attribute name="default" type="string" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+
+ <element name="moduleFragment" type="sca:ModuleFragment"/>
+ <complexType name="ModuleFragment">
+ <sequence>
+ <element minOccurs="0" maxOccurs="unbounded" name="entryPoint" type="sca:EntryPoint"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="component" type="sca:Component"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="externalService" type="sca:ExternalService"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="wire" type="sca:ModuleWire"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <element name="module" type="sca:Module"/>
+ <complexType name="Module">
+ <complexContent>
+ <extension base="sca:ModuleFragment"/>
+ </complexContent>
+ </complexType>
+
+ <complexType name="EntryPoint">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
+ <element minOccurs="1" maxOccurs="unbounded" ref="sca:binding"/>
+ <element minOccurs="1" maxOccurs="unbounded" name="reference" type="anyURI"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <attribute name="multiplicity" type="sca:Multiplicity" use="optional" default="1..1"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+ <!-- a multiplicity 1..1 or 0..n sample
+ <reference>StockQuoteComponent</reference> - type must be URI
+ a multiplicity 1..n or 0..n sample
+ <reference>StockQuoteComponent1</reference> - type must be URI
+ <reference>StockQuoteComponent2</reference>
+ -->
+
+ <element name="binding" type="sca:Binding"/>
+ <complexType name="Binding">
+ <attribute name="uri" type="anyURI" use="optional"/>
+ </complexType>
+
+
+ <complexType name="Component">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:implementation"/>
+ <element minOccurs="0" maxOccurs="1" name="properties" type="sca:PropertyValues"/>
+ <element minOccurs="0" maxOccurs="1" name="references" type="sca:ReferenceValues"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+ <!-- a multiplicity 1..1 or 0..1 sample
+ <references>
+ <v:stockQuote>
+StockQuoteComponent
+</v:stockquote> - type must be URI
+ </references>
+ a multiplicity 1..n or 0..n sample
+ <references>
+ <v:stockQuote>StockQuoteComponent1</v:stockQuote>
+- type must be URI
+ <v:stockQuote>StockQuoteComponent2</v:stockQuote>
+ </references>
+ -->
+
+ <element name="implementation" type="sca:Implementation"/>
+ <complexType name="Implementation"/>
+
+ <complexType name="PropertyValues">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <complexType name="ReferenceValues">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+
+ <complexType name="ExternalService">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
+ <element minOccurs="0" maxOccurs="unbounded" ref="sca:binding"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <attribute name="overridable" type="sca:OverrideOptions" default="may" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+
+
+ <complexType name="ModuleWire">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:source.uri" sdo:name="sourceUri"/>
+ <element minOccurs="1" maxOccurs="1" ref="sca:target.uri" sdo:name="targetUri"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <element name="source" type="anyType"/>
+ <element name="target" type="anyType"/>
+
+
+ <element name="source.uri" type="anyURI" substitutionGroup="sca:source" sdo:name="sourceUri"/>
+ <element name="target.uri" type="anyURI" substitutionGroup="sca:target" sdo:name="targetUri"/>
+
+ <element name="subsystem" type="sca:Subsystem"/>
+ <complexType name="Subsystem">
+ <sequence>
+ <element minOccurs="0" maxOccurs="unbounded" name="entryPoint" type="sca:EntryPoint"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="moduleComponent" type="sca:ModuleComponent"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="externalService" type="sca:ExternalService"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="wire" type="sca:SystemWire"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <attribute name="uri" type="anyURI" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+
+ <complexType name="ModuleComponent">
+ <sequence>
+ <element minOccurs="0" maxOccurs="1" name="properties" type="sca:PropertyValues"/>
+ <element minOccurs="0" maxOccurs="1" name="references" type="sca:ReferenceValues"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <attribute name="module" type="NCName" use="required"/>
+ <attribute name="uri" type="anyURI" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <complexType name="SystemWire">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:source"/>
+ <element minOccurs="1" maxOccurs="1" ref="sca:target"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <element name="source.epr" type="anyType" substitutionGroup="sca:source"/>
+ <element name="target.epr" type="anyType" substitutionGroup="sca:target"/>
+
+ <simpleType name="Multiplicity">
+ <restriction base="string">
+ <enumeration value="0..1"/>
+ <enumeration value="1..1"/>
+ <enumeration value="0..n"/>
+ <enumeration value="1..n"/>
+ </restriction>
+ </simpleType>
+
+ <simpleType name="OverrideOptions">
+ <restriction base="string">
+ <enumeration value="no"/>
+ <enumeration value="may"/>
+ <enumeration value="must"/>
+ </restriction>
+ </simpleType>
+
+</schema> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/xsd/sca-implementation-cpp.xsd b/branches/cpp-M1/sca/xsd/sca-implementation-cpp.xsd
new file mode 100644
index 0000000000..970549176f
--- /dev/null
+++ b/branches/cpp-M1/sca/xsd/sca-implementation-cpp.xsd
@@ -0,0 +1,40 @@
+<?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.
+ -->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="implementation.cpp" type="sca:CPPImplementation" substitutionGroup="sca:implementation" sdo:name="implementationCpp"/>
+ <complexType name="CPPImplementation">
+ <complexContent>
+ <extension base="sca:Implementation">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="dll" type="NCName" use="required"/>
+ <attribute name="header" type="NCName" use="required"/>
+ <attribute name="class" type="Name" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/xsd/sca-implementation-java.xsd b/branches/cpp-M1/sca/xsd/sca-implementation-java.xsd
new file mode 100644
index 0000000000..7745b4ffb7
--- /dev/null
+++ b/branches/cpp-M1/sca/xsd/sca-implementation-java.xsd
@@ -0,0 +1,38 @@
+<?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.
+ -->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="implementation.java" type="sca:JavaImplementation" substitutionGroup="sca:implementation" sdo:name="implementationJava"/>
+ <complexType name="JavaImplementation">
+ <complexContent>
+ <extension base="sca:Implementation">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="class" type="NCName" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/xsd/sca-interface-cpp.xsd b/branches/cpp-M1/sca/xsd/sca-interface-cpp.xsd
new file mode 100644
index 0000000000..dd286afef6
--- /dev/null
+++ b/branches/cpp-M1/sca/xsd/sca-interface-cpp.xsd
@@ -0,0 +1,50 @@
+<?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.
+ -->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="interface.cpp" type="sca:CPPInterface" substitutionGroup="sca:interface"
+ sdo:name="interfaceCpp"/>
+ <complexType name="CPPInterface">
+ <complexContent>
+ <extension base="sca:Interface">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="header" type="NCName" use="required"/>
+ <attribute name="class" type="Name" use="required"/>
+ <attribute name="scope" type="sca:CPPScope" use="optional"/>
+ <attribute name="remotable" type="boolean" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <simpleType name="CPPScope">
+ <restriction base="string">
+ <enumeration value="stateless"/>
+ <enumeration value="module"/>
+ </restriction>
+ </simpleType>
+
+</schema> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/xsd/sca-interface-java.xsd b/branches/cpp-M1/sca/xsd/sca-interface-java.xsd
new file mode 100644
index 0000000000..a1955a2795
--- /dev/null
+++ b/branches/cpp-M1/sca/xsd/sca-interface-java.xsd
@@ -0,0 +1,39 @@
+<?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.
+ -->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="interface.java" type="sca:JavaInterface" substitutionGroup="sca:interface" sdo:name="interfaceJava"/>
+ <complexType name="JavaInterface">
+ <complexContent>
+ <extension base="sca:Interface">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="interface" type="NCName" use="required"/>
+ <attribute name="callbackInterface" type="NCName" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/xsd/sca-interface-wsdl.xsd b/branches/cpp-M1/sca/xsd/sca-interface-wsdl.xsd
new file mode 100644
index 0000000000..e857a77d84
--- /dev/null
+++ b/branches/cpp-M1/sca/xsd/sca-interface-wsdl.xsd
@@ -0,0 +1,39 @@
+<?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.
+ -->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="interface.wsdl" type="sca:WSDLPortType" substitutionGroup="sca:interface" sdo:name="interfaceWsdl"/>
+ <complexType name="WSDLPortType">
+ <complexContent>
+ <extension base="sca:Interface">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="interface" type="anyURI" use="required"/>
+ <attribute name="callbackInterface" type="anyURI" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema> \ No newline at end of file
diff --git a/branches/cpp-M1/sca/xsd/sca.xsd b/branches/cpp-M1/sca/xsd/sca.xsd
new file mode 100644
index 0000000000..619c38aaac
--- /dev/null
+++ b/branches/cpp-M1/sca/xsd/sca.xsd
@@ -0,0 +1,34 @@
+<?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.
+ -->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/0.9">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <include schemaLocation="sca-interface-java.xsd"/>
+ <include schemaLocation="sca-interface-wsdl.xsd"/>
+ <include schemaLocation="sca-interface-cpp.xsd"/>
+
+ <include schemaLocation="sca-implementation-java.xsd"/>
+ <include schemaLocation="sca-implementation-cpp.xsd"/>
+
+ <include schemaLocation="sca-binding-webservice.xsd"/>
+ <include schemaLocation="sca-binding-sca.xsd"/>
+
+</schema>
diff --git a/branches/cpp-M1/sca/xsd/tuscany.xsd b/branches/cpp-M1/sca/xsd/tuscany.xsd
new file mode 100644
index 0000000000..335db42475
--- /dev/null
+++ b/branches/cpp-M1/sca/xsd/tuscany.xsd
@@ -0,0 +1,48 @@
+<?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.
+ -->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://org.apache.tuscany/xmlns/cpp/1.0"
+ xmlns:tuscany="http://org.apache.tuscany/xmlns/cpp/1.0"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <element name="tuscany-model" type="tuscany:ModelType"/>
+ <complexType name="ModelType">
+ <sequence>
+ <element minOccurs="0" maxOccurs="1" name="wsdl" type="tuscany:WSDLType"/>
+ <element minOccurs="0" maxOccurs="1" name="xsd" type="tuscany:XSDType"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="WSDLType">
+ <sequence>
+ <element minOccurs="0" maxOccurs="unbounded" name="file" type="tuscany:FileType"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="XSDType">
+ <sequence>
+ <element minOccurs="0" maxOccurs="unbounded" name="file" type="tuscany:FileType"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="FileType">
+ <attribute name="name" type="NCName" use="required"/>
+ </complexType>
+
+</schema> \ No newline at end of file