From 54158d9b017dae6a75d813a96463d05e1153ae31 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Wed, 17 Sep 2008 06:59:35 +0000 Subject: Starting to clean up android branch, creating subsets of samples, demos, tutorials that can be ported to android. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@696177 13f79535-47bb-0310-9956-ffa450edef68 --- .../demos/alert-aggregator-webapp/LICENSE | 205 - .../demos/alert-aggregator-webapp/NOTICE | 6 - .../demos/alert-aggregator-webapp/README | 82 - .../alert-aggregator-webapp/alert-aggregator.png | Bin 36819 -> 0 bytes .../alert-aggregator-webapp/alert-aggregator.svg | 627 - .../demos/alert-aggregator-webapp/build-dojo.xml | 92 - .../demos/alert-aggregator-webapp/build.xml | 148 - .../demos/alert-aggregator-webapp/pom.xml | 345 - .../sca/demos/aggregator/AlertTypeNonSDOImpl.java | 339 - .../demos/aggregator/AlertsFeedServiceImpl.java | 106 - .../sca/demos/aggregator/AlertsService.java | 40 - .../sca/demos/aggregator/AlertsServiceImpl.java | 126 - .../sca/demos/aggregator/AlertsSourcesService.java | 69 - .../demos/aggregator/AlertsSourcesServiceImpl.java | 183 - .../sca/demos/aggregator/AlertsTypeNonSDOImpl.java | 74 - .../sca/demos/aggregator/ConfigTypeNonSDOImpl.java | 55 - .../sca/demos/aggregator/RSSCheckerService.java | 30 - .../demos/aggregator/RSSCheckerServiceImpl.java | 91 - .../sca/demos/aggregator/SourceTypeNonSDOImpl.java | 536 - .../src/main/resources/Alerts.wsdl | 88 - .../src/main/resources/Alerts.xsd | 80 - .../src/main/resources/AlertsSources.wsdl | 124 - .../src/main/resources/alerts-client.composite | 49 - .../src/main/resources/alerts.composite | 85 - .../src/main/resources/sources.xml | 34 - .../src/main/webapp/AlertAggregator.html | 330 - .../src/main/webapp/META-INF/sca-contribution.xml | 26 - .../src/main/webapp/WEB-INF/geronimo-web.xml | 32 - .../src/main/webapp/WEB-INF/web.xml | 41 - .../src/main/webapp/pop.png | Bin 244 -> 0 bytes .../src/main/webapp/rss.png | Bin 689 -> 0 bytes .../src/main/webapp/service.smd | 1 - .../src/main/webapp/sources.smd | 1 - .../src/main/webapp/style.css | 176 - .../demos/aggregator/AlertsIntegrationTest.java | 97 - branches/sca-android/demos/bigbank-account/LICENSE | 205 - branches/sca-android/demos/bigbank-account/NOTICE | 6 - branches/sca-android/demos/bigbank-account/README | 4 - .../sca-android/demos/bigbank-account/bigbank.png | Bin 100070 -> 0 bytes .../sca-android/demos/bigbank-account/bigbank.svg | 537 - .../demos/bigbank-account/build-dojo.xml | 92 - .../sca-android/demos/bigbank-account/build.xml | 85 - branches/sca-android/demos/bigbank-account/pom.xml | 71 - .../account/checking/CheckingAccountDetails.java | 50 - .../account/checking/CheckingAccountService.java | 37 - .../checking/CheckingAccountServiceImpl.java | 66 - .../account/savings/SavingsAccountDetails.java | 52 - .../account/savings/SavingsAccountService.java | 35 - .../account/savings/SavingsAccountServiceImpl.java | 66 - .../AccountsDataPasswordCallbackHandler.java | 54 - .../account/security/BigbankCheckingsAcl.java | 48 - ...ckingsDeptAuthImplementationPolicyProvider.java | 90 - .../account/security/CheckingsDeptAuthPolicy.java | 46 - .../CheckingsDeptAuthPolicyInterceptor.java | 77 - .../CheckingsDeptAuthPolicyProviderFactory.java | 75 - .../CheckingsDeptAuthorizationPolicyHandler.java | 65 - .../CheckingsDeptAuthorizationPolicyProcessor.java | 72 - .../bigbank/account/stock/StockAccountDetails.java | 68 - .../bigbank/account/stock/StockAccountService.java | 36 - .../account/stock/StockAccountServiceImpl.java | 60 - .../src/main/resources/CheckingsAccount.composite | 35 - .../main/resources/META-INF/sca-contribution.xml | 42 - ...ca.contribution.processor.StAXArtifactProcessor | 19 - ...rg.apache.tuscany.sca.policy.util.PolicyHandler | 20 - ...ache.tuscany.sca.provider.PolicyProviderFactory | 19 - .../src/main/resources/SavingsAccount.composite | 34 - .../src/main/resources/StockAccount.composite | 34 - .../src/main/resources/definitions.xml | 58 - .../src/main/resources/web/AccountJSON.html | 92 - .../src/main/resources/web/style.css | 22 - .../src/main/resources/wsdl/AccountService.wsdl | 91 - .../sca-android/demos/bigbank-calculator/LICENSE | 205 - .../sca-android/demos/bigbank-calculator/NOTICE | 6 - .../sca-android/demos/bigbank-calculator/README | 2 - .../sca-android/demos/bigbank-calculator/build.xml | 68 - .../sca-android/demos/bigbank-calculator/pom.xml | 78 - .../src/main/java/calculator/AddService.java | 25 - .../main/java/calculator/CalculatorService.java | 34 - .../java/calculator/CalculatorServiceImpl.java | 72 - .../src/main/java/calculator/DivideService.java | 25 - .../src/main/java/calculator/MultiplyService.java | 25 - .../src/main/java/calculator/SubtractService.java | 25 - .../java/calculator/demo/CalculatorServer.java | 44 - .../src/main/resources/Calculator.composite | 55 - .../main/resources/calculator/AddServiceImpl.js | 22 - .../resources/calculator/DivideServiceImpl.groovy | 22 - .../resources/calculator/MultiplyServiceImpl.py | 21 - .../resources/calculator/SubtractServiceImpl.rb | 22 - .../sca-android/demos/bigbank-stockquote/LICENSE | 205 - .../sca-android/demos/bigbank-stockquote/NOTICE | 6 - .../sca-android/demos/bigbank-stockquote/README | 4 - .../sca-android/demos/bigbank-stockquote/build.xml | 67 - .../sca-android/demos/bigbank-stockquote/pom.xml | 85 - .../java/stockquote/PasswordCallbackHandler.java | 47 - .../src/main/java/stockquote/StockQuoteImpl.java | 38 - .../main/java/stockquote/StockQuoteService.java | 30 - .../java/stockquote/demo/StockQuoteServer.java | 42 - .../src/main/resources/StockQuote.composite | 33 - .../src/main/resources/definitions.xml | 49 - .../src/main/resources/security.properties | 4 - .../src/main/resources/stockQuote.jks | Bin 1986 -> 0 bytes branches/sca-android/demos/bigbank/LICENSE | 205 - branches/sca-android/demos/bigbank/NOTICE | 6 - branches/sca-android/demos/bigbank/README | 127 - branches/sca-android/demos/bigbank/bigbank.png | Bin 100070 -> 0 bytes branches/sca-android/demos/bigbank/bigbank.svg | 537 - branches/sca-android/demos/bigbank/build-dojo.xml | 92 - branches/sca-android/demos/bigbank/build.xml | 84 - branches/sca-android/demos/bigbank/pom.xml | 201 - .../main/java/bigbank/account/AccountService.java | 32 - .../java/bigbank/account/AccountServiceImpl.java | 99 - .../java/bigbank/account/feed/AccountFeedImpl.java | 70 - .../main/java/bigbank/client/BigBankClient.java | 50 - .../src/main/java/bigbank/demo/BigBankServer.java | 130 - .../security/BigbankPasswordCallbackHandler.java | 51 - .../main/java/calculator/CalculatorService.java | 34 - .../main/java/stockquote/StockQuoteService.java | 29 - .../bigbank/src/main/resources/BigBank.composite | 85 - .../main/resources/META-INF/sca-contribution.xml | 36 - .../demos/bigbank/src/main/resources/bigbank.jks | Bin 1986 -> 0 bytes .../bigbank/src/main/resources/definitions.xml | 64 - .../bigbank/src/main/resources/security.properties | 4 - .../src/main/resources/web/AccountJSON.html | 92 - .../demos/bigbank/src/main/resources/web/style.css | 22 - .../src/main/resources/wsdl/AccountService.wsdl | 91 - .../src/test/java/test/BigBankTestCase.java | 33 - .../demos/load-balancing-webapp/LICENSE | 205 - .../sca-android/demos/load-balancing-webapp/NOTICE | 6 - .../sca-android/demos/load-balancing-webapp/README | 76 - .../demos/load-balancing-webapp/build-tomcat.xml | 96 - .../demos/load-balancing-webapp/build.xml | 125 - .../demos/load-balancing-webapp/pom.xml | 349 - .../src/main/java/client/LaunchClient.java | 57 - .../src/main/java/domain/LaunchDomain.java | 33 - .../src/main/java/helloworld/HelloWorldImpl.java | 35 - .../main/java/helloworld/HelloWorldService.java | 31 - .../java/helloworld/HelloWorldServiceClient.java | 42 - .../demos/loadbalancer/rule/RoundRobinRule.java | 96 - .../helloworldwsclient.composite | 33 - .../src/main/webapp/META-INF/sca-contribution.xml | 24 - .../sca-deployables/helloworldws.composite | 32 - .../src/main/webapp/WEB-INF/web.xml | 37 - .../src/test/resources/apache-80/conf/httpd.conf | 28 - .../resources/apache-80/conf/workers.properties | 18 - .../src/test/resources/tomcat-8085/conf/server.xml | 391 - .../webapps/balancer/WEB-INF/config/rules.xml | 26 - .../src/test/resources/tomcat-8086/conf/server.xml | 391 - .../src/test/resources/tomcat-8087/conf/server.xml | 391 - .../sca-android/demos/mortgage-creditcheck/LICENSE | 205 - .../sca-android/demos/mortgage-creditcheck/NOTICE | 6 - .../sca-android/demos/mortgage-creditcheck/README | 6 - .../demos/mortgage-creditcheck/build.xml | 66 - .../sca-android/demos/mortgage-creditcheck/pom.xml | 75 - .../src/main/java/credit/CreditCheck.java | 26 - .../src/main/java/credit/CreditCheckImpl.java | 34 - .../src/main/java/credit/CreditCheckServer.java | 40 - .../src/main/resources/CreditCheck.composite | 37 - .../src/main/resources/wsdl/credit.wsdl | 81 - .../src/main/webapp/META-INF/sca-contribution.xml | 24 - .../src/main/webapp/WEB-INF/web.xml | 37 - .../demos/mortgage-loanapproval/LICENSE | 205 - .../sca-android/demos/mortgage-loanapproval/NOTICE | 6 - .../sca-android/demos/mortgage-loanapproval/README | 60 - .../demos/mortgage-loanapproval/build.xml | 66 - .../mortgage-loanapproval/doc/credit_composite.jpg | Bin 73610 -> 0 bytes .../mortgage-loanapproval/doc/credit_composite.png | Bin 51153 -> 0 bytes .../mortgage-loanapproval/doc/loan_approval.jpg | Bin 162536 -> 0 bytes .../mortgage-loanapproval/doc/loan_approval.png | Bin 58247 -> 0 bytes .../doc/mortgage_assembly0.jpg | Bin 145053 -> 0 bytes .../doc/mortgage_assembly0.png | Bin 93773 -> 0 bytes .../doc/mortgage_assembly1.jpg | Bin 181317 -> 0 bytes .../doc/mortgage_assembly1.png | Bin 113404 -> 0 bytes .../doc/mortgage_assembly2.jpg | Bin 180240 -> 0 bytes .../doc/mortgage_assembly2.png | Bin 106656 -> 0 bytes .../doc/mortgage_composite.jpg | Bin 343699 -> 0 bytes .../doc/mortgage_composite.png | Bin 288351 -> 0 bytes .../doc/mortgage_diagrams.doc | Bin 81920 -> 0 bytes .../doc/mortgage_package1.jpg | Bin 181031 -> 0 bytes .../doc/mortgage_package1.png | Bin 34939 -> 0 bytes .../doc/mortgage_package2.jpg | Bin 110930 -> 0 bytes .../doc/mortgage_package2.png | Bin 58993 -> 0 bytes .../doc/mortgage_scenario.jpg | Bin 225690 -> 0 bytes .../doc/mortgage_scenario.png | Bin 106791 -> 0 bytes .../mortgage-loanapproval/mortgage_assembly.png | Bin 106656 -> 0 bytes .../demos/mortgage-loanapproval/pom.xml | 83 - .../src/main/java/mortgage/CreditCheck.java | 29 - .../src/main/java/mortgage/CreditCheckImpl.java | 34 - .../src/main/java/mortgage/Customer.java | 76 - .../src/main/java/mortgage/InterestRateQuote.java | 23 - .../main/java/mortgage/InterestRateQuoteImpl.java | 42 - .../src/main/java/mortgage/LoanApproval.java | 27 - .../src/main/java/mortgage/LoanApprovalImpl.java | 84 - .../src/main/java/mortgage/MortgageCalculator.java | 29 - .../main/java/mortgage/MortgageCalculatorImpl.java | 38 - .../src/main/java/mortgage/MortgageClient.java | 44 - .../src/main/java/mortgage/RiskAssessment.java | 27 - .../src/main/java/mortgage/RiskAssessmentImpl.java | 38 - .../src/main/resources/Mortgage.composite | 48 - .../src/main/resources/Mortgage1.composite | 57 - .../resources/MortgageCalculator.componentType | 27 - .../src/main/resources/MortgageCalculator.js | 25 - .../src/main/resources/wsdl/credit.wsdl | 81 - .../test/java/mortgage/MortgageClientTestCase.java | 56 - branches/sca-android/demos/pom.xml | 8 - .../sca-android/demos/workpool-distributed/LICENSE | 205 - .../sca-android/demos/workpool-distributed/NOTICE | 6 - .../demos/workpool-distributed/build.xml | 446 - .../sca-android/demos/workpool-distributed/pom.xml | 148 - .../src/main/java/node/DomainNode.java | 57 - .../src/main/java/node/DomainNodeDaemon.java | 79 - .../src/main/java/node/TestJob.java | 82 - .../src/main/java/node/WorkpoolDaemon.java | 271 - .../src/main/java/node/WorkpoolNode.java | 179 - .../src/main/java/node/workerRules1.drl | 13 - .../main/java/workpool/MetaComponentWorker.java | 85 - .../src/main/java/workpool/MyWorker.java | 46 - .../src/main/java/workpool/NullJob.java | 43 - .../src/main/java/workpool/ResultJob.java | 54 - .../src/main/java/workpool/Trigger.java | 29 - .../src/main/java/workpool/WorkerManager.java | 31 - .../src/main/java/workpool/WorkerManagerImpl.java | 213 - .../src/main/java/workpool/WorkerService.java | 56 - .../main/java/workpool/WorkerServiceCallback.java | 27 - .../src/main/java/workpool/WorkerServiceImpl.java | 171 - .../src/main/java/workpool/WorkpoolBean.java | 162 - .../main/java/workpool/WorkpoolBeanListener.java | 25 - .../src/main/java/workpool/WorkpoolEvent.java | 71 - .../src/main/java/workpool/WorkpoolManager.java | 48 - .../main/java/workpool/WorkpoolManagerImpl.java | 555 - .../src/main/java/workpool/WorkpoolService.java | 91 - .../main/java/workpool/WorkpoolServiceImpl.java | 416 - .../resources/nodeA/META-INF/sca-contribution.xml | 24 - .../src/main/resources/nodeA/Workpool.composite | 47 - .../resources/nodeB/META-INF/sca-contribution.xml | 24 - .../src/main/resources/nodeB/Workpool.composite | 38 - .../resources/nodeC/META-INF/sca-contribution.xml | 24 - .../src/main/resources/nodeC/Workpool.composite | 38 - .../resources/nodeD/META-INF/sca-contribution.xml | 24 - .../src/main/resources/nodeD/Workpool.composite | 38 - .../resources/nodeE/META-INF/sca-contribution.xml | 24 - .../src/main/resources/nodeE/Workpool.composite | 38 - .../src/test/java/workpool/AComponent.java | 25 - .../demos/workpool-distributed/workerRules.drl | 9 - .../demos/workpool-distributed/workerRules1.drl | 9 - .../demos/workpool-distributed/workerRules2.drl | 8 - .../demos/workpool-distributed/workerRules3.drl | 14 - branches/sca-android/demos/xml-bigbank/LICENSE | 205 - branches/sca-android/demos/xml-bigbank/NOTICE | 6 - branches/sca-android/demos/xml-bigbank/README | 46 - branches/sca-android/demos/xml-bigbank/build.xml | 63 - branches/sca-android/demos/xml-bigbank/pom.xml | 115 - .../src/main/java/bigbank/AccountData.java | 36 - .../src/main/java/bigbank/AccountDataImpl.java | 48 - .../src/main/java/bigbank/AccountService.java | 32 - .../src/main/java/bigbank/AccountServiceImpl.java | 84 - .../src/main/java/bigbank/BigBankClient.java | 35 - .../src/main/java/bigbank/BigBankServer.java | 40 - .../src/main/java/bigbank/CurrencyExchange.java | 36 - .../src/main/java/bigbank/ExchangeRate.java | 32 - .../src/main/java/bigbank/ExchangeRateImpl.java | 84 - .../src/main/java/bigbank/StockQuote.java | 38 - .../src/main/java/bigbank/StockValue.java | 38 - .../src/main/resources/BigBank.composite | 51 - .../xml-bigbank/src/main/resources/accounts.xml | 29 - .../xml-bigbank/src/main/resources/customer.xsd | 46 - .../demos/xml-bigbank/src/main/resources/stock.xq | 52 - .../src/main/resources/wsdl/StockQuotes.wsdl | 23 - .../sca-android/demos/xml-bigbank/xml-bigbank.png | Bin 30396 -> 0 bytes .../sca-android/demos/xml-bigbank/xml-bigbank.svg | 447 - .../sca-android/itest/build-was-integration.xml | 68 - branches/sca-android/itest/pom.xml | 656 - branches/sca-android/itest/wasAdmin.py | 91 - .../samples/calculator-distributed/README | 438 - .../samples/calculator-distributed/build.xml | 111 - .../calculator-distributed.png | Bin 76839 -> 0 bytes .../calculator-distributed.svg | 383 - .../samples/calculator-distributed/cloud.composite | 26 - .../calculator-distributed/domain.composite | 26 - .../samples/calculator-distributed/pom.xml | 119 - .../src/main/java/calculator/AddService.java | 31 - .../src/main/java/calculator/AddServiceImpl.java | 31 - .../main/java/calculator/CalculatorService.java | 35 - .../java/calculator/CalculatorServiceImpl.java | 74 - .../src/main/java/calculator/DivideService.java | 28 - .../main/java/calculator/DivideServiceImpl.java | 30 - .../src/main/java/calculator/MultiplyService.java | 28 - .../main/java/calculator/MultiplyServiceImpl.java | 30 - .../src/main/java/calculator/SubtractService.java | 31 - .../main/java/calculator/SubtractServiceImpl.java | 31 - .../src/main/java/node/LaunchCalculatorNodeA.java | 67 - .../src/main/java/node/LaunchCalculatorNodeB.java | 28 - .../src/main/java/node/LaunchCalculatorNodeC.java | 28 - .../src/main/java/node/LaunchDomain.java | 33 - .../src/main/resources/cloud/NodeA.composite | 33 - .../src/main/resources/cloud/NodeB.composite | 33 - .../src/main/resources/cloud/NodeC.composite | 33 - .../src/main/resources/nodeA/Calculator.composite | 41 - .../resources/nodeA/META-INF/sca-contribution.xml | 24 - .../src/main/resources/nodeB/Calculator.composite | 29 - .../resources/nodeB/META-INF/sca-contribution.xml | 24 - .../src/main/resources/nodeC/Calculator.composite | 29 - .../resources/nodeC/META-INF/sca-contribution.xml | 24 - .../calculator/CalculatorDistributedTestCase.java | 92 - .../samples/calculator-distributed/workspace.xml | 25 - .../calculator-implementation-policies/README | 266 - .../calculator-implementation-policies/build.xml | 72 - .../calculator.png | Bin 20552 -> 0 bytes .../calculator.svg | 329 - .../calculator-implementation-policies/pom.xml | 78 - .../src/main/java/calculator/AddService.java | 28 - .../src/main/java/calculator/AddServiceImpl.java | 35 - .../src/main/java/calculator/CalculatorClient.java | 66 - .../main/java/calculator/CalculatorService.java | 35 - .../java/calculator/CalculatorServiceImpl.java | 70 - .../src/main/java/calculator/DivideService.java | 28 - .../main/java/calculator/DivideServiceImpl.java | 35 - .../src/main/java/calculator/MultiplyService.java | 28 - .../main/java/calculator/MultiplyServiceImpl.java | 35 - .../src/main/java/calculator/SubtractService.java | 28 - .../main/java/calculator/SubtractServiceImpl.java | 35 - .../security/CalculatorCallbackHandler.java | 50 - .../java/calculator/security/JaasLoginModule.java | 178 - .../java/calculator/security/UserPrincipal.java | 66 - .../src/main/resources/Calculator.composite | 61 - .../src/main/resources/CalculatorJass.config | 3 - .../resources/CalculatorLogMessages.properties | 18 - .../src/main/resources/definitions.xml | 40 - .../test/java/calculator/CalculatorTestCase.java | 74 - .../sca-android/samples/calculator-osgi/README | 97 - .../sca-android/samples/calculator-osgi/build.xml | 72 - .../samples/calculator-osgi/calculator.png | Bin 20552 -> 0 bytes .../samples/calculator-osgi/calculator.svg | 329 - .../sca-android/samples/calculator-osgi/pom.xml | 99 - .../src/main/java/calculator/AddService.java | 28 - .../src/main/java/calculator/AddServiceImpl.java | 35 - .../src/main/java/calculator/CalculatorClient.java | 62 - .../main/java/calculator/CalculatorService.java | 35 - .../java/calculator/CalculatorServiceImpl.java | 70 - .../src/main/java/calculator/DivideService.java | 28 - .../main/java/calculator/DivideServiceImpl.java | 35 - .../src/main/java/calculator/MultiplyService.java | 28 - .../main/java/calculator/MultiplyServiceImpl.java | 35 - .../src/main/java/calculator/SubtractService.java | 28 - .../main/java/calculator/SubtractServiceImpl.java | 35 - .../src/main/resources/Calculator.composite | 54 - .../test/java/calculator/CalculatorTestCase.java | 57 - .../samples/calculator-rcp/META-INF/MANIFEST.MF | 25 - .../samples/calculator-rcp/build.properties | 5 - .../samples/calculator-rcp/icons/alt_window_16.gif | Bin 637 -> 0 bytes .../samples/calculator-rcp/icons/alt_window_32.gif | Bin 1192 -> 0 bytes .../sca-android/samples/calculator-rcp/plugin.xml | 31 - .../sca-android/samples/calculator-rcp/pom.xml | 126 - .../src/main/java/Calculator.composite | 54 - .../src/main/java/calculator/AddService.java | 28 - .../src/main/java/calculator/AddServiceImpl.java | 35 - .../src/main/java/calculator/CalculatorClient.java | 52 - .../main/java/calculator/CalculatorService.java | 34 - .../java/calculator/CalculatorServiceImpl.java | 69 - .../src/main/java/calculator/DivideService.java | 28 - .../main/java/calculator/DivideServiceImpl.java | 35 - .../src/main/java/calculator/MultiplyService.java | 28 - .../main/java/calculator/MultiplyServiceImpl.java | 35 - .../src/main/java/calculator/SubtractService.java | 28 - .../main/java/calculator/SubtractServiceImpl.java | 35 - .../src/main/java/calculator/rcp/Activator.java | 94 - .../src/main/java/calculator/rcp/Application.java | 63 - .../rcp/ApplicationActionBarAdvisor.java | 65 - .../rcp/ApplicationWorkbenchAdvisor.java | 37 - .../rcp/ApplicationWorkbenchWindowAdvisor.java | 44 - .../src/main/java/calculator/rcp/Perspective.java | 34 - .../src/main/java/calculator/rcp/View.java | 88 - .../samples/calculator-rmi-reference/README | 138 - .../samples/calculator-rmi-reference/build.xml | 73 - .../calculator-rmi-reference.png | Bin 23615 -> 0 bytes .../calculator-rmi-reference.svg | 412 - .../samples/calculator-rmi-reference/pom.xml | 68 - .../src/main/java/calculator/AddService.java | 28 - .../src/main/java/calculator/CalculatorClient.java | 44 - .../main/java/calculator/CalculatorService.java | 39 - .../java/calculator/CalculatorServiceImpl.java | 68 - .../src/main/java/calculator/DivideService.java | 28 - .../src/main/java/calculator/MultiplyService.java | 28 - .../src/main/java/calculator/SubtractService.java | 28 - .../resources/CalculatorRMIReference.composite | 42 - .../calculator/CalculatorRMIReferenceTestCase.java | 60 - .../java/calculator/CalculatorRMIServiceImpl.java | 52 - .../samples/calculator-rmi-service/README | 147 - .../samples/calculator-rmi-service/build.xml | 72 - .../calculator-rmi-service.png | Bin 20814 -> 0 bytes .../calculator-rmi-service.svg | 330 - .../samples/calculator-rmi-service/pom.xml | 68 - .../src/main/java/calculator/AddService.java | 28 - .../src/main/java/calculator/AddServiceImpl.java | 30 - .../src/main/java/calculator/CalculatorClient.java | 40 - .../src/main/java/calculator/CalculatorServer.java | 39 - .../main/java/calculator/CalculatorService.java | 36 - .../java/calculator/CalculatorServiceImpl.java | 68 - .../src/main/java/calculator/DivideService.java | 28 - .../main/java/calculator/DivideServiceImpl.java | 30 - .../src/main/java/calculator/MultiplyService.java | 28 - .../main/java/calculator/MultiplyServiceImpl.java | 30 - .../src/main/java/calculator/SubtractService.java | 28 - .../main/java/calculator/SubtractServiceImpl.java | 30 - .../main/resources/CalculatorRMIServer.composite | 53 - .../calculator/CalculatorRMIServerTestCase.java | 53 - .../sca-android/samples/calculator-script/README | 105 - .../samples/calculator-script/build.xml | 72 - .../calculator-script/calculator-script.png | Bin 23064 -> 0 bytes .../calculator-script/calculator-script.svg | 334 - .../sca-android/samples/calculator-script/pom.xml | 78 - .../src/main/java/calculator/AddService.java | 28 - .../src/main/java/calculator/CalculatorClient.java | 43 - .../main/java/calculator/CalculatorService.java | 34 - .../java/calculator/CalculatorServiceImpl.java | 69 - .../src/main/java/calculator/DivideService.java | 28 - .../src/main/java/calculator/MultiplyService.java | 28 - .../src/main/java/calculator/SubtractService.java | 28 - .../src/main/resources/Calculator.composite | 50 - .../main/resources/calculator/AddServiceImpl.js | 22 - .../resources/calculator/DivideServiceImpl.groovy | 22 - .../resources/calculator/MultiplyServiceImpl.py | 20 - .../resources/calculator/SubtractServiceImpl.rb | 21 - .../test/java/calculator/CalculatorTestCase.java | 52 - .../sca-android/samples/calculator-webapp/README | 118 - .../samples/calculator-webapp/calculator-web.png | Bin 22916 -> 0 bytes .../samples/calculator-webapp/calculator-web.svg | 358 - .../sca-android/samples/calculator-webapp/pom.xml | 95 - .../src/main/java/calculator/AddService.java | 28 - .../src/main/java/calculator/AddServiceImpl.java | 30 - .../src/main/java/calculator/CalculatorClient.java | 47 - .../main/java/calculator/CalculatorService.java | 35 - .../java/calculator/CalculatorServiceImpl.java | 69 - .../src/main/java/calculator/DivideService.java | 28 - .../main/java/calculator/DivideServiceImpl.java | 30 - .../src/main/java/calculator/MultiplyService.java | 28 - .../main/java/calculator/MultiplyServiceImpl.java | 30 - .../src/main/java/calculator/SubtractService.java | 28 - .../main/java/calculator/SubtractServiceImpl.java | 30 - .../src/main/resources/Calculator.composite | 49 - .../src/main/webapp/META-INF/sca-contribution.xml | 24 - .../src/main/webapp/WEB-INF/web.xml | 41 - .../calculator-webapp/src/main/webapp/calc.jsp | 47 - .../samples/calculator-ws-secure-webapp/README | 108 - .../calculator-ws-secure-webapp/calculator-web.png | Bin 25757 -> 0 bytes .../calculator-ws-secure-webapp/calculator-web.svg | 455 - .../samples/calculator-ws-secure-webapp/pom.xml | 102 - .../src/main/java/calculator/AddService.java | 31 - .../src/main/java/calculator/AddServiceImpl.java | 35 - .../src/main/java/calculator/CalculatorClient.java | 47 - .../main/java/calculator/CalculatorService.java | 35 - .../java/calculator/CalculatorServiceImpl.java | 69 - .../src/main/java/calculator/DivideService.java | 28 - .../main/java/calculator/DivideServiceImpl.java | 30 - .../src/main/java/calculator/MultiplyService.java | 28 - .../main/java/calculator/MultiplyServiceImpl.java | 30 - .../src/main/java/calculator/SubtractService.java | 31 - .../main/java/calculator/SubtractServiceImpl.java | 30 - .../calculator/security/ClientPWCBHandler.java | 58 - .../calculator/security/ServerPWCBHandler.java | 59 - .../src/main/resources/Calculator.composite | 67 - ...rg.apache.tuscany.sca.policy.util.PolicyHandler | 21 - .../src/main/resources/calculatorKeys.jks | Bin 2706 -> 0 bytes .../src/main/resources/definitions.xml | 198 - .../src/main/resources/security.properties | 4 - .../src/main/webapp/META-INF/sca-contribution.xml | 24 - .../src/main/webapp/WEB-INF/geronimo-web.xml | 33 - .../src/main/webapp/WEB-INF/web.xml | 41 - .../src/main/webapp/calc.jsp | 50 - .../samples/calculator-ws-webapp/README | 108 - .../calculator-ws-webapp/calculator-web.png | Bin 25757 -> 0 bytes .../calculator-ws-webapp/calculator-web.svg | 455 - .../samples/calculator-ws-webapp/pom.xml | 102 - .../src/main/java/calculator/AddService.java | 31 - .../src/main/java/calculator/AddServiceImpl.java | 34 - .../src/main/java/calculator/CalculatorClient.java | 47 - .../main/java/calculator/CalculatorService.java | 35 - .../java/calculator/CalculatorServiceImpl.java | 69 - .../src/main/java/calculator/DivideService.java | 28 - .../main/java/calculator/DivideServiceImpl.java | 30 - .../src/main/java/calculator/MultiplyService.java | 28 - .../main/java/calculator/MultiplyServiceImpl.java | 30 - .../src/main/java/calculator/SubtractService.java | 28 - .../main/java/calculator/SubtractServiceImpl.java | 30 - .../src/main/resources/Calculator.composite | 56 - .../src/main/webapp/META-INF/sca-contribution.xml | 24 - .../src/main/webapp/WEB-INF/geronimo-web.xml | 34 - .../src/main/webapp/WEB-INF/web.xml | 41 - .../calculator-ws-webapp/src/main/webapp/calc.jsp | 50 - branches/sca-android/samples/calculator2/README | 97 - branches/sca-android/samples/calculator2/build.xml | 72 - .../sca-android/samples/calculator2/calculator.png | Bin 20552 -> 0 bytes .../sca-android/samples/calculator2/calculator.svg | 329 - branches/sca-android/samples/calculator2/pom.xml | 65 - .../src/main/java/calculator/AddService.java | 28 - .../src/main/java/calculator/AddServiceImpl.java | 35 - .../src/main/java/calculator/CalculatorClient.java | 45 - .../main/java/calculator/CalculatorService.java | 35 - .../java/calculator/CalculatorServiceImpl.java | 70 - .../src/main/java/calculator/DivideService.java | 28 - .../main/java/calculator/DivideServiceImpl.java | 35 - .../src/main/java/calculator/MultiplyService.java | 28 - .../main/java/calculator/MultiplyServiceImpl.java | 35 - .../src/main/java/calculator/SubtractService.java | 28 - .../main/java/calculator/SubtractServiceImpl.java | 35 - .../src/main/resources/Calculator.composite | 49 - .../test/java/calculator/CalculatorTestCase.java | 51 - .../sca-android/samples/callback-ws-client/README | 311 - .../samples/callback-ws-client/build.xml | 73 - .../callback-ws-client/callback-ws-client.png | Bin 8812 -> 0 bytes .../callback-ws-client/callback-ws-client.svg | 204 - .../sca-android/samples/callback-ws-client/pom.xml | 86 - .../src/main/java/myapp/MyClient.java | 29 - .../src/main/java/myapp/MyClientImpl.java | 64 - .../src/main/java/myserver/MyService.java | 34 - .../src/main/java/myserver/MyServiceCallback.java | 30 - .../main/resources/META-INF/sca-contribution.xml | 22 - .../src/main/resources/myapp.composite | 36 - .../test/java/myapp/CallbackClientTestCase.java | 53 - .../sca-android/samples/callback-ws-service/README | 227 - .../samples/callback-ws-service/build.xml | 73 - .../callback-ws-service/callback-ws-service.png | Bin 8949 -> 0 bytes .../callback-ws-service/callback-ws-service.svg | 200 - .../samples/callback-ws-service/pom.xml | 79 - .../src/main/java/myserver/CallbackServer.java | 48 - .../src/main/java/myserver/MyService.java | 34 - .../src/main/java/myserver/MyServiceCallback.java | 30 - .../src/main/java/myserver/MyServiceImpl.java | 56 - .../main/resources/META-INF/sca-contribution.xml | 24 - .../src/main/resources/callbackws.composite | 35 - .../test/java/myserver/CallbackServerTestCase.java | 52 - branches/sca-android/samples/callbacks-jms/README | 73 - .../sca-android/samples/callbacks-jms/build.xml | 72 - branches/sca-android/samples/callbacks-jms/pom.xml | 92 - .../src/main/java/callbacks/OrderCallback.java | 30 - .../src/main/java/callbacks/OrderRequest.java | 24 - .../src/main/java/callbacks/OrderResponse.java | 24 - .../src/main/java/callbacks/OrderService.java | 33 - .../main/java/callbacks/OrderServiceClient.java | 59 - .../src/main/java/callbacks/OrderServiceImpl.java | 51 - .../src/main/resources/callbacks.composite | 44 - .../src/main/resources/jndi.properties | 30 - .../src/test/java/callbacks/CallbacksTestCase.java | 64 - branches/sca-android/samples/customer-dojo/README | 104 - .../samples/customer-dojo/build-dojo.xml | 92 - .../sca-android/samples/customer-dojo/build.xml | 70 - .../customer-dojo/customer-dojo-jsonrpc.png | Bin 9947 -> 0 bytes .../customer-dojo/customer-dojo-jsonrpc.svg | 177 - .../sca-android/samples/customer-dojo/customer.sql | 33 - branches/sca-android/samples/customer-dojo/pom.xml | 245 - .../src/main/java/customer/Customer.java | 93 - .../src/main/java/customer/CustomerCollection.java | 26 - .../main/java/customer/CustomerCollectionImpl.java | 101 - .../src/main/java/customer/CustomerService.java | 31 - .../main/java/customer/CustomerServiceImpl.java | 117 - .../customer-dojo/src/main/java/launch/Launch.java | 34 - .../src/main/resources/META-INF/orm.xml | 51 - .../src/main/resources/META-INF/persistence.xml | 40 - .../main/resources/META-INF/sca-contribution.xml | 26 - .../src/main/resources/content/customer.html | 77 - .../src/main/resources/customer.composite | 44 - .../sca-android/samples/domain-management/README | 8 - .../sca-android/samples/domain-management/pom.xml | 247 - .../java/manager/DistributeAndRunComponents.java | 328 - .../main/java/manager/DistributeComponents.java | 288 - .../src/main/java/manager/ListComponents.java | 158 - .../src/main/java/manager/ListDependencies.java | 108 - .../src/main/java/manager/ListDeployables.java | 73 - .../src/main/java/manager/WireComponents.java | 218 - .../src/test/java/services/Cart.java | 28 - .../src/test/java/services/Item.java | 66 - .../test/java/services/ShoppingCartClientImpl.java | 57 - .../src/test/java/services/ShoppingCartImpl.java | 100 - .../src/test/resources/assembly/assets.xml | 38 - .../src/test/resources/assembly/client.xml | 34 - .../src/test/resources/assembly/store.xml | 34 - .../resources/assets/META-INF/sca-contribution.xml | 22 - .../resources/client/META-INF/sca-contribution.xml | 24 - .../src/test/resources/client/client.composite | 35 - .../resources/store/META-INF/sca-contribution.xml | 24 - .../src/test/resources/store/store.composite | 32 - .../samples/feed-aggregator-webapp/README | 55 - .../feed-aggregator-webapp.png | Bin 23443 -> 0 bytes .../feed-aggregator-webapp.svg | 382 - .../samples/feed-aggregator-webapp/pom.xml | 108 - .../src/main/java/feed/AggregatorImpl.java | 178 - .../src/main/java/feed/Sort.java | 38 - .../src/main/java/feed/SortImpl.java | 57 - .../src/main/resources/FeedAggregator.composite | 60 - .../src/main/webapp/META-INF/sca-contribution.xml | 26 - .../src/main/webapp/WEB-INF/web.xml | 41 - .../src/main/webapp/index.html | 32 - .../sca-android/samples/feed-aggregator/README | 110 - .../sca-android/samples/feed-aggregator/build.xml | 72 - .../samples/feed-aggregator/feed-aggregator.png | Bin 17429 -> 0 bytes .../samples/feed-aggregator/feed-aggregator.svg | 364 - .../sca-android/samples/feed-aggregator/pom.xml | 84 - .../src/main/java/feed/AggregatorImpl.java | 188 - .../feed-aggregator/src/main/java/feed/Sort.java | 38 - .../src/main/java/feed/SortImpl.java | 57 - .../src/main/java/launch/LaunchFeedServer.java | 47 - .../src/main/resources/FeedAggregator.composite | 60 - .../src/test/java/feed/FeedAggregatorTest.java | 332 - .../sca-android/samples/helloworld-bpel-ws/README | 151 - .../samples/helloworld-bpel-ws/build.xml | 95 - .../samples/helloworld-bpel-ws/helloworld-bpel.png | Bin 8897 -> 0 bytes .../samples/helloworld-bpel-ws/helloworld-bpel.svg | 179 - .../sca-android/samples/helloworld-bpel-ws/pom.xml | 205 - .../src/main/java/helloworld/BPELClient.java | 43 - .../src/main/resources/deploy.xml | 31 - .../src/main/resources/helloworld.bpel | 66 - .../src/main/resources/helloworld.componentType | 30 - .../src/main/resources/helloworld.composite | 33 - .../src/main/resources/helloworld.wsdl | 82 - .../src/main/resources/log4j.properties | 35 - .../java/helloworld/BPELHelloWorldTestCase.java | 59 - .../sca-android/samples/helloworld-bpel/README | 151 - .../sca-android/samples/helloworld-bpel/build.xml | 95 - .../samples/helloworld-bpel/helloworld-bpel.png | Bin 8897 -> 0 bytes .../samples/helloworld-bpel/helloworld-bpel.svg | 179 - .../sca-android/samples/helloworld-bpel/pom.xml | 198 - .../src/main/java/helloworld/BPELClient.java | 43 - .../helloworld-bpel/src/main/resources/deploy.xml | 31 - .../src/main/resources/helloworld.bpel | 66 - .../src/main/resources/helloworld.componentType | 30 - .../src/main/resources/helloworld.composite | 29 - .../src/main/resources/helloworld.wsdl | 82 - .../src/main/resources/log4j.properties | 35 - .../java/helloworld/BPELHelloWorldTestCase.java | 59 - .../samples/helloworld-dojo-webapp/README | 104 - .../samples/helloworld-dojo-webapp/build-dojo.xml | 92 - .../samples/helloworld-dojo-webapp/build.xml | 70 - .../helloworld-dojo-webapp/helloworld-jsonrpc.png | Bin 9947 -> 0 bytes .../helloworld-dojo-webapp/helloworld-jsonrpc.svg | 177 - .../samples/helloworld-dojo-webapp/pom.xml | 163 - .../java/helloworldjsonrpc/HelloWorldService.java | 28 - .../helloworldjsonrpc/HelloWorldServiceImpl.java | 38 - .../src/main/resources/jsonrpc.composite | 37 - .../src/main/webapp/HelloWorldJSONRPC.html | 98 - .../src/main/webapp/META-INF/sca-contribution.xml | 26 - .../src/main/webapp/WEB-INF/web.xml | 41 - .../src/main/webapp/style.css | 22 - .../samples/helloworld-jms-webapp/README | 130 - .../samples/helloworld-jms-webapp/pom.xml | 72 - .../src/main/java/helloworld/HelloWorldClient.java | 37 - .../main/java/helloworld/HelloWorldService.java | 29 - .../java/helloworld/HelloWorldServiceImpl.java | 34 - .../src/main/webapp/META-INF/context.xml | 29 - .../META-INF/sca-deployables/HelloWorld.composite | 39 - .../src/main/webapp/WEB-INF/web.xml | 66 - .../src/main/webapp/hello.jsp | 44 - .../samples/helloworld-jsonrpc-webapp/README | 90 - .../helloworld-jsonrpc.png | Bin 9947 -> 0 bytes .../helloworld-jsonrpc.svg | 177 - .../samples/helloworld-jsonrpc-webapp/pom.xml | 103 - .../java/helloworldjsonrpc/HelloWorldService.java | 28 - .../helloworldjsonrpc/HelloWorldServiceImpl.java | 36 - .../src/main/resources/jsonrpc.composite | 37 - .../src/main/webapp/HelloWorldJSONRPC.html | 75 - .../src/main/webapp/META-INF/sca-contribution.xml | 26 - .../src/main/webapp/WEB-INF/web.xml | 41 - .../src/main/webapp/style.css | 22 - .../samples/helloworld-reference-jms/README | 114 - .../samples/helloworld-reference-jms/build.xml | 72 - .../helloworld-reference.png | Bin 12973 -> 0 bytes .../helloworld-reference.svg | 144 - .../samples/helloworld-reference-jms/pom.xml | 92 - .../src/main/java/helloworld/HelloWorldImpl.java | 33 - .../main/java/helloworld/HelloWorldJmsClient.java | 41 - .../main/java/helloworld/HelloWorldService.java | 29 - .../helloworld/HelloWorldServiceComponent.java | 42 - .../resources/helloworldjmsreference.composite | 40 - .../main/resources/helloworldjmsservice.composite | 39 - .../src/main/resources/logging.properties | 30 - .../src/main/resources/wsdl/helloworld.wsdl | 92 - .../helloworld/HelloWorldJmsClientTestCase.java | 80 - .../samples/helloworld-service-jms/README | 101 - .../samples/helloworld-service-jms/build.xml | 72 - .../helloworld-service-jms/helloworld-service.png | Bin 9455 -> 0 bytes .../helloworld-service-jms/helloworld-service.svg | 139 - .../samples/helloworld-service-jms/pom.xml | 85 - .../src/main/java/helloworld/HelloWorldImpl.java | 33 - .../src/main/java/helloworld/HelloWorldServer.java | 58 - .../main/java/helloworld/HelloWorldService.java | 31 - .../src/main/resources/definitions.xml | 66 - .../main/resources/helloworldjmsservice.composite | 40 - .../src/main/resources/wsdl/helloworld.wsdl | 92 - .../helloworld/HelloWorldJmsServerTestCaseOff.java | 60 - .../samples/helloworld-ws-reference-jms/README | 127 - .../samples/helloworld-ws-reference-jms/build.xml | 72 - .../helloworld-ws-reference.png | Bin 7549 -> 0 bytes .../helloworld-ws-reference.svg | 150 - .../samples/helloworld-ws-reference-jms/pom.xml | 92 - .../src/main/java/helloworld/HelloWorldImpl.java | 33 - .../main/java/helloworld/HelloWorldJmsClient.java | 38 - .../main/java/helloworld/HelloWorldService.java | 29 - .../helloworld/HelloWorldServiceComponent.java | 42 - .../src/main/resources/helloworldwsjms.composite | 34 - .../main/resources/helloworldwsjmsclient.composite | 45 - .../src/main/resources/logging.properties | 30 - .../src/main/resources/wsdl/helloworld.wsdl | 92 - .../helloworld/HelloWorldJmsClientTestCase.java | 84 - .../samples/helloworld-ws-reference-lean/README | 178 - .../helloworld-ws-reference.png | Bin 7549 -> 0 bytes .../helloworld-ws-reference.svg | 150 - .../samples/helloworld-ws-reference-lean/pom.xml | 79 - .../src/main/java/helloworld/HelloWorldClient.java | 47 - .../main/java/helloworld/HelloWorldClient2.java | 53 - .../main/java/helloworld/HelloWorldClient3.java | 47 - .../main/java/helloworld/HelloWorldClient4.java | 52 - .../main/java/helloworld/HelloWorldClient5.java | 47 - .../main/java/helloworld/HelloWorldService.java | 29 - .../main/resources/helloworldwsclient.composite | 33 - .../main/resources/helloworldwsclient2.composite | 33 - .../main/resources/helloworldwsclient3.composite | 33 - .../main/resources/helloworldwsclient4.composite | 34 - .../main/resources/helloworldwsclient5.composite | 33 - .../src/main/resources/logging.properties | 30 - .../src/main/resources/wsdl/helloworld.wsdl | 92 - .../java/helloworld/HelloWorldClientTestCase.java | 58 - .../test/java/helloworld/HelloWorldTestServer.java | 55 - .../samples/helloworld-ws-reference-secure/README | 176 - .../helloworld-ws-reference-secure/build.xml | 72 - .../helloworld-ws-reference-secure.png | Bin 7549 -> 0 bytes .../helloworld-ws-reference-secure.svg | 150 - .../samples/helloworld-ws-reference-secure/pom.xml | 85 - .../main/java/helloworld/ClientPWCBHandler.java | 45 - .../src/main/java/helloworld/HelloWorldClient.java | 42 - .../main/java/helloworld/HelloWorldService.java | 29 - .../helloworld/HelloWorldServiceComponent.java | 42 - ...rg.apache.tuscany.sca.policy.util.PolicyHandler | 21 - .../src/main/resources/definitions.xml | 203 - .../src/main/resources/helloworldKeys.jks | Bin 1366 -> 0 bytes .../main/resources/helloworldwsclient.composite | 58 - .../src/main/resources/logging.properties | 30 - .../src/main/resources/wsdl/helloworld.wsdl | 85 - .../java/helloworld/HelloWorldClientTestCase.java | 74 - .../test/java/helloworld/HelloWorldTestServer.java | 55 - .../samples/helloworld-ws-reference/README | 178 - .../samples/helloworld-ws-reference/build.xml | 72 - .../helloworld-ws-reference.png | Bin 7549 -> 0 bytes .../helloworld-ws-reference.svg | 150 - .../samples/helloworld-ws-reference/pom.xml | 79 - .../src/main/java/helloworld/HelloWorldClient.java | 38 - .../main/java/helloworld/HelloWorldService.java | 29 - .../helloworld/HelloWorldServiceComponent.java | 42 - .../main/resources/helloworldwsclient.composite | 45 - .../src/main/resources/logging.properties | 30 - .../src/main/resources/wsdl/helloworld.wsdl | 92 - .../java/helloworld/HelloWorldClientTestCase.java | 74 - .../test/java/helloworld/HelloWorldTestServer.java | 55 - .../samples/helloworld-ws-sdo-webapp/README | 92 - .../samples/helloworld-ws-sdo-webapp/build.xml | 99 - .../helloworld-ws-sdo-webapp.png | Bin 12242 -> 0 bytes .../helloworld-ws-sdo-webapp.svg | 221 - .../samples/helloworld-ws-sdo-webapp/pom.xml | 200 - .../src/main/java/helloworld/HelloWorld.java | 44 - .../main/java/helloworld/HelloWorldComponent.java | 40 - .../src/main/java/helloworld/HelloWorldImpl.java | 48 - .../src/main/resources/helloworldws.composite | 43 - .../src/main/resources/wsdl/helloworld.wsdl | 111 - .../src/main/resources/wsdl/helloworld.xsd | 30 - .../src/main/webapp/HelloWorld.jsp | 48 - .../src/main/webapp/META-INF/sca-contribution.xml | 24 - .../src/main/webapp/WEB-INF/geronimo-web.xml | 41 - .../src/main/webapp/WEB-INF/web.xml | 46 - .../sca-android/samples/helloworld-ws-sdo/README | 214 - .../samples/helloworld-ws-sdo/build.xml | 101 - .../helloworld-ws-sdo/helloworld-ws-sdo.png | Bin 7549 -> 0 bytes .../helloworld-ws-sdo/helloworld-ws-sdo.svg | 150 - .../sca-android/samples/helloworld-ws-sdo/pom.xml | 139 - .../src/main/java/helloworld/HelloWorldClient.java | 44 - .../src/main/java/helloworld/HelloWorldImpl.java | 33 - .../src/main/java/helloworld/HelloWorldServer.java | 46 - .../main/java/helloworld/HelloWorldService.java | 29 - .../helloworld/HelloWorldServiceComponent.java | 42 - .../src/main/resources/helloworldws.composite | 32 - .../main/resources/helloworldwsclient.composite | 33 - .../src/main/resources/logging.properties | 30 - .../src/main/resources/wsdl/helloworld.wsdl | 88 - .../java/helloworld/HelloWorldClientTestCase.java | 69 - .../test/java/helloworld/HelloWorldTestServer.java | 55 - .../samples/helloworld-ws-service-jms/README | 119 - .../samples/helloworld-ws-service-jms/build.xml | 72 - .../helloworld-ws-service.png | Bin 6531 -> 0 bytes .../helloworld-ws-service.svg | 150 - .../samples/helloworld-ws-service-jms/pom.xml | 87 - .../src/main/java/helloworld/HelloWorldImpl.java | 33 - .../src/main/java/helloworld/HelloWorldServer.java | 60 - .../main/java/helloworld/HelloWorldService.java | 31 - .../src/main/resources/definitions.xml | 66 - .../src/main/resources/helloworldwsjms.composite | 35 - .../main/resources/helloworldwsjmspolicy.composite | 34 - .../src/main/resources/wsdl/helloworld.wsdl | 92 - .../HelloWorldJmsPolicyServerTestCase.java | 68 - .../helloworld/HelloWorldJmsServerTestCase.java | 72 - .../samples/helloworld-ws-service-secure/README | 152 - .../samples/helloworld-ws-service-secure/build.xml | 72 - .../helloworld-ws-service-secure.png | Bin 158 -> 0 bytes .../helloworld-ws-service-secure.svg | 149 - .../samples/helloworld-ws-service-secure/pom.xml | 85 - .../src/main/java/helloworld/HelloWorldImpl.java | 33 - .../src/main/java/helloworld/HelloWorldServer.java | 46 - .../main/java/helloworld/HelloWorldService.java | 31 - .../main/java/helloworld/ServerPWCBHandler.java | 55 - .../src/main/resources/definitions.xml | 113 - .../src/main/resources/helloworldKeys.jks | Bin 1366 -> 0 bytes .../src/main/resources/helloworldws.composite | 41 - .../src/main/resources/wsdl/helloworld.wsdl | 79 - .../java/helloworld/HelloWorldServerTestCase.java | 62 - .../samples/helloworld-ws-service-webapp/README | 1 - .../samples/helloworld-ws-service-webapp/build.xml | 156 - .../samples/helloworld-ws-service-webapp/pom.xml | 80 - .../src/main/java/helloworld/HelloWorldImpl.java | 33 - .../main/java/helloworld/HelloWorldService.java | 30 - .../src/main/resources/wsdl/helloworld.wsdl | 79 - .../sca-deployables/helloworldws.composite | 32 - .../src/main/webapp/WEB-INF/geronimo-web.xml | 33 - .../src/main/webapp/WEB-INF/web.xml | 45 - .../samples/helloworld-ws-service/README | 141 - .../samples/helloworld-ws-service/build.xml | 72 - .../helloworld-ws-service.png | Bin 6531 -> 0 bytes .../helloworld-ws-service.svg | 150 - .../samples/helloworld-ws-service/pom.xml | 79 - .../src/main/java/helloworld/HelloWorldImpl.java | 33 - .../src/main/java/helloworld/HelloWorldServer.java | 46 - .../main/java/helloworld/HelloWorldService.java | 31 - .../sca-deployables/helloworldws.composite | 33 - .../src/main/resources/wsdl/helloworld.wsdl | 79 - .../java/helloworld/HelloWorldServerTestCase.java | 62 - .../sca-android/samples/loanapplication/pom.xml | 65 - .../main/java/loanapplication/LoanApplication.java | 36 - .../loanapplication/LoanApplicationClient.java | 37 - .../src/main/java/loanapplication/LoanClient.java | 29 - .../main/java/loanapplication/LoanClientImpl.java | 64 - .../src/main/java/loanapplication/LoanService.java | 43 - .../main/java/loanapplication/LoanServiceImpl.java | 63 - .../src/main/resources/loanapplication.composite | 34 - .../loanapplication/LoanApplicationTestCase.java | 83 - .../sca-android/samples/osgi-supplychain/README | 161 - .../samples/osgi-supplychain/build-bundles.xml | 32 - .../sca-android/samples/osgi-supplychain/build.xml | 128 - .../samples/osgi-supplychain/osgi-supplychain.png | Bin 13558 -> 0 bytes .../samples/osgi-supplychain/osgi-supplychain.svg | 272 - .../sca-android/samples/osgi-supplychain/pom.xml | 187 - .../src/main/java/supplychain/OSGiBundleImpl.java | 121 - .../main/java/supplychain/SupplyChainClient.java | 43 - .../main/java/supplychain/customer/Customer.java | 33 - .../customer/JavaCustomerComponentImpl.java | 50 - .../customer/OSGiCustomerComponentImpl.java | 51 - .../supplychain/customer/OSGiCustomerImpl.java | 47 - .../retailer/JavaRetailerComponentImpl.java | 53 - .../retailer/OSGiRetailerComponentImpl.java | 46 - .../supplychain/retailer/OSGiRetailerImpl.java | 44 - .../main/java/supplychain/retailer/Retailer.java | 28 - .../shipper/JavaShipperComponentImpl.java | 47 - .../shipper/OSGiShipperComponentImpl.java | 45 - .../java/supplychain/shipper/OSGiShipperImpl.java | 42 - .../src/main/java/supplychain/shipper/Shipper.java | 28 - .../warehouse/JavaWarehouseComponentImpl.java | 47 - .../warehouse/OSGiWarehouseComponentImpl.java | 47 - .../supplychain/warehouse/OSGiWarehouseImpl.java | 44 - .../main/java/supplychain/warehouse/Warehouse.java | 28 - .../src/main/resources/Customer.componentType | 28 - .../src/main/resources/DSCustomer.componentType | 28 - .../src/main/resources/DSRetailer.componentType | 28 - .../src/main/resources/DSShipper.componentType | 28 - .../src/main/resources/DSWarehouse.componentType | 28 - .../src/main/resources/Retailer.componentType | 28 - .../src/main/resources/Shipper.componentType | 28 - .../src/main/resources/Warehouse.componentType | 28 - .../src/main/resources/osgi/Customer.mf | 11 - .../src/main/resources/osgi/Retailer.mf | 10 - .../src/main/resources/osgi/Shipper.mf | 10 - .../src/main/resources/osgi/Warehouse.mf | 10 - .../src/main/resources/osgi/ds/Customer.mf | 10 - .../src/main/resources/osgi/ds/Customer.xml | 32 - .../src/main/resources/osgi/ds/Retailer.mf | 11 - .../src/main/resources/osgi/ds/Retailer.xml | 32 - .../src/main/resources/osgi/ds/Shipper.mf | 10 - .../src/main/resources/osgi/ds/Shipper.xml | 33 - .../src/main/resources/osgi/ds/Warehouse.mf | 11 - .../src/main/resources/osgi/ds/Warehouse.xml | 32 - .../src/main/resources/supplychain.composite | 61 - .../src/main/resources/supplychain.ds.composite | 61 - .../supplychain/SupplyChainClientTestCase.java | 60 - branches/sca-android/samples/photo-gallery/README | 28 - .../sca-android/samples/photo-gallery/build.xml | 79 - .../samples/photo-gallery/photo-gallery.png | Bin 15670 -> 0 bytes .../samples/photo-gallery/photo-gallery.svg | 304 - branches/sca-android/samples/photo-gallery/pom.xml | 148 - .../src/main/java/launch/LaunchGallery.java | 34 - .../src/main/java/launch/LaunchGalleryJCR.java | 34 - .../src/main/java/services/Album.java | 29 - .../src/main/java/services/AlbumImpl.java | 95 - .../src/main/java/services/jcr/AlbumImpl.java | 159 - .../photo-gallery/src/main/resources/gallery.html | 135 - .../src/main/resources/gallery/boston/dsc00368.jpg | Bin 32808 -> 0 bytes .../src/main/resources/gallery/boston/dsc00369.jpg | Bin 35980 -> 0 bytes .../src/main/resources/gallery/boston/dsc00370.jpg | Bin 44614 -> 0 bytes .../src/main/resources/gallery/boston/dsc00371.jpg | Bin 40745 -> 0 bytes .../src/main/resources/gallery/boston/dsc00373.jpg | Bin 76470 -> 0 bytes .../src/main/resources/gallery/boston/dsc00375.jpg | Bin 34834 -> 0 bytes .../src/main/resources/gallery/boston/dsc00376.jpg | Bin 38797 -> 0 bytes .../src/main/resources/gallery/boston/dsc00377.jpg | Bin 35776 -> 0 bytes .../src/main/resources/gallery/boston/dsc00378.jpg | Bin 35248 -> 0 bytes .../src/main/resources/gallery/boston/dsc00379.jpg | Bin 55042 -> 0 bytes .../src/main/resources/gallery/boston/dsc00380.jpg | Bin 55236 -> 0 bytes .../photo-gallery/src/main/resources/index.gif | Bin 564 -> 0 bytes .../photo-gallery/src/main/resources/index_on.gif | Bin 577 -> 0 bytes .../photo-gallery/src/main/resources/next.gif | Bin 535 -> 0 bytes .../src/main/resources/next_disabled.gif | Bin 536 -> 0 bytes .../photo-gallery/src/main/resources/next_on.gif | Bin 542 -> 0 bytes .../src/main/resources/photo-gallery-jcr.composite | 47 - .../src/main/resources/photo-gallery.composite | 47 - .../photo-gallery/src/main/resources/prev.gif | Bin 534 -> 0 bytes .../src/main/resources/prev_disabled.gif | Bin 536 -> 0 bytes .../photo-gallery/src/main/resources/prev_on.gif | Bin 541 -> 0 bytes .../src/main/resources/show_slide.gif | Bin 533 -> 0 bytes .../photo-gallery/src/main/resources/space.gif | Bin 116 -> 0 bytes .../photo-gallery/src/main/resources/styles.css | 121 - branches/sca-android/samples/pom.xml | 50 - branches/sca-android/samples/quote-xquery/README | 450 - .../sca-android/samples/quote-xquery/build.xml | 120 - branches/sca-android/samples/quote-xquery/pom.xml | 184 - .../java/xquery/quote/AvailQuoteProviderImpl.java | 30 - .../xquery/quote/AvailQuoteProviderNodeInfo.java | 28 - .../xquery/quote/AvailQuoteProviderService.java | 27 - .../xquery/quote/ExternalReferencesQuoteJoin.java | 27 - .../main/java/xquery/quote/PriceQuoteProvider.java | 28 - .../java/xquery/quote/PriceQuoteProviderImpl.java | 27 - .../xquery/quote/PriceQuoteProviderNodeInfo.java | 28 - .../java/xquery/quote/PropertiesQuoteJoin.java | 32 - .../main/java/xquery/quote/QuoteCalculator.java | 26 - .../java/xquery/quote/QuoteCalculatorImpl.java | 38 - .../src/main/java/xquery/quote/QuoteDataUtil.java | 107 - .../src/main/java/xquery/quote/QuoteJoin.java | 34 - .../src/main/java/xquery/quote/QuoteJoinLocal.java | 34 - .../main/java/xquery/quote/QuoteJoinLocalImpl.java | 67 - .../main/java/xquery/quote/XQueryQuoteClient.java | 145 - .../main/java/xquery/quote/XQueryQuoteServer.java | 39 - .../src/main/resources/META-INF/sca/quote_join.xq | 61 - .../META-INF/sca/quote_join_external_references.xq | 69 - .../META-INF/sca/quote_join_properties.xq | 74 - .../src/main/resources/wsdl/AvailQuote.xsd | 39 - .../src/main/resources/wsdl/PriceQuote.xsd | 49 - .../quote-xquery/src/main/resources/wsdl/Quote.xsd | 40 - .../src/main/resources/wsdl/quotejoin.wsdl | 137 - .../src/main/resources/xqueryquotews.composite | 55 - .../main/resources/xqueryquotewsclient.composite | 113 - .../xquery/quote/XQueryQuoteClientTestCase.java | 192 - .../java/xquery/quote/XQueryQuoteTestServer.java | 50 - .../samples/simple-bigbank-spring/README | 148 - .../samples/simple-bigbank-spring/build-dojo.xml | 92 - .../samples/simple-bigbank-spring/build.xml | 72 - .../samples/simple-bigbank-spring/pom.xml | 252 - .../simple-bigbank-spring.png | Bin 10202 -> 0 bytes .../simple-bigbank-spring.svg | 200 - .../main/java/bigbank/account/AccountReport.java | 43 - .../main/java/bigbank/account/AccountService.java | 26 - .../java/bigbank/account/AccountServiceImpl.java | 145 - .../account/checking/CheckingAccountDetails.java | 45 - .../account/checking/CheckingAccountService.java | 34 - .../java/bigbank/account/feed/AccountFeedImpl.java | 71 - .../account/savings/SavingsAccountDetails.java | 47 - .../account/savings/SavingsAccountService.java | 32 - .../account/savings/SavingsAccountServiceImpl.java | 62 - .../bigbank/account/stock/StockAccountDetails.java | 63 - .../bigbank/account/stock/StockAccountService.java | 33 - .../account/stock/StockAccountServiceImpl.java | 56 - .../java/bigbank/calculator/CalculatorService.java | 34 - .../main/java/bigbank/client/BigBankClient.java | 46 - .../main/java/bigbank/server/BigBankServer.java | 54 - .../java/bigbank/stockquote/StockQuoteService.java | 31 - .../src/main/resources/BigBank.composite | 88 - .../src/main/resources/SavingsAccount.composite | 32 - .../src/main/resources/StockAccount.composite | 32 - .../spring-context/Account-spring-context.xml | 53 - .../spring-context/SavingsAccount-context.xml | 33 - .../StockAccount/META-INF/MANIFEST.MF | 4 - .../META-INF/spring/StockAccount-context.xml | 33 - .../src/main/resources/web/style.css | 22 - .../src/test/java/bigbank/BigBankTestCase.java | 34 - .../sca-android/samples/simple-callback-ws/README | 144 - .../samples/simple-callback-ws/build.xml | 72 - .../sca-android/samples/simple-callback-ws/pom.xml | 79 - .../simple-callback-ws/simple-callback-ws.png | Bin 137 -> 0 bytes .../simple-callback-ws/simple-callback-ws.svg | 150 - .../src/main/java/simplecallback/MyClient.java | 27 - .../src/main/java/simplecallback/MyClientImpl.java | 51 - .../src/main/java/simplecallback/MyService.java | 34 - .../java/simplecallback/MyServiceCallback.java | 30 - .../main/java/simplecallback/MyServiceImpl.java | 54 - .../java/simplecallback/SimpleCallbackClient.java | 38 - .../src/main/resources/simplecallback.composite | 49 - .../src/main/resources/wsdl/simplecallback.wsdl | 109 - .../simplecallback/SimpleCallbackTestCase.java | 53 - .../samples/spring-bigbank-calculator/README | 2 - .../samples/spring-bigbank-calculator/build.xml | 72 - .../samples/spring-bigbank-calculator/pom.xml | 92 - .../main/java/bigbank/calculator/AddService.java | 25 - .../java/bigbank/calculator/CalculatorService.java | 34 - .../bigbank/calculator/CalculatorServiceImpl.java | 72 - .../java/bigbank/calculator/DivideService.java | 25 - .../java/bigbank/calculator/MultiplyService.java | 25 - .../java/bigbank/calculator/SubtractService.java | 25 - .../calculator/server/CalculatorServer.java | 44 - .../src/main/resources/Calculator.composite | 56 - .../META-INF/spring/CalculatorService-context.xml | 45 - .../main/resources/calculator/AddServiceImpl.js | 22 - .../resources/calculator/DivideServiceImpl.groovy | 22 - .../resources/calculator/MultiplyServiceImpl.py | 21 - .../resources/calculator/SubtractServiceImpl.rb | 22 - .../samples/spring-bigbank-checkaccount/README | 4 - .../samples/spring-bigbank-checkaccount/build.xml | 73 - .../samples/spring-bigbank-checkaccount/pom.xml | 108 - .../account/checking/CheckingAccountDetails.java | 50 - .../account/checking/CheckingAccountService.java | 37 - .../checking/CheckingAccountServiceImpl.java | 66 - .../checking/server/CheckingAccountServer.java | 61 - .../AccountsDataPasswordCallbackHandler.java | 54 - .../account/security/BigbankCheckingsAcl.java | 48 - ...ckingsDeptAuthImplementationPolicyProvider.java | 90 - .../account/security/CheckingsDeptAuthPolicy.java | 46 - .../CheckingsDeptAuthPolicyInterceptor.java | 71 - .../CheckingsDeptAuthPolicyProviderFactory.java | 75 - .../CheckingsDeptAuthorizationPolicyHandler.java | 65 - .../CheckingsDeptAuthorizationPolicyProcessor.java | 72 - .../src/main/resources/CheckingsAccount.composite | 41 - ...ca.contribution.processor.StAXArtifactProcessor | 19 - ...rg.apache.tuscany.sca.policy.util.PolicyHandler | 20 - ...ache.tuscany.sca.provider.PolicyProviderFactory | 19 - .../src/main/resources/definitions.xml | 58 - .../spring/CheckingAccountService-context.xml | 33 - .../samples/spring-bigbank-stockquote/README | 4 - .../samples/spring-bigbank-stockquote/build.xml | 73 - .../samples/spring-bigbank-stockquote/pom.xml | 112 - .../java/bigbank/stockquote/StockQuoteImpl.java | 38 - .../java/bigbank/stockquote/StockQuoteService.java | 30 - .../server/SCAApplicationContextProvider.java | 19 - .../stockquote/server/StockQuoteServer.java | 50 - .../META-INF/spring/StockQuoteService-context.xml | 36 - .../src/main/resources/StockQuote.composite | 35 - .../sca-android/samples/store-distributed/README | 28 - .../samples/store-distributed/build.xml | 79 - .../samples/store-distributed/cloud.composite | 27 - .../samples/store-distributed/domain.composite | 27 - .../sca-android/samples/store-distributed/pom.xml | 119 - .../src/main/java/node/LaunchDomain.java | 33 - .../src/main/java/node/LaunchStoreNodeA.java | 28 - .../src/main/java/node/LaunchStoreNodeB.java | 28 - .../src/main/java/node/LaunchStoreNodeC.java | 28 - .../src/main/java/services/Cart.java | 28 - .../src/main/java/services/Catalog.java | 27 - .../src/main/java/services/CurrencyConverter.java | 29 - .../main/java/services/CurrencyConverterImpl.java | 38 - .../src/main/java/services/FruitsCatalogImpl.java | 52 - .../src/main/java/services/Item.java | 51 - .../src/main/java/services/ShoppingCartImpl.java | 112 - .../src/main/java/services/Total.java | 29 - .../src/main/resources/cloud/NodeA.composite | 36 - .../src/main/resources/cloud/NodeB.composite | 36 - .../src/main/resources/cloud/NodeC.composite | 36 - .../resources/nodeA/META-INF/sca-contribution.xml | 24 - .../src/main/resources/nodeA/store.composite | 38 - .../resources/nodeB/META-INF/sca-contribution.xml | 24 - .../src/main/resources/nodeB/store.composite | 35 - .../resources/nodeC/META-INF/sca-contribution.xml | 24 - .../src/main/resources/nodeC/store.composite | 41 - .../src/main/resources/nodeC/uiservices/store.html | 162 - .../src/main/resources/uiservices/store.html | 162 - .../samples/store-distributed/store.png | Bin 15670 -> 0 bytes .../samples/store-distributed/store.svg | 304 - .../samples/store-distributed/workspace.xml | 25 - branches/sca-android/samples/store/README | 28 - branches/sca-android/samples/store/build.xml | 79 - branches/sca-android/samples/store/pom.xml | 106 - .../samples/store/src/main/java/launch/Launch.java | 34 - .../samples/store/src/main/java/services/Cart.java | 28 - .../store/src/main/java/services/Catalog.java | 27 - .../src/main/java/services/CurrencyConverter.java | 29 - .../main/java/services/CurrencyConverterImpl.java | 38 - .../src/main/java/services/FruitsCatalogImpl.java | 52 - .../samples/store/src/main/java/services/Item.java | 51 - .../src/main/java/services/ShoppingCartImpl.java | 112 - .../store/src/main/java/services/Total.java | 29 - .../store/src/main/resources/store.composite | 64 - .../store/src/main/resources/uiservices/store.html | 162 - branches/sca-android/samples/store/store.png | Bin 15670 -> 0 bytes branches/sca-android/samples/store/store.svg | 304 - branches/sca-android/samples/web-resource/README | 76 - .../sca-android/samples/web-resource/build.xml | 72 - branches/sca-android/samples/web-resource/pom.xml | 79 - .../src/main/java/web/resource/SampleServer.java | 44 - .../src/main/resources/WebResource.composite | 32 - .../src/main/resources/myContent/index.html | 49 - .../samples/web-resource/web-resource.png | Bin 8418 -> 0 bytes .../samples/web-resource/web-resource.svg | 197 - branches/sca-android/samples/zipcode-jaxws/LICENSE | 205 - branches/sca-android/samples/zipcode-jaxws/NOTICE | 6 - branches/sca-android/samples/zipcode-jaxws/README | 72 - .../sca-android/samples/zipcode-jaxws/build.xml | 68 - branches/sca-android/samples/zipcode-jaxws/pom.xml | 245 - .../java/com/example/uszip/GetInfoByAreaCode.java | 81 - .../example/uszip/GetInfoByAreaCodeResponse.java | 158 - .../main/java/com/example/uszip/GetInfoByCity.java | 81 - .../com/example/uszip/GetInfoByCityResponse.java | 158 - .../java/com/example/uszip/GetInfoByState.java | 81 - .../com/example/uszip/GetInfoByStateResponse.java | 158 - .../main/java/com/example/uszip/GetInfoByZIP.java | 81 - .../com/example/uszip/GetInfoByZIPResponse.java | 158 - .../main/java/com/example/uszip/ObjectFactory.java | 145 - .../src/main/java/com/example/uszip/USZip.java | 89 - .../src/main/java/com/example/uszip/USZipSoap.java | 103 - .../main/java/com/example/uszip/package-info.java | 20 - .../com/example/weather/ArrayOfWeatherData.java | 87 - .../com/example/weather/GetWeatherByPlaceName.java | 81 - .../weather/GetWeatherByPlaceNameResponse.java | 81 - .../com/example/weather/GetWeatherByZipCode.java | 81 - .../weather/GetWeatherByZipCodeResponse.java | 81 - .../java/com/example/weather/ObjectFactory.java | 118 - .../main/java/com/example/weather/WeatherData.java | 219 - .../java/com/example/weather/WeatherForecast.java | 91 - .../com/example/weather/WeatherForecastSoap.java | 73 - .../java/com/example/weather/WeatherForecasts.java | 251 - .../java/com/example/weather/package-info.java | 20 - .../src/main/java/location/LocationClient.java | 55 - .../src/main/java/location/USLocationImpl.java | 56 - .../main/java/weather/WeatherForecastClient.java | 60 - .../src/main/java/weather/WeatherForecastImpl.java | 43 - .../src/main/java/zipcode/ZipCodeClient.java | 36 - .../src/main/java/zipcode/ZipCodeService.java | 30 - .../src/main/java/zipcode/ZipCodeServiceImpl.java | 82 - .../src/main/resources/USLocation.composite | 30 - .../src/main/resources/WeatherForecast.composite | 30 - .../src/main/resources/ZipCode.composite | 33 - .../test/java/zipcode/ZipCodeClientTestCase.java | 51 - branches/sca-android/tools/java2wsdl/LICENSE | 205 - branches/sca-android/tools/java2wsdl/NOTICE | 6 - branches/sca-android/tools/java2wsdl/pom.xml | 235 - .../java2wsdl/generate/GenerationParameters.java | 423 - .../tools/java2wsdl/generate/Java2WSDL.java | 82 - .../java2wsdl/generate/Java2WSDLGenerator.java | 46 - .../generate/Java2WSDLGeneratorFactory.java | 89 - .../java2wsdl/generate/Java2WSDLGeneratorImpl.java | 238 - .../tools/java2wsdl/generate/SchemaBuilder.java | 613 - .../java2wsdl/generate/TuscanyJava2OMBuilder.java | 429 - .../generate/TuscanyJava2WSDLBuilder.java | 81 - .../generate/TuscanyJava2WSDLConstants.java | 56 - .../generate/TuscanyJava2WSDLOptionsValidator.java | 73 - .../java2wsdl/generate/TuscanySchemaGenerator.java | 348 - .../tools/java2wsdl/generate/TuscanyTypeTable.java | 220 - .../generate/TuscanyWSDLTypesGenerator.java | 370 - .../tools/java2wsdl/generate/WSDLGenEvent.java | 42 - .../tools/java2wsdl/generate/WSDLGenListener.java | 39 - .../tuscany/tools/java2wsdl/util/XMLNameUtil.java | 143 - .../src/main/resources/META-INF/LICENSE.txt | 202 - .../tools/java2wsdl/generate/CustomerValue.java | 41 - .../java2wsdl/generate/CustomerWithAccount.java | 49 - .../tools/java2wsdl/generate/ExampleService.java | 31 - .../generate/TuscanyJava2WSDLTestCase.java | 114 - .../tools/java2wsdl/generate/account/Account.java | 53 - .../java2wsdl/generate/customer/Customer.java | 29 - .../java2wsdl/generate/extra/GoldCustomer.java | 33 - .../java/org/soapinterop/CreditScoreDocLit.java | 24 - .../src/test/resources/AccountService.wsdl | 242 - .../src/test/resources/CreditScoreDocLit.wsdl | 76 - .../java2wsdl/src/test/resources/helloworld.wsdl | 121 - .../java2wsdl/src/test/resources/interopdoc.wsdl | 180 - .../java2wsdl/src/test/resources/sequences.xsd | 100 - .../tools/maven/maven-dependency-lister/LICENSE | 205 - .../tools/maven/maven-dependency-lister/NOTICE | 6 - .../tools/maven/maven-dependency-lister/README | 46 - .../tools/maven/maven-dependency-lister/pom.xml | 71 - .../lister/plugin/DependencyListerMojo.java | 198 - .../tools/maven/maven-java2wsdl/LICENSE | 205 - .../sca-android/tools/maven/maven-java2wsdl/NOTICE | 6 - .../tools/maven/maven-java2wsdl/pom.xml | 45 - .../java2wsdl/plugin/Java2WSDLGeneratorMojo.java | 153 - .../tools/maven/maven-osgi-junit/LICENSE | 205 - .../tools/maven/maven-osgi-junit/NOTICE | 6 - .../tools/maven/maven-osgi-junit/pom.xml | 60 - .../tools/sca/osgi/junit/plugin/OSGiJUnitMojo.java | 284 - .../maven/maven-tuscany-bundle-plugin/pom.xml | 77 - .../tuscany/bundle/plugin/LibraryBundleMojo.java | 285 - .../tuscany/bundle/plugin/LibraryBundleUtil.java | 281 - .../bundle/plugin/TuscanyBundlePluginMojo.java | 505 - .../tools/maven/maven-web-junit/LICENSE | 205 - .../sca-android/tools/maven/maven-web-junit/NOTICE | 6 - .../tools/maven/maven-web-junit/pom.xml | 52 - .../web/junit/plugin/WebJUnitGeneratorMojo.java | 181 - .../tools/sca/web/junit/plugin/WebJUnitMojo.java | 205 - .../tools/maven/maven-wsdl2java/LICENSE | 205 - .../sca-android/tools/maven/maven-wsdl2java/NOTICE | 6 - .../tools/maven/maven-wsdl2java/pom.xml | 45 - .../wsdl2java/plugin/WSDL2JavaGeneratorMojo.java | 152 - .../tools/wsdl2java/plugin/WSDLFileOption.java | 92 - branches/sca-android/tools/maven/pom.xml | 5 - branches/sca-android/tools/pom.xml | 4 +- branches/sca-android/tools/wsdl2java/LICENSE | 205 - branches/sca-android/tools/wsdl2java/NOTICE | 6 - branches/sca-android/tools/wsdl2java/pom.xml | 272 - .../wsdl2java/generate/JavaInterfaceEmitter.java | 223 - .../wsdl2java/generate/JavaInterfaceGenerator.java | 327 - .../generate/RemotableInterfaceWritter.java | 53 - .../generate/SDODataBindingCodegenExtension.java | 63 - .../generate/SDODataBindingTypeMappingEntry.java | 51 - .../wsdl2java/generate/WSDL2JavaGenerator.java | 529 - .../tuscany/tools/wsdl2java/util/XMLNameUtil.java | 143 - .../src/main/resources/META-INF/LICENSE.txt | 202 - .../main/resources/RemotableInterfaceTemplate.xsl | 130 - .../generate/WSDL2JavaGeneratorTestCase.java | 80 - .../java/org/soapinterop/CreditScoreDocLit.java | 25 - .../src/test/resources/AccountService.wsdl | 242 - .../test/resources/AccountServiceWithFault.wsdl | 475 - .../src/test/resources/CreditScoreDocLit.wsdl | 76 - .../wsdl2java/src/test/resources/helloworld.wsdl | 121 - .../wsdl2java/src/test/resources/interopdoc.wsdl | 180 - .../wsdl2java/src/test/resources/sequences.xsd | 100 - branches/sca-android/tutorials/pom.xml | 2 - branches/sca-android/tutorials/store/README | 29 - branches/sca-android/tutorials/store/Tutorial.pdf | Bin 309524 -> 0 bytes .../store/assets/META-INF/sca-contribution.xml | 27 - .../sca-android/tutorials/store/assets/pom.xml | 89 - .../tutorials/store/assets/services/Cart.java | 28 - .../tutorials/store/assets/services/Catalog.java | 27 - .../store/assets/services/CurrencyConverter.java | 29 - .../assets/services/CurrencyConverterImpl.java | 38 - .../store/assets/services/FruitsCatalogImpl.java | 52 - .../tutorials/store/assets/services/Item.java | 66 - .../store/assets/services/ShoppingCartImpl.java | 112 - .../tutorials/store/assets/services/Total.java | 29 - .../assets/services/VegetablesCatalogImpl.java | 42 - .../assets/services/db/ShoppingCartTableImpl.java | 171 - .../tutorials/store/assets/services/db/cart.sql | 27 - .../assets/services/map/FruitsCatalogImpl.java | 56 - .../assets/services/market/MarketCatalogImpl.java | 66 - .../assets/services/merger/MergedCatalogImpl.java | 66 - .../tutorials/store/assets/tutorial.html | 37 - .../tutorials/store/assets/uiservices/store.html | 159 - .../tutorials/store/catalog-ejb/pom.xml | 107 - .../src/main/java/services/ejb/CatalogEJBHome.java | 28 - .../main/java/services/ejb/CatalogEJBRemote.java | 28 - .../src/main/java/services/ejb/Vegetable.java | 54 - .../ejb/VegetablesCatalogEJBSessionBean.java | 62 - .../src/main/resources/META-INF/ejb-jar.xml | 35 - .../src/main/resources/META-INF/openejb-jar.xml | 78 - .../main/resources/META-INF/sca-contribution.xml | 24 - .../resources/VegetablesCatalogEJB.componentType | 26 - .../src/main/resources/catalog-ejb.composite | 31 - .../test/java/client/CatalogEJBClientTestCase.java | 67 - .../java/org/omg/stub/javax/ejb/_EJBHome_Stub.java | 223 - .../org/omg/stub/javax/ejb/_EJBObject_Stub.java | 252 - .../java/org/omg/stub/javax/ejb/_Handle_Stub.java | 89 - .../org/omg/stub/javax/ejb/_HomeHandle_Stub.java | 89 - .../java/services/ejb/_CatalogEJBHome_Stub.java | 269 - .../java/services/ejb/_CatalogEJBRemote_Stub.java | 292 - .../META-INF/sca-contribution.xml | 25 - .../catalog-mediation/catalog-mediation.composite | 34 - .../tutorials/store/catalog-mediation/pom.xml | 91 - .../mediation/VegetablesCatalogMediationImpl.java | 51 - .../store/catalog-webapp/catalog-web.composite | 43 - .../tutorials/store/catalog-webapp/pom.xml | 110 - .../webapp/META-INF/sca-contribution.xml | 24 - .../store/catalog-webapp/webapp/WEB-INF/web.xml | 41 - .../store/catalog-webapp/webapp/catalog.jsp | 52 - .../tutorials/store/domain/cloud.composite | 36 - .../store/domain/cloud/CatalogEJBNode.composite | 35 - .../domain/cloud/CatalogMediationNode.composite | 33 - .../store/domain/cloud/CatalogWebAppNode.composite | 36 - .../store/domain/cloud/CatalogsNode.composite | 33 - .../store/domain/cloud/CurrencyNode.composite | 33 - .../store/domain/cloud/StoreClientNode.composite | 33 - .../store/domain/cloud/StoreDBNode.composite | 35 - .../store/domain/cloud/StoreEUNode.composite | 36 - .../store/domain/cloud/StoreMarketNode.composite | 35 - .../store/domain/cloud/StoreMashupNode.composite | 35 - .../store/domain/cloud/StoreMergerNode.composite | 35 - .../store/domain/cloud/StoreNode.composite | 35 - .../store/domain/cloud/StoreSupplierNode.composite | 36 - .../tutorials/store/domain/domain.composite | 36 - .../domain/launch/LaunchCatalogMediationNode.java | 28 - .../store/domain/launch/LaunchCatalogsNode.java | 28 - .../store/domain/launch/LaunchCurrencyNode.java | 28 - .../store/domain/launch/LaunchStoreDBNode.java | 28 - .../store/domain/launch/LaunchStoreEUNode.java | 28 - .../store/domain/launch/LaunchStoreMarketNode.java | 28 - .../store/domain/launch/LaunchStoreMashupNode.java | 28 - .../store/domain/launch/LaunchStoreMergerNode.java | 28 - .../store/domain/launch/LaunchStoreNode.java | 28 - .../domain/launch/LaunchStoreSupplierNode.java | 28 - .../domain/launch/LaunchTutorialDomainManager.java | 33 - .../sca-android/tutorials/store/domain/pom.xml | 172 - .../tutorials/store/domain/workspace.xml | 35 - branches/sca-android/tutorials/store/pom.xml | 59 - .../store-client/META-INF/sca-contribution.xml | 23 - .../store/store-client/client/Shopper.java | 29 - .../store/store-client/client/ShopperImpl.java | 63 - .../store-client/launch/LaunchStoreClientNode.java | 43 - .../tutorials/store/store-client/pom.xml | 123 - .../store/store-client/services/Cart.java | 28 - .../store/store-client/services/Catalog.java | 27 - .../store/store-client/services/Item.java | 66 - .../store/store-client/services/Total.java | 29 - .../store/store-client/store-client.composite | 38 - .../store/store-db/META-INF/sca-contribution.xml | 27 - .../sca-android/tutorials/store/store-db/pom.xml | 126 - .../tutorials/store/store-db/store-db.composite | 75 - .../store/store-eu/META-INF/sca-contribution.xml | 26 - .../sca-android/tutorials/store/store-eu/pom.xml | 111 - .../tutorials/store/store-eu/store-eu.composite | 70 - .../store/store-eu/uiservices/store-eu.html | 162 - .../store-market/META-INF/sca-contribution.xml | 26 - .../tutorials/store/store-market/build.xml | 54 - .../tutorials/store/store-market/pom.xml | 77 - .../store/store-market/store-market.composite | 68 - .../store-mashup/META-INF/sca-contribution.xml | 25 - .../store/store-mashup/build-openajax.xml | 86 - .../store/store-mashup/gadget/map-gadget.html | 50 - .../store/store-mashup/gadget/store-gadget.html | 166 - .../store/store-mashup/map-gadget.composite | 32 - .../store/store-mashup/mashup/store-mash.html | 70 - .../tutorials/store/store-mashup/pom.xml | 136 - .../store/store-mashup/store-gadget.composite | 64 - .../store/store-mashup/store-mashup.composite | 48 - .../store-merger/META-INF/sca-contribution.xml | 26 - .../tutorials/store/store-merger/pom.xml | 77 - .../store/store-merger/store-merger.composite | 75 - .../store-supplier/META-INF/sca-contribution.xml | 27 - .../tutorials/store/store-supplier/pom.xml | 127 - .../store/store-supplier/store-supplier.composite | 77 - .../store/store-test/META-INF/sca-contribution.xml | 27 - .../tutorials/store/store-test/client/Shopper.java | 29 - .../sca-android/tutorials/store/store-test/pom.xml | 201 - .../store-test/test/StoreSupplierTestCase.java | 89 - .../store/store/META-INF/sca-contribution.xml | 25 - branches/sca-android/tutorials/store/store/pom.xml | 77 - .../tutorials/store/store/store.composite | 64 - .../web-services/META-INF/sca-contribution.xml | 25 - .../store/web-services/catalogs.composite | 43 - .../store/web-services/currency.composite | 32 - .../tutorials/store/web-services/pom.xml | 77 - .../cart-amazon/amazon/cart/AmazonCart.java | 44 - .../cart-amazon/amazon/cart/AmazonCart.wsdl | 451 - .../cart-amazon/amazon/cart/AmazonCartImpl.java | 120 - .../www-services/cart-amazon/amazoncart.composite | 33 - .../cart-amazon/launch/LaunchAmazonCart.java | 52 - .../store/www-services/cart-amazon/pom.xml | 215 - .../cart-amazon/test/AmazonCartTestCase.java | 99 - .../www-services/catalog-amazon/cart-amazon/README | 77 - .../catalog-amazon/cart-amazon/build.xml | 74 - .../cart-amazon/lib/AWS2007_05_14.jar | Bin 297809 -> 0 bytes .../catalog-amazon/cart-amazon/shoppingstore.png | Bin 382749 -> 0 bytes .../shoppingstore/server/ShoppingStoreServer.java | 25 - .../shoppingstore/services/cart/CartService.java | 35 - .../services/cart/CartServiceImpl.java | 144 - .../services/proxy/ShoppingStoreService.java | 30 - .../services/proxy/ShoppingStoreServiceImpl.java | 49 - .../src/main/resources/shoppingstore.composite | 20 - .../src/main/resources/wsdl/shoppingstore.wsdl | 3023 ----- .../store/www-services/catalog-amazon/pom.xml | 95 - .../src/main/java/catalog/CatalogClient.java | 37 - .../src/main/java/catalog/CatalogService.java | 28 - .../java/catalog/amazon/AmazonCatalogService.java | 31 - .../catalog/amazon/AmazonCatalogServiceImpl.java | 94 - .../main/java/catalog/ebay/EBayCatalogService.java | 32 - .../java/catalog/ebay/EBayCatalogServiceImpl.java | 99 - .../java/catalog/util/NamespaceContextImpl.java | 126 - .../src/main/java/catalog/util/XPathHelper.java | 55 - .../src/main/resources/catalog.composite | 55 - .../main/resources/wsdl/AWSECommerceService.wsdl | 3244 ----- .../src/main/resources/wsdl/ShoppingService.wsdl | 12607 ------------------- .../www-services/catalog-amazon/store-db/pom.xml | 149 - .../src/main/java/launch/LaunchCatalog.java | 34 - .../store-db/src/main/java/services/Catalog.java | 27 - .../src/main/java/services/CatalogImpl.java | 120 - .../src/main/java/services/CurrencyConverter.java | 29 - .../store-db/src/main/java/util/CreateDB.java | 79 - .../resources/store-catalog-database.composite | 31 - .../www-services/catalog-amazon/store-db/store.sql | 37 - .../tutorials/store/www-services/pom.xml | 46 - 1380 files changed, 2 insertions(+), 117860 deletions(-) delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/LICENSE delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/NOTICE delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/README delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/alert-aggregator.png delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/alert-aggregator.svg delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/build-dojo.xml delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/build.xml delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/pom.xml delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertTypeNonSDOImpl.java delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsFeedServiceImpl.java delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsService.java delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsServiceImpl.java delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesService.java delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesServiceImpl.java delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsTypeNonSDOImpl.java delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/ConfigTypeNonSDOImpl.java delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerService.java delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerServiceImpl.java delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/SourceTypeNonSDOImpl.java delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/Alerts.wsdl delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/Alerts.xsd delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/AlertsSources.wsdl delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/alerts-client.composite delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/alerts.composite delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/sources.xml delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/AlertAggregator.html delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/geronimo-web.xml delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/pop.png delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/rss.png delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/service.smd delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/sources.smd delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/style.css delete mode 100644 branches/sca-android/demos/alert-aggregator-webapp/src/test/java/org/apache/tuscany/sca/demos/aggregator/AlertsIntegrationTest.java delete mode 100644 branches/sca-android/demos/bigbank-account/LICENSE delete mode 100644 branches/sca-android/demos/bigbank-account/NOTICE delete mode 100644 branches/sca-android/demos/bigbank-account/README delete mode 100644 branches/sca-android/demos/bigbank-account/bigbank.png delete mode 100644 branches/sca-android/demos/bigbank-account/bigbank.svg delete mode 100644 branches/sca-android/demos/bigbank-account/build-dojo.xml delete mode 100644 branches/sca-android/demos/bigbank-account/build.xml delete mode 100644 branches/sca-android/demos/bigbank-account/pom.xml delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountDetails.java delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountService.java delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountServiceImpl.java delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountDetails.java delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountService.java delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountServiceImpl.java delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/AccountsDataPasswordCallbackHandler.java delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/BigbankCheckingsAcl.java delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthImplementationPolicyProvider.java delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicy.java delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyInterceptor.java delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyProviderFactory.java delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyHandler.java delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyProcessor.java delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountDetails.java delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountService.java delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountServiceImpl.java delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/resources/CheckingsAccount.composite delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/resources/SavingsAccount.composite delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/resources/StockAccount.composite delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/resources/definitions.xml delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/resources/web/AccountJSON.html delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/resources/web/style.css delete mode 100644 branches/sca-android/demos/bigbank-account/src/main/resources/wsdl/AccountService.wsdl delete mode 100644 branches/sca-android/demos/bigbank-calculator/LICENSE delete mode 100644 branches/sca-android/demos/bigbank-calculator/NOTICE delete mode 100644 branches/sca-android/demos/bigbank-calculator/README delete mode 100644 branches/sca-android/demos/bigbank-calculator/build.xml delete mode 100644 branches/sca-android/demos/bigbank-calculator/pom.xml delete mode 100644 branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/demo/CalculatorServer.java delete mode 100644 branches/sca-android/demos/bigbank-calculator/src/main/resources/Calculator.composite delete mode 100644 branches/sca-android/demos/bigbank-calculator/src/main/resources/calculator/AddServiceImpl.js delete mode 100644 branches/sca-android/demos/bigbank-calculator/src/main/resources/calculator/DivideServiceImpl.groovy delete mode 100644 branches/sca-android/demos/bigbank-calculator/src/main/resources/calculator/MultiplyServiceImpl.py delete mode 100644 branches/sca-android/demos/bigbank-calculator/src/main/resources/calculator/SubtractServiceImpl.rb delete mode 100644 branches/sca-android/demos/bigbank-stockquote/LICENSE delete mode 100644 branches/sca-android/demos/bigbank-stockquote/NOTICE delete mode 100644 branches/sca-android/demos/bigbank-stockquote/README delete mode 100644 branches/sca-android/demos/bigbank-stockquote/build.xml delete mode 100644 branches/sca-android/demos/bigbank-stockquote/pom.xml delete mode 100644 branches/sca-android/demos/bigbank-stockquote/src/main/java/stockquote/PasswordCallbackHandler.java delete mode 100644 branches/sca-android/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteImpl.java delete mode 100644 branches/sca-android/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteService.java delete mode 100644 branches/sca-android/demos/bigbank-stockquote/src/main/java/stockquote/demo/StockQuoteServer.java delete mode 100644 branches/sca-android/demos/bigbank-stockquote/src/main/resources/StockQuote.composite delete mode 100644 branches/sca-android/demos/bigbank-stockquote/src/main/resources/definitions.xml delete mode 100644 branches/sca-android/demos/bigbank-stockquote/src/main/resources/security.properties delete mode 100644 branches/sca-android/demos/bigbank-stockquote/src/main/resources/stockQuote.jks delete mode 100644 branches/sca-android/demos/bigbank/LICENSE delete mode 100644 branches/sca-android/demos/bigbank/NOTICE delete mode 100644 branches/sca-android/demos/bigbank/README delete mode 100644 branches/sca-android/demos/bigbank/bigbank.png delete mode 100644 branches/sca-android/demos/bigbank/bigbank.svg delete mode 100644 branches/sca-android/demos/bigbank/build-dojo.xml delete mode 100644 branches/sca-android/demos/bigbank/build.xml delete mode 100644 branches/sca-android/demos/bigbank/pom.xml delete mode 100644 branches/sca-android/demos/bigbank/src/main/java/bigbank/account/AccountService.java delete mode 100644 branches/sca-android/demos/bigbank/src/main/java/bigbank/account/AccountServiceImpl.java delete mode 100644 branches/sca-android/demos/bigbank/src/main/java/bigbank/account/feed/AccountFeedImpl.java delete mode 100644 branches/sca-android/demos/bigbank/src/main/java/bigbank/client/BigBankClient.java delete mode 100644 branches/sca-android/demos/bigbank/src/main/java/bigbank/demo/BigBankServer.java delete mode 100644 branches/sca-android/demos/bigbank/src/main/java/bigbank/security/BigbankPasswordCallbackHandler.java delete mode 100644 branches/sca-android/demos/bigbank/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-android/demos/bigbank/src/main/java/stockquote/StockQuoteService.java delete mode 100644 branches/sca-android/demos/bigbank/src/main/resources/BigBank.composite delete mode 100644 branches/sca-android/demos/bigbank/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/demos/bigbank/src/main/resources/bigbank.jks delete mode 100644 branches/sca-android/demos/bigbank/src/main/resources/definitions.xml delete mode 100644 branches/sca-android/demos/bigbank/src/main/resources/security.properties delete mode 100644 branches/sca-android/demos/bigbank/src/main/resources/web/AccountJSON.html delete mode 100644 branches/sca-android/demos/bigbank/src/main/resources/web/style.css delete mode 100644 branches/sca-android/demos/bigbank/src/main/resources/wsdl/AccountService.wsdl delete mode 100644 branches/sca-android/demos/bigbank/src/test/java/test/BigBankTestCase.java delete mode 100644 branches/sca-android/demos/load-balancing-webapp/LICENSE delete mode 100644 branches/sca-android/demos/load-balancing-webapp/NOTICE delete mode 100644 branches/sca-android/demos/load-balancing-webapp/README delete mode 100644 branches/sca-android/demos/load-balancing-webapp/build-tomcat.xml delete mode 100644 branches/sca-android/demos/load-balancing-webapp/build.xml delete mode 100644 branches/sca-android/demos/load-balancing-webapp/pom.xml delete mode 100644 branches/sca-android/demos/load-balancing-webapp/src/main/java/client/LaunchClient.java delete mode 100644 branches/sca-android/demos/load-balancing-webapp/src/main/java/domain/LaunchDomain.java delete mode 100644 branches/sca-android/demos/load-balancing-webapp/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-android/demos/load-balancing-webapp/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-android/demos/load-balancing-webapp/src/main/java/helloworld/HelloWorldServiceClient.java delete mode 100644 branches/sca-android/demos/load-balancing-webapp/src/main/java/org/apache/tuscany/sca/demos/loadbalancer/rule/RoundRobinRule.java delete mode 100644 branches/sca-android/demos/load-balancing-webapp/src/main/resources/client-contribution/helloworldwsclient.composite delete mode 100644 branches/sca-android/demos/load-balancing-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/demos/load-balancing-webapp/src/main/webapp/META-INF/sca-deployables/helloworldws.composite delete mode 100644 branches/sca-android/demos/load-balancing-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-android/demos/load-balancing-webapp/src/test/resources/apache-80/conf/httpd.conf delete mode 100644 branches/sca-android/demos/load-balancing-webapp/src/test/resources/apache-80/conf/workers.properties delete mode 100644 branches/sca-android/demos/load-balancing-webapp/src/test/resources/tomcat-8085/conf/server.xml delete mode 100644 branches/sca-android/demos/load-balancing-webapp/src/test/resources/tomcat-8085/webapps/balancer/WEB-INF/config/rules.xml delete mode 100644 branches/sca-android/demos/load-balancing-webapp/src/test/resources/tomcat-8086/conf/server.xml delete mode 100644 branches/sca-android/demos/load-balancing-webapp/src/test/resources/tomcat-8087/conf/server.xml delete mode 100644 branches/sca-android/demos/mortgage-creditcheck/LICENSE delete mode 100644 branches/sca-android/demos/mortgage-creditcheck/NOTICE delete mode 100644 branches/sca-android/demos/mortgage-creditcheck/README delete mode 100644 branches/sca-android/demos/mortgage-creditcheck/build.xml delete mode 100644 branches/sca-android/demos/mortgage-creditcheck/pom.xml delete mode 100644 branches/sca-android/demos/mortgage-creditcheck/src/main/java/credit/CreditCheck.java delete mode 100644 branches/sca-android/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckImpl.java delete mode 100644 branches/sca-android/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckServer.java delete mode 100644 branches/sca-android/demos/mortgage-creditcheck/src/main/resources/CreditCheck.composite delete mode 100644 branches/sca-android/demos/mortgage-creditcheck/src/main/resources/wsdl/credit.wsdl delete mode 100644 branches/sca-android/demos/mortgage-creditcheck/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/demos/mortgage-creditcheck/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/LICENSE delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/NOTICE delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/README delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/build.xml delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/credit_composite.jpg delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/credit_composite.png delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/loan_approval.jpg delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/loan_approval.png delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly0.jpg delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly0.png delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly1.jpg delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly1.png delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly2.jpg delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly2.png delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_composite.jpg delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_composite.png delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_diagrams.doc delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_package1.jpg delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_package1.png delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_package2.jpg delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_package2.png delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_scenario.jpg delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_scenario.png delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/mortgage_assembly.png delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/pom.xml delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheck.java delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheckImpl.java delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/Customer.java delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuote.java delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuoteImpl.java delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApproval.java delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApprovalImpl.java delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculator.java delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculatorImpl.java delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageClient.java delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessment.java delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessmentImpl.java delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/main/resources/Mortgage.composite delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/main/resources/Mortgage1.composite delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.componentType delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.js delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/main/resources/wsdl/credit.wsdl delete mode 100644 branches/sca-android/demos/mortgage-loanapproval/src/test/java/mortgage/MortgageClientTestCase.java delete mode 100644 branches/sca-android/demos/workpool-distributed/LICENSE delete mode 100644 branches/sca-android/demos/workpool-distributed/NOTICE delete mode 100644 branches/sca-android/demos/workpool-distributed/build.xml delete mode 100644 branches/sca-android/demos/workpool-distributed/pom.xml delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/node/DomainNode.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/node/DomainNodeDaemon.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/node/TestJob.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/node/WorkpoolDaemon.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/node/WorkpoolNode.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/node/workerRules1.drl delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/workpool/MetaComponentWorker.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/workpool/MyWorker.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/workpool/NullJob.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/workpool/ResultJob.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/workpool/Trigger.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerManager.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerManagerImpl.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerService.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerServiceCallback.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerServiceImpl.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolBean.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolBeanListener.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolEvent.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolManager.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolManagerImpl.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolService.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolServiceImpl.java delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/resources/nodeA/Workpool.composite delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/resources/nodeB/Workpool.composite delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/resources/nodeC/Workpool.composite delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/resources/nodeD/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/resources/nodeD/Workpool.composite delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/resources/nodeE/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/demos/workpool-distributed/src/main/resources/nodeE/Workpool.composite delete mode 100644 branches/sca-android/demos/workpool-distributed/src/test/java/workpool/AComponent.java delete mode 100644 branches/sca-android/demos/workpool-distributed/workerRules.drl delete mode 100644 branches/sca-android/demos/workpool-distributed/workerRules1.drl delete mode 100644 branches/sca-android/demos/workpool-distributed/workerRules2.drl delete mode 100644 branches/sca-android/demos/workpool-distributed/workerRules3.drl delete mode 100644 branches/sca-android/demos/xml-bigbank/LICENSE delete mode 100644 branches/sca-android/demos/xml-bigbank/NOTICE delete mode 100644 branches/sca-android/demos/xml-bigbank/README delete mode 100644 branches/sca-android/demos/xml-bigbank/build.xml delete mode 100644 branches/sca-android/demos/xml-bigbank/pom.xml delete mode 100644 branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/AccountData.java delete mode 100644 branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java delete mode 100644 branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/AccountService.java delete mode 100644 branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/AccountServiceImpl.java delete mode 100644 branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java delete mode 100644 branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java delete mode 100644 branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java delete mode 100644 branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/ExchangeRate.java delete mode 100644 branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/ExchangeRateImpl.java delete mode 100644 branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java delete mode 100644 branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/StockValue.java delete mode 100644 branches/sca-android/demos/xml-bigbank/src/main/resources/BigBank.composite delete mode 100644 branches/sca-android/demos/xml-bigbank/src/main/resources/accounts.xml delete mode 100644 branches/sca-android/demos/xml-bigbank/src/main/resources/customer.xsd delete mode 100644 branches/sca-android/demos/xml-bigbank/src/main/resources/stock.xq delete mode 100644 branches/sca-android/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl delete mode 100644 branches/sca-android/demos/xml-bigbank/xml-bigbank.png delete mode 100644 branches/sca-android/demos/xml-bigbank/xml-bigbank.svg delete mode 100644 branches/sca-android/itest/build-was-integration.xml delete mode 100644 branches/sca-android/itest/wasAdmin.py delete mode 100644 branches/sca-android/samples/calculator-distributed/README delete mode 100644 branches/sca-android/samples/calculator-distributed/build.xml delete mode 100644 branches/sca-android/samples/calculator-distributed/calculator-distributed.png delete mode 100644 branches/sca-android/samples/calculator-distributed/calculator-distributed.svg delete mode 100644 branches/sca-android/samples/calculator-distributed/cloud.composite delete mode 100644 branches/sca-android/samples/calculator-distributed/domain.composite delete mode 100644 branches/sca-android/samples/calculator-distributed/pom.xml delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeA.java delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeB.java delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeC.java delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/java/node/LaunchDomain.java delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/resources/cloud/NodeA.composite delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/resources/cloud/NodeB.composite delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/resources/cloud/NodeC.composite delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/resources/nodeA/Calculator.composite delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/resources/nodeB/Calculator.composite delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/resources/nodeC/Calculator.composite delete mode 100644 branches/sca-android/samples/calculator-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/calculator-distributed/src/test/java/calculator/CalculatorDistributedTestCase.java delete mode 100644 branches/sca-android/samples/calculator-distributed/workspace.xml delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/README delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/build.xml delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/calculator.png delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/calculator.svg delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/pom.xml delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/security/CalculatorCallbackHandler.java delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/security/JaasLoginModule.java delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/security/UserPrincipal.java delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/resources/Calculator.composite delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/resources/CalculatorJass.config delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/resources/CalculatorLogMessages.properties delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/main/resources/definitions.xml delete mode 100644 branches/sca-android/samples/calculator-implementation-policies/src/test/java/calculator/CalculatorTestCase.java delete mode 100644 branches/sca-android/samples/calculator-osgi/README delete mode 100644 branches/sca-android/samples/calculator-osgi/build.xml delete mode 100644 branches/sca-android/samples/calculator-osgi/calculator.png delete mode 100644 branches/sca-android/samples/calculator-osgi/calculator.svg delete mode 100644 branches/sca-android/samples/calculator-osgi/pom.xml delete mode 100644 branches/sca-android/samples/calculator-osgi/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-android/samples/calculator-osgi/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-osgi/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-android/samples/calculator-osgi/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-android/samples/calculator-osgi/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-osgi/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-android/samples/calculator-osgi/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-osgi/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-android/samples/calculator-osgi/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-osgi/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-android/samples/calculator-osgi/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-osgi/src/main/resources/Calculator.composite delete mode 100644 branches/sca-android/samples/calculator-osgi/src/test/java/calculator/CalculatorTestCase.java delete mode 100644 branches/sca-android/samples/calculator-rcp/META-INF/MANIFEST.MF delete mode 100644 branches/sca-android/samples/calculator-rcp/build.properties delete mode 100644 branches/sca-android/samples/calculator-rcp/icons/alt_window_16.gif delete mode 100644 branches/sca-android/samples/calculator-rcp/icons/alt_window_32.gif delete mode 100644 branches/sca-android/samples/calculator-rcp/plugin.xml delete mode 100644 branches/sca-android/samples/calculator-rcp/pom.xml delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/Calculator.composite delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/Application.java delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationActionBarAdvisor.java delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationWorkbenchAdvisor.java delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationWorkbenchWindowAdvisor.java delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/Perspective.java delete mode 100644 branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/View.java delete mode 100644 branches/sca-android/samples/calculator-rmi-reference/README delete mode 100644 branches/sca-android/samples/calculator-rmi-reference/build.xml delete mode 100644 branches/sca-android/samples/calculator-rmi-reference/calculator-rmi-reference.png delete mode 100644 branches/sca-android/samples/calculator-rmi-reference/calculator-rmi-reference.svg delete mode 100644 branches/sca-android/samples/calculator-rmi-reference/pom.xml delete mode 100644 branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-android/samples/calculator-rmi-reference/src/main/resources/CalculatorRMIReference.composite delete mode 100644 branches/sca-android/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIReferenceTestCase.java delete mode 100644 branches/sca-android/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-rmi-service/README delete mode 100644 branches/sca-android/samples/calculator-rmi-service/build.xml delete mode 100644 branches/sca-android/samples/calculator-rmi-service/calculator-rmi-service.png delete mode 100644 branches/sca-android/samples/calculator-rmi-service/calculator-rmi-service.svg delete mode 100644 branches/sca-android/samples/calculator-rmi-service/pom.xml delete mode 100644 branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServer.java delete mode 100644 branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-rmi-service/src/main/resources/CalculatorRMIServer.composite delete mode 100644 branches/sca-android/samples/calculator-rmi-service/src/test/java/calculator/CalculatorRMIServerTestCase.java delete mode 100644 branches/sca-android/samples/calculator-script/README delete mode 100644 branches/sca-android/samples/calculator-script/build.xml delete mode 100644 branches/sca-android/samples/calculator-script/calculator-script.png delete mode 100644 branches/sca-android/samples/calculator-script/calculator-script.svg delete mode 100644 branches/sca-android/samples/calculator-script/pom.xml delete mode 100644 branches/sca-android/samples/calculator-script/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-android/samples/calculator-script/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-android/samples/calculator-script/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-android/samples/calculator-script/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-script/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-android/samples/calculator-script/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-android/samples/calculator-script/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-android/samples/calculator-script/src/main/resources/Calculator.composite delete mode 100644 branches/sca-android/samples/calculator-script/src/main/resources/calculator/AddServiceImpl.js delete mode 100644 branches/sca-android/samples/calculator-script/src/main/resources/calculator/DivideServiceImpl.groovy delete mode 100644 branches/sca-android/samples/calculator-script/src/main/resources/calculator/MultiplyServiceImpl.py delete mode 100644 branches/sca-android/samples/calculator-script/src/main/resources/calculator/SubtractServiceImpl.rb delete mode 100644 branches/sca-android/samples/calculator-script/src/test/java/calculator/CalculatorTestCase.java delete mode 100644 branches/sca-android/samples/calculator-webapp/README delete mode 100644 branches/sca-android/samples/calculator-webapp/calculator-web.png delete mode 100644 branches/sca-android/samples/calculator-webapp/calculator-web.svg delete mode 100644 branches/sca-android/samples/calculator-webapp/pom.xml delete mode 100644 branches/sca-android/samples/calculator-webapp/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-android/samples/calculator-webapp/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-webapp/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-android/samples/calculator-webapp/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-android/samples/calculator-webapp/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-webapp/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-android/samples/calculator-webapp/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-webapp/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-android/samples/calculator-webapp/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-webapp/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-android/samples/calculator-webapp/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-webapp/src/main/resources/Calculator.composite delete mode 100644 branches/sca-android/samples/calculator-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/calculator-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-android/samples/calculator-webapp/src/main/webapp/calc.jsp delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/README delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/calculator-web.png delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/calculator-web.svg delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/pom.xml delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ClientPWCBHandler.java delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ServerPWCBHandler.java delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/Calculator.composite delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/calculatorKeys.jks delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/definitions.xml delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/security.properties delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/geronimo-web.xml delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-android/samples/calculator-ws-secure-webapp/src/main/webapp/calc.jsp delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/README delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/calculator-web.png delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/calculator-web.svg delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/pom.xml delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/src/main/resources/Calculator.composite delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/src/main/webapp/WEB-INF/geronimo-web.xml delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-android/samples/calculator-ws-webapp/src/main/webapp/calc.jsp delete mode 100644 branches/sca-android/samples/calculator2/README delete mode 100644 branches/sca-android/samples/calculator2/build.xml delete mode 100644 branches/sca-android/samples/calculator2/calculator.png delete mode 100644 branches/sca-android/samples/calculator2/calculator.svg delete mode 100644 branches/sca-android/samples/calculator2/pom.xml delete mode 100644 branches/sca-android/samples/calculator2/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-android/samples/calculator2/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator2/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-android/samples/calculator2/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-android/samples/calculator2/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator2/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-android/samples/calculator2/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator2/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-android/samples/calculator2/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator2/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-android/samples/calculator2/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-android/samples/calculator2/src/main/resources/Calculator.composite delete mode 100644 branches/sca-android/samples/calculator2/src/test/java/calculator/CalculatorTestCase.java delete mode 100644 branches/sca-android/samples/callback-ws-client/README delete mode 100644 branches/sca-android/samples/callback-ws-client/build.xml delete mode 100644 branches/sca-android/samples/callback-ws-client/callback-ws-client.png delete mode 100644 branches/sca-android/samples/callback-ws-client/callback-ws-client.svg delete mode 100644 branches/sca-android/samples/callback-ws-client/pom.xml delete mode 100644 branches/sca-android/samples/callback-ws-client/src/main/java/myapp/MyClient.java delete mode 100644 branches/sca-android/samples/callback-ws-client/src/main/java/myapp/MyClientImpl.java delete mode 100644 branches/sca-android/samples/callback-ws-client/src/main/java/myserver/MyService.java delete mode 100644 branches/sca-android/samples/callback-ws-client/src/main/java/myserver/MyServiceCallback.java delete mode 100644 branches/sca-android/samples/callback-ws-client/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/callback-ws-client/src/main/resources/myapp.composite delete mode 100644 branches/sca-android/samples/callback-ws-client/src/test/java/myapp/CallbackClientTestCase.java delete mode 100644 branches/sca-android/samples/callback-ws-service/README delete mode 100644 branches/sca-android/samples/callback-ws-service/build.xml delete mode 100644 branches/sca-android/samples/callback-ws-service/callback-ws-service.png delete mode 100644 branches/sca-android/samples/callback-ws-service/callback-ws-service.svg delete mode 100644 branches/sca-android/samples/callback-ws-service/pom.xml delete mode 100644 branches/sca-android/samples/callback-ws-service/src/main/java/myserver/CallbackServer.java delete mode 100644 branches/sca-android/samples/callback-ws-service/src/main/java/myserver/MyService.java delete mode 100644 branches/sca-android/samples/callback-ws-service/src/main/java/myserver/MyServiceCallback.java delete mode 100644 branches/sca-android/samples/callback-ws-service/src/main/java/myserver/MyServiceImpl.java delete mode 100644 branches/sca-android/samples/callback-ws-service/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/callback-ws-service/src/main/resources/callbackws.composite delete mode 100644 branches/sca-android/samples/callback-ws-service/src/test/java/myserver/CallbackServerTestCase.java delete mode 100644 branches/sca-android/samples/callbacks-jms/README delete mode 100644 branches/sca-android/samples/callbacks-jms/build.xml delete mode 100644 branches/sca-android/samples/callbacks-jms/pom.xml delete mode 100644 branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderCallback.java delete mode 100644 branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderRequest.java delete mode 100644 branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderResponse.java delete mode 100644 branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderService.java delete mode 100644 branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderServiceClient.java delete mode 100644 branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderServiceImpl.java delete mode 100644 branches/sca-android/samples/callbacks-jms/src/main/resources/callbacks.composite delete mode 100644 branches/sca-android/samples/callbacks-jms/src/main/resources/jndi.properties delete mode 100644 branches/sca-android/samples/callbacks-jms/src/test/java/callbacks/CallbacksTestCase.java delete mode 100644 branches/sca-android/samples/customer-dojo/README delete mode 100644 branches/sca-android/samples/customer-dojo/build-dojo.xml delete mode 100644 branches/sca-android/samples/customer-dojo/build.xml delete mode 100644 branches/sca-android/samples/customer-dojo/customer-dojo-jsonrpc.png delete mode 100644 branches/sca-android/samples/customer-dojo/customer-dojo-jsonrpc.svg delete mode 100644 branches/sca-android/samples/customer-dojo/customer.sql delete mode 100644 branches/sca-android/samples/customer-dojo/pom.xml delete mode 100644 branches/sca-android/samples/customer-dojo/src/main/java/customer/Customer.java delete mode 100644 branches/sca-android/samples/customer-dojo/src/main/java/customer/CustomerCollection.java delete mode 100644 branches/sca-android/samples/customer-dojo/src/main/java/customer/CustomerCollectionImpl.java delete mode 100644 branches/sca-android/samples/customer-dojo/src/main/java/customer/CustomerService.java delete mode 100644 branches/sca-android/samples/customer-dojo/src/main/java/customer/CustomerServiceImpl.java delete mode 100644 branches/sca-android/samples/customer-dojo/src/main/java/launch/Launch.java delete mode 100644 branches/sca-android/samples/customer-dojo/src/main/resources/META-INF/orm.xml delete mode 100644 branches/sca-android/samples/customer-dojo/src/main/resources/META-INF/persistence.xml delete mode 100644 branches/sca-android/samples/customer-dojo/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/customer-dojo/src/main/resources/content/customer.html delete mode 100644 branches/sca-android/samples/customer-dojo/src/main/resources/customer.composite delete mode 100644 branches/sca-android/samples/domain-management/README delete mode 100644 branches/sca-android/samples/domain-management/pom.xml delete mode 100644 branches/sca-android/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java delete mode 100644 branches/sca-android/samples/domain-management/src/main/java/manager/DistributeComponents.java delete mode 100644 branches/sca-android/samples/domain-management/src/main/java/manager/ListComponents.java delete mode 100644 branches/sca-android/samples/domain-management/src/main/java/manager/ListDependencies.java delete mode 100644 branches/sca-android/samples/domain-management/src/main/java/manager/ListDeployables.java delete mode 100644 branches/sca-android/samples/domain-management/src/main/java/manager/WireComponents.java delete mode 100644 branches/sca-android/samples/domain-management/src/test/java/services/Cart.java delete mode 100644 branches/sca-android/samples/domain-management/src/test/java/services/Item.java delete mode 100644 branches/sca-android/samples/domain-management/src/test/java/services/ShoppingCartClientImpl.java delete mode 100644 branches/sca-android/samples/domain-management/src/test/java/services/ShoppingCartImpl.java delete mode 100644 branches/sca-android/samples/domain-management/src/test/resources/assembly/assets.xml delete mode 100644 branches/sca-android/samples/domain-management/src/test/resources/assembly/client.xml delete mode 100644 branches/sca-android/samples/domain-management/src/test/resources/assembly/store.xml delete mode 100644 branches/sca-android/samples/domain-management/src/test/resources/assets/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/domain-management/src/test/resources/client/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/domain-management/src/test/resources/client/client.composite delete mode 100644 branches/sca-android/samples/domain-management/src/test/resources/store/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/domain-management/src/test/resources/store/store.composite delete mode 100644 branches/sca-android/samples/feed-aggregator-webapp/README delete mode 100644 branches/sca-android/samples/feed-aggregator-webapp/feed-aggregator-webapp.png delete mode 100644 branches/sca-android/samples/feed-aggregator-webapp/feed-aggregator-webapp.svg delete mode 100644 branches/sca-android/samples/feed-aggregator-webapp/pom.xml delete mode 100644 branches/sca-android/samples/feed-aggregator-webapp/src/main/java/feed/AggregatorImpl.java delete mode 100644 branches/sca-android/samples/feed-aggregator-webapp/src/main/java/feed/Sort.java delete mode 100644 branches/sca-android/samples/feed-aggregator-webapp/src/main/java/feed/SortImpl.java delete mode 100644 branches/sca-android/samples/feed-aggregator-webapp/src/main/resources/FeedAggregator.composite delete mode 100644 branches/sca-android/samples/feed-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/feed-aggregator-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-android/samples/feed-aggregator-webapp/src/main/webapp/index.html delete mode 100644 branches/sca-android/samples/feed-aggregator/README delete mode 100644 branches/sca-android/samples/feed-aggregator/build.xml delete mode 100644 branches/sca-android/samples/feed-aggregator/feed-aggregator.png delete mode 100644 branches/sca-android/samples/feed-aggregator/feed-aggregator.svg delete mode 100644 branches/sca-android/samples/feed-aggregator/pom.xml delete mode 100644 branches/sca-android/samples/feed-aggregator/src/main/java/feed/AggregatorImpl.java delete mode 100644 branches/sca-android/samples/feed-aggregator/src/main/java/feed/Sort.java delete mode 100644 branches/sca-android/samples/feed-aggregator/src/main/java/feed/SortImpl.java delete mode 100644 branches/sca-android/samples/feed-aggregator/src/main/java/launch/LaunchFeedServer.java delete mode 100644 branches/sca-android/samples/feed-aggregator/src/main/resources/FeedAggregator.composite delete mode 100644 branches/sca-android/samples/feed-aggregator/src/test/java/feed/FeedAggregatorTest.java delete mode 100644 branches/sca-android/samples/helloworld-bpel-ws/README delete mode 100644 branches/sca-android/samples/helloworld-bpel-ws/build.xml delete mode 100644 branches/sca-android/samples/helloworld-bpel-ws/helloworld-bpel.png delete mode 100644 branches/sca-android/samples/helloworld-bpel-ws/helloworld-bpel.svg delete mode 100644 branches/sca-android/samples/helloworld-bpel-ws/pom.xml delete mode 100644 branches/sca-android/samples/helloworld-bpel-ws/src/main/java/helloworld/BPELClient.java delete mode 100644 branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/deploy.xml delete mode 100644 branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/helloworld.bpel delete mode 100644 branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/helloworld.componentType delete mode 100644 branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/helloworld.composite delete mode 100644 branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/helloworld.wsdl delete mode 100644 branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/log4j.properties delete mode 100644 branches/sca-android/samples/helloworld-bpel-ws/src/test/java/helloworld/BPELHelloWorldTestCase.java delete mode 100644 branches/sca-android/samples/helloworld-bpel/README delete mode 100644 branches/sca-android/samples/helloworld-bpel/build.xml delete mode 100644 branches/sca-android/samples/helloworld-bpel/helloworld-bpel.png delete mode 100644 branches/sca-android/samples/helloworld-bpel/helloworld-bpel.svg delete mode 100644 branches/sca-android/samples/helloworld-bpel/pom.xml delete mode 100644 branches/sca-android/samples/helloworld-bpel/src/main/java/helloworld/BPELClient.java delete mode 100644 branches/sca-android/samples/helloworld-bpel/src/main/resources/deploy.xml delete mode 100644 branches/sca-android/samples/helloworld-bpel/src/main/resources/helloworld.bpel delete mode 100644 branches/sca-android/samples/helloworld-bpel/src/main/resources/helloworld.componentType delete mode 100644 branches/sca-android/samples/helloworld-bpel/src/main/resources/helloworld.composite delete mode 100644 branches/sca-android/samples/helloworld-bpel/src/main/resources/helloworld.wsdl delete mode 100644 branches/sca-android/samples/helloworld-bpel/src/main/resources/log4j.properties delete mode 100644 branches/sca-android/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java delete mode 100644 branches/sca-android/samples/helloworld-dojo-webapp/README delete mode 100644 branches/sca-android/samples/helloworld-dojo-webapp/build-dojo.xml delete mode 100644 branches/sca-android/samples/helloworld-dojo-webapp/build.xml delete mode 100644 branches/sca-android/samples/helloworld-dojo-webapp/helloworld-jsonrpc.png delete mode 100644 branches/sca-android/samples/helloworld-dojo-webapp/helloworld-jsonrpc.svg delete mode 100644 branches/sca-android/samples/helloworld-dojo-webapp/pom.xml delete mode 100644 branches/sca-android/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java delete mode 100644 branches/sca-android/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java delete mode 100644 branches/sca-android/samples/helloworld-dojo-webapp/src/main/resources/jsonrpc.composite delete mode 100644 branches/sca-android/samples/helloworld-dojo-webapp/src/main/webapp/HelloWorldJSONRPC.html delete mode 100644 branches/sca-android/samples/helloworld-dojo-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/helloworld-dojo-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-android/samples/helloworld-dojo-webapp/src/main/webapp/style.css delete mode 100644 branches/sca-android/samples/helloworld-jms-webapp/README delete mode 100644 branches/sca-android/samples/helloworld-jms-webapp/pom.xml delete mode 100644 branches/sca-android/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldClient.java delete mode 100644 branches/sca-android/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-android/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-android/samples/helloworld-jms-webapp/src/main/webapp/META-INF/context.xml delete mode 100644 branches/sca-android/samples/helloworld-jms-webapp/src/main/webapp/META-INF/sca-deployables/HelloWorld.composite delete mode 100644 branches/sca-android/samples/helloworld-jms-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-android/samples/helloworld-jms-webapp/src/main/webapp/hello.jsp delete mode 100644 branches/sca-android/samples/helloworld-jsonrpc-webapp/README delete mode 100644 branches/sca-android/samples/helloworld-jsonrpc-webapp/helloworld-jsonrpc.png delete mode 100644 branches/sca-android/samples/helloworld-jsonrpc-webapp/helloworld-jsonrpc.svg delete mode 100644 branches/sca-android/samples/helloworld-jsonrpc-webapp/pom.xml delete mode 100644 branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java delete mode 100644 branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java delete mode 100644 branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/resources/jsonrpc.composite delete mode 100644 branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/webapp/HelloWorldJSONRPC.html delete mode 100644 branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/webapp/style.css delete mode 100644 branches/sca-android/samples/helloworld-reference-jms/README delete mode 100644 branches/sca-android/samples/helloworld-reference-jms/build.xml delete mode 100644 branches/sca-android/samples/helloworld-reference-jms/helloworld-reference.png delete mode 100644 branches/sca-android/samples/helloworld-reference-jms/helloworld-reference.svg delete mode 100644 branches/sca-android/samples/helloworld-reference-jms/pom.xml delete mode 100644 branches/sca-android/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-android/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java delete mode 100644 branches/sca-android/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-android/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldServiceComponent.java delete mode 100644 branches/sca-android/samples/helloworld-reference-jms/src/main/resources/helloworldjmsreference.composite delete mode 100644 branches/sca-android/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite delete mode 100644 branches/sca-android/samples/helloworld-reference-jms/src/main/resources/logging.properties delete mode 100644 branches/sca-android/samples/helloworld-reference-jms/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-android/samples/helloworld-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java delete mode 100644 branches/sca-android/samples/helloworld-service-jms/README delete mode 100644 branches/sca-android/samples/helloworld-service-jms/build.xml delete mode 100644 branches/sca-android/samples/helloworld-service-jms/helloworld-service.png delete mode 100644 branches/sca-android/samples/helloworld-service-jms/helloworld-service.svg delete mode 100644 branches/sca-android/samples/helloworld-service-jms/pom.xml delete mode 100644 branches/sca-android/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-android/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java delete mode 100644 branches/sca-android/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-android/samples/helloworld-service-jms/src/main/resources/definitions.xml delete mode 100644 branches/sca-android/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite delete mode 100644 branches/sca-android/samples/helloworld-service-jms/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-android/samples/helloworld-service-jms/src/test/java/helloworld/HelloWorldJmsServerTestCaseOff.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-jms/README delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-jms/build.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-jms/helloworld-ws-reference.png delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-jms/helloworld-ws-reference.svg delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-jms/pom.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldServiceComponent.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-jms/src/main/resources/helloworldwsjms.composite delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-jms/src/main/resources/helloworldwsjmsclient.composite delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-jms/src/main/resources/logging.properties delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-jms/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/README delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/helloworld-ws-reference.png delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/helloworld-ws-reference.svg delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/pom.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient2.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient3.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient4.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient5.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient.composite delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient2.composite delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient3.composite delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient4.composite delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient5.composite delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/logging.properties delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/src/test/java/helloworld/HelloWorldClientTestCase.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-lean/src/test/java/helloworld/HelloWorldTestServer.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-secure/README delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-secure/build.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-secure/helloworld-ws-reference-secure.png delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-secure/helloworld-ws-reference-secure.svg delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-secure/pom.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-secure/src/main/java/helloworld/ClientPWCBHandler.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldClient.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldServiceComponent.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/definitions.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/helloworldKeys.jks delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/helloworldwsclient.composite delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/logging.properties delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-secure/src/test/java/helloworld/HelloWorldClientTestCase.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference-secure/src/test/java/helloworld/HelloWorldTestServer.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference/README delete mode 100644 branches/sca-android/samples/helloworld-ws-reference/build.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-reference/helloworld-ws-reference.png delete mode 100644 branches/sca-android/samples/helloworld-ws-reference/helloworld-ws-reference.svg delete mode 100644 branches/sca-android/samples/helloworld-ws-reference/pom.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldClient.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldServiceComponent.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference/src/main/resources/helloworldwsclient.composite delete mode 100644 branches/sca-android/samples/helloworld-ws-reference/src/main/resources/logging.properties delete mode 100644 branches/sca-android/samples/helloworld-ws-reference/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-android/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldClientTestCase.java delete mode 100644 branches/sca-android/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldTestServer.java delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo-webapp/README delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo-webapp/build.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo-webapp/helloworld-ws-sdo-webapp.png delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo-webapp/helloworld-ws-sdo-webapp.svg delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo-webapp/pom.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorld.java delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldComponent.java delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/resources/helloworldws.composite delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.xsd delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/webapp/HelloWorld.jsp delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/geronimo-web.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo/README delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo/build.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo/helloworld-ws-sdo.png delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo/helloworld-ws-sdo.svg delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo/pom.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldClient.java delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldServer.java delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldServiceComponent.java delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo/src/main/resources/helloworldws.composite delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo/src/main/resources/helloworldwsclient.composite delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo/src/main/resources/logging.properties delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo/src/test/java/helloworld/HelloWorldClientTestCase.java delete mode 100644 branches/sca-android/samples/helloworld-ws-sdo/src/test/java/helloworld/HelloWorldTestServer.java delete mode 100644 branches/sca-android/samples/helloworld-ws-service-jms/README delete mode 100644 branches/sca-android/samples/helloworld-ws-service-jms/build.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-service-jms/helloworld-ws-service.png delete mode 100644 branches/sca-android/samples/helloworld-ws-service-jms/helloworld-ws-service.svg delete mode 100644 branches/sca-android/samples/helloworld-ws-service-jms/pom.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-android/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldServer.java delete mode 100644 branches/sca-android/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-android/samples/helloworld-ws-service-jms/src/main/resources/definitions.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-service-jms/src/main/resources/helloworldwsjms.composite delete mode 100644 branches/sca-android/samples/helloworld-ws-service-jms/src/main/resources/helloworldwsjmspolicy.composite delete mode 100644 branches/sca-android/samples/helloworld-ws-service-jms/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-android/samples/helloworld-ws-service-jms/src/test/java/helloworld/HelloWorldJmsPolicyServerTestCase.java delete mode 100644 branches/sca-android/samples/helloworld-ws-service-jms/src/test/java/helloworld/HelloWorldJmsServerTestCase.java delete mode 100644 branches/sca-android/samples/helloworld-ws-service-secure/README delete mode 100644 branches/sca-android/samples/helloworld-ws-service-secure/build.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-service-secure/helloworld-ws-service-secure.png delete mode 100644 branches/sca-android/samples/helloworld-ws-service-secure/helloworld-ws-service-secure.svg delete mode 100644 branches/sca-android/samples/helloworld-ws-service-secure/pom.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-android/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldServer.java delete mode 100644 branches/sca-android/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-android/samples/helloworld-ws-service-secure/src/main/java/helloworld/ServerPWCBHandler.java delete mode 100644 branches/sca-android/samples/helloworld-ws-service-secure/src/main/resources/definitions.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-service-secure/src/main/resources/helloworldKeys.jks delete mode 100644 branches/sca-android/samples/helloworld-ws-service-secure/src/main/resources/helloworldws.composite delete mode 100644 branches/sca-android/samples/helloworld-ws-service-secure/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-android/samples/helloworld-ws-service-secure/src/test/java/helloworld/HelloWorldServerTestCase.java delete mode 100644 branches/sca-android/samples/helloworld-ws-service-webapp/README delete mode 100644 branches/sca-android/samples/helloworld-ws-service-webapp/build.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-service-webapp/pom.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-service-webapp/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-android/samples/helloworld-ws-service-webapp/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-android/samples/helloworld-ws-service-webapp/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-android/samples/helloworld-ws-service-webapp/src/main/webapp/META-INF/sca-deployables/helloworldws.composite delete mode 100644 branches/sca-android/samples/helloworld-ws-service-webapp/src/main/webapp/WEB-INF/geronimo-web.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-service-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-service/README delete mode 100644 branches/sca-android/samples/helloworld-ws-service/build.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-service/helloworld-ws-service.png delete mode 100644 branches/sca-android/samples/helloworld-ws-service/helloworld-ws-service.svg delete mode 100644 branches/sca-android/samples/helloworld-ws-service/pom.xml delete mode 100644 branches/sca-android/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-android/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldServer.java delete mode 100644 branches/sca-android/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-android/samples/helloworld-ws-service/src/main/resources/META-INF/sca-deployables/helloworldws.composite delete mode 100644 branches/sca-android/samples/helloworld-ws-service/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-android/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldServerTestCase.java delete mode 100644 branches/sca-android/samples/loanapplication/pom.xml delete mode 100644 branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanApplication.java delete mode 100644 branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanApplicationClient.java delete mode 100644 branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanClient.java delete mode 100644 branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanClientImpl.java delete mode 100644 branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanService.java delete mode 100644 branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanServiceImpl.java delete mode 100644 branches/sca-android/samples/loanapplication/src/main/resources/loanapplication.composite delete mode 100644 branches/sca-android/samples/loanapplication/src/test/java/loanapplication/LoanApplicationTestCase.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/README delete mode 100644 branches/sca-android/samples/osgi-supplychain/build-bundles.xml delete mode 100644 branches/sca-android/samples/osgi-supplychain/build.xml delete mode 100644 branches/sca-android/samples/osgi-supplychain/osgi-supplychain.png delete mode 100644 branches/sca-android/samples/osgi-supplychain/osgi-supplychain.svg delete mode 100644 branches/sca-android/samples/osgi-supplychain/pom.xml delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/OSGiBundleImpl.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/SupplyChainClient.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/customer/Customer.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerImpl.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerImpl.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/retailer/Retailer.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperImpl.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/shipper/Shipper.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/warehouse/Warehouse.java delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/Customer.componentType delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/DSCustomer.componentType delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/DSRetailer.componentType delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/DSShipper.componentType delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/DSWarehouse.componentType delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/Retailer.componentType delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/Shipper.componentType delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/Warehouse.componentType delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/Customer.mf delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/Retailer.mf delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/Shipper.mf delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/Warehouse.mf delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Customer.mf delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Customer.xml delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Retailer.mf delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Retailer.xml delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Shipper.mf delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Shipper.xml delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Warehouse.mf delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Warehouse.xml delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/supplychain.composite delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/main/resources/supplychain.ds.composite delete mode 100644 branches/sca-android/samples/osgi-supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java delete mode 100644 branches/sca-android/samples/photo-gallery/README delete mode 100644 branches/sca-android/samples/photo-gallery/build.xml delete mode 100644 branches/sca-android/samples/photo-gallery/photo-gallery.png delete mode 100644 branches/sca-android/samples/photo-gallery/photo-gallery.svg delete mode 100644 branches/sca-android/samples/photo-gallery/pom.xml delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/java/launch/LaunchGallery.java delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/java/launch/LaunchGalleryJCR.java delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/java/services/Album.java delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/java/services/AlbumImpl.java delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/java/services/jcr/AlbumImpl.java delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/resources/gallery.html delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00368.jpg delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00369.jpg delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00370.jpg delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00371.jpg delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00373.jpg delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00375.jpg delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00376.jpg delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00377.jpg delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00378.jpg delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00379.jpg delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00380.jpg delete mode 100755 branches/sca-android/samples/photo-gallery/src/main/resources/index.gif delete mode 100755 branches/sca-android/samples/photo-gallery/src/main/resources/index_on.gif delete mode 100755 branches/sca-android/samples/photo-gallery/src/main/resources/next.gif delete mode 100755 branches/sca-android/samples/photo-gallery/src/main/resources/next_disabled.gif delete mode 100755 branches/sca-android/samples/photo-gallery/src/main/resources/next_on.gif delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/resources/photo-gallery-jcr.composite delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/resources/photo-gallery.composite delete mode 100755 branches/sca-android/samples/photo-gallery/src/main/resources/prev.gif delete mode 100755 branches/sca-android/samples/photo-gallery/src/main/resources/prev_disabled.gif delete mode 100755 branches/sca-android/samples/photo-gallery/src/main/resources/prev_on.gif delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/resources/show_slide.gif delete mode 100644 branches/sca-android/samples/photo-gallery/src/main/resources/space.gif delete mode 100755 branches/sca-android/samples/photo-gallery/src/main/resources/styles.css delete mode 100644 branches/sca-android/samples/quote-xquery/README delete mode 100644 branches/sca-android/samples/quote-xquery/build.xml delete mode 100644 branches/sca-android/samples/quote-xquery/pom.xml delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderImpl.java delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderNodeInfo.java delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderService.java delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/ExternalReferencesQuoteJoin.java delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProvider.java delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProviderImpl.java delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProviderNodeInfo.java delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/PropertiesQuoteJoin.java delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteCalculator.java delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteCalculatorImpl.java delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteDataUtil.java delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoin.java delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoinLocal.java delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoinLocalImpl.java delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/XQueryQuoteClient.java delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/XQueryQuoteServer.java delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join.xq delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_external_references.xq delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_properties.xq delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/resources/wsdl/AvailQuote.xsd delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/resources/wsdl/PriceQuote.xsd delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/resources/wsdl/Quote.xsd delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/resources/wsdl/quotejoin.wsdl delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/resources/xqueryquotews.composite delete mode 100644 branches/sca-android/samples/quote-xquery/src/main/resources/xqueryquotewsclient.composite delete mode 100644 branches/sca-android/samples/quote-xquery/src/test/java/xquery/quote/XQueryQuoteClientTestCase.java delete mode 100644 branches/sca-android/samples/quote-xquery/src/test/java/xquery/quote/XQueryQuoteTestServer.java delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/README delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/build-dojo.xml delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/build.xml delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/pom.xml delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/simple-bigbank-spring.png delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/simple-bigbank-spring.svg delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountReport.java delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountService.java delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountServiceImpl.java delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountDetails.java delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountService.java delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/feed/AccountFeedImpl.java delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountDetails.java delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountService.java delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountServiceImpl.java delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountDetails.java delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountService.java delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountServiceImpl.java delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/calculator/CalculatorService.java delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/client/BigBankClient.java delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/server/BigBankServer.java delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/stockquote/StockQuoteService.java delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/resources/BigBank.composite delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/resources/SavingsAccount.composite delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/resources/StockAccount.composite delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/resources/spring-context/Account-spring-context.xml delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/resources/spring-context/SavingsAccount-context.xml delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/MANIFEST.MF delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/spring/StockAccount-context.xml delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/main/resources/web/style.css delete mode 100644 branches/sca-android/samples/simple-bigbank-spring/src/test/java/bigbank/BigBankTestCase.java delete mode 100644 branches/sca-android/samples/simple-callback-ws/README delete mode 100644 branches/sca-android/samples/simple-callback-ws/build.xml delete mode 100644 branches/sca-android/samples/simple-callback-ws/pom.xml delete mode 100644 branches/sca-android/samples/simple-callback-ws/simple-callback-ws.png delete mode 100644 branches/sca-android/samples/simple-callback-ws/simple-callback-ws.svg delete mode 100644 branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyClient.java delete mode 100644 branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyClientImpl.java delete mode 100644 branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyService.java delete mode 100644 branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceCallback.java delete mode 100644 branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceImpl.java delete mode 100644 branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/SimpleCallbackClient.java delete mode 100644 branches/sca-android/samples/simple-callback-ws/src/main/resources/simplecallback.composite delete mode 100644 branches/sca-android/samples/simple-callback-ws/src/main/resources/wsdl/simplecallback.wsdl delete mode 100644 branches/sca-android/samples/simple-callback-ws/src/test/java/simplecallback/SimpleCallbackTestCase.java delete mode 100644 branches/sca-android/samples/spring-bigbank-calculator/README delete mode 100644 branches/sca-android/samples/spring-bigbank-calculator/build.xml delete mode 100644 branches/sca-android/samples/spring-bigbank-calculator/pom.xml delete mode 100644 branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/AddService.java delete mode 100644 branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/CalculatorService.java delete mode 100644 branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/DivideService.java delete mode 100644 branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/MultiplyService.java delete mode 100644 branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/SubtractService.java delete mode 100644 branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/server/CalculatorServer.java delete mode 100644 branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/Calculator.composite delete mode 100644 branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/META-INF/spring/CalculatorService-context.xml delete mode 100644 branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/calculator/AddServiceImpl.js delete mode 100644 branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/calculator/DivideServiceImpl.groovy delete mode 100644 branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/calculator/MultiplyServiceImpl.py delete mode 100644 branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/calculator/SubtractServiceImpl.rb delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/README delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/build.xml delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/pom.xml delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/checking/CheckingAccountDetails.java delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/checking/CheckingAccountService.java delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/checking/CheckingAccountServiceImpl.java delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/checking/server/CheckingAccountServer.java delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/AccountsDataPasswordCallbackHandler.java delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/BigbankCheckingsAcl.java delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthImplementationPolicyProvider.java delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicy.java delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyInterceptor.java delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyProviderFactory.java delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyHandler.java delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyProcessor.java delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/CheckingsAccount.composite delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/definitions.xml delete mode 100644 branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/spring-context/META-INF/spring/CheckingAccountService-context.xml delete mode 100644 branches/sca-android/samples/spring-bigbank-stockquote/README delete mode 100644 branches/sca-android/samples/spring-bigbank-stockquote/build.xml delete mode 100644 branches/sca-android/samples/spring-bigbank-stockquote/pom.xml delete mode 100644 branches/sca-android/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/StockQuoteImpl.java delete mode 100644 branches/sca-android/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/StockQuoteService.java delete mode 100644 branches/sca-android/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/SCAApplicationContextProvider.java delete mode 100644 branches/sca-android/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/StockQuoteServer.java delete mode 100644 branches/sca-android/samples/spring-bigbank-stockquote/src/main/resources/META-INF/spring/StockQuoteService-context.xml delete mode 100644 branches/sca-android/samples/spring-bigbank-stockquote/src/main/resources/StockQuote.composite delete mode 100644 branches/sca-android/samples/store-distributed/README delete mode 100644 branches/sca-android/samples/store-distributed/build.xml delete mode 100644 branches/sca-android/samples/store-distributed/cloud.composite delete mode 100644 branches/sca-android/samples/store-distributed/domain.composite delete mode 100644 branches/sca-android/samples/store-distributed/pom.xml delete mode 100644 branches/sca-android/samples/store-distributed/src/main/java/node/LaunchDomain.java delete mode 100644 branches/sca-android/samples/store-distributed/src/main/java/node/LaunchStoreNodeA.java delete mode 100644 branches/sca-android/samples/store-distributed/src/main/java/node/LaunchStoreNodeB.java delete mode 100644 branches/sca-android/samples/store-distributed/src/main/java/node/LaunchStoreNodeC.java delete mode 100644 branches/sca-android/samples/store-distributed/src/main/java/services/Cart.java delete mode 100644 branches/sca-android/samples/store-distributed/src/main/java/services/Catalog.java delete mode 100644 branches/sca-android/samples/store-distributed/src/main/java/services/CurrencyConverter.java delete mode 100644 branches/sca-android/samples/store-distributed/src/main/java/services/CurrencyConverterImpl.java delete mode 100644 branches/sca-android/samples/store-distributed/src/main/java/services/FruitsCatalogImpl.java delete mode 100644 branches/sca-android/samples/store-distributed/src/main/java/services/Item.java delete mode 100644 branches/sca-android/samples/store-distributed/src/main/java/services/ShoppingCartImpl.java delete mode 100644 branches/sca-android/samples/store-distributed/src/main/java/services/Total.java delete mode 100644 branches/sca-android/samples/store-distributed/src/main/resources/cloud/NodeA.composite delete mode 100644 branches/sca-android/samples/store-distributed/src/main/resources/cloud/NodeB.composite delete mode 100644 branches/sca-android/samples/store-distributed/src/main/resources/cloud/NodeC.composite delete mode 100644 branches/sca-android/samples/store-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/store-distributed/src/main/resources/nodeA/store.composite delete mode 100644 branches/sca-android/samples/store-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/store-distributed/src/main/resources/nodeB/store.composite delete mode 100644 branches/sca-android/samples/store-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/samples/store-distributed/src/main/resources/nodeC/store.composite delete mode 100644 branches/sca-android/samples/store-distributed/src/main/resources/nodeC/uiservices/store.html delete mode 100644 branches/sca-android/samples/store-distributed/src/main/resources/uiservices/store.html delete mode 100644 branches/sca-android/samples/store-distributed/store.png delete mode 100644 branches/sca-android/samples/store-distributed/store.svg delete mode 100644 branches/sca-android/samples/store-distributed/workspace.xml delete mode 100644 branches/sca-android/samples/store/README delete mode 100644 branches/sca-android/samples/store/build.xml delete mode 100644 branches/sca-android/samples/store/pom.xml delete mode 100644 branches/sca-android/samples/store/src/main/java/launch/Launch.java delete mode 100644 branches/sca-android/samples/store/src/main/java/services/Cart.java delete mode 100644 branches/sca-android/samples/store/src/main/java/services/Catalog.java delete mode 100644 branches/sca-android/samples/store/src/main/java/services/CurrencyConverter.java delete mode 100644 branches/sca-android/samples/store/src/main/java/services/CurrencyConverterImpl.java delete mode 100644 branches/sca-android/samples/store/src/main/java/services/FruitsCatalogImpl.java delete mode 100644 branches/sca-android/samples/store/src/main/java/services/Item.java delete mode 100644 branches/sca-android/samples/store/src/main/java/services/ShoppingCartImpl.java delete mode 100644 branches/sca-android/samples/store/src/main/java/services/Total.java delete mode 100644 branches/sca-android/samples/store/src/main/resources/store.composite delete mode 100644 branches/sca-android/samples/store/src/main/resources/uiservices/store.html delete mode 100644 branches/sca-android/samples/store/store.png delete mode 100644 branches/sca-android/samples/store/store.svg delete mode 100644 branches/sca-android/samples/web-resource/README delete mode 100644 branches/sca-android/samples/web-resource/build.xml delete mode 100644 branches/sca-android/samples/web-resource/pom.xml delete mode 100644 branches/sca-android/samples/web-resource/src/main/java/web/resource/SampleServer.java delete mode 100644 branches/sca-android/samples/web-resource/src/main/resources/WebResource.composite delete mode 100644 branches/sca-android/samples/web-resource/src/main/resources/myContent/index.html delete mode 100644 branches/sca-android/samples/web-resource/web-resource.png delete mode 100644 branches/sca-android/samples/web-resource/web-resource.svg delete mode 100644 branches/sca-android/samples/zipcode-jaxws/LICENSE delete mode 100644 branches/sca-android/samples/zipcode-jaxws/NOTICE delete mode 100644 branches/sca-android/samples/zipcode-jaxws/README delete mode 100644 branches/sca-android/samples/zipcode-jaxws/build.xml delete mode 100644 branches/sca-android/samples/zipcode-jaxws/pom.xml delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCode.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCodeResponse.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCity.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCityResponse.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByState.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByStateResponse.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIP.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIPResponse.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/ObjectFactory.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZip.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZipSoap.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/package-info.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/ArrayOfWeatherData.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceName.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceNameResponse.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCode.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCodeResponse.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/ObjectFactory.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherData.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecast.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecastSoap.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecasts.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/package-info.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/location/LocationClient.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/location/USLocationImpl.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastClient.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastImpl.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeClient.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeService.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeServiceImpl.java delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/resources/USLocation.composite delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/resources/WeatherForecast.composite delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/main/resources/ZipCode.composite delete mode 100644 branches/sca-android/samples/zipcode-jaxws/src/test/java/zipcode/ZipCodeClientTestCase.java delete mode 100644 branches/sca-android/tools/java2wsdl/LICENSE delete mode 100644 branches/sca-android/tools/java2wsdl/NOTICE delete mode 100644 branches/sca-android/tools/java2wsdl/pom.xml delete mode 100644 branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/GenerationParameters.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDL.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDLGenerator.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDLGeneratorFactory.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDLGeneratorImpl.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/SchemaBuilder.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2OMBuilder.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLBuilder.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLConstants.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLOptionsValidator.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanySchemaGenerator.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyTypeTable.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyWSDLTypesGenerator.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/WSDLGenEvent.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/WSDLGenListener.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/util/XMLNameUtil.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/main/resources/META-INF/LICENSE.txt delete mode 100644 branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/CustomerValue.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/CustomerWithAccount.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/ExampleService.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLTestCase.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/account/Account.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/customer/Customer.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/extra/GoldCustomer.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/test/java/org/soapinterop/CreditScoreDocLit.java delete mode 100644 branches/sca-android/tools/java2wsdl/src/test/resources/AccountService.wsdl delete mode 100644 branches/sca-android/tools/java2wsdl/src/test/resources/CreditScoreDocLit.wsdl delete mode 100644 branches/sca-android/tools/java2wsdl/src/test/resources/helloworld.wsdl delete mode 100644 branches/sca-android/tools/java2wsdl/src/test/resources/interopdoc.wsdl delete mode 100644 branches/sca-android/tools/java2wsdl/src/test/resources/sequences.xsd delete mode 100644 branches/sca-android/tools/maven/maven-dependency-lister/LICENSE delete mode 100644 branches/sca-android/tools/maven/maven-dependency-lister/NOTICE delete mode 100644 branches/sca-android/tools/maven/maven-dependency-lister/README delete mode 100644 branches/sca-android/tools/maven/maven-dependency-lister/pom.xml delete mode 100644 branches/sca-android/tools/maven/maven-dependency-lister/src/main/java/org/apache/tuscany/tools/sca/dependency/lister/plugin/DependencyListerMojo.java delete mode 100644 branches/sca-android/tools/maven/maven-java2wsdl/LICENSE delete mode 100644 branches/sca-android/tools/maven/maven-java2wsdl/NOTICE delete mode 100644 branches/sca-android/tools/maven/maven-java2wsdl/pom.xml delete mode 100644 branches/sca-android/tools/maven/maven-java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/plugin/Java2WSDLGeneratorMojo.java delete mode 100644 branches/sca-android/tools/maven/maven-osgi-junit/LICENSE delete mode 100644 branches/sca-android/tools/maven/maven-osgi-junit/NOTICE delete mode 100644 branches/sca-android/tools/maven/maven-osgi-junit/pom.xml delete mode 100644 branches/sca-android/tools/maven/maven-osgi-junit/src/main/java/org/apache/tuscany/tools/sca/osgi/junit/plugin/OSGiJUnitMojo.java delete mode 100644 branches/sca-android/tools/maven/maven-tuscany-bundle-plugin/pom.xml delete mode 100644 branches/sca-android/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/LibraryBundleMojo.java delete mode 100644 branches/sca-android/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/LibraryBundleUtil.java delete mode 100644 branches/sca-android/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/TuscanyBundlePluginMojo.java delete mode 100644 branches/sca-android/tools/maven/maven-web-junit/LICENSE delete mode 100644 branches/sca-android/tools/maven/maven-web-junit/NOTICE delete mode 100644 branches/sca-android/tools/maven/maven-web-junit/pom.xml delete mode 100644 branches/sca-android/tools/maven/maven-web-junit/src/main/java/org/apache/tuscany/tools/sca/web/junit/plugin/WebJUnitGeneratorMojo.java delete mode 100644 branches/sca-android/tools/maven/maven-web-junit/src/main/java/org/apache/tuscany/tools/sca/web/junit/plugin/WebJUnitMojo.java delete mode 100644 branches/sca-android/tools/maven/maven-wsdl2java/LICENSE delete mode 100644 branches/sca-android/tools/maven/maven-wsdl2java/NOTICE delete mode 100644 branches/sca-android/tools/maven/maven-wsdl2java/pom.xml delete mode 100644 branches/sca-android/tools/maven/maven-wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/plugin/WSDL2JavaGeneratorMojo.java delete mode 100644 branches/sca-android/tools/maven/maven-wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/plugin/WSDLFileOption.java delete mode 100644 branches/sca-android/tools/wsdl2java/LICENSE delete mode 100644 branches/sca-android/tools/wsdl2java/NOTICE delete mode 100644 branches/sca-android/tools/wsdl2java/pom.xml delete mode 100644 branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/JavaInterfaceEmitter.java delete mode 100644 branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/JavaInterfaceGenerator.java delete mode 100644 branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/RemotableInterfaceWritter.java delete mode 100644 branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/SDODataBindingCodegenExtension.java delete mode 100644 branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/SDODataBindingTypeMappingEntry.java delete mode 100644 branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGenerator.java delete mode 100644 branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/util/XMLNameUtil.java delete mode 100644 branches/sca-android/tools/wsdl2java/src/main/resources/META-INF/LICENSE.txt delete mode 100644 branches/sca-android/tools/wsdl2java/src/main/resources/RemotableInterfaceTemplate.xsl delete mode 100644 branches/sca-android/tools/wsdl2java/src/test/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGeneratorTestCase.java delete mode 100644 branches/sca-android/tools/wsdl2java/src/test/java/org/soapinterop/CreditScoreDocLit.java delete mode 100644 branches/sca-android/tools/wsdl2java/src/test/resources/AccountService.wsdl delete mode 100644 branches/sca-android/tools/wsdl2java/src/test/resources/AccountServiceWithFault.wsdl delete mode 100644 branches/sca-android/tools/wsdl2java/src/test/resources/CreditScoreDocLit.wsdl delete mode 100644 branches/sca-android/tools/wsdl2java/src/test/resources/helloworld.wsdl delete mode 100644 branches/sca-android/tools/wsdl2java/src/test/resources/interopdoc.wsdl delete mode 100644 branches/sca-android/tools/wsdl2java/src/test/resources/sequences.xsd delete mode 100644 branches/sca-android/tutorials/store/README delete mode 100644 branches/sca-android/tutorials/store/Tutorial.pdf delete mode 100644 branches/sca-android/tutorials/store/assets/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/tutorials/store/assets/pom.xml delete mode 100644 branches/sca-android/tutorials/store/assets/services/Cart.java delete mode 100644 branches/sca-android/tutorials/store/assets/services/Catalog.java delete mode 100644 branches/sca-android/tutorials/store/assets/services/CurrencyConverter.java delete mode 100644 branches/sca-android/tutorials/store/assets/services/CurrencyConverterImpl.java delete mode 100644 branches/sca-android/tutorials/store/assets/services/FruitsCatalogImpl.java delete mode 100644 branches/sca-android/tutorials/store/assets/services/Item.java delete mode 100644 branches/sca-android/tutorials/store/assets/services/ShoppingCartImpl.java delete mode 100644 branches/sca-android/tutorials/store/assets/services/Total.java delete mode 100644 branches/sca-android/tutorials/store/assets/services/VegetablesCatalogImpl.java delete mode 100644 branches/sca-android/tutorials/store/assets/services/db/ShoppingCartTableImpl.java delete mode 100644 branches/sca-android/tutorials/store/assets/services/db/cart.sql delete mode 100644 branches/sca-android/tutorials/store/assets/services/map/FruitsCatalogImpl.java delete mode 100644 branches/sca-android/tutorials/store/assets/services/market/MarketCatalogImpl.java delete mode 100644 branches/sca-android/tutorials/store/assets/services/merger/MergedCatalogImpl.java delete mode 100644 branches/sca-android/tutorials/store/assets/tutorial.html delete mode 100644 branches/sca-android/tutorials/store/assets/uiservices/store.html delete mode 100644 branches/sca-android/tutorials/store/catalog-ejb/pom.xml delete mode 100644 branches/sca-android/tutorials/store/catalog-ejb/src/main/java/services/ejb/CatalogEJBHome.java delete mode 100644 branches/sca-android/tutorials/store/catalog-ejb/src/main/java/services/ejb/CatalogEJBRemote.java delete mode 100644 branches/sca-android/tutorials/store/catalog-ejb/src/main/java/services/ejb/Vegetable.java delete mode 100644 branches/sca-android/tutorials/store/catalog-ejb/src/main/java/services/ejb/VegetablesCatalogEJBSessionBean.java delete mode 100644 branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/META-INF/ejb-jar.xml delete mode 100644 branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/META-INF/openejb-jar.xml delete mode 100644 branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/VegetablesCatalogEJB.componentType delete mode 100644 branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/catalog-ejb.composite delete mode 100644 branches/sca-android/tutorials/store/catalog-ejb/src/test/java/client/CatalogEJBClientTestCase.java delete mode 100644 branches/sca-android/tutorials/store/catalog-ejb/src/test/java/org/omg/stub/javax/ejb/_EJBHome_Stub.java delete mode 100644 branches/sca-android/tutorials/store/catalog-ejb/src/test/java/org/omg/stub/javax/ejb/_EJBObject_Stub.java delete mode 100644 branches/sca-android/tutorials/store/catalog-ejb/src/test/java/org/omg/stub/javax/ejb/_Handle_Stub.java delete mode 100644 branches/sca-android/tutorials/store/catalog-ejb/src/test/java/org/omg/stub/javax/ejb/_HomeHandle_Stub.java delete mode 100644 branches/sca-android/tutorials/store/catalog-ejb/src/test/java/services/ejb/_CatalogEJBHome_Stub.java delete mode 100644 branches/sca-android/tutorials/store/catalog-ejb/src/test/java/services/ejb/_CatalogEJBRemote_Stub.java delete mode 100644 branches/sca-android/tutorials/store/catalog-mediation/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/tutorials/store/catalog-mediation/catalog-mediation.composite delete mode 100644 branches/sca-android/tutorials/store/catalog-mediation/pom.xml delete mode 100644 branches/sca-android/tutorials/store/catalog-mediation/services/mediation/VegetablesCatalogMediationImpl.java delete mode 100644 branches/sca-android/tutorials/store/catalog-webapp/catalog-web.composite delete mode 100644 branches/sca-android/tutorials/store/catalog-webapp/pom.xml delete mode 100644 branches/sca-android/tutorials/store/catalog-webapp/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/tutorials/store/catalog-webapp/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-android/tutorials/store/catalog-webapp/webapp/catalog.jsp delete mode 100644 branches/sca-android/tutorials/store/domain/cloud.composite delete mode 100644 branches/sca-android/tutorials/store/domain/cloud/CatalogEJBNode.composite delete mode 100644 branches/sca-android/tutorials/store/domain/cloud/CatalogMediationNode.composite delete mode 100644 branches/sca-android/tutorials/store/domain/cloud/CatalogWebAppNode.composite delete mode 100644 branches/sca-android/tutorials/store/domain/cloud/CatalogsNode.composite delete mode 100644 branches/sca-android/tutorials/store/domain/cloud/CurrencyNode.composite delete mode 100644 branches/sca-android/tutorials/store/domain/cloud/StoreClientNode.composite delete mode 100644 branches/sca-android/tutorials/store/domain/cloud/StoreDBNode.composite delete mode 100644 branches/sca-android/tutorials/store/domain/cloud/StoreEUNode.composite delete mode 100644 branches/sca-android/tutorials/store/domain/cloud/StoreMarketNode.composite delete mode 100644 branches/sca-android/tutorials/store/domain/cloud/StoreMashupNode.composite delete mode 100644 branches/sca-android/tutorials/store/domain/cloud/StoreMergerNode.composite delete mode 100644 branches/sca-android/tutorials/store/domain/cloud/StoreNode.composite delete mode 100644 branches/sca-android/tutorials/store/domain/cloud/StoreSupplierNode.composite delete mode 100644 branches/sca-android/tutorials/store/domain/domain.composite delete mode 100644 branches/sca-android/tutorials/store/domain/launch/LaunchCatalogMediationNode.java delete mode 100644 branches/sca-android/tutorials/store/domain/launch/LaunchCatalogsNode.java delete mode 100644 branches/sca-android/tutorials/store/domain/launch/LaunchCurrencyNode.java delete mode 100644 branches/sca-android/tutorials/store/domain/launch/LaunchStoreDBNode.java delete mode 100644 branches/sca-android/tutorials/store/domain/launch/LaunchStoreEUNode.java delete mode 100644 branches/sca-android/tutorials/store/domain/launch/LaunchStoreMarketNode.java delete mode 100644 branches/sca-android/tutorials/store/domain/launch/LaunchStoreMashupNode.java delete mode 100644 branches/sca-android/tutorials/store/domain/launch/LaunchStoreMergerNode.java delete mode 100644 branches/sca-android/tutorials/store/domain/launch/LaunchStoreNode.java delete mode 100644 branches/sca-android/tutorials/store/domain/launch/LaunchStoreSupplierNode.java delete mode 100644 branches/sca-android/tutorials/store/domain/launch/LaunchTutorialDomainManager.java delete mode 100644 branches/sca-android/tutorials/store/domain/pom.xml delete mode 100644 branches/sca-android/tutorials/store/domain/workspace.xml delete mode 100644 branches/sca-android/tutorials/store/pom.xml delete mode 100644 branches/sca-android/tutorials/store/store-client/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/tutorials/store/store-client/client/Shopper.java delete mode 100644 branches/sca-android/tutorials/store/store-client/client/ShopperImpl.java delete mode 100644 branches/sca-android/tutorials/store/store-client/launch/LaunchStoreClientNode.java delete mode 100644 branches/sca-android/tutorials/store/store-client/pom.xml delete mode 100644 branches/sca-android/tutorials/store/store-client/services/Cart.java delete mode 100644 branches/sca-android/tutorials/store/store-client/services/Catalog.java delete mode 100644 branches/sca-android/tutorials/store/store-client/services/Item.java delete mode 100644 branches/sca-android/tutorials/store/store-client/services/Total.java delete mode 100644 branches/sca-android/tutorials/store/store-client/store-client.composite delete mode 100644 branches/sca-android/tutorials/store/store-db/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/tutorials/store/store-db/pom.xml delete mode 100644 branches/sca-android/tutorials/store/store-db/store-db.composite delete mode 100644 branches/sca-android/tutorials/store/store-eu/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/tutorials/store/store-eu/pom.xml delete mode 100644 branches/sca-android/tutorials/store/store-eu/store-eu.composite delete mode 100644 branches/sca-android/tutorials/store/store-eu/uiservices/store-eu.html delete mode 100644 branches/sca-android/tutorials/store/store-market/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/tutorials/store/store-market/build.xml delete mode 100644 branches/sca-android/tutorials/store/store-market/pom.xml delete mode 100644 branches/sca-android/tutorials/store/store-market/store-market.composite delete mode 100644 branches/sca-android/tutorials/store/store-mashup/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/tutorials/store/store-mashup/build-openajax.xml delete mode 100644 branches/sca-android/tutorials/store/store-mashup/gadget/map-gadget.html delete mode 100644 branches/sca-android/tutorials/store/store-mashup/gadget/store-gadget.html delete mode 100644 branches/sca-android/tutorials/store/store-mashup/map-gadget.composite delete mode 100644 branches/sca-android/tutorials/store/store-mashup/mashup/store-mash.html delete mode 100644 branches/sca-android/tutorials/store/store-mashup/pom.xml delete mode 100644 branches/sca-android/tutorials/store/store-mashup/store-gadget.composite delete mode 100644 branches/sca-android/tutorials/store/store-mashup/store-mashup.composite delete mode 100644 branches/sca-android/tutorials/store/store-merger/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/tutorials/store/store-merger/pom.xml delete mode 100644 branches/sca-android/tutorials/store/store-merger/store-merger.composite delete mode 100644 branches/sca-android/tutorials/store/store-supplier/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/tutorials/store/store-supplier/pom.xml delete mode 100644 branches/sca-android/tutorials/store/store-supplier/store-supplier.composite delete mode 100644 branches/sca-android/tutorials/store/store-test/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/tutorials/store/store-test/client/Shopper.java delete mode 100644 branches/sca-android/tutorials/store/store-test/pom.xml delete mode 100644 branches/sca-android/tutorials/store/store-test/test/StoreSupplierTestCase.java delete mode 100644 branches/sca-android/tutorials/store/store/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/tutorials/store/store/pom.xml delete mode 100644 branches/sca-android/tutorials/store/store/store.composite delete mode 100644 branches/sca-android/tutorials/store/web-services/META-INF/sca-contribution.xml delete mode 100644 branches/sca-android/tutorials/store/web-services/catalogs.composite delete mode 100644 branches/sca-android/tutorials/store/web-services/currency.composite delete mode 100644 branches/sca-android/tutorials/store/web-services/pom.xml delete mode 100644 branches/sca-android/tutorials/store/www-services/cart-amazon/amazon/cart/AmazonCart.java delete mode 100644 branches/sca-android/tutorials/store/www-services/cart-amazon/amazon/cart/AmazonCart.wsdl delete mode 100644 branches/sca-android/tutorials/store/www-services/cart-amazon/amazon/cart/AmazonCartImpl.java delete mode 100644 branches/sca-android/tutorials/store/www-services/cart-amazon/amazoncart.composite delete mode 100644 branches/sca-android/tutorials/store/www-services/cart-amazon/launch/LaunchAmazonCart.java delete mode 100644 branches/sca-android/tutorials/store/www-services/cart-amazon/pom.xml delete mode 100644 branches/sca-android/tutorials/store/www-services/cart-amazon/test/AmazonCartTestCase.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/README delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/build.xml delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/lib/AWS2007_05_14.jar delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/shoppingstore.png delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/server/ShoppingStoreServer.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/services/cart/CartService.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/services/cart/CartServiceImpl.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/services/proxy/ShoppingStoreService.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/services/proxy/ShoppingStoreServiceImpl.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/resources/shoppingstore.composite delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/resources/wsdl/shoppingstore.wsdl delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/pom.xml delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/CatalogClient.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/CatalogService.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/amazon/AmazonCatalogService.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/amazon/AmazonCatalogServiceImpl.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/ebay/EBayCatalogService.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/ebay/EBayCatalogServiceImpl.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/util/NamespaceContextImpl.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/util/XPathHelper.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/resources/catalog.composite delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/resources/wsdl/AWSECommerceService.wsdl delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/resources/wsdl/ShoppingService.wsdl delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/pom.xml delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/launch/LaunchCatalog.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/services/Catalog.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/services/CatalogImpl.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/services/CurrencyConverter.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/util/CreateDB.java delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/resources/store-catalog-database.composite delete mode 100644 branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/store.sql delete mode 100644 branches/sca-android/tutorials/store/www-services/pom.xml diff --git a/branches/sca-android/demos/alert-aggregator-webapp/LICENSE b/branches/sca-android/demos/alert-aggregator-webapp/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/demos/alert-aggregator-webapp/NOTICE b/branches/sca-android/demos/alert-aggregator-webapp/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/demos/alert-aggregator-webapp/README b/branches/sca-android/demos/alert-aggregator-webapp/README deleted file mode 100644 index 3ec27ef65f..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/README +++ /dev/null @@ -1,82 +0,0 @@ -Apache Tuscany Alert Aggregator Demo -==================================== - -The alert aggregator demo provides an application, implemented using SCA, that -aggregates feeds together and exposes them using the following bindings. - -binding.ws -binding.jsonrpc -binding.feed - -The easiest way to get going is to build the demo - -cd alert-aggregator-webapp -ant package - -This will build a war file - -demo-alert-aggregator-webapp.war - -This war can be deployed to you web application container and tested (the war -has been tested with Tomcat 6.0.10). - -The Web Application -------------------- - -Once deployed point your browser at - -http://localhost:8080/demo-alert-aggregator-webapp - -Taking care to ensure the host name and port number match you local -configuration. - -This launches a Javascript application in the browser that uses JSONRPC -to contact the server and retrived a list of alert sources and alerts that -these sources are providing. - -There default sources that you see are stored in a file in the following -file - -demo-alert-aggregator-webapp/WEB-INF/classes/sources.xml - -This files has the following contents - - - - BBC News - http://news.bbc.co.uk/ - 10-Jun-2007 16:34:03 - http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/world/rss.xml - - - Engadget - http://www.engadget.com - 10-Jun-2007 16:34:03 - http://www.engadget.com/rss.xml - - - -You may want to adjust the "LastChecked" values to change the number of -alerts that are displayed in the first instance - -Using A Feed Reader -------------------- - -As this SCA application also uses the binding.feed binding you can use your -favourite feed reader to read the aggregated alerts. To do this point your -feed reader at - -http://localhost:8080/demo-alert-aggregator-webapp/services/AlertsFeedServiceRSS - -Again taking care to ensure that the host name and port number match you -local configuration. - -Using Web Services ------------------- - -The SCA application also uses binding.ws to provide a SOAP/HTTP interface. -The demo client that uses this interface is not yet available. - - - - diff --git a/branches/sca-android/demos/alert-aggregator-webapp/alert-aggregator.png b/branches/sca-android/demos/alert-aggregator-webapp/alert-aggregator.png deleted file mode 100644 index ae429cca94..0000000000 Binary files a/branches/sca-android/demos/alert-aggregator-webapp/alert-aggregator.png and /dev/null differ diff --git a/branches/sca-android/demos/alert-aggregator-webapp/alert-aggregator.svg b/branches/sca-android/demos/alert-aggregator-webapp/alert-aggregator.svg deleted file mode 100644 index 807416135e..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/alert-aggregator.svg +++ /dev/null @@ -1,627 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - DisplayComposite - PHP - - Display - - - - - - AlerterComposite - Java - - AlertsService - - - - rest soap - - - soap - - RSS - - - AlertsSourcesService - - - - - - jsonrpc - - - - - soap - - soap - atom - jsonrpc - - - - - - - POP - Not done - - - - - - - - - HTML Web2.0 Thunderbird - - NNTP - Not done - - rss - - AlertFeedService - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/alert-aggregator-webapp/build-dojo.xml b/branches/sca-android/demos/alert-aggregator-webapp/build-dojo.xml deleted file mode 100644 index c31c9adee8..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/build-dojo.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/alert-aggregator-webapp/build.xml b/branches/sca-android/demos/alert-aggregator-webapp/build.xml deleted file mode 100644 index b75842d08c..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/build.xml +++ /dev/null @@ -1,148 +0,0 @@ - - -]> - - - &buildDependency; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/alert-aggregator-webapp/pom.xml b/branches/sca-android/demos/alert-aggregator-webapp/pom.xml deleted file mode 100644 index 1856bee4c1..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/pom.xml +++ /dev/null @@ -1,345 +0,0 @@ - - - - 4.0.0 - - - org.apache.tuscany.sca - tuscany-demos - 1.4-SNAPSHOT - ../pom.xml - - - org.apache.tuscany.sca - demo-alert-aggregator-webapp - war - 1.4-SNAPSHOT - Apache Tuscany SCA Alert Aggregator Demo - http://cwiki.apache.org/TUSCANY - - - - junit - junit - 4.2 - test - - - httpunit - httpunit - 1.6.1 - test - - - org.apache.tuscany.sdo - tuscany-sdo-api-r2.1 - 1.1.1 - - - org.apache.tuscany.sdo - tuscany-sdo-impl - 1.1.1 - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - ${pom.version} - runtime - - - org.apache.tuscany.sca - tuscany-core-databinding - ${pom.version} - runtime - - - org.apache.tuscany.sca - tuscany-databinding-jaxb - ${pom.version} - runtime - - - org.apache.tuscany.sca - tuscany-databinding-sdo - ${pom.version} - compile - - - org.apache.tuscany.sca - tuscany-databinding-axiom - ${pom.version} - compile - - - org.apache.tuscany.sca - tuscany-host-embedded - ${pom.version} - compile - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - ${pom.version} - compile - - - org.apache.tuscany.sca - tuscany-interface-java-xml - ${pom.version} - compile - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.4-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.4-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-binding-rss-rome - 1.4-SNAPSHOT - - - org.codehaus.woodstox - wstx-asl - 3.2.1 - runtime - - - - - demo-alert-aggregator-webapp - - - org.codehaus.mojo - build-helper-maven-plugin - 1.0 - - - add-test-source - generate-sources - - add-test-source - - - - target/sdo-source - - - - - - - org.apache.tuscany.sdo - tuscany-sdo-plugin - 1.1.1 - - - generate-sdo - generate-sources - - - - ${basedir}/src/main/resources/Alerts.wsdl - org.apache.tuscany.sca.demos.aggregator.service - - - ${basedir}/src/main/resources/AlertsSources.wsdl - org.apache.tuscany.sca.demos.aggregator.sources - - - ${basedir}/src/main/resources/Alerts.xsd - org.apache.tuscany.sca.demos.aggregator.types - - - true - true - true - - - generate - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.1 - - - - ant - ant-trax - 1.6.5 - - - - - - install-dojo - validate - - run - - - - - - - - - - - copy-dojo-files - generate-resources - - run - - - - - - - - - - - - clean-dojo-files - clean - - run - - - - - - - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - surefire-it - integration-test - - test - - - - **/*AlertsIntegrationTest.java - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - 1.0-alpha-5 - - - start-container - pre-integration-test - - start - - - - stop-container - post-integration-test - - stop - - - - - - jetty6x - embedded - - org.apache.commons.logging.impl.SimpleLog - - - false - - - 8085 - - - - - ${project.build.directory}/${project.build.finalName}.${project.packaging} - - http://localhost:8085/AlertsSourcesServiceJSONRPC - - - ${project.build.directory}/cargo-jetty - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - true - - - generate - - - - - - - - diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertTypeNonSDOImpl.java b/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertTypeNonSDOImpl.java deleted file mode 100644 index 808374030c..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertTypeNonSDOImpl.java +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.demos.aggregator; - -import org.apache.tuscany.sca.demos.aggregator.types.AlertType; - - -public class AlertTypeNonSDOImpl implements AlertType -{ - private static final long serialVersionUID = 670364038865656196L; - -/** - * The default value of the '{@link #getTitle() Title}' attribute. - * - * - * @see #getTitle() - * @generated - * @ordered - */ - protected static final String TITLE_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getTitle() Title}' attribute. - * - * - * @see #getTitle() - * @generated - * @ordered - */ - protected String title = TITLE_DEFAULT_; - - /** - * The default value of the '{@link #getSummary() Summary}' attribute. - * - * - * @see #getSummary() - * @generated - * @ordered - */ - protected static final String SUMMARY_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getSummary() Summary}' attribute. - * - * - * @see #getSummary() - * @generated - * @ordered - */ - protected String summary = SUMMARY_DEFAULT_; - - /** - * The default value of the '{@link #getAddress() Address}' attribute. - * - * - * @see #getAddress() - * @generated - * @ordered - */ - protected static final String ADDRESS_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getAddress() Address}' attribute. - * - * - * @see #getAddress() - * @generated - * @ordered - */ - protected String address = ADDRESS_DEFAULT_; - - /** - * The default value of the '{@link #getDate() Date}' attribute. - * - * - * @see #getDate() - * @generated - * @ordered - */ - protected static final String DATE_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getDate() Date}' attribute. - * - * - * @see #getDate() - * @generated - * @ordered - */ - protected String date = DATE_DEFAULT_; - - /** - * The default value of the '{@link #getSourceId() Source Id}' attribute. - * - * - * @see #getSourceId() - * @generated - * @ordered - */ - protected static final String SOURCE_ID_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getSourceId() Source Id}' attribute. - * - * - * @see #getSourceId() - * @generated - * @ordered - */ - protected String sourceId = SOURCE_ID_DEFAULT_; - - /** - * The default value of the '{@link #isUnread() Unread}' attribute. - * - * - * @see #isUnread() - * @generated - * @ordered - */ - protected static final boolean UNREAD_DEFAULT_ = false; - - /** - * The cached value of the '{@link #isUnread() Unread}' attribute. - * - * - * @see #isUnread() - * @generated - * @ordered - */ - protected boolean unread = UNREAD_DEFAULT_; - - /** - * The default value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected static final String ID_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected String id = ID_DEFAULT_; - - /** - * - * - * @generated - */ - public AlertTypeNonSDOImpl() - { - super(); - } - - - /** - * - * - * @generated - */ - public String getTitle() - { - return title; - } - /** - * - * - * @generated - */ - public void setTitle(String newTitle) - { - title = newTitle; - } - - /** - * - * - * @generated - */ - public String getSummary() - { - return summary; - } - /** - * - * - * @generated - */ - public void setSummary(String newSummary) - { - summary = newSummary; - } - - /** - * - * - * @generated - */ - public String getAddress() - { - return address; - } - /** - * - * - * @generated - */ - public void setAddress(String newAddress) - { - address = newAddress; - } - - /** - * - * - * @generated - */ - public String getDate() - { - return date; - } - /** - * - * - * @generated - */ - public void setDate(String newDate) - { - date = newDate; - } - - /** - * - * - * @generated - */ - public String getSourceId() - { - return sourceId; - } - /** - * - * - * @generated - */ - public void setSourceId(String newSourceId) - { - sourceId = newSourceId; - } - - /** - * - * - * @generated - */ - public boolean isUnread() - { - return unread; - } - /** - * - * - * @generated - */ - public void setUnread(boolean newUnread) - { - unread = newUnread; - } - - /** - * - * - * @generated - */ - public String getId() - { - return id; - } - /** - * - * - * @generated - */ - public void setId(String newId) - { - id = newId; - } - - /** - * - * - * @generated - */ - @Override - public String toString() - { - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (Title: "); - result.append(title); - result.append(", Summary: "); - result.append(summary); - result.append(", Address: "); - result.append(address); - result.append(", Date: "); - result.append(date); - result.append(", SourceId: "); - result.append(sourceId); - result.append(", Unread: "); - result.append(unread); - result.append(", Id: "); - result.append(id); - result.append(')'); - return result.toString(); - } - -} //AlertTypeImpl diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsFeedServiceImpl.java b/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsFeedServiceImpl.java deleted file mode 100644 index e070e0b8f1..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsFeedServiceImpl.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.demos.aggregator; - -import java.text.DateFormat; - -import org.apache.abdera.Abdera; -import org.apache.abdera.factory.Factory; -import org.apache.abdera.model.Entry; -import org.apache.abdera.model.Feed; -import org.apache.tuscany.sca.binding.atom.collection.Collection; -import org.apache.tuscany.sca.binding.atom.collection.NotFoundException; -import org.apache.tuscany.sca.demos.aggregator.types.AlertType; -import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * Read all new alerts from the specified sources - * - * @version $Rev$ $Date$ - */ -@Service(Collection.class) -public class AlertsFeedServiceImpl implements Collection { - - private AlertsService alerts; - - @Reference - public void setAlerts(AlertsService alerts) { - this.alerts = alerts; - } - - DateFormat dateFormatter = DateFormat.getDateTimeInstance(); - - /** - * Return the alerts as a feed. - * - * @return the structure containing alerts - */ - public org.apache.abdera.model.Feed getFeed() { - - // Create a new Feed - Factory factory = Abdera.getNewFactory(); - Feed feed = factory.newFeed(); - feed.setTitle("Apache Tuscany Feed Aggregator"); - feed.setSubtitle("A sample showing an SCA application to aggregate various types of feeds"); - feed.addAuthor("Apache Tuscany"); - feed.addLink("http://tuscany.apache.org"); - - // Aggregate entries from feed1 and feed2 - try { - AlertsType alerts = this.alerts.getAllNewAlerts(""); - - for( Object alertObject : alerts.getAlert() ){ - AlertType alert = ((AlertType)alertObject); - Entry entry = factory.newEntry(); - entry.setTitle(alert.getTitle()); - //entry.(alert.getSummary()); - entry.addLink(alert.getAddress()); - entry.setPublished(dateFormatter.parse(alert.getDate())); - - feed.addEntry(entry); - } - } catch(Exception ex) { - System.err.println("Exception " + ex.toString()); - } - - return feed; - } - - public Feed query(String queryString) { - return getFeed(); - } - - public void delete(String id) throws NotFoundException { - } - - public Entry get(String id) throws NotFoundException { - return null; - } - - public Entry post(Entry entry) { - return null; - } - - public void put(String id, Entry entry) throws NotFoundException { - } - -} diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsService.java b/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsService.java deleted file mode 100644 index c4bf13ce7a..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsService.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.demos.aggregator; - -import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; -import org.osoa.sca.annotations.Remotable; - -/** - * Retrieve and manage alerts - * - * @version $Rev$ $Date$ - */ -@Remotable -public interface AlertsService { - - /** - * Return a structure holding all of the new alerts that have been found - * - * @return the structure containing alerts - */ - public AlertsType getAllNewAlerts(String id); - -} diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsServiceImpl.java b/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsServiceImpl.java deleted file mode 100644 index 28e27a9978..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsServiceImpl.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.demos.aggregator; - -import java.text.DateFormat; -import java.util.Date; -import java.util.List; - -import org.apache.tuscany.sca.demos.aggregator.types.AlertType; -import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; -import org.apache.tuscany.sca.demos.aggregator.types.ConfigType; -import org.apache.tuscany.sca.demos.aggregator.types.SourceType; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * Read all new alerts from the specified sources - * - * @version $Rev$ $Date$ - */ -@Service(AlertsService.class) -public class AlertsServiceImpl implements AlertsService { - - private RSSCheckerService rssChecker; - - private AlertsSourcesService alertsSources; - - @Reference - public void setRssChecker(RSSCheckerService rssChecker) { - this.rssChecker = rssChecker; - } - - @Reference - public void setAlertsSources(AlertsSourcesService alertsSources) { - this.alertsSources = alertsSources; - } - - DateFormat dateFormatter = DateFormat.getDateTimeInstance(); - - /** - * Return a structure holding all of the new alerts that have been found - * - * @return the structure containing alerts - */ - public AlertsType getAllNewAlerts(String id) - { - System.err.println("getAllNewAlerts(" + id + ")"); - - //TypesFactory factory = TypesFactory.INSTANCE; - //AlertsType returnAlerts = factory.createAlertsType(); - AlertsType returnAlerts = new AlertsTypeNonSDOImpl(); - List returnAlertList = returnAlerts.getAlert(); - - // get the date/time now so that we can update the - // alert source record so that next time we - // only get the latest alerts - Date now = new Date(); - String nowString = dateFormatter.format(now); - - try { - ConfigType alertSourceConfig = alertsSources.getAlertSources(id); - - for (Object source : alertSourceConfig.getSource()){ - SourceType sourceType = (SourceType)source; - - AlertsType alerts = null; - - if ( sourceType.getFeedType().equals("rss")){ - alerts = rssChecker.getNewAlerts(sourceType.getFeedAddress(), - sourceType.getLastChecked()); - } else { - - } - - // extend return list with any alerts we found - for( Object alert : alerts.getAlert() ){ - - // set the id on the alert so we know which source it - // came from - ((AlertType)alert).setSourceId(sourceType.getId()); - - // convert from SDO to POJO so that the - // JSONRPC binding will work. It can't currently - // handle SDOs - AlertType newAlert = new AlertTypeNonSDOImpl(); - - newAlert.setSourceId(((AlertType)alert).getSourceId()); - newAlert.setTitle(((AlertType)alert).getTitle()); - newAlert.setSummary(((AlertType)alert).getSummary()); - newAlert.setAddress(((AlertType)alert).getAddress()); - newAlert.setDate(((AlertType)alert).getDate()); - newAlert.setId(((AlertType)alert).getId()); - newAlert.setUnread(((AlertType)alert).isUnread()); - - returnAlertList.add(newAlert); - } - - // update the time last checked for this source - sourceType.setLastChecked(nowString); - //alertsSources.updateAlertSource(sourceType); - } - } catch(Exception ex) { - System.err.println("Exception " + ex.toString()); - } - - return returnAlerts ; - - } -} diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesService.java b/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesService.java deleted file mode 100644 index 7b943b1b45..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesService.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.demos.aggregator; - -import org.apache.tuscany.sca.demos.aggregator.types.ConfigType; -import org.apache.tuscany.sca.demos.aggregator.types.SourceType; -import org.osoa.sca.annotations.Remotable; - -/** - * Retrieve and manage alert sources - * - * @version $Rev$ $Date$ - */ -@Remotable -public interface AlertsSourcesService { - - /** - * Return all of the configured alert sources. - * - * @return the list of alert sources - */ - public ConfigType getAlertSources (String id); - - /** - * Return a single alert source. - * @param id not currently used - * @return the alert source - */ - public SourceType getAlertSource (String id); - - /** - * Update an alert source. - * - * @param updatedSource the alert source to update - */ - public void updateAlertSource (SourceType updatedSource); - - /** - * Add an alert source. - * - * @param newSource the alert source to add - */ - public String addAlertSource (SourceType newSource); - - /** - * Remove an alert source. - * - * @param oldSource the alert source to remove - */ - public void removeAlertSource (String id); - -} diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesServiceImpl.java b/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesServiceImpl.java deleted file mode 100644 index ca2fc95b4a..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesServiceImpl.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.demos.aggregator; - -import java.io.InputStream; -import java.text.DateFormat; -import java.util.Date; - -import org.apache.tuscany.sca.demos.aggregator.types.ConfigType; -import org.apache.tuscany.sca.demos.aggregator.types.SourceType; -import org.apache.tuscany.sca.demos.aggregator.types.TypesFactory; -import org.apache.tuscany.sca.demos.aggregator.types.impl.SourceTypeImpl; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import commonj.sdo.helper.HelperContext; -import commonj.sdo.helper.XMLDocument; -import commonj.sdo.impl.HelperProvider; - -/** - * Retrieve and manage alert sources - * - * @version $Rev$ $Date$ - */ -@Service(AlertsSourcesService.class) -@Scope("COMPOSITE") -public class AlertsSourcesServiceImpl implements AlertsSourcesService { - - ConfigType alertSources; - - /** - * Constructor reads the configuration to provide - * the initial list of alert sources - */ - public AlertsSourcesServiceImpl(){ - System.err.println("AlertsSourcesServiceImpl()"); - try { - // read the alerts config from an XML file - InputStream is = this.getClass().getClassLoader().getResourceAsStream("sources.xml"); - - if (is == null) { - throw new Exception("Can;t find sources.xml"); - } else { - HelperContext helperContext = HelperProvider.getDefaultContext(); - TypesFactory.INSTANCE.register(helperContext); - XMLDocument xmlDoc = helperContext.getXMLHelper().load(is); - alertSources = (ConfigType)xmlDoc.getRootObject(); - } - } catch (Exception ex) { - System.err.println("Exception " + ex.toString()); - } - } - - /** - * Return all of the configured alert sources. - * - * @return the list of alert sources - */ - public ConfigType getAlertSources (String id) - { - System.err.println("getAlertSources(" + id + ")"); - - // convert alert sources to POJOs so that - // the JSONRPC binding will work - ConfigTypeNonSDOImpl sources = new ConfigTypeNonSDOImpl(); - - for (Object source : alertSources.getSource()) { - SourceTypeNonSDOImpl newSource = new SourceTypeNonSDOImpl(); - newSource.setAddress(((SourceTypeImpl)source).getAddress()); - newSource.setFeedAddress(((SourceTypeImpl)source).getFeedAddress()); - newSource.setId(((SourceTypeImpl)source).getId()); - newSource.setLastChecked(((SourceTypeImpl)source).getLastChecked()); - newSource.setName(((SourceTypeImpl)source).getName()); - newSource.setFeedType(((SourceTypeImpl)source).getFeedType()); - sources.getSource().add(newSource); - } - - return sources; - } - - /** - * Return a single alert source. - * @param id the alert source id number - * @return the alert source - */ - public SourceType getAlertSource (String id) - { - System.err.println("getAlertSource(" + id + ")"); - SourceType alertSource = null; - - for (Object source : alertSources.getSource()) { - if ( ((SourceType)source).getId().equals(id)) { - alertSource = (SourceType)source; - } - } - return alertSource; - } - - /** - * Update an alert source. - * - * @param updatedSource the alert source to update - */ - public void updateAlertSource (SourceType updatedSource) - { - System.err.println("updateAlertSource()"); - - Object originalSource = null; - - for (Object source : alertSources.getSource()) { - if ( ((SourceType)source).getId().equals(updatedSource.getId())) { - originalSource = source; - break; - } - } - - if (originalSource != null){ - alertSources.getSource().add(updatedSource); - alertSources.getSource().remove(originalSource); - } - } - - /** - * Add an alert source. - * - * @param newSource the alert source to add - */ - public String addAlertSource (SourceType newSource) - { - System.err.println("addAlertSource()"); - // set the date to now less 2 hours so we - // get some alerts straight away - DateFormat dateFormatter = DateFormat.getDateTimeInstance(); - Date now = new Date(); - now.setHours(now.getHours()-2); - String nowString = dateFormatter.format(now); - newSource.setLastChecked(nowString); - alertSources.getSource().add(newSource); - return "Done"; - } - - /** - * Remove an alert source. - * - * @param oldSource the alert source to remove - */ - public void removeAlertSource (String id) - { - System.err.println("removeAlertSource()"); - - Object originalSource = null; - - for (Object source : alertSources.getSource()) { - if ( ((SourceType)source).getId().equals(id)) { - originalSource = source; - break; - } - } - - if (originalSource != null) { - alertSources.getSource().remove(originalSource); - } - - } - -} diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsTypeNonSDOImpl.java b/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsTypeNonSDOImpl.java deleted file mode 100644 index 2962defb25..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsTypeNonSDOImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.demos.aggregator; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; - -/** - * - * An implementation of the model object 'Alerts Type'. - * - *

- * The following features are implemented: - *

- *

- * - * @generated - */ -public class AlertsTypeNonSDOImpl implements AlertsType -{ - private static final long serialVersionUID = -3784576466148158776L; - -/** - * The cached value of the '{@link #getAlert() Alert}' containment reference list. - * - * - * @see #getAlert() - * @generated - * @ordered - */ - - protected List alert = new ArrayList(); - - /** - * - * - * @generated - */ - public AlertsTypeNonSDOImpl() - { - super(); - } - - /** - * - * - * @generated - */ - public List getAlert() - { - return alert; - } - -} //AlertsTypeImpl diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/ConfigTypeNonSDOImpl.java b/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/ConfigTypeNonSDOImpl.java deleted file mode 100644 index 75544294ce..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/ConfigTypeNonSDOImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.demos.aggregator; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.tuscany.sca.demos.aggregator.types.ConfigType; - - -public class ConfigTypeNonSDOImpl implements ConfigType -{ - private static final long serialVersionUID = 2522843951360675364L; - - protected List source = new ArrayList(); - - /** - * - * - * @generated - */ - public ConfigTypeNonSDOImpl() - { - super(); - } - - - /** - * - * - * @generated - */ - public List getSource() - { - return source; - } - - -} //ConfigTypeImpl diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerService.java b/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerService.java deleted file mode 100644 index 2a5775e9a9..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerService.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.demos.aggregator; - -import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; - -/** - * The interface for the rss checker service - */ -public interface RSSCheckerService { - - public AlertsType getNewAlerts(String rssaddress, String lastchecktimestamp); - -} diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerServiceImpl.java b/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerServiceImpl.java deleted file mode 100644 index 549abbf602..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerServiceImpl.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.demos.aggregator; - -import java.net.URL; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; - -import org.apache.tuscany.sca.demos.aggregator.types.AlertType; -import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; -import org.apache.tuscany.sca.demos.aggregator.types.TypesFactory; - -import com.sun.syndication.feed.synd.SyndEntry; -import com.sun.syndication.feed.synd.SyndFeed; -import com.sun.syndication.io.SyndFeedInput; -import com.sun.syndication.io.XmlReader; - -/** - * The interface for the rss checker service - */ -public class RSSCheckerServiceImpl implements RSSCheckerService { - - public AlertsType getNewAlerts(String rssaddress, String lastchecktimestamp){ - // Create the list of alerts to return - TypesFactory factory = TypesFactory.INSTANCE; - AlertsType returnAlerts = factory.createAlertsType(); - List returnAlertList = returnAlerts.getAlert(); - - try { - // lastchecktimestamp comes from sources.xml configuration. - // That origin requires ISO 8601 date input (yyyy-MM-dd hh:mm:ss). - DateFormat configDateFormatter = new SimpleDateFormat( "yyyy-MM-dd hh:mm:ss"); - Date timestamp = configDateFormatter.parse(lastchecktimestamp); - // Turn feed dates into something we can process. - DateFormat feedDateFormatter = DateFormat.getDateTimeInstance(); - - // get the feed data from the supplied address - SyndFeedInput input = new SyndFeedInput(); - SyndFeed feed = input.build(new XmlReader(new URL(rssaddress))); - //System.out.println(feed); - - // check all the items to see if we have seen them before - List entries = feed.getEntries(); - for(Object entry: entries){ - SyndEntry syndEntry = (SyndEntry)entry; - - // System.err.println( "Entry pubdate=" + syndEntry.getPublishedDate() ); - if (syndEntry.getPublishedDate().after(timestamp)){ - AlertType newAlert = factory.createAlertType(); - - newAlert.setTitle(syndEntry.getTitle()); - // newAlert.setSummary(""); - newAlert.setSummary(""); - newAlert.setAddress(syndEntry.getLink()); - newAlert.setDate(feedDateFormatter.format(syndEntry.getPublishedDate())); - newAlert.setId(rssaddress); - newAlert.setUnread(true); - - returnAlertList.add(newAlert); - } - } - - } catch(Exception ex) { - ex.printStackTrace( System.err ); - System.err.println("Exception " + ex.toString()); - } - - return returnAlerts; - } - -} diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/SourceTypeNonSDOImpl.java b/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/SourceTypeNonSDOImpl.java deleted file mode 100644 index 10575bf0dc..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/SourceTypeNonSDOImpl.java +++ /dev/null @@ -1,536 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.demos.aggregator; - -import org.apache.tuscany.sca.demos.aggregator.types.SourceType; - -import commonj.sdo.Sequence; - - -public class SourceTypeNonSDOImpl implements SourceType -{ - private static final long serialVersionUID = -4986294578888767793L; - - public final static int NAME = 0; - - public final static int ADDRESS = 1; - - public final static int LAST_CHECKED = 2; - - public final static int FEED_ADDRESS = 3; - - public final static int POP_SERVER = 4; - - public final static int POP_USERNAME = 5; - - public final static int POP_PASSWORD = 6; - - public final static int ANY = -1; - - public final static int ID = 7; - - public final static int TYPE = 8; - - public final static int SDO_PROPERTY_COUNT = 9; - - public final static int EXTENDED_PROPERTY_COUNT = -1; - - - /** - * The internal feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_NAME = 0; - - /** - * The internal feature id for the 'Address' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_ADDRESS = 1; - - /** - * The internal feature id for the 'Last Checked' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_LAST_CHECKED = 2; - - /** - * The internal feature id for the 'Feed Address' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_FEED_ADDRESS = 3; - - /** - * The internal feature id for the 'Pop Server' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_POP_SERVER = 4; - - /** - * The internal feature id for the 'Pop Username' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_POP_USERNAME = 5; - - /** - * The internal feature id for the 'Pop Password' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_POP_PASSWORD = 6; - - /** - * The internal feature id for the 'Any' attribute list. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_ANY = 7; - - /** - * The internal feature id for the 'Id' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_ID = 8; - - /** - * The internal feature id for the 'Type' attribute. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_TYPE = 9; - - /** - * The number of properties for this type. - * - * - * @generated - * @ordered - */ - public final static int INTERNAL_PROPERTY_COUNT = 10; - - - - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_DEFAULT_; - - /** - * The default value of the '{@link #getAddress() Address}' attribute. - * - * - * @see #getAddress() - * @generated - * @ordered - */ - protected static final String ADDRESS_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getAddress() Address}' attribute. - * - * - * @see #getAddress() - * @generated - * @ordered - */ - protected String address = ADDRESS_DEFAULT_; - - /** - * The default value of the '{@link #getLastChecked() Last Checked}' attribute. - * - * - * @see #getLastChecked() - * @generated - * @ordered - */ - protected static final String LAST_CHECKED_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getLastChecked() Last Checked}' attribute. - * - * - * @see #getLastChecked() - * @generated - * @ordered - */ - protected String lastChecked = LAST_CHECKED_DEFAULT_; - - /** - * The default value of the '{@link #getFeedAddress() Feed Address}' attribute. - * - * - * @see #getFeedAddress() - * @generated - * @ordered - */ - protected static final String FEED_ADDRESS_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getFeedAddress() Feed Address}' attribute. - * - * - * @see #getFeedAddress() - * @generated - * @ordered - */ - protected String feedAddress = FEED_ADDRESS_DEFAULT_; - - /** - * The default value of the '{@link #getPopServer() Pop Server}' attribute. - * - * - * @see #getPopServer() - * @generated - * @ordered - */ - protected static final String POP_SERVER_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getPopServer() Pop Server}' attribute. - * - * - * @see #getPopServer() - * @generated - * @ordered - */ - protected String popServer = POP_SERVER_DEFAULT_; - - /** - * The default value of the '{@link #getPopUsername() Pop Username}' attribute. - * - * - * @see #getPopUsername() - * @generated - * @ordered - */ - protected static final String POP_USERNAME_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getPopUsername() Pop Username}' attribute. - * - * - * @see #getPopUsername() - * @generated - * @ordered - */ - protected String popUsername = POP_USERNAME_DEFAULT_; - - /** - * The default value of the '{@link #getPopPassword() Pop Password}' attribute. - * - * - * @see #getPopPassword() - * @generated - * @ordered - */ - protected static final String POP_PASSWORD_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getPopPassword() Pop Password}' attribute. - * - * - * @see #getPopPassword() - * @generated - * @ordered - */ - protected String popPassword = POP_PASSWORD_DEFAULT_; - - /** - * The cached value of the '{@link #getAny() Any}' attribute list. - * - * - * @see #getAny() - * @generated - * @ordered - */ - - protected Sequence any = null; - - /** - * The default value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected static final String ID_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected String id = ID_DEFAULT_; - - /** - * The default value of the '{@link #getFeedType() Feed Type}' attribute. - * - * - * @see #getFeedType() - * @generated - * @ordered - */ - protected static final String FEED_TYPE_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getFeedType() Feed Type}' attribute. - * - * - * @see #getFeedType() - * @generated - * @ordered - */ - protected String feedType = FEED_TYPE_DEFAULT_; - - - /** - * - * - * @generated - */ - public SourceTypeNonSDOImpl() - { - super(); - } - - - - /** - * - * - * @generated - */ - public String getName() - { - return name; - } - /** - * - * - * @generated - */ - public void setName(String newName) - { - name = newName; - } - - /** - * - * - * @generated - */ - public String getAddress() - { - return address; - } - /** - * - * - * @generated - */ - public void setAddress(String newAddress) - { - address = newAddress; - } - - /** - * - * - * @generated - */ - public String getLastChecked() - { - return lastChecked; - } - /** - * - * - * @generated - */ - public void setLastChecked(String newLastChecked) - { - lastChecked = newLastChecked; - } - - /** - * - * - * @generated - */ - public String getFeedAddress() - { - return feedAddress; - } - /** - * - * - * @generated - */ - public void setFeedAddress(String newFeedAddress) - { - feedAddress = newFeedAddress; - } - - /** - * - * - * @generated - */ - public String getPopServer() - { - return popServer; - } - /** - * - * - * @generated - */ - public void setPopServer(String newPopServer) - { - popServer = newPopServer; - } - - /** - * - * - * @generated - */ - public String getPopUsername() - { - return popUsername; - } - /** - * - * - * @generated - */ - public void setPopUsername(String newPopUsername) - { - popUsername = newPopUsername; - } - - /** - * - * - * @generated - */ - public String getPopPassword() - { - return popPassword; - } - /** - * - * - * @generated - */ - public void setPopPassword(String newPopPassword) - { - popPassword = newPopPassword; - } - - /** - * - * - * @generated - */ - public String getId() - { - return id; - } - /** - * - * - * @generated - */ - public void setId(String newId) - { - id = newId; - } - - /** - * - * - * @generated - */ - public String getFeedType() - { - return feedType; - } - /** - * - * - * @generated - */ - public void setFeedType(String newType) - { - feedType = newType; - } - - public Sequence getAny(){ - return null; - } - -} //SourceTypeImpl diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/Alerts.wsdl b/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/Alerts.wsdl deleted file mode 100644 index 8b376240c8..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/Alerts.wsdl +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/Alerts.xsd b/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/Alerts.xsd deleted file mode 100644 index f0ec561ad8..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/Alerts.xsd +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/AlertsSources.wsdl b/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/AlertsSources.wsdl deleted file mode 100644 index d5642a32d1..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/AlertsSources.wsdl +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/alerts-client.composite b/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/alerts-client.composite deleted file mode 100644 index 49f44f9da8..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/alerts-client.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/alerts.composite b/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/alerts.composite deleted file mode 100644 index c359b275be..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/alerts.composite +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/sources.xml b/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/sources.xml deleted file mode 100644 index e45250eddb..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/resources/sources.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - BBC News - http://news.bbc.co.uk/ - 2008-06-20 12:00:00 - http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/world/rss.xml - - - Engadget - http://www.engadget.com - 2008-06-20 12:00:00 - http://www.engadget.com/rss.xml - - diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/AlertAggregator.html b/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/AlertAggregator.html deleted file mode 100644 index 8b472fd0fa..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/AlertAggregator.html +++ /dev/null @@ -1,330 +0,0 @@ - - - -Apache Tuscany Alert Aggregator Sample - - - - - - - - - - - - - - - -

Apache Tuscany Alert Aggregator Demo

-
-

Alert Sources:

- -
Refreshing...
-

-

-

Refreshing...
-

Back to top

-
-

-

- - - diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index 0bc67c4c98..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/geronimo-web.xml b/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/geronimo-web.xml deleted file mode 100644 index 0e7125fe66..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/geronimo-web.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - org.apache.tuscany.sca - demo-alert-aggregator-webapp - 1.4-SNAPSHOT - war - - - - - diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index a81165e1b4..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - Apache Tuscany Alert Aggregator Demo - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - AlertAggregator.html - - - diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/pop.png b/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/pop.png deleted file mode 100644 index 1cf1df24a7..0000000000 Binary files a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/pop.png and /dev/null differ diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/rss.png b/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/rss.png deleted file mode 100644 index b3c949d224..0000000000 Binary files a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/rss.png and /dev/null differ diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/service.smd b/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/service.smd deleted file mode 100644 index 3c6b6c9b12..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/service.smd +++ /dev/null @@ -1 +0,0 @@ -{"SMDVersion":".1","objectName":"AlertsService","serviceType":"JSON-RPC","serviceURL":"http://localhost:8085/sample-feed-aggregator/services/AlertsServiceJSONRPC","methods":[{"name":"getAllNewAlerts","parameters":[{"name":"param0","type":"STRING"}]}]} diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/sources.smd b/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/sources.smd deleted file mode 100644 index b5f1824363..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/sources.smd +++ /dev/null @@ -1 +0,0 @@ -{"SMDVersion":".1","objectName":"AlertsSourcesService","serviceType":"JSON-RPC","serviceURL":"http://localhost:8081/sample-feed-aggregator/services/AlertsSourcesServiceJSONRPC","methods":[{"name":"getAlertSources","parameters":[{"name":"param0","type":"STRING"}]},{"name":"getAlertSource","parameters":[{"name":"param0","type":"STRING"}]},{"name":"updateAlertSource","parameters":[{"name":"param0","type":"STRING"}]},{"name":"addAlertSource","parameters":[{"name":"param0","type":"STRING"}]},{"name":"removeAlertSource","parameters":[{"name":"param0","type":"STRING"}]}]} diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/style.css b/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/style.css deleted file mode 100644 index f5bbf23379..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/main/webapp/style.css +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -p,table,li,h1,h2,h3 -{ -font-family: verdana, arial, 'sans serif'; -} - -p, h1, h2, h3, table, li, hr -{ -margin-left: 10pt; -} - -table -{ -border-color: black; -border-collapse: separate; -border-spacing: 0px 1px; - -margin-right: 10pt; -margin-left: 10pt; -width: 800px; -} - -.sourceDetailsTable -{ -width: 600px; -} - -tr, td -{ -margin-left: 0pt; -margin-right: 0pt; -padding-left: 10pt; -font-size: 90%; -} - -p,li,th -{ -font-size: 90%; -margin-left: 10pt; -} - -pre -{ -margin-left: 10pt; -} - -body -{ -#ffffff; -} - -h1,h2,h3,hr -{ -color: firebrick; -} - -a:link {COLOR: firebrick;} -a:visited {COLOR: firebrick;} -a:active {COLOR: navy;} - -.link -{ -COLOR: firebrick; -text-decoration: underline; -} - -.clickable -{ -cursor: pointer -} - -.unread_title -{ -font-weight: bold; -} - -.read_title -{ -font-weight: normal; -} - -.summary -{ -color: DimGrey; -} - -.hidden -{ -display: none; -} - -.source_name -{ -width: 600px; -} - -.alert_text -{ -width: 600px; -} - -.alert_data -{ -margin-left: 10px; -width: 800px; -height: 800px; -} - -.source_0 -{ -background-color: LightGreen; -} - -.source_1 -{ -background-color: LightSkyBlue; -} - -.source_2 -{ -background-color: Khaki; -} - -.source_3 -{ -background-color: LightPink; -} - -.source_4 -{ -background-color: Orange; -} - -.source_5 -{ -background-color: LightCoral; -} - -.source_6 -{ -background-color: Orchid; -} - -.source_7 -{ -background-color: Peru; -} - -.source_8 -{ -background-color: SpringGreen; -} - -.source_9 -{ -background-color: LightGrey; -} - diff --git a/branches/sca-android/demos/alert-aggregator-webapp/src/test/java/org/apache/tuscany/sca/demos/aggregator/AlertsIntegrationTest.java b/branches/sca-android/demos/alert-aggregator-webapp/src/test/java/org/apache/tuscany/sca/demos/aggregator/AlertsIntegrationTest.java deleted file mode 100644 index f0cb9ecfcb..0000000000 --- a/branches/sca-android/demos/alert-aggregator-webapp/src/test/java/org/apache/tuscany/sca/demos/aggregator/AlertsIntegrationTest.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.demos.aggregator; - -import java.io.ByteArrayInputStream; - -import junit.framework.Assert; - -import org.json.JSONObject; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.meterware.httpunit.PostMethodWebRequest; -import com.meterware.httpunit.WebConversation; -import com.meterware.httpunit.WebRequest; -import com.meterware.httpunit.WebResponse; - - -/** - */ -public class AlertsIntegrationTest { - //private static SCADomain scaDomain; - - @BeforeClass - public static void setUp() throws Exception { - //scaDomain = SCADomain.newInstance("alerts.composite"); - } - - /** - * Runs after each test method - */ - @AfterClass - public static void tearDown() { - //scaDomain.close(); - } - -/* Use this if you want to test locally without deploying to a web container - public void testWait() throws Exception { - System.out.println("Feed aggregator server started (press enter to shutdown)"); - System.in.read(); - System.out.println("Feed aggregator server stopped"); - } -*/ - - @Test - public void testGetAllNewAlerts() throws Exception { - JSONObject jsonRequest = new JSONObject("{\"params\":[\"sometext\"],\"method\":\"getAllNewAlerts\",\"id\":2}"); - JSONObject jsonResp = callService ("http://localhost:8085/demo-alert-aggregator-webapp/AlertsServiceJSONRPC", - jsonRequest); - Assert.assertNotNull(jsonResp); - } - - @Test - public void testAddAlertSources() throws Exception { - JSONObject jsonRequest = new JSONObject("{\"params\":[{\"name\":\"news\",\"id\":\"2\",\"address\":\"www.news.com\",\"feedAddress\":\"http://news.com.com/2547-1_3-0-20.xml\",\"feedType\":\"rss\",\"lastChecked\":\"lastChecked\",\"javaClass\":\"org.apache.tuscany.sca.demos.aggregator.types.impl.SourceTypeImpl\"}],\"method\":\"addAlertSource\",\"id\":2}"); - JSONObject jsonResp = callService ("http://localhost:8085/demo-alert-aggregator-webapp/AlertsSourcesServiceJSONRPC", - jsonRequest); - Assert.assertNotNull(jsonResp); - } - - @Test - public void testGetAlertSources() throws Exception { - JSONObject jsonRequest = new JSONObject("{\"params\":[\"sometext\"],\"method\":\"getAlertSources\",\"id\":2}"); - JSONObject jsonResp = callService ("http://localhost:8085/demo-alert-aggregator-webapp/AlertsSourcesServiceJSONRPC", - jsonRequest); - Assert.assertEquals("BBC News", jsonResp.getJSONObject("result").getJSONObject("source").optJSONArray("list").getJSONObject(0).getString("name")); - } - - public JSONObject callService(String url, JSONObject jsonRequest) throws Exception { - System.out.println("Request = " + jsonRequest.toString()); - WebConversation wc = new WebConversation(); - WebRequest request = new PostMethodWebRequest( url, - new ByteArrayInputStream(jsonRequest.toString().getBytes("UTF-8")),"application/json"); - WebResponse response = wc.getResource(request); - System.out.println("Response= " + response.getText()); - Assert.assertEquals(200, response.getResponseCode()); - return new JSONObject(response.getText()); - } -} diff --git a/branches/sca-android/demos/bigbank-account/LICENSE b/branches/sca-android/demos/bigbank-account/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-android/demos/bigbank-account/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/demos/bigbank-account/NOTICE b/branches/sca-android/demos/bigbank-account/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-android/demos/bigbank-account/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/demos/bigbank-account/README b/branches/sca-android/demos/bigbank-account/README deleted file mode 100644 index 5c0d850c5e..0000000000 --- a/branches/sca-android/demos/bigbank-account/README +++ /dev/null @@ -1,4 +0,0 @@ -bigbank-account is part of a larger demo called bigbank. -Please see the Readme file under bigbank to understand how bigbank-account fits into the overall demo. - - diff --git a/branches/sca-android/demos/bigbank-account/bigbank.png b/branches/sca-android/demos/bigbank-account/bigbank.png deleted file mode 100644 index 985cc6bd05..0000000000 Binary files a/branches/sca-android/demos/bigbank-account/bigbank.png and /dev/null differ diff --git a/branches/sca-android/demos/bigbank-account/bigbank.svg b/branches/sca-android/demos/bigbank-account/bigbank.svg deleted file mode 100644 index 0650075d48..0000000000 --- a/branches/sca-android/demos/bigbank-account/bigbank.svg +++ /dev/null @@ -1,537 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - CompositeBigBank WebApp - - Component AccountJava - - - - Component AccountDataJava - binding.jsonrpc - binding.ws - binding.rmi - - - - CompositeStockQuote - - CompositeCalculator - - Component CalculatorJava - - - - Component AddJavascript - binding.rmi - - - Component SubtractRuby - - Component MultiplyPython - - Component DivideGroovy - - - - Component StockQuoteJava - - binding.ws - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/bigbank-account/build-dojo.xml b/branches/sca-android/demos/bigbank-account/build-dojo.xml deleted file mode 100644 index 0e029c6335..0000000000 --- a/branches/sca-android/demos/bigbank-account/build-dojo.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/bigbank-account/build.xml b/branches/sca-android/demos/bigbank-account/build.xml deleted file mode 100644 index f7ebe32968..0000000000 --- a/branches/sca-android/demos/bigbank-account/build.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/bigbank-account/pom.xml b/branches/sca-android/demos/bigbank-account/pom.xml deleted file mode 100644 index 4456fac88b..0000000000 --- a/branches/sca-android/demos/bigbank-account/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-demos - 1.4-SNAPSHOT - ../pom.xml - - demo-bigbank-account - jar - Apache Tuscany SCA BigBank Account Demo - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-core-spi - 1.4-SNAPSHOT - - - - - org.apache.ws.security - wss4j - 1.5.3 - - - - - demo-bigbank-account - - - org.apache.maven.plugins - maven-antrun-plugin - - - - ant - ant-trax - 1.6.5 - - - - - - diff --git a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountDetails.java b/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountDetails.java deleted file mode 100644 index 57c1adcba0..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountDetails.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.checking; - -/** - * @version $$Rev$$ $$Date: 2007-04-09 12:03:34 -0700 (Mon, 09 Apr - * 2007) $$ - */ - -public class CheckingAccountDetails { - private String accountNumber; - private double balance; - - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String n) { - this.accountNumber = n; - } - - public double getBalance() { - return balance; - } - - public void setBalance(double b) { - this.balance = b; - } - - @Override - public String toString() { - return accountNumber + ", balance:" + balance; - } -} diff --git a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountService.java b/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountService.java deleted file mode 100644 index bf919525c4..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountService.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.checking; - -import org.osoa.sca.annotations.Remotable; -import org.osoa.sca.annotations.Service; - -/** - * @version $$Rev$$ $$Date$$ - */ -@Service -@Remotable -public interface CheckingAccountService { - - public CheckingAccountDetails getAccountDetails(String customerID); - - public double deposit(String accountNo, double depositAmt); - - public double withdraw(String accountNo, double withdrawalAmount); - -} diff --git a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountServiceImpl.java b/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountServiceImpl.java deleted file mode 100644 index 0ed4b1dd2e..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/checking/CheckingAccountServiceImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.checking; - -import java.util.HashMap; -import java.util.Map; - -import org.osoa.sca.annotations.Service; - -/** - * - * */ - -@Service(CheckingAccountService.class) -public class CheckingAccountServiceImpl implements CheckingAccountService { - private Map custAcctMap = new HashMap(); - private Map checkingAccts = new HashMap(); - - public CheckingAccountServiceImpl() { - custAcctMap.put("Customer_01", "CHA_Customer_01"); - custAcctMap.put("Customer_02", "CHA_Customer_02"); - custAcctMap.put("Customer_03", "CHA_Customer_03"); - - checkingAccts.put("CHA_Customer_01", new Double(1000)); - checkingAccts.put("CHA_Customer_02", new Double(1500)); - checkingAccts.put("CHA_Customer_03", new Double(2000)); - } - - public double deposit(String accountNo, double depositAmt) { - checkingAccts.put(accountNo, new Double(checkingAccts.get(accountNo).doubleValue() + depositAmt)); - return checkingAccts.get(accountNo).doubleValue(); - } - - public CheckingAccountDetails getAccountDetails(String customerID) { - CheckingAccountDetails checkingAccount = new CheckingAccountDetails(); - checkingAccount.setAccountNumber(custAcctMap.get(customerID)); - checkingAccount.setBalance(checkingAccts.get(checkingAccount.getAccountNumber()).doubleValue()); - - return checkingAccount; - } - - public double withdraw(String accountNo, double withdrawalAmount) { - double balance = checkingAccts.get(accountNo).doubleValue(); - if ( balance - withdrawalAmount > 0 ) { - balance = balance - withdrawalAmount; - checkingAccts.put(accountNo, balance); - } - return balance; - } -} diff --git a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountDetails.java b/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountDetails.java deleted file mode 100644 index cc9023da60..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountDetails.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.savings; - -import java.io.Serializable; - -/** - * @version $$Rev$$ $$Date: 2007-04-09 12:03:34 -0700 (Mon, 09 Apr - * 2007) $$ - */ - -public class SavingsAccountDetails implements Serializable { - private String accountNumber; - private double balance; - - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String n) { - this.accountNumber = n; - } - - public double getBalance() { - return balance; - } - - public void setBalance(double b) { - this.balance = b; - } - - @Override - public String toString() { - return accountNumber + ", balance:" + balance; - } -} diff --git a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountService.java b/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountService.java deleted file mode 100644 index 5bf6e6d26b..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.savings; - -import org.osoa.sca.annotations.Remotable; - -/** - * @version $$Rev$$ $$Date$$ - */ -@Remotable -public interface SavingsAccountService { - - public SavingsAccountDetails getAccountDetails(String customerID); - - public double deposit(String accountNo, double depositAmt); - - public double withdraw(String accountNo, double withdrawalAmount); - -} diff --git a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountServiceImpl.java b/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountServiceImpl.java deleted file mode 100644 index 1f4f02ea6d..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/savings/SavingsAccountServiceImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.savings; - -import java.util.HashMap; -import java.util.Map; - -import org.osoa.sca.annotations.Service; - -/** - * - * */ - -@Service(SavingsAccountService.class) -public class SavingsAccountServiceImpl implements SavingsAccountService { - private Map custAcctMap = new HashMap(); - private Map savingsAccts = new HashMap(); - - public SavingsAccountServiceImpl() { - custAcctMap.put("Customer_01", "SVA_Customer_01"); - custAcctMap.put("Customer_02", "SVA_Customer_02"); - custAcctMap.put("Customer_03", "SVA_Customer_03"); - - savingsAccts.put("SVA_Customer_01", new Double(1000)); - savingsAccts.put("SVA_Customer_02", new Double(1500)); - savingsAccts.put("SVA_Customer_03", new Double(2000)); - } - - public double deposit(String accountNo, double depositAmt) { - savingsAccts.put(accountNo, new Double(savingsAccts.get(accountNo).doubleValue() + depositAmt)); - return savingsAccts.get(accountNo).doubleValue(); - } - - public SavingsAccountDetails getAccountDetails(String customerID) { - SavingsAccountDetails savingsAccount = new SavingsAccountDetails(); - savingsAccount.setAccountNumber(custAcctMap.get(customerID)); - savingsAccount.setBalance(savingsAccts.get(savingsAccount.getAccountNumber()).doubleValue()); - - return savingsAccount; - } - - public double withdraw(String accountNo, double withdrawalAmount) { - double balance = savingsAccts.get(accountNo).doubleValue(); - if ( balance - withdrawalAmount > 0 ) { - balance = balance - withdrawalAmount; - savingsAccts.put(accountNo, balance); - } - return balance; - } -} diff --git a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/AccountsDataPasswordCallbackHandler.java b/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/AccountsDataPasswordCallbackHandler.java deleted file mode 100644 index 579b4ee64b..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/AccountsDataPasswordCallbackHandler.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.security; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.apache.ws.security.WSPasswordCallback; - -/** - * Sample userid passwd generation class - */ -public class AccountsDataPasswordCallbackHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, - UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i]; - if ( pwcb.getUsage() == WSPasswordCallback.SIGNATURE ) { - System.out.println(" Usage is SIGNATURE ... "); - pwcb.setPassword("bbservice"); - } else if ( pwcb.getUsage() == WSPasswordCallback.USERNAME_TOKEN_UNKNOWN ) { - System.out.println("*** Calling ACCOUNTS-DATA Passwd Handler for AUTHENTICATING userID = " - + pwcb.getIdentifer() + " and password = " + pwcb.getPassword() ); - if ( pwcb.getIdentifer().equals("bbaservice") && pwcb.getPassword().equals("bbaservice")) { - System.out.println("AUTHENTICATION SUCCESSFUL!"); - } else { - System.out.println("AUTHENTICATION FAILED!"); - throw new UnsupportedCallbackException(pwcb, "UserId - Password Authentication Failed!"); - } - } - } - } - -} diff --git a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/BigbankCheckingsAcl.java b/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/BigbankCheckingsAcl.java deleted file mode 100644 index 5c64e11d10..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/BigbankCheckingsAcl.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.account.security; - -import java.security.Principal; -import java.util.Hashtable; -import java.util.Map; - -/** - * @version $Rev$ $Date$ - */ -public class BigbankCheckingsAcl { - private static MapcheckingsAcl = new Hashtable(); - - static { - checkingsAcl.put("bbaservice", "Customer_01"); - checkingsAcl.put("bbUser01", "Customer_01"); - } - - - public static void authorize(Principal principal, String resource) { - if ( checkingsAcl.get(principal.getName()) == null || - !checkingsAcl.get(principal.getName()).equals(resource) ) { - throw new RuntimeException("User - " + principal.getName() + " not authorized to access account " + - resource); - } else { - System.out.println("Successfully Authorized '" + principal.getName() + " to access accounts of " + resource); - } - } - -} diff --git a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthImplementationPolicyProvider.java b/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthImplementationPolicyProvider.java deleted file mode 100644 index c98dcacbf3..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthImplementationPolicyProvider.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.account.security; - -import org.apache.tuscany.sca.assembly.ConfiguredOperation; -import org.apache.tuscany.sca.assembly.Implementation; -import org.apache.tuscany.sca.assembly.OperationsConfigurator; -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Interceptor; -import org.apache.tuscany.sca.invocation.Phase; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.provider.PolicyProvider; -import org.apache.tuscany.sca.runtime.RuntimeComponent; - -/** - * @version $Rev$ $Date$ - */ -public class CheckingsDeptAuthImplementationPolicyProvider implements PolicyProvider { - private RuntimeComponent component; - private Implementation implementation; - - public CheckingsDeptAuthImplementationPolicyProvider(RuntimeComponent component, Implementation implementation) { - super(); - this.component = component; - this.implementation = implementation; - } - - private String getContext() { - return "component.implementation: " + component.getURI() + "(" + implementation.getClass().getName() + ")"; - } - - private PolicySet findPolicySet(Operation operation) { - for (PolicySet ps : component.getPolicySets()) { - for (Object p : ps.getPolicies()) { - if (CheckingsDeptAuthPolicy.class.isInstance(p)) { - return ps; - } - } - } - - if ( component instanceof OperationsConfigurator ) { - for ( ConfiguredOperation confOp : ((OperationsConfigurator)component).getConfiguredOperations() ) { - if ( confOp.getName().equals(operation.getName())) { - for (PolicySet ps : confOp.getPolicySets()) { - for (Object p : ps.getPolicies()) { - if (CheckingsDeptAuthPolicy.class.isInstance(p)) { - return ps; - } - } - } - } - } - } - - return null; - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProvider#createInterceptor(org.apache.tuscany.sca.interfacedef.Operation) - */ - public Interceptor createInterceptor(Operation operation) { - PolicySet ps = findPolicySet(operation); - return ps == null ? null : new CheckingsDeptAuthPolicyInterceptor(getContext(), operation, ps); - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProvider#getPhase() - */ - public String getPhase() { - return Phase.IMPLEMENTATION_POLICY; - } - -} diff --git a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicy.java b/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicy.java deleted file mode 100644 index 121ee9a3f8..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicy.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.account.security; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.policy.Policy; - -/** - * @version $Rev$ $Date$ - */ -public class CheckingsDeptAuthPolicy implements Policy { - - public QName getSchemaName() { - // TODO Auto-generated method stub - return null; - } - - public boolean isUnresolved() { - // TODO Auto-generated method stub - return false; - } - - public void setUnresolved(boolean unresolved) { - // TODO Auto-generated method stub - - } - -} diff --git a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyInterceptor.java b/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyInterceptor.java deleted file mode 100644 index c8b73d4ed4..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyInterceptor.java +++ /dev/null @@ -1,77 +0,0 @@ -package bigbank.account.security; - -import java.security.Principal; -import java.util.logging.ConsoleHandler; -import java.util.logging.Handler; -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Interceptor; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.invocation.Message; -import org.apache.tuscany.sca.policy.PolicySet; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * Policy handler to handle PolicySet related to Logging with the QName - * {http://tuscany.apache.org/xmlns/sca/1.0/impl/java}LoggingPolicy - */ -public class CheckingsDeptAuthPolicyInterceptor implements Interceptor { - private Invoker next; - - public CheckingsDeptAuthPolicyInterceptor(String context, Operation operation, PolicySet policySet) { - super(); - init(); - } - - private final void init() { - } - - public Message invoke(Message msg) { - Object msgBody = msg.getBody(); - if (msgBody instanceof Object[]) { - Object args[] = (Object[])msg.getBody(); - if ( msg.getQoSContext().get(Message.QOS_CTX_SECURITY_PRINCIPAL) != null ) { - BigbankCheckingsAcl.authorize((Principal)msg.getQoSContext().get(Message.QOS_CTX_SECURITY_PRINCIPAL), - (String)args[0]); - } - } - - Message responseMsg = null; - try { - responseMsg = getNext().invoke(msg); - return responseMsg; - } catch (RuntimeException e) { - throw e; - } - } - - public Invoker getNext() { - return next; - } - - public void setNext(Invoker next) { - this.next = next; - } -} diff --git a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyProviderFactory.java b/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyProviderFactory.java deleted file mode 100644 index 5fecef691e..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyProviderFactory.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.account.security; - -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Implementation; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.provider.PolicyProvider; -import org.apache.tuscany.sca.provider.PolicyProviderFactory; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentReference; -import org.apache.tuscany.sca.runtime.RuntimeComponentService; - -/** - * @version $Rev$ $Date$ - */ -public class CheckingsDeptAuthPolicyProviderFactory implements PolicyProviderFactory { - private ExtensionPointRegistry registry; - - public CheckingsDeptAuthPolicyProviderFactory(ExtensionPointRegistry registry) { - super(); - this.registry = registry; - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createImplementationPolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.assembly.Implementation) - */ - public PolicyProvider createImplementationPolicyProvider(RuntimeComponent component, Implementation implementation) { - return new CheckingsDeptAuthImplementationPolicyProvider(component, implementation); - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createReferencePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference, org.apache.tuscany.sca.assembly.Binding) - */ - public PolicyProvider createReferencePolicyProvider(RuntimeComponent component, - RuntimeComponentReference reference, - Binding binding) { - return null; - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createServicePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService, org.apache.tuscany.sca.assembly.Binding) - */ - public PolicyProvider createServicePolicyProvider(RuntimeComponent component, - RuntimeComponentService service, - Binding binding) { - return null; - } - - /** - * @see org.apache.tuscany.sca.provider.ProviderFactory#getModelType() - */ - public Class getModelType() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyHandler.java b/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyHandler.java deleted file mode 100644 index 419b5def58..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyHandler.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.account.security; - -import java.security.Principal; - -import org.apache.tuscany.sca.invocation.Message; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.policy.util.PolicyHandler; - -/** - * @version $Rev$ $Date$ - */ -public class CheckingsDeptAuthorizationPolicyHandler implements PolicyHandler { - private PolicySet applicablePolicySet = null; - - public void afterInvoke(Object... context) { - } - - public void beforeInvoke(Object... context) { - for ( int count = 0 ; count < context.length ; ++count ) { - if ( context[count] instanceof Message ) { - Message msg = (Message)context[count]; - Object args[] = (Object[])msg.getBody(); - if ( msg.getQoSContext().get(Message.QOS_CTX_SECURITY_PRINCIPAL) != null ) { - BigbankCheckingsAcl.authorize((Principal)msg.getQoSContext().get(Message.QOS_CTX_SECURITY_PRINCIPAL), - (String)args[0]); - } - } - } - } - - public void cleanUp(Object... arg0) { - } - - public PolicySet getApplicablePolicySet() { - return this.applicablePolicySet; - } - - public void setApplicablePolicySet(PolicySet policySet) { - this.applicablePolicySet = policySet; - } - - public void setUp(Object... arg0) { - - } - -} diff --git a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyProcessor.java b/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyProcessor.java deleted file mode 100644 index da1b6e1d06..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyProcessor.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.security; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.stream.XMLStreamWriter; - -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.contribution.service.ContributionReadException; -import org.apache.tuscany.sca.contribution.service.ContributionResolveException; -import org.apache.tuscany.sca.contribution.service.ContributionWriteException; - -/** - * Implementation of a Policy Processor - * - */ -public class CheckingsDeptAuthorizationPolicyProcessor implements StAXArtifactProcessor { - private static final QName CHECKINGS_DEPT_AUTHORIZATION_POLICY_QNAME = new QName("http://bigbank/checkings", "AuthPolicy"); - public QName getArtifactType() { - return CHECKINGS_DEPT_AUTHORIZATION_POLICY_QNAME; - } - - public CheckingsDeptAuthorizationPolicyProcessor(ModelFactoryExtensionPoint modelFactories) { - } - - - public CheckingsDeptAuthPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException { - CheckingsDeptAuthPolicy policy = new CheckingsDeptAuthPolicy(); - return policy; - } - - public void write(CheckingsDeptAuthPolicy policy, XMLStreamWriter writer) throws ContributionWriteException, - XMLStreamException { - String prefix = "tuscany"; - writer.writeStartElement(prefix, - CHECKINGS_DEPT_AUTHORIZATION_POLICY_QNAME.getLocalPart(), - CHECKINGS_DEPT_AUTHORIZATION_POLICY_QNAME.getNamespaceURI()); - writer.writeNamespace("chk", "http://bigbank/checkings"); - - - writer.writeEndElement(); - } - - public Class getModelType() { - return CheckingsDeptAuthPolicy.class; - } - - public void resolve(CheckingsDeptAuthPolicy arg0, ModelResolver arg1) throws ContributionResolveException { - - } - -} diff --git a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountDetails.java b/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountDetails.java deleted file mode 100644 index 1473436000..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountDetails.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.stock; - -/** - * @version $$Rev$$ $$Date: 2007-04-09 12:03:34 -0700 (Mon, 09 Apr - * 2007) $$ - */ - -public class StockAccountDetails { - private String accountNumber; - private String symbol; - private int quantity; - - public StockAccountDetails() { - } - - public StockAccountDetails(String acNo, String symbol, int qty) { - this.accountNumber = acNo; - this.symbol = symbol; - this.quantity = qty; - } - - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String n) { - this.accountNumber = n; - } - - public int getQuantity() { - return quantity; - } - - public void setQuantity(int a) { - this.quantity = a; - } - - public String getSymbol() { - return symbol; - } - - public void setSymbol(String s) { - this.symbol = s; - } - - @Override - public String toString() { - return accountNumber + ", symbol:" + symbol + ", quantity:" + quantity; - } -} diff --git a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountService.java b/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountService.java deleted file mode 100644 index fcbf8a4831..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountService.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.stock; - -import org.osoa.sca.annotations.Remotable; - -/** - * - */ -@Remotable -public interface StockAccountService { - - public StockAccountDetails getAccountDetails(String customerID); - - public StockAccountDetails buy(String accountNo, String symbol, int quantity); - - public StockAccountDetails sell(String accountNo, String symbol, int quantity); - - -} diff --git a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountServiceImpl.java b/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountServiceImpl.java deleted file mode 100644 index 28101a1986..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/java/bigbank/account/stock/StockAccountServiceImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.stock; - -import java.util.HashMap; -import java.util.Map; - -import org.osoa.sca.annotations.Service; - -/** - * - * */ - -@Service(StockAccountService.class) -public class StockAccountServiceImpl implements StockAccountService { - private Map custAcctMap = new HashMap(); - private Map stockAccts = new HashMap(); - - public StockAccountServiceImpl() { - custAcctMap.put("Customer_01", "STA_Customer_01"); - custAcctMap.put("Customer_02", "STA_Customer_02"); - custAcctMap.put("Customer_03", "STA_Customer_03"); - - stockAccts.put("STA_Customer_01", new StockAccountDetails("STA_Customer_01", "IBM", 100)); - stockAccts.put("STA_Customer_02", new StockAccountDetails("STA_Customer_02", "IBM", 200)); - stockAccts.put("STA_Customer_03", new StockAccountDetails("STA_Customer_03", "SYM_3", 125)); - } - - - public StockAccountDetails buy(String accountNo, String symbol, int quantity) { - return null; - } - - public StockAccountDetails getAccountDetails(String customerID) { - return stockAccts.get(custAcctMap.get(customerID)); - } - - public StockAccountDetails sell(String accountNo, String symbol, int quantity) { - return null; - } - - - -} diff --git a/branches/sca-android/demos/bigbank-account/src/main/resources/CheckingsAccount.composite b/branches/sca-android/demos/bigbank-account/src/main/resources/CheckingsAccount.composite deleted file mode 100644 index cc76e30a75..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/resources/CheckingsAccount.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/bigbank-account/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-android/demos/bigbank-account/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index c5532b879d..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-android/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor deleted file mode 100644 index 6491a0d326..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Implementation class for the artifact processor extension -bigbank.account.security.CheckingsDeptAuthorizationPolicyProcessor;qname=http://bigbank/checkings#AuthPolicy,model=bigbank.account.security.CheckingsDeptAuthPolicy diff --git a/branches/sca-android/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler b/branches/sca-android/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler deleted file mode 100644 index b1bce4339d..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler +++ /dev/null @@ -1,20 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# PolicyHandlerClasses to interpret specific PolicyModels against specific QoS infrastructures -# handler classname;qname=;model= -bigbank.account.security.CheckingsDeptAuthorizationPolicyHandler;intent=http://bigbankAccount#authorization,model=bigbank.account.security.CheckingsDeptAuthPolicy diff --git a/branches/sca-android/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory b/branches/sca-android/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory deleted file mode 100644 index d6bfe2167e..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Implementation class for the policy extension -bigbank.account.security.CheckingsDeptAuthPolicyProviderFactory;model=bigbank.account.security.CheckingsDeptAuthPolicy \ No newline at end of file diff --git a/branches/sca-android/demos/bigbank-account/src/main/resources/SavingsAccount.composite b/branches/sca-android/demos/bigbank-account/src/main/resources/SavingsAccount.composite deleted file mode 100644 index 696b96d6e6..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/resources/SavingsAccount.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/bigbank-account/src/main/resources/StockAccount.composite b/branches/sca-android/demos/bigbank-account/src/main/resources/StockAccount.composite deleted file mode 100644 index 62c0b63003..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/resources/StockAccount.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/bigbank-account/src/main/resources/definitions.xml b/branches/sca-android/demos/bigbank-account/src/main/resources/definitions.xml deleted file mode 100644 index 31a8798f8b..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/resources/definitions.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - Authorization Intent - - - - - - - - - UsernameToken - bigbank.account.security.AccountsDataPasswordCallbackHandler - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/demos/bigbank-account/src/main/resources/web/AccountJSON.html b/branches/sca-android/demos/bigbank-account/src/main/resources/web/AccountJSON.html deleted file mode 100644 index 1609bf4b43..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/resources/web/AccountJSON.html +++ /dev/null @@ -1,92 +0,0 @@ - - - -Tuscany JSON-RPC BigBank Client - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Tuscany JSON-RPC BigBank Client
-

This example uses the Dojo - Toolkit to create a JavaScript object accountService for - the service at http://localhost:8080/AccountJSONService using Dojo's - RPC classes and providing them with http://localhost:8080/AccountJSONService?smd - for Simple Method Description - (SMD) input.

-

It then creates a Dojo button that will envoke the getAccountReport - method of the accountService object.

-
RequestResponse

- -
-
-
None Yet.
-
-
Dojo Debug:
-
- - - - - diff --git a/branches/sca-android/demos/bigbank-account/src/main/resources/web/style.css b/branches/sca-android/demos/bigbank-account/src/main/resources/web/style.css deleted file mode 100644 index 1071583264..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/resources/web/style.css +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -* { font-family: arial; } - -table, th, td { border: 2px solid blue; border-collapse: collapse; } -th { color: white; background-color: blue; } diff --git a/branches/sca-android/demos/bigbank-account/src/main/resources/wsdl/AccountService.wsdl b/branches/sca-android/demos/bigbank-account/src/main/resources/wsdl/AccountService.wsdl deleted file mode 100644 index ac4d987a57..0000000000 --- a/branches/sca-android/demos/bigbank-account/src/main/resources/wsdl/AccountService.wsdl +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/bigbank-calculator/LICENSE b/branches/sca-android/demos/bigbank-calculator/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-android/demos/bigbank-calculator/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/demos/bigbank-calculator/NOTICE b/branches/sca-android/demos/bigbank-calculator/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-android/demos/bigbank-calculator/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/demos/bigbank-calculator/README b/branches/sca-android/demos/bigbank-calculator/README deleted file mode 100644 index e8ff28fc0f..0000000000 --- a/branches/sca-android/demos/bigbank-calculator/README +++ /dev/null @@ -1,2 +0,0 @@ -bigbank-calculator is part of a larger demo called bigbank. -Please see the Readme file under bigbank to understand how bigbank-calculator fits into the overall demo. diff --git a/branches/sca-android/demos/bigbank-calculator/build.xml b/branches/sca-android/demos/bigbank-calculator/build.xml deleted file mode 100644 index a06f0806df..0000000000 --- a/branches/sca-android/demos/bigbank-calculator/build.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/bigbank-calculator/pom.xml b/branches/sca-android/demos/bigbank-calculator/pom.xml deleted file mode 100644 index 64f6a9d0ba..0000000000 --- a/branches/sca-android/demos/bigbank-calculator/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-demos - 1.4-SNAPSHOT - ../pom.xml - - demo-bigbank-calculator - Apache Tuscany SCA BigBank Calculator Demo - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-script - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-rmi - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/AddService.java b/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/AddService.java deleted file mode 100644 index 4eeb30a9c2..0000000000 --- a/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/CalculatorService.java b/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index c89043276e..0000000000 --- a/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index ed7bee0f4e..0000000000 --- a/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * An implementation of the Calculator service. - */ -@Service(CalculatorService.class) -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - System.err.println("Multiply"); - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/DivideService.java b/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/DivideService.java deleted file mode 100644 index 131c5a8014..0000000000 --- a/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/MultiplyService.java b/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index a917896aeb..0000000000 --- a/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/SubtractService.java b/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/SubtractService.java deleted file mode 100644 index e328f024ea..0000000000 --- a/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/demo/CalculatorServer.java b/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/demo/CalculatorServer.java deleted file mode 100644 index b1861daafc..0000000000 --- a/branches/sca-android/demos/bigbank-calculator/src/main/java/calculator/demo/CalculatorServer.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator.demo; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * @version $Rev$ $Date$ - */ -public class CalculatorServer { - - public static void main(String[] args) throws Exception { - - System.out.println("Starting the Sample SCA Calculator..."); - - SCADomain domain = SCADomain.newInstance("Calculator.composite"); - - System.out.println("Press Enter to Exit..."); - System.in.read(); - - domain.close(); - - System.out.println("Bye"); - System.exit(0); - } - -} diff --git a/branches/sca-android/demos/bigbank-calculator/src/main/resources/Calculator.composite b/branches/sca-android/demos/bigbank-calculator/src/main/resources/Calculator.composite deleted file mode 100644 index 851813d31f..0000000000 --- a/branches/sca-android/demos/bigbank-calculator/src/main/resources/Calculator.composite +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/bigbank-calculator/src/main/resources/calculator/AddServiceImpl.js b/branches/sca-android/demos/bigbank-calculator/src/main/resources/calculator/AddServiceImpl.js deleted file mode 100644 index 1d4d221364..0000000000 --- a/branches/sca-android/demos/bigbank-calculator/src/main/resources/calculator/AddServiceImpl.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -function add(n1, n2) { - return n1 + n2; -} \ No newline at end of file diff --git a/branches/sca-android/demos/bigbank-calculator/src/main/resources/calculator/DivideServiceImpl.groovy b/branches/sca-android/demos/bigbank-calculator/src/main/resources/calculator/DivideServiceImpl.groovy deleted file mode 100644 index c31c1e8fd6..0000000000 --- a/branches/sca-android/demos/bigbank-calculator/src/main/resources/calculator/DivideServiceImpl.groovy +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -def divide(n1, n2) { - return n1 / n2 -} \ No newline at end of file diff --git a/branches/sca-android/demos/bigbank-calculator/src/main/resources/calculator/MultiplyServiceImpl.py b/branches/sca-android/demos/bigbank-calculator/src/main/resources/calculator/MultiplyServiceImpl.py deleted file mode 100644 index dd56af0ad8..0000000000 --- a/branches/sca-android/demos/bigbank-calculator/src/main/resources/calculator/MultiplyServiceImpl.py +++ /dev/null @@ -1,21 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -def multiply(n1, n2): - print "Python Calculator component: multiply(", n1, ",", n2, ")" - return n1 * n2 \ No newline at end of file diff --git a/branches/sca-android/demos/bigbank-calculator/src/main/resources/calculator/SubtractServiceImpl.rb b/branches/sca-android/demos/bigbank-calculator/src/main/resources/calculator/SubtractServiceImpl.rb deleted file mode 100644 index 08fa310f46..0000000000 --- a/branches/sca-android/demos/bigbank-calculator/src/main/resources/calculator/SubtractServiceImpl.rb +++ /dev/null @@ -1,22 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -def subtract(n1, n2) - print "Ruby Calculator subtract(", n1, ",", n2, ")\n" - return n1 - n2 -end \ No newline at end of file diff --git a/branches/sca-android/demos/bigbank-stockquote/LICENSE b/branches/sca-android/demos/bigbank-stockquote/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-android/demos/bigbank-stockquote/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/demos/bigbank-stockquote/NOTICE b/branches/sca-android/demos/bigbank-stockquote/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-android/demos/bigbank-stockquote/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/demos/bigbank-stockquote/README b/branches/sca-android/demos/bigbank-stockquote/README deleted file mode 100644 index 2ea98d020c..0000000000 --- a/branches/sca-android/demos/bigbank-stockquote/README +++ /dev/null @@ -1,4 +0,0 @@ -bigbank-stockquote is a part of a larger demo called bigbank. -Please see the Readme file under bigbank to understand how bigbank-stockquote fits into the overall demo. - - diff --git a/branches/sca-android/demos/bigbank-stockquote/build.xml b/branches/sca-android/demos/bigbank-stockquote/build.xml deleted file mode 100644 index 145c158ac2..0000000000 --- a/branches/sca-android/demos/bigbank-stockquote/build.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/bigbank-stockquote/pom.xml b/branches/sca-android/demos/bigbank-stockquote/pom.xml deleted file mode 100644 index c8d0b95257..0000000000 --- a/branches/sca-android/demos/bigbank-stockquote/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-demos - 1.4-SNAPSHOT - ../pom.xml - - demo-bigbank-stockquote - Apache Tuscany SCA BigBank StockQuote Demo - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.ws.security - wss4j - 1.5.3 - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/demos/bigbank-stockquote/src/main/java/stockquote/PasswordCallbackHandler.java b/branches/sca-android/demos/bigbank-stockquote/src/main/java/stockquote/PasswordCallbackHandler.java deleted file mode 100644 index 2d7821171d..0000000000 --- a/branches/sca-android/demos/bigbank-stockquote/src/main/java/stockquote/PasswordCallbackHandler.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package stockquote; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.apache.ws.security.WSPasswordCallback; - -/** - * Sample userid passwd generation class - */ -public class PasswordCallbackHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, - UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - System.out.println("*** Calling Server User/Passwd Handler...." ); - WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i]; - System.out.println("*** Getting password for user ...." + pwcb.getIdentifer() + " & " + pwcb.getKey()); - if ( pwcb.getUsage() == WSPasswordCallback.SIGNATURE ) { - System.out.println(" Usage is SIGNATURE ... "); - pwcb.setPassword("sqservice"); - } - } - } - -} diff --git a/branches/sca-android/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteImpl.java b/branches/sca-android/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteImpl.java deleted file mode 100644 index 2a0801f9b8..0000000000 --- a/branches/sca-android/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package stockquote; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the StockQuote service. - */ -@Service(StockQuoteService.class) -public class StockQuoteImpl implements StockQuoteService { - - public double getQuote(String symbol) { - double price = 104.0 + Math.random(); - price = ((int)(price * 100)) / 100.0; - - System.out.println("Getting stock quote for: " + symbol + ", value: "+ price); - - return price; - } - -} diff --git a/branches/sca-android/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteService.java b/branches/sca-android/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteService.java deleted file mode 100644 index 9d128657eb..0000000000 --- a/branches/sca-android/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteService.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package stockquote; - -import org.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the StockQuote service. - */ -@Remotable -public interface StockQuoteService { - - public double getQuote(String symbol); -} diff --git a/branches/sca-android/demos/bigbank-stockquote/src/main/java/stockquote/demo/StockQuoteServer.java b/branches/sca-android/demos/bigbank-stockquote/src/main/java/stockquote/demo/StockQuoteServer.java deleted file mode 100644 index 04ed762602..0000000000 --- a/branches/sca-android/demos/bigbank-stockquote/src/main/java/stockquote/demo/StockQuoteServer.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package stockquote.demo; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This server program shows how to bootstrap SCA from a simple J2SE program - * and start it which activates the StockQuote Web service endpoint. - */ -public class StockQuoteServer { - - public static void main(String[] args) throws Exception { - - System.out.println("Starting the Sample SCA StockQuote Service..."); - - SCADomain domain = SCADomain.newInstance("StockQuote.composite"); - - System.out.println("Press Enter to Exit..."); - System.in.read(); - - domain.close(); - System.out.println("Bye"); - } - -} diff --git a/branches/sca-android/demos/bigbank-stockquote/src/main/resources/StockQuote.composite b/branches/sca-android/demos/bigbank-stockquote/src/main/resources/StockQuote.composite deleted file mode 100644 index aaad92c861..0000000000 --- a/branches/sca-android/demos/bigbank-stockquote/src/main/resources/StockQuote.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-android/demos/bigbank-stockquote/src/main/resources/definitions.xml b/branches/sca-android/demos/bigbank-stockquote/src/main/resources/definitions.xml deleted file mode 100644 index 7e1f51304e..0000000000 --- a/branches/sca-android/demos/bigbank-stockquote/src/main/resources/definitions.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - Timestamp Signature - security.properties - - - - - Timestamp Signature - sqservice - security.properties - stockquote.PasswordCallbackHandler - DirectReference - - - - - \ No newline at end of file diff --git a/branches/sca-android/demos/bigbank-stockquote/src/main/resources/security.properties b/branches/sca-android/demos/bigbank-stockquote/src/main/resources/security.properties deleted file mode 100644 index 0063207e06..0000000000 --- a/branches/sca-android/demos/bigbank-stockquote/src/main/resources/security.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin -org.apache.ws.security.crypto.merlin.keystore.type=jks -org.apache.ws.security.crypto.merlin.keystore.password=sqkeystore -org.apache.ws.security.crypto.merlin.file=stockQuote.jks \ No newline at end of file diff --git a/branches/sca-android/demos/bigbank-stockquote/src/main/resources/stockQuote.jks b/branches/sca-android/demos/bigbank-stockquote/src/main/resources/stockQuote.jks deleted file mode 100644 index d53d32c4ef..0000000000 Binary files a/branches/sca-android/demos/bigbank-stockquote/src/main/resources/stockQuote.jks and /dev/null differ diff --git a/branches/sca-android/demos/bigbank/LICENSE b/branches/sca-android/demos/bigbank/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-android/demos/bigbank/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/demos/bigbank/NOTICE b/branches/sca-android/demos/bigbank/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-android/demos/bigbank/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/demos/bigbank/README b/branches/sca-android/demos/bigbank/README deleted file mode 100644 index 5ec796db60..0000000000 --- a/branches/sca-android/demos/bigbank/README +++ /dev/null @@ -1,127 +0,0 @@ -BigBank Demo -============ - -This application is made of 3 modules that represent the different aspects -of a fictitious banking application. Please see bigbank.png in the bigbank-account directory for a diagram of this demo. - -To run the bigbank-account demo you need to first run bigbank-calculator and bigbank-stockquote composites. This will bring up Tuscany runtime and load the two applications and make them available as services. Bigbank-account is dependent on these services. - -This demo uses ant. This is just one way of running this demo. - -Start Bigbank-calculator composite ----------------------------------- - -Bigbank-calculator is a calculator application which handles add, subtract, multiply and divide operations. Each of these operations is implemented in a different language, including JavaScript, groovy, Ruby and Python. - -To run the bigbank-calculator composite and make it available as a service for this demo do the following: - -cd bigbank-calculator -ant compile -ant run - -.. Leave the server running - -Note that 'ant compile' needs to be done the first time you run this demo out of the binary distribution. No need to do 'ant compile' from there on. - -Start Bigbank-stockquote ------------------------- - -A very simple web services based stock quote application which returns random -stock quotes on request. Please note that the stockquote service is not live and is implemented instead to allow for this application to always run without dependency on the availability of a webservice. - -cd bigbank-stockquote -ant compile -ant run - -.. Leave the server running - -Note that 'ant compile' needs to be done the first time you run this demo out of the binary distribution. No need to do 'ant compile' from there on. - -Start Bigbank -------------- -The BigBank comprises of two subsystems that are built from two distinct contributions coming from ... -1) bigbank - This contains all artifacts that make up the bigbank application. This is the application that the - end user interacts with - -2) bigbank-account - This contains all artifacts that deal with the account management within the bigbank. The services - offered by the bigbank-account module are used by the bigbank. The end user never gets to directly - interact with bigbank account - -Besides the bigbank-account the bigbank composite application calls into bigbank-stockquote and -bigbank-calculator services. - -Start bigbank-account in the following way: - -i ) Compile the bigbank-account as follows : - - cd bigbank-account - ant compile - -ii) Now start the bigbank service as follows : - - cd bigbank - ant compile - ant run - - .. Leave the server running - -Note that 'ant compile' needs to be done the first time you run this demo out ofthe binary distribution. -No need to do 'ant compile' from there on. - -Bigbank and the SCA Policies ----------------------------- -The Bigbank demo uses the Tuscany PolicyFramework to enforce security in the following ways: - -Authentication --------------- - The bigbank-account subsystem enforces authentication as a required security characteristic for - all interactions with its CheckingAccountService. Hence the 'bigbank' application which is a client - to this service authenticates itself for every interaction with the CheckingAccountService. The interaction - between the bigbank and the CheckingAccountService is over the ws binding. - -Integrity ---------- - All interactions of the bigbank application with the StockQuoteService are guarded with message integrity. - These interactions use the ws binding. - -Authorization -------------- - Within the bigbank-account subsystem the CheckingAccountService implementation enforces authorization on - its operations. This is an instance of a custom policy enforcement i.e. the CheckingAccountService - component's implementation has defined its own customized way of authorizing access to its services. - -Demonstrated features ---------------------- -This demo is to illustrate the following : - -- composition of an application using artifacts belonging to multiple contributions (here two) -- usage of sca policies in composite definitions with specific emphasis on enabling security - - -Run the demo -------------- -The front end of this demo application is a web app which users Json/RPC to communicate with the backend for retrieving account information. - -To try the app out point you browser at: - -http://localhost:8080/AccountJSON.html - -This should display an interface with a single button that goes and retrieves -a single set of account details exercising services across the three running -SCA applications. - -If you press on getAccountReport, you'll see a response posted, -but the detail of the data will be displayed in the console where you started bigbank. Among other -things you will note messages that confirm the enforecement of AUTHENTICATION, AUTHORIZATION and -SIGNING of messages exchaged. - -On the console where you have started the StockQuote Service you should again be able to see messages -that confirm the signing of messages exchanged. - -Stop the demo -------------- -Go to each of the corresponding command line screens and hit 'enter'. -This will stop each of the applications. - - diff --git a/branches/sca-android/demos/bigbank/bigbank.png b/branches/sca-android/demos/bigbank/bigbank.png deleted file mode 100644 index 985cc6bd05..0000000000 Binary files a/branches/sca-android/demos/bigbank/bigbank.png and /dev/null differ diff --git a/branches/sca-android/demos/bigbank/bigbank.svg b/branches/sca-android/demos/bigbank/bigbank.svg deleted file mode 100644 index 30aa0eab6d..0000000000 --- a/branches/sca-android/demos/bigbank/bigbank.svg +++ /dev/null @@ -1,537 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - CompositeBigBank WebApp - - Component AccountJava - - - - Component AccountDataJava - binding.jsonrpc - binding.ws - binding.rmi - - - - CompositeStockQuote - - CompositeCalculator - - Component CalculatorJava - - - - Component AddJavascript - binding.rmi - - - Component SubtractRuby - - Component MultiplyPython - - Component DivideGroovy - - - - Component StockQuoteJava - - binding.ws - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/bigbank/build-dojo.xml b/branches/sca-android/demos/bigbank/build-dojo.xml deleted file mode 100644 index 9d282c2dd2..0000000000 --- a/branches/sca-android/demos/bigbank/build-dojo.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/bigbank/build.xml b/branches/sca-android/demos/bigbank/build.xml deleted file mode 100644 index 046aadd228..0000000000 --- a/branches/sca-android/demos/bigbank/build.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/bigbank/pom.xml b/branches/sca-android/demos/bigbank/pom.xml deleted file mode 100644 index 9432c9d6a0..0000000000 --- a/branches/sca-android/demos/bigbank/pom.xml +++ /dev/null @@ -1,201 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-demos - 1.4-SNAPSHOT - ../pom.xml - - demo-bigbank - jar - Apache Tuscany SCA BigBank Demo - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-data-api - 1.4-SNAPSHOT - - - - org.apache.ws.security - wss4j - 1.5.3 - - - - org.apache.tuscany.sca - demo-bigbank-account - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-rss-rome - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-rmi - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-resource-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - demo-bigbank - - - org.apache.maven.plugins - maven-antrun-plugin - - - - ant - ant-trax - 1.6.5 - - - - - - install-dojo - validate - - run - - - - - - - - - - - copy-dojo-files - generate-resources - - run - - - - - - - - - - - - clean-dojo-files - clean - - run - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/bigbank/src/main/java/bigbank/account/AccountService.java b/branches/sca-android/demos/bigbank/src/main/java/bigbank/account/AccountService.java deleted file mode 100644 index 2cb8027874..0000000000 --- a/branches/sca-android/demos/bigbank/src/main/java/bigbank/account/AccountService.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account; - -import org.osoa.sca.annotations.Remotable; - -/** - * @version $$Rev$$ $$Date$$ - */ - -@Remotable -public interface AccountService { - - public double getAccountReport(String customerID); - -} diff --git a/branches/sca-android/demos/bigbank/src/main/java/bigbank/account/AccountServiceImpl.java b/branches/sca-android/demos/bigbank/src/main/java/bigbank/account/AccountServiceImpl.java deleted file mode 100644 index 4f0e3879dc..0000000000 --- a/branches/sca-android/demos/bigbank/src/main/java/bigbank/account/AccountServiceImpl.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account; - -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import stockquote.StockQuoteService; -import bigbank.account.checking.CheckingAccountDetails; -import bigbank.account.checking.CheckingAccountService; -import bigbank.account.savings.SavingsAccountDetails; -import bigbank.account.savings.SavingsAccountService; -import bigbank.account.stock.StockAccountDetails; -import bigbank.account.stock.StockAccountService; -import calculator.CalculatorService; - -/** - * @version $$Rev$$ $$Date$$ - */ - -@Service(AccountService.class) -public class AccountServiceImpl implements AccountService { - - @Reference - protected SavingsAccountService savingsAcService; - - @Reference - protected CheckingAccountService checkingAcService; - - @Reference - protected StockAccountService stockAcService; - - @Reference - protected StockQuoteService stockQuoteService; - - @Reference - protected CalculatorService calculatorService; - - @Property - protected String currency; - - public double getAccountReport(String customerID) { - - // Get the checking, savings and stock accounts from the AccountData - // service component - CheckingAccountDetails checking = null; - try { - checking = checkingAcService.getAccountDetails(customerID); - System.out.println("Checking account: " + checking); - - SavingsAccountDetails savings = savingsAcService.getAccountDetails(customerID); - System.out.println("Savings account: " + savings); - - StockAccountDetails stock = stockAcService.getAccountDetails(customerID); - System.out.println("Stock account: " + stock); - - // Get the stock price in USD - double price = stockQuoteService.getQuote(stock.getSymbol()); - System.out.println("Stock price for " + stock.getSymbol() + ": " + price); - - // Convert to the configured currency - if (currency.equals("EURO")) { - - // Use our fancy calculator service to convert to the target currency - price = calculatorService.multiply(price, 0.70); - - System.out.println("Converted to " + currency + ": " + price); - } - - // Calculate the value of the stock account - double stockValue = price * stock.getQuantity(); - - // Calculate the total balance of all accounts and return it - double balance = checking.getBalance() + savings.getBalance() + stockValue; - - return balance; - } catch ( Throwable e ) { - e.printStackTrace(); - return 0; - } - } -} diff --git a/branches/sca-android/demos/bigbank/src/main/java/bigbank/account/feed/AccountFeedImpl.java b/branches/sca-android/demos/bigbank/src/main/java/bigbank/account/feed/AccountFeedImpl.java deleted file mode 100644 index 13d79a9c33..0000000000 --- a/branches/sca-android/demos/bigbank/src/main/java/bigbank/account/feed/AccountFeedImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.feed; - -import org.apache.tuscany.sca.data.collection.Collection; -import org.apache.tuscany.sca.data.collection.Entry; -import org.apache.tuscany.sca.data.collection.NotFoundException; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import bigbank.account.AccountService; - -/** - * @version $$Rev$$ $$Date$$ - */ - -@Service(Collection.class) -public class AccountFeedImpl implements Collection { - - @Reference - protected AccountService accountService; - - public Entry[] getAll() { - - // Add the Account report entry - String report = get("1234"); - Entry entry = new Entry("1234", report); - - return new Entry[] { entry } ; - } - - public String get(String id) { - - // Get the account report for the specified customer ID - double balance = accountService.getAccountReport(id); - String report = Double.toString(balance); - - return report; - } - - public void delete(String key) throws NotFoundException { - } - - public String post(String key, String item) { - return null; - } - - public void put(String key, String item) throws NotFoundException { - } - - public Entry[] query(String queryString) { - return null; - } -} diff --git a/branches/sca-android/demos/bigbank/src/main/java/bigbank/client/BigBankClient.java b/branches/sca-android/demos/bigbank/src/main/java/bigbank/client/BigBankClient.java deleted file mode 100644 index a7fa5ecc22..0000000000 --- a/branches/sca-android/demos/bigbank/src/main/java/bigbank/client/BigBankClient.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.client; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import bigbank.account.AccountService; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class BigBankClient { - - public static void main(String[] args) throws Exception { - - SCADomain domain = SCADomain.newInstance("BigBank.composite"); - - AccountService accountService = domain.getService(AccountService.class, "AccountServiceComponent"); - - String customerID = "1234"; - - System.out.println("Calling account service for customer: " + customerID); - System.out.println(); - double balance = accountService.getAccountReport(customerID); - - System.out.println(); - System.out.println("Balance: " + balance); - - domain.close(); - } - -} diff --git a/branches/sca-android/demos/bigbank/src/main/java/bigbank/demo/BigBankServer.java b/branches/sca-android/demos/bigbank/src/main/java/bigbank/demo/BigBankServer.java deleted file mode 100644 index 05360e07a5..0000000000 --- a/branches/sca-android/demos/bigbank/src/main/java/bigbank/demo/BigBankServer.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.demo; - -import java.net.MalformedURLException; -import java.net.URL; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -import bigbank.account.savings.SavingsAccountService; - - - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class BigBankServer { - - public static void main(String[] args) throws Exception { - long timeout = -1L; - if (args.length > 0) { - timeout = Long.parseLong(args[0]); - } - - System.out.println("Starting the Sample SCA BigBank server..."); - ClassLoader cl = BigBankServer.class.getClassLoader(); - EmbeddedSCADomain domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - // Contribute the SCA contribution - ContributionService contributionService = domain.getContributionService(); - - URL javaContribURL = getContributionURL(SavingsAccountService.class); - Contribution bigbankAcContribution = contributionService.contribute("http://bigbank-account", javaContribURL, false); - for (Composite deployable : bigbankAcContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - URL bigbankContribUrl = getContributionURL(BigBankServer.class); - Contribution bigbankContribution = contributionService.contribute("http://bigbank", bigbankContribUrl, false); - for (Composite deployable : bigbankContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - - //Start Components from composite - for (Composite deployable : bigbankAcContribution.getDeployables()) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - - for (Composite deployable : bigbankContribution.getDeployables()) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - - if (timeout < 0) { - System.out.println("Press Enter to Exit..."); - System.in.read(); - } else { - Thread.sleep(timeout); - } - - contributionService.remove("http://bigbank-account"); - contributionService.remove("http://bigbank"); - - // Stop Components from composite - for (Composite deployable : bigbankContribution.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - - domain.stop(); - - domain.close(); - - - /*SCADomain domain = SCADomain.newInstance("BigBank.composite"); - - if (timeout < 0) { - System.out.println("Press Enter to Exit..."); - System.in.read(); - } else { - Thread.sleep(timeout); - } - - domain.close();*/ - - System.out.println("Bye"); - } - - private static URL getContributionURL(Class cls) throws MalformedURLException { - String flag = "/" + cls.getName().replace('.', '/') + ".class"; - URL url = cls.getResource(flag); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - flag.length() + 1); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - return url; - } - -} diff --git a/branches/sca-android/demos/bigbank/src/main/java/bigbank/security/BigbankPasswordCallbackHandler.java b/branches/sca-android/demos/bigbank/src/main/java/bigbank/security/BigbankPasswordCallbackHandler.java deleted file mode 100644 index 6d3b547939..0000000000 --- a/branches/sca-android/demos/bigbank/src/main/java/bigbank/security/BigbankPasswordCallbackHandler.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.security; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.apache.ws.security.WSPasswordCallback; - -/** - * Sample userid passwd generation class - */ -public class BigbankPasswordCallbackHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, - UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i]; - //System.out.println("*** Getting password for user ...." + pwcb.getIdentifer() + " & " + pwcb.getKey()); - if ( pwcb.getUsage() == WSPasswordCallback.SIGNATURE ) { - System.out.println("*** Calling BIG-BANK Passwd Handler for SIGNING...." ); - pwcb.setPassword("bbservice"); - } else if ( pwcb.getUsage() == WSPasswordCallback.USERNAME_TOKEN ) { - if ( pwcb.getIdentifer().equals("bbaservice")) { - System.out.println("*** Calling BIG-BANK Passwd Handler for setting AUTHENTICATION password...." ); - pwcb.setPassword("bbaservice"); - } - } - } - } - -} diff --git a/branches/sca-android/demos/bigbank/src/main/java/calculator/CalculatorService.java b/branches/sca-android/demos/bigbank/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index c89043276e..0000000000 --- a/branches/sca-android/demos/bigbank/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/demos/bigbank/src/main/java/stockquote/StockQuoteService.java b/branches/sca-android/demos/bigbank/src/main/java/stockquote/StockQuoteService.java deleted file mode 100644 index 749b8ee2f4..0000000000 --- a/branches/sca-android/demos/bigbank/src/main/java/stockquote/StockQuoteService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package stockquote; - -import org.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the StockQuote service. - */ -@Remotable -public interface StockQuoteService { - public double getQuote(String symbol); -} diff --git a/branches/sca-android/demos/bigbank/src/main/resources/BigBank.composite b/branches/sca-android/demos/bigbank/src/main/resources/BigBank.composite deleted file mode 100644 index 11591308b4..0000000000 --- a/branches/sca-android/demos/bigbank/src/main/resources/BigBank.composite +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - EURO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/bigbank/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-android/demos/bigbank/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 154992c843..0000000000 --- a/branches/sca-android/demos/bigbank/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/demos/bigbank/src/main/resources/bigbank.jks b/branches/sca-android/demos/bigbank/src/main/resources/bigbank.jks deleted file mode 100644 index e6294d85f7..0000000000 Binary files a/branches/sca-android/demos/bigbank/src/main/resources/bigbank.jks and /dev/null differ diff --git a/branches/sca-android/demos/bigbank/src/main/resources/definitions.xml b/branches/sca-android/demos/bigbank/src/main/resources/definitions.xml deleted file mode 100644 index 8654151d82..0000000000 --- a/branches/sca-android/demos/bigbank/src/main/resources/definitions.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - Timestamp Signature - security.properties - - - - - Timestamp Signature - bbservice - security.properties - bigbank.security.BigbankPasswordCallbackHandler - DirectReference - - - - - - - - - - UsernameToken - bbaservice - bigbank.security.BigbankPasswordCallbackHandler - PasswordText - - - - - \ No newline at end of file diff --git a/branches/sca-android/demos/bigbank/src/main/resources/security.properties b/branches/sca-android/demos/bigbank/src/main/resources/security.properties deleted file mode 100644 index 762d0523d9..0000000000 --- a/branches/sca-android/demos/bigbank/src/main/resources/security.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin -org.apache.ws.security.crypto.merlin.keystore.type=jks -org.apache.ws.security.crypto.merlin.keystore.password=bbakeystore -org.apache.ws.security.crypto.merlin.file=bigbank.jks \ No newline at end of file diff --git a/branches/sca-android/demos/bigbank/src/main/resources/web/AccountJSON.html b/branches/sca-android/demos/bigbank/src/main/resources/web/AccountJSON.html deleted file mode 100644 index 9f4368443f..0000000000 --- a/branches/sca-android/demos/bigbank/src/main/resources/web/AccountJSON.html +++ /dev/null @@ -1,92 +0,0 @@ - - - -Tuscany JSON-RPC BigBank Client - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Tuscany JSON-RPC BigBank Client
-

This example uses the Dojo - Toolkit to create a JavaScript object accountService for - the service at http://localhost:8080/AccountJSONService using Dojo's - RPC classes and providing them with http://localhost:8080/AccountJSONService?smd - for Simple Method Description - (SMD) input.

-

It then creates a Dojo button that will envoke the getAccountReport - method of the accountService object.

-
RequestResponse

- -
-
-
None Yet.
-
-
Dojo Debug:
-
- - - - - diff --git a/branches/sca-android/demos/bigbank/src/main/resources/web/style.css b/branches/sca-android/demos/bigbank/src/main/resources/web/style.css deleted file mode 100644 index 1071583264..0000000000 --- a/branches/sca-android/demos/bigbank/src/main/resources/web/style.css +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -* { font-family: arial; } - -table, th, td { border: 2px solid blue; border-collapse: collapse; } -th { color: white; background-color: blue; } diff --git a/branches/sca-android/demos/bigbank/src/main/resources/wsdl/AccountService.wsdl b/branches/sca-android/demos/bigbank/src/main/resources/wsdl/AccountService.wsdl deleted file mode 100644 index ac4d987a57..0000000000 --- a/branches/sca-android/demos/bigbank/src/main/resources/wsdl/AccountService.wsdl +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/bigbank/src/test/java/test/BigBankTestCase.java b/branches/sca-android/demos/bigbank/src/test/java/test/BigBankTestCase.java deleted file mode 100644 index 3b7c5ef2ad..0000000000 --- a/branches/sca-android/demos/bigbank/src/test/java/test/BigBankTestCase.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package test; - -import junit.framework.TestCase; - -import bigbank.demo.BigBankServer; - -/** - * @version $Rev$ $Date$ - */ -public class BigBankTestCase extends TestCase { - - public void testServer() throws Exception { - BigBankServer.main(new String[] {"1000"}); - } -} diff --git a/branches/sca-android/demos/load-balancing-webapp/LICENSE b/branches/sca-android/demos/load-balancing-webapp/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/demos/load-balancing-webapp/NOTICE b/branches/sca-android/demos/load-balancing-webapp/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/demos/load-balancing-webapp/README b/branches/sca-android/demos/load-balancing-webapp/README deleted file mode 100644 index b7bbb64b1a..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/README +++ /dev/null @@ -1,76 +0,0 @@ -WebApp Load Balancing Demo -=========================== - -Demonstrates balancing load acoss SCA services by deploying an SCA composite -to two tomcat servers in a cluster. The tomcat servers sit behind an Apache -server which directs load to one or other tomcat server based on a set of rules. - -The mvn pom distributed with this sample will download, install and configure -two Tomcat servers automatically to act as workers. You need to install the -Apache web server and configure it manually. - -1 - Install and configure the Tomcat workers - -mvn - -This results in two tomcat servers at - -target/tomcat-8085 -target/tomcat-8086 - -2 - Install and configure the Apache server to balance load - -In this case we've chosen to use the native JK connector. There are several -resources that tell you how to configure Apache for load balancing Tomcat with -the JK connector. For example, - -http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html -http://www.crazysquirrel.com/computing/debian/servers/tomcat55.jspx - -Here is a high level summary - -Download the latest version of Apache 2.2 (this demo was built with Apache 2.2.6) - http://httpd.apache.org/ - Install in a local director called, say, apache - -Download the mod_jk module (in binary form if you can) - http://tomcat.apache.org/download-connectors.cgi - Install it in apache/modules - -Configure the mod_jk module - Copy src/test/resources/apache-80/conf/workers.properties to apache/conf - Append the contents of src/test/resources/apache-80/conf/httpd.conf to apache/conf/httpf.conf - -3 - Start the apache and tomcat servers - -In three command prompts - -cd target/tomcat-8085 -bin/catalina run - -cd target/tomcat-8086 -bin/catalina run - -cd apache -bin/httpd - -4 - Run the client - -run the LanchClient program - TBD - need a script - -5 - Result - -The client will make 10 calls to the SCA service described in the helloworldws.composite that -is part of the webapp deployed to the tomcat servers. You will see the result of this -service call reported at the client in the form - -Called getGreetings -Hello World 6 - -If you look at the Tomcat consoles you will see that each server deals with half the requests -as the load is balanced equally between the two of them. - - - - - diff --git a/branches/sca-android/demos/load-balancing-webapp/build-tomcat.xml b/branches/sca-android/demos/load-balancing-webapp/build-tomcat.xml deleted file mode 100644 index 7e1dc4b0e9..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/build-tomcat.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/load-balancing-webapp/build.xml b/branches/sca-android/demos/load-balancing-webapp/build.xml deleted file mode 100644 index b84f85616e..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/build.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/load-balancing-webapp/pom.xml b/branches/sca-android/demos/load-balancing-webapp/pom.xml deleted file mode 100644 index 84e693e59e..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/pom.xml +++ /dev/null @@ -1,349 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-demos - 1.4-SNAPSHOT - ../pom.xml - - demo-load-balancing-webapp - war - Apache Tuscany SCA WebApp Load Balancing Demo - A sample SCA application that is deployed as a webapp to a cluster of tomcat servers - - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-monitor-logging - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node2-impl - 1.4-SNAPSHOT - - - - tomcat - catalina-balancer - 5.5.12 - - - - javax.servlet - servlet-api - 2.4 - provided - - - - junit - junit - 4.2 - test - - - - - - 8085 - http://127.0.0.1:${http.port} - ${env.CATALINA_HOME} - - - - ${artifactId} - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.1 - - - - ant - ant-trax - 1.6.5 - - - - - - download-tomcat - validate - - run - - - - - - - - - - - - unpack-tomcat-8086 - generate-resources - - run - - - - - - - - - - - unpack-tomcat-8087 - generate-resources - - run - - - - - - - - - - - - configure-tomcat-8086 - pre-integration-test - - run - - - - - - - - - - - configure-tomcat-8087 - pre-integration-test - - run - - - - - - - - - - - - copy-webapp-8086 - pre-integration-test - - run - - - - - - - - - - - copy-webapp-8087 - pre-integration-test - - run - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/load-balancing-webapp/src/main/java/client/LaunchClient.java b/branches/sca-android/demos/load-balancing-webapp/src/main/java/client/LaunchClient.java deleted file mode 100644 index efa89b4fe9..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/src/main/java/client/LaunchClient.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package client; - -import java.io.File; - -import helloworld.HelloWorldService; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode2; -import org.apache.tuscany.sca.node.SCANode2Factory; -import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution; -import org.osoa.sca.ServiceRuntimeException; - -public class LaunchClient { - public static void main(String[] args) throws Exception { - - SCANode2 node = null; - try { - - SCANode2Factory nodeFactory = SCANode2Factory.newInstance(); - node = nodeFactory.createSCANode(new File("src/main/resources/client-contribution/helloworldwsclient.composite").toURL().toString(), - new SCAContribution("TestContribution", - new File("src/main/resources/client-contribution").toURL().toString())); - - node.start(); - HelloWorldService helloWorldService = ((SCAClient)node).getService(HelloWorldService.class, "HelloWorldClientComponent"); - - - for (int i=0; i < 10; i++){ - System.out.println(helloWorldService.getGreetings("World " + i)); - } - - node.stop(); - - } catch (Exception e) { - throw new ServiceRuntimeException(e); - } - } -} diff --git a/branches/sca-android/demos/load-balancing-webapp/src/main/java/domain/LaunchDomain.java b/branches/sca-android/demos/load-balancing-webapp/src/main/java/domain/LaunchDomain.java deleted file mode 100644 index 33c37869a3..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/src/main/java/domain/LaunchDomain.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package domain; - -//import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher; - -/** - * This server program that loads a composite to provide simple registry function. - * This server can be replaced with any registry that is appropriate but the components - * in each node that talk to the registry should be replaced also. - */ -public class LaunchDomain { - public static void main(String[] args) throws Exception { - // DomainManagerLauncher.main(args); - } - -} diff --git a/branches/sca-android/demos/load-balancing-webapp/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-android/demos/load-balancing-webapp/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 65dc030d89..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldImpl implements HelloWorldService { - - public String getGreetings(String name) { - String message = "Hello " + name; - System.err.println(message); - return message; - } - -} diff --git a/branches/sca-android/demos/load-balancing-webapp/src/main/java/helloworld/HelloWorldService.java b/branches/sca-android/demos/load-balancing-webapp/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 7245513b2a..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public String getGreetings(String name); -} - diff --git a/branches/sca-android/demos/load-balancing-webapp/src/main/java/helloworld/HelloWorldServiceClient.java b/branches/sca-android/demos/load-balancing-webapp/src/main/java/helloworld/HelloWorldServiceClient.java deleted file mode 100644 index f3d2fdb2ed..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/src/main/java/helloworld/HelloWorldServiceClient.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -/** - * The HelloWorld service implementation - */ -public class HelloWorldServiceClient implements HelloWorldService { - - HelloWorldService helloWorldService; - - public String getGreetings(String name) { - System.out.println("Called getGreetings"); - return helloWorldService.getGreetings(name); - } - - public HelloWorldService getHelloWorldService() { - System.out.println("Got Injected helloWorldService"); - return helloWorldService; - } - - public void setHelloWorldService(HelloWorldService helloWorldService) { - System.out.println("Injected helloWorldService"); - this.helloWorldService = helloWorldService; - } -} \ No newline at end of file diff --git a/branches/sca-android/demos/load-balancing-webapp/src/main/java/org/apache/tuscany/sca/demos/loadbalancer/rule/RoundRobinRule.java b/branches/sca-android/demos/load-balancing-webapp/src/main/java/org/apache/tuscany/sca/demos/loadbalancer/rule/RoundRobinRule.java deleted file mode 100644 index 5dc1b6671b..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/src/main/java/org/apache/tuscany/sca/demos/loadbalancer/rule/RoundRobinRule.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.tuscany.sca.demos.loadbalancer.rule; - -import javax.servlet.http.HttpServletRequest; - -import org.apache.webapp.balancer.rules.BaseRule; - - -public class RoundRobinRule extends BaseRule { - /** - * The number of worker nodes that load will - * be balanced across - */ - private int workerCount; - - private int currentCount = 1; - - - /** - * Sets the worker count. - * - * @param workerCount The worker count - */ - public void setWorkerCount(int workerCount) { - if (workerCount == 0) { - throw new IllegalArgumentException( - "worker count cannot be 0."); - } else { - this.workerCount = workerCount; - } - } - - /** - * Returns the worker count. - * - * @return int The worker count - */ - protected int getWorkerCount() { - return workerCount; - } - - - - /** - * @see org.apache.webapp.balancer.Rule#matches(HttpServletRequest) - */ - public boolean matches(HttpServletRequest request) { - - if (currentCount == workerCount){ - currentCount = 1; - return true; - } else { - currentCount++; - return false; - } - } - - /** - * Returns a String representation of this object. - * - * @return String - */ - public String toString() { - StringBuffer buffer = new StringBuffer(); - - buffer.append("["); - buffer.append(getClass().getName()); - buffer.append(": "); - - buffer.append("Worker count: "); - buffer.append(getWorkerCount()); - buffer.append(" / "); - - buffer.append("Redirect URL: "); - buffer.append(getRedirectUrl()); - - buffer.append("]"); - - return buffer.toString(); - } -} diff --git a/branches/sca-android/demos/load-balancing-webapp/src/main/resources/client-contribution/helloworldwsclient.composite b/branches/sca-android/demos/load-balancing-webapp/src/main/resources/client-contribution/helloworldwsclient.composite deleted file mode 100644 index 9b6052741e..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/src/main/resources/client-contribution/helloworldwsclient.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/load-balancing-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-android/demos/load-balancing-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index 11347004f9..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/src/main/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-android/demos/load-balancing-webapp/src/main/webapp/META-INF/sca-deployables/helloworldws.composite b/branches/sca-android/demos/load-balancing-webapp/src/main/webapp/META-INF/sca-deployables/helloworldws.composite deleted file mode 100644 index 1ab78d802d..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/src/main/webapp/META-INF/sca-deployables/helloworldws.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-android/demos/load-balancing-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-android/demos/load-balancing-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 8d47ae2207..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - Apache Tuscany Load Balancing Demo - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - diff --git a/branches/sca-android/demos/load-balancing-webapp/src/test/resources/apache-80/conf/httpd.conf b/branches/sca-android/demos/load-balancing-webapp/src/test/resources/apache-80/conf/httpd.conf deleted file mode 100644 index 37cf284d35..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/src/test/resources/apache-80/conf/httpd.conf +++ /dev/null @@ -1,28 +0,0 @@ -# Load mod_jk module -# Update this path to match your modules location -LoadModule jk_module modules/mod_jk.so - -# Declare the module for (remove this line on Apache 2.x) -# AddModule mod_jk.c -# Where to find workers.properties -# Update this path to match your conf directory location (put workers.properties next to httpd.conf) -JkWorkersFile conf/workers.properties - -# Where to put jk shared memory -# Update this path to match your local state directory or logs directory -JkShmFile logs/mod_jk.shm - -# Where to put jk logs -# Update this path to match your logs directory location (put mod_jk.log next to access_log) -JkLogFile logs/mod_jk.log - -# Set the jk log level [debug/error/info] -JkLogLevel info - -# Select the timestamp log format -JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " - -# Send everything for context /examples to worker named worker1 (ajp13) -# JkMount /examples/* worker1 -# Send everything for context /* to the router -JkMount /* router diff --git a/branches/sca-android/demos/load-balancing-webapp/src/test/resources/apache-80/conf/workers.properties b/branches/sca-android/demos/load-balancing-webapp/src/test/resources/apache-80/conf/workers.properties deleted file mode 100644 index 9228c4fd8e..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/src/test/resources/apache-80/conf/workers.properties +++ /dev/null @@ -1,18 +0,0 @@ - # Load balancer looks after the workers - worker.list=router - - # The load balacer - worker.router.type=lb - worker.router.balance_workers=worker1,worker2 - - # Set properties for worker1 (ajp13) - worker.worker1.type=ajp13 - worker.worker1.host=localhost - worker.worker1.port=8010 - worker.worker1.lbfactor=1 - - # Set properties for worker1 (ajp13) - worker.worker2.type=ajp13 - worker.worker2.host=localhost - worker.worker2.port=8011 - worker.worker2.lbfactor=1 diff --git a/branches/sca-android/demos/load-balancing-webapp/src/test/resources/tomcat-8085/conf/server.xml b/branches/sca-android/demos/load-balancing-webapp/src/test/resources/tomcat-8085/conf/server.xml deleted file mode 100644 index 920fa7b037..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/src/test/resources/tomcat-8085/conf/server.xml +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/load-balancing-webapp/src/test/resources/tomcat-8085/webapps/balancer/WEB-INF/config/rules.xml b/branches/sca-android/demos/load-balancing-webapp/src/test/resources/tomcat-8085/webapps/balancer/WEB-INF/config/rules.xml deleted file mode 100644 index 7486dc8148..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/src/test/resources/tomcat-8085/webapps/balancer/WEB-INF/config/rules.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/branches/sca-android/demos/load-balancing-webapp/src/test/resources/tomcat-8086/conf/server.xml b/branches/sca-android/demos/load-balancing-webapp/src/test/resources/tomcat-8086/conf/server.xml deleted file mode 100644 index 5ecb8fe5c4..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/src/test/resources/tomcat-8086/conf/server.xml +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/load-balancing-webapp/src/test/resources/tomcat-8087/conf/server.xml b/branches/sca-android/demos/load-balancing-webapp/src/test/resources/tomcat-8087/conf/server.xml deleted file mode 100644 index f83c68191c..0000000000 --- a/branches/sca-android/demos/load-balancing-webapp/src/test/resources/tomcat-8087/conf/server.xml +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/mortgage-creditcheck/LICENSE b/branches/sca-android/demos/mortgage-creditcheck/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-android/demos/mortgage-creditcheck/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/demos/mortgage-creditcheck/NOTICE b/branches/sca-android/demos/mortgage-creditcheck/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-android/demos/mortgage-creditcheck/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/demos/mortgage-creditcheck/README b/branches/sca-android/demos/mortgage-creditcheck/README deleted file mode 100644 index b785802920..0000000000 --- a/branches/sca-android/demos/mortgage-creditcheck/README +++ /dev/null @@ -1,6 +0,0 @@ -Mortgage Loan Approval Demo -=========================== -Please refer to the README under mortgage-loanapproval for information on how to run this demo. - -Mortgage-creditcheck is part of a larger demo that is explained there. - diff --git a/branches/sca-android/demos/mortgage-creditcheck/build.xml b/branches/sca-android/demos/mortgage-creditcheck/build.xml deleted file mode 100644 index 59f1342276..0000000000 --- a/branches/sca-android/demos/mortgage-creditcheck/build.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/mortgage-creditcheck/pom.xml b/branches/sca-android/demos/mortgage-creditcheck/pom.xml deleted file mode 100644 index 153fc1fc3c..0000000000 --- a/branches/sca-android/demos/mortgage-creditcheck/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-demos - 1.4-SNAPSHOT - ../pom.xml - - demo-mortgage-creditcheck - jar - Apache Tuscany SCA Mortgage Credit Check Demo - A sample Mortgage application made of several SCA components wired together. - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - - diff --git a/branches/sca-android/demos/mortgage-creditcheck/src/main/java/credit/CreditCheck.java b/branches/sca-android/demos/mortgage-creditcheck/src/main/java/credit/CreditCheck.java deleted file mode 100644 index ec95a60227..0000000000 --- a/branches/sca-android/demos/mortgage-creditcheck/src/main/java/credit/CreditCheck.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package credit; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface CreditCheck { - int getCreditScore(String ssn); -} diff --git a/branches/sca-android/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckImpl.java b/branches/sca-android/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckImpl.java deleted file mode 100644 index f19e8a1250..0000000000 --- a/branches/sca-android/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package credit; - -import org.osoa.sca.annotations.Service; - -/** - * An implementation of the CreditReportService service - */ -@Service(CreditCheck.class) -public class CreditCheckImpl implements CreditCheck { - - public int getCreditScore(String ssn) { - int score = (int)(700 + (Math.random() - 0.5) * 100); - System.out.println("Credit score for " + ssn + ": " + score); - return score; - } -} diff --git a/branches/sca-android/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckServer.java b/branches/sca-android/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckServer.java deleted file mode 100644 index 870ea1941d..0000000000 --- a/branches/sca-android/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckServer.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package credit; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * @version $Rev$ $Date$ - */ -public class CreditCheckServer { - public static void main(String[] args) throws Exception { - - System.out.println("Starting the CreditCheck Service..."); - - SCADomain domain = SCADomain.newInstance("http://localhost", "/", "CreditCheck.composite"); - - System.out.println("Press Enter to Exit..."); - System.in.read(); - - domain.close(); - System.out.println("Bye"); - } -} diff --git a/branches/sca-android/demos/mortgage-creditcheck/src/main/resources/CreditCheck.composite b/branches/sca-android/demos/mortgage-creditcheck/src/main/resources/CreditCheck.composite deleted file mode 100644 index 5c828f5a39..0000000000 --- a/branches/sca-android/demos/mortgage-creditcheck/src/main/resources/CreditCheck.composite +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/mortgage-creditcheck/src/main/resources/wsdl/credit.wsdl b/branches/sca-android/demos/mortgage-creditcheck/src/main/resources/wsdl/credit.wsdl deleted file mode 100644 index 9c2acc96d3..0000000000 --- a/branches/sca-android/demos/mortgage-creditcheck/src/main/resources/wsdl/credit.wsdl +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/mortgage-creditcheck/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-android/demos/mortgage-creditcheck/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index aea009292a..0000000000 --- a/branches/sca-android/demos/mortgage-creditcheck/src/main/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-android/demos/mortgage-creditcheck/src/main/webapp/WEB-INF/web.xml b/branches/sca-android/demos/mortgage-creditcheck/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d7b2e32dd1..0000000000 --- a/branches/sca-android/demos/mortgage-creditcheck/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - Apache Tuscany Credit Check Demo - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - diff --git a/branches/sca-android/demos/mortgage-loanapproval/LICENSE b/branches/sca-android/demos/mortgage-loanapproval/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/demos/mortgage-loanapproval/NOTICE b/branches/sca-android/demos/mortgage-loanapproval/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/demos/mortgage-loanapproval/README b/branches/sca-android/demos/mortgage-loanapproval/README deleted file mode 100644 index dbf3829a20..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/README +++ /dev/null @@ -1,60 +0,0 @@ -Mortgage Loan Approval Demo -=========================== - -This demo was used as an example in the java developer journal article: http://jdj.sys-con.com/read/325183.htm. - -The demo consists of two modules: - -mortgage-loanapproval: provides the business logic for loan approval. -mortgage-creditcheck: handles credit check requests. This is a java component exposed as a webservice running on the embedded Tomcat. - -Please check mortgage_assembly.png file that is located in this directory for a high level view of the demo. - -Here is what happens when you run the demo. A loan approval request for customer with id 111-222-3333 -gets initiated when mortgage-loanapproval application is run. Depending on what the 'imaginary' credit - status of this person is, the loan gets approved or diapproved. - -You would need two command windows to run mortgage loan approval composite. The order in which the -applications are run is important. Run mortgage-creditcheck first since mortgage-loanapproval is dependent on -it's service. - -In the first command window ---------------------------- -1) go to mortgage-creditcheck directory -2) ant compile -3) ant run -You should see the following displayed: -Buildfile: build.xml - -run: - [java] Starting the CreditCheck Service... - [java] 14-Jan-2008 14:14:20 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:8085/CreditCheckServiceC -omponent - [java] Press Enter to Exit... - -In the second command window ----------------------------- -1) go to mortgage-loanapproval directory -2) ant compile -3) ant run - -If the loan is approved, you will see the following displayed in the command screen where -mortgage-loanapproval is run: - -Buildfile: build.xml -run: - [java] Interest rate for a 30-year loan of $200000.0 in CA: 6.5% - [java] Approved: John Smith[111-22-3333] - -If the loan is disapproved, you will see the following displayed in the command screen where -mortgage-loanapproval is run: - -Buildfile: build.xml -run: - [java] Credit score for 111-22-3333: 708 - [java] Interest rate for a 30-year loan of $200000.0 in CA: 6.5% - [java] Debt/Income ratio 0.2528272093971861 is too high. - [java] Rejected: John Smith[111-22-3333] - diff --git a/branches/sca-android/demos/mortgage-loanapproval/build.xml b/branches/sca-android/demos/mortgage-loanapproval/build.xml deleted file mode 100644 index 9a0a83bf1d..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/build.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/credit_composite.jpg b/branches/sca-android/demos/mortgage-loanapproval/doc/credit_composite.jpg deleted file mode 100644 index e28ed63cfb..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/credit_composite.jpg and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/credit_composite.png b/branches/sca-android/demos/mortgage-loanapproval/doc/credit_composite.png deleted file mode 100644 index 0bfce0078d..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/credit_composite.png and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/loan_approval.jpg b/branches/sca-android/demos/mortgage-loanapproval/doc/loan_approval.jpg deleted file mode 100644 index 3f00557c7f..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/loan_approval.jpg and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/loan_approval.png b/branches/sca-android/demos/mortgage-loanapproval/doc/loan_approval.png deleted file mode 100644 index 9d5f829fe5..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/loan_approval.png and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly0.jpg b/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly0.jpg deleted file mode 100644 index 515b6ecde7..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly0.jpg and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly0.png b/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly0.png deleted file mode 100644 index 4b815a4b82..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly0.png and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly1.jpg b/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly1.jpg deleted file mode 100644 index 01a7c55a14..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly1.jpg and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly1.png b/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly1.png deleted file mode 100644 index 07422c4f45..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly1.png and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly2.jpg b/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly2.jpg deleted file mode 100644 index 992c048684..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly2.jpg and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly2.png b/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly2.png deleted file mode 100644 index 4667956ed0..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_assembly2.png and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_composite.jpg b/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_composite.jpg deleted file mode 100644 index 5021f6a317..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_composite.jpg and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_composite.png b/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_composite.png deleted file mode 100644 index 1398c50ded..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_composite.png and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_diagrams.doc b/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_diagrams.doc deleted file mode 100644 index 32a0b72907..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_diagrams.doc and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_package1.jpg b/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_package1.jpg deleted file mode 100644 index e91c5f1bbd..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_package1.jpg and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_package1.png b/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_package1.png deleted file mode 100644 index db304a4c28..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_package1.png and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_package2.jpg b/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_package2.jpg deleted file mode 100644 index e8c2865e4a..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_package2.jpg and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_package2.png b/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_package2.png deleted file mode 100644 index 502e538e94..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_package2.png and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_scenario.jpg b/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_scenario.jpg deleted file mode 100644 index fccf2e35c3..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_scenario.jpg and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_scenario.png b/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_scenario.png deleted file mode 100644 index b8f42ad318..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/doc/mortgage_scenario.png and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/mortgage_assembly.png b/branches/sca-android/demos/mortgage-loanapproval/mortgage_assembly.png deleted file mode 100644 index 4667956ed0..0000000000 Binary files a/branches/sca-android/demos/mortgage-loanapproval/mortgage_assembly.png and /dev/null differ diff --git a/branches/sca-android/demos/mortgage-loanapproval/pom.xml b/branches/sca-android/demos/mortgage-loanapproval/pom.xml deleted file mode 100644 index 783dd05672..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-demos - 1.4-SNAPSHOT - ../pom.xml - - demo-mortgage-loanapproval - jar - Apache Tuscany SCA Mortgage Loan Approval Demo - A sample Mortgage application made of several SCA components wired together. - - - 1.4-SNAPSHOT - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-implementation-script - 1.4-SNAPSHOT - runtime - - - - - - install - ${artifactId} - - - org.apache.maven.plugins - maven-jar-plugin - - - - mortgage.MortgageClient - - - - - - - diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheck.java b/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheck.java deleted file mode 100644 index c5787b7819..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheck.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package mortgage; - -import org.osoa.sca.annotations.Remotable; - -/** - * CreditCheck interface - */ -@Remotable -public interface CreditCheck { - int getCreditScore(String ssn); -} diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheckImpl.java b/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheckImpl.java deleted file mode 100644 index dc803d9688..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheckImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package mortgage; - -import org.osoa.sca.annotations.Service; - -/** - * A pojo implementation of the CreditCheck service - */ -@Service(CreditCheck.class) -public class CreditCheckImpl implements CreditCheck { - - public int getCreditScore(String ssn) { - int score = (int)(700 + (Math.random() - 0.5) * 100); - System.out.println("Credit score for " + ssn + ": " + score); - return score; - } -} diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/Customer.java b/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/Customer.java deleted file mode 100644 index 66a486d516..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/Customer.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package mortgage; - -/** - * A simple Customer object - */ -public class Customer { - private String ssn; - private String firstName; - private String lastName; - private double monthlyIncome; - private String state; - - public double getMonthlyIncome() { - return monthlyIncome; - } - - public void setMonthlyIncome(double monthlyIncome) { - this.monthlyIncome = monthlyIncome; - } - - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public String getSsn() { - return ssn; - } - - public void setSsn(String ssn) { - this.ssn = ssn; - } - - @Override - public String toString() { - return firstName + " " + lastName + "[" + ssn + "]"; - } -} diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuote.java b/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuote.java deleted file mode 100644 index b5bafeb204..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuote.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package mortgage; - -public interface InterestRateQuote { - public float getRate(String state, double loanAmount, int termInYears); -} diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuoteImpl.java b/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuoteImpl.java deleted file mode 100644 index 8c642667f1..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuoteImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package mortgage; - -import org.osoa.sca.annotations.Service; - -@Service(InterestRateQuote.class) -public class InterestRateQuoteImpl implements InterestRateQuote { - public float getRate(String state, double loanAmount, int termInYears) { - float rate = 6.0f; - if (termInYears == 5) { - rate = 5.5f; - } else { - rate = 6.5f; - } - System.out.println("Interest rate for a " + termInYears - + "-year loan of $" - + loanAmount - + " in " - + state - + ": " - + rate - + "%"); - return rate; - } -} diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApproval.java b/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApproval.java deleted file mode 100644 index dcdad18496..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApproval.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package mortgage; - -/** - * Loan Approval interface - */ -public interface LoanApproval { - public boolean approve(Customer customer, double loanAmount, int years); -} diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApprovalImpl.java b/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApprovalImpl.java deleted file mode 100644 index 40bfdc4a1d..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApprovalImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package mortgage; - -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * An implementation of the LoanApproval service. - */ -@Service(LoanApproval.class) -// Service declaration -public class LoanApprovalImpl implements LoanApproval { - private CreditCheck[] creditCheck; - private MortgageCalculator mortgageCalculator; - private InterestRateQuote interestRateQuote; - - // Reference declaration using a protected or public field - @Reference - public RiskAssessment riskAssessment; - - private int minimumCreditScore = 650; - - // Property declaration using a setter method - @Property(name = "minimumCreditScore") - public void setMinimumCreditScore(int minimumCreditScore) { - this.minimumCreditScore = minimumCreditScore; - } - - // Reference declaration using a setter method - @Reference - public void setCreditCheck(CreditCheck[] creditCheck) { - this.creditCheck = creditCheck; - } - - @Reference - public void setInterestRateQuote(InterestRateQuote interestRateQuote) { - this.interestRateQuote = interestRateQuote; - } - - @Reference - public void setMortgageCalculator(MortgageCalculator mortgageCalculator) { - this.mortgageCalculator = mortgageCalculator; - } - - public boolean approve(Customer customer, double loanAmount, int years) { - int score = 0; - for (int i = 0; i < creditCheck.length; i++) { - score += creditCheck[i].getCreditScore(customer.getSsn()); - } - if (score != 0) { - score = score / creditCheck.length; - } - if (score < minimumCreditScore) { - System.err.println("Credit score " + score + " is below the minimum " + minimumCreditScore + "."); - return false; - } - float rate = interestRateQuote.getRate(customer.getState(), loanAmount, years); - double monthlyPayment = mortgageCalculator.getMonthlyPayment(loanAmount, years, rate); - double ratio = monthlyPayment / customer.getMonthlyIncome(); - boolean approved = riskAssessment.assess(score, ratio); - if (!approved) { - System.err.println("Debt/Income ratio " + ratio + " is too high."); - } - return approved; - } -} diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculator.java b/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculator.java deleted file mode 100644 index cacd8694de..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculator.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package mortgage; - -import org.osoa.sca.annotations.Remotable; - -/** - * The Mortgage Calculator service interface. - */ -@Remotable -public interface MortgageCalculator { - public double getMonthlyPayment(double principal, int years, float interestRate); -} diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculatorImpl.java b/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculatorImpl.java deleted file mode 100644 index 015f1bae98..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculatorImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package mortgage; - -import org.osoa.sca.annotations.Service; - -/** - * An implementation of the Calculator service. - */ -@Service(MortgageCalculator.class) -public class MortgageCalculatorImpl implements MortgageCalculator { - - public double getMonthlyPayment(double principal, int years, float interestRate) { - double monthlyRate = interestRate / 12.0 / 100.0; - double p = Math.pow(1 + monthlyRate, years * 12); - double q = p / (p - 1); - double monthlyPayment = principal * monthlyRate * q; - System.out.println("Monthly payment for a " + years + "-year loan of $" + principal + ": " + monthlyPayment); - return monthlyPayment; - } - -} diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageClient.java b/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageClient.java deleted file mode 100644 index d69f0a1163..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageClient.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package mortgage; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program to invoke the Mortgage LoanApproval service - */ -public class MortgageClient { - public static void main(String[] args) throws Exception { - - SCADomain domain = SCADomain.newInstance("Mortgage1.composite"); - LoanApproval loanApplication = domain.getService(LoanApproval.class, "LoanApprovalComponent"); - - // Create the customer - Customer customer = new Customer(); - customer.setSsn("111-22-3333"); - customer.setFirstName("John"); - customer.setLastName("Smith"); - customer.setMonthlyIncome(5000.0d); - customer.setState("CA"); - - // Invoke the service - boolean result = loanApplication.approve(customer, 200000d, 30); - System.out.println((result ? "Approved: " : "Rejected: ") + customer); - } -} diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessment.java b/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessment.java deleted file mode 100644 index 23c9589e85..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessment.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package mortgage; - -/** - * Risk Assessment interface - */ -public interface RiskAssessment { - public boolean assess(int creditScore, double ratio); -} diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessmentImpl.java b/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessmentImpl.java deleted file mode 100644 index c2116366ec..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessmentImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package mortgage; - -import org.osoa.sca.annotations.Service; - -/** - * A pojo implementation of RiskAssessment service - */ -@Service(RiskAssessment.class) -public class RiskAssessmentImpl implements RiskAssessment { - public boolean assess(int creditScore, double ratio) { - if (creditScore >= 750) { - return ratio < 0.35; - } else if (creditScore >= 700) { - return ratio < 0.30; - } else { - return ratio < 0.25; - } - } -} diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/main/resources/Mortgage.composite b/branches/sca-android/demos/mortgage-loanapproval/src/main/resources/Mortgage.composite deleted file mode 100644 index d1128b9907..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/main/resources/Mortgage.composite +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - 600 - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/main/resources/Mortgage1.composite b/branches/sca-android/demos/mortgage-loanapproval/src/main/resources/Mortgage1.composite deleted file mode 100644 index 4cad6c7223..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/main/resources/Mortgage1.composite +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - 600 - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.componentType b/branches/sca-android/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.componentType deleted file mode 100644 index bf7b10e0f7..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.componentType +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.js b/branches/sca-android/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.js deleted file mode 100644 index b25af1d039..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -function getMonthlyPayment(principal, years, interestRate) { - var monthlyRate = interestRate / 12.0 / 100.0; - var p = Math.pow(1 + monthlyRate, years * 12); - var q = p / (p - 1); - var monthlyPayment = principal * monthlyRate * q; - return monthlyPayment; -} diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/main/resources/wsdl/credit.wsdl b/branches/sca-android/demos/mortgage-loanapproval/src/main/resources/wsdl/credit.wsdl deleted file mode 100644 index 9c2acc96d3..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/main/resources/wsdl/credit.wsdl +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/mortgage-loanapproval/src/test/java/mortgage/MortgageClientTestCase.java b/branches/sca-android/demos/mortgage-loanapproval/src/test/java/mortgage/MortgageClientTestCase.java deleted file mode 100644 index 285cc72515..0000000000 --- a/branches/sca-android/demos/mortgage-loanapproval/src/test/java/mortgage/MortgageClientTestCase.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package mortgage; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This shows how to test the Calculator service component. - */ -public class MortgageClientTestCase extends TestCase { - private SCADomain domain; - private LoanApproval loanApproval; - - @Override - protected void setUp() throws Exception { - domain = SCADomain.newInstance("Mortgage.composite"); - loanApproval = domain.getService(LoanApproval.class, "LoanApprovalComponent"); - } - - @Override - protected void tearDown() throws Exception { - if (domain != null) { - domain.close(); - } - } - - public void testApprove() throws Exception { - Customer customer = new Customer(); - customer.setSsn("111-22-3333"); - customer.setFirstName("John"); - customer.setLastName("Smith"); - customer.setMonthlyIncome(5000.0d); - customer.setState("CA"); - - boolean approved = loanApproval.approve(customer, 200000d, 30); - System.out.println((approved ? "Approved: " : "Rejected: ") + customer); - } -} diff --git a/branches/sca-android/demos/pom.xml b/branches/sca-android/demos/pom.xml index 420ad92c52..e716ddb987 100644 --- a/branches/sca-android/demos/pom.xml +++ b/branches/sca-android/demos/pom.xml @@ -36,14 +36,6 @@ true - alert-aggregator-webapp - bigbank - bigbank-account - bigbank-calculator - bigbank-stockquote - mortgage-creditcheck - mortgage-loanapproval - xml-bigbank diff --git a/branches/sca-android/demos/workpool-distributed/LICENSE b/branches/sca-android/demos/workpool-distributed/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-android/demos/workpool-distributed/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/demos/workpool-distributed/NOTICE b/branches/sca-android/demos/workpool-distributed/NOTICE deleted file mode 100644 index 94481d6cfa..0000000000 --- a/branches/sca-android/demos/workpool-distributed/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2007 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/demos/workpool-distributed/build.xml b/branches/sca-android/demos/workpool-distributed/build.xml deleted file mode 100644 index 9e10e8ec91..0000000000 --- a/branches/sca-android/demos/workpool-distributed/build.xml +++ /dev/null @@ -1,446 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/workpool-distributed/pom.xml b/branches/sca-android/demos/workpool-distributed/pom.xml deleted file mode 100644 index 01a8900d52..0000000000 --- a/branches/sca-android/demos/workpool-distributed/pom.xml +++ /dev/null @@ -1,148 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - demo-workpool-distributed - Apache Tuscany SCA Distributed Job Workpool Demo - - - - apache.incubator - - http://people.apache.org/repo/m2-incubating-repository - - - - org.drools - http://repository.jboss.com/maven2/org/drools/ - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.drools - drools - 4.0.4 - - - - antlr - antlr - 2.7.1 - - - commons-daemon - commons-daemon - 1.0.1 - - - - antlr - stringtemplate - 2.3b6 - - - - org.apache.tuscany.sca - tuscany-node-impl - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-domain-impl - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-sca-axis2 - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-databinding-job - 1.4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-contribution-updater - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-databinding-xstream - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-resource-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - test - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/node/DomainNode.java b/branches/sca-android/demos/workpool-distributed/src/main/java/node/DomainNode.java deleted file mode 100644 index a278499aae..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/node/DomainNode.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package node; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; - -import org.apache.tuscany.sca.domain.SCADomain; -import org.apache.tuscany.sca.domain.SCADomainFactory; - -/** - * This server program that loads a composite to provide simple registry - * function. This server can be replaced with any registry that is appropriate - * but the components in each node that talk to the registry should be replaced - * also. - */ -public class DomainNode { - - private static String DEFAULT_DOMAIN_URI = "http://u12:8877"; - private boolean stopped = true; - - public static void main(String[] args) { - - try { - - SCADomainFactory domainFactory = SCADomainFactory.newInstance(); - SCADomain domain = domainFactory - .createSCADomain(DEFAULT_DOMAIN_URI); - - System.out.println("Domain started (press enter to shutdown)"); - System.in.read(); - // waitForever(); - domain.destroy(); - } catch (Exception e) { - e.printStackTrace(); - } - - System.out.println("Domain stopped"); - } -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/node/DomainNodeDaemon.java b/branches/sca-android/demos/workpool-distributed/src/main/java/node/DomainNodeDaemon.java deleted file mode 100644 index 9d05761ad6..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/node/DomainNodeDaemon.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package node; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; - -import org.apache.commons.daemon.Daemon; -import org.apache.commons.daemon.DaemonContext; -import org.apache.tuscany.sca.domain.SCADomain; -import org.apache.tuscany.sca.domain.SCADomainFactory; - -/** - * This server program that loads a composite to provide simple registry - * function. This server can be replaced with any registry that is appropriate - * but the components in each node that talk to the registry should be replaced - * also. - */ -public class DomainNodeDaemon implements Daemon { - - private SCADomain domain; - private static String DEFAULT_DOMAIN_URI = "http://u12:8877"; - private boolean stopped = true; - - private synchronized void waitForever() { - while (!stopped) { - try { - wait(); - } catch (InterruptedException ex) { - stopped = true; - return; - } - } - - } - - public void destroy() { - // TODO Auto-generated method stub - - } - - public void init(DaemonContext arg0) throws Exception { - // TODO Auto-generated method stub - - } - - public void start() throws Exception { - - SCADomainFactory domainFactory = SCADomainFactory.newInstance(); - domain = domainFactory.createSCADomain(DEFAULT_DOMAIN_URI); - - System.out.println("Domain started (press enter to shutdown)"); - waitForever(); - - } - - public void stop() throws Exception { - // TODO Auto-generated method stub - Thread.currentThread().interrupt(); - domain.destroy(); - } -} \ No newline at end of file diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/node/TestJob.java b/branches/sca-android/demos/workpool-distributed/src/main/java/node/TestJob.java deleted file mode 100644 index f48e647bd6..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/node/TestJob.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package node; - -import org.apache.tuscany.sca.databinding.job.Job; -import org.apache.tuscany.sca.databinding.job.JobDataMap; -import org.apache.tuscany.sca.databinding.job.JobExecutionContext; -import org.apache.tuscany.sca.databinding.job.RemoteJob; - -import com.thoughtworks.xstream.XStream; -import com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver; - -public class TestJob extends RemoteJob implements java.io.Serializable { - private boolean EOS = false; - private Double value; - - public TestJob(Double x, long iterations, int[] items) { - JobDataMap map = new JobDataMap(); - map.addJobData("value", x); - map.addJobData("iterations", iterations); - map.addJobData("items", items); - context.setJobData(map); - } - - public TestJob(Double i, boolean eos) { - value = i; - this.EOS = eos; - } - - public TestJob(String jsonData) { - JobExecutionContext ctxt = new JobExecutionContext(); - ctxt.storeJSONData(jsonData); - } - - public int getType() { - return Job.REGULAR_JOB; - } - - public void setEOS() { - EOS = true; - } - - public boolean eos() { - return EOS; - } - - @Override - public Double compute(JobExecutionContext context) { - JobDataMap contextMap = context.getJobData(); - Long iterations = (Long) contextMap.getJobDataObject("iterations"); - Double value = (Double) contextMap.getJobDataObject("value"); - double x = value.doubleValue(); - System.out.println("Computing sinx for " + value + " for " - + iterations.intValue() + " times"); - long computing_start = System.currentTimeMillis(); - for (long i = 0; i < iterations.longValue(); ++i) { - x = Math.sin(x); - } - long computing_end = System.currentTimeMillis(); - System.out.println("Computing time= " - + (computing_end - computing_start)); - System.out.println("Send result = " + x); - return new Double(x); - } - -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/node/WorkpoolDaemon.java b/branches/sca-android/demos/workpool-distributed/src/main/java/node/WorkpoolDaemon.java deleted file mode 100644 index 1f2a4d1f9a..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/node/WorkpoolDaemon.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package node; - -import java.io.BufferedInputStream; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.util.List; - -import javax.xml.namespace.QName; - -import org.apache.commons.daemon.Daemon; -import org.apache.commons.daemon.DaemonContext; -import org.apache.commons.daemon.DaemonController; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.DeployedArtifact; -import org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl; -import org.apache.tuscany.sca.domain.SCADomain; -import org.apache.tuscany.sca.node.NodeException; -import org.apache.tuscany.sca.node.NodeManagerInitService; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.apache.tuscany.sca.node.impl.SCANodeImpl; -import org.apache.tuscany.sca.node.management.SCANodeManagerInitService; - -import java.net.URI; - -import workpool.WorkerManager; -import workpool.WorkerManagerImpl; -import workpool.WorkpoolManager; -import workpool.WorkpoolService; -import workpool.WorkpoolServiceImpl; - -/** - * This client program shows how to run a distributed SCA node. In this case a - * calculator node has been constructed specifically for running the calculator - * composite. Internally it creates a representation of a node and associates a - * distributed domain with the node. This separation is made different - * implementations of the distributed domain can be provided. - */ -public class WorkpoolDaemon implements Daemon, Runnable { - private String domainName; - private String nodeName; - private long iterations; - private long jobsNo; - private long workerNo; - private SCANode node; - private boolean stopped = false; - private DaemonController controller = null; - private Thread thread = null; - private String ruleFile = "workerRules.drl"; - - /* - * public static void main(String[] args) throws Exception { - * // Check that the correct arguments have been provided if (null == args || - * args.length < 4) { System.err.println("Usage: java WorkpoolNode - * domainname nodename iterTest workerNo"); System.exit(1); } - * - * try { String domainName = args[0]; String nodeName = args[1]; long - * iterations = Long.parseLong(args[2]); long jobsNo = - * Long.parseLong(args[3]); long workerNo = Long.parseLong(args[4]); - * ClassLoader cl = WorkpoolDaemon.class.getClassLoader(); - * - * SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); node = - * nodeFactory.createSCANode(null, domainName); - * node.addContribution(nodeName, cl.getResource(nodeName + "/")); - * node.addToDomainLevelComposite(new QName("http://sample", "Workpool")); - * node.start(); // nodeA is the head node and runs some tests while all - * other nodes // simply listen for incoming messages - * - * FileReader rules = new FileReader("workerRules.drl"); StringBuffer buffer = - * new StringBuffer(); - * - * BufferedReader br = new BufferedReader(rules); String ruleString; do { - * ruleString = br.readLine(); if (ruleString!=null) { - * buffer.append(ruleString);} } while (ruleString!=null); - * - * if ( nodeName.equals("nodeA") ) { // do some application stuff - * WorkpoolService workpoolService = - * node.getDomain().getService(WorkpoolService.class, - * "WorkpoolServiceComponent"); workpoolService.start(); - * NodeManagerInitService nodeInit = - * node.getDomain().getService(NodeManagerInitService.class, - * "WorkpoolManagerComponent/NodeManagerInitService"); - * nodeInit.setNode(node); WorkpoolManager workpoolManager = - * node.getDomain().getService(WorkpoolManager.class, - * "WorkpoolManagerComponent/WorkpoolManager"); - * workpoolManager.setWorkpoolReference(node.getDomain().getServiceReference(WorkpoolService.class, - * "WorkpoolServiceComponent")); - * workpoolManager.acceptRules(buffer.toString()); workpoolManager.start(); - * int items[] = {3,4,5,6,3,6,3,5,9,5,6}; - * - * double x = 398349; for (int i = 0; i < jobsNo; ++i) - * workpoolService.submit(new TestJob(x,iterations,items)); - * - * TestJob j = new TestJob(-1.0,true); for (int i = 0; i < workerNo+1; ++i){ - * j.setEOS(); workpoolService.submit(j); } } try { if - * (nodeName.equals("nodeB")) { NodeManagerInitService serviceNodeB = - * node.getDomain().getService(NodeManagerInitService.class,"WorkerManagerNodeBComponent/NodeManagerInitService"); - * serviceNodeB.setNode(node); } if (nodeName.equals("nodeC")) { - * NodeManagerInitService workerManagerC = - * node.getDomain().getService(NodeManagerInitService.class,"WorkerManagerNodeCComponent/NodeManagerInitService"); - * workerManagerC.setNode(node); } if (nodeName.equals("nodeD")) { - * NodeManagerInitService workerManagerD = - * node.getDomain().getService(NodeManagerInitService.class,"WorkerManagerNodeDComponent/NodeManagerInitService"); - * workerManagerD.setNode(node); } if (nodeName.equals("nodeE")) { - * NodeManagerInitService workerManagerE = - * node.getDomain().getService(NodeManagerInitService.class,"WorkerManagerNodeEComponent/NodeManagerInitService"); - * workerManagerE.setNode(node); } - * - * System.out.println("Node started (press enter to shutdown)"); - * System.in.read(); } catch (IOException e) { e.printStackTrace(); } // - * stop the node and all the domains in it node.stop(); node.destroy(); - * System.exit(0); } catch(Exception ex) { System.err.println("Exception in - * node - " + ex.getMessage()); ex.printStackTrace(System.err); } } - */ - public void destroy() { - // TODO Auto-generated method stub - - } - - public void init(DaemonContext arg0) throws Exception { - String[] args = arg0.getArguments(); - domainName = args[0]; - nodeName = args[1]; - iterations = Long.parseLong(args[2]); - jobsNo = Long.parseLong(args[3]); - workerNo = Long.parseLong(args[4]); - if (args.length == 6) { - ruleFile = args[5]; - } - this.controller = arg0.getController(); - // this.thread=new Thread(this); - } - - public void start() throws Exception { - - ClassLoader cl = WorkpoolDaemon.class.getClassLoader(); - - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); - node = nodeFactory.createSCANode(null, domainName); - node.addContribution(nodeName, cl.getResource(nodeName + "/")); - node.addToDomainLevelComposite(new QName("http://sample", "Workpool")); - node.start(); - // nodeA is the head node and runs some tests while all other nodes - // simply listen for incoming messages - - FileReader rules = new FileReader(ruleFile); - StringBuffer buffer = new StringBuffer(); - - BufferedReader br = new BufferedReader(rules); - String ruleString; - do { - ruleString = br.readLine(); - if (ruleString != null) { - buffer.append(ruleString + "\n"); - } - } while (ruleString != null); - - if (nodeName.equals("nodeA")) { - // do some application stuff - WorkpoolService workpoolService = node.getDomain().getService( - WorkpoolService.class, "WorkpoolServiceComponent"); - workpoolService.start(); - SCANodeManagerInitService nodeInit = node.getDomain().getService( - SCANodeManagerInitService.class, - "WorkpoolManagerComponent/NodeManagerInitService"); - nodeInit.setNode(node); - WorkpoolManager workpoolManager = node.getDomain().getService( - WorkpoolManager.class, - "WorkpoolManagerComponent/WorkpoolManager"); - workpoolManager.setWorkpoolReference(node.getDomain() - .getServiceReference(WorkpoolService.class, - "WorkpoolServiceComponent")); - workpoolManager.acceptRules(buffer.toString()); - workpoolManager.start(); - - int items[] = { 3, 4, 5, 6, 3, 6, 3, 5, 9, 5, 6 }; - - double x = 398349; - for (int i = 0; i < jobsNo; ++i) { - workpoolService.submit(new TestJob(x, iterations, items)); - } - TestJob j = new TestJob(-1.0, true); - for (int i = 0; i < workerNo + 1; ++i) { - j.setEOS(); - workpoolService.submit(j); - } - - } - if (nodeName.equals("nodeB")) { - SCANodeManagerInitService workerManagerNodeB = node - .getDomain() - .getService(SCANodeManagerInitService.class, - "WorkerManagerNodeBComponent/NodeManagerInitService"); - workerManagerNodeB.setNode(node); - } - - if (nodeName.equals("nodeC")) { - SCANodeManagerInitService workerManagerNodeC = node - .getDomain() - .getService(SCANodeManagerInitService.class, - "WorkerManagerNodeCComponent/NodeManagerInitService"); - workerManagerNodeC.setNode(node); - } - - if (nodeName.equals("nodeD")) { - SCANodeManagerInitService workerManagerNodeD = node - .getDomain() - .getService(SCANodeManagerInitService.class, - "WorkerManagerNodeDComponent/NodeManagerInitService"); - workerManagerNodeD.setNode(node); - } - - if (nodeName.equals("nodeE")) { - SCANodeManagerInitService workerManagerNodeE = node - .getDomain() - .getService(SCANodeManagerInitService.class, - "WorkerManagerNodeEComponent/NodeManagerInitService"); - workerManagerNodeE.setNode(node); - } - - this.waitForever(); - // this.thread.start(); - } - - public void stop() throws Exception { - Thread.currentThread().interrupt(); - // thread.interrupt(); - node.stop(); - node.destroy(); - } - - private synchronized void waitForever() { - while (!stopped) { - try { - wait(); - } catch (InterruptedException ex) { - stopped = true; - return; - } - } - } - - public void run() { - waitForever(); - } -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/node/WorkpoolNode.java b/branches/sca-android/demos/workpool-distributed/src/main/java/node/WorkpoolNode.java deleted file mode 100644 index 86557548af..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/node/WorkpoolNode.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package node; - -import java.io.BufferedInputStream; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.util.List; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.DeployedArtifact; -import org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl; -import org.apache.tuscany.sca.domain.SCADomain; -import org.apache.tuscany.sca.node.NodeManagerInitService; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.apache.tuscany.sca.node.impl.SCANodeImpl; -import java.net.URI; - -import workpool.WorkerManager; -import workpool.WorkerManagerImpl; -import workpool.WorkpoolManager; -import workpool.WorkpoolService; -import workpool.WorkpoolServiceImpl; - -/** - * This client program shows how to run a distributed SCA node. In this case a - * calculator node has been constructed specifically for running the calculator - * composite. Internally it creates a representation of a node and associates a - * distributed domain with the node. This separation is made different - * implementations of the distributed domain can be provided. - */ -public class WorkpoolNode { - - public static void main(String[] args) throws Exception { - - // Check that the correct arguments have been provided - if (null == args || args.length < 4) { - System.err - .println("Useage: java WorkpoolNode domainname nodename iterTest workerNo"); - System.exit(1); - } - BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); - String domainName = args[0]; - String nodeName = args[1]; - long iterations = Long.parseLong(args[2]); - long jobsNo = Long.parseLong(args[3]); - long workerNo = Long.parseLong(args[4]); - ClassLoader cl = WorkpoolNode.class.getClassLoader(); - - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); - SCANode node = nodeFactory.createSCANode(null, domainName); - node.addContribution(nodeName, cl.getResource(nodeName + "/")); - node.addToDomainLevelComposite(new QName("http://sample", "Workpool")); - node.start(); - // nodeA is the head node and runs some tests while all other nodes - // simply listen for incoming messages - - FileReader rules = new FileReader("workerRules.drl"); - StringBuffer buffer = new StringBuffer(); - - BufferedReader br = new BufferedReader(rules); - String ruleString; - do { - ruleString = br.readLine(); - if (ruleString != null) { - buffer.append(ruleString + "\n"); - } - } while (ruleString != null); - - if (nodeName.equals("nodeA")) { - // do some application stuff - WorkpoolService workpoolService = node.getDomain().getService( - WorkpoolService.class, "WorkpoolServiceComponent"); - workpoolService.start(); - NodeManagerInitService nodeInit = node.getDomain().getService( - NodeManagerInitService.class, - "WorkpoolManagerComponent/NodeManagerInitService"); - nodeInit.setNode(node); - WorkpoolManager workpoolManager = node.getDomain().getService( - WorkpoolManager.class, - "WorkpoolManagerComponent/WorkpoolManager"); - workpoolManager.setWorkpoolReference(node.getDomain() - .getServiceReference(WorkpoolService.class, - "WorkpoolServiceComponent")); - workpoolManager.setCycleTime(8000); - workpoolManager.acceptRules(buffer.toString()); - workpoolManager.start(); - int items[] = { 3, 4, 5, 6, 3, 6, 3, 5, 9, 5, 6 }; - - double x = 398349; - - for (int i = 0; i < jobsNo; ++i) - workpoolService.submit(new TestJob(x, iterations, items)); - - TestJob j = new TestJob(-1.0, true); - for (int i = 0; i < workerNo + 1; ++i) { - j.setEOS(); - workpoolService.submit(j); - } - - } - try { - if (nodeName.equals("nodeB")) { - NodeManagerInitService serviceNodeB = node - .getDomain() - .getService(NodeManagerInitService.class, - "WorkerManagerNodeBComponent/NodeManagerInitService"); - serviceNodeB.setNode(node); - } - if (nodeName.equals("nodeC")) { - NodeManagerInitService workerManagerC = node - .getDomain() - .getService(NodeManagerInitService.class, - "WorkerManagerNodeCComponent/NodeManagerInitService"); - workerManagerC.setNode(node); - } - if (nodeName.equals("nodeD")) { - NodeManagerInitService workerManagerD = node - .getDomain() - .getService(NodeManagerInitService.class, - "WorkerManagerNodeDComponent/NodeManagerInitService"); - workerManagerD.setNode(node); - } - if (nodeName.equals("nodeE")) { - NodeManagerInitService workerManagerE = node - .getDomain() - .getService(NodeManagerInitService.class, - "WorkerManagerNodeEComponent/NodeManagerInitService"); - workerManagerE.setNode(node); - } - - System.out.println("Node started (press enter to shutdown)"); - String buff; - for (;;) { - try { - buff = in.readLine(); - if (buff == null) - break; - System.out.print(in.readLine()); - } catch (IOException ex) { - break; // Exit thread. - } - } - // stop the node and all the domains in it - node.stop(); - node.destroy(); - System.exit(0); - } catch (Exception ex) { - System.err.println("Exception in node - " + ex.getMessage()); - ex.printStackTrace(System.err); - } - } -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/node/workerRules1.drl b/branches/sca-android/demos/workpool-distributed/src/main/java/node/workerRules1.drl deleted file mode 100644 index 9c5a5d1b7f..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/node/workerRules1.drl +++ /dev/null @@ -1,13 +0,0 @@ -package workpool -import workpool.*; -rule "WorkerAdder1" - when - $workerBean: WorkpoolBean(singleAction == false && (jobComputed > 500)) - then - $workerBean.setSingleAction() - $workerBean.addWorkerToNode("nodeB") - $workerBean.addWorkerToNode("nodeC") - $workerBean.addWorkerToNode("nodeD") - $workerBean.addWorkerToNode("nodeE") -end - \ No newline at end of file diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/MetaComponentWorker.java b/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/MetaComponentWorker.java deleted file mode 100644 index cdd0f30b34..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/MetaComponentWorker.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; - -import java.io.StringReader; -import java.net.URI; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; -import java.util.logging.Logger; - -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamReader; - -import org.apache.tuscany.sca.assembly.MetaComponent; -import org.apache.tuscany.sca.assembly.impl.DefaultMetaComponent; - -public class MetaComponentWorker extends DefaultMetaComponent { - - private SecureRandom prng; - private String componentName; - private String scdl; - private String javaClass; - private boolean loadedFromString = false; - private Logger log = Logger.getLogger(MetaComponentWorker.class.getName()); - - public MetaComponentWorker() { - componentName = "WorkerComponent" - + java.util.UUID.randomUUID().toString(); - } - - public void setWorkerName(String componentName) { - this.componentName = componentName; - } - - public void setWorkerClass(String javaClass) { - this.javaClass = javaClass; - } - - private String generateSCDL() { - StringBuffer buffer = new StringBuffer(512); - buffer - .append("\n"); - buffer.append(""); - buffer.append(""); - buffer.append(this.componentName); - buffer.append("\n"); - return buffer.toString(); - } - - @Override - public XMLStreamReader build() throws Exception { - XMLInputFactory factory = XMLInputFactory.newInstance(); - if (!loadedFromString) - scdl = generateSCDL(); - return factory.createXMLStreamReader(new StringReader(scdl)); - - } - - public String getName() { - - return componentName; - } - -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/MyWorker.java b/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/MyWorker.java deleted file mode 100644 index c45696e3cf..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/MyWorker.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; - -import org.apache.tuscany.sca.core.context.CallableReferenceImpl; -import org.apache.tuscany.sca.databinding.job.Job; -import org.apache.tuscany.sca.databinding.job.JobDataMap; -import org.apache.tuscany.sca.databinding.job.JobExecutionContext; -import org.apache.tuscany.sca.databinding.job.RemoteJob; -import org.osoa.sca.annotations.Scope; - -@Scope("COMPOSITE") -public class MyWorker extends WorkerServiceImpl { - private static int resultcount = 0; - - @Override - public ResultJob computeTask(Job job) { - - RemoteJob remoteJob = (RemoteJob) job; - System.out.println("Computing the job"); - JobExecutionContext context = remoteJob.getContext(); - ResultJob resultJob = new ResultJob(); - JobDataMap resultMap = new JobDataMap(); - resultMap.addJobData("result", remoteJob.compute(context)); - resultJob.setJobDataMap(resultMap); - System.out.println("Count result = " + (++resultcount)); - return resultJob; - } - -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/NullJob.java b/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/NullJob.java deleted file mode 100644 index fb930adf2e..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/NullJob.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; - -import org.apache.tuscany.sca.databinding.job.Job; -import org.apache.tuscany.sca.databinding.job.JobDataMap; - -public class NullJob implements Job, java.io.Serializable { - - public Object compute(Object arg0) { - // TODO Auto-generated method stub - return null; - } - - public JobDataMap getDataMap() { - return null; - } - - public boolean eos() { - return false; - } - - public int getType() { - return Job.NULL_JOB; - } - -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/ResultJob.java b/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/ResultJob.java deleted file mode 100644 index e04411668b..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/ResultJob.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; - -import org.apache.tuscany.sca.databinding.job.Job; -import org.apache.tuscany.sca.databinding.job.JobDataMap; -import org.apache.tuscany.sca.databinding.job.JobExecutionContext; -import org.apache.tuscany.sca.databinding.job.RemoteJob; - -public class ResultJob extends RemoteJob implements - java.io.Serializable { - private JobDataMap map; - - public JobDataMap getDataMap() { - return map; - } - - public void setJobDataMap(JobDataMap map) { - this.map = map; - } - - public boolean eos() { - // TODO Auto-generated method stub - return true; - } - - public int getType() { - // TODO Auto-generated method stub - return Job.RESULT_JOB; - } - - @Override - public Object compute(JobExecutionContext v) { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/Trigger.java b/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/Trigger.java deleted file mode 100644 index 469675b19b..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/Trigger.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; - -import org.apache.tuscany.sca.databinding.annotation.DataBinding; -import org.apache.tuscany.sca.databinding.job.Job; -import org.osoa.sca.annotations.Remotable; - -@Remotable -@DataBinding("org.apache.tuscany.sca.databinding.job.Job") -public interface Trigger { - void handleEvent(T c); -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerManager.java b/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerManager.java deleted file mode 100644 index 520203e190..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerManager.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; -import org.osoa.sca.annotations.Remotable; -import org.osoa.sca.CallableReference; -@Remotable -public interface WorkerManager { - CallableReference addWorker(); - boolean removeWorker(String workerName); - boolean removeWorkers(int k); - boolean removeAllWorkers(); - double getNodeLoad(); - int activeWorkers(); - void start(); -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerManagerImpl.java b/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerManagerImpl.java deleted file mode 100644 index d4337cad2f..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerManagerImpl.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; - -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.RandomAccessFile; -import java.util.List; -import java.util.logging.Logger; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.DeployedArtifact; -import org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl; -import org.osoa.sca.CallableReference; -import org.apache.tuscany.sca.node.management.SCANodeManagerInitService; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.impl.SCANodeImpl; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; -import java.util.LinkedList; -import java.util.ArrayList; - -@Scope("COMPOSITE") -@Service(interfaces = { SCANodeManagerInitService.class, WorkerManager.class }) -public class WorkerManagerImpl implements WorkerManager, SCANodeManagerInitService { - private Logger log = Logger.getLogger(WorkerManagerImpl.class.getName()); - private LinkedList> activeWorkers = new LinkedList>(); - private List workerComponentNames = new ArrayList(); - private SCANodeImpl node; - @Property - protected String nodeName; - @Property - protected String compositeName; - @Property - protected String workerClass; - @Context - protected ComponentContext context; - private double loadAverage; - - /* This method is used to find a composite inside all deployed artifacts */ - private Composite findComposite(List artifacts) { - for (Composite fact : artifacts) { - log.info("Searching in a contribution deployed artifacts -" - + compositeName); - Composite augmented = (Composite) fact; - // found - if (augmented.getURI().equals(compositeName)) { - log.info("Found composite..." + compositeName); - return augmented; - } - } - } - return null; - } - - public CallableReference addWorker() { - log.info("Adding a new worker call.."); - long addWorkerStartTime = System.nanoTime(); - ContributionServiceImpl cServiceImpl = (ContributionServiceImpl) node.getContributionService(); - Contribution contribution = cServiceImpl.getContribution(nodeName); - List artifacts = contribution.getDeployables(); - CallableReference workerReference = null; - CallableReference ref = null; - log.info("Creating a MetaComponentWorker.."); - MetaComponentWorker mcw = new MetaComponentWorker(); - boolean found = false; - mcw.setWorkerClass(workerClass); - Composite augmented = findComposite(artifacts); - try { - if (augmented != null) { - long startCreation = System.nanoTime(); - node.addComponentToComposite(mcw, contribution.getURI(), - augmented.getURI()); - System.out.println("addComponentToComposite time = " - + (System.nanoTime() - startCreation)); - RuntimeComponent workerComponent = (RuntimeComponent) node - .getComponent(mcw.getName()); - if (workerComponent != null) { - ref = (CallableReference) workerComponent - .getComponentContext().createSelfReference( - WorkerService.class); - ref.getService().start(); - activeWorkers.addLast(ref); - workerComponentNames.add(mcw.getName()); - CallableReference manager = (CallableReference) context - .createSelfReference(WorkerManager.class, - "WorkerManager"); - ref.getService().registerManager(manager); - return ref; - } - } else { - log.info("Workpool composite not found!"); - } - } catch (Exception e) { - log.info("Exception activation"); - e.printStackTrace(); - } - ; - System.out.println("Component Creation Time =" - + (System.nanoTime() - addWorkerStartTime)); - return ref; - } - - public boolean removeAllWorkers() { - for (CallableReference callable : activeWorkers) { - callable.getService().stop(); - } - return true; - } - - public boolean removeWorker() { - CallableReference callable = activeWorkers - .removeLast(); - callable.getService().stop(); - return true; - } - - public boolean removeWorkers(int k) { - if (k >= activeWorkers.size()) - return false; - for (int i = 0; i < k; ++i) { - if (!removeWorker()) - return false; - } - return true; - } - - public void setNode(SCANode node) { - this.node = (SCANodeImpl) node; - - } - - public double getNodeLoad() { - /* - * FIXME [jo] this works only on Linux To be replaced with an JNI - * extension - */ - RandomAccessFile statfile; - - this.loadAverage = 1.0; - // load = 0; - int NoProcessors = 0; - String cpuLine = null; - try { - NoProcessors = Runtime.getRuntime().availableProcessors(); - if (NoProcessors > 1) - this.loadAverage = 1 / (1.0 * NoProcessors); - statfile = new RandomAccessFile("/proc/loadavg", "r"); - try { - statfile.seek(0); - cpuLine = statfile.readLine(); - - } catch (IOException e) { - // FIX ME: Better exception handling. - e.printStackTrace(); - } - } catch (FileNotFoundException e) { - e.printStackTrace(); - } catch (NumberFormatException e) { - e.printStackTrace(); - } - double min1; - if (cpuLine != null) { - java.util.StringTokenizer st = new java.util.StringTokenizer( - cpuLine, " "); - min1 = Double.parseDouble(st.nextToken()); - } else - min1 = 0; - - return min1 * this.loadAverage; - } - - public int activeWorkers() { - return activeWorkers.size(); - } - - public boolean removeWorker(String workerName) { - RuntimeComponent workerComponent = (RuntimeComponent) node - .getComponent(workerName); - if (workerComponent != null) { - log.info("Removing component " + workerName); - node.removeComponentFromComposite(nodeName, "Workpool.composite", - workerName); - return true; - } - return false; - } - - public void start() { - // do nothing for now. - } -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerService.java b/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerService.java deleted file mode 100644 index 37b7ea227a..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerService.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; - -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Remotable; -import org.osoa.sca.annotations.OneWay; -import org.apache.tuscany.sca.core.context.CallableReferenceImpl; -import org.apache.tuscany.sca.databinding.annotation.DataBinding; -import org.apache.tuscany.sca.databinding.job.Job; - -/** - * The interface for the multiply service - */ -@Remotable -@Callback(WorkerServiceCallback.class) -@DataBinding("org.apache.tuscany.sca.databinding.job.Job") -public interface WorkerService { - @OneWay - void compute(Job j); - - void start(); - - void stop(); - - // void addJobCompleteHandler(String triggerName, - // CallableReferenceImpl handle); - // void removeJobCompleteHandler(String triggerName); - /* The worker manager */ - void registerManager(CallableReferenceImpl wm); - - void registerSender(CallableReferenceImpl sender); - - // void init(Job nullJob); - @OneWay - void computeFirstTime(Job nullJob, - CallableReferenceImpl myReference); - -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerServiceCallback.java b/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerServiceCallback.java deleted file mode 100644 index 6fb1278e5e..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerServiceCallback.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; - -import org.apache.tuscany.sca.databinding.job.Job; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface WorkerServiceCallback { - void receiveResult(Job resultType, boolean reuse, String workerName); -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerServiceImpl.java b/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerServiceImpl.java deleted file mode 100644 index 2c9bf5ea48..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkerServiceImpl.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; - -import org.osoa.sca.ComponentContext; -import org.osoa.sca.RequestContext; -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; -import org.apache.tuscany.sca.core.context.CallableReferenceImpl; -import org.apache.tuscany.sca.databinding.annotation.DataBinding; -import org.apache.tuscany.sca.databinding.job.Job; - -import java.util.HashMap; -import java.util.Map; -import java.util.logging.*; - -/** - * An implementation of the worker service. - */ -@Service(WorkerService.class) -@DataBinding("org.apache.tuscany.sca.databinding.job.Job") -@Scope("COMPOSITE") -public abstract class WorkerServiceImpl implements WorkerService { - private Logger log = Logger.getLogger(this.getClass().getName()); - private WorkerServiceCallback workerServiceCallback; - @Context - protected ComponentContext workerContext; - @Context - protected RequestContext requestContext; - @Property - protected String workerName; - private CallableReferenceImpl managerReference = null; - - /* TODO add the triggers, but before ask */ - // protected Map triggers = new HashMap(); - public abstract ResultJob computeTask(Job job); - - private boolean stopped = false; - private CallableReferenceImpl serviceRef; - private CallableReferenceImpl senderService; - private WorkpoolService wp = null; - private WorkerManager manager = null; - - public void start() { - log.info("Starting worker..."); - stopped = false; - serviceRef = (CallableReferenceImpl) workerContext - .createSelfReference(WorkerService.class); - - } - - public void init(CallableReferenceImpl sender, Job nullJob) { - compute(nullJob); - } - - public void stop() { - stopped = true; - } - - @Callback - public void setWorkerServiceCallback( - WorkerServiceCallback workerServiceCallback) { - log.info("Setting worker callback"); - this.workerServiceCallback = workerServiceCallback; - } - - public void computeFirstTime(Job nullJob, - CallableReferenceImpl sender) { - senderService = sender; - wp = sender.getService(); - workWithCallable(nullJob); - } - - public void registerManager(CallableReferenceImpl wm) { - managerReference = wm; - manager = managerReference.getService(); - - } - - public void registerSender(CallableReferenceImpl sender) { - log.info("Registering sender.."); - senderService = sender; - wp = sender.getService(); - } - - private void workWithInjection(Job j) { - log.info("Worker has received job"); - if (stopped) { - workerServiceCallback - .receiveResult(j, true, workerContext.getURI()); - if (managerReference != null) - manager.removeWorker(workerContext.getURI()); - } else if (j.eos()) { - if (managerReference != null) - manager.removeWorker(workerContext.getURI()); - } - if (j instanceof NullJob) { - workerServiceCallback.receiveResult(j, false, workerContext - .getURI()); - } else { - workerServiceCallback.receiveResult(computeTask(j), false, - workerContext.getURI()); - } - } - - private void workWithCallable(Job j) { - log.info("Worker " + workerContext.getURI() - + " has received job with eos --> " + j.eos()); - if (stopped) { - wp.handleResult(j, true, workerContext.getURI(), serviceRef, false); - return; - } - if (j.eos()) { - log.info("Got poison token..."); - if (managerReference != null) { - log.info("Removing component " + workerContext.getURI()); - manager.removeWorker(workerContext.getURI()); - - } - return; - } - if (j.getType() != Job.NULL_JOB) { - wp.handleResult(computeTask(j), false, workerContext.getURI(), - serviceRef, false); - } else { - log.info("Got a null job"); - wp.handleResult(j, false, workerContext.getURI(), serviceRef, true); - } - } - - public void compute(Job j) { - - if (senderService != null) { - log.info("Computing job using callable reference method"); - workWithCallable(j); - - } else { - log.info("Computing job using reference injection method"); - workWithInjection(j); - - } - } - /* - * public void addJobCompleteHandler(String triggerName, - * CallableReferenceImpl handle) { if - * (!triggers.containsKey(triggerName)) { triggers.put(triggerName, - * handle.getService()); } } public void removeJobCompleteHandler(String - * triggerName) { if (!triggers.containsKey(triggerName)) { - * triggers.remove(triggerName); } } - */ -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolBean.java b/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolBean.java deleted file mode 100644 index 80c093ff1c..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolBean.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; - -import java.beans.*; -import java.util.Vector; -import java.util.logging.*; - -public class WorkpoolBean { - private Vector listeners = new Vector(); - double loadAverage = 0; - int nodeNumbers = 0; - int workers = 0; - int estimedQueueSize = 0; - double averageServiceTime = 0; - double averageArrivalTime = 0; - double usageFactor = 0; - private final PropertyChangeSupport changes = new PropertyChangeSupport( - this); - long jobComputed = 0; - boolean singleAction = false; - private Logger log = Logger.getLogger(WorkpoolBean.class.getName()); - - public void setNodeNumbers(int n) { - this.nodeNumbers = n; - } - - public void setWorkers(int w) { - this.workers = w; - } - - public void setLoadAverage(double loadAverage) { - this.loadAverage = loadAverage; - } - - public void setAverageServiceTime(double service) { - this.averageServiceTime = service; - } - - public void setAverageArrivalTime(double service) { - this.averageArrivalTime = service; - } - - public double getAverageArrivalTime() { - return this.averageArrivalTime; - } - - public double getUtilizationFactor() { - return usageFactor; - } - - public void setUsageFactor() { - usageFactor = averageServiceTime / averageArrivalTime; - } - - public void setEstimedQueueSize(int size) { - estimedQueueSize = size; - } - - public int getEstimedQueueSize() { - return estimedQueueSize; - } - - public double getLoadAverage() { - return this.loadAverage; - } - - public int getWorkers() { - return this.workers; - } - - public int getNodeNumbers() { - return this.nodeNumbers; - } - - public double getAverageServiceTime() { - return this.averageServiceTime; - } - - public void addPropertyChangeListener(final PropertyChangeListener l) { - this.changes.addPropertyChangeListener(l); - } - - public void removePropertyChangeListener(final PropertyChangeListener l) { - this.changes.removePropertyChangeListener(l); - } - - private synchronized void fireWorkpoolEvent(WorkpoolEvent ev) { - for (WorkpoolBeanListener l : listeners) { - l.handleEvent(new WorkpoolEvent(ev)); - } - } - - public void addWorkersToNode(int k, String nodeName) { - log.info("Adding a worker to node " + nodeName); - WorkpoolEvent ev = new WorkpoolEvent(this, - WorkpoolEvent.EVENT_MULTIPLE_ADD_WORKER, k, nodeName); - fireWorkpoolEvent(ev); - } - - public void addWorkerToNode(String nodeName) { - log.info("Adding a worker to node " + nodeName); - WorkpoolEvent ev = new WorkpoolEvent(this, - WorkpoolEvent.SINGLE_ADD_WORKER, 1, nodeName); - fireWorkpoolEvent(ev); - } - - public void removeWorkersToNode(int k, String nodeName) { - log.info("Removing a worker to node " + nodeName); - WorkpoolEvent ev = new WorkpoolEvent(this, - WorkpoolEvent.EVENT_MULTIPLE_REMOVE_WORKER, k, nodeName); - fireWorkpoolEvent(ev); - } - - public void removeWorkerToNode(String nodeName) { - log.info("Removing a worker to node " + nodeName); - WorkpoolEvent ev = new WorkpoolEvent(this, - WorkpoolEvent.SINGLE_REMOVE_WORKER, 1, nodeName); - fireWorkpoolEvent(ev); - } - - public synchronized void addListener(WorkpoolBeanListener l) { - this.listeners.add(l); - } - - public synchronized void removeListener(WorkpoolBeanListener l) { - this.listeners.remove(l); - } - - public void setJobComputed(long jobComputed) { - this.jobComputed = jobComputed; - - } - - public void setSingleAction() { - singleAction = true; - } - - public boolean getSingleAction() { - return singleAction; - } - - public long getJobComputed() { - return this.jobComputed; - } -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolBeanListener.java b/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolBeanListener.java deleted file mode 100644 index 0ecc223fed..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolBeanListener.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; - -import java.util.EventListener; - -public interface WorkpoolBeanListener extends EventListener { - public void handleEvent(WorkpoolEvent ev); -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolEvent.java b/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolEvent.java deleted file mode 100644 index 0bdc3671d5..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolEvent.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; - -import java.util.EventObject; - -public class WorkpoolEvent extends EventObject { - - private static final long serialVersionUID = -1273928009411948768L; - - public WorkpoolEvent(Object source) { - super(source); - } - - public WorkpoolEvent(WorkpoolEvent ev) { - super(ev.source); - type = ev.type; - noWorker = ev.noWorker; - nodeName = ev.nodeName; - } - - public WorkpoolEvent(Object source, int typeEv, int worker) { - super(source); - type = typeEv; - noWorker = worker; - nodeName = ""; - } - - public WorkpoolEvent(Object source, int typeEv, int worker, String nodeName) { - super(source); - type = typeEv; - noWorker = worker; - this.nodeName = nodeName; - } - - public String getNodeName() { - return nodeName; - } - - public int getType() { - return type; - } - - public int workers() { - return noWorker; - } - - private int type; - private int noWorker; - private String nodeName; - public static final int EVENT_MULTIPLE_ADD_WORKER = 0; - public static final int EVENT_MULTIPLE_REMOVE_WORKER = 1; - public static final int SINGLE_REMOVE_WORKER = 2; - public static final int SINGLE_ADD_WORKER = 3; -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolManager.java b/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolManager.java deleted file mode 100644 index 6520954bdd..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolManager.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; - -import org.osoa.sca.ServiceReference; -import org.osoa.sca.annotations.OneWay; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface WorkpoolManager { - /* - * @param String rules This are the autonomic rules. The format is the Java - * Drools .drl file. You have to read it - */ - @OneWay - void acceptRules(String rules); - - @OneWay - void start(); - - @OneWay - void stopAutonomicCycle(); - - @OneWay - void startAutonomicCycle(); - - int activeWorkers(); - - void setCycleTime(long time); - - void setWorkpoolReference(ServiceReference serviceReference); -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolManagerImpl.java b/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolManagerImpl.java deleted file mode 100644 index f7c727ad04..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolManagerImpl.java +++ /dev/null @@ -1,555 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; - -import org.osoa.sca.ComponentContext; -import org.osoa.sca.ServiceReference; -import java.util.Collections; -import java.util.Enumeration; -import java.io.IOException; -import java.io.StringReader; -import java.io.StringWriter; -import java.util.Collection; -import java.util.Iterator; -import java.util.Timer; -import java.util.TimerTask; -import java.util.logging.Logger; - -import javax.xml.stream.XMLStreamException; - -import node.TestJob; -import java.io.File; -import java.util.Vector; -import org.apache.axiom.om.OMElement; -import org.apache.tuscany.sca.contribution.service.ContributionResolveException; -import org.apache.tuscany.sca.core.context.CallableReferenceImpl; -import org.apache.tuscany.sca.core.context.ServiceReferenceImpl; -import org.apache.tuscany.sca.databinding.job.Job; -import org.apache.tuscany.sca.node.NodeManagerInitService; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.impl.SCANodeImpl; -import org.osoa.sca.CallableReference; -import org.drools.FactHandle; -import org.drools.RuleBase; -import org.drools.RuleBaseFactory; -import org.drools.StatefulSession; -import org.drools.StatelessSession; -import org.drools.compiler.DroolsParserException; -import org.drools.compiler.PackageBuilder; -import org.drools.rule.Package; -import org.osoa.sca.annotations.Constructor; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.ReentrantLock; - -@Service(interfaces = { NodeManagerInitService.class, WorkpoolManager.class }) -@Scope("COMPOSITE") -/* - * This is the core manager of the workpool application. The Workpool Manager - * holds the reference to each remote node manager. Inside it we've a rule - * engine instance. - */ -public class WorkpoolManagerImpl implements WorkpoolManager, - NodeManagerInitService, WorkpoolBeanListener { - /* - * This inner class trigs the rule engine, at given times: 1. It checks the - * different loads for each nodes and sets the WorkpoolBean 2. It checks the - * Workpool AverageService Time and sets the WorkpoolBean 3. It checks how - * many jobs are already computed and sets the WorkpoolBean Then given the - * configured bean and the rules, run the Rule Engine for executing the - * business logic - */ - class RuleEngineTrigger extends TimerTask { - // private ReentrantLock triggerLock = new ReentrantLock(); - @Override - public void run() { - - System.out.println("Updating WorkpoolBean.."); - // checkActiveWorkers(); - // checkLoadInNodes(); - checkServiceTime(); - // checkEstimedQueueSize(); - // checkArrivalTime(); - getProcessedItem(); - // computeUsageFactor(); - doRun(bean); - } - - } - - private WorkerManager managerNodeB; - private WorkerManager managerNodeC; - private WorkerManager managerNodeD; - private WorkerManager managerNodeE; - - private SCANodeImpl node; - private WorkpoolBean bean = new WorkpoolBean(); - private ReentrantLock handleEventLock = new ReentrantLock(); - private ReentrantLock updateRuleLock = new ReentrantLock(); - - private ServiceReference reference; - private AtomicInteger activeWorkers = new AtomicInteger(0); - private Logger log = Logger.getLogger(WorkpoolManagerImpl.class.getName()); - @Property - protected String workers; - @Property - protected String nodes; - @Property - protected String injection; - @Context - protected ComponentContext workpoolManagerContext; - private CallableReferenceImpl myReference; - private String rules = null; - private boolean referenceInjection = false; - private ConcurrentHashMap workerManagerTable = new ConcurrentHashMap(); - private int workersNo; - private int nodesNo; - private Timer timer = new Timer(); - /* this handle facts */ - private RuleBase ruleBase = null; - private FactHandle handle = null; - private StatefulSession wm = null; - private long cycleTime = 5000; - - @Reference - public void setManagerNodeB(WorkerManager managerNodeB) { - this.managerNodeB = managerNodeB; - workerManagerTable.put("nodeB", managerNodeB); - } - - @Reference - public void setManagerNodeC(WorkerManager managerNodeC) { - this.managerNodeC = managerNodeC; - workerManagerTable.put("nodeC", managerNodeC); - } - - @Reference - public void setManagerNodeD(WorkerManager managerNodeD) { - this.managerNodeD = managerNodeD; - workerManagerTable.put("nodeD", managerNodeD); - } - - @Reference - public void setManagerNodeE(WorkerManager managerNodeE) { - this.managerNodeE = managerNodeE; - workerManagerTable.put("nodeE", managerNodeE); - } - - private void startNewComponents( - Vector> vector) { - log.info("Starting new components"); - WorkpoolService wp = reference.getService(); - // CallableReferenceImpl sink = - // (CallableReferenceImpl) reference; - Job j = new NullJob(); - for (CallableReferenceImpl item : vector) { - // WorkerService service = item.getService(); - // service.start(); - // service.computeFirstTime(j, sink); - log.info("Send PostWorkerReference..."); - wp.PostWorkerReference(item); - } - if (myReference != null) - wp.registerManager(myReference); - } - - public void setCycleTime(long cycle) { - this.cycleTime = cycle; - } - - @SuppressWarnings("unchecked") - /* - * This gets the number of workers workerNo and instantiates them - */ - public void start() { - this.myReference = (CallableReferenceImpl) workpoolManagerContext - .createSelfReference(WorkpoolManager.class, "WorkpoolManager"); - this.workersNo = Integer.parseInt(this.workers); - this.nodesNo = Integer.parseInt(this.nodes); - this.referenceInjection = (Integer.parseInt(this.injection) != 0); - log.info("Starting WorkpoolManager Component with #" + workersNo - + " workers and #" + nodes + " nodes"); - nodesNo = workerManagerTable.values().size(); - // Sets info in the bean. - bean.setWorkers(this.workersNo); - bean.setNodeNumbers(nodesNo); - Vector> workerRefs = new Vector>(); - int exactTimes = workersNo / nodesNo; - for (int i = 0; i < exactTimes; ++i) { - for (WorkerManager manager : workerManagerTable.values()) { - manager.start(); - if (manager != null) { - System.err.println("Actual load = " - + manager.getNodeLoad() + " for node "); - addNewComponent(manager, workerRefs); - } - } - } - - int module = (workersNo % nodesNo); - int n = 0; - if (module > 0) { - Vector v = new Vector(workerManagerTable.keySet()); - Collections.sort(v); - // Iterator iter = - // workerManagerTable.values().iterator(); - // Display (sorted) hashtable. - for (Enumeration e = v.elements(); (e.hasMoreElements() && n < module); ++n) { - String key = e.nextElement(); - WorkerManager m = workerManagerTable.get(key); - System.err.println("Module Actual load = " + m.getNodeLoad() - + " for node "); - addNewComponent(m, workerRefs); - } - } - startNewComponents(workerRefs); - bean.addListener(this); - TimerTask task = new WorkpoolManagerImpl.RuleEngineTrigger(); - timer.scheduleAtFixedRate(task, 3000, cycleTime); - } - - private void checkLoadInNodes() { - System.out.println("CheckLoadInNodes"); - int number = 1; - double loadAverage = 0; - for (WorkerManager manager : workerManagerTable.values()) { - loadAverage += manager.getNodeLoad(); - number++; - } - bean.setLoadAverage(loadAverage / number); - } - - private void computeUsageFactor() { - bean.setUsageFactor(); - } - - private void checkEstimedQueueSize() { - WorkpoolService wp = reference.getService(); - - if (wp != null) { - int size = wp.estimatedQueueSize(); - log.info("Estimed Queue Size =" + size); - bean.setEstimedQueueSize(size); - } - } - - private WorkerManager findMinLoad() { - double load = 0; - // workerManagerTable.values().iterator().next().getNodeLoad(); - WorkerManager toFind = null; - for (WorkerManager manager : workerManagerTable.values()) { - if (load == 0) { - load = manager.getNodeLoad(); - toFind = manager; - } else if (manager.getNodeLoad() < load) { - load = manager.getNodeLoad(); - toFind = manager; - } - } - return toFind; - } - - private void checkServiceTime() { - WorkpoolService wp = reference.getService(); - - if (wp != null) { - double time = wp.getServiceTime(); - log.info("Average System Service Time =" + time); - bean.setAverageServiceTime(time); - } - } - - private void checkArrivalTime() { - WorkpoolService wp = reference.getService(); - - if (wp != null) { - double time = wp.getArrivalTime(); - log.info("Average Arrival Service Time =" + time); - bean.setAverageArrivalTime(time); - } - } - - private void checkActiveWorkers() { - bean.setWorkers(this.activeWorkers()); - } - - private void getProcessedItem() { - WorkpoolService wp = reference.getService(); - if (wp != null) { - long computed = wp.getJobComputed(); - log.info("The system has already computed " + computed + " jobs"); - bean.setJobComputed(computed); - } - } - - private boolean removeComponent(WorkerManager manager, int k) { - manager.removeWorkers(k); - activeWorkers.decrementAndGet(); - return true; - } - - @SuppressWarnings("unchecked") - private boolean addNewComponent(WorkerManager manager, - Vector> workerRefs) { - CallableReferenceImpl workerReference = (CallableReferenceImpl) manager - .addWorker(); - - if (workerReference != null) { - /* if i'll decide to use dynamically generated references */ - if (referenceInjection) { - workerReference.getService(); - String uri = workerReference.getEndpointReference().getURI(); - int nameIndex = uri.indexOf("/"); - String componentName = uri.substring(0, nameIndex); - if (componentName.startsWith("/")) - componentName = uri.substring(1, uri.length()); - if (componentName.endsWith("/")) - componentName = uri.substring(0, uri.length() - 1); - // String componentName = uri.substring(0, nameIndex-1); - - log.info("Adding wire from WorkpoolComponentService to " - + componentName); - String referenceName = "ref" + componentName; - - /* - * I'm updating the WorkpoolServiceComponent with a new - * reference to a just created component I assume that the - * WorkpoolManagerService and the WorkpoolServiceComponent stay - * in the same JVM It's like in the scdl there were: With this then - * I've a wire WorkpoolService---> a new Worker - */ - try { - node.addComponentReferenceWire(referenceName, "nodeA", - "Workpool.composite", "workpool.WorkerServiceImpl", - WorkerService.class, "WorkpoolServiceComponent", - componentName); - } catch (Exception e) { - e.printStackTrace(); - return false; - } - log.info("Sending reference name " + referenceName - + " to WorkpoolService"); - // TODO: this was part of dynamic wiring, but it doesn't work. - // reference.getService().PostWorkerName(referenceName); - - } else { - // log.info("Sending callable reference to WorkpoolService - // placed at -->"+reference); - // reference.getService().PostWorkerReference(workerReference); - workerRefs.add(workerReference); - } - activeWorkers.incrementAndGet(); - return true; - } - return false; - } - - public int activeWorkers() { - - return activeWorkers.get(); - } - - private void doRun(WorkpoolBean bean) { - - long startTime = System.currentTimeMillis(); - updateRuleLock.lock(); - if (wm == null) - wm = ruleBase.newStatefulSession(); - if (this.handle == null) - handle = wm.insert(bean); - else { - wm.update(handle, bean); - } - wm.fireAllRules(); - updateRuleLock.unlock(); - - System.out.println("Engine rule overhead = " - + (System.currentTimeMillis() - startTime)); - } - - private RuleBase readRule(String rule) { - - PackageBuilder packBuilder = new PackageBuilder(); - try { - packBuilder.addPackageFromDrl(new StringReader(rule)); - } catch (DroolsParserException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - Package pkg = packBuilder.getPackage(); - RuleBase ruleBase = RuleBaseFactory.newRuleBase(); - try { - ruleBase.addPackage(pkg); - } catch (Exception e) { - e.printStackTrace(); - } - return ruleBase; - } - - public void acceptRules(String rules) { - this.rules = rules; - if (ruleBase == null) { - RuleBase base = readRule(rules); - if (base != null) { - ruleBase = base; - } - } else { - updateRuleLock.lock(); - // i have already a rule: updating - ruleBase = readRule(rules); - wm = ruleBase.newStatefulSession(); - handle = null; - updateRuleLock.unlock(); - } - - System.out.println("Accepted rules = " + rules); - } - - public String getRules() { - return rules; - } - - private WorkerManager findMaxLoadNode() { - double load = 0.0; - WorkerManager toFind = null; - for (WorkerManager manager : workerManagerTable.values()) { - if (manager.getNodeLoad() > load) { - load = manager.getNodeLoad(); - toFind = manager; - } - } - return toFind; - - } - - public void setWorkpoolReference( - ServiceReference serviceReference) { - reference = serviceReference; - } - - public void setNode(SCANode arg0) { - node = (SCANodeImpl) arg0; - } - - public void handleEvent(WorkpoolEvent ev) { - if (ev == null) - return; - - String nodeName = ev.getNodeName(); - - switch (ev.getType()) { - case WorkpoolEvent.SINGLE_ADD_WORKER: { - if (nodeName != null) { - Vector> workerRefs = new Vector>(); - - // in this case I have a nodeName - if (!nodeName.equals("") - && (workerManagerTable.containsKey(nodeName))) { - WorkerManager manager = workerManagerTable.get(nodeName); - addNewComponent(manager, workerRefs); - startNewComponents(workerRefs); - } else if (nodeName.equals("")) { - WorkerManager manager = findMinLoad(); - addNewComponent(manager, workerRefs); - startNewComponents(workerRefs); - } - } - break; - } - case WorkpoolEvent.EVENT_MULTIPLE_ADD_WORKER: { - Vector> workerRefs = new Vector>(); - - if (nodeName.equals("")) { - - WorkerManager manager = findMinLoad(); - int k = ev.workers(); - for (int h = 0; h < k; ++h) { - addNewComponent(manager, workerRefs); - } - } else { - WorkerManager manager = workerManagerTable - .get(ev.getNodeName()); - int k = ev.workers(); - for (int h = 0; h < k; ++h) { - addNewComponent(manager, workerRefs); - } - } - startNewComponents(workerRefs); - break; - } - case WorkpoolEvent.SINGLE_REMOVE_WORKER: { - if (nodeName != null) { - // in this case I have a nodeName - if (!nodeName.equals("") - && (workerManagerTable.containsKey(nodeName))) { - WorkerManager manager = workerManagerTable.get(nodeName); - removeComponent(manager, 1); - } else if (nodeName.equals("")) { - WorkerManager manager = findMaxLoadNode(); - removeComponent(manager, 1); - } - } - break; - } - case WorkpoolEvent.EVENT_MULTIPLE_REMOVE_WORKER: { - if (nodeName.equals("")) { - WorkerManager manager = findMaxLoadNode(); - removeComponent(manager, ev.workers()); - - } else { - WorkerManager manager = workerManagerTable.get(nodeName); - removeComponent(manager, ev.workers()); - } - break; - } - } - - } - - @Destroy - public void onExit() { - // do cleanup - this.timer.cancel(); - this.timer.purge(); - } - - public void stopAutonomicCycle() { - this.timer.cancel(); - this.timer.purge(); - this.timer = null; - } - - public void startAutonomicCycle() { - if (this.timer == null) { - this.timer = new Timer(); - TimerTask task = new WorkpoolManagerImpl.RuleEngineTrigger(); - timer.schedule(task, 3000, cycleTime); - } - } -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolService.java b/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolService.java deleted file mode 100644 index d84ae549d8..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolService.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; - -import org.apache.tuscany.sca.core.context.CallableReferenceImpl; -import org.apache.tuscany.sca.databinding.annotation.DataBinding; -import org.apache.tuscany.sca.databinding.job.Job; -import org.osoa.sca.annotations.OneWay; -import org.osoa.sca.annotations.Remotable; -import org.osoa.sca.ServiceReference; - -@DataBinding("org.apache.tuscany.sca.databinding.job.Job") -@Remotable -public interface WorkpoolService { - - /* this the functional part */ - void submit(Job i); - - /* the time between two subsequent worker invocations */ - double getServiceTime(); - - /* the number of ResultJob received */ - long getJobComputed(); - - /* the time elapsed between the stream has initiated and now */ - long getElapsedTime(); - - /* the size of the internal queue : it's not accurate */ - int estimatedQueueSize(); - - /* the average time between two consuecutive submit */ - double getArrivalTime(); - - void start(); - - void stop(); - - /* - * this is the part needed by management. May be in future i'll refactor it - * order to hide this part. - */ - @OneWay - void handleResult(Job j, boolean reuse, String string, - CallableReferenceImpl worker, boolean newJob); - - void addTrigger(CallableReferenceImpl reference); - - void removeTrigger(); - - void registerManager( - CallableReferenceImpl createSelfReference); - - /* - * This could placed in another interface definition - think about it These - * methods evict, and evictAll are needed when a worker finish to exist and - * it needs to be evicted by the WorkpoolManager. In the system I have two - * caches: 1) a domain cache, which holds the components URI 2) a - * workerReference cache (implemented by a ConcurrentHashMap), which holds a - * proxy to each worker. Every proxy gets built from the worker callable - * reference. I'm thinking for placing the workerReferenceCache in a local - * interface. Assuming that WorkpoolService and WorkpoolManager are in the - * same JVM. - */ - void evict(String workerURI); - - void evictAll(); - - /* - * these two are no longer needed. I leave it because if i'll have time to - * do dynamic wiring the first one is needed. void PostWorkerName(String - * referenceName); - */ - void PostWorkerReference(CallableReferenceImpl worker); - -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolServiceImpl.java b/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolServiceImpl.java deleted file mode 100644 index 52b88af42c..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/java/workpool/WorkpoolServiceImpl.java +++ /dev/null @@ -1,416 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; - -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicLong; -import java.util.concurrent.locks.ReentrantLock; -import java.util.logging.Logger; -import org.apache.tuscany.sca.core.context.CallableReferenceImpl; -import org.apache.tuscany.sca.databinding.annotation.DataBinding; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; -import org.apache.tuscany.sca.databinding.job.Job; -import org.apache.tuscany.sca.databinding.job.JobDataMap; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.LinkedBlockingQueue; - -/** - * An implementation of the Workpool service. - */ -@Service(WorkpoolService.class) -@Scope("COMPOSITE") -@DataBinding("org.apache.tuscany.sca.databinding.job.Job") -public class WorkpoolServiceImpl implements WorkpoolService, - WorkerServiceCallback { - - /* incoming job queue */ - private LinkedBlockingQueue queue = new LinkedBlockingQueue(5000); - private CallableReferenceImpl trigger = null; - private Trigger forwardResult = null; - /* counter for job's number fetched from the queue and sent to the Worker */ - private AtomicInteger jobSent = new AtomicInteger(0); - /* time for initHandleResult */ - private AtomicLong initHandleResult = new AtomicLong(0); - /* time for endHandleResult */ - private AtomicLong endHandleResult = new AtomicLong(0); - /* - * number of job computed, this will be exposed in order to be used to - * firing rules - */ - private long jobComputed = 0; - /* same as above */ - private AtomicLong elapsedTime = new AtomicLong(0); - /* this is for comuputing averageServiceTime */ - private long times = 1; - /* this is for computing averageArrivalTime */ - private long timesArrival = 1; - private ReentrantLock arrivalLock = new ReentrantLock(); - private long arrivalPrevious = -1; - // private AtomicBoolean processingStopped = new AtomicBoolean(false); - private boolean processingStopped = false; - // private LinkedBlockingQueue triggers = new - // LinkedBlockingQueue(); - @Context - protected ComponentContext workpoolContext; - private CallableReferenceImpl manager; - private long previousSubmitTime = -1; - private boolean firstTime = true; - private boolean first = true; - private long start = 0; - private long end = 0; - private double averageServiceTime = 0; - private double averageArrivalTime = 0; - private int workersNo = 0; - private final Job nullJob = new NullJob(); - /* This is useful for counting the start and end */ - private Logger log = Logger.getLogger(WorkpoolServiceImpl.class.getName()); - private ReentrantLock handleResultLock = new ReentrantLock(); - private ReentrantLock postWorkerReferenceLock = new ReentrantLock(); - private ConcurrentHashMap cacheReference = new ConcurrentHashMap(); - private CallableReferenceImpl myReference; - private String previuosURI = ""; - private long time = 0; - - private void computeAverageTime() { - long actualServiceTime = 0; - // if the processing is finished - if (processingStopped) - return; - - if (firstTime == true) { - this.previousSubmitTime = System.currentTimeMillis(); - this.averageServiceTime = 0; - firstTime = false; - } else { - actualServiceTime = System.currentTimeMillis() - - this.previousSubmitTime; - this.previousSubmitTime = System.currentTimeMillis(); - averageServiceTime = ((averageServiceTime * times) + actualServiceTime) - / (times + 1); - ++times; - } - } - - public void submit(Job j) { - try { - // log.info("Submit job in queue -->"+ j.getType()); - // processingStopped.set(false); - try { - arrivalLock.lock(); - if (this.arrivalPrevious == -1) { - arrivalPrevious = System.currentTimeMillis(); - averageArrivalTime = 0; - } - double actualArrivalTime = System.currentTimeMillis() - - arrivalPrevious; - averageArrivalTime = ((averageArrivalTime * timesArrival) + actualArrivalTime) - / (timesArrival + 1); - arrivalPrevious = System.currentTimeMillis(); - ++timesArrival; - } finally { - arrivalLock.unlock(); - } - queue.put(j); - } catch (Exception e) { - log.info("Exception in queue"); - queue.clear(); - e.printStackTrace(); - } - } - - public double getArrivalTime() { - return this.averageArrivalTime; - } - - public double getServiceTime() { - return this.averageServiceTime; - } - - public void receiveResult(Job resultType, boolean reuse, String workerURI) { - - if (reuse) { - queue.add(resultType); - return; - } - - computeAverageTime(); - Job job = null; - try { - job = queue.take(); - } catch (InterruptedException e) { - // TODO Better exception handling --> see Exception antipattern doc - e.printStackTrace(); - return; - } - - if ((job != null) && (job.eos() == false)) { - int nameIndex = workerURI.indexOf("/"); - String workerName = workerURI.substring(0, nameIndex - 1); - log.info("Sending job to worker --> " + workerName); - WorkerService worker = workpoolContext.getService( - WorkerService.class, workerName); - worker.compute(job); - } - - JobDataMap map = ((ResultJob) resultType).getDataMap(); - if (map != null) { - ++jobComputed; - Object obj = map.getJobDataObject("result"); - System.out.println("Result = " + ((Double) obj).doubleValue()); - } - - } - - public void start() { - log.info("WorkpoolServiceComponent started..."); - myReference = (CallableReferenceImpl) workpoolContext - .createSelfReference(WorkpoolService.class, "WorkpoolService"); - myReference.getService(); - } - - /* - * - * This method is called by WorkpoolManagerImpl, when it creates a new - * worker component in order to dispatch worker to the WorkpoolServiceImpl - * @param CallableReferenceImpl reference - a dynamically created reference - * from the Worker - */ - public void PostWorkerReference( - CallableReferenceImpl reference) { - - try { - long initPostWorkerReference; - long endPostWorkerReference; - this.postWorkerReferenceLock.lock(); - - initPostWorkerReference = System.currentTimeMillis(); - WorkerService worker; - worker = reference.getService(); - worker.start(); - - ++workersNo; - if (myReference != null) { - - // Job poison = new ResultJob(); - this.postWorkerReferenceLock.unlock(); - log.info("Sending null job to worker"); - worker.computeFirstTime(nullJob, myReference); - // queue.put(poison); - endPostWorkerReference = System.currentTimeMillis(); - System.out.println("Time PostWorker =" - + (endPostWorkerReference - initPostWorkerReference)); - } else { - log.info("myReference is null"); - - } - } catch (Exception e) { - postWorkerReferenceLock.unlock(); - } finally { - } - - } - - /* - * FIXME This method currently is not used because i've not yet ready - * dynamic wire injection - */ - - public void PostWorkerName(String referenceName) { - /* TODO Do something similar to PostWorkerReference */ - } - - private void printComputingTime(Job j) { - - if (first == true) { - first = false; - start = System.currentTimeMillis(); - end = System.currentTimeMillis(); - } else { - end = System.currentTimeMillis(); - System.out.println("Elapsed Time = " + (end - start)); - elapsedTime.set(end - start); - } - /* - * i could use reflection or instance of (but it's a penalty kick) , or - * an object as result, but i'd prefer a job so i've defined a - * RESULT_JOB There're in the system three kind of jobs: RESULT_JOB, - * NULL_JOB, DEFAULT_JOB - */ - if ((j != null) && (j.getType() == Job.RESULT_JOB)) { - jobComputed++; - ResultJob result = (ResultJob) j; - JobDataMap map = result.getDataMap(); - if (map != null) { - Double doubleValue = (Double) map.getJobDataObject("result"); - System.out - .println("ResultValue = " + doubleValue.doubleValue()); - } - - } - - } - - public void handleResult(Job resultType, boolean reuse, String workerURI, - CallableReferenceImpl worker, boolean newWorker) { - initHandleResult.set(System.nanoTime()); - if (reuse) { - log.info("Reusing a job.."); - queue.add(resultType); - return; - } - // init job variable - Job job; - if (newWorker) - System.out.println("newWorkerActivation= " + System.nanoTime()); - printComputingTime(resultType); - - try { - job = queue.take(); - } catch (Exception e) { - log.info("Exception during fetching the queue"); - e.printStackTrace(); - return; - } - - try { - // it needs to be locked because multiple threads could invoke this. - handleResultLock.lock(); - if (previuosURI.equals("")) { - time = System.currentTimeMillis(); - this.previuosURI = workerURI; - } else { - if (previuosURI.equals(workerURI)) - System.out.println("Complete ComputeTime for an item =" - + (time - System.currentTimeMillis())); - } - if (job.eos()) { - long endTime = System.currentTimeMillis(); - /* checking for EOS */ - if (processingStopped == false) { - processingStopped = true; - System.out.println("GOT EOS in time=" + (endTime - start)); - log.info("Stop autonomic cycle.."); - /* - * I'm doing this because i want that in the termination i - * would have more jobs with eos == true than workers. So - * i'm sure that every worker removes itself from its - * manager. I do it only one time. This is necessary because - * i have a variable number of workers. The number of - * workers in the system might change every time the rule - * engine cycle gets executed. - */ - ResultJob poison = new ResultJob(); - for (int i = 0; i < workersNo; ++i) { - try { - - queue.put(poison); - - } catch (Exception e) { - log.info("Cannot duplicate poison tokens"); - break; - } - - } - manager.getService().stopAutonomicCycle(); - } - } - computeAverageTime(); - System.out.println("AverageTime =" + averageServiceTime); - if (job != null) { - - WorkerService workerService; - /* - * the workpool has a high reuse, i always call the same - * component set or un superset or subset, so i cache it. When - * the WorkpoolManager will remove an item, it removes still - * this cache entry - */ - if (!cacheReference.containsKey(workerURI)) { - workerService = worker.getService(); - handleResultLock.unlock(); - cacheReference.put(workerURI, workerService); - } else { - handleResultLock.unlock(); - workerService = cacheReference.get(workerURI); - } - // it's still a penalty kick locking compute because it's going - // to be scheduled whereas it's async. - workerService.compute(job); - log.info("Sent job #" + jobSent.incrementAndGet() - + " Queue size " + queue.size()); - endHandleResult.set(System.nanoTime()); - System.out - .println("begin:handleResult ==> end:handleResult:compute = " - + (endHandleResult.addAndGet(-(initHandleResult - .get())) / 1000000)); - } - } catch (Exception e) { - handleResultLock.unlock(); - } - } - - public void evictAll() { - cacheReference.clear(); - } - - public void evict(String workerURI) { - if (cacheReference.containsKey(workerURI)) { - cacheReference.remove(workerURI); - } - - } - - public int estimatedQueueSize() { - return queue.size(); - } - - public long getElapsedTime() { - return elapsedTime.get(); - } - - public long getJobComputed() { - return jobComputed; - } - - public void registerManager( - CallableReferenceImpl createSelfReference) { - manager = createSelfReference; - - } - - public void stop() { - // TODO Auto-generated method stub - - } - - public void addTrigger(CallableReferenceImpl reference) { - this.trigger = reference; - this.forwardResult = reference.getService(); - - } - - public void removeTrigger() { - this.trigger = null; - this.forwardResult = null; - } -} diff --git a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml b/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml deleted file mode 100644 index b3e2d16c05..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeA/Workpool.composite b/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeA/Workpool.composite deleted file mode 100644 index 9a00a8e839..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeA/Workpool.composite +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - 4 - 4 - 0 - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml b/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml deleted file mode 100644 index b3e2d16c05..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeB/Workpool.composite b/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeB/Workpool.composite deleted file mode 100644 index a71dc9e08a..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeB/Workpool.composite +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - nodeB - Workpool.composite - workpool.MyWorker - - - - - - - - - - diff --git a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml b/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml deleted file mode 100644 index b3e2d16c05..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeC/Workpool.composite b/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeC/Workpool.composite deleted file mode 100644 index 771db5370b..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeC/Workpool.composite +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - nodeC - Workpool.composite - workpool.MyWorker - - - - - - - - - - diff --git a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeD/META-INF/sca-contribution.xml b/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeD/META-INF/sca-contribution.xml deleted file mode 100644 index b3e2d16c05..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeD/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeD/Workpool.composite b/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeD/Workpool.composite deleted file mode 100644 index 55fd48934f..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeD/Workpool.composite +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - nodeD - Workpool.composite - workpool.MyWorker - - - - - - - - - - diff --git a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeE/META-INF/sca-contribution.xml b/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeE/META-INF/sca-contribution.xml deleted file mode 100644 index b3e2d16c05..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeE/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeE/Workpool.composite b/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeE/Workpool.composite deleted file mode 100644 index 1dc9ccfcea..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/main/resources/nodeE/Workpool.composite +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - nodeE - Workpool.composite - workpool.MyWorker - - - - - - - - - - diff --git a/branches/sca-android/demos/workpool-distributed/src/test/java/workpool/AComponent.java b/branches/sca-android/demos/workpool-distributed/src/test/java/workpool/AComponent.java deleted file mode 100644 index 5c20537fab..0000000000 --- a/branches/sca-android/demos/workpool-distributed/src/test/java/workpool/AComponent.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package workpool; - -public interface AComponent { - public static final int RETURN_VALUE = 1; - - public void greet(); -} diff --git a/branches/sca-android/demos/workpool-distributed/workerRules.drl b/branches/sca-android/demos/workpool-distributed/workerRules.drl deleted file mode 100644 index e7ebcad4c0..0000000000 --- a/branches/sca-android/demos/workpool-distributed/workerRules.drl +++ /dev/null @@ -1,9 +0,0 @@ -package workpool -import workpool.*; -rule "WorkerAdder" - when - $workerBean: WorkpoolBean(singleAction == false && (jobComputed > 500)) - then - $workerBean.addWorkerToNode("nodeB"); - $workerBean.setSingleAction(); -end diff --git a/branches/sca-android/demos/workpool-distributed/workerRules1.drl b/branches/sca-android/demos/workpool-distributed/workerRules1.drl deleted file mode 100644 index 6fa0b85ba2..0000000000 --- a/branches/sca-android/demos/workpool-distributed/workerRules1.drl +++ /dev/null @@ -1,9 +0,0 @@ -package workpool -import workpool.*; -rule "WorkerAdder" - when - $workerBean: WorkpoolBean(averageServiceTime > 250) - then - $workerBean.addWorkerToNode("nodeB"); - $workerBean.setSingleAction(); -end diff --git a/branches/sca-android/demos/workpool-distributed/workerRules2.drl b/branches/sca-android/demos/workpool-distributed/workerRules2.drl deleted file mode 100644 index 9d9551c3ea..0000000000 --- a/branches/sca-android/demos/workpool-distributed/workerRules2.drl +++ /dev/null @@ -1,8 +0,0 @@ -package workpool -import workpool.*; -rule "WorkerAverageService" - when - $workerBean: WorkpoolBean(jobComputed > 250) - then - $workerBean.addWorkerToNode("nodeB"); -end diff --git a/branches/sca-android/demos/workpool-distributed/workerRules3.drl b/branches/sca-android/demos/workpool-distributed/workerRules3.drl deleted file mode 100644 index a67af910a4..0000000000 --- a/branches/sca-android/demos/workpool-distributed/workerRules3.drl +++ /dev/null @@ -1,14 +0,0 @@ -package workpool -import workpool.*; -rule "AdaptUsageFactor" - when - $workerBean: WorkpoolBean(usageFactor > 0.8) - then - $workerBean.addWorkerToNode(""); -end -rule "AdaptQueueFull" - when - $workerBean: WorkpoolBean((estimedQueueSize > 1900) && jobsComputed > 100) - then - $workerBean.addWorkerToNode("nodeB") -end \ No newline at end of file diff --git a/branches/sca-android/demos/xml-bigbank/LICENSE b/branches/sca-android/demos/xml-bigbank/LICENSE deleted file mode 100644 index 6e529a25c4..0000000000 --- a/branches/sca-android/demos/xml-bigbank/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/demos/xml-bigbank/NOTICE b/branches/sca-android/demos/xml-bigbank/NOTICE deleted file mode 100644 index 1325efd8bf..0000000000 --- a/branches/sca-android/demos/xml-bigbank/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/demos/xml-bigbank/README b/branches/sca-android/demos/xml-bigbank/README deleted file mode 100644 index 3bdeeca60a..0000000000 --- a/branches/sca-android/demos/xml-bigbank/README +++ /dev/null @@ -1,46 +0,0 @@ -XML BigBank Demo -================ - -This demo showcases the integration with XML technolgies in the service assembly. - -Note: The live stock quote web service is not always running. Sometimes empty response is returned and the stock value is 0. - -To run the demo, type "ant run" and it will produce the following output. - -Buildfile: build.xml - -init: - [get] Getting: http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx?WSDL - [get] To: C:\Apache\tuscany-sca-1.0.1-incubating\demos\xml-bigbank\src\main\resources\wsdl\StockQuotes.wsdl - [get] local file date : Tue Nov 06 15:50:37 PST 2007 - [get] . - [get] last modified = Wed Dec 31 16:00:00 PST 1969 - using current time instead - [mkdir] Created dir: C:\Apache\tuscany-sca-1.0.1-incubating\demos\xml-bigbank\target\classes - -compile: - [javac] Compiling 11 source files to C:\Apache\tuscany-sca-1.0.1-incubating\demos\xml-bigbank\target\classes - [copy] Copying 6 files to C:\Apache\tuscany-sca-1.0.1-incubating\demos\xml-bigbank\target\classes - [jar] Building jar: C:\Apache\tuscany-sca-1.0.1-incubating\demos\xml-bigbank\target\demo-xml-bigbank.jar - -run: - [java] Nov 6, 2007 3:52:28 PM org.apache.axis2.deployment.DeploymentEngine loadFromClassPath - [java] INFO: Module validation failed: The system is attempting to engage a module that is not available: rampart - [java] Retrieving exchange rate... - [java] Nov 6, 2007 3:52:29 PM org.apache.tuscany.sca.binding.feed.provider.RSSBindingInvoker invoke - [java] INFO: >>> RSSBindingInvoker (rss_2.0) http://ansuz.sooke.bc.ca/rippy/exchange/?M=R&B=USD&F=CAD,CNY,EUR&T=F&S=O&I=S - [java] Exchange rate: USD 1.0=EUR 0.68705 - [java] Loading account data... - [java] Getting stock quote... - [java] Nov 6, 2007 3:52:30 PM org.apache.commons.httpclient.HttpMethodBase readResponse - [java] INFO: Discarding unexpected response: HTTP/1.1 100 Continue - [java] Calculating total value... - [java] Checking Balance: xs:double: 1000 - [java] Saving Blance: xs:double: 20000 - [java] Stock Value: xs:integer: 0 - [java] Total Value [1]: xs:double: 21000 - [java] Total Value=USD 21000.0 - [java] EUR: 14428.050000000001 - -BUILD SUCCESSFUL -Total time: 7 seconds - diff --git a/branches/sca-android/demos/xml-bigbank/build.xml b/branches/sca-android/demos/xml-bigbank/build.xml deleted file mode 100644 index 0ba1b069aa..0000000000 --- a/branches/sca-android/demos/xml-bigbank/build.xml +++ /dev/null @@ -1,63 +0,0 @@ - - -]> - - - &buildDependency; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/xml-bigbank/pom.xml b/branches/sca-android/demos/xml-bigbank/pom.xml deleted file mode 100644 index b6a8b82f3e..0000000000 --- a/branches/sca-android/demos/xml-bigbank/pom.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-demos - 1.4-SNAPSHOT - ../pom.xml - - demo-xml-bigbank - jar - Apache Tuscany SCA XML BigBank Demo - Apache Tuscany SCA XML BigBank Demo - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-binding-rss-rome - 1.4-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-databinding-saxon - 1.4-SNAPSHOT - runtime - - - - - org.apache.tuscany.sca - tuscany-implementation-xquery - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - bigbank.BigBankClient - true - - - generate - - - - - - - - - diff --git a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/AccountData.java b/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/AccountData.java deleted file mode 100644 index c3ae8d0912..0000000000 --- a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/AccountData.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank; - -import java.io.IOException; - -import javax.xml.stream.XMLStreamReader; - -/** - * @version $Rev$ $Date$ - */ -public interface AccountData { - /** - * Get the StAX stream that represent the accounts data - * @return The StAX stream containign the accounts - * @throws IOException - */ - XMLStreamReader getAccounts() throws IOException; -} diff --git a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java b/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java deleted file mode 100644 index 1c0c612987..0000000000 --- a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/AccountDataImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank; - -import java.io.IOException; -import java.net.URL; - -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamReader; - -import org.osoa.sca.annotations.Service; - -/** - * @version $Rev$ $Date$ - */ -@Service(AccountData.class) -public class AccountDataImpl implements AccountData { - private XMLInputFactory factory = XMLInputFactory.newInstance(); - - public XMLStreamReader getAccounts() throws IOException { - URL doc = getClass().getResource("/accounts.xml"); - XMLStreamReader reader = null; - try { - reader = factory.createXMLStreamReader(doc.openStream()); - } catch (Exception e) { - e.printStackTrace(); - } - return reader; - } - -} diff --git a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/AccountService.java b/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/AccountService.java deleted file mode 100644 index 4c72384e7b..0000000000 --- a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/AccountService.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank; - - -/** - * @version $Rev$ $Date$ - */ -public interface AccountService { - /** - * Get the total value of all accounts owned by the customer - * @return The total value - */ - double getTotalValue(); -} diff --git a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/AccountServiceImpl.java b/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/AccountServiceImpl.java deleted file mode 100644 index 2ce1e86062..0000000000 --- a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/AccountServiceImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank; - -import java.io.StringReader; - -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamReader; - -import org.apache.axiom.om.OMElement; -import org.osoa.sca.ServiceRuntimeException; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * @version $Rev$ $Date$ - */ -@Service(AccountService.class) -public class AccountServiceImpl implements AccountService { - private static final String STOCK_QUOTE_REQUEST = - "IBM GOOG MSFT"; - - private XMLInputFactory factory = XMLInputFactory.newInstance(); - - @Reference - protected ExchangeRate exchangeRate; - - @Reference - protected StockQuote stockQuote; - - @Reference - protected AccountData accountData; - - @Reference - protected StockValue stockValue; - - @Property - protected String currency; - - public double getTotalValue() { - try { - double rate = exchangeRate.getExchangeRate(currency); - - System.out.println("Loading account data..."); - XMLStreamReader accounts = accountData.getAccounts(); - - System.out.println("Getting stock quote..."); - XMLStreamReader request = factory.createXMLStreamReader(new StringReader(STOCK_QUOTE_REQUEST)); - - OMElement quotes = stockQuote.GetQuote(request); - - String xml = quotes.getText(); - System.out.println(xml); - XMLStreamReader qts = factory.createXMLStreamReader(new StringReader(xml)); - System.out.println("Calculating total value..."); - double value = stockValue.calculate(qts, accounts); - - System.out.println("Total Value=USD " + value); - - return value * rate; - } catch (Exception e) { - throw new ServiceRuntimeException(e); - } - } - -} diff --git a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java b/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java deleted file mode 100644 index a7703787fb..0000000000 --- a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/BigBankClient.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program to invoke the Account service - */ -public class BigBankClient { - - public static void main(String[] args) throws Exception { - - SCADomain domain = SCADomain.newInstance("BigBank.composite"); - AccountService accountService = domain.getService(AccountService.class, "AccountService"); - - System.out.println("EUR: " + accountService.getTotalValue()); - } -} diff --git a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java b/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java deleted file mode 100644 index f5f1ca90b6..0000000000 --- a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/BigBankServer.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * @version $Rev$ $Date$ - */ -public class BigBankServer { - public static void main(String[] args) throws Exception { - - System.out.println("Starting the BigBank Service..."); - - SCADomain domain = SCADomain.newInstance("http://localhost", "/", "BigBank.composite"); - - System.out.println("Press Enter to Exit..."); - System.in.read(); - - domain.close(); - System.out.println("Bye"); - } -} diff --git a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java b/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java deleted file mode 100644 index bb8ff85f45..0000000000 --- a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/CurrencyExchange.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank; - -import org.osoa.sca.annotations.Remotable; - -import com.sun.syndication.feed.synd.SyndFeed; - -/** - * @version $Rev$ $Date$ - */ -@Remotable -public interface CurrencyExchange { - /** - * Get the currency exchange rates as a RSS feed - * @return - */ - SyndFeed getRates(); -} diff --git a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/ExchangeRate.java b/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/ExchangeRate.java deleted file mode 100644 index 358e5e19a2..0000000000 --- a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/ExchangeRate.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank; - -/** - * @version $Rev$ $Date$ - */ -public interface ExchangeRate { - /** - * Look up the exchange rate of a currency against USD - * @param currency The currency - * @return The exchange rate - */ - double getExchangeRate(String currency); -} diff --git a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/ExchangeRateImpl.java b/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/ExchangeRateImpl.java deleted file mode 100644 index fcb3707cfe..0000000000 --- a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/ExchangeRateImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank; - -import java.io.ByteArrayInputStream; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.xpath.XPath; -import javax.xml.xpath.XPathConstants; -import javax.xml.xpath.XPathExpression; -import javax.xml.xpath.XPathFactory; - -import org.osoa.sca.ServiceRuntimeException; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.w3c.dom.Document; -import org.w3c.dom.Node; - -import com.sun.syndication.feed.synd.SyndEntry; -import com.sun.syndication.feed.synd.SyndFeed; - -/** - * @version $Rev$ $Date$ - */ -@Service(ExchangeRate.class) -public class ExchangeRateImpl { - @Reference - protected CurrencyExchange exchangeRate; - - private final DocumentBuilder builder; - - public ExchangeRateImpl() { - try { - builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); - } catch (ParserConfigurationException e) { - throw new IllegalArgumentException(e); - } - } - - /** - * Retrieve the live currency exchange rate from a live feed and extract the data for a given - * currecy using XPath - * @param currency The currency - * @return The exchange rate - */ - public double getExchangeRate(String currency) { - try { - System.out.println("Retrieving exchange rate..."); - SyndFeed feed = exchangeRate.getRates(); - SyndEntry entry = (SyndEntry)feed.getEntries().get(0); - String rateTable = entry.getDescription().getValue(); - - Document doc = builder.parse(new ByteArrayInputStream(rateTable.getBytes())); - Node node = doc.getDocumentElement(); - XPath path = XPathFactory.newInstance().newXPath(); - XPathExpression exp = path.compile("/TABLE/TR[TD[1]='" + currency.toUpperCase() + "']/TD[2]"); - Node rateNode = (Node)exp.evaluate(node, XPathConstants.NODE); - double rate = Double.valueOf(rateNode.getTextContent().trim()); - System.out.println("Exchange rate: USD 1.0=" + currency + " " + rate); - return rate; - } catch (Exception e) { - throw new ServiceRuntimeException(e); - } - } -} diff --git a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java b/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java deleted file mode 100644 index 26753a9e9e..0000000000 --- a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/StockQuote.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank; - -import javax.xml.stream.XMLStreamReader; - -import org.apache.axiom.om.OMElement; -import org.osoa.sca.annotations.Remotable; - -/** - * @version $Rev$ $Date$ - */ -@Remotable -public interface StockQuote { - /** - * Invoke the stock quote web service to get the live quotes - * @param input The StAX stream of the request - * @return The StAX stream of the response - */ - public OMElement GetQuote(XMLStreamReader input); -} diff --git a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/StockValue.java b/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/StockValue.java deleted file mode 100644 index c300103398..0000000000 --- a/branches/sca-android/demos/xml-bigbank/src/main/java/bigbank/StockValue.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank; - -import javax.xml.stream.XMLStreamReader; - -import org.osoa.sca.annotations.Remotable; - -/** - * @version $Rev$ $Date$ - */ -@Remotable -public interface StockValue { - /** - * Join the quotes and accounts document to calculate the value - * @param quotes The quotes XML document - * @param accounts The accounts XML document - * @return The value - */ - double calculate(XMLStreamReader quotes, XMLStreamReader accounts); -} diff --git a/branches/sca-android/demos/xml-bigbank/src/main/resources/BigBank.composite b/branches/sca-android/demos/xml-bigbank/src/main/resources/BigBank.composite deleted file mode 100644 index 8afde4bf80..0000000000 --- a/branches/sca-android/demos/xml-bigbank/src/main/resources/BigBank.composite +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - EUR - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/demos/xml-bigbank/src/main/resources/accounts.xml b/branches/sca-android/demos/xml-bigbank/src/main/resources/accounts.xml deleted file mode 100644 index 52ffd41fa7..0000000000 --- a/branches/sca-android/demos/xml-bigbank/src/main/resources/accounts.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - John - Smith - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/demos/xml-bigbank/src/main/resources/customer.xsd b/branches/sca-android/demos/xml-bigbank/src/main/resources/customer.xsd deleted file mode 100644 index b22efb74c4..0000000000 --- a/branches/sca-android/demos/xml-bigbank/src/main/resources/customer.xsd +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/demos/xml-bigbank/src/main/resources/stock.xq b/branches/sca-android/demos/xml-bigbank/src/main/resources/stock.xq deleted file mode 100644 index 03c19e457d..0000000000 --- a/branches/sca-android/demos/xml-bigbank/src/main/resources/stock.xq +++ /dev/null @@ -1,52 +0,0 @@ -(: - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. -:) -declare namespace q="http://www.webserviceX.NET/"; -declare namespace c="http://example.com/customer"; -declare namespace stock="scaservice:java/bigbank.StockValue"; -(: declare namespace currency="scaproperty:java/java.lang.String"; :) - -declare function stock:calculate($quoteDoc, $accountDoc) as xs:double { - let $checking := - trace( - sum( - for $a in $accountDoc/c:customer/c:accounts/c:checking - return $a/@balance - ), "Checking Balance") - - let $saving := - trace( - sum( - for $a in $accountDoc/c:customer/c:accounts/c:saving - return $a/@balance - ), "Saving Blance") - - let $value := - trace( - sum( - for $quote in $quoteDoc/StockQuotes/Stock, - $account in $accountDoc/c:customer/c:accounts/c:stock - where string($quote/Symbol) = string($account/@symbol) - return - trace(number($quote/Last),"Stock Price") * trace(number($account/@quantity), "Quantity") - ), "Stock Value") - return trace($checking + $saving + $value, "Total Value") -}; - - - diff --git a/branches/sca-android/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl b/branches/sca-android/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl deleted file mode 100644 index 8411e22ff7..0000000000 --- a/branches/sca-android/demos/xml-bigbank/src/main/resources/wsdl/StockQuotes.wsdl +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-android/demos/xml-bigbank/xml-bigbank.png b/branches/sca-android/demos/xml-bigbank/xml-bigbank.png deleted file mode 100644 index 0743a413a3..0000000000 Binary files a/branches/sca-android/demos/xml-bigbank/xml-bigbank.png and /dev/null differ diff --git a/branches/sca-android/demos/xml-bigbank/xml-bigbank.svg b/branches/sca-android/demos/xml-bigbank/xml-bigbank.svg deleted file mode 100644 index c7acc03324..0000000000 --- a/branches/sca-android/demos/xml-bigbank/xml-bigbank.svg +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - BigBank - AccountData(Local file orDatabase) - - StockValue (XQuery) - - - - - - - - - - - - - - WS XML Feed(rss) - - 1 - - - - 2 - - - - 3 - - - - 4 - - - - AccountService (Java) - - - ExchangeRate (Java) - - StockQuote(Live WebService) CurrencyExchangeRate (Live RSS Feed) - - - - diff --git a/branches/sca-android/itest/build-was-integration.xml b/branches/sca-android/itest/build-was-integration.xml deleted file mode 100644 index 03de4c050f..0000000000 --- a/branches/sca-android/itest/build-was-integration.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - Installing war ${application.war} on ${application.server} using name ${application.name} and context root ${application.contextRoot} - - - - - Starting application ${application.name} on ${application.server} - - - - - - - Uninstalling ${application.name} - - - - - - - diff --git a/branches/sca-android/itest/pom.xml b/branches/sca-android/itest/pom.xml index b2af34b305..f18ce5f455 100644 --- a/branches/sca-android/itest/pom.xml +++ b/branches/sca-android/itest/pom.xml @@ -45,12 +45,6 @@ - - ${basedir}/build-was-integration.xml - ${basedir}/wasAdmin.py - - - default @@ -58,658 +52,8 @@ true - bpel - builder - callablereferences - callablereferences-ws - callback-api - callback-basic - callback-complex-type - callback-id - callback-multiple-wires - callback-separatethread - callback-set-callback - callback-set-conversation - component-type - contribution - contribution-multiple - contribution-import-export - contribution-classloader - conversations - corba - conversations-ws - databindings - - exceptions - exceptions-cross-binding - exceptions-cross-binding-ws - exceptions-simple-ws - extended-api - interfaces - - jms - jms-args - jms-callbacks - jms-definitions - jms-selectors - large-sdo-ws - late-reference-resolution - oneway - operation-overloading - osgi-implementation - osgi-contribution - policy - policy-security - policy-security-basicauth - policy-security-jsr250 - properties - recursive - recursive-multi-level - recursive-ws - references - serialization - services - spring - scopes - transaction - validation - wires - wsdl - wsdlless - wsdl2java - wsdl-multiple - ws-void-args-return - - - - webapp - - false - - - - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.4-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-host-webapp-junit - 1.4-SNAPSHOT - runtime - - - javax.servlet - servlet-api - 2.3 - provided - - - - - callback-api - callback-basic - - callback-id - callback-multiple-wires - callback-set-callback - callback-set-conversation - - conversations - exceptions - exceptions-cross-binding - extended-api - oneway - operation-overloading - - references - services - component-type - interfaces - wires - scopes - large-sdo-ws - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.3.1 - - true - - - - - - - - - - - - - org.apache.tuscany.sca - tuscany-maven-web-junit - 1.4-SNAPSHOT - - - generate-web-xml - process-resources - - generate - - - - - - - - org.apache.maven.plugins - maven-war-plugin - 2.0.2 - - false - - WEB-INF/lib/tuscany-host-tomcat-*.jar,WEB-INF/lib/tuscany-host-jetty-*.jar,servlet-api-*.jar, WEB-INF/lib/catalina*.jar,WEB-INF/classes/META-INF/sca-contribution*.xml - - - - - - ${project.build.directory}/test-classes - WEB-INF/classes - - - - ${project.build.directory}/classes/META-INF - - sca-contribution*.xml - - META-INF - - - - - ${settings.localRepository}/junit/junit/4.2 - - junit-4.2.jar - - WEB-INF/lib - - - - - - - package - - war - - - - - - - - - - tomcat - - false - - - - 8085 - http://127.0.0.1:${http.port} - ${env.CATALINA_HOME} - - - - - - org.apache.tuscany.sca - tuscany-maven-web-junit - 1.4-SNAPSHOT - - - generate-web-xml - process-resources - - generate - - - - web-junit-test - - ${http.base}/${project.build.finalName}/junit?op=runAll - - integration-test - - test - - - - - - org.codehaus.cargo - cargo-maven2-plugin - - - start-container - pre-integration-test - - start - - - - stop-container - post-integration-test - - stop - - - - - - tomcat5x - installed - ${tomcat.home} - - - org.apache.commons.logging.impl.SimpleLog - - - - false - - - ${http.port} - - - - ${project.build.directory}/${project.build.finalName}.war - ${http.base}/${project.build.finalName}/junit?op=list - war - - - ${project.build.directory}/cargo-tomcat - - - - - - - - - - - jetty - - false - - - - 8085 - http://127.0.0.1:${http.port} - ${env.JETTY_HOME} - - - - - - org.apache.tuscany.sca - tuscany-maven-web-junit - 1.4-SNAPSHOT - - - generate-web-xml - process-resources - - generate - - - - web-junit-test - - ${http.base}/${project.build.finalName}/junit?op=runAll - - integration-test - - test - - - - - - org.codehaus.cargo - cargo-maven2-plugin - - - start-container - pre-integration-test - - start - - - - stop-container - post-integration-test - - stop - - - - - - jetty6x - embedded - ${jetty.home} - - - org.apache.commons.logging.impl.SimpleLog - - - - false - - - ${http.port} - - - - ${project.build.directory}/${project.build.finalName}.war - ${http.base}/${project.build.finalName}/junit?op=list - war - - - ${project.build.directory}/cargo-jetty - - - - - - - - - geronimo - - false - - - - 8080 - http://127.0.0.1:${http.port} - ${env.GERONIMO_HOME} - - - - - - - org.apache.tuscany.sca - tuscany-maven-web-junit - 1.4-SNAPSHOT - - - generate-web-xml - - true - - process-resources - - generate - - - - web-junit-test - - ${http.base}/${project.build.finalName}/junit?op=runAll - - integration-test - - test - - - - - - - org.apache.geronimo.plugins - geronimo-maven-plugin - 2.1.1 - - ${geronimo.home} - - - - start-container - pre-integration-test - - start - - - true - - - - deploy-war - pre-integration-test - - deploy - - - ${project.build.directory}/${project.build.finalName}.war - - - - undeploy-war - post-integration-test - - undeploy - - - ${groupId}/${artifactId}/${version}/war - - - - stop-container - post-integration-test - - stop - - - system - manager - - - - - - - - - - websphere - - false - - - 8080 - http://127.0.0.1:${http.port} - ${env.WAS_HOME} - - - - - - - org.apache.tuscany.sca - tuscany-maven-web-junit - 1.4-SNAPSHOT - - - generate-web-xml - process-resources - - generate - - - - web-junit-test - integration-test - - test - - - ${http.base}/${project.build.finalName}/junit?op=runAll - - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.1 - - - - start-container - pre-integration-test - - run - - - - - - - - - - deploy-war - pre-integration-test - - run - - - - - - - - - - - - - - - - undeploy-war - post-integration-test - - run - - - - - - - - - - - - - stop-container - post-integration-test - - run - - - - - - - - - - - - - - - diff --git a/branches/sca-android/itest/wasAdmin.py b/branches/sca-android/itest/wasAdmin.py deleted file mode 100644 index 2be2b1eff7..0000000000 --- a/branches/sca-android/itest/wasAdmin.py +++ /dev/null @@ -1,91 +0,0 @@ -""" - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. -""" -import sys - -def getCellName(): - """Return the name of the cell connected to""" - return AdminControl.getCell() - -def getNodeName(): - """Return the name of the node connected to""" - return AdminControl.getNode() - -def startApplicationOnServer(appName,serverName): - """Start the named application on one server""" - print "startApplicationOnServer: Entry. appname=%s servername=%s" % ( appName,serverName ) - cellName = getCellName() - nodeName = getNodeName() - # Get the application manager - appManager = AdminControl.queryNames('cell=%s,node=%s,type=ApplicationManager,process=%s,*' %(cellName,nodeName,serverName)) - print "startApplicationOnServer: appManager=%s" % ( repr(appManager) ) - # start it - rc = AdminControl.invoke(appManager, 'startApplication', appName) - print "startApplicationOnServer: Exit. rc=%s" % ( repr(rc) ) - -def stopApplicationOnServer(appName,serverName): - """Stop the named application on one server""" - print "stopApplicationOnServer: Entry. appname=%s servername=%s" % ( appName,serverName ) - cellName = getCellName() - nodeName = getNodeName() - # Get the application manager - appManager = AdminControl.queryNames('cell=%s,node=%s,type=ApplicationManager,process=%s,*' %(cellName,nodeName,serverName)) - print "stopApplicationOnServer: appManager=%s" % ( repr(appManager) ) - # start it - rc = AdminControl.invoke(appManager, 'stopApplication', appName) - print "stopApplicationOnServer: Exit. rc=%s" % ( repr(rc) ) - -def installApplicationOnServer( fileName, appName, contextRoot, serverName ): - """Install given application on the named server using given context root""" - print "installApplicationOnServer: fileName=%s appName=%s contextRoot=%s ServerName=%s" % ( fileName, appName,contextRoot,serverName ) - AdminApp.install(fileName,'[-appname ' + appName + ' -contextroot ' + contextRoot + ' -server ' + serverName + ' -usedefaultbindings ]') - AdminConfig.save() - """modify classloader model for application""" - deploymentID = AdminConfig.getid('/Deployment:' + appName + '/') - deploymentObject = AdminConfig.showAttribute(deploymentID, 'deployedObject') - classldr = AdminConfig.showAttribute(deploymentObject, 'classloader') - print AdminConfig.showall(classldr) - AdminConfig.modify(classldr, [['mode', 'PARENT_LAST']]) - """Modify WAR class loader model""" - AdminConfig.show(deploymentObject, 'warClassLoaderPolicy') - AdminConfig.modify(deploymentObject, [['warClassLoaderPolicy', 'SINGLE']]) - AdminConfig.save() - -def uninstallApplicationOnServer( appName ): - """Delete the named application from the cell""" - AdminApp.uninstall( appName ) - AdminConfig.save() - - - -"""----------------------------------------------------------- - Phyton script to interface with WAS Admin/Management Tools ------------------------------------------------------------""" - -if len(sys.argv) < 1: - print "wasAdmin.py : need parameters : functionName [args]" - sys.exit(0) -if(sys.argv[0] == 'installApplicationOnServer'): - installApplicationOnServer(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4]) -elif(sys.argv[0] == 'startApplicationOnServer'): - startApplicationOnServer(sys.argv[1], sys.argv[2]) -elif(sys.argv[0] == 'uninstallApplicationOnServer'): - uninstallApplicationOnServer(sys.argv[1]) -else: - print "Exiting without doing anything" - diff --git a/branches/sca-android/samples/calculator-distributed/README b/branches/sca-android/samples/calculator-distributed/README deleted file mode 100644 index 51f4b07e81..0000000000 --- a/branches/sca-android/samples/calculator-distributed/README +++ /dev/null @@ -1,438 +0,0 @@ -Calculator Distributed Sample -============================= -This sample implements a simple calculator using SCA components. It uses -exactly the same calculator application classes as the calculator sample but -runs the application distributed across three nodes. - -A node in this sample means an instance of the Tuscany SCA java runtime running -in a Java virtual machine. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open four command prompts and -navigate to this sample directory in each one. There is one command to be run -in each command prompt: - -ant runDomain -ant runNodeB -ant runNodeC -ant runNodeA - -Please run the commands in this order. - -OR if you don't have ant, on Windows use - -java -cp src\main\resources;..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.LaunchDomain -java -cp src\main\resources;..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.LaunchCalculatorNodeB -java -cp src\main\resources;..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.LaunchCalculatorNodeC -java -cp src\main\resources;..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.LaunchCalculatorNodeA - -and on *nix do - -java -cp src/main/resources:../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.LaunchDomain -java -cp src/main/resources:../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.LaunchCalculatorNodeB -java -cp src/main/resources:../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.LaunchCalculatorNodeC -java -cp src/main/resources:../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.LaunchCalculatorNodeA - - -The processes started on each of these command prompts can be ended by pressing -the key. - - -Sample Overview ---------------- -The sample provides a single calculator service with a default SCA (java) -binding. NodeA exercises this interface by calling add, subtract, multiply and -divide operations. - -In the case of add and subtract the runtime recognises that -it can't find these services locally and, using the remote (web services) -version of the default SCA binding, contacts the add service running in NodeB -and the subtract service running in NodeC. - -On the command prompt where you started NodeA, you see the output of invoking the -calculator functions distributed over NodeB and and NodeC. On the command prompts -where you have started NodeB and NodeC, you see log messages that indicate that -the add and subtract services where called on these nodes respectively. - -The sample demonstrates that the calculator application can be distributed -across multiple nodes with no change to the application or to the SCA description -files. - -The domain node makes available a web application through which the contributions and -composites used in this sample can be navigated. One you have run "ant runDomain" you can -point you browser at: - -http://localhost:9990/ui/workspace/ - -The contents of the sample are as follows: - -calculator/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - the first component, calls +-/* as - appropriate - AddService.java - adds two numbers - AddServiceImpl.java - SubtractService.java - subtracts one number from another - SubtractServiceImpl.java - MultiplyService.java - multiplies two numbers - MultiplyServiceImpl.java - DivideService.java - divides one number by another - DivideServiceImpl.java - node/ - LaunchCalculatorNodeA.java - runs an sca node configured with the - composite describing the main calculator - application. If you look inside this class - you will see that the node is configured - using a URL of the form: - - http://localhost:9990/node-config/NodeA - - This retrieves the information required - to configure NodeA from the domain. - - Once the node has been started this launcher - then finds the calculator service and - calls the various methods. - - LaunchCalculatorNodeB&C.java - These launchers start nodes B and C - which runs the add and subtract services. - - Unlike NodeA though these launchers just - wait once the node has been started. They - will service incomming web service requests - as they arrive. - - LaunchDomain.java - the node that provides the domain - configuration to the distributed - nodes - resources/ - cloud - The SCA composite files that describe - the configuration of each node - nodeA - the SCA assembly for nodeA's part of the - calculator application - nodeB - the SCA assembly for nodeB's part of the - calculator application - nodeC - the SCA assembly for nodeC's part of the - calculator application - test/ - java/ - calculator/ - CalculatorDistributedTestCase.java - JUnit test case which runs all - of the separate nodes along with the domain - in a single VM for test purposes - calculator-distributed.png - a pictorial representation of the sample - .composite files - build.xml - the Ant build file - pom.xml - the Maven build file - - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd calculator-distributed -ant compile -ant runDomain -ant runNodeB -ant runNodeC -ant runNodeA - -You should see the following output from the four separate command prompt: - -runDomain: -ted>ant runDomain -Buildfile: build.xml - -runDomain: - [java] 26-Mar-2008 12:55:12 org.apache.tuscany.sca.node.launcher.DomainMana -gerLauncher main - [java] INFO: Apache Tuscany SCA Domain Manager starting... - [java] 26-Mar-2008 12:55:13 org.apache.tuscany.sca.node.launcher.NodeLaunch -erUtil collectJARFiles - [java] INFO: Runtime classpath: 147 JARs from C:\simon\tuscany\sca-java-1.2 -\distribution\target\apache-tuscany-sca-1.2-incubating-SNAPSHOT.dir\tuscany-sca- -1.2-incubating-SNAPSHOT\lib - [java] 26-Mar-2008 12:55:13 org.apache.tuscany.sca.node.launcher.NodeLaunch -erUtil collectJARFiles - [java] INFO: Runtime classpath: 89 JARs from C:\simon\tuscany\sca-java-1.2\ -distribution\target\apache-tuscany-sca-1.2-incubating-SNAPSHOT.dir\tuscany-sca-1 -.2-incubating-SNAPSHOT\modules - [java] 26-Mar-2008 12:55:19 org.apache.catalina.core.StandardEngine start - [java] INFO: Starting Servlet Engine: Apache Tomcat/6.0.14 - [java] 26-Mar-2008 12:55:20 org.apache.catalina.startup.ContextConfig defau -ltWebConfig - [java] INFO: No default web.xml - [java] 26-Mar-2008 12:55:20 org.apache.catalina.startup.DigesterFactory reg -ister - [java] WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0. -xsd - [java] 26-Mar-2008 12:55:20 org.apache.catalina.startup.DigesterFactory reg -ister - [java] WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_1. -xsd - [java] 26-Mar-2008 12:55:20 org.apache.catalina.startup.DigesterFactory reg -ister - [java] WARNING: Could not get url for /javax/servlet/jsp/resources/web-jspt -aglibrary_1_1.dtd - [java] 26-Mar-2008 12:55:20 org.apache.catalina.startup.DigesterFactory reg -ister - [java] WARNING: Could not get url for /javax/servlet/jsp/resources/web-jspt -aglibrary_1_2.dtd - [java] 26-Mar-2008 12:55:20 org.apache.catalina.startup.DigesterFactory reg -ister - [java] WARNING: Could not get url for /javax/servlet/jsp/resources/web-jspt -aglibrary_2_0.xsd - [java] 26-Mar-2008 12:55:20 org.apache.catalina.startup.DigesterFactory reg -ister - [java] WARNING: Could not get url for /javax/servlet/jsp/resources/web-jspt -aglibrary_2_1.xsd - [java] 26-Mar-2008 12:55:20 org.apache.catalina.startup.DigesterFactory reg -ister - [java] WARNING: Could not get url for /javax/servlet/resources/j2ee_web_ser -vices_1_1.xsd - [java] 26-Mar-2008 12:55:20 org.apache.coyote.http11.Http11Protocol init - [java] INFO: Initializing Coyote HTTP/1.1 on http-9990 - [java] 26-Mar-2008 12:55:20 org.apache.coyote.http11.Http11Protocol start - [java] INFO: Starting Coyote HTTP/1.1 on http-9990 - [java] 26-Mar-2008 12:55:20 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/ui/home/* - [java] 26-Mar-2008 12:55:20 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/ui/workspace/* - [java] 26-Mar-2008 12:55:20 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/ui/files/* - [java] 26-Mar-2008 12:55:20 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/ui/composite/* - [java] 26-Mar-2008 12:55:20 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/ui/cloud/* - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/workspace/* - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/contribution/* - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/feed/files/* - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/files/* - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/composite/* - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/composite-source/* - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/deployable/* - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/composite-resolved/ -* - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/cloud/* - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/cloud-source/* - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/composite-config/* - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/node-config/* - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/quickstart/* - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/processes/* - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/node/processes/* - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.http.tomcat.TomcatServer - addServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:9990/ping/* - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.node.launcher.DomainMana -gerLauncher main - [java] INFO: SCA Domain Manager started. - [java] 26-Mar-2008 12:55:21 org.apache.tuscany.sca.node.launcher.DomainMana -gerLauncher main - [java] INFO: Press enter to shutdown. - - -runNodeB: - [java] 26-Mar-2008 12:55:42 org.apache.tuscany.sca.node.launcher.NodeLaunch -er main - [java] INFO: Apache Tuscany SCA Node starting... - [java] 26-Mar-2008 12:55:42 org.apache.tuscany.sca.node.launcher.NodeLaunch -er main - [java] INFO: SCA Node configuration: http://localhost:9990/node-config/NodeB - - [java] 26-Mar-2008 12:55:42 org.apache.tuscany.sca.node.launcher.NodeLaunch -erUtil collectJARFiles - [java] INFO: Runtime classpath: 147 JARs from C:\simon\tuscany\sca-java-1.2 -\distribution\target\apache-tuscany-sca-1.2-incubating-SNAPSHOT.dir\tuscany-sca- -1.2-incubating-SNAPSHOT\lib - [java] 26-Mar-2008 12:55:42 org.apache.tuscany.sca.node.launcher.NodeLaunch -erUtil collectJARFiles - [java] INFO: Runtime classpath: 89 JARs from C:\simon\tuscany\sca-java-1.2\ -distribution\target\apache-tuscany-sca-1.2-incubating-SNAPSHOT.dir\tuscany-sca-1 -.2-incubating-SNAPSHOT\modules - [java] 26-Mar-2008 12:55:42 org.apache.tuscany.sca.node.impl.NodeImpl - [java] INFO: Creating node: http://localhost:9990/node-config/NodeB - [java] 26-Mar-2008 12:55:45 org.apache.tuscany.sca.node.impl.NodeImpl confi -gureNode - [java] INFO: Loading contribution: file:/C:/simon/tuscany/sca-java-1.2/dist -ribution/target/apache-tuscany-sca-1.2-incubating-SNAPSHOT.dir/tuscany-sca-1.2-i -ncubating-SNAPSHOT/samples/calculator-distributed/./src/main/resources/nodeB/ - [java] 26-Mar-2008 12:55:46 org.apache.tuscany.sca.node.impl.NodeImpl confi -gureNode - [java] INFO: Loading composite: http://localhost:9990/composite-resolved/co -mposite:nodeB;http://sample;CalculatorB - [java] 26-Mar-2008 12:55:47 org.apache.tuscany.sca.node.impl.NodeImpl start - - [java] INFO: Starting node: http://localhost:9990/node-config/NodeB - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] 26-Mar-2008 12:55:53 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:8200/AddServiceComponent -B - [java] 26-Mar-2008 12:55:53 org.apache.tuscany.sca.node.launcher.NodeLaunch -er main - [java] INFO: SCA Node started. - [java] 26-Mar-2008 12:55:53 org.apache.tuscany.sca.node.launcher.NodeLaunch -er main - [java] INFO: Press enter to shutdown. - [java] AddService - add 3.0 and 2.0 - -runNodeC: - [java] 26-Mar-2008 12:56:01 org.apache.tuscany.sca.node.launcher.NodeLaunch -er main - [java] INFO: Apache Tuscany SCA Node starting... - [java] 26-Mar-2008 12:56:01 org.apache.tuscany.sca.node.launcher.NodeLaunch -er main - [java] INFO: SCA Node configuration: http://localhost:9990/node-config/NodeC - - [java] 26-Mar-2008 12:56:01 org.apache.tuscany.sca.node.launcher.NodeLaunch -erUtil collectJARFiles - [java] INFO: Runtime classpath: 147 JARs from C:\simon\tuscany\sca-java-1.2 -\distribution\target\apache-tuscany-sca-1.2-incubating-SNAPSHOT.dir\tuscany-sca- -1.2-incubating-SNAPSHOT\lib - [java] 26-Mar-2008 12:56:01 org.apache.tuscany.sca.node.launcher.NodeLaunch -erUtil collectJARFiles - [java] INFO: Runtime classpath: 89 JARs from C:\simon\tuscany\sca-java-1.2\ -distribution\target\apache-tuscany-sca-1.2-incubating-SNAPSHOT.dir\tuscany-sca-1 -.2-incubating-SNAPSHOT\modules - [java] 26-Mar-2008 12:56:01 org.apache.tuscany.sca.node.impl.NodeImpl - [java] INFO: Creating node: http://localhost:9990/node-config/NodeC - [java] 26-Mar-2008 12:56:03 org.apache.tuscany.sca.node.impl.NodeImpl confi -gureNode - [java] INFO: Loading contribution: file:/C:/simon/tuscany/sca-java-1.2/dist -ribution/target/apache-tuscany-sca-1.2-incubating-SNAPSHOT.dir/tuscany-sca-1.2-i -ncubating-SNAPSHOT/samples/calculator-distributed/./src/main/resources/nodeC/ - [java] 26-Mar-2008 12:56:04 org.apache.tuscany.sca.node.impl.NodeImpl confi -gureNode - [java] INFO: Loading composite: http://localhost:9990/composite-resolved/co -mposite:nodeC;http://sample;CalculatorC - [java] 26-Mar-2008 12:56:04 org.apache.tuscany.sca.node.impl.NodeImpl start - - [java] INFO: Starting node: http://localhost:9990/node-config/NodeC - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] 26-Mar-2008 12:56:10 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:8300/SubtractServiceComp -onentC - [java] 26-Mar-2008 12:56:10 org.apache.tuscany.sca.node.launcher.NodeLaunch -er main - [java] INFO: SCA Node started. - [java] 26-Mar-2008 12:56:10 org.apache.tuscany.sca.node.launcher.NodeLaunch -er main - [java] INFO: Press enter to shutdown. - [java] SubtractService - subtract 3.0 and 2.0 - -runNodeA: - [java] 26-Mar-2008 12:56:10 org.apache.tuscany.sca.node.impl.NodeImpl - [java] INFO: Creating node: http://localhost:9990/node-config/NodeA - [java] 26-Mar-2008 12:56:12 org.apache.tuscany.sca.node.impl.NodeImpl confi -gureNode - [java] INFO: Loading contribution: file:/C:/simon/tuscany/sca-java-1.2/dist -ribution/target/apache-tuscany-sca-1.2-incubating-SNAPSHOT.dir/tuscany-sca-1.2-i -ncubating-SNAPSHOT/samples/calculator-distributed/./src/main/resources/nodeA/ - [java] 26-Mar-2008 12:56:13 org.apache.tuscany.sca.node.impl.NodeImpl confi -gureNode - [java] INFO: Loading composite: http://localhost:9990/composite-resolved/co -mposite:nodeA;http://sample;CalculatorA - [java] 26-Mar-2008 12:56:14 org.apache.tuscany.sca.assembly.builder.impl.Co -mpositeBuilderImpl$1 problem - [java] WARNING: Component reference target not found, it might be a remote -service: SubtractServiceComponentC - [java] 26-Mar-2008 12:56:14 org.apache.tuscany.sca.assembly.builder.impl.Co -mpositeBuilderImpl$1 problem - [java] WARNING: Component reference target not found, it might be a remote -service: AddServiceComponentB - [java] 26-Mar-2008 12:56:14 org.apache.tuscany.sca.node.impl.NodeImpl start - - [java] INFO: Starting node: http://localhost:9990/node-config/NodeA - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] CalculatorService - add 3.0 and 2.0 - [java] 3 + 2=5.0 - [java] CalculatorService - subtract 3.0 and 2.0 - [java] 3 - 2=1.0 - [java] CalculatorService - multiply 3.0 and 2.0 - [java] 3 * 2=6.0 - [java] CalculatorService - divide 3.0 and 2.0 - [java] 3 / 2=1.5 - [java] 26-Mar-2008 12:56:20 org.apache.tuscany.sca.node.impl.NodeImpl stop - [java] INFO: Stopping node: http://localhost:9990/node-config/NodeA - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. When running from Maven the four nodes all run within -Java virtual machine. - -cd calculator-distributed -mvn - -You should see the following output at the end of the test phase. - -INFO: Starting node: http://localhost:9990/node-config/NodeA -CalculatorService - add 3.0 and 2.0 -AddService - add 3.0 and 2.0 -CalculatorService - subtract 3.0 and 2.0 -SubtractService - subtract 3.0 and 2.0 -CalculatorService - multiply 3.0 and 2.0 -CalculatorService - divide 3.0 and 2.0 -26-Mar-2008 13:00:52 org.apache.tuscany.sca.node.impl.NodeImpl stop -INFO: Stopping node: http://localhost:9990/node-config/NodeC -26-Mar-2008 13:00:52 org.apache.tuscany.sca.node.impl.NodeImpl stop -INFO: Stopping node: http://localhost:9990/node-config/NodeB -26-Mar-2008 13:00:52 org.apache.tuscany.sca.node.impl.NodeImpl stop -INFO: Stopping node: http://localhost:9990/node-config/NodeA -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.328 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. - - - diff --git a/branches/sca-android/samples/calculator-distributed/build.xml b/branches/sca-android/samples/calculator-distributed/build.xml deleted file mode 100644 index cccd22f3ae..0000000000 --- a/branches/sca-android/samples/calculator-distributed/build.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-distributed/calculator-distributed.png b/branches/sca-android/samples/calculator-distributed/calculator-distributed.png deleted file mode 100644 index 7c0e175664..0000000000 Binary files a/branches/sca-android/samples/calculator-distributed/calculator-distributed.png and /dev/null differ diff --git a/branches/sca-android/samples/calculator-distributed/calculator-distributed.svg b/branches/sca-android/samples/calculator-distributed/calculator-distributed.svg deleted file mode 100644 index be5a4b8185..0000000000 --- a/branches/sca-android/samples/calculator-distributed/calculator-distributed.svg +++ /dev/null @@ -1,383 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - - - - nodeB nodeC - nodeA - diff --git a/branches/sca-android/samples/calculator-distributed/cloud.composite b/branches/sca-android/samples/calculator-distributed/cloud.composite deleted file mode 100644 index 85e2f9c7f3..0000000000 --- a/branches/sca-android/samples/calculator-distributed/cloud.composite +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/branches/sca-android/samples/calculator-distributed/domain.composite b/branches/sca-android/samples/calculator-distributed/domain.composite deleted file mode 100644 index 643e22d0cf..0000000000 --- a/branches/sca-android/samples/calculator-distributed/domain.composite +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/branches/sca-android/samples/calculator-distributed/pom.xml b/branches/sca-android/samples/calculator-distributed/pom.xml deleted file mode 100644 index a0f04d4a1a..0000000000 --- a/branches/sca-android/samples/calculator-distributed/pom.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-calculator-distributed - Apache Tuscany SCA Distributed Calculator Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - - org.apache.tuscany.sca - tuscany-node-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-launcher - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-domain-manager - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-node-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-sca - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-sca-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-resource-runtime - 1.4-SNAPSHOT - runtime - - - - org.codehaus.woodstox - wstx-asl - 3.2.1 - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - test - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/AddService.java b/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/AddService.java deleted file mode 100644 index d7dc4473ad..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Remotable; - -/** - * The Add service interface - */ -@Remotable -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/AddServiceImpl.java b/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index e9b7e254e5..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the Add service - */ -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - System.out.println("AddService - add " + n1 + " and " + n2); - return n1 + n2; - } - -} diff --git a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/CalculatorService.java b/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 031fa8b912..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index da869e00fd..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Reference; - - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - public double add(double n1, double n2) { - System.out.println("CalculatorService - add " + n1 + " and " + n2); - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - System.out.println("CalculatorService - subtract " + n1 + " and " + n2); - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - System.out.println("CalculatorService - multiply " + n1 + " and " + n2); - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - System.out.println("CalculatorService - divide " + n1 + " and " + n2); - return divideService.divide(n1, n2); - } - -} diff --git a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/DivideService.java b/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The divide service interface - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index f7ac0b7287..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - return n1 / n2; - } - -} diff --git a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/MultiplyService.java b/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index b7dca792b2..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - return n1 * n2; - } - -} diff --git a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/SubtractService.java b/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 78ab9c6ee0..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Remotable; - -/** - * The interface for the multiply service - */ -@Remotable -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 1010207154..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - System.out.println("SubtractService - subtract " + n1 + " and " + n2); - return n1 - n2; - } - -} diff --git a/branches/sca-android/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeA.java b/branches/sca-android/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeA.java deleted file mode 100644 index 3ff6c8969a..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeA.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package node; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.launcher.NodeLauncher; -import org.osoa.sca.ServiceRuntimeException; - -import calculator.CalculatorService; - -public class LaunchCalculatorNodeA { - public static void main(String[] args) throws Exception { - - SCANode node = null; - try { - - NodeLauncher nodeLauncher = NodeLauncher.newInstance(); - node = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/NodeA"); - - node.start(); - - // get a reference to the calculator component - SCAClient client = (SCAClient)node; - CalculatorService calculatorService = - client.getService(CalculatorService.class, "CalculatorServiceComponentA"); - - // Calculate - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - if (args.length > 1){ - for (int i=0; i < 1000; i++){ - // Calculate - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - } - } - - node.stop(); - - } catch (Exception e) { - throw new ServiceRuntimeException(e); - } - } -} diff --git a/branches/sca-android/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeB.java b/branches/sca-android/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeB.java deleted file mode 100644 index 50600eaedc..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeB.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package node; - -import org.apache.tuscany.sca.node.launcher.NodeLauncher; - -public class LaunchCalculatorNodeB { - public static void main(String[] args) throws Exception { - NodeLauncher.main(new String[] {"http://localhost:9990/node-config/NodeB"}); - } -} diff --git a/branches/sca-android/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeC.java b/branches/sca-android/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeC.java deleted file mode 100644 index 95d8934665..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeC.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package node; - -import org.apache.tuscany.sca.node.launcher.NodeLauncher; - -public class LaunchCalculatorNodeC { - public static void main(String[] args) throws Exception { - NodeLauncher.main(new String[] {"http://localhost:9990/node-config/NodeC"}); - } -} diff --git a/branches/sca-android/samples/calculator-distributed/src/main/java/node/LaunchDomain.java b/branches/sca-android/samples/calculator-distributed/src/main/java/node/LaunchDomain.java deleted file mode 100644 index 8b4fe566a1..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/java/node/LaunchDomain.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package node; - -import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher; - -/** - * This server program that loads a composite to provide simple registry function. - * This server can be replaced with any registry that is appropriate but the components - * in each node that talk to the registry should be replaced also. - */ -public class LaunchDomain { - public static void main(String[] args) throws Exception { - DomainManagerLauncher.main(args); - } - -} diff --git a/branches/sca-android/samples/calculator-distributed/src/main/resources/cloud/NodeA.composite b/branches/sca-android/samples/calculator-distributed/src/main/resources/cloud/NodeA.composite deleted file mode 100644 index ed7fe55abc..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/resources/cloud/NodeA.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-distributed/src/main/resources/cloud/NodeB.composite b/branches/sca-android/samples/calculator-distributed/src/main/resources/cloud/NodeB.composite deleted file mode 100644 index 8f29cc17aa..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/resources/cloud/NodeB.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-distributed/src/main/resources/cloud/NodeC.composite b/branches/sca-android/samples/calculator-distributed/src/main/resources/cloud/NodeC.composite deleted file mode 100644 index 9ad132b0d4..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/resources/cloud/NodeC.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeA/Calculator.composite b/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeA/Calculator.composite deleted file mode 100644 index 172676a3c7..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeA/Calculator.composite +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml b/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml deleted file mode 100644 index 1b1c0291e2..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeB/Calculator.composite b/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeB/Calculator.composite deleted file mode 100644 index b770dbe8d4..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeB/Calculator.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml b/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml deleted file mode 100644 index 6c0ffe4ac0..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeC/Calculator.composite b/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeC/Calculator.composite deleted file mode 100644 index 66caf0d17b..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeC/Calculator.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml b/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml deleted file mode 100644 index 8c311553c3..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/calculator-distributed/src/test/java/calculator/CalculatorDistributedTestCase.java b/branches/sca-android/samples/calculator-distributed/src/test/java/calculator/CalculatorDistributedTestCase.java deleted file mode 100644 index 2a6f3af002..0000000000 --- a/branches/sca-android/samples/calculator-distributed/src/test/java/calculator/CalculatorDistributedTestCase.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - - -import junit.framework.Assert; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Runs a distributed domain in a single VM by using and in memory - * implementation of the distributed domain - */ -public class CalculatorDistributedTestCase { - - private static SCANode manager; - private static SCANode nodeA; - private static SCANode nodeB; - private static SCANode nodeC; - - private static CalculatorService calculatorService; - - - @BeforeClass - public static void init() throws Exception { - - try { - System.out.println("Setting up domain"); - - DomainManagerLauncher managerLauncher = DomainManagerLauncher.newInstance(); - manager = managerLauncher.createDomainManager(); - manager.start(); - - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); - nodeC = nodeFactory.createSCANodeFromURL("http://localhost:9990/node-config/NodeC"); - nodeB = nodeFactory.createSCANodeFromURL("http://localhost:9990/node-config/NodeB"); - nodeA = nodeFactory.createSCANodeFromURL("http://localhost:9990/node-config/NodeA"); - - nodeC.start(); - nodeB.start(); - nodeA.start(); - - SCAClient client = (SCAClient)nodeA; - calculatorService = - client.getService(CalculatorService.class, "CalculatorServiceComponentA"); - - } catch(Exception ex){ - System.err.println(ex.toString()); - } - - } - - @AfterClass - public static void destroy() throws Exception { - nodeC.stop(); - nodeB.stop(); - nodeA.stop(); - manager.stop(); - } - - @Test - public void testCalculator() throws Exception { - - // Calculate - Assert.assertEquals(calculatorService.add(3, 2), 5.0); - Assert.assertEquals(calculatorService.subtract(3, 2), 1.0); - Assert.assertEquals(calculatorService.multiply(3, 2), 6.0); - Assert.assertEquals(calculatorService.divide(3, 2), 1.5); - } -} diff --git a/branches/sca-android/samples/calculator-distributed/workspace.xml b/branches/sca-android/samples/calculator-distributed/workspace.xml deleted file mode 100644 index 7d6d3dbdbd..0000000000 --- a/branches/sca-android/samples/calculator-distributed/workspace.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - diff --git a/branches/sca-android/samples/calculator-implementation-policies/README b/branches/sca-android/samples/calculator-implementation-policies/README deleted file mode 100644 index bd66eee1c9..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/README +++ /dev/null @@ -1,266 +0,0 @@ -Calculator Implementation Policies Sample -========================================= -This sample builds over simple calculator sample to demonstrate how Implementation Policies can -be use in Tuscany SCA Java. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run the sample to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator.jar calculator.CalculatorClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator.jar calculator.CalculatorClient - - -Sample Overview ---------------- -The sample provides the calculator service with a default SCA (java) binding. The 'logging' policy -which is handled by the Tuscany SCA java policy-logging module is used in this calculator -composite to specify the need for 'logging'. The MultiplyService Component specifies for 'jassAuthentication' -which is one way of implemention login authentication, using the Java Authentication and Authorization Service. - -The logging intent and policyset that is to be used by this calculator application must be -defined in the definitions.xml file. Here we use the policyset structure already defined in -Tuscany for logging under the policy-logging and hence there is no need to specify the policyset processors -and policy handler classes as part of this application. - -Similarly the jaasAuthentication intent and policyset also is defined in the definitions.xml file -of this sample. This sample uses the calculator.security.JaasLoginModule class for handling the -authentication functions. Right now there is a simply matching of userid and passwords that happens in this -class. Applications could implement their own sophisticated authentication mechanisms. For more information -on how to do this please look up Java Authentication and Authorization Service documentation. The sample -also use the calculator.security.CalculatorCallbackHandler to fetch the userid and password to be use for the -login authentication. This handler presently uses hardcoded userids and passwords. Applications could -typically use this handler to prompt for userid and passwords. - -There are two components that provide the calculator service namely 'CalculatorServiceComponent' -and 'AnotherCalculatorServiceComponent'. The logging intent is specified for the 'subtract' and 'divide' -operations of the 'CalculatorServiceCompnent' implementation, and on the entire implementation -(i.e. all operations) for the AddServiceComponent and AnotherCalculatorServiceComponent. - -The CalculatorClient first exercises the CalculatorServiceComponent calling add, -subtract, multiply and divide operations. This results in logging messages appearing on the -console for 'add', 'subtract' and 'divide' operations. The CalculatorClient then exercises the -AnotherCalculatorServiceComponent calling all the service methods. This will result in logging messages -printed on the console for all the operations. For the 'add' operation there will be two sets of messages -printed - one that has resulted from specifying the 'logging' intent on the implementation element of the -'AnotherCalculatorServiceComponent' and another from specifying the 'logging' intent on the -'AddServiceComponent' - -The jaasAuthentication intent is specified for the 'MultiplyServiceComponent'. So everytime this component -is invoke an authentication is attempted and only if it succeeds, is the multiply function is invoked. The -console prints messages that denote if the authentication has succeeded or failed. - -Thus this sample demonstrates how intents could be applied to either implementations as a whole or to some -selective operations on an implementation. - - -calculator/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - the first component, calls +-/* as - appropriate - CalculatorServiceImpl.java - AddService.java - adds two numbers - AddServiceImpl.java - SubtractService.java - subtracts one number from another - SubtractServiceImpl.java - MultiplyService.java - multiplies two numbers - MultiplyServiceImpl.java - DivideService.java - divides one number by another - DivideServiceImpl.java - CalculatorClient.java - starts the SCA Runtime and - deploys the Calculator.composite. - It then calls the deployed Calculator - Components services - calculator/security - JaasLoginModule.java JaasLoginModule implementation for this sample - CalculatorCallbackHandler.java JAAS callbackhandler for fetching userid and password - - - resources/ - Calculator.composite - the SCA assembly for this sample - definitions.xml - sca definitions file that defines the 'logging' intent - and policyset - used by this application - CalculatorLogMessages.properties - A resource bundle contain the log messages to be - used. - CalculatorJaas.config - JAAS Login Configuration file - - test/ - java/ - calculator/ - CalculatorTestCase.java - JUnit test case - calculator.png - a pictorial representation of the sample - .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - - - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd calculator-implementation-policies -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] Calling CalculatorServiceComponent configured with 'logging' policy for subtract and divide operations... - [java] Nov 23, 2007 1:06:10 PM - [java] INFO: Invoking operation - add - [java] Nov 23, 2007 1:06:10 PM - [java] INFO: Returned from operation - add - [java] 3 + 2=5.0 - [java] 3 - 2=1.0 - [java] 3 * 2=6.0 - [java] 3 / 2=1.5 - [java] Calling CalculatorServiceComponent configured with 'logging' for all operations in the implementation... - [java] Nov 23, 2007 1:06:10 PM - [java] INFO: Invoking operation - subtract - [java] Nov 23, 2007 1:06:10 PM - [java] INFO: Returned from operation - subtract - [java] Nov 23, 2007 1:06:10 PM - [java] INFO: Invoking operation - divide - [java] Nov 23, 2007 1:06:10 PM - [java] INFO: Returned from operation - divide - [java] Nov 23, 2007 1:06:10 PM - [java] 3 + 2=5.0 - [java] 3 - 2=1.0 - [java] 3 * 2=6.0 - [java] INFO: Invoking operation - add - [java] 3 / 2=1.5 - [java] Nov 23, 2007 1:06:10 PM - [java] INFO: Invoking operation - add - [java] Nov 23, 2007 1:06:10 PM - [java] INFO: Returned from operation - add - [java] Nov 23, 2007 1:06:10 PM - [java] INFO: Returned from operation - add - [java] Nov 23, 2007 1:06:10 PM - [java] INFO: Invoking operation - subtract - [java] Nov 23, 2007 1:06:10 PM - [java] INFO: Returned from operation - subtract - [java] Nov 23, 2007 1:06:10 PM - [java] INFO: Invoking operation - multiply - [java] Nov 23, 2007 1:06:10 PM - [java] INFO: Returned from operation - multiply - [java] Nov 23, 2007 1:06:10 PM - [java] INFO: Invoking operation - divide - [java] Nov 23, 2007 1:06:10 PM - [java] INFO: Returned from operation - divide - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator -mvn - -You should see the following output from the test phase. Notice the log messages. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.CalculatorTestCase -Dec 18, 2007 12:05:06 PM org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader$1 error -WARNING: XMLSchema validation problem in: file:/F:/LatestTrunk/sca/samples/calculator-implementation-policies/target/ -classes/Calculator.composite, line: 28, column: 4 -cvc-complex-type.2.4.a: Invalid content was found starting with element 'operation'. One of '{WC[##other:"http://www. -osoa.org/xmlns/sca/1.0"]}' is expected. -Dec 18, 2007 12:05:06 PM -INFO: Invoking operation - add -Dec 18, 2007 12:05:06 PM -FINER: Inovoking operation add with arguments 3.0, 2.0, -Dec 18, 2007 12:05:06 PM -INFO: Returned from operation - add -Dec 18, 2007 12:05:06 PM -FINER: Returning from operation add with return value 5 -Dec 18, 2007 12:05:06 PM -INFO: Invoking operation - subtract -Dec 18, 2007 12:05:06 PM -FINER: Inovoking operation subtract with arguments 3.0, 2.0, -Dec 18, 2007 12:05:06 PM -INFO: Returned from operation - subtract -Dec 18, 2007 12:05:06 PM -FINER: Returning from operation subtract with return value 1 -Successfully AUTHENTICATED!! -Dec 18, 2007 12:05:06 PM -INFO: Invoking operation - divide -Dec 18, 2007 12:05:06 PM -FINER: Inovoking operation divide with arguments 3.0, 2.0, -Dec 18, 2007 12:05:06 PM -INFO: Returned from operation - divide -Dec 18, 2007 12:05:06 PM -FINER: Returning from operation divide with return value 1.5 -Dec 18, 2007 12:05:06 PM org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader$1 error -WARNING: XMLSchema validation problem in: file:/F:/LatestTrunk/sca/samples/calculator-implementation-policies/target/ -classes/Calculator.composite, line: 28, column: 4 -cvc-complex-type.2.4.a: Invalid content was found starting with element 'operation'. One of '{WC[##other:"http://www. -osoa.org/xmlns/sca/1.0"]}' is expected. -Dec 18, 2007 12:05:06 PM -INFO: Invoking operation - add -Dec 18, 2007 12:05:06 PM -FINER: Inovoking operation add with arguments 3.0, 2.0, -Dec 18, 2007 12:05:06 PM -INFO: Invoking operation - add -Dec 18, 2007 12:05:06 PM -FINER: Inovoking operation add with arguments 3.0, 2.0, -Dec 18, 2007 12:05:06 PM -INFO: Returned from operation - add -Dec 18, 2007 12:05:06 PM -FINER: Returning from operation add with return value 5 -Dec 18, 2007 12:05:06 PM -INFO: Returned from operation - add -Dec 18, 2007 12:05:06 PM -FINER: Returning from operation add with return value 5 -Dec 18, 2007 12:05:06 PM -INFO: Invoking operation - subtract -Dec 18, 2007 12:05:06 PM -FINER: Inovoking operation subtract with arguments 3.0, 2.0, -Dec 18, 2007 12:05:06 PM -INFO: Returned from operation - subtract -Dec 18, 2007 12:05:06 PM -FINER: Returning from operation subtract with return value 1 -Dec 18, 2007 12:05:06 PM -INFO: Invoking operation - multiply -Dec 18, 2007 12:05:06 PM -FINER: Inovoking operation multiply with arguments 3.0, 2.0, -Successfully AUTHENTICATED!! -Dec 18, 2007 12:05:06 PM -INFO: Returned from operation - multiply -Dec 18, 2007 12:05:06 PM -FINER: Returning from operation multiply with return value 6 -Dec 18, 2007 12:05:06 PM -INFO: Invoking operation - divide -Dec 18, 2007 12:05:06 PM -FINER: Inovoking operation divide with arguments 3.0, 2.0, -Dec 18, 2007 12:05:06 PM -INFO: Returned from operation - divide -Dec 18, 2007 12:05:06 PM -FINER: Returning from operation divide with return value 1.5 -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.823 sec - -Results : - -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0 - -Results : - -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0 -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/calculator-implementation-policies/build.xml b/branches/sca-android/samples/calculator-implementation-policies/build.xml deleted file mode 100644 index 7afa23a07f..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-implementation-policies/calculator.png b/branches/sca-android/samples/calculator-implementation-policies/calculator.png deleted file mode 100644 index 995a57b1fd..0000000000 Binary files a/branches/sca-android/samples/calculator-implementation-policies/calculator.png and /dev/null differ diff --git a/branches/sca-android/samples/calculator-implementation-policies/calculator.svg b/branches/sca-android/samples/calculator-implementation-policies/calculator.svg deleted file mode 100644 index af34f07e04..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/calculator.svg +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - - - diff --git a/branches/sca-android/samples/calculator-implementation-policies/pom.xml b/branches/sca-android/samples/calculator-implementation-policies/pom.xml deleted file mode 100644 index e5ccc076a5..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-calculator-impl-policies - Apache Tuscany SCA Calculator Sample using Implementation Policies - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - org.apache.tuscany.sca - tuscany-policy-logging - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-policy-security - 1.4-SNAPSHOT - runtime - - - - - - ${artifactId} - - diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/AddService.java b/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/AddService.java deleted file mode 100644 index 5a1e7a638a..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The Add service interface - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/AddServiceImpl.java b/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index caf4d358df..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Add service - */ -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Adding " + n1 + " and " + n2); - return n1 + n2; - } - -} diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorClient.java b/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 2bce187049..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator; - -import javax.security.auth.login.Configuration; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - try { - Configuration secConf = Configuration.getConfiguration(); - } catch (java.lang.SecurityException e) { - System.setProperty("java.security.auth.login.config", CalculatorClient.class.getClassLoader() - .getResource("CalculatorJass.config").toString()); - } - - SCADomain scaDomain = SCADomain.newInstance("Calculator.composite"); - - CalculatorService calculatorService = - scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); - - // Calculate - System.out.println("Calling CalculatorServiceComponent configured with 'logging' " + - "policy for subtract and divide operations..."); - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - calculatorService = - scaDomain.getService(CalculatorService.class, "AnotherCalculatorServiceComponent"); - - // Calculate - System.out.println("Calling CalculatorServiceComponent configured with 'logging' " + - "for all operations in the implementation..."); - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - scaDomain.close(); - } - -} diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorService.java b/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index ad87375529..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index ae4ed12b7b..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Reference; - - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/DivideService.java b/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/DivideService.java deleted file mode 100644 index ef6a8b375b..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The divide service interface - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index cd91935f08..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Dividing " + n1 + " with " + n2); - return n1 / n2; - } - -} diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/MultiplyService.java b/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index db568cc762..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index c85357fcd8..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Multiplying " + n1 + " with " + n2); - return n1 * n2; - } - -} diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/SubtractService.java b/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 56ee372fc4..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 1b669084d9..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Subtracting " + n1 + " from " + n2); - return n1 - n2; - } - -} diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/security/CalculatorCallbackHandler.java b/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/security/CalculatorCallbackHandler.java deleted file mode 100644 index b48fb90148..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/security/CalculatorCallbackHandler.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator.security; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.NameCallback; -import javax.security.auth.callback.PasswordCallback; -import javax.security.auth.callback.UnsupportedCallbackException; - -/** - * @version $Rev$ $Date$ - */ -public class CalculatorCallbackHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - if (callbacks[i] instanceof NameCallback) { - NameCallback nc = (NameCallback)callbacks[i]; - nc.setName("CalculatorUser"); - } else if (callbacks[i] instanceof PasswordCallback) { - PasswordCallback pc = (PasswordCallback)callbacks[i]; - pc.setPassword("CalculatorUserPasswd".toCharArray()); - } else { - throw new UnsupportedCallbackException - (callbacks[i], "Unsupported Callback!"); - } - } - } - -} diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/security/JaasLoginModule.java b/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/security/JaasLoginModule.java deleted file mode 100644 index fe4097640b..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/security/JaasLoginModule.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator.security; - -import java.security.Principal; -import java.util.Map; - -import javax.security.auth.Subject; -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.NameCallback; -import javax.security.auth.callback.PasswordCallback; -import javax.security.auth.login.LoginException; -import javax.security.auth.spi.LoginModule; - -/** - * @version $Rev$ $Date$ - */ -public class JaasLoginModule implements LoginModule { - - private CallbackHandler callbackHandler; - private Subject subject; - private Principal userPrincipal; - private String userId; - private String password; - private boolean succeeded; - private boolean commitSucceeded; - - public void initialize(Subject subject, - CallbackHandler callbackHandler, - Map sharedState, - Map options) { - this.callbackHandler = callbackHandler; - this.subject = subject; - } - - public boolean login() throws LoginException { - Callback[] callbacks = new Callback[2]; - callbacks[0] = new NameCallback("UserId:"); - callbacks[1] = new PasswordCallback("Password:", false); - - try { - callbackHandler.handle(callbacks); - userId = ((NameCallback)callbacks[0]).getName(); - password = new String(((PasswordCallback)callbacks[1]).getPassword()); - - if (userId.equals("CalculatorUser") && password.equals("CalculatorUserPasswd")) { - System.out.println("Successfully AUTHENTICATED!!"); - succeeded = true; - return true; - } else { - System.out.println("Incorrect userId / password! AUTHENTICATION FAILED!!"); - return false; - } - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - /** - *

This method is called if the LoginContext's - * overall authentication succeeded - * (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules - * succeeded). - * - *

If this LoginModule's own authentication attempt - * succeeded (checked by retrieving the private state saved by the - * login method), then this method associates a - * UserPrincipal - * with the Subject located in the - * LoginModule. If this LoginModule's own - * authentication attempted failed, then this method removes - * any state that was originally saved. - * - *

- * - * @exception LoginException if the commit fails. - * - * @return true if this LoginModule's own login and commit - * attempts succeeded, or false otherwise. - */ - public boolean commit() throws LoginException { - if (succeeded == false) { - return false; - } else { - // add a Principal (authenticated identity) to the Subject - - // assume the user we authenticated is the UserPrincipal - userPrincipal = new UserPrincipal(userId); - if (!subject.getPrincipals().contains(userPrincipal)) - subject.getPrincipals().add(userPrincipal); - - // in any case, clean out state - userId = null; - password = null; - commitSucceeded = true; - return true; - } - } - - /** - *

This method is called if the LoginContext's - * overall authentication failed. - * (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules - * did not succeed). - * - *

If this LoginModule's own authentication attempt - * succeeded (checked by retrieving the private state saved by the - * login and commit methods), - * then this method cleans up any state that was originally saved. - * - *

- * - * @exception LoginException if the abort fails. - * - * @return false if this LoginModule's own login and/or commit attempts - * failed, and true otherwise. - */ - public boolean abort() throws LoginException { - if (succeeded == false) { - return false; - } else if (succeeded == true && commitSucceeded == false) { - // login succeeded but overall authentication failed - succeeded = false; - userId = null; - password = null; - userPrincipal = null; - } else { - // overall authentication succeeded and commit succeeded, - // but someone else's commit failed - logout(); - } - return true; - } - - /** - * Logout the user. - * - *

This method removes the SimplePrincipal - * that was added by the commit method. - * - *

- * - * @exception LoginException if the logout fails. - * - * @return true in all cases since this LoginModule - * should not be ignored. - */ - public boolean logout() throws LoginException { - subject.getPrincipals().remove(userPrincipal); - succeeded = false; - succeeded = commitSucceeded; - userId = null; - if (password != null) - password = null; - userPrincipal = null; - return true; - } - -} diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/security/UserPrincipal.java b/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/security/UserPrincipal.java deleted file mode 100644 index 595626e672..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/java/calculator/security/UserPrincipal.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package calculator.security; - -import java.security.Principal; - -/** - * @version $Rev$ $Date$ - */ -public class UserPrincipal implements Principal { - - private final String name; - - public UserPrincipal(String name) { - if (name == null) - throw new IllegalArgumentException("name cannot be null"); - this.name = name; - } - - public String getName() { - return name; - } - - public String toString() { - return name; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((name == null) ? 0 : name.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - final UserPrincipal other = (UserPrincipal)obj; - if (name == null) { - if (other.name != null) - return false; - } else if (!name.equals(other.name)) - return false; - return true; - } -} diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/resources/Calculator.composite b/branches/sca-android/samples/calculator-implementation-policies/src/main/resources/Calculator.composite deleted file mode 100644 index d91bf88d96..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/resources/Calculator.composite +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/resources/CalculatorJass.config b/branches/sca-android/samples/calculator-implementation-policies/src/main/resources/CalculatorJass.config deleted file mode 100644 index 0e7cb86633..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/resources/CalculatorJass.config +++ /dev/null @@ -1,3 +0,0 @@ -Calculator { - calculator.security.JaasLoginModule required debug=true; -}; diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/resources/CalculatorLogMessages.properties b/branches/sca-android/samples/calculator-implementation-policies/src/main/resources/CalculatorLogMessages.properties deleted file mode 100644 index f62125eaa9..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/resources/CalculatorLogMessages.properties +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -CALLING_OPERATION=Inovoking operation {0} with arguments {1} -OPERATION_RETURNED=Returning from operation {0} with return value {1} \ No newline at end of file diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/main/resources/definitions.xml b/branches/sca-android/samples/calculator-implementation-policies/src/main/resources/definitions.xml deleted file mode 100644 index 6cccde0d13..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/main/resources/definitions.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - Calculator - calculator.security.CalculatorCallbackHandler - - - - - - - FINER - - - \ No newline at end of file diff --git a/branches/sca-android/samples/calculator-implementation-policies/src/test/java/calculator/CalculatorTestCase.java b/branches/sca-android/samples/calculator-implementation-policies/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index 157570c3df..0000000000 --- a/branches/sca-android/samples/calculator-implementation-policies/src/test/java/calculator/CalculatorTestCase.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import javax.security.auth.login.Configuration; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This shows how to test the Calculator service component. - */ -public class CalculatorTestCase extends TestCase { - - private CalculatorService calculatorService; - private CalculatorService anotherCalculatorService; - private SCADomain scaDomain; - - @Override - protected void setUp() throws Exception { - try { - Configuration secConf = Configuration.getConfiguration(); - } catch ( java.lang.SecurityException e ) { - //FIXME: We should not compare exception strings as they are localized in various languages - //if ( e.getMessage().equals("Unable to locate a login configuration") ) { - System.setProperty("java.security.auth.login.config", - this.getClass().getClassLoader().getResource("CalculatorJass.config").toString()); - //} else { - // throw e; - //} - } - scaDomain = SCADomain.newInstance("Calculator.composite"); - calculatorService = scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); - anotherCalculatorService = scaDomain.getService(CalculatorService.class, "AnotherCalculatorServiceComponent"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testCalculator() throws Exception { - // Calculate - assertEquals(calculatorService.add(3, 2), 5.0); - assertEquals(calculatorService.subtract(3, 2), 1.0); - assertEquals(calculatorService.multiply(3, 2), 6.0); - assertEquals(calculatorService.divide(3, 2), 1.5); - } - - public void testAnotherCalculator() throws Exception { - // Calculate - assertEquals(anotherCalculatorService.add(3, 2), 5.0); - assertEquals(anotherCalculatorService.subtract(3, 2), 1.0); - assertEquals(anotherCalculatorService.multiply(3, 2), 6.0); - assertEquals(anotherCalculatorService.divide(3, 2), 1.5); - } -} diff --git a/branches/sca-android/samples/calculator-osgi/README b/branches/sca-android/samples/calculator-osgi/README deleted file mode 100644 index cde5fe981f..0000000000 --- a/branches/sca-android/samples/calculator-osgi/README +++ /dev/null @@ -1,97 +0,0 @@ -Calculator Sample -================= -This sample implements a simple calculator using SCA components. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator.jar calculator.CalculatorClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator.jar calculator.CalculatorClient - -Sample Overview ---------------- -The sample provides a single calculator service with a default SCA (java) -binding. The CalculatorClient exercises this interface by calling add, -subtract, multiply and divide operations. This results in messages passing to -the appropriate components in the composite across the local wires. - -calculator/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - the first component, calls +-/* as - appropriate - CalculatorServiceImpl.java - AddService.java - adds two numbers - AddServiceImpl.java - SubtractService.java - subtracts one number from another - SubtractServiceImpl.java - MultiplyService.java - multiplies two numbers - MultiplyServiceImpl.java - DivideService.java - divides one number by another - DivideServiceImpl.java - CalculatorClient.java - starts the SCA Runtime and - deploys the Calculator.composite. - It then calls the deployed Calculator - Components services - resources/ - Calculator.composite - the SCA assembly for this sample - test/ - java/ - calculator/ - CalculatorTestCase.java - JUnit test case - calculator.png - a pictorial representation of the sample - .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd calculator -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 3 + 2=5.0 - [java] 3 - 2=1.0 - [java] 3 * 2=6.0 - [java] 3 / 2=1.5 - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.CalculatorTestCase -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.272 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/calculator-osgi/build.xml b/branches/sca-android/samples/calculator-osgi/build.xml deleted file mode 100644 index c4b755ef94..0000000000 --- a/branches/sca-android/samples/calculator-osgi/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-osgi/calculator.png b/branches/sca-android/samples/calculator-osgi/calculator.png deleted file mode 100644 index 995a57b1fd..0000000000 Binary files a/branches/sca-android/samples/calculator-osgi/calculator.png and /dev/null differ diff --git a/branches/sca-android/samples/calculator-osgi/calculator.svg b/branches/sca-android/samples/calculator-osgi/calculator.svg deleted file mode 100644 index af34f07e04..0000000000 --- a/branches/sca-android/samples/calculator-osgi/calculator.svg +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - - - diff --git a/branches/sca-android/samples/calculator-osgi/pom.xml b/branches/sca-android/samples/calculator-osgi/pom.xml deleted file mode 100644 index a1d371df73..0000000000 --- a/branches/sca-android/samples/calculator-osgi/pom.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-calculator-osgi - Apache Tuscany SCA Calculator OSGi Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-node-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-node-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-extensibility-equinox - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-node-launcher-equinox - 1.4-SNAPSHOT - compile - - - - javax.servlet - servlet-api - 2.5 - provided - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/AddService.java b/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/AddService.java deleted file mode 100644 index 188451ebac..0000000000 --- a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The Add service interface - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/AddServiceImpl.java b/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 7ca8fb04b5..0000000000 --- a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Add service - */ -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Adding " + n1 + " and " + n2); - return n1 + n2; - } - -} diff --git a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/CalculatorClient.java b/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index c193b2ce66..0000000000 --- a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator; - -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -@Scope("COMPOSITE") @EagerInit -public class CalculatorClient { - - private CalculatorService calculatorService; - - @Reference - public void setCalculatorService(CalculatorService calculatorService) { - this.calculatorService = calculatorService; - } - - @Init - public void calculate() { - - // Calculate - System.out.println("SCA API ClassLoader: " + print(Reference.class.getClassLoader())); - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - } - - private static String print(ClassLoader cl) { - StringBuffer buf = new StringBuffer(); - for (; cl != null;) { - buf.append(cl.toString()); - buf.append(' '); - cl = cl.getParent(); - } - return buf.toString(); - } - -} diff --git a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/CalculatorService.java b/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 031fa8b912..0000000000 --- a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 3d861f2018..0000000000 --- a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Reference; - - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/DivideService.java b/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The divide service interface - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 1323edf55a..0000000000 --- a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Dividing " + n1 + " with " + n2); - return n1 / n2; - } - -} diff --git a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/MultiplyService.java b/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index 91b803bc9e..0000000000 --- a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Multiplying " + n1 + " with " + n2); - return n1 * n2; - } - -} diff --git a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/SubtractService.java b/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 58cc4a3547..0000000000 --- a/branches/sca-android/samples/calculator-osgi/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Subtracting " + n1 + " from " + n2); - return n1 - n2; - } - -} diff --git a/branches/sca-android/samples/calculator-osgi/src/main/resources/Calculator.composite b/branches/sca-android/samples/calculator-osgi/src/main/resources/Calculator.composite deleted file mode 100644 index 913081b9be..0000000000 --- a/branches/sca-android/samples/calculator-osgi/src/main/resources/Calculator.composite +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-osgi/src/test/java/calculator/CalculatorTestCase.java b/branches/sca-android/samples/calculator-osgi/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index dc0da7d20d..0000000000 --- a/branches/sca-android/samples/calculator-osgi/src/test/java/calculator/CalculatorTestCase.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Scope; - -/** - * This shows how to test the Calculator composition. - */ -@Scope("COMPOSITE") -@EagerInit -public class CalculatorTestCase extends TestCase { - - private NodeLauncher launcher; - private SCANode node; - - @Override - protected void setUp() throws Exception { - launcher = NodeLauncher.newInstance(); - node = launcher.createNodeFromClassLoader("Calculator.composite", getClass().getClassLoader()); - System.out.println("SCA Node API ClassLoader: " + node.getClass().getClassLoader()); - node.start(); - } - - @Override - protected void tearDown() throws Exception { - if (launcher != null) { - node.stop(); - launcher.destroy(); - } - } - - public void testDummy() { - } - -} diff --git a/branches/sca-android/samples/calculator-rcp/META-INF/MANIFEST.MF b/branches/sca-android/samples/calculator-rcp/META-INF/MANIFEST.MF deleted file mode 100644 index 57ecdff710..0000000000 --- a/branches/sca-android/samples/calculator-rcp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,25 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Apache Tuscany SCA Calculator RCP Sample -Bundle-SymbolicName: sample.calculator.rcp;singleton:=true -Bundle-Version: 1.4.0.SNAPSHOT -Bundle-Activator: calculator.rcp.Activator -Bundle-Vendor: The Apache Software Foundation -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-ActivationPolicy: lazy -Import-Package: org.osoa.sca;version="1.4.0", - org.osoa.sca.annotations;version="1.4.0" -Bundle-ClassPath: ., - cglib-nodep-2.1_3.jar, - jaxb-impl-2.1.7.jar, - activation-1.1.jar, - jsr250-api-1.0.jar, - jsr181-api-1.0-MR1.jar, - jaxb-api-2.1.jar, - stax-api-1.0-2.jar, - jaxws-api-2.1.jar, - geronimo-commonj_1.1_spec-1.0.jar, - XmlSchema-1.3.2.jar, - wstx-asl-3.2.1.jar diff --git a/branches/sca-android/samples/calculator-rcp/build.properties b/branches/sca-android/samples/calculator-rcp/build.properties deleted file mode 100644 index 0530eb648b..0000000000 --- a/branches/sca-android/samples/calculator-rcp/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -source.. = src/main/java/ -output.. = target/classes/ -bin.includes = plugin.xml,\ - META-INF/,\ - . diff --git a/branches/sca-android/samples/calculator-rcp/icons/alt_window_16.gif b/branches/sca-android/samples/calculator-rcp/icons/alt_window_16.gif deleted file mode 100644 index 05626b17d8..0000000000 Binary files a/branches/sca-android/samples/calculator-rcp/icons/alt_window_16.gif and /dev/null differ diff --git a/branches/sca-android/samples/calculator-rcp/icons/alt_window_32.gif b/branches/sca-android/samples/calculator-rcp/icons/alt_window_32.gif deleted file mode 100644 index b432f88339..0000000000 Binary files a/branches/sca-android/samples/calculator-rcp/icons/alt_window_32.gif and /dev/null differ diff --git a/branches/sca-android/samples/calculator-rcp/plugin.xml b/branches/sca-android/samples/calculator-rcp/plugin.xml deleted file mode 100644 index 1fb5acd9b5..0000000000 --- a/branches/sca-android/samples/calculator-rcp/plugin.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-rcp/pom.xml b/branches/sca-android/samples/calculator-rcp/pom.xml deleted file mode 100644 index a487076de6..0000000000 --- a/branches/sca-android/samples/calculator-rcp/pom.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample.calculator.rcp - Apache Tuscany SCA Calculator RCP Sample - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-node-api - 1.4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-node-impl - 1.4-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-implementation-node-runtime - 1.4-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-extensibility-equinox - 1.4-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-node-launcher-equinox - 1.4-SNAPSHOT - compile - - - - javax.servlet - servlet-api - 2.5 - provided - - - junit - junit - 4.2 - test - - - - ${artifactId} - - - maven-eclipse-plugin - 2.5.1 - - - org.eclipse.pde.ManifestBuilder - org.eclipse.jdt.core.javabuilder - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - - - org.eclipse.jdt.launching.JRE_CONTAINER - - org.eclipse.pde.core.requiredPlugins - - - - - - maven-jar-plugin - - - ${basedir}/META-INF/MANIFEST.MF - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/Calculator.composite b/branches/sca-android/samples/calculator-rcp/src/main/java/Calculator.composite deleted file mode 100644 index 913081b9be..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/Calculator.composite +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/AddService.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/AddService.java deleted file mode 100644 index 188451ebac..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The Add service interface - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/AddServiceImpl.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 7ca8fb04b5..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Add service - */ -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Adding " + n1 + " and " + n2); - return n1 + n2; - } - -} diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/CalculatorClient.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index adbd18a9e4..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator; - -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -@Scope("COMPOSITE") -@EagerInit -public class CalculatorClient { - - private CalculatorService calculatorService; - - @Reference - public void setCalculatorService(CalculatorService calculatorService) { - this.calculatorService = calculatorService; - } - - @Init - public void calculate() { - // Calculate - System.out.println("SCA API ClassLoader: " + Reference.class.getClassLoader()); - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - } - -} diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/CalculatorService.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index c89043276e..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index ba897fa301..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Reference; - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/DivideService.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The divide service interface - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 1323edf55a..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Dividing " + n1 + " with " + n2); - return n1 / n2; - } - -} diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/MultiplyService.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index 91b803bc9e..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Multiplying " + n1 + " with " + n2); - return n1 * n2; - } - -} diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/SubtractService.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 58cc4a3547..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Subtracting " + n1 + " from " + n2); - return n1 - n2; - } - -} diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java deleted file mode 100644 index 50f68dcb01..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator.rcp; - -import java.io.File; - -import org.apache.tuscany.sca.extensibility.equinox.EquinoxServiceDiscoverer; -import org.apache.tuscany.sca.node.SCAContribution; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.apache.tuscany.sca.sample.calculator.rcp"; - - // The shared instance - private static Activator plugin; - - private SCANode node; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - Class cls = EquinoxServiceDiscoverer.class; - SCANodeFactory factory = SCANodeFactory.newInstance(); - node = factory.createSCANode("Calculator.composite", new SCAContribution("c1", new File("target/classes").toURI().toString())); - node.start(); - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - if (node != null) { - node.stop(); - } - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given - * plug-in relative path - * - * @param path the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } -} diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/Application.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/Application.java deleted file mode 100644 index 5ce6522fed..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/Application.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator.rcp; - -import org.eclipse.equinox.app.IApplication; -import org.eclipse.equinox.app.IApplicationContext; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.PlatformUI; - -/** - * This class controls all aspects of the application's execution - */ -public class Application implements IApplication { - - /* (non-Javadoc) - * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext) - */ - public Object start(IApplicationContext context) { - Display display = PlatformUI.createDisplay(); - try { - int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor()); - if (returnCode == PlatformUI.RETURN_RESTART) { - return IApplication.EXIT_RESTART; - } - return IApplication.EXIT_OK; - } finally { - display.dispose(); - } - } - - /* (non-Javadoc) - * @see org.eclipse.equinox.app.IApplication#stop() - */ - public void stop() { - final IWorkbench workbench = PlatformUI.getWorkbench(); - if (workbench == null) - return; - final Display display = workbench.getDisplay(); - display.syncExec(new Runnable() { - public void run() { - if (!display.isDisposed()) - workbench.close(); - } - }); - } -} diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationActionBarAdvisor.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationActionBarAdvisor.java deleted file mode 100644 index 2fccfb2d77..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationActionBarAdvisor.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator.rcp; - -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.action.MenuManager; -import org.eclipse.ui.IWorkbenchActionConstants; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.actions.ActionFactory; -import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction; -import org.eclipse.ui.application.ActionBarAdvisor; -import org.eclipse.ui.application.IActionBarConfigurer; - -/** - * An action bar advisor is responsible for creating, adding, and disposing of - * the actions added to a workbench window. Each window will be populated with - * new actions. - */ -public class ApplicationActionBarAdvisor extends ActionBarAdvisor { - - // Actions - important to allocate these only in makeActions, and then use - // them - // in the fill methods. This ensures that the actions aren't recreated - // when fillActionBars is called with FILL_PROXY. - private IWorkbenchAction exitAction; - - public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) { - super(configurer); - } - - protected void makeActions(final IWorkbenchWindow window) { - // Creates the actions and registers them. - // Registering is needed to ensure that key bindings work. - // The corresponding commands keybindings are defined in the plugin.xml - // file. - // Registering also provides automatic disposal of the actions when - // the window is closed. - - exitAction = ActionFactory.QUIT.create(window); - register(exitAction); - } - - protected void fillMenuBar(IMenuManager menuBar) { - MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE); - menuBar.add(fileMenu); - fileMenu.add(exitAction); - } - -} diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationWorkbenchAdvisor.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationWorkbenchAdvisor.java deleted file mode 100644 index ac1893509c..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationWorkbenchAdvisor.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator.rcp; - -import org.eclipse.ui.application.IWorkbenchWindowConfigurer; -import org.eclipse.ui.application.WorkbenchAdvisor; -import org.eclipse.ui.application.WorkbenchWindowAdvisor; - -public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor { - - private static final String PERSPECTIVE_ID = "org.apache.tuscany.sca.sample.calculator.rcp.perspective"; - - public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) { - return new ApplicationWorkbenchWindowAdvisor(configurer); - } - - public String getInitialWindowPerspectiveId() { - return PERSPECTIVE_ID; - } - -} diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationWorkbenchWindowAdvisor.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationWorkbenchWindowAdvisor.java deleted file mode 100644 index 6378decf20..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationWorkbenchWindowAdvisor.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator.rcp; - -import org.eclipse.swt.graphics.Point; -import org.eclipse.ui.application.ActionBarAdvisor; -import org.eclipse.ui.application.IActionBarConfigurer; -import org.eclipse.ui.application.IWorkbenchWindowConfigurer; -import org.eclipse.ui.application.WorkbenchWindowAdvisor; - -public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor { - - public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) { - super(configurer); - } - - public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) { - return new ApplicationActionBarAdvisor(configurer); - } - - public void preWindowOpen() { - IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); - configurer.setInitialSize(new Point(400, 300)); - configurer.setShowCoolBar(false); - configurer.setShowStatusLine(false); - configurer.setTitle("Tuscany SCA Calculator RCP Application"); - } -} diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/Perspective.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/Perspective.java deleted file mode 100644 index 445b4b65b2..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/Perspective.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator.rcp; - -import org.eclipse.ui.IPageLayout; -import org.eclipse.ui.IPerspectiveFactory; - -public class Perspective implements IPerspectiveFactory { - - public void createInitialLayout(IPageLayout layout) { - String editorArea = layout.getEditorArea(); - layout.setEditorAreaVisible(false); - layout.setFixed(true); - - layout.addStandaloneView(View.ID, false, IPageLayout.LEFT, 1.0f, editorArea); - } - -} diff --git a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/View.java b/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/View.java deleted file mode 100644 index f95c1e029c..0000000000 --- a/branches/sca-android/samples/calculator-rcp/src/main/java/calculator/rcp/View.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator.rcp; - -import org.eclipse.jface.viewers.IStructuredContentProvider; -import org.eclipse.jface.viewers.ITableLabelProvider; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.jface.viewers.TableViewer; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.ISharedImages; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.part.ViewPart; - -public class View extends ViewPart { - public static final String ID = "org.apache.tuscany.sca.sample.calculator.rcp.view"; - - private TableViewer viewer; - - /** - * The content provider class is responsible for providing objects to the - * view. It can wrap existing objects in adapters or simply return objects - * as-is. These objects may be sensitive to the current input of the view, - * or ignore it and always show the same content (like Task List, for - * example). - */ - class ViewContentProvider implements IStructuredContentProvider { - public void inputChanged(Viewer v, Object oldInput, Object newInput) { - } - - public void dispose() { - } - - public Object[] getElements(Object parent) { - return new String[] {"One", "Two", "Three"}; - } - } - - class ViewLabelProvider extends LabelProvider implements ITableLabelProvider { - public String getColumnText(Object obj, int index) { - return getText(obj); - } - - public Image getColumnImage(Object obj, int index) { - return getImage(obj); - } - - public Image getImage(Object obj) { - return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT); - } - } - - /** - * This is a callback that will allow us to create the viewer and initialize - * it. - */ - public void createPartControl(Composite parent) { - viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); - viewer.setContentProvider(new ViewContentProvider()); - viewer.setLabelProvider(new ViewLabelProvider()); - viewer.setInput(getViewSite()); - } - - /** - * Passing the focus request to the viewer's control. - */ - public void setFocus() { - viewer.getControl().setFocus(); - } -} diff --git a/branches/sca-android/samples/calculator-rmi-reference/README b/branches/sca-android/samples/calculator-rmi-reference/README deleted file mode 100644 index 837b5ce75f..0000000000 --- a/branches/sca-android/samples/calculator-rmi-reference/README +++ /dev/null @@ -1,138 +0,0 @@ -Calculator RMI Reference Sample -=============================== - -This sample illustrates the use of Tuscany RMI Binding to call reference -services that are hosted as Java RMI services. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, first -navigate to the calculator-rmi-service sample and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-rmi-service.jar calculator.CalculatorServer - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator-rmi-service.jar calculator.CalculatorServer - -Now you have the server running you need to open another command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-rmi-reference.jar calculator.CalculatorClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator-rmi-reference.jar calculator.CalculatorClient - -Sample Overview ---------------- -This sample extends the calculator sample by replacing the local wired -connections with RMI bindings. Instead of local add, subtract, multiply and -divide components, an RMI service implementation now provides the -add, subtract, multiply and divide interfaces and is hosted as an RMI server. -References specified in the .composite file include an RMI binding which targets -this RMI server. - -This sample adds a number of classes to the basic calculator sample: - -calculator-rmi-reference/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - as calculator sample - AddService.java - as calculator sample - SubtractService.java - as calculator sample - MultipleService.java - as calculator sample - DivideService.java - as calculator sample - CalculatorClient.java - as calculator sample - CalculatorServiceImpl.java - calls the RMI service - that provides the target for the - RMI bindings in the composite - resources/ - CalculatorRMIReference.composite - the SCA assembly for this sample - test/ - java/ - calculator/ - CalculatorRMIReferenceTestCase.java - JUnit test case - CalculatorRMIServiceImpl.java - test RMI service to call - calculator-rmi-reference.png - a pictorial representation of the - .composite file - build.xml - the Ant build file for the client - pom.xml - the Maven build file - -Note. As this test creates and uses local network connections you may need to -configure your firewall, if you are running one, to allow the test to run -successfully. - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant. - -The server provides an RMI server that the acts as a target for the SCA RMI -bindings. Start a new console and use the following commands. - -cd calculator-rmi-service -ant compile -ant run - -This will run up the server and display the following. - -run: - [java] Starting of the SCA Calculator Application exposed as RMI Services... - [java] ...Press Enter to Exit... - -The client is very similar to the calculator sample. It starts the SCA runtime -and calls each of the calculator operations. In doing this the RMI bindings -make calls out to the RMI server you started in the previous step. Start -a new console and use the following commands. - -cd calculator-rmi-reference -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 3 + 2=5.0 - [java] 3 - 2=1.0 - [java] 3 * 2=6.0 - [java] 3 / 2=1.5 - -If you now return to the console window running the server and press enter the -server should stop. - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator-rmi-reference -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.CalculatorRMIReferenceTestCase -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.308 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. - - - diff --git a/branches/sca-android/samples/calculator-rmi-reference/build.xml b/branches/sca-android/samples/calculator-rmi-reference/build.xml deleted file mode 100644 index ca75625b42..0000000000 --- a/branches/sca-android/samples/calculator-rmi-reference/build.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-rmi-reference/calculator-rmi-reference.png b/branches/sca-android/samples/calculator-rmi-reference/calculator-rmi-reference.png deleted file mode 100644 index 8c76b77a9f..0000000000 Binary files a/branches/sca-android/samples/calculator-rmi-reference/calculator-rmi-reference.png and /dev/null differ diff --git a/branches/sca-android/samples/calculator-rmi-reference/calculator-rmi-reference.svg b/branches/sca-android/samples/calculator-rmi-reference/calculator-rmi-reference.svg deleted file mode 100644 index ba802e6717..0000000000 --- a/branches/sca-android/samples/calculator-rmi-reference/calculator-rmi-reference.svg +++ /dev/null @@ -1,412 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService - CalculatorServiceRMIImpl - addService - subtractService - multiplyService - divideService - - - - - AddReference - SubtractReference - MultiplyReference - DivideReference - RMIRegistry - - - - - RMI RMI RMI RMI - diff --git a/branches/sca-android/samples/calculator-rmi-reference/pom.xml b/branches/sca-android/samples/calculator-rmi-reference/pom.xml deleted file mode 100644 index 452662e7aa..0000000000 --- a/branches/sca-android/samples/calculator-rmi-reference/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-calculator-rmi-reference - Apache Tuscany SCA Calculator RMI Reference Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-binding-rmi - 1.4-SNAPSHOT - runtime - - - junit - junit - 4.2 - test - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/AddService.java b/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/AddService.java deleted file mode 100644 index ec57a6a533..0000000000 --- a/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the add service - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorClient.java b/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index cd1076c3f1..0000000000 --- a/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("CalculatorRMIReference.composite"); - CalculatorService calculatorService = - scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); - - // Calculate - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - scaDomain.close(); - - } - -} diff --git a/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorService.java b/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index d310dad4b1..0000000000 --- a/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import org.osoa.sca.annotations.Remotable; - -/** - * The Calculator service interface. - */ -@Remotable -public interface CalculatorService extends Remote { - - double add(double n1, double n2) throws RemoteException; - - double subtract(double n1, double n2) throws RemoteException; - - double multiply(double n1, double n2) throws RemoteException; - - double divide(double n1, double n2) throws RemoteException; -} diff --git a/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index f28f0ca179..0000000000 --- a/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Reference; - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } -} diff --git a/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/DivideService.java b/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/DivideService.java deleted file mode 100644 index 835e4fda6d..0000000000 --- a/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the divide service - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/MultiplyService.java b/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index db568cc762..0000000000 --- a/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/SubtractService.java b/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 30e4e6a56a..0000000000 --- a/branches/sca-android/samples/calculator-rmi-reference/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the subtract service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-rmi-reference/src/main/resources/CalculatorRMIReference.composite b/branches/sca-android/samples/calculator-rmi-reference/src/main/resources/CalculatorRMIReference.composite deleted file mode 100644 index a5a6e1cd29..0000000000 --- a/branches/sca-android/samples/calculator-rmi-reference/src/main/resources/CalculatorRMIReference.composite +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIReferenceTestCase.java b/branches/sca-android/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIReferenceTestCase.java deleted file mode 100644 index 15e00f5946..0000000000 --- a/branches/sca-android/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIReferenceTestCase.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.rmi.registry.LocateRegistry; -import java.rmi.registry.Registry; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - - -/** - * This shows how to test the Calculator service component. - */ -public class CalculatorRMIReferenceTestCase extends TestCase { - - private SCADomain scaDomain; - private CalculatorService calculatorService; - - @Override - protected void setUp() throws Exception { - CalculatorRMIServiceImpl rmiCalculatorImpl = new CalculatorRMIServiceImpl(); - Registry rmiRegistry = LocateRegistry.createRegistry(8099); - rmiRegistry.bind("CalculatorRMIService", rmiCalculatorImpl); - - scaDomain = SCADomain.newInstance("CalculatorRMIReference.composite"); - calculatorService = scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - LocateRegistry.getRegistry(8099).unbind("CalculatorRMIService"); - } - - public void testCalculator() throws Exception { - // Calculate - assertEquals(calculatorService.add(3, 2), 5.0); - assertEquals(calculatorService.subtract(3, 2), 1.0); - assertEquals(calculatorService.multiply(3, 2), 6.0); - assertEquals(calculatorService.divide(3, 2), 1.5); - } -} diff --git a/branches/sca-android/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIServiceImpl.java b/branches/sca-android/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIServiceImpl.java deleted file mode 100644 index d8ded42cb2..0000000000 --- a/branches/sca-android/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIServiceImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.rmi.RemoteException; -import java.rmi.server.UnicastRemoteObject; - - - -/** - * An implementation of the Calculator service. - */ -public class CalculatorRMIServiceImpl extends UnicastRemoteObject implements CalculatorService { - - private static final long serialVersionUID = -1543948944662001428L; - - public CalculatorRMIServiceImpl() throws RemoteException { - super(); - } - - public double add(double n1, double n2) throws RemoteException { - return n1 + n2; - } - - public double subtract(double n1, double n2) { - return n1 - n2; - } - - public double multiply(double n1, double n2) { - return n1 * n2; - } - - public double divide(double n1, double n2) { - return n1 / n2; - } -} diff --git a/branches/sca-android/samples/calculator-rmi-service/README b/branches/sca-android/samples/calculator-rmi-service/README deleted file mode 100644 index 454cdc0d37..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/README +++ /dev/null @@ -1,147 +0,0 @@ -Calculator RMI Service Sample -============================= - -This sample illustrates the use of Tuscany RMI Binding to expose component -services as Java RMI Services. It also demonstrates how a simple Java RMI -Client application invokes the SCA Application's services exposed as RMI -Services. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-rmi-service.jar calculator.CalculatorServer - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator-rmi-service.jar calculator.CalculatorServer - -Now you have the server running you need to open another command prompt, navigate -to the calculator-rmi-reference sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-rmi-reference.jar calculator.CalculatorClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator-rmi-reference.jar calculator.CalculatorClient - - -Sample Overview ---------------- -This sample extends the calculator sample by replacing the local service -binding with an RMI binding. SO a java client can call the service exposed -by the SCA application using an RMI client. - -This sample adds a number of classes to the basic calculator sample: - -calculator-rmi-service/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - as calculator sample - CalculatorServiceImpl.java - AddService.java - as calculator sample - AddServiceImpl.java - SubtractService.java - as calculator sample - SubtractServiceImpl.java - MultiplyService.java - as calculator sample - MultiplyServiceImpl.java - DivideService.java - as calculator sample - DivideServiceImpl.java - CalculatorClient.java - (Not currently used) Uses the - java naming service to - look up the Calculator RMI service. - It then calls add, subtract, multiple - and divide methods on the service - CalculatorServer.java - starts the SCA Runtime and deploys - the CalculatorRMIServer.composite. - In doing this the SCA RMI binding - acts to expose the CalculatorService - over RMI. - resources/ - CalculatorRMIServer.composite - the SCA assembly for this sample - test/ - java/ - calculator/ - CalculatorRMIServerTestCase.java - JUnit test case - calculator-rmi-service.png - a pictorial representation of the - .composite file - build.xml - the Ant build file for the server - pom.xml - the Maven build file - -Note. As this test creates and uses local network connections you may need to -configure your firewall, if you are running one, to allow the test to run -successfully. - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant. Two -build files are used to support client and server functions. - -The server starts the SCA runtime and loads the SCA calculator application -which exposes an RMI service. Start a new console and use the following -commands. - -cd calculator-rmi-service -ant compile -ant run - -This will run up the server and display the following. - -run: - [java] Starting of the SCA Calculator Application exposed as RMI Services... - [java] ...Press Enter to Exit... - -The client is very similar to the calculator sample - -It locates the RMI service that the SCA runtime is exposing and calls each of -the calculator operations. Start a new console and use the following commands. - -cd calculator-rmi-reference -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 3 + 2=5.0 - [java] 3 - 2=1.0 - [java] 3 * 2=6.0 - [java] 3 / 2=1.5 - -If you now return to the console window running the server and press enter the -server should stop. - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator-rmi-service -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.CalculatorRMIServerTestCase -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.819 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/calculator-rmi-service/build.xml b/branches/sca-android/samples/calculator-rmi-service/build.xml deleted file mode 100644 index f98f35e4b0..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-rmi-service/calculator-rmi-service.png b/branches/sca-android/samples/calculator-rmi-service/calculator-rmi-service.png deleted file mode 100644 index 574f5eb14b..0000000000 Binary files a/branches/sca-android/samples/calculator-rmi-service/calculator-rmi-service.png and /dev/null differ diff --git a/branches/sca-android/samples/calculator-rmi-service/calculator-rmi-service.svg b/branches/sca-android/samples/calculator-rmi-service/calculator-rmi-service.svg deleted file mode 100644 index 9253110f98..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/calculator-rmi-service.svg +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService(RMI) - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - - - diff --git a/branches/sca-android/samples/calculator-rmi-service/pom.xml b/branches/sca-android/samples/calculator-rmi-service/pom.xml deleted file mode 100644 index 5294cced21..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-calculator-rmi-service - Apache Tuscany SCA Calculator RMI Service Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-binding-rmi - 1.4-SNAPSHOT - runtime - - - junit - junit - 4.2 - test - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/AddService.java b/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/AddService.java deleted file mode 100644 index ec57a6a533..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the add service - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/AddServiceImpl.java b/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index e9c635e3c8..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the Add service - */ -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - return n1 + n2; - } - -} diff --git a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/CalculatorClient.java b/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 2b99485b68..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator; - -import java.rmi.Naming; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - CalculatorService calculatorService = (CalculatorService)Naming.lookup("//localhost:8099/CalculatorRMIService"); - - // Calculate - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - } - -} diff --git a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServer.java b/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServer.java deleted file mode 100644 index b698163c1b..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServer.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * A claculator service server. Starts up the SCA runtime which - * will start listening for RMI service requests. - */ -public class CalculatorServer { - public static void main(String[] args) throws Exception { - System.out.println("Starting of the SCA Calculator Application exposed as RMI Services..."); - SCADomain scaDomain = SCADomain.newInstance("CalculatorRMIServer.composite"); - System.out.println("... Press Enter to Exit..."); - System.in.read(); - scaDomain.close(); - System.out.println("Exited..."); - System.exit(0); - } - -} diff --git a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/CalculatorService.java b/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 3ddcef61df..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Remotable; - -/** - * The Calculator service interface. - */ -@Remotable -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); -} diff --git a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index f28f0ca179..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Reference; - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } -} diff --git a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/DivideService.java b/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/DivideService.java deleted file mode 100644 index 835e4fda6d..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the divide service - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 8c33862f6d..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - return n1 / n2; - } - -} diff --git a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/MultiplyService.java b/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index db568cc762..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index c7fbc73c00..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - return n1 * n2; - } - -} diff --git a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/SubtractService.java b/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 30e4e6a56a..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the subtract service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 1a7f145ad8..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - return n1 - n2; - } - -} diff --git a/branches/sca-android/samples/calculator-rmi-service/src/main/resources/CalculatorRMIServer.composite b/branches/sca-android/samples/calculator-rmi-service/src/main/resources/CalculatorRMIServer.composite deleted file mode 100644 index 34d90ab451..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/src/main/resources/CalculatorRMIServer.composite +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-rmi-service/src/test/java/calculator/CalculatorRMIServerTestCase.java b/branches/sca-android/samples/calculator-rmi-service/src/test/java/calculator/CalculatorRMIServerTestCase.java deleted file mode 100644 index 8943dd24f6..0000000000 --- a/branches/sca-android/samples/calculator-rmi-service/src/test/java/calculator/CalculatorRMIServerTestCase.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.rmi.Naming; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This shows how to test the Calculator service component. - */ -public class CalculatorRMIServerTestCase extends TestCase { - - private SCADomain scaDomain; - private CalculatorService calculatorService; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("CalculatorRMIServer.composite"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testCalculator() throws Exception { - // Calculate - calculatorService = (CalculatorService)Naming.lookup("//localhost:8099/CalculatorRMIService"); - assertEquals(calculatorService.add(3, 2), 5.0); - assertEquals(calculatorService.subtract(3, 2), 1.0); - assertEquals(calculatorService.multiply(3, 2), 6.0); - assertEquals(calculatorService.divide(3, 2), 1.5); - } -} diff --git a/branches/sca-android/samples/calculator-script/README b/branches/sca-android/samples/calculator-script/README deleted file mode 100644 index ab1dda13df..0000000000 --- a/branches/sca-android/samples/calculator-script/README +++ /dev/null @@ -1,105 +0,0 @@ -Calculator Script Sample -======================== -This sample implements a simple calculator using SCA components implemented -using Java, JavaScript, Ruby, Python and Groovy. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-script.jar calculator.CalculatorClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator-script.jar calculator.CalculatorClient - -Sample Overview ---------------- -The sample provides a single calculator service with a default SCA (java) -binding. The CalculatorClient exercises this interface by calling add, -subtract, multiply and divide operations. This results in messages passing -to the appropriate components in the composite across the local wires. Each -component is implemented using a different language. - -calculator-script/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - the first component calls +-/* as - appropriate - CalculatorServiceImpl.java - AddService.java - adds two numbers - SubtractService.java - subtracts one number from another - MultiplyService.java - multiplies two numbers - DivideService.java - divides one number by another - CalculatorClient.java - starts the SCA Runtime and - deploys the Calculator.composite. - It then calls the deployed Calculator - Components services - resources/ - calculator/ - AddServiceImpl.js - A JavaScript implementation of the - Add component - SubtractServiceImpl.rb - A Ruby implementation of the Subtract - component - MultiplyServiceImpl.py - A Python implementation of the - Multiple component - DivideServiceImpl.groovy- A Groovy implementation of the - Divide component - Calculator.composite - the SCA assembly for this sample - - test/ - java/ - calculator/ - CalculatorTestCase.java - JUnit test case - calculator-script.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd calculator-script -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 3 + 2=5.0 - [java] 3 - 2=1.0 - [java] 3 * 2=6.0 - [java] 3 / 2=1.5 - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator-script -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.CalculatorTestCase -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.918 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/calculator-script/build.xml b/branches/sca-android/samples/calculator-script/build.xml deleted file mode 100644 index 429d638ca5..0000000000 --- a/branches/sca-android/samples/calculator-script/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-script/calculator-script.png b/branches/sca-android/samples/calculator-script/calculator-script.png deleted file mode 100644 index d3f8c491c3..0000000000 Binary files a/branches/sca-android/samples/calculator-script/calculator-script.png and /dev/null differ diff --git a/branches/sca-android/samples/calculator-script/calculator-script.svg b/branches/sca-android/samples/calculator-script/calculator-script.svg deleted file mode 100644 index 16939f9310..0000000000 --- a/branches/sca-android/samples/calculator-script/calculator-script.svg +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent(Java) - - - CalculatorService - AddServiceComponent(Javascript) - - SubtractServiceComponent(Ruby) - - MultiplyServiceComponent(Python) - - DivideServiceComponent(Groovy) - addService - subtractService - multiplyService - divideService - - - - - - diff --git a/branches/sca-android/samples/calculator-script/pom.xml b/branches/sca-android/samples/calculator-script/pom.xml deleted file mode 100644 index bbc430875a..0000000000 --- a/branches/sca-android/samples/calculator-script/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-calculator-script - Apache Tuscany SCA Calculator Sample using Scripting Languages - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-script - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-interface-wsdl-xml - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-android/samples/calculator-script/src/main/java/calculator/AddService.java b/branches/sca-android/samples/calculator-script/src/main/java/calculator/AddService.java deleted file mode 100644 index a235e648c7..0000000000 --- a/branches/sca-android/samples/calculator-script/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the add service - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-script/src/main/java/calculator/CalculatorClient.java b/branches/sca-android/samples/calculator-script/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 243d1562dc..0000000000 --- a/branches/sca-android/samples/calculator-script/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - - SCADomain scaDomain = SCADomain.newInstance("Calculator.composite"); - CalculatorService calculatorService = - scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); - - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - scaDomain.close(); - } - -} diff --git a/branches/sca-android/samples/calculator-script/src/main/java/calculator/CalculatorService.java b/branches/sca-android/samples/calculator-script/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index c89043276e..0000000000 --- a/branches/sca-android/samples/calculator-script/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-script/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-android/samples/calculator-script/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index ba897fa301..0000000000 --- a/branches/sca-android/samples/calculator-script/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Reference; - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/branches/sca-android/samples/calculator-script/src/main/java/calculator/DivideService.java b/branches/sca-android/samples/calculator-script/src/main/java/calculator/DivideService.java deleted file mode 100644 index 497dafd4fd..0000000000 --- a/branches/sca-android/samples/calculator-script/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the divide service - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-script/src/main/java/calculator/MultiplyService.java b/branches/sca-android/samples/calculator-script/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/branches/sca-android/samples/calculator-script/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-script/src/main/java/calculator/SubtractService.java b/branches/sca-android/samples/calculator-script/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 376b3e5bb9..0000000000 --- a/branches/sca-android/samples/calculator-script/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the subtract service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-script/src/main/resources/Calculator.composite b/branches/sca-android/samples/calculator-script/src/main/resources/Calculator.composite deleted file mode 100644 index 8a765e6153..0000000000 --- a/branches/sca-android/samples/calculator-script/src/main/resources/Calculator.composite +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-script/src/main/resources/calculator/AddServiceImpl.js b/branches/sca-android/samples/calculator-script/src/main/resources/calculator/AddServiceImpl.js deleted file mode 100644 index 1d4d221364..0000000000 --- a/branches/sca-android/samples/calculator-script/src/main/resources/calculator/AddServiceImpl.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -function add(n1, n2) { - return n1 + n2; -} \ No newline at end of file diff --git a/branches/sca-android/samples/calculator-script/src/main/resources/calculator/DivideServiceImpl.groovy b/branches/sca-android/samples/calculator-script/src/main/resources/calculator/DivideServiceImpl.groovy deleted file mode 100644 index c31c1e8fd6..0000000000 --- a/branches/sca-android/samples/calculator-script/src/main/resources/calculator/DivideServiceImpl.groovy +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -def divide(n1, n2) { - return n1 / n2 -} \ No newline at end of file diff --git a/branches/sca-android/samples/calculator-script/src/main/resources/calculator/MultiplyServiceImpl.py b/branches/sca-android/samples/calculator-script/src/main/resources/calculator/MultiplyServiceImpl.py deleted file mode 100644 index d6f27ca7f5..0000000000 --- a/branches/sca-android/samples/calculator-script/src/main/resources/calculator/MultiplyServiceImpl.py +++ /dev/null @@ -1,20 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -def multiply(n1, n2): - return n1 * n2 \ No newline at end of file diff --git a/branches/sca-android/samples/calculator-script/src/main/resources/calculator/SubtractServiceImpl.rb b/branches/sca-android/samples/calculator-script/src/main/resources/calculator/SubtractServiceImpl.rb deleted file mode 100644 index 132a1d13b0..0000000000 --- a/branches/sca-android/samples/calculator-script/src/main/resources/calculator/SubtractServiceImpl.rb +++ /dev/null @@ -1,21 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -def subtract(n1, n2) - return n1 - n2 -end \ No newline at end of file diff --git a/branches/sca-android/samples/calculator-script/src/test/java/calculator/CalculatorTestCase.java b/branches/sca-android/samples/calculator-script/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index fea8f62110..0000000000 --- a/branches/sca-android/samples/calculator-script/src/test/java/calculator/CalculatorTestCase.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This shows how to test the Calculator service component. - */ -public class CalculatorTestCase extends TestCase { - - private SCADomain scaDomain; - private CalculatorService calculatorService; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("Calculator.composite"); - calculatorService = scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testCalculator() throws Exception { - // Calculate - assertEquals(calculatorService.add(3, 2), 5.0); - assertEquals(calculatorService.subtract(3, 2), 1.0); - assertEquals(calculatorService.multiply(3, 2), 6.0); - assertEquals(calculatorService.divide(3, 2), 1.5); - - } -} diff --git a/branches/sca-android/samples/calculator-webapp/README b/branches/sca-android/samples/calculator-webapp/README deleted file mode 100644 index c88b92b206..0000000000 --- a/branches/sca-android/samples/calculator-webapp/README +++ /dev/null @@ -1,118 +0,0 @@ -Calculator Sample -================= -This sample uses the same code as the calculator sample but deploys the -sample wrapped in a web app. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -As this sample provides a web app there is a manual step where the WAR file -that contains the sample is copied to your web app container. If you just want -to give this sample a go deploy the WAR file (target/sample-calculator-webapp.war) -to you web application server. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-calculator-webapp/calc.jsp - -The port and hostname will of course vary depending on your local installation. - -Sample Overview ---------------- -The sample provides a single calculator service with a default SCA (java) -binding. The CalculatorClient exercises this interface by calling add, -subtract, multiply and divide operations. This results in messages passing to -the appropriate components in the composite across the local wires. - -calculator-webapp/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - As calculator sample - CalculatorServiceImpl.java - AddService.java - As calculator sample - AddServiceImpl.java - SubtractService.java - As calculator sample - SubtractServiceImpl.java - MultiplyService.java - As calculator sample - MultiplyServiceImpl.java - DivideService.java - As calculator sample - DivideServiceImpl.java - CalculatorClient.java - As calculator sample - resources/ - Calculator.composite - As calculator sample - webapp - META-INF/ - sca-contribution.xml - specifies the composite to be deployed - WEB-INF/ - web.xml - defines the listener that starts up the - Tuscany SCA runtime - calc.jsp - the web application that makes use of the - SCA application - test/ - java/ - calculator/ - CalculatorTestCase.java - JUnit test case - - calculator.png - a pictorial representation of the sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built using Ant as -follows - -cd calculator-webapp -ant package - -This should result in a war file (sample-calculator-webapp.war) in the target -directory. Copy this war file to your web app deployment directory in you -web app container. - -The process for getting the web app running will depend on which web app container -you are using. For example, if you are using Tomcat then it is simply a matter -of copying the WAR file to the webapps directory. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-calculator-webapp/calc.jsp - -The port and hostname will of course vary depending on your local installation. - -You should see the following output. - -Expression Result -2 + 3 5.0 -3 - 2 1.0 -3 * 2 6.0 -3 / 2 1.5 - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator-webapp -mvn - - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.CalculatorTestCase -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.852 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -Again this should result in a war file (sample-calculator-webapp.war) in the target -directory. Follow the steps described in the previous section for running the web -app and for the expected results. - - diff --git a/branches/sca-android/samples/calculator-webapp/calculator-web.png b/branches/sca-android/samples/calculator-webapp/calculator-web.png deleted file mode 100644 index 896ddc4093..0000000000 Binary files a/branches/sca-android/samples/calculator-webapp/calculator-web.png and /dev/null differ diff --git a/branches/sca-android/samples/calculator-webapp/calculator-web.svg b/branches/sca-android/samples/calculator-webapp/calculator-web.svg deleted file mode 100644 index 00ed27556f..0000000000 --- a/branches/sca-android/samples/calculator-webapp/calculator-web.svg +++ /dev/null @@ -1,358 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - - - WebApp - - diff --git a/branches/sca-android/samples/calculator-webapp/pom.xml b/branches/sca-android/samples/calculator-webapp/pom.xml deleted file mode 100644 index cccbd6aefa..0000000000 --- a/branches/sca-android/samples/calculator-webapp/pom.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-calculator-webapp - war - Apache Tuscany SCA Calculator Sample in a WebApp - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - - stax - stax-api - 1.0.1 - provided - - - - - javax.servlet - servlet-api - 2.3 - provided - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - diff --git a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/AddService.java b/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/AddService.java deleted file mode 100644 index ec57a6a533..0000000000 --- a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the add service - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/AddServiceImpl.java b/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index e9c635e3c8..0000000000 --- a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the Add service - */ -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - return n1 + n2; - } - -} diff --git a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/CalculatorClient.java b/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 4787b728f4..0000000000 --- a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - * - * (not really necessary as this sample runs in a webapp) - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - - SCADomain scaDomain = SCADomain.newInstance("Calculator.composite"); - CalculatorService calculatorService = - scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); - - // Calculate - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - scaDomain.close(); - - } - -} diff --git a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/CalculatorService.java b/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index ad87375529..0000000000 --- a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index bf3b0303ec..0000000000 --- a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Reference; - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/DivideService.java b/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/DivideService.java deleted file mode 100644 index 835e4fda6d..0000000000 --- a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the divide service - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 8c33862f6d..0000000000 --- a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - return n1 / n2; - } - -} diff --git a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/MultiplyService.java b/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index db568cc762..0000000000 --- a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index c7fbc73c00..0000000000 --- a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - return n1 * n2; - } - -} diff --git a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/SubtractService.java b/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 30e4e6a56a..0000000000 --- a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the subtract service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 1a7f145ad8..0000000000 --- a/branches/sca-android/samples/calculator-webapp/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - return n1 - n2; - } - -} diff --git a/branches/sca-android/samples/calculator-webapp/src/main/resources/Calculator.composite b/branches/sca-android/samples/calculator-webapp/src/main/resources/Calculator.composite deleted file mode 100644 index 50c23af0b2..0000000000 --- a/branches/sca-android/samples/calculator-webapp/src/main/resources/Calculator.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-android/samples/calculator-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index fe09ab2e1b..0000000000 --- a/branches/sca-android/samples/calculator-webapp/src/main/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/calculator-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-android/samples/calculator-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index b5a828d55b..0000000000 --- a/branches/sca-android/samples/calculator-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - Apache Tuscany Calculator Web Service Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - calc.jsp - - - diff --git a/branches/sca-android/samples/calculator-webapp/src/main/webapp/calc.jsp b/branches/sca-android/samples/calculator-webapp/src/main/webapp/calc.jsp deleted file mode 100644 index 4bc5c984dd..0000000000 --- a/branches/sca-android/samples/calculator-webapp/src/main/webapp/calc.jsp +++ /dev/null @@ -1,47 +0,0 @@ -<%-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---%> - -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %> - - - - -Calculator sample - - - - - - - - - - - - - - - - - - -
ExpressionResult
2 + 3<%= CalculatorServiceComponent.add(2, 3) %>
3 - 2<%= CalculatorServiceComponent.subtract(3, 2) %>
3 * 2<%= CalculatorServiceComponent.multiply(3, 2) %>
3 / 2<%= CalculatorServiceComponent.divide(3, 2) %>
- - diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/README b/branches/sca-android/samples/calculator-ws-secure-webapp/README deleted file mode 100644 index a6e6c897e4..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/README +++ /dev/null @@ -1,108 +0,0 @@ -Calculator Sample Exposing Web Services In A WebApp -=================================================== -This sample uses the same code as the calculator sample, it deploys the -sample wrapped in a web app and exposes the AddService as a web service. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -As this sample provides a web app there is a manual step where the WAR file -that contains the sample is copied to your web app container. If you just want -to give this sample a go deploy the WAR file (target/sample-calculator-ws-webapp.war) -to you web application server. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-calculator-ws-webapp - -The sample is configured to use a service on port 8080. If your servlet container -is using a port other than 8080 then you will need to edit the Calculator.composite -and change the uri attribute of the used by the CalculatorServiceComponent -to use the correct port. - -Sample Overview ---------------- -The sample provides a single calculator service with a default SCA (java) -binding. The CalculatorClient exercises this interface by calling add, -subtract, multiply and divide operations. This results in messages passing to -the appropriate components in the composite. - -calculator-webapp/ - src/ - main/ - java/ - calculator/ - AddService.java - As calculator sample - AddServiceImpl.java - CalculatorClient.java - As calculator sample - CalculatorService.java - As calculator sample - CalculatorServiceImpl.java - DivideService.java - As calculator sample - DivideServiceImpl.java - MultiplyService.java - As calculator sample - MultiplyServiceImpl.java - SubtractService.java - As calculator sample - SubtractServiceImpl.java - resources/ - Calculator.composite - As calculator sample except that the - connection between the CalculatorService - and the AddService is web services - webapp - META-INF/ - sca-contribution.xml - specifies the composite to be deployed - WEB-INF/ - web.xml - defines the listener that starts up the - Tuscany SCA runtime and maps service - calls to the TuscanyServlet - calc.jsp - the web application that makes use of the - SCA application - - calculator.png - a pictorial representation of the sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - README - this file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built using Ant as -follows - -cd calculator-ws-webapp -ant package - -This should result in a war file (sample-calculator-ws-webapp.war) in the target -directory. Copy this war file to your web app deployment directory in you -web app container. - -The process for getting the web app running will depend on which web app container -you are using. For example, if you are using Tomcat then it is simply a matter -of copying the WAR file to the webapps directory. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-calculator-ws-webapp - -The port and hostname will of course vary depending on your local installation. - -You should see the following output. - -Expression Result -2 + 3 5.0 -3 - 2 1.0 -3 * 2 6.0 -3 / 2 1.5 - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator-ws-webapp -mvn - -Again this should result in a war file (sample-calculator-ws-webapp.war) in the target -directory. Follow the steps described in the previous section for running the web -app and for the expected results. - - diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/calculator-web.png b/branches/sca-android/samples/calculator-ws-secure-webapp/calculator-web.png deleted file mode 100644 index f482b8d1c8..0000000000 Binary files a/branches/sca-android/samples/calculator-ws-secure-webapp/calculator-web.png and /dev/null differ diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/calculator-web.svg b/branches/sca-android/samples/calculator-ws-secure-webapp/calculator-web.svg deleted file mode 100644 index 1b7015b156..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/calculator-web.svg +++ /dev/null @@ -1,455 +0,0 @@ - - - - - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - - - calc.jsp - - AppServer SOAP local local local - - - - diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/pom.xml b/branches/sca-android/samples/calculator-ws-secure-webapp/pom.xml deleted file mode 100644 index 5b506ee96c..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/pom.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-calculator-ws-secure-webapp - war - Apache Tuscany SCA Calculator Sample Web Service enabled for -WS Security and in a WebApp - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - - stax - stax-api - 1.0.1 - provided - - - - - javax.servlet - servlet-api - 2.3 - provided - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddService.java b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddService.java deleted file mode 100644 index c3c789e745..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Remotable; - -/** - * The interface for the add service - */ -@Remotable -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddServiceImpl.java b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 46ec182124..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Service; - -/** - * An implementation of the Add service - */ -@Service(AddService.class) -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - System.err.println("********* Adding ***** " + n1 + " to " + n2); - System.err.println("Adding " + n1 + " to " + n2); - return n1 + n2; - } - -} diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorClient.java b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 4787b728f4..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - * - * (not really necessary as this sample runs in a webapp) - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - - SCADomain scaDomain = SCADomain.newInstance("Calculator.composite"); - CalculatorService calculatorService = - scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); - - // Calculate - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - scaDomain.close(); - - } - -} diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorService.java b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index ad87375529..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index bf3b0303ec..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Reference; - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideService.java b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideService.java deleted file mode 100644 index 835e4fda6d..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the divide service - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 8c33862f6d..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - return n1 / n2; - } - -} diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyService.java b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index db568cc762..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index c7fbc73c00..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - return n1 * n2; - } - -} diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractService.java b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractService.java deleted file mode 100644 index c8653806aa..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Remotable; - -/** - * The interface for the subtract service - */ -@Remotable -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 1a7f145ad8..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - return n1 - n2; - } - -} diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ClientPWCBHandler.java b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ClientPWCBHandler.java deleted file mode 100644 index 9625c0d692..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ClientPWCBHandler.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator.security; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.apache.ws.security.WSPasswordCallback; - -/** - * Sample userid passwd generation class - */ -public class ClientPWCBHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, - UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - System.out.println("*** Calling Client UserId/Password Handler .... "); - WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i]; - System.out.println("User Id = " + pwcb.getIdentifer()); - System.out.println("Set Password = " + pwcb.getPassword()); - System.out.println("Usage = " + pwcb.getUsage()); - if ( pwcb.getUsage() == WSPasswordCallback.USERNAME_TOKEN ) { - if ( pwcb.getIdentifer().equals("CalculatorUser")){ - pwcb.setPassword("CalculatorUserPasswd"); - } else { - throw new UnsupportedCallbackException(pwcb, "Authentication Failed : UserId - Password mismatch"); - } - } else if ( pwcb.getUsage() == WSPasswordCallback.SIGNATURE ) { - if ( pwcb.getIdentifer().equals("CalculatorUser")) { - pwcb.setPassword("CalculatorUserPasswd"); - } else { - pwcb.setPassword("CalculatorAdmin"); - } - } - } - } - -} diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ServerPWCBHandler.java b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ServerPWCBHandler.java deleted file mode 100644 index 23a62680c5..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ServerPWCBHandler.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator.security; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.apache.ws.security.WSPasswordCallback; - -/** - * Sample userid passwd generation class - */ -public class ServerPWCBHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, - UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - System.out.println("*** Calling Server User/Passwd Handler...."); - WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i]; - System.out.println("User Id = " + pwcb.getIdentifer()); - System.out.println("Password = " + pwcb.getPassword()); - System.out.println("Usage = " + pwcb.getUsage()); - if ( pwcb.getUsage() == WSPasswordCallback.USERNAME_TOKEN_UNKNOWN ) { - if ( pwcb.getIdentifer().equals("CalculatorUser") && - pwcb.getPassword().equals("CalculatorUserPasswd") ){ - return; - } else { - throw new UnsupportedCallbackException(pwcb, "Authentication Failed : UserId - Password mismatch"); - } - } else if ( pwcb.getUsage() == WSPasswordCallback.SIGNATURE ) { - if ( pwcb.getIdentifer().equals("CalculatorUser")) { - pwcb.setPassword("CalculatorUserPasswd"); - } else { - pwcb.setPassword("CalculatorAdmin"); - } - } - } - } - -} diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/Calculator.composite b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/Calculator.composite deleted file mode 100644 index 4d511f887e..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/Calculator.composite +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler deleted file mode 100644 index 858e87a34f..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler +++ /dev/null @@ -1,21 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# PolicyHandlerClasses to interpret specific PolicyModels against specific QoS infrastructures -# handler classname;qname=;model= -org.apache.tuscany.sca.policy.security.ws.Axis2ConfigParamPolicyHandler;intent=http://calculator#wsAuthentication,model=org.apache.tuscany.sca.policy.security.ws.Axis2ConfigParamPolicy -org.apache.tuscany.sca.policy.security.ws.WSSecurityPolicyHandler;intent=http://calculator#wsIntegrity,model=org.apache.neethi.Policy \ No newline at end of file diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/calculatorKeys.jks b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/calculatorKeys.jks deleted file mode 100644 index b6b244244b..0000000000 Binary files a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/calculatorKeys.jks and /dev/null differ diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/definitions.xml b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/definitions.xml deleted file mode 100644 index 4611669bbd..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/definitions.xml +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - - - - UsernameToken - calculator.security.ServerPWCBHandler - - - - - - - - - - UsernameToken - CalculatorUser - calculator.security.ClientPWCBHandler" + - PasswordText - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CalculatorAdmin - CalculatorAdmin - calculator.security.ServerPWCBHandler - - - - JKS - calculatorKeys.jks - CalculatorAdmin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CalculatorAdmin - CalculatorAdmin - calculator.security.ClientPWCBHandler - - - - JKS - calculatorKeys.jks - CalculatorAdmin - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/security.properties b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/security.properties deleted file mode 100644 index a7a6f3aa9c..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/resources/security.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin -org.apache.ws.security.crypto.merlin.keystore.type=jks -org.apache.ws.security.crypto.merlin.keystore.password=CalculatorAdmin -org.apache.ws.security.crypto.merlin.file=calculatorKeys.jks \ No newline at end of file diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index fe09ab2e1b..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/geronimo-web.xml b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/geronimo-web.xml deleted file mode 100644 index 9b2a05d582..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/geronimo-web.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - org.apache.tuscany.sca - sample-calculator-ws-webapp - 1.4-SNAPSHOT - war - - - - - diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d3a62d39f4..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - Apache Tuscany Calculator Web Service Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - calc.jsp - - - diff --git a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/webapp/calc.jsp b/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/webapp/calc.jsp deleted file mode 100644 index 4c4366747d..0000000000 --- a/branches/sca-android/samples/calculator-ws-secure-webapp/src/main/webapp/calc.jsp +++ /dev/null @@ -1,50 +0,0 @@ -<%-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---%> - -<%@ page import="org.apache.tuscany.sca.host.embedded.SCADomain"%> -<%@ page import="calculator.CalculatorService" %> - -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<% - SCADomain scaDomain = (SCADomain) application.getAttribute("org.apache.tuscany.sca.SCADomain"); - CalculatorService calculatorService = (CalculatorService)scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); -%> - -Calculator sample - - - - - - - - - - - - - - - - - - -
ExpressionResult
2 + 3<%= calculatorService.add(2, 3) %>
3 - 2<%= calculatorService.subtract(3, 2) %>
3 * 2<%= calculatorService.multiply(3, 2) %>
3 / 2<%= calculatorService.divide(3, 2) %>
- - diff --git a/branches/sca-android/samples/calculator-ws-webapp/README b/branches/sca-android/samples/calculator-ws-webapp/README deleted file mode 100644 index a6e6c897e4..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/README +++ /dev/null @@ -1,108 +0,0 @@ -Calculator Sample Exposing Web Services In A WebApp -=================================================== -This sample uses the same code as the calculator sample, it deploys the -sample wrapped in a web app and exposes the AddService as a web service. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -As this sample provides a web app there is a manual step where the WAR file -that contains the sample is copied to your web app container. If you just want -to give this sample a go deploy the WAR file (target/sample-calculator-ws-webapp.war) -to you web application server. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-calculator-ws-webapp - -The sample is configured to use a service on port 8080. If your servlet container -is using a port other than 8080 then you will need to edit the Calculator.composite -and change the uri attribute of the used by the CalculatorServiceComponent -to use the correct port. - -Sample Overview ---------------- -The sample provides a single calculator service with a default SCA (java) -binding. The CalculatorClient exercises this interface by calling add, -subtract, multiply and divide operations. This results in messages passing to -the appropriate components in the composite. - -calculator-webapp/ - src/ - main/ - java/ - calculator/ - AddService.java - As calculator sample - AddServiceImpl.java - CalculatorClient.java - As calculator sample - CalculatorService.java - As calculator sample - CalculatorServiceImpl.java - DivideService.java - As calculator sample - DivideServiceImpl.java - MultiplyService.java - As calculator sample - MultiplyServiceImpl.java - SubtractService.java - As calculator sample - SubtractServiceImpl.java - resources/ - Calculator.composite - As calculator sample except that the - connection between the CalculatorService - and the AddService is web services - webapp - META-INF/ - sca-contribution.xml - specifies the composite to be deployed - WEB-INF/ - web.xml - defines the listener that starts up the - Tuscany SCA runtime and maps service - calls to the TuscanyServlet - calc.jsp - the web application that makes use of the - SCA application - - calculator.png - a pictorial representation of the sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - README - this file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built using Ant as -follows - -cd calculator-ws-webapp -ant package - -This should result in a war file (sample-calculator-ws-webapp.war) in the target -directory. Copy this war file to your web app deployment directory in you -web app container. - -The process for getting the web app running will depend on which web app container -you are using. For example, if you are using Tomcat then it is simply a matter -of copying the WAR file to the webapps directory. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-calculator-ws-webapp - -The port and hostname will of course vary depending on your local installation. - -You should see the following output. - -Expression Result -2 + 3 5.0 -3 - 2 1.0 -3 * 2 6.0 -3 / 2 1.5 - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator-ws-webapp -mvn - -Again this should result in a war file (sample-calculator-ws-webapp.war) in the target -directory. Follow the steps described in the previous section for running the web -app and for the expected results. - - diff --git a/branches/sca-android/samples/calculator-ws-webapp/calculator-web.png b/branches/sca-android/samples/calculator-ws-webapp/calculator-web.png deleted file mode 100644 index f482b8d1c8..0000000000 Binary files a/branches/sca-android/samples/calculator-ws-webapp/calculator-web.png and /dev/null differ diff --git a/branches/sca-android/samples/calculator-ws-webapp/calculator-web.svg b/branches/sca-android/samples/calculator-ws-webapp/calculator-web.svg deleted file mode 100644 index 1b7015b156..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/calculator-web.svg +++ /dev/null @@ -1,455 +0,0 @@ - - - - - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - - - calc.jsp - - AppServer SOAP local local local - - - - diff --git a/branches/sca-android/samples/calculator-ws-webapp/pom.xml b/branches/sca-android/samples/calculator-ws-webapp/pom.xml deleted file mode 100644 index 0d8a74c2bf..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/pom.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-calculator-ws-webapp - war - Apache Tuscany SCA Calculator Sample Web Service in a WebApp - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - - stax - stax-api - 1.0.1 - provided - - - - - javax.servlet - servlet-api - 2.3 - provided - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - diff --git a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/AddService.java b/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/AddService.java deleted file mode 100644 index c3c789e745..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Remotable; - -/** - * The interface for the add service - */ -@Remotable -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/AddServiceImpl.java b/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index a7049729f7..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Service; - -/** - * An implementation of the Add service - */ -@Service(AddService.class) -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - System.err.println("Adding " + n1 + " to " + n2); - return n1 + n2; - } - -} diff --git a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorClient.java b/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 4787b728f4..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - * - * (not really necessary as this sample runs in a webapp) - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - - SCADomain scaDomain = SCADomain.newInstance("Calculator.composite"); - CalculatorService calculatorService = - scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); - - // Calculate - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - scaDomain.close(); - - } - -} diff --git a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorService.java b/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index ad87375529..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index bf3b0303ec..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Reference; - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/DivideService.java b/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/DivideService.java deleted file mode 100644 index 835e4fda6d..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the divide service - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 8c33862f6d..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - return n1 / n2; - } - -} diff --git a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/MultiplyService.java b/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index db568cc762..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index c7fbc73c00..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - return n1 * n2; - } - -} diff --git a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/SubtractService.java b/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 30e4e6a56a..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the subtract service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 1a7f145ad8..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - return n1 - n2; - } - -} diff --git a/branches/sca-android/samples/calculator-ws-webapp/src/main/resources/Calculator.composite b/branches/sca-android/samples/calculator-ws-webapp/src/main/resources/Calculator.composite deleted file mode 100644 index 6415d5a896..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/src/main/resources/Calculator.composite +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator-ws-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-android/samples/calculator-ws-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index fe09ab2e1b..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/src/main/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/calculator-ws-webapp/src/main/webapp/WEB-INF/geronimo-web.xml b/branches/sca-android/samples/calculator-ws-webapp/src/main/webapp/WEB-INF/geronimo-web.xml deleted file mode 100644 index 5da8c962a0..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/src/main/webapp/WEB-INF/geronimo-web.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - org.apache.tuscany.sca - sample-calculator-ws-webapp - 1.4-SNAPSHOT - war - - - - - - diff --git a/branches/sca-android/samples/calculator-ws-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-android/samples/calculator-ws-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d3a62d39f4..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - Apache Tuscany Calculator Web Service Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - calc.jsp - - - diff --git a/branches/sca-android/samples/calculator-ws-webapp/src/main/webapp/calc.jsp b/branches/sca-android/samples/calculator-ws-webapp/src/main/webapp/calc.jsp deleted file mode 100644 index 4c4366747d..0000000000 --- a/branches/sca-android/samples/calculator-ws-webapp/src/main/webapp/calc.jsp +++ /dev/null @@ -1,50 +0,0 @@ -<%-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---%> - -<%@ page import="org.apache.tuscany.sca.host.embedded.SCADomain"%> -<%@ page import="calculator.CalculatorService" %> - -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<% - SCADomain scaDomain = (SCADomain) application.getAttribute("org.apache.tuscany.sca.SCADomain"); - CalculatorService calculatorService = (CalculatorService)scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); -%> - -Calculator sample - - - - - - - - - - - - - - - - - - -
ExpressionResult
2 + 3<%= calculatorService.add(2, 3) %>
3 - 2<%= calculatorService.subtract(3, 2) %>
3 * 2<%= calculatorService.multiply(3, 2) %>
3 / 2<%= calculatorService.divide(3, 2) %>
- - diff --git a/branches/sca-android/samples/calculator2/README b/branches/sca-android/samples/calculator2/README deleted file mode 100644 index ceb532faed..0000000000 --- a/branches/sca-android/samples/calculator2/README +++ /dev/null @@ -1,97 +0,0 @@ -Calculator Sample -================= -This sample implements a simple calculator using SCA components. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator.jar calculator.CalculatorClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator.jar calculator.CalculatorClient - -Sample Overview ---------------- -The sample provides a single calculator service with a default SCA (java) -binding. The CalculatorClient exercises this interface by calling add, -subtract, multiply and divide operations. This results in messages passing to -the appropriate components in the composite across the local wires. - -calculator/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - the first component, calls +-/* as - appropriate - CalculatorServiceImpl.java - AddService.java - adds two numbers - AddServiceImpl.java - SubtractService.java - subtracts one number from another - SubtractServiceImpl.java - MultiplyService.java - multiplies two numbers - MultiplyServiceImpl.java - DivideService.java - divides one number by another - DivideServiceImpl.java - CalculatorClient.java - starts the SCA Runtime and - deploys the Calculator.composite. - It then calls the deployed Calculator - Components services - resources/ - Calculator.composite - the SCA assembly for this sample - test/ - java/ - calculator/ - CalculatorTestCase.java - JUnit test case - calculator.png - a pictorial representation of the sample - .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd calculator -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 3 + 2=5.0 - [java] 3 - 2=1.0 - [java] 3 * 2=6.0 - [java] 3 / 2=1.5 - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.CalculatorTestCase -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.272 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/calculator2/build.xml b/branches/sca-android/samples/calculator2/build.xml deleted file mode 100644 index c4b755ef94..0000000000 --- a/branches/sca-android/samples/calculator2/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator2/calculator.png b/branches/sca-android/samples/calculator2/calculator.png deleted file mode 100644 index 995a57b1fd..0000000000 Binary files a/branches/sca-android/samples/calculator2/calculator.png and /dev/null differ diff --git a/branches/sca-android/samples/calculator2/calculator.svg b/branches/sca-android/samples/calculator2/calculator.svg deleted file mode 100644 index 0615925c50..0000000000 --- a/branches/sca-android/samples/calculator2/calculator.svg +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - - - diff --git a/branches/sca-android/samples/calculator2/pom.xml b/branches/sca-android/samples/calculator2/pom.xml deleted file mode 100644 index fd6aaefdc7..0000000000 --- a/branches/sca-android/samples/calculator2/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-calculator2 - Apache Tuscany SCA Calculator Sample - - - - - org.apache.tuscany.sca - tuscany-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-scdl4j - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-runtime2 - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-android/samples/calculator2/src/main/java/calculator/AddService.java b/branches/sca-android/samples/calculator2/src/main/java/calculator/AddService.java deleted file mode 100644 index 188451ebac..0000000000 --- a/branches/sca-android/samples/calculator2/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The Add service interface - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator2/src/main/java/calculator/AddServiceImpl.java b/branches/sca-android/samples/calculator2/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 7ca8fb04b5..0000000000 --- a/branches/sca-android/samples/calculator2/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Add service - */ -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Adding " + n1 + " and " + n2); - return n1 + n2; - } - -} diff --git a/branches/sca-android/samples/calculator2/src/main/java/calculator/CalculatorClient.java b/branches/sca-android/samples/calculator2/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 9d180bf52e..0000000000 --- a/branches/sca-android/samples/calculator2/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - - SCADomain scaDomain = SCADomain.newInstance("Calculator.composite"); - - CalculatorService calculatorService = - scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); - - // Calculate - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - scaDomain.close(); - } - -} diff --git a/branches/sca-android/samples/calculator2/src/main/java/calculator/CalculatorService.java b/branches/sca-android/samples/calculator2/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 031fa8b912..0000000000 --- a/branches/sca-android/samples/calculator2/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator2/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-android/samples/calculator2/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 3d861f2018..0000000000 --- a/branches/sca-android/samples/calculator2/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Reference; - - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/branches/sca-android/samples/calculator2/src/main/java/calculator/DivideService.java b/branches/sca-android/samples/calculator2/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/branches/sca-android/samples/calculator2/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The divide service interface - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator2/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-android/samples/calculator2/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 1323edf55a..0000000000 --- a/branches/sca-android/samples/calculator2/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Dividing " + n1 + " with " + n2); - return n1 / n2; - } - -} diff --git a/branches/sca-android/samples/calculator2/src/main/java/calculator/MultiplyService.java b/branches/sca-android/samples/calculator2/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/branches/sca-android/samples/calculator2/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator2/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-android/samples/calculator2/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index 91b803bc9e..0000000000 --- a/branches/sca-android/samples/calculator2/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Multiplying " + n1 + " with " + n2); - return n1 * n2; - } - -} diff --git a/branches/sca-android/samples/calculator2/src/main/java/calculator/SubtractService.java b/branches/sca-android/samples/calculator2/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/branches/sca-android/samples/calculator2/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-android/samples/calculator2/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-android/samples/calculator2/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 58cc4a3547..0000000000 --- a/branches/sca-android/samples/calculator2/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Subtracting " + n1 + " from " + n2); - return n1 - n2; - } - -} diff --git a/branches/sca-android/samples/calculator2/src/main/resources/Calculator.composite b/branches/sca-android/samples/calculator2/src/main/resources/Calculator.composite deleted file mode 100644 index 90872041b0..0000000000 --- a/branches/sca-android/samples/calculator2/src/main/resources/Calculator.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/calculator2/src/test/java/calculator/CalculatorTestCase.java b/branches/sca-android/samples/calculator2/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index 775ad15537..0000000000 --- a/branches/sca-android/samples/calculator2/src/test/java/calculator/CalculatorTestCase.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This shows how to test the Calculator service component. - */ -public class CalculatorTestCase extends TestCase { - - private CalculatorService calculatorService; - private SCADomain scaDomain; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("Calculator.composite"); - calculatorService = scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testCalculator() throws Exception { - // Calculate - assertEquals(calculatorService.add(3, 2), 5.0); - assertEquals(calculatorService.subtract(3, 2), 1.0); - assertEquals(calculatorService.multiply(3, 2), 6.0); - assertEquals(calculatorService.divide(3, 2), 1.5); - } -} diff --git a/branches/sca-android/samples/callback-ws-client/README b/branches/sca-android/samples/callback-ws-client/README deleted file mode 100644 index 66121362c9..0000000000 --- a/branches/sca-android/samples/callback-ws-client/README +++ /dev/null @@ -1,311 +0,0 @@ -Callback Web Services Client Sample -=================================== -This sample demonstrates an SCA client that sends service requests to a -remote server and receives asynchronous callbacks from the server, using -Web service bindings for the service and the callback. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look -there first. - -If you just want to run it to see what happens, you need to start the -server first, so open a command prompt and navigate to the -callback-ws-service sample directory and do: - -ant run - -OR if you don't have ant, on Windows do: - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-callback-ws-service.jar myserver.CallbackServer - -and on *nix do: - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-callback-ws-service.jar myserver.CallbackServer - -Once the server is running open a command prompt, navigate to this sample -directory and do: - -ant run - -OR if you don't have ant, on Windows do: - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-callback-ws-client.jar myapp.MyClientImpl - -and on *nix do: - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-callback-ws-client.jar myapp.MyClientImpl - - -Sample Overview ---------------- -The sample has a single component that has a reference with a service -interface and a callback interface, with Web service bindings for both -these interfaces. The service interface binding URI identifies the -service exposed by the callback-ws-service sample. - -callback-ws-client/ - src/ - main/ - java/ - myapp/ - MyClient.java - interface description for - MyClientComponent - MyClientImpl.java - component implementation - myserver/ - MyService.java - interface description for - MyServiceComponent - MyServiceCallback.java - interface description for callback - resources/ - myapp.composite - the SCA assembly for this sample - test/ - java/ - myapp/ - CallbackClientTestCase.java - JUnit test case - callback-ws-client.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant. -Before you do this, run the callback-ws-service sample to start up the -service that the client will talk to. Take a look at the README in -that sample and you will see you need the following commands: - -cd callback-ws-service -ant run - -You can then compile and run this sample using the following commands: - -cd callback-ws-client -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 15-Jan-2008 10:21:38 org.apache.tuscany.sca.node.impl.SCADomainProxy -Impl init - [java] INFO: Domain will be started stand-alone as domain URL is not provid -ed - [java] 15-Jan-2008 10:21:39 org.apache.tuscany.sca.domain.impl.SCADomainImp -l registerNode - [java] INFO: Registered node: http://L3AW203:1336 at endpoint http://L3AW20 -3:1336 - [java] 15-Jan-2008 10:21:39 org.apache.tuscany.sca.node.impl.SCADomainProxy -Impl createRuntime - [java] INFO: Domain management configured from file:/C:/simon/tuscany/relea -se/sca-r1.1-rc2/tuscany-sca-1.1-incubating-SNAPSHOT/lib/tuscany-sca-all-1.1-incu -bating-SNAPSHOT.jar - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] 15-Jan-2008 10:21:48 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:1336/SCADomainEventServi -ceProxyComponent - [java] 15-Jan-2008 10:21:48 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:1336/SCADomainAPIService -ProxyComponent - [java] 15-Jan-2008 10:21:48 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:1336/SCANodeManagerCompo -nent/SCANodeManagerService - [java] 15-Jan-2008 10:21:48 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:1336/SCANodeManagerCompo -nent/ComponentManagerService/* - [java] 15-Jan-2008 10:21:48 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:1336/SCANodeManagerCompo -nent/ComponentManagerService - [java] 15-Jan-2008 10:21:48 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:1336/SCADomain/scaDomain -.js - [java] 15-Jan-2008 10:21:48 org.apache.tuscany.sca.node.impl.SCANodeImpl ac -tivateComposite - [java] INFO: Building composite: {http://myapp}myapp - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] 15-Jan-2008 10:21:48 org.apache.tuscany.sca.node.impl.SCANodeImpl st -artComposite - [java] INFO: Starting composite: {http://myapp}myapp - [java] 15-Jan-2008 10:21:48 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:1336/MyClientComponent/m -yService - [java] aClientMethod on thread Thread[main,5,main] - [java] aClientMethod return from someMethod on thread Thread[main,5,main] - [java] receiveResult on thread Thread[pool-1-thread-2,5,main] - [java] Result: -> someMethod -> receiveResult - [java] Closing the domain - [java] 15-Jan-2008 10:21:54 org.apache.tuscany.sca.node.impl.SCANodeImpl st -opComposite - [java] INFO: Stopping composite: {http://myapp}myapp - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and -run using Maven as follows. When using Maven you don't need to run the -callback-ws-service sample first as Maven does this for you. With Maven, -both client and server code run in the same JVM, which rather defeats the -purpose of this sample (to show a standalone SCA client), but it's good -enough for a unit test. - -cd callback-ws-client -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running myapp.CallbackClientTestCase -15-Jan-2008 10:17:46 org.apache.tuscany.sca.node.impl.SCADomainProxyImpl init -INFO: Domain will be started stand-alone as domain URL is not provided -15-Jan-2008 10:17:46 org.apache.tuscany.sca.domain.impl.SCADomainImpl registerNo -de -INFO: Registered node: http://L3AW203:1322 at endpoint http://L3AW203:1322 -15-Jan-2008 10:17:46 org.apache.tuscany.sca.node.impl.SCADomainProxyImpl createR -untime -INFO: Domain management configured from file:/C:/Documents%20and%20Settings/slaw -s/.m2/repository/org/apache/tuscany/sca/tuscany-node-impl/1.1-incubating-SNAPSHO -T/tuscany-node-impl-1.1-incubating-SNAPSHOT.jar -15-Jan-2008 10:17:52 org.apache.catalina.core.StandardEngine start -INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 -15-Jan-2008 10:17:53 org.apache.catalina.startup.ContextConfig defaultWebConfig -INFO: No default web.xml -15-Jan-2008 10:17:53 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd -15-Jan-2008 10:17:53 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_ -1.dtd -15-Jan-2008 10:17:53 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_ -2.dtd -15-Jan-2008 10:17:53 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_ -0.xsd -15-Jan-2008 10:17:53 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xs -d -15-Jan-2008 10:17:53 org.apache.coyote.http11.Http11Protocol init -INFO: Initializing Coyote HTTP/1.1 on http-1322 -15-Jan-2008 10:17:53 org.apache.coyote.http11.Http11Protocol start -INFO: Starting Coyote HTTP/1.1 on http-1322 -15-Jan-2008 10:17:53 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1322/SCADomainEventServiceProxyCompo -nent -15-Jan-2008 10:17:53 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1322/SCADomainAPIServiceProxyCompone -nt -15-Jan-2008 10:17:53 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1322/SCANodeManagerComponent/SCANode -ManagerService -15-Jan-2008 10:17:53 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1322/SCANodeManagerComponent/Compone -ntManagerService/* -15-Jan-2008 10:17:53 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1322/SCANodeManagerComponent/Compone -ntManagerService -15-Jan-2008 10:17:53 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1322/SCADomain/scaDomain.js -15-Jan-2008 10:17:53 org.apache.tuscany.sca.node.impl.SCANodeImpl activateCompos -ite -INFO: Building composite: {http://callbackws}callbackws -15-Jan-2008 10:17:54 org.apache.tuscany.sca.node.impl.SCANodeImpl startComposite - -INFO: Starting composite: {http://callbackws}callbackws -15-Jan-2008 10:17:54 org.apache.catalina.core.StandardEngine start -INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 -15-Jan-2008 10:17:54 org.apache.catalina.startup.ContextConfig defaultWebConfig -INFO: No default web.xml -15-Jan-2008 10:17:54 org.apache.coyote.http11.Http11Protocol init -INFO: Initializing Coyote HTTP/1.1 on http-8086 -15-Jan-2008 10:17:54 org.apache.coyote.http11.Http11Protocol start -INFO: Starting Coyote HTTP/1.1 on http-8086 -15-Jan-2008 10:17:54 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:8086/MyServiceComponent -15-Jan-2008 10:17:54 org.apache.tuscany.sca.node.impl.SCADomainProxyImpl init -INFO: Domain will be started stand-alone as domain URL is not provided -15-Jan-2008 10:17:54 org.apache.tuscany.sca.domain.impl.SCADomainImpl registerNo -de -INFO: Registered node: http://L3AW203:1323 at endpoint http://L3AW203:1323 -15-Jan-2008 10:17:54 org.apache.tuscany.sca.node.impl.SCADomainProxyImpl createR -untime -INFO: Domain management configured from file:/C:/Documents%20and%20Settings/slaw -s/.m2/repository/org/apache/tuscany/sca/tuscany-node-impl/1.1-incubating-SNAPSHO -T/tuscany-node-impl-1.1-incubating-SNAPSHOT.jar -15-Jan-2008 10:17:56 org.apache.catalina.core.StandardEngine start -INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 -15-Jan-2008 10:17:56 org.apache.catalina.startup.ContextConfig defaultWebConfig -INFO: No default web.xml -15-Jan-2008 10:17:56 org.apache.coyote.http11.Http11Protocol init -INFO: Initializing Coyote HTTP/1.1 on http-1323 -15-Jan-2008 10:17:56 org.apache.coyote.http11.Http11Protocol start -INFO: Starting Coyote HTTP/1.1 on http-1323 -15-Jan-2008 10:17:56 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1323/SCADomainEventServiceProxyCompo -nent -15-Jan-2008 10:17:56 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1323/SCADomainAPIServiceProxyCompone -nt -15-Jan-2008 10:17:56 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1323/SCANodeManagerComponent/SCANode -ManagerService -15-Jan-2008 10:17:56 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1323/SCANodeManagerComponent/Compone -ntManagerService/* -15-Jan-2008 10:17:56 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1323/SCANodeManagerComponent/Compone -ntManagerService -15-Jan-2008 10:17:56 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1323/SCADomain/scaDomain.js -15-Jan-2008 10:17:56 org.apache.tuscany.sca.node.impl.SCANodeImpl activateCompos -ite -INFO: Building composite: {http://myapp}myapp -15-Jan-2008 10:17:57 org.apache.tuscany.sca.node.impl.SCANodeImpl startComposite - -INFO: Starting composite: {http://myapp}myapp -15-Jan-2008 10:17:57 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1323/MyClientComponent/myService -aClientMethod on thread Thread[main,5,main] -aClientMethod return from someMethod on thread Thread[main,5,main] -setMyServiceCallback on thread Thread[pool-1-thread-1,5,main] -someMethod on thread Thread[pool-1-thread-1,5,main] -Sleeping ... -receiveResult on thread Thread[pool-2-thread-1,5,main] -Result: -> someMethod -> receiveResult -Closing the domain -15-Jan-2008 10:18:02 org.apache.tuscany.sca.node.impl.SCANodeImpl stopComposite -INFO: Stopping composite: {http://myapp}myapp -15-Jan-2008 10:18:03 org.apache.coyote.http11.Http11Protocol destroy -INFO: Stopping Coyote HTTP/1.1 on http-1323 -15-Jan-2008 10:18:03 org.apache.tuscany.sca.node.impl.SCANodeImpl stopComposite -INFO: Stopping composite: {http://callbackws}callbackws -15-Jan-2008 10:18:03 org.apache.coyote.http11.Http11Protocol destroy -INFO: Stopping Coyote HTTP/1.1 on http-8086 -15-Jan-2008 10:18:03 org.apache.coyote.http11.Http11Protocol destroy -INFO: Stopping Coyote HTTP/1.1 on http-1322 -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 17.343 sec - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/callback-ws-client/build.xml b/branches/sca-android/samples/callback-ws-client/build.xml deleted file mode 100644 index 8698c6018d..0000000000 --- a/branches/sca-android/samples/callback-ws-client/build.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/callback-ws-client/callback-ws-client.png b/branches/sca-android/samples/callback-ws-client/callback-ws-client.png deleted file mode 100644 index 802ef604a7..0000000000 Binary files a/branches/sca-android/samples/callback-ws-client/callback-ws-client.png and /dev/null differ diff --git a/branches/sca-android/samples/callback-ws-client/callback-ws-client.svg b/branches/sca-android/samples/callback-ws-client/callback-ws-client.svg deleted file mode 100644 index f49aeadbbf..0000000000 --- a/branches/sca-android/samples/callback-ws-client/callback-ws-client.svg +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - myapp - - MyClientComponent - - http://localhost:8086/MyServiceComponent - - myservice callback - - diff --git a/branches/sca-android/samples/callback-ws-client/pom.xml b/branches/sca-android/samples/callback-ws-client/pom.xml deleted file mode 100644 index c45691febb..0000000000 --- a/branches/sca-android/samples/callback-ws-client/pom.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-callback-ws-client - Apache Tuscany SCA Callback Web Service Remote Client Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-node-impl - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - org.apache.tuscany.sca - sample-callback-ws-service - 1.4-SNAPSHOT - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/callback-ws-client/src/main/java/myapp/MyClient.java b/branches/sca-android/samples/callback-ws-client/src/main/java/myapp/MyClient.java deleted file mode 100644 index e515b55788..0000000000 --- a/branches/sca-android/samples/callback-ws-client/src/main/java/myapp/MyClient.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package myapp; - -import org.osoa.sca.annotations.OneWay; - -/** - * The client interface - */ -public interface MyClient { - - void aClientMethod(); -} diff --git a/branches/sca-android/samples/callback-ws-client/src/main/java/myapp/MyClientImpl.java b/branches/sca-android/samples/callback-ws-client/src/main/java/myapp/MyClientImpl.java deleted file mode 100644 index ece769236c..0000000000 --- a/branches/sca-android/samples/callback-ws-client/src/main/java/myapp/MyClientImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package myapp; - -import myserver.MyService; -import myserver.MyServiceCallback; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -/** - * Remote Web service client with callback interface - */ -@Service(MyClient.class) -@Scope("COMPOSITE") -public class MyClientImpl implements MyClient, MyServiceCallback { - @Reference - protected MyService myService; - - public void aClientMethod() { - System.out.println("aClientMethod on thread " + Thread.currentThread()); - myService.someMethod(" -> someMethod "); // calls the server - System.out.println("aClientMethod return from someMethod on thread " + Thread.currentThread()); - } - - public void receiveResult(String result) { - System.out.println("receiveResult on thread " + Thread.currentThread()); - System.out.println("Result: " + result); // callback from the server - } - - public static void main(String[] args) throws Exception { - SCANode node = SCANodeFactory.newInstance().createSCANodeFromClassLoader("myapp.composite", MyClientImpl.class.getClassLoader()); - node.start(); - run(node); - System.out.println("Closing the domain"); - node.stop(); - } - - public static void run(SCANode node) throws InterruptedException { - MyClient myClient = ((SCAClient)node).getService(MyClient.class, "MyClientComponent"); - myClient.aClientMethod(); - Thread.sleep(5000); // don't exit before callback arrives - } -} diff --git a/branches/sca-android/samples/callback-ws-client/src/main/java/myserver/MyService.java b/branches/sca-android/samples/callback-ws-client/src/main/java/myserver/MyService.java deleted file mode 100644 index 1850eae1bc..0000000000 --- a/branches/sca-android/samples/callback-ws-client/src/main/java/myserver/MyService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package myserver; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.OneWay; -import org.osoa.sca.annotations.Remotable; - -/** - * The remote service that will be invoked by the client - */ -@Remotable -@Callback(MyServiceCallback.class) -public interface MyService { - - @OneWay - void someMethod(String arg); -} diff --git a/branches/sca-android/samples/callback-ws-client/src/main/java/myserver/MyServiceCallback.java b/branches/sca-android/samples/callback-ws-client/src/main/java/myserver/MyServiceCallback.java deleted file mode 100644 index bf5f87a4f9..0000000000 --- a/branches/sca-android/samples/callback-ws-client/src/main/java/myserver/MyServiceCallback.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package myserver; - -import org.osoa.sca.annotations.Remotable; - -/** - * The callback interface for {@link MyService}. - */ -@Remotable -public interface MyServiceCallback { - - void receiveResult(String result); -} diff --git a/branches/sca-android/samples/callback-ws-client/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-android/samples/callback-ws-client/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 314747d548..0000000000 --- a/branches/sca-android/samples/callback-ws-client/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - diff --git a/branches/sca-android/samples/callback-ws-client/src/main/resources/myapp.composite b/branches/sca-android/samples/callback-ws-client/src/main/resources/myapp.composite deleted file mode 100644 index 5b776d6df8..0000000000 --- a/branches/sca-android/samples/callback-ws-client/src/main/resources/myapp.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/callback-ws-client/src/test/java/myapp/CallbackClientTestCase.java b/branches/sca-android/samples/callback-ws-client/src/test/java/myapp/CallbackClientTestCase.java deleted file mode 100644 index fb2f6952c4..0000000000 --- a/branches/sca-android/samples/callback-ws-client/src/test/java/myapp/CallbackClientTestCase.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package myapp; - -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Tests that the callback server is available - */ -public class CallbackClientTestCase { - - private SCANode node; - - @Before - public void startServer() throws Exception { - try { - node = SCANodeFactory.newInstance().createSCANodeFromClassLoader(null, getClass().getClassLoader()); - node.start(); - } catch (Exception ex) { - System.out.println(ex.toString()); - } - } - - @Test - public void testClient() throws Exception { - MyClientImpl.run(node); - } - - @After - public void stopServer() throws Exception { - node.stop(); - } -} diff --git a/branches/sca-android/samples/callback-ws-service/README b/branches/sca-android/samples/callback-ws-service/README deleted file mode 100644 index 2c65f745a6..0000000000 --- a/branches/sca-android/samples/callback-ws-service/README +++ /dev/null @@ -1,227 +0,0 @@ -Callback Web Services Service Sample -=================================== -This sample demonstrates an SCA service with callback to a remote client -using Web service bindings for the service and the callback. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look -there first. - -If you just want to run it to see what happens open a command prompt, -navigate to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do: - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-callback-ws-service.jar myserver.CallbackServer - -and on *nix do: - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-callback-ws-service.jar myserver.CallbackServer - -Now the server is started you can use the callback-ws-client sample to -exercise it. - -Sample Overview ---------------- -The sample has a single component that provides a service that is -invoked from a remote client over Web services and makes an SCA callback -over Web services to the same remote client. - -callback-ws-service/ - src/ - main/ - java/ - myserver/ - MyService.java - interface description for - MyServiceComponent - MyServiceCallback.java - interface description for callback - NyServiceImpl.java - component implementation - CallbackServer.java - starts the SCA runtime and - deploys the callbackws.composite - and then waits for the service - to be called via Web services - resources/ - callbackws.composite - the SCA assembly for this sample - test/ - java/ - myserver/ - CallbackServerTestCase.java - JUnit test case - callback-ws-service.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant with -the following commands: - -cd callback-ws-service -ant compile -ant run - -You should see the following output from the run target: - -run: - [java] 15-Jan-2008 10:21:14 org.apache.tuscany.sca.node.impl.SCADomainProxy -Impl init - [java] INFO: Domain will be started stand-alone as domain URL is not provid -ed - [java] 15-Jan-2008 10:21:14 org.apache.tuscany.sca.domain.impl.SCADomainImp -l registerNode - [java] INFO: Registered node: http://L3AW203:1331 at endpoint http://L3AW20 -3:1331 - [java] 15-Jan-2008 10:21:14 org.apache.tuscany.sca.node.impl.SCADomainProxy -Impl createRuntime - [java] INFO: Domain management configured from file:/C:/simon/tuscany/relea -se/sca-r1.1-rc2/tuscany-sca-1.1-incubating-SNAPSHOT/lib/tuscany-sca-all-1.1-incu -bating-SNAPSHOT.jar - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] 15-Jan-2008 10:21:24 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:1331/SCADomainEventServi -ceProxyComponent - [java] 15-Jan-2008 10:21:24 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:1331/SCADomainAPIService -ProxyComponent - [java] 15-Jan-2008 10:21:24 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:1331/SCANodeManagerCompo -nent/SCANodeManagerService - [java] 15-Jan-2008 10:21:24 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:1331/SCANodeManagerCompo -nent/ComponentManagerService/* - [java] 15-Jan-2008 10:21:24 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:1331/SCANodeManagerCompo -nent/ComponentManagerService - [java] 15-Jan-2008 10:21:24 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:1331/SCADomain/scaDomain -.js - [java] 15-Jan-2008 10:21:24 org.apache.tuscany.sca.node.impl.SCANodeImpl ac -tivateComposite - [java] INFO: Building composite: {http://callbackws}callbackws - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor - [java] 15-Jan-2008 10:21:24 org.apache.tuscany.sca.node.impl.SCANodeImpl st -artComposite - [java] INFO: Starting composite: {http://callbackws}callbackws - [java] 15-Jan-2008 10:21:26 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] Callback server started (press enter to shutdown) - -As this point the SCA service is exposed as a Web service by a Web server -started automatically by the SCA runtime. To stop the server, press enter. - -To exercise the service, run the callback-ws-client sample. Take a look at -the README in that sample and you will see you need the following commands: - -cd callback-ws-client -ant run - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and -run using Maven as follows. When using Maven you don't need to run the -callback-ws-client sample as the Maven build uses a simple ping test to -make sure that the service is available. - -cd callback-ws-service -mvn - -You should see the following output from the test phase: - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running myserver.CallbackServerTestCase -15-Jan-2008 10:29:36 org.apache.tuscany.sca.node.impl.SCADomainProxyImpl init -INFO: Domain will be started stand-alone as domain URL is not provided -15-Jan-2008 10:29:36 org.apache.tuscany.sca.domain.impl.SCADomainImpl registerNo -de -INFO: Registered node: http://L3AW203:1365 at endpoint http://L3AW203:1365 -15-Jan-2008 10:29:36 org.apache.tuscany.sca.node.impl.SCADomainProxyImpl createR -untime -INFO: Domain management configured from file:/C:/Documents%20and%20Settings/slaw -s/.m2/repository/org/apache/tuscany/sca/tuscany-node-impl/1.1-incubating-SNAPSHO -T/tuscany-node-impl-1.1-incubating-SNAPSHOT.jar -15-Jan-2008 10:29:42 org.apache.catalina.core.StandardEngine start -INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 -15-Jan-2008 10:29:42 org.apache.catalina.startup.ContextConfig defaultWebConfig -INFO: No default web.xml -15-Jan-2008 10:29:42 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd -15-Jan-2008 10:29:42 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_ -1.dtd -15-Jan-2008 10:29:42 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_ -2.dtd -15-Jan-2008 10:29:42 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_ -0.xsd -15-Jan-2008 10:29:42 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xs -d -15-Jan-2008 10:29:42 org.apache.coyote.http11.Http11Protocol init -INFO: Initializing Coyote HTTP/1.1 on http-1365 -15-Jan-2008 10:29:42 org.apache.coyote.http11.Http11Protocol start -INFO: Starting Coyote HTTP/1.1 on http-1365 -15-Jan-2008 10:29:42 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1365/SCADomainEventServiceProxyCompo -nent -15-Jan-2008 10:29:42 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1365/SCADomainAPIServiceProxyCompone -nt -15-Jan-2008 10:29:43 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1365/SCANodeManagerComponent/SCANode -ManagerService -15-Jan-2008 10:29:43 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1365/SCANodeManagerComponent/Compone -ntManagerService/* -15-Jan-2008 10:29:43 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1365/SCANodeManagerComponent/Compone -ntManagerService -15-Jan-2008 10:29:43 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:1365/SCADomain/scaDomain.js -15-Jan-2008 10:29:43 org.apache.tuscany.sca.node.impl.SCANodeImpl activateCompos -ite -INFO: Building composite: {http://callbackws}callbackws -15-Jan-2008 10:29:43 org.apache.tuscany.sca.node.impl.SCANodeImpl startComposite - -INFO: Starting composite: {http://callbackws}callbackws -15-Jan-2008 10:29:43 org.apache.catalina.core.StandardEngine start -INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 -15-Jan-2008 10:29:43 org.apache.catalina.startup.ContextConfig defaultWebConfig -INFO: No default web.xml -15-Jan-2008 10:29:43 org.apache.coyote.http11.Http11Protocol init -INFO: Initializing Coyote HTTP/1.1 on http-8086 -15-Jan-2008 10:29:43 org.apache.coyote.http11.Http11Protocol start -INFO: Starting Coyote HTTP/1.1 on http-8086 -15-Jan-2008 10:29:43 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:8086/MyServiceComponent -15-Jan-2008 10:29:43 org.apache.tuscany.sca.node.impl.SCANodeImpl stopComposite -INFO: Stopping composite: {http://callbackws}callbackws -15-Jan-2008 10:29:43 org.apache.coyote.http11.Http11Protocol destroy -INFO: Stopping Coyote HTTP/1.1 on http-8086 -15-Jan-2008 10:29:43 org.apache.coyote.http11.Http11Protocol destroy -INFO: Stopping Coyote HTTP/1.1 on http-1365 -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.422 sec - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/callback-ws-service/build.xml b/branches/sca-android/samples/callback-ws-service/build.xml deleted file mode 100644 index c91dd88a8c..0000000000 --- a/branches/sca-android/samples/callback-ws-service/build.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/callback-ws-service/callback-ws-service.png b/branches/sca-android/samples/callback-ws-service/callback-ws-service.png deleted file mode 100644 index 772ac38431..0000000000 Binary files a/branches/sca-android/samples/callback-ws-service/callback-ws-service.png and /dev/null differ diff --git a/branches/sca-android/samples/callback-ws-service/callback-ws-service.svg b/branches/sca-android/samples/callback-ws-service/callback-ws-service.svg deleted file mode 100644 index ff0a1d307b..0000000000 --- a/branches/sca-android/samples/callback-ws-service/callback-ws-service.svg +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - callbackws - - MyServiceComponent - http://localhost:8086/MyServiceComponent - - myservice callback - - diff --git a/branches/sca-android/samples/callback-ws-service/pom.xml b/branches/sca-android/samples/callback-ws-service/pom.xml deleted file mode 100644 index 789f981d49..0000000000 --- a/branches/sca-android/samples/callback-ws-service/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-callback-ws-service - Apache Tuscany SCA Callback Web Service Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-node-impl - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/callback-ws-service/src/main/java/myserver/CallbackServer.java b/branches/sca-android/samples/callback-ws-service/src/main/java/myserver/CallbackServer.java deleted file mode 100644 index 75ef05bc48..0000000000 --- a/branches/sca-android/samples/callback-ws-service/src/main/java/myserver/CallbackServer.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package myserver; - -import java.io.IOException; - -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -/** - * This server program shows how to create and start an SCA runtime that - * activates the MyService Web service endpoint. - */ -public class CallbackServer { - - public static void main(String[] args) throws Exception { - - SCANode node = SCANodeFactory.newInstance().createSCANodeFromClassLoader("callbackws.composite", null); - node.start(); - - try { - System.out.println("Callback server started (press enter to shutdown)"); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - - node.stop(); - System.out.println("Callback server stopped"); - } - -} diff --git a/branches/sca-android/samples/callback-ws-service/src/main/java/myserver/MyService.java b/branches/sca-android/samples/callback-ws-service/src/main/java/myserver/MyService.java deleted file mode 100644 index 1850eae1bc..0000000000 --- a/branches/sca-android/samples/callback-ws-service/src/main/java/myserver/MyService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package myserver; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.OneWay; -import org.osoa.sca.annotations.Remotable; - -/** - * The remote service that will be invoked by the client - */ -@Remotable -@Callback(MyServiceCallback.class) -public interface MyService { - - @OneWay - void someMethod(String arg); -} diff --git a/branches/sca-android/samples/callback-ws-service/src/main/java/myserver/MyServiceCallback.java b/branches/sca-android/samples/callback-ws-service/src/main/java/myserver/MyServiceCallback.java deleted file mode 100644 index bf5f87a4f9..0000000000 --- a/branches/sca-android/samples/callback-ws-service/src/main/java/myserver/MyServiceCallback.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package myserver; - -import org.osoa.sca.annotations.Remotable; - -/** - * The callback interface for {@link MyService}. - */ -@Remotable -public interface MyServiceCallback { - - void receiveResult(String result); -} diff --git a/branches/sca-android/samples/callback-ws-service/src/main/java/myserver/MyServiceImpl.java b/branches/sca-android/samples/callback-ws-service/src/main/java/myserver/MyServiceImpl.java deleted file mode 100644 index 25469def5c..0000000000 --- a/branches/sca-android/samples/callback-ws-service/src/main/java/myserver/MyServiceImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package myserver; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -/** - * This class implements MyService and uses a callback. - */ -@Service(MyService.class) -@Scope("COMPOSITE") -public class MyServiceImpl implements MyService { - - private MyServiceCallback myServiceCallback; - - /** - * The setter used by the runtime to set the callback reference - * @param myServiceCallback - */ - @Callback - public void setMyServiceCallback(MyServiceCallback myServiceCallback) { - System.out.println("setMyServiceCallback on thread " + Thread.currentThread()); - this.myServiceCallback = myServiceCallback; - } - - public void someMethod(String arg) { - System.out.println("someMethod on thread " + Thread.currentThread()); - // invoke the callback - try { - System.out.println("Sleeping ..."); - Thread.sleep(2000); - myServiceCallback.receiveResult(arg + " -> receiveResult "); - } catch(Exception e) { - System.out.println("RuntimeException invoking receiveResult: " + e.toString()); - e.printStackTrace(); - } - } -} diff --git a/branches/sca-android/samples/callback-ws-service/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-android/samples/callback-ws-service/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 35f7f60c2e..0000000000 --- a/branches/sca-android/samples/callback-ws-service/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-android/samples/callback-ws-service/src/main/resources/callbackws.composite b/branches/sca-android/samples/callback-ws-service/src/main/resources/callbackws.composite deleted file mode 100644 index a09e638896..0000000000 --- a/branches/sca-android/samples/callback-ws-service/src/main/resources/callbackws.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/callback-ws-service/src/test/java/myserver/CallbackServerTestCase.java b/branches/sca-android/samples/callback-ws-service/src/test/java/myserver/CallbackServerTestCase.java deleted file mode 100644 index e87667cc3e..0000000000 --- a/branches/sca-android/samples/callback-ws-service/src/test/java/myserver/CallbackServerTestCase.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package myserver; - -import java.io.IOException; -import java.net.Socket; - -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Tests that the callback server is available - */ -public class CallbackServerTestCase { - - private SCANode node; - - @Before - public void startServer() throws Exception { - node = SCANodeFactory.newInstance().createSCANodeFromClassLoader("callbackws.composite", null); - node.start(); - } - - @Test - public void testPing() throws IOException { - new Socket("127.0.0.1", 8086); - } - - @After - public void stopServer() throws Exception { - node.stop(); - } -} diff --git a/branches/sca-android/samples/callbacks-jms/README b/branches/sca-android/samples/callbacks-jms/README deleted file mode 100644 index b5e130e2fc..0000000000 --- a/branches/sca-android/samples/callbacks-jms/README +++ /dev/null @@ -1,73 +0,0 @@ -Callback JMS Sample -=================== -This sample demonstrates SCA callbacks over the JMS binding. It implements the example -described in the INFOQ article: - - "Can I call you back about that?" Building Asynchronous Services using Service Component Architecture - See: http://www.infoq.com/articles/async-sca - -It implements a service for placing an order for some widgets, where the service is asynchronous -and the client is informed of progress via a callback interface. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-callbacks-jms.jar callbacks.CallbacksTestCase - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-callbacks-jms.jar callbacks.CallbacksTestCase - -Sample Overview ---------------- - -The only changes over the sample code described in the INFOQ article are to add the @Remotable annotation -to the service and callback interfaces, add the @Oneway annotation to the placeOrder and placeOrderResponse -methods, and the composite XML is changed to use instead of . - - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd callbacks-jms -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] client placing order: callbacks.OrderRequest@c72243 - [java] service received order: callbacks.OrderRequest@1f94884 - [java] client callback received order response: callbacks.OrderResponse@14ab51b - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd callbacks-jms -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running callbacks.CallbacksTestCase -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.272 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/callbacks-jms/build.xml b/branches/sca-android/samples/callbacks-jms/build.xml deleted file mode 100644 index 665feeca71..0000000000 --- a/branches/sca-android/samples/callbacks-jms/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/callbacks-jms/pom.xml b/branches/sca-android/samples/callbacks-jms/pom.xml deleted file mode 100644 index 5d7b1453b4..0000000000 --- a/branches/sca-android/samples/callbacks-jms/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-callbacks-jms - Apache Tuscany SCA Callbacks with JMS Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - org.apache.activemq - activemq-core - 5.1.0 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderCallback.java b/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderCallback.java deleted file mode 100644 index 775663cdff..0000000000 --- a/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderCallback.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package callbacks; - -import org.osoa.sca.annotations.OneWay; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface OrderCallback { - - @OneWay - public void placeOrderResponse(OrderResponse orderResponse); -} diff --git a/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderRequest.java b/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderRequest.java deleted file mode 100644 index 69f5751379..0000000000 --- a/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderRequest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package callbacks; - -public class OrderRequest { - -} diff --git a/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderResponse.java b/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderResponse.java deleted file mode 100644 index 882bcf8479..0000000000 --- a/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderResponse.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package callbacks; - -public class OrderResponse { - -} diff --git a/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderService.java b/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderService.java deleted file mode 100644 index 9f6d90577c..0000000000 --- a/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderService.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package callbacks; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.OneWay; -import org.osoa.sca.annotations.Remotable; - -@Remotable -@Callback(OrderCallback.class) -public interface OrderService { - - @OneWay - public void placeOrder(OrderRequest orderRequest); - -} diff --git a/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderServiceClient.java b/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderServiceClient.java deleted file mode 100644 index 3393ae5dca..0000000000 --- a/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderServiceClient.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package callbacks; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(OrderServiceClient.class) -public class OrderServiceClient implements OrderCallback { - - // A field to hold the reference to the order service - - private OrderService orderService; - public static OrderResponse oResponse; - - public void doSomeOrdering() { - - OrderRequest oRequest = new OrderRequest(); - - // … fill in the details of the order … - - System.out.println("client placing order: " + oRequest); - - orderService.placeOrder(oRequest); - - // …the client code can continue to do processing - } - - public void placeOrderResponse(OrderResponse oResponse) { - - // …handle the response as needed - - System.out.println("client callback received order response: " + oResponse); - OrderServiceClient.oResponse = oResponse; - } - - // A setter method for the order service reference - @Reference - public void setOrderService(OrderService theService) { - orderService = theService; - } -} diff --git a/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderServiceImpl.java b/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderServiceImpl.java deleted file mode 100644 index dd963bc1b0..0000000000 --- a/branches/sca-android/samples/callbacks-jms/src/main/java/callbacks/OrderServiceImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package callbacks; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Service; - -@Service(OrderService.class) -public class OrderServiceImpl implements OrderService { - - // A field for the callback reference object - private OrderCallback callbackReference; - - // The place order operation itself - public void placeOrder(OrderRequest oRequest) { - - // …do the work to process the order… - // …which may take some time… - - System.out.println("service received order: " + oRequest); - - // when ready to respond… - - OrderResponse theResponse = new OrderResponse(); - - callbackReference.placeOrderResponse(theResponse); - } - - // A setter method for the callback reference - @Callback - public void setCallbackReference(OrderCallback theCallback) { - callbackReference = theCallback; - } -} diff --git a/branches/sca-android/samples/callbacks-jms/src/main/resources/callbacks.composite b/branches/sca-android/samples/callbacks-jms/src/main/resources/callbacks.composite deleted file mode 100644 index 94dd29c45d..0000000000 --- a/branches/sca-android/samples/callbacks-jms/src/main/resources/callbacks.composite +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/callbacks-jms/src/main/resources/jndi.properties b/branches/sca-android/samples/callbacks-jms/src/main/resources/jndi.properties deleted file mode 100644 index 698aeb1711..0000000000 --- a/branches/sca-android/samples/callbacks-jms/src/main/resources/jndi.properties +++ /dev/null @@ -1,30 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false - -# use the following property to specify the JNDI name the connection factory should appear as. -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.OrderService = OrderServiceQueue diff --git a/branches/sca-android/samples/callbacks-jms/src/test/java/callbacks/CallbacksTestCase.java b/branches/sca-android/samples/callbacks-jms/src/test/java/callbacks/CallbacksTestCase.java deleted file mode 100644 index 967fc42c64..0000000000 --- a/branches/sca-android/samples/callbacks-jms/src/test/java/callbacks/CallbacksTestCase.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package callbacks; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This shows how to test the Calculator service component. - */ -public class CallbacksTestCase extends TestCase { - - private OrderServiceClient orderServiceClient; - private SCADomain scaDomain; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("callbacks.composite"); - orderServiceClient = scaDomain.getService(OrderServiceClient.class, "ClientComponent"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testOderClient() throws Exception { - - orderServiceClient.doSomeOrdering(); - - // wait to give the service time to respond - Thread.sleep(500); - } - - public static void main(String[] args) { - try { - - CallbacksTestCase runner = new CallbacksTestCase(); - runner.setUp(); - runner.testOderClient(); - runner.tearDown(); - - } catch (Exception e) { - e.printStackTrace(); - } - } -} diff --git a/branches/sca-android/samples/customer-dojo/README b/branches/sca-android/samples/customer-dojo/README deleted file mode 100644 index 9c1729123f..0000000000 --- a/branches/sca-android/samples/customer-dojo/README +++ /dev/null @@ -1,104 +0,0 @@ -Customer Dojo RPC Sample -=========================== - -Note. This sample is currently not working correctly on WebSphere - see TUSCANY-1990 - -This sample demostrates the SCA JSONRPC binding using a simple web app that -uses the RPC support of the Dojo Toolkit to an SCA service. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -As this sample provides a web app there is a manual step where the WAR file -that contains the sample is copied to your web app container. If you just want -to give this sample a go deploy the WAR file (target/sample-helloworld-dojo-webapp.war) -to you web application server. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-helloworld-dojo-webapp - -The port and hostname will of course vary depending on your local installation. - -See also the similar helloworld-jsonrpc-webapp sample which also uses the SCA JSONRPC binding -but uses SCA scaDomain.js script on the client instead of the Dojo Toolkit. - -Sample Overview ---------------- -The sample provides a single service with an operation that reflects -a greeting back to the caller. The service is exposed using the JSONRPC -binding. The web app provided shows how the Dojo Toolkit JSON-RPC support can be -used to invoke the SCA service. - -The web app provided shows how the service can be called by using the DOJO toolkit. - -helloworld-dojo-webapp/ - build-dojo.xml - This file is an Ant script used by the - sample build process to download the Dojo Toolkit - and get it included in the WAR file - for use by the sample. - src/ - main/ - java/ - helloworldjsonrpc/ - HelloWorldService.java - service interface - HelloWorldServiceImpl.java - service implementation - resources/ - jsonrpc.composite - the SCA assembly for this sample - webapp - dojo/ - the Dojo toolkit (this directory is created only - when you build the samples from the source distribution) - META-INF/ - sca-contribution.xml - specifies the composite to be deployed - WEB-INF/ - web.xml - defines the listener that starts up the - Tuscany SCA runtime - HelloWorldJSONRPC.html - the web application that calls the - SCA service via JSONRPC - style.css - style sheet - - helloworld-jsonrpc-webapp.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file that unpacks the - dojo installation - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built using Ant as -follows - -cd helloworld-dojo-webapp -ant package - -This should result in a war file (sample-helloworld-dojo-webapp.war) in the target -directory. Copy this war file to your web app deployment directory in your -web app container. - -The process for getting the web app running will depend on which web app container -you are using. For example, if you are using Tomcat then it is simply a matter -of copying the WAR file to the webapps directory. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-helloworld-dojo-webapp - -The port and hostname will of course vary depending on your local installation. - -You should see a web page that allows you to send messages, via JSONRPC, to the -application running in the Tuscany SCA Runtime - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd helloworld-dojo-webapp -mvn - -Again this should result in a war file (sample-helloworld-dojo-webapp.war) in the target -directory. Follow the steps described in the previous section for running the web -app and for the expected results. - - diff --git a/branches/sca-android/samples/customer-dojo/build-dojo.xml b/branches/sca-android/samples/customer-dojo/build-dojo.xml deleted file mode 100644 index 8c6bd99484..0000000000 --- a/branches/sca-android/samples/customer-dojo/build-dojo.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/customer-dojo/build.xml b/branches/sca-android/samples/customer-dojo/build.xml deleted file mode 100644 index 95813af65a..0000000000 --- a/branches/sca-android/samples/customer-dojo/build.xml +++ /dev/null @@ -1,70 +0,0 @@ - - -]> - - - - &buildDependency; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/customer-dojo/customer-dojo-jsonrpc.png b/branches/sca-android/samples/customer-dojo/customer-dojo-jsonrpc.png deleted file mode 100644 index 57f90aed01..0000000000 Binary files a/branches/sca-android/samples/customer-dojo/customer-dojo-jsonrpc.png and /dev/null differ diff --git a/branches/sca-android/samples/customer-dojo/customer-dojo-jsonrpc.svg b/branches/sca-android/samples/customer-dojo/customer-dojo-jsonrpc.svg deleted file mode 100644 index d5c3bc5d3e..0000000000 --- a/branches/sca-android/samples/customer-dojo/customer-dojo-jsonrpc.svg +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldjsonrpc - - HelloWorldJSONServiceComponent - HelloWorldService - WebApp - DOJO - - diff --git a/branches/sca-android/samples/customer-dojo/customer.sql b/branches/sca-android/samples/customer-dojo/customer.sql deleted file mode 100644 index a3caf8e050..0000000000 --- a/branches/sca-android/samples/customer-dojo/customer.sql +++ /dev/null @@ -1,33 +0,0 @@ --- --- Licensed to the Apache Software Foundation (ASF) under one --- or more contributor license agreements. See the NOTICE file --- distributed with this work for additional information --- regarding copyright ownership. The ASF licenses this file --- to you under the Apache License, Version 2.0 (the --- "License"); you may not use this file except in compliance --- with the License. You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, --- software distributed under the License is distributed on an --- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY --- KIND, either express or implied. See the License for the --- specific language governing permissions and limitations --- under the License. --- - -DROP TABLE CUSTOMER; - -CREATE TABLE CUSTOMER ( - ID INT PRIMARY KEY NOT NULL GENERATED ALWAYS AS IDENTITY, - NAME VARCHAR(30), - PHONE VARCHAR(10), - ADDRESS VARCHAR(25), - CITY VARCHAR(15), - STATE VARCHAR(2), - ZIP VARCHAR(5)); - -INSERT INTO CUSTOMER (NAME, PHONE, ADDRESS, CITY, STATE, ZIP ) VALUES('Joe Smith', '4081234567', '1440 N 1st ST', 'SAN JOSE', 'CA', '95134'); -INSERT INTO CUSTOMER (NAME, PHONE, ADDRESS, CITY, STATE, ZIP ) VALUES('Erik Johnson', '4081230987', '1440 N 1st ST', 'SAN JOSE', 'CA', '95134'); -INSERT INTO CUSTOMER (NAME, PHONE, ADDRESS, CITY, STATE, ZIP ) VALUES('Mark Pensacola', '4085679988', '1440 N 1st ST', 'SAN JOSE', 'CA', '95134'); \ No newline at end of file diff --git a/branches/sca-android/samples/customer-dojo/pom.xml b/branches/sca-android/samples/customer-dojo/pom.xml deleted file mode 100644 index 305ca8ada0..0000000000 --- a/branches/sca-android/samples/customer-dojo/pom.xml +++ /dev/null @@ -1,245 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-customer-dojo - Apache Tuscany SCA Customer DOJO Sample WebApp - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-data-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-resource-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.4-SNAPSHOT - - - - org.apache.geronimo.specs - geronimo-jpa_3.0_spec - 1.1 - - - - org.apache.openjpa - openjpa - 1.0.0 - - - javax.xml.bind - jaxb-api - - - - - - org.apache.derby - derby - 10.1.2.1 - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - org.apache.maven.plugins - maven-antrun-plugin - - - - ant - ant-trax - 1.6.5 - - - - - install-dojo - validate - - run - - - - - - - - - - - copy-dojo-files - generate-resources - - run - - - - - - - - - - - - clean-dojo-files - clean - - run - - - - - - - - - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - true - - - generate - - - - - - org.codehaus.mojo - sql-maven-plugin - - 1.1-SNAPSHOT - - - - org.apache.derby - derby - 10.3.1.4 - - - - - - create-db - generate-resources - - execute - - - org.apache.derby.jdbc.EmbeddedDriver - jdbc:derby:${pom.basedir}/target/classes/customer;create=true - true - continue - skip - ; - - ${pom.basedir}/customer.sql - - - - - - - shutdown-database-sothat-test-can-run - process-test-resources - - execute - - - org.apache.derby.jdbc.EmbeddedDriver - jdbc:derby:${pom.basedir}/target/classes/customer;shutdown=true - true - - - - - - - diff --git a/branches/sca-android/samples/customer-dojo/src/main/java/customer/Customer.java b/branches/sca-android/samples/customer-dojo/src/main/java/customer/Customer.java deleted file mode 100644 index 6d207ea2ef..0000000000 --- a/branches/sca-android/samples/customer-dojo/src/main/java/customer/Customer.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package customer; - -import javax.persistence.Basic; -import javax.persistence.Entity; -import javax.persistence.Id; - -@Entity -public class Customer { - - @Id protected int id; - @Basic protected String name; - @Basic protected String phone; - @Basic protected String address; - @Basic protected String city; - @Basic protected String state; - @Basic protected String zip; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPhone() { - return phone; - } - - public void setPhone(String phone) { - this.phone = phone; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - -} diff --git a/branches/sca-android/samples/customer-dojo/src/main/java/customer/CustomerCollection.java b/branches/sca-android/samples/customer-dojo/src/main/java/customer/CustomerCollection.java deleted file mode 100644 index 5ad39aad5c..0000000000 --- a/branches/sca-android/samples/customer-dojo/src/main/java/customer/CustomerCollection.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package customer; - -import org.apache.tuscany.sca.data.collection.Collection; - - -public interface CustomerCollection extends Collection { - -} diff --git a/branches/sca-android/samples/customer-dojo/src/main/java/customer/CustomerCollectionImpl.java b/branches/sca-android/samples/customer-dojo/src/main/java/customer/CustomerCollectionImpl.java deleted file mode 100644 index c0a2f25f15..0000000000 --- a/branches/sca-android/samples/customer-dojo/src/main/java/customer/CustomerCollectionImpl.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package customer; - -import java.util.Iterator; -import java.util.List; - -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; -import javax.persistence.Query; - -import org.apache.tuscany.sca.data.collection.Entry; -import org.apache.tuscany.sca.data.collection.NotFoundException; - - -public class CustomerCollectionImpl implements CustomerCollection { - EntityManagerFactory emf = null; - EntityManager em = null; - - public CustomerCollectionImpl() { - System.out.println(">>>"); - try { - emf = Persistence.createEntityManagerFactory("customer-openJPA"); - em = emf.createEntityManager(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - public void delete(String arg0) throws NotFoundException { - // TODO Auto-generated method stub - - } - - public Customer get(String arg0) throws NotFoundException { - // TODO Auto-generated method stub - return null; - } - - public Entry[] getAll() { - EntityTransaction tx = em.getTransaction(); - try { - tx.begin(); - - Query q = em.createQuery("SELECT c FROM customer c"); - List results = q.getResultList(); - Iterator iter = results.iterator(); - while (iter.hasNext()) { - Customer customer = (Customer)iter.next(); - - System.out.println(customer); - } - - tx.commit(); - } catch(Exception e) { - e.printStackTrace(); - } finally { - if (tx.isActive()) { - tx.rollback(); - } - - em.close(); - } - - return null; - } - - public String post(String arg0, Customer arg1) { - // TODO Auto-generated method stub - return null; - } - - public void put(String arg0, Customer arg1) throws NotFoundException { - // TODO Auto-generated method stub - - } - - public Entry[] query(String arg0) { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/branches/sca-android/samples/customer-dojo/src/main/java/customer/CustomerService.java b/branches/sca-android/samples/customer-dojo/src/main/java/customer/CustomerService.java deleted file mode 100644 index 7915cc6e77..0000000000 --- a/branches/sca-android/samples/customer-dojo/src/main/java/customer/CustomerService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package customer; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface CustomerService { - - Customer[] get(); - - Customer findCustomerByName(String name); - -} diff --git a/branches/sca-android/samples/customer-dojo/src/main/java/customer/CustomerServiceImpl.java b/branches/sca-android/samples/customer-dojo/src/main/java/customer/CustomerServiceImpl.java deleted file mode 100644 index 0cba7d8bc1..0000000000 --- a/branches/sca-android/samples/customer-dojo/src/main/java/customer/CustomerServiceImpl.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package customer; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; -import javax.persistence.Query; - -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; - -public class CustomerServiceImpl implements CustomerService { - EntityManagerFactory emf = null; - EntityManager em = null; - - public CustomerServiceImpl() { - - } - - @Init - public void init() { - System.out.println(">>> Initializing JPA"); - try { - emf = Persistence.createEntityManagerFactory("customer-openJPA"); - em = emf.createEntityManager(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Destroy - public void destroy() { - emf.close(); - } - - public Customer[] get() { - EntityTransaction tx = em.getTransaction(); - List customers = new ArrayList(); - try { - tx.begin(); - - Query q = em.createQuery("SELECT c FROM customer c"); - List results = q.getResultList(); - Iterator iter = results.iterator(); - while (iter.hasNext()) { - Customer customer = (Customer)iter.next(); - customers.add(customer); - } - - tx.commit(); - } catch (Exception e) { - e.printStackTrace(); - } finally { - if (tx.isActive()) { - tx.rollback(); - } - - em.close(); - } - - Customer[] customerArray = new Customer[customers.size()]; - customers.toArray(customerArray); - return customerArray; - } - - public Customer findCustomerByName(String name) { - EntityTransaction tx = em.getTransaction(); - Customer customer = null; - - try { - tx.begin(); - - Query q = em.createQuery("SELECT c FROM customer c WHERE c.name = '" + name + "'"); - List results = q.getResultList(); - Iterator iter = results.iterator(); - while (iter.hasNext()) { - customer = (Customer)iter.next(); - } - - tx.commit(); - } catch (Exception e) { - e.printStackTrace(); - } finally { - if (tx.isActive()) { - tx.rollback(); - } - - em.close(); - } - - return customer; - } - -} diff --git a/branches/sca-android/samples/customer-dojo/src/main/java/launch/Launch.java b/branches/sca-android/samples/customer-dojo/src/main/java/launch/Launch.java deleted file mode 100644 index d7f88b8dd4..0000000000 --- a/branches/sca-android/samples/customer-dojo/src/main/java/launch/Launch.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class Launch { - public static void main(String[] args) throws Exception { - System.out.println("Starting ..."); - SCADomain scaDomain = SCADomain.newInstance("customer.composite"); - System.out.println("store.composite ready for big business !!!"); - System.in.read(); - System.out.println("Stopping ..."); - scaDomain.close(); - System.out.println(); - } -} diff --git a/branches/sca-android/samples/customer-dojo/src/main/resources/META-INF/orm.xml b/branches/sca-android/samples/customer-dojo/src/main/resources/META-INF/orm.xml deleted file mode 100644 index 64be295302..0000000000 --- a/branches/sca-android/samples/customer-dojo/src/main/resources/META-INF/orm.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/customer-dojo/src/main/resources/META-INF/persistence.xml b/branches/sca-android/samples/customer-dojo/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index 7073c8daf7..0000000000 --- a/branches/sca-android/samples/customer-dojo/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - orm.xml - customer.Customer - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/customer-dojo/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-android/samples/customer-dojo/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 136326d1d3..0000000000 --- a/branches/sca-android/samples/customer-dojo/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/branches/sca-android/samples/customer-dojo/src/main/resources/content/customer.html b/branches/sca-android/samples/customer-dojo/src/main/resources/content/customer.html deleted file mode 100644 index dbc8aad9d0..0000000000 --- a/branches/sca-android/samples/customer-dojo/src/main/resources/content/customer.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - Tuscany Dojo JSON-RPC Customer Example - - - - - - - - - - - - - - - -

Tuscany Dojo JSON-RPC Customer Sample

- -Customer Name :
- - - - - - - - diff --git a/branches/sca-android/samples/customer-dojo/src/main/resources/customer.composite b/branches/sca-android/samples/customer-dojo/src/main/resources/customer.composite deleted file mode 100644 index 4c370f2a9f..0000000000 --- a/branches/sca-android/samples/customer-dojo/src/main/resources/customer.composite +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/domain-management/README b/branches/sca-android/samples/domain-management/README deleted file mode 100644 index 6280a28028..0000000000 --- a/branches/sca-android/samples/domain-management/README +++ /dev/null @@ -1,8 +0,0 @@ -Domain Management Sample Tasks -============================== -This sample implements the following sample domain management tasks: -- list deployables in a contribution -- list contribution dependencies -- fuse includes in a composite -- add deployables to a domain composite and wire them - diff --git a/branches/sca-android/samples/domain-management/pom.xml b/branches/sca-android/samples/domain-management/pom.xml deleted file mode 100644 index 781f77285a..0000000000 --- a/branches/sca-android/samples/domain-management/pom.xml +++ /dev/null @@ -1,247 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-domain-management - Apache Tuscany SCA Sample Domain Management Tasks - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-assembly - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-assembly-xml - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-contribution - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-contribution-xml - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-workspace - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-workspace-xml - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-workspace-impl - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-node - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-launcher - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-extensibility - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-monitor - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-monitor-logging - 1.4-SNAPSHOT - runtime - - - - xerces - xercesImpl - 2.8.1 - - - - org.apache.tuscany.sca - tuscany-binding-atom - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-contribution-java - 1.4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-contribution-namespace - 1.4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-contribution-resource - 1.4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-xml - 1.4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-interface-java-xml - 1.4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-data-api - 1.4-SNAPSHOT - test - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - assets - package - - single - - - - src/test/resources/assembly/assets.xml - - gnu - ${artifactId} - - - - store - package - - single - - - - src/test/resources/assembly/store.xml - - gnu - ${artifactId} - - - - client - package - - single - - - - src/test/resources/assembly/client.xml - - gnu - ${artifactId} - - - - - - - diff --git a/branches/sca-android/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java b/branches/sca-android/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java deleted file mode 100644 index 28eede693d..0000000000 --- a/branches/sca-android/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package manager; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.IOException; -import java.net.URI; -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import javax.xml.namespace.QName; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLOutputFactory; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamWriter; -import javax.xml.transform.TransformerFactory; - -import org.apache.tuscany.sca.assembly.AssemblyFactory; -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.SCABindingFactory; -import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; -import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl; -import org.apache.tuscany.sca.binding.atom.AtomBindingFactory; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint; -import org.apache.tuscany.sca.contribution.service.ContributionWriteException; -import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.core.ModuleActivator; -import org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint; -import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.implementation.node.NodeImplementation; -import org.apache.tuscany.sca.implementation.node.NodeImplementationFactory; -import org.apache.tuscany.sca.implementation.node.builder.impl.NodeCompositeBuilderImpl; -import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.MonitorFactory; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.launcher.NodeLauncher; -import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory; -import org.apache.tuscany.sca.workspace.Workspace; -import org.apache.tuscany.sca.workspace.WorkspaceFactory; -import org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder; -import org.apache.tuscany.sca.workspace.builder.impl.ContributionDependencyBuilderImpl; -import org.apache.xml.serialize.OutputFormat; -import org.apache.xml.serialize.XMLSerializer; -import org.w3c.dom.Document; -import org.xml.sax.SAXException; - -/** - * Sample RunComponents task - * - * Under construction... This sample is similar to the DistributeComponents sample, - * with extra steps to configure SCA runtime nodes with the models, start and stop - * them. - * - * @version $Rev$ $Date$ - */ -public class DistributeAndRunComponents { - - private static URLArtifactProcessor contributionProcessor; - private static ModelResolverExtensionPoint modelResolvers; - private static ModelFactoryExtensionPoint modelFactories; - private static WorkspaceFactory workspaceFactory; - private static AssemblyFactory assemblyFactory; - private static XMLOutputFactory outputFactory; - private static DocumentBuilderFactory documentBuilderFactory; - private static TransformerFactory transformerFactory; - private static StAXArtifactProcessor xmlProcessor; - private static ContributionDependencyBuilder contributionDependencyBuilder; - private static CompositeBuilder domainCompositeBuilder; - private static CompositeBuilder nodeCompositeBuilder; - private static NodeImplementationFactory nodeFactory; - private static AtomBindingFactory atomBindingFactory; - - private static void init() { - - // Create extension point registry - ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry(); - - // Create a monitor - UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); - MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); - Monitor monitor = monitorFactory.createMonitor(); - - // Initialize the Tuscany module activators - ModuleActivatorExtensionPoint moduleActivators = extensionPoints.getExtensionPoint(ModuleActivatorExtensionPoint.class); - for (ModuleActivator activator: moduleActivators.getModuleActivators()) { - activator.start(extensionPoints); - } - - // Get XML input/output factories - modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class); - XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class); - outputFactory = modelFactories.getFactory(XMLOutputFactory.class); - documentBuilderFactory = modelFactories.getFactory(DocumentBuilderFactory.class); - transformerFactory = modelFactories.getFactory(TransformerFactory.class); - - // Get contribution workspace and assembly model factories - workspaceFactory = modelFactories.getFactory(WorkspaceFactory.class); - assemblyFactory = modelFactories.getFactory(AssemblyFactory.class); - nodeFactory = modelFactories.getFactory(NodeImplementationFactory.class); - atomBindingFactory = modelFactories.getFactory(AtomBindingFactory.class); - - // Create XML artifact processors - StAXArtifactProcessorExtensionPoint xmlProcessorExtensions = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class); - xmlProcessor = new ExtensibleStAXArtifactProcessor(xmlProcessorExtensions, inputFactory, outputFactory, monitor); - - // Create contribution content processor - URLArtifactProcessorExtensionPoint docProcessorExtensions = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - contributionProcessor = docProcessorExtensions.getProcessor(Contribution.class); - - // Get the model resolvers - modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class); - - // Create a contribution dependency builder - contributionDependencyBuilder = new ContributionDependencyBuilderImpl(monitor); - - // Create a composite builder - SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class); - IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class); - InterfaceContractMapper contractMapper = utilities.getUtility(InterfaceContractMapper.class); - domainCompositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, - documentBuilderFactory, transformerFactory, contractMapper, monitor); - - // Create a node composite builder - nodeCompositeBuilder = new NodeCompositeBuilderImpl(assemblyFactory, scaBindingFactory, - documentBuilderFactory, transformerFactory, contractMapper, null, monitor); - } - - - public static void main(String[] args) throws Exception { - init(); - - // Create workspace model - Workspace workspace = workspaceFactory.createWorkspace(); - workspace.setModelResolver(new ExtensibleModelResolver(workspace, modelResolvers, modelFactories)); - - // Read the sample store contribution - URI storeURI = URI.create("store"); - URL storeURL = new File("./target/sample-domain-management-store.jar").toURI().toURL(); - Contribution storeContribution = contributionProcessor.read(null, storeURI, storeURL); - workspace.getContributions().add(storeContribution); - - // Read the sample assets contribution - URI assetsURI = URI.create("assets"); - URL assetsURL = new File("./target/sample-domain-management-assets.jar").toURI().toURL(); - Contribution assetsContribution = contributionProcessor.read(null, assetsURI, assetsURL); - workspace.getContributions().add(assetsContribution); - - // Read the sample client contribution - URI clientURI = URI.create("client"); - URL clientURL = new File("./target/sample-domain-management-client.jar").toURI().toURL(); - Contribution clientContribution = contributionProcessor.read(null, clientURI, clientURL); - workspace.getContributions().add(clientContribution); - - // Build the contribution dependencies - Map> contributionDependencies = new HashMap>(); - Set resolved = new HashSet(); - for (Contribution contribution: workspace.getContributions()) { - List dependencies = contributionDependencyBuilder.buildContributionDependencies(contribution, workspace); - - // Resolve contributions - for (Contribution dependency: dependencies) { - if (!resolved.contains(dependency)) { - resolved.add(dependency); - contributionProcessor.resolve(dependency, workspace.getModelResolver()); - } - } - - contributionDependencies.put(contribution, dependencies); - } - - // Create a set of nodes, and assign the sample deployables to them - Map> nodeDependencies = new HashMap>(); - Composite cloudComposite = assemblyFactory.createComposite(); - cloudComposite.setName(new QName("http://sample", "cloud")); - int nodeID = 8100; - for (Contribution contribution: workspace.getContributions()) { - for (Composite deployable: contribution.getDeployables()) { - - // Create a node - Component node = assemblyFactory.createComponent(); - node.setName("Node" + nodeID); - cloudComposite.getComponents().add(node); - - // Add default binding configuration to the node, our samples use - // Atom bindings so here we're just creating default Atom binding - // configurations, but all the other binding types can be configured - // like that too - ComponentService nodeService = assemblyFactory.createComponentService(); - Binding binding = atomBindingFactory.createAtomBinding(); - binding.setURI("http://localhost:" + (8100 + nodeID)); - nodeService.getBindings().add(binding); - node.getServices().add(nodeService); - - // Assign a deployable to the node - NodeImplementation nodeImplementation = nodeFactory.createNodeImplementation(); - nodeImplementation.setComposite(deployable); - node.setImplementation(nodeImplementation); - - // Keep track of what contributions will be needed by the node - nodeDependencies.put(node, contributionDependencies.get(contribution)); - - nodeID++; - } - } - - // Print the model describing the nodes that we just built - System.out.println("cloud.composite"); - System.out.println(print(cloudComposite)); - - // Build the nodes, this will apply their default binding configuration to the - // composites assigned to them - nodeCompositeBuilder.build(cloudComposite); - - // Create a composite model for the domain - Composite domainComposite = assemblyFactory.createComposite(); - domainComposite.setName(new QName("http://sample", "domain")); - - // Add all deployables to it, normally the domain administrator would select - // the deployables to include - domainComposite.getIncludes().addAll(workspace.getDeployables()); - - // Build the domain composite and wire the components included in it - domainCompositeBuilder.build(domainComposite); - - // Print out the resulting domain composite - System.out.println("domain.composite"); - System.out.println(print(domainComposite)); - - // Now start our SCA nodes - List runtimeNodes = new ArrayList(); - NodeLauncher launcher = NodeLauncher.newInstance(); - for (Component node: cloudComposite.getComponents()) { - - // Create a composite containing the components that we want to run - // on the node - Composite runnable = assemblyFactory.createComposite(); - runnable.setName(new QName("http://sample", node.getName())); - NodeImplementation nodeImplementation = (NodeImplementation)node.getImplementation(); - for (Component component: nodeImplementation.getComposite().getComponents()) { - for (Component configured: domainComposite.getComponents()) { - if (configured.getName().equals(component.getName())) { - runnable.getComponents().add(configured); - break; - } - } - } - - // Create the SCA node, give it the composite and the list of contributions - // to use - List dependencies = nodeDependencies.get(node); - org.apache.tuscany.sca.node.launcher.Contribution[] contributions = new org.apache.tuscany.sca.node.launcher.Contribution[dependencies.size()]; - for (int c =0, n = dependencies.size(); c < n; c++) { - Contribution dependency = dependencies.get(c); - contributions[c] = new org.apache.tuscany.sca.node.launcher.Contribution(dependency.getURI(), dependency.getLocation()); - } - SCANode runtimeNode = launcher.createNode("http://sample/" + node.getName(), print(runnable), contributions); - - // Start the node - runtimeNode.start(); - runtimeNodes.add(runtimeNode); - } - - System.out.println("Nodes are running, press enter to stop..."); - System.in.read(); - - for (SCANode runtimeNode: runtimeNodes) { - runtimeNode.stop(); - } - } - - private static String print(Composite composite) throws XMLStreamException, ContributionWriteException, ParserConfigurationException, SAXException, IOException { - - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - XMLStreamWriter writer = outputFactory.createXMLStreamWriter(bos); - xmlProcessor.write(composite, writer); - - // Parse and write again to pretty format it - DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); - Document document = documentBuilder.parse(new ByteArrayInputStream(bos.toByteArray())); - OutputFormat format = new OutputFormat(); - format.setIndenting(true); - format.setIndent(2); - ByteArrayOutputStream out = new ByteArrayOutputStream(); - XMLSerializer serializer = new XMLSerializer(out, format); - serializer.serialize(document); - return out.toString(); - } -} diff --git a/branches/sca-android/samples/domain-management/src/main/java/manager/DistributeComponents.java b/branches/sca-android/samples/domain-management/src/main/java/manager/DistributeComponents.java deleted file mode 100644 index def0a1894f..0000000000 --- a/branches/sca-android/samples/domain-management/src/main/java/manager/DistributeComponents.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package manager; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.IOException; -import java.net.URI; -import java.net.URL; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import javax.xml.namespace.QName; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLOutputFactory; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamWriter; -import javax.xml.transform.TransformerFactory; - -import org.apache.tuscany.sca.assembly.AssemblyFactory; -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.SCABindingFactory; -import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; -import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl; -import org.apache.tuscany.sca.binding.atom.AtomBindingFactory; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.ContributionFactory; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint; -import org.apache.tuscany.sca.contribution.service.ContributionWriteException; -import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.core.ModuleActivator; -import org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint; -import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.implementation.node.NodeImplementation; -import org.apache.tuscany.sca.implementation.node.NodeImplementationFactory; -import org.apache.tuscany.sca.implementation.node.builder.impl.NodeCompositeBuilderImpl; -import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.MonitorFactory; -import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory; -import org.apache.tuscany.sca.policy.PolicyFactory; -import org.apache.tuscany.sca.workspace.Workspace; -import org.apache.tuscany.sca.workspace.WorkspaceFactory; -import org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder; -import org.apache.tuscany.sca.workspace.builder.impl.ContributionDependencyBuilderImpl; -import org.apache.xml.serialize.OutputFormat; -import org.apache.xml.serialize.XMLSerializer; -import org.w3c.dom.Document; -import org.xml.sax.SAXException; - -/** - * Sample DistributeComponents task - * - * This sample shows how to use a subset of Tuscany to read contribution - * metadata, analyze and resolve contribution dependencies, read and resolve - * the artifacts that they contribute (in particular implementation artifacts, - * interfaces, composites, componentTypes etc.) and assembe and wire the - * deployable composites together in a composite model representing an SCA - * domain composite. - * - * The difference between this sample and the WireComponents sample is an - * extra step to allocate deployable composites to SCA nodes. SCA nodes allow - * you to provide default configuration for the deploayable composites allocated - * to them, for example default binding configuration. - * - * The sample first reads the SCA metadata for three sample contributions, - * reads and resolve the artifacts contained in the contributions, includes all their - * deployable composites in a composite model representing an SCA domain, then - * uses several composite builder utilities to configure them as specified in the - * SCA nodes hosting them and assemble and wire them together. - * Finally it prints the resulting domain composite model, showing service bindings - * configured with the URIs from the nodes hosting them. - * - * @version $Rev$ $Date$ - */ -public class DistributeComponents { - - private static URLArtifactProcessor contributionProcessor; - private static ModelResolverExtensionPoint modelResolvers; - private static ModelFactoryExtensionPoint modelFactories; - private static WorkspaceFactory workspaceFactory; - private static AssemblyFactory assemblyFactory; - private static XMLOutputFactory outputFactory; - private static DocumentBuilderFactory documentBuilderFactory; - private static TransformerFactory transformerFactory; - private static StAXArtifactProcessor xmlProcessor; - private static ContributionDependencyBuilder contributionDependencyBuilder; - private static CompositeBuilder domainCompositeBuilder; - private static CompositeBuilder nodeCompositeBuilder; - private static NodeImplementationFactory nodeFactory; - private static AtomBindingFactory atomBindingFactory; - - private static void init() { - - // Create extension point registry - ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry(); - - // Create a monitor - UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); - MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); - Monitor monitor = monitorFactory.createMonitor(); - - // Initialize the Tuscany module activators - ModuleActivatorExtensionPoint moduleActivators = extensionPoints.getExtensionPoint(ModuleActivatorExtensionPoint.class); - for (ModuleActivator activator: moduleActivators.getModuleActivators()) { - activator.start(extensionPoints); - } - - // Get XML input/output factories - modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class); - XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class); - outputFactory = modelFactories.getFactory(XMLOutputFactory.class); - documentBuilderFactory = modelFactories.getFactory(DocumentBuilderFactory.class); - transformerFactory = modelFactories.getFactory(TransformerFactory.class); - - // Get contribution workspace and assembly model factories - workspaceFactory = modelFactories.getFactory(WorkspaceFactory.class); - assemblyFactory = modelFactories.getFactory(AssemblyFactory.class); - nodeFactory = modelFactories.getFactory(NodeImplementationFactory.class); - atomBindingFactory = modelFactories.getFactory(AtomBindingFactory.class); - - // Create XML artifact processors - StAXArtifactProcessorExtensionPoint xmlProcessorExtensions = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class); - xmlProcessor = new ExtensibleStAXArtifactProcessor(xmlProcessorExtensions, inputFactory, outputFactory, monitor); - - // Create contribution content processor - URLArtifactProcessorExtensionPoint docProcessorExtensions = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - contributionProcessor = docProcessorExtensions.getProcessor(Contribution.class); - - // Get the model resolvers - modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class); - - // Create a contribution dependency builder - contributionDependencyBuilder = new ContributionDependencyBuilderImpl(monitor); - - // Create a composite builder - SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class); - IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class); - InterfaceContractMapper contractMapper = utilities.getUtility(InterfaceContractMapper.class); - domainCompositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, - documentBuilderFactory, transformerFactory, contractMapper, monitor); - - // Create a node composite builder - nodeCompositeBuilder = new NodeCompositeBuilderImpl(assemblyFactory, scaBindingFactory, - documentBuilderFactory, transformerFactory, contractMapper, null, monitor); - } - - - public static void main(String[] args) throws Exception { - init(); - - // Create workspace model - Workspace workspace = workspaceFactory.createWorkspace(); - workspace.setModelResolver(new ExtensibleModelResolver(workspace, modelResolvers, modelFactories)); - - // Read the sample store contribution - URI storeURI = URI.create("store"); - URL storeURL = new File("./target/sample-domain-management-store.jar").toURI().toURL(); - Contribution storeContribution = contributionProcessor.read(null, storeURI, storeURL); - workspace.getContributions().add(storeContribution); - - // Read the sample assets contribution - URI assetsURI = URI.create("assets"); - URL assetsURL = new File("./target/sample-domain-management-assets.jar").toURI().toURL(); - Contribution assetsContribution = contributionProcessor.read(null, assetsURI, assetsURL); - workspace.getContributions().add(assetsContribution); - - // Read the sample client contribution - URI clientURI = URI.create("client"); - URL clientURL = new File("./target/sample-domain-management-client.jar").toURI().toURL(); - Contribution clientContribution = contributionProcessor.read(null, clientURI, clientURL); - workspace.getContributions().add(clientContribution); - - // Build the contribution dependencies - Set resolved = new HashSet(); - for (Contribution contribution: workspace.getContributions()) { - List dependencies = contributionDependencyBuilder.buildContributionDependencies(contribution, workspace); - - // Resolve contributions - for (Contribution dependency: dependencies) { - if (!resolved.contains(dependency)) { - resolved.add(dependency); - contributionProcessor.resolve(dependency, workspace.getModelResolver()); - } - } - } - - // Create a set of nodes, and assign the sample deployables to them - Composite cloudComposite = assemblyFactory.createComposite(); - cloudComposite.setName(new QName("http://sample", "cloud")); - for (int i = 0, n = workspace.getDeployables().size(); i < n; i++) { - - // Create a node - Component node = assemblyFactory.createComponent(); - node.setName("Node" + i); - cloudComposite.getComponents().add(node); - - // Add default binding configuration to the node, our samples use - // Atom bindings so here we're just creating default Atom binding - // configurations, but all the other binding types can be configured - // like that too - ComponentService nodeService = assemblyFactory.createComponentService(); - Binding binding = atomBindingFactory.createAtomBinding(); - binding.setURI("http://localhost:" + (8100 + i)); - nodeService.getBindings().add(binding); - node.getServices().add(nodeService); - - // Assign a deployable to the node - NodeImplementation nodeImplementation = nodeFactory.createNodeImplementation(); - Composite deployable = workspace.getDeployables().get(i); - nodeImplementation.setComposite(deployable); - node.setImplementation(nodeImplementation); - } - - // Print the model describing the nodes that we just built - System.out.println("cloud.composite"); - print(cloudComposite); - System.out.println(); - - // Build the nodes, this will apply their default binding configuration to the - // composites assigned to them - nodeCompositeBuilder.build(cloudComposite); - - // Create a composite model for the domain - Composite domainComposite = assemblyFactory.createComposite(); - domainComposite.setName(new QName("http://sample", "domain")); - - // Add all deployables to it, normally the domain administrator would select - // the deployables to include - domainComposite.getIncludes().addAll(workspace.getDeployables()); - - // Build the domain composite and wire the components included in it - domainCompositeBuilder.build(domainComposite); - - // Print out the resulting domain composite - System.out.println("domain.composite"); - print(domainComposite); - } - - private static void print(Composite composite) throws XMLStreamException, ContributionWriteException, ParserConfigurationException, SAXException, IOException { - - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - XMLStreamWriter writer = outputFactory.createXMLStreamWriter(bos); - xmlProcessor.write(composite, writer); - - // Parse and write again to pretty format it - DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); - Document document = documentBuilder.parse(new ByteArrayInputStream(bos.toByteArray())); - OutputFormat format = new OutputFormat(); - format.setIndenting(true); - format.setIndent(2); - XMLSerializer serializer = new XMLSerializer(System.out, format); - serializer.serialize(document); - } -} diff --git a/branches/sca-android/samples/domain-management/src/main/java/manager/ListComponents.java b/branches/sca-android/samples/domain-management/src/main/java/manager/ListComponents.java deleted file mode 100644 index 27cb31d57f..0000000000 --- a/branches/sca-android/samples/domain-management/src/main/java/manager/ListComponents.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package manager; - -import java.io.File; -import java.net.URI; -import java.net.URL; -import java.util.List; - -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Implementation; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint; -import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.core.ModuleActivator; -import org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint; -import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.interfacedef.InterfaceContract; -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.MonitorFactory; -import org.apache.tuscany.sca.workspace.Workspace; -import org.apache.tuscany.sca.workspace.WorkspaceFactory; -import org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder; -import org.apache.tuscany.sca.workspace.builder.impl.ContributionDependencyBuilderImpl; - -/** - * Sample ListComponents task. - * - * This sample shows how to use subset of Tuscany to read contribution - * metadata, analyze and resolve contribution dependencies, read and resolve - * the artifacts that they contribute (in particular implementation artifacts, - * interfaces, composites and componentTypes). - * - * The sample first reads the SCA metadata for two sample contributions, then displays - * their dependencies, reads and resolve the artifacts contained in the contributions, - * and finally prints the deployables composites and the components they declare as - * well as their main characteristics (showing that their interfaces and implementations - * for example are actually resolved). - * - * @version $Rev$ $Date$ - */ -public class ListComponents { - - private static URLArtifactProcessor contributionProcessor; - private static ModelResolverExtensionPoint modelResolvers; - private static ModelFactoryExtensionPoint modelFactories; - private static WorkspaceFactory workspaceFactory; - private static ContributionDependencyBuilder contributionDependencyBuilder; - - private static void init() { - - // Create extension point registry - ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry(); - - // Initialize the Tuscany module activators - ModuleActivatorExtensionPoint moduleActivators = extensionPoints.getExtensionPoint(ModuleActivatorExtensionPoint.class); - for (ModuleActivator activator: moduleActivators.getModuleActivators()) { - activator.start(extensionPoints); - } - - // Get workspace contribution factory - modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class); - workspaceFactory = modelFactories.getFactory(WorkspaceFactory.class); - - // Create contribution content processor - URLArtifactProcessorExtensionPoint docProcessorExtensions = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - contributionProcessor = docProcessorExtensions.getProcessor(Contribution.class); - - // Get the model resolvers - modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class); - - // Create a monitor - UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); - MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); - Monitor monitor = monitorFactory.createMonitor(); - - // Create a contribution dependency builder - contributionDependencyBuilder = new ContributionDependencyBuilderImpl(monitor); - } - - - public static void main(String[] args) throws Exception { - init(); - - // Create workspace model - Workspace workspace = workspaceFactory.createWorkspace(); - workspace.setModelResolver(new ExtensibleModelResolver(workspace, modelResolvers, modelFactories)); - - // Read the sample store contribution - URI storeURI = URI.create("store"); - URL storeURL = new File("./target/sample-domain-management-store.jar").toURI().toURL(); - Contribution storeContribution = contributionProcessor.read(null, storeURI, storeURL); - workspace.getContributions().add(storeContribution); - - // Read the sample assets contribution - URI assetsURI = URI.create("assets"); - URL assetsURL = new File("./target/sample-domain-management-assets.jar").toURI().toURL(); - Contribution assetsContribution = contributionProcessor.read(null, assetsURI, assetsURL); - workspace.getContributions().add(assetsContribution); - - // Build the store contribution dependencies - List dependencies = contributionDependencyBuilder.buildContributionDependencies(storeContribution, workspace); - - // Resolve the contributions - for (Contribution contribution: dependencies) { - contributionProcessor.resolve(contribution, workspace.getModelResolver()); - } - - // List the components declared in the deployables found in the - // contribution, their services, bindings, interfaces, and implementations - for (Composite deployable: storeContribution.getDeployables()) { - System.out.println("Deployable: " + deployable.getName()); - for (Component component: deployable.getComponents()) { - System.out.println(" component: " + component.getName()); - for (ComponentService componentService: component.getServices()) { - System.out.println(" componentService: " + componentService.getName()); - for (Binding binding: componentService.getBindings()) { - System.out.println(" binding: " + binding.getClass() + " - " + binding.getURI()); - } - } - Implementation implementation = component.getImplementation(); - System.out.println(" implementation: " + implementation); - for (Service service: implementation.getServices()) { - System.out.println(" service: " + service.getName()); - InterfaceContract contract = service.getInterfaceContract(); - System.out.println(" interface: " + contract.getInterface()); - } - } - } - } - -} diff --git a/branches/sca-android/samples/domain-management/src/main/java/manager/ListDependencies.java b/branches/sca-android/samples/domain-management/src/main/java/manager/ListDependencies.java deleted file mode 100644 index 1bf8124682..0000000000 --- a/branches/sca-android/samples/domain-management/src/main/java/manager/ListDependencies.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package manager; - -import java.io.File; -import java.net.URI; -import java.net.URL; - -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.MonitorFactory; -import org.apache.tuscany.sca.workspace.Workspace; -import org.apache.tuscany.sca.workspace.WorkspaceFactory; -import org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder; -import org.apache.tuscany.sca.workspace.builder.impl.ContributionDependencyBuilderImpl; - -/** - * Sample ListDependencies task. - * - * This sample shows how to use a subset of Tuscany to read contribution - * metadata, analyze and resolve contribution dependencies given a set of - * available contributions. - * - * The sample reads the SCA metadata for two sample contributions then - * prints their dependencies. - * - * @version $Rev$ $Date$ - */ -public class ListDependencies { - - private static URLArtifactProcessor contributionProcessor; - private static WorkspaceFactory workspaceFactory; - private static ContributionDependencyBuilder contributionDependencyBuilder; - - private static void init() throws Exception { - - // Create extension point registry - ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry(); - - // Get contribution, workspace and assembly model factories - ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class); - workspaceFactory = modelFactories.getFactory(WorkspaceFactory.class); - - // Create contribution info processor - URLArtifactProcessorExtensionPoint docProcessorExtensions = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - contributionProcessor = docProcessorExtensions.getProcessor(Contribution.class); - - // Create a monitor - UtilityExtensionPoint services = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); - MonitorFactory monitorFactory = services.getUtility(MonitorFactory.class); - Monitor monitor = monitorFactory.createMonitor(); - - // Create a contribution dependency builder - contributionDependencyBuilder = new ContributionDependencyBuilderImpl(monitor); - } - - - public static void main(String[] args) throws Exception { - init(); - - // Create workspace model - Workspace workspace = workspaceFactory.createWorkspace(); - - // Read the contribution info for the sample contribution - URI storeURI = URI.create("store"); - URL storeURL = new File("./target/sample-domain-management-store.jar").toURI().toURL(); - Contribution storeContribution = (Contribution)contributionProcessor.read(null, storeURI, storeURL); - workspace.getContributions().add(storeContribution); - - // Read the contribution info for the assets contribution - URI assetsURI = URI.create("assets"); - URL assetsURL = new File("./target/sample-domain-management-assets.jar").toURI().toURL(); - Contribution assetsContribution = contributionProcessor.read(null, assetsURI, assetsURL); - workspace.getContributions().add(assetsContribution); - - // List the contribution dependencies of each contribution - for (Contribution contribution: workspace.getContributions()) { - System.out.println("Contribution: " + contribution.getURI()); - for (Contribution dependency: contributionDependencyBuilder.buildContributionDependencies(contribution, workspace)) { - System.out.println(" dependency: " + dependency.getURI()); - } - } - } - -} diff --git a/branches/sca-android/samples/domain-management/src/main/java/manager/ListDeployables.java b/branches/sca-android/samples/domain-management/src/main/java/manager/ListDeployables.java deleted file mode 100644 index f5f0b9c655..0000000000 --- a/branches/sca-android/samples/domain-management/src/main/java/manager/ListDeployables.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package manager; - -import java.io.File; -import java.net.URI; -import java.net.URL; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; - -/** - * Sample ListDeployables task. - * - * This sample shows how to use a subset of Tuscany to read contribution - * metadata. - * - * The sample reads the SCA metadata for two sample contributions then - * prints the names of their deployable composites. - * - * @version $Rev$ $Date$ - */ -public class ListDeployables { - - private static URLArtifactProcessor contributionProcessor; - - private static void init() { - - // Create extension point registry - ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry(); - - // Create contribution info processor - URLArtifactProcessorExtensionPoint docProcessorExtensions = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - contributionProcessor = docProcessorExtensions.getProcessor(Contribution.class); - } - - public static void main(String[] args) throws Exception { - init(); - - // Read the contribution info for the sample contribution - URI uri = URI.create("store"); - URL url = new File("./target/sample-domain-management-store.jar").toURI().toURL(); - Contribution contribution = contributionProcessor.read(null, uri, url); - - // List the deployables in the contribution - for (Composite deployable: contribution.getDeployables()) { - System.out.println("Deployable: " + deployable.getName()); - } - - } - -} diff --git a/branches/sca-android/samples/domain-management/src/main/java/manager/WireComponents.java b/branches/sca-android/samples/domain-management/src/main/java/manager/WireComponents.java deleted file mode 100644 index d24d5c67c9..0000000000 --- a/branches/sca-android/samples/domain-management/src/main/java/manager/WireComponents.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package manager; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.net.URI; -import java.net.URL; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import javax.xml.namespace.QName; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLOutputFactory; -import javax.xml.stream.XMLStreamWriter; -import javax.xml.transform.TransformerFactory; - -import org.apache.tuscany.sca.assembly.AssemblyFactory; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.SCABindingFactory; -import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; -import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver; -import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint; -import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.core.ModuleActivator; -import org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint; -import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.MonitorFactory; -import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory; -import org.apache.tuscany.sca.workspace.Workspace; -import org.apache.tuscany.sca.workspace.WorkspaceFactory; -import org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder; -import org.apache.tuscany.sca.workspace.builder.impl.ContributionDependencyBuilderImpl; -import org.apache.xml.serialize.OutputFormat; -import org.apache.xml.serialize.XMLSerializer; -import org.w3c.dom.Document; - -/** - * Sample WireComponents task. - * - * This sample shows how to use a subset of Tuscany to read contribution - * metadata, analyze and resolve contribution dependencies, read and resolve - * the artifacts that they contribute (in particular implementation artifacts, - * interfaces, composites, componentTypes etc.) and assembe and wire the - * deployable composites together in a composite model representing an SCA - * domain composite. - * - * The sample first reads the SCA metadata for three sample contributions, - * reads and resolve the artifacts contained in the contributions, includes all their - * deployable composites in a composite model representing an SCA domain, then - * uses a composite builder utility to assemble and wire the composites together. - * Finally it prints the resulting domain composite model. - * - * @version $Rev$ $Date$ - */ -public class WireComponents { - - private static URLArtifactProcessor contributionProcessor; - private static ModelResolverExtensionPoint modelResolvers; - private static ModelFactoryExtensionPoint modelFactories; - private static WorkspaceFactory workspaceFactory; - private static AssemblyFactory assemblyFactory; - private static XMLOutputFactory outputFactory; - private static DocumentBuilderFactory documentBuilderFactory; - private static TransformerFactory transformerFactory; - private static StAXArtifactProcessor xmlProcessor; - private static ContributionDependencyBuilder contributionDependencyBuilder; - private static CompositeBuilder domainCompositeBuilder; - - private static void init() { - - // Create extension point registry - ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry(); - - // Create a monitor - UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); - MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); - Monitor monitor = monitorFactory.createMonitor(); - - // Initialize the Tuscany module activators - ModuleActivatorExtensionPoint moduleActivators = extensionPoints.getExtensionPoint(ModuleActivatorExtensionPoint.class); - for (ModuleActivator activator: moduleActivators.getModuleActivators()) { - activator.start(extensionPoints); - } - - // Get XML input/output factories - modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class); - XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class); - outputFactory = modelFactories.getFactory(XMLOutputFactory.class); - documentBuilderFactory = modelFactories.getFactory(DocumentBuilderFactory.class); - transformerFactory = modelFactories.getFactory(TransformerFactory.class); - - // Get contribution workspace and assembly model factories - workspaceFactory = modelFactories.getFactory(WorkspaceFactory.class); - assemblyFactory = modelFactories.getFactory(AssemblyFactory.class); - - // Create XML artifact processors - StAXArtifactProcessorExtensionPoint xmlProcessorExtensions = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class); - xmlProcessor = new ExtensibleStAXArtifactProcessor(xmlProcessorExtensions, inputFactory, outputFactory, monitor); - - // Create contribution content processor - URLArtifactProcessorExtensionPoint docProcessorExtensions = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - contributionProcessor = docProcessorExtensions.getProcessor(Contribution.class); - - // Get the model resolvers - modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class); - - // Create a contribution dependency builder - contributionDependencyBuilder = new ContributionDependencyBuilderImpl(monitor); - - // Create a composite builder - SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class); - IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class); - InterfaceContractMapper contractMapper = utilities.getUtility(InterfaceContractMapper.class); - domainCompositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, - documentBuilderFactory, transformerFactory, contractMapper, monitor); - - } - - - public static void main(String[] args) throws Exception { - init(); - - // Create workspace model - Workspace workspace = workspaceFactory.createWorkspace(); - workspace.setModelResolver(new ExtensibleModelResolver(workspace, modelResolvers, modelFactories)); - - // Read the sample store contribution - URI storeURI = URI.create("store"); - URL storeURL = new File("./target/sample-domain-management-store.jar").toURI().toURL(); - Contribution storeContribution = contributionProcessor.read(null, storeURI, storeURL); - workspace.getContributions().add(storeContribution); - - // Read the sample assets contribution - URI assetsURI = URI.create("assets"); - URL assetsURL = new File("./target/sample-domain-management-assets.jar").toURI().toURL(); - Contribution assetsContribution = contributionProcessor.read(null, assetsURI, assetsURL); - workspace.getContributions().add(assetsContribution); - - // Read the sample client contribution - URI clientURI = URI.create("client"); - URL clientURL = new File("./target/sample-domain-management-client.jar").toURI().toURL(); - Contribution clientContribution = contributionProcessor.read(null, clientURI, clientURL); - workspace.getContributions().add(clientContribution); - - // Build the contribution dependencies - Set resolved = new HashSet(); - for (Contribution contribution: workspace.getContributions()) { - List dependencies = contributionDependencyBuilder.buildContributionDependencies(contribution, workspace); - - // Resolve contributions - for (Contribution dependency: dependencies) { - if (!resolved.contains(dependency)) { - resolved.add(dependency); - contributionProcessor.resolve(contribution, workspace.getModelResolver()); - } - } - } - - // Create a composite model for the domain - Composite domainComposite = assemblyFactory.createComposite(); - domainComposite.setName(new QName("http://sample", "domain")); - - // Add all deployables to it, normally the domain administrator would select - // the deployables to include - domainComposite.getIncludes().addAll(workspace.getDeployables()); - - // Build the domain composite and wire the components included in it - domainCompositeBuilder.build(domainComposite); - - // Print out the resulting domain composite - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - XMLStreamWriter writer = outputFactory.createXMLStreamWriter(bos); - xmlProcessor.write(domainComposite, writer); - - // Parse and write again to pretty format it - DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); - Document document = documentBuilder.parse(new ByteArrayInputStream(bos.toByteArray())); - OutputFormat format = new OutputFormat(); - format.setIndenting(true); - format.setIndent(2); - XMLSerializer serializer = new XMLSerializer(System.out, format); - serializer.serialize(document); - } - -} diff --git a/branches/sca-android/samples/domain-management/src/test/java/services/Cart.java b/branches/sca-android/samples/domain-management/src/test/java/services/Cart.java deleted file mode 100644 index 9e6226d963..0000000000 --- a/branches/sca-android/samples/domain-management/src/test/java/services/Cart.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.apache.tuscany.sca.data.collection.Collection; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Cart extends Collection { - -} diff --git a/branches/sca-android/samples/domain-management/src/test/java/services/Item.java b/branches/sca-android/samples/domain-management/src/test/java/services/Item.java deleted file mode 100644 index 81cefcdbef..0000000000 --- a/branches/sca-android/samples/domain-management/src/test/java/services/Item.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - - -public class Item { - private String name; - private String price; - private String origin; - - public Item() { - } - - public Item(String name, String price, String origin) { - this.name = name; - this.price = price; - this.origin = origin; - } - - public Item(String name, String price) { - this.name = name; - this.price = price; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPrice() { - return price; - } - - public void setPrice(String price) { - this.price = price; - } - - public String getOrigin() { - return origin; - } - - public void setOrigin(String origin) { - this.origin = origin; - } - -} diff --git a/branches/sca-android/samples/domain-management/src/test/java/services/ShoppingCartClientImpl.java b/branches/sca-android/samples/domain-management/src/test/java/services/ShoppingCartClientImpl.java deleted file mode 100644 index c32853b3a9..0000000000 --- a/branches/sca-android/samples/domain-management/src/test/java/services/ShoppingCartClientImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.apache.tuscany.sca.data.collection.Entry; -import org.apache.tuscany.sca.data.collection.NotFoundException; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -@Scope("COMPOSITE") -public class ShoppingCartClientImpl implements Cart { - - @Reference - public Cart cart; - - public Entry[] getAll() { - return cart.getAll(); - } - - public Item get(String key) throws NotFoundException { - return cart.get(key); - } - - public String post(String key, Item item) { - return cart.post(key, item); - } - - public void put(String key, Item item) throws NotFoundException { - cart.put(key, item); - } - - public void delete(String key) throws NotFoundException { - cart.delete(key); - } - - public Entry[] query(String queryString) { - return cart.query(queryString); - } - -} diff --git a/branches/sca-android/samples/domain-management/src/test/java/services/ShoppingCartImpl.java b/branches/sca-android/samples/domain-management/src/test/java/services/ShoppingCartImpl.java deleted file mode 100644 index 30abfe77a0..0000000000 --- a/branches/sca-android/samples/domain-management/src/test/java/services/ShoppingCartImpl.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import org.apache.tuscany.sca.data.collection.Entry; -import org.apache.tuscany.sca.data.collection.NotFoundException; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Scope; - -@Scope("COMPOSITE") -public class ShoppingCartImpl implements Cart { - - private Map cart; - - @Init - public void init() { - cart = new HashMap(); - } - - public Entry[] getAll() { - Entry[] entries = new Entry[cart.size()]; - int i = 0; - for (Map.Entry e: cart.entrySet()) { - entries[i++] = new Entry(e.getKey(), e.getValue()); - } - return entries; - } - - public Item get(String key) throws NotFoundException { - Item item = cart.get(key); - if (item == null) { - throw new NotFoundException(key); - } else { - return item; - } - } - - public String post(String key, Item item) { - if (key == null) { - key ="cart-" + UUID.randomUUID().toString(); - } - cart.put(key, item); - return key; - } - - public void put(String key, Item item) throws NotFoundException { - if (!cart.containsKey(key)) { - throw new NotFoundException(key); - } - cart.put(key, item); - } - - public void delete(String key) throws NotFoundException { - if (key == null || key.equals("")) { - cart.clear(); - } else { - Item item = cart.remove(key); - if (item == null) - throw new NotFoundException(key); - } - } - - public Entry[] query(String queryString) { - List> entries = new ArrayList>(); - if (queryString.startsWith("name=")) { - String name = queryString.substring(5); - for (Map.Entry e: cart.entrySet()) { - Item item = e.getValue(); - if (item.getName().equals(name)) { - entries.add(new Entry(e.getKey(), e.getValue())); - } - } - } - return entries.toArray(new Entry[entries.size()]); - } - -} diff --git a/branches/sca-android/samples/domain-management/src/test/resources/assembly/assets.xml b/branches/sca-android/samples/domain-management/src/test/resources/assembly/assets.xml deleted file mode 100644 index 10693a89e6..0000000000 --- a/branches/sca-android/samples/domain-management/src/test/resources/assembly/assets.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - assets - false - - jar - - - - - target/test-classes/assets - / - - - target/test-classes/services - /services - - - - diff --git a/branches/sca-android/samples/domain-management/src/test/resources/assembly/client.xml b/branches/sca-android/samples/domain-management/src/test/resources/assembly/client.xml deleted file mode 100644 index 5b34693bee..0000000000 --- a/branches/sca-android/samples/domain-management/src/test/resources/assembly/client.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - client - false - - jar - - - - - target/test-classes/client - / - - - - diff --git a/branches/sca-android/samples/domain-management/src/test/resources/assembly/store.xml b/branches/sca-android/samples/domain-management/src/test/resources/assembly/store.xml deleted file mode 100644 index d19b7eb161..0000000000 --- a/branches/sca-android/samples/domain-management/src/test/resources/assembly/store.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - store - false - - jar - - - - - target/test-classes/store - / - - - - diff --git a/branches/sca-android/samples/domain-management/src/test/resources/assets/META-INF/sca-contribution.xml b/branches/sca-android/samples/domain-management/src/test/resources/assets/META-INF/sca-contribution.xml deleted file mode 100644 index 33fe814c3a..0000000000 --- a/branches/sca-android/samples/domain-management/src/test/resources/assets/META-INF/sca-contribution.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/domain-management/src/test/resources/client/META-INF/sca-contribution.xml b/branches/sca-android/samples/domain-management/src/test/resources/client/META-INF/sca-contribution.xml deleted file mode 100644 index 14e1cdb672..0000000000 --- a/branches/sca-android/samples/domain-management/src/test/resources/client/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/domain-management/src/test/resources/client/client.composite b/branches/sca-android/samples/domain-management/src/test/resources/client/client.composite deleted file mode 100644 index 1279b319c4..0000000000 --- a/branches/sca-android/samples/domain-management/src/test/resources/client/client.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/domain-management/src/test/resources/store/META-INF/sca-contribution.xml b/branches/sca-android/samples/domain-management/src/test/resources/store/META-INF/sca-contribution.xml deleted file mode 100644 index 52348106f2..0000000000 --- a/branches/sca-android/samples/domain-management/src/test/resources/store/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/domain-management/src/test/resources/store/store.composite b/branches/sca-android/samples/domain-management/src/test/resources/store/store.composite deleted file mode 100644 index d4f18771d8..0000000000 --- a/branches/sca-android/samples/domain-management/src/test/resources/store/store.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-android/samples/feed-aggregator-webapp/README b/branches/sca-android/samples/feed-aggregator-webapp/README deleted file mode 100644 index 3668a7705e..0000000000 --- a/branches/sca-android/samples/feed-aggregator-webapp/README +++ /dev/null @@ -1,55 +0,0 @@ -Feed-aggregator-webapp Sample -============================= -This sample demonstrates using the Feed binding to aggregate ATOM and RSS -feeds and publish a new aggregated feed in a webapp. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -As this sample provides a web app there is a manual step where the WAR file -that contains the sample is copied to your web app container. If you just want -to give this sample a go deploy the WAR file -(target/sample-feed-aggregator-webapp.war) to your web application server. - -Once the web app is deployed use your browser to visit the following URL: - -http://localhost:8080/sample-feed-aggregator-webapp - -You will then see the following displayed in your Web browser. - -http://localhost:8083/atomAggregator -http://localhost:8083/atomAggregator/atomsvc -http://localhost:8083/rssAggregator - -** Please note that if your browser is not configured correctly to receive -feed information, you will be prompted to open each file that contains the feed -information in xml. - - -Building And Running The Sample Using Ant -------------------------------------------- -With the binary distribution the sample can be built using Ant as -follows - -cd feed-aggregator-webapp -ant package - -This should result in a war file (sample-feed-aggregator-webapp.war) in the -target directory. Copy this war file to your web app deployment directory and -follow instructions at the begining of this README. - - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd feed-aggregator-webapp -mvn - -This should result in a war file (sample-feed-aggregator-webapp.war) in the -target directory. Follow the steps described in the previous section for -running the web app and for the expected results. - - diff --git a/branches/sca-android/samples/feed-aggregator-webapp/feed-aggregator-webapp.png b/branches/sca-android/samples/feed-aggregator-webapp/feed-aggregator-webapp.png deleted file mode 100644 index 1af95a5eff..0000000000 Binary files a/branches/sca-android/samples/feed-aggregator-webapp/feed-aggregator-webapp.png and /dev/null differ diff --git a/branches/sca-android/samples/feed-aggregator-webapp/feed-aggregator-webapp.svg b/branches/sca-android/samples/feed-aggregator-webapp/feed-aggregator-webapp.svg deleted file mode 100644 index a861a5c50f..0000000000 --- a/branches/sca-android/samples/feed-aggregator-webapp/feed-aggregator-webapp.svg +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - - - - - - - FeedAggregator - Sort - - newFirst = true - - RssAggregator - - - - - AtomAggregator - - - Rss Sample - Atom Sample - - - - - - - - - - Engadget - BBC - Oreilly - Apache - - - RSS Atom - sample-feed-aggregator-webapp.war - diff --git a/branches/sca-android/samples/feed-aggregator-webapp/pom.xml b/branches/sca-android/samples/feed-aggregator-webapp/pom.xml deleted file mode 100644 index 3176489de1..0000000000 --- a/branches/sca-android/samples/feed-aggregator-webapp/pom.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-feed-aggregator-webapp - war - Apache Tuscany SCA Atom+RSS Feed Aggregator Sample Webapp - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-rss-rome - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - - stax - stax-api - 1.0.1 - provided - - - - - javax.servlet - servlet-api - 2.3 - provided - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - - diff --git a/branches/sca-android/samples/feed-aggregator-webapp/src/main/java/feed/AggregatorImpl.java b/branches/sca-android/samples/feed-aggregator-webapp/src/main/java/feed/AggregatorImpl.java deleted file mode 100644 index d4adf03851..0000000000 --- a/branches/sca-android/samples/feed-aggregator-webapp/src/main/java/feed/AggregatorImpl.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package feed; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.OutputStreamWriter; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.apache.abdera.Abdera; -import org.apache.abdera.factory.Factory; -import org.apache.abdera.model.Document; -import org.apache.abdera.model.Entry; -import org.apache.abdera.model.Feed; -import org.apache.abdera.model.Person; -import org.apache.abdera.parser.Parser; -import org.apache.tuscany.sca.binding.atom.collection.Collection; -import org.apache.tuscany.sca.binding.atom.collection.NotFoundException; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; - -import com.sun.syndication.feed.synd.SyndFeed; -import com.sun.syndication.feed.synd.SyndFeedImpl; -import com.sun.syndication.io.SyndFeedOutput; - -/** - * Implementation of an SCA component that aggregates several - * Atom and RSS feeds. - * - * @version $Rev$ $Date$ - */ -public class AggregatorImpl implements org.apache.tuscany.sca.binding.atom.collection.Collection { - - @Reference(required = false) - public Collection atomFeed1; - @Reference(required = false) - public Collection atomFeed2; - - @Reference(required = false) - public org.apache.tuscany.sca.binding.rss.collection.Collection rssFeed1; - @Reference(required = false) - public org.apache.tuscany.sca.binding.rss.collection.Collection rssFeed2; - - @Reference(required = false) - public Sort sort; - - @Property - public String feedTitle = "Aggregated Feed"; - @Property - public String feedDescription = "Anonymous Aggregated Feed"; - @Property - public String feedAuthor = "anonymous"; - - public Feed getFeed() { - - // Create a new Feed - Factory factory = Abdera.getNewFactory(); - Feed feed = factory.newFeed(); - feed.setTitle(feedTitle); - feed.setSubtitle(feedDescription); - Person author = factory.newAuthor(); - author.setName(feedAuthor); - feed.addAuthor(author); - feed.addLink("http://tuscany.apache.org", "alternate"); - - // Aggregate entries from atomFeed1, atomFeed2, rssFeed1 and rssFeed2 - List entries = new ArrayList(); - if (atomFeed1 != null) { - try { - entries.addAll(atomFeed1.getFeed().getEntries()); - } catch (Exception e) {} - } - if (atomFeed2 != null) { - try { - entries.addAll(atomFeed2.getFeed().getEntries()); - } catch (Exception e) {} - } - if (rssFeed1 != null) { - try { - entries.addAll(atomFeed(rssFeed1.getFeed()).getEntries()); - } catch (Exception e) {} - } - if (rssFeed2 != null) { - try { - entries.addAll(atomFeed(rssFeed2.getFeed()).getEntries()); - } catch (Exception e) {} - } - - // Sort entries by published date - if (sort != null) { - entries = sort.sort(entries); - } - - // Add the entries to the new feed - for (Entry entry: entries) { - feed.addEntry(entry); - } - - return feed; - } - - public Feed query(String queryString) { - Factory factory = Abdera.getNewFactory(); - Feed feed = factory.newFeed(); - feed.setTitle(feedTitle); - feed.setSubtitle(feedDescription); - Person author = factory.newAuthor(); - author.setName(feedAuthor); - feed.addAuthor(author); - feed.addLink("http://tuscany.apache.org", "alternate"); - - Feed allFeed = getFeed(); - if (queryString.startsWith("title=")) { - String title = queryString.substring(6); - - for (Entry entry: allFeed.getEntries()) { - if (entry.getTitle().contains(title)) { - feed.addEntry(entry); - } - } - } - return feed; - } - - public void delete(String id) throws NotFoundException { - } - - public Entry get(String id) throws NotFoundException { - return null; - } - - public Entry post(Entry entry) { - return null; - } - - public void put(String id, Entry entry) throws NotFoundException { - } - - /** - * Convert a ROME feed to an Abdera feed. - * - * @param romeFeed - * @return - */ - private static Feed atomFeed(SyndFeed syndFeed) { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - - syndFeed.setFeedType("atom_1.0"); - SyndFeedOutput syndOutput = new SyndFeedOutput(); - try { - syndOutput.output(syndFeed, new OutputStreamWriter(bos)); - } catch (Exception e) { - throw new RuntimeException(e); - } - Parser parser = Abdera.getNewParser(); - Document document = parser.parse(new ByteArrayInputStream(bos.toByteArray())); - - return document.getRoot(); - } -} diff --git a/branches/sca-android/samples/feed-aggregator-webapp/src/main/java/feed/Sort.java b/branches/sca-android/samples/feed-aggregator-webapp/src/main/java/feed/Sort.java deleted file mode 100644 index dec073c36b..0000000000 --- a/branches/sca-android/samples/feed-aggregator-webapp/src/main/java/feed/Sort.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package feed; - -import java.util.List; - -import org.apache.abdera.model.Entry; - -/** - * The Sort service business interface. - * - * @version $Rev$ $Date$ - */ -public interface Sort { - - /** - * Sort feed entries by published date. - * @param entries - * @return - */ - List sort(List entries); -} diff --git a/branches/sca-android/samples/feed-aggregator-webapp/src/main/java/feed/SortImpl.java b/branches/sca-android/samples/feed-aggregator-webapp/src/main/java/feed/SortImpl.java deleted file mode 100644 index f7ead126a7..0000000000 --- a/branches/sca-android/samples/feed-aggregator-webapp/src/main/java/feed/SortImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package feed; - -import java.util.Arrays; -import java.util.Comparator; -import java.util.Date; -import java.util.List; - -import org.apache.abdera.model.Entry; -import org.osoa.sca.annotations.Property; - -/** - * Implementation of a Feed Sort service component. - * - * @version $Rev$ $Date$ - */ -public class SortImpl implements Sort { - - @Property - public boolean newFirst = true; - - @SuppressWarnings("unchecked") - public List sort(List entries) { - Entry[] entriesArray = new Entry[entries.size()]; - entriesArray = (Entry[])entries.toArray(entriesArray); - Arrays.sort(entriesArray, new Comparator() { - public int compare(final Object xObj, final Object yObj) { - Date xDate = ((Entry)xObj).getUpdated(); - Date yDate = ((Entry)yObj).getUpdated(); - if (xDate == null) - return -1; - if (newFirst) - return yDate.compareTo(xDate); - else - return xDate.compareTo(yDate); - } - }); - return Arrays.asList(entriesArray); - } -} diff --git a/branches/sca-android/samples/feed-aggregator-webapp/src/main/resources/FeedAggregator.composite b/branches/sca-android/samples/feed-aggregator-webapp/src/main/resources/FeedAggregator.composite deleted file mode 100644 index 736563098f..0000000000 --- a/branches/sca-android/samples/feed-aggregator-webapp/src/main/resources/FeedAggregator.composite +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - RSS Aggregator Sample - - - - true - - - - - - - - - - - - Atom Aggregator Sample - - - \ No newline at end of file diff --git a/branches/sca-android/samples/feed-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-android/samples/feed-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index b67fe843ca..0000000000 --- a/branches/sca-android/samples/feed-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/branches/sca-android/samples/feed-aggregator-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-android/samples/feed-aggregator-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index dea3980e4d..0000000000 --- a/branches/sca-android/samples/feed-aggregator-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - Apache Tuscany Feed Aggregator Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - index.html - - - diff --git a/branches/sca-android/samples/feed-aggregator-webapp/src/main/webapp/index.html b/branches/sca-android/samples/feed-aggregator-webapp/src/main/webapp/index.html deleted file mode 100644 index 7b33391a87..0000000000 --- a/branches/sca-android/samples/feed-aggregator-webapp/src/main/webapp/index.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - Apache Tuscany Feed Aggregator Sample - - - -

Apache Tuscany Feed Aggregator Sample

-

To read the aggregated feeds, point your Web browser to the following addresses:

-
http://localhost:8083/sample-feed-aggregator-webapp/atomAggregator -
http://localhost:8083/sample-feed-aggregator-webapp/atomAggregator/atomsvc (for the Atom service document) -
http://localhost:8083/sample-feed-aggregator-webapp/rssAggregator - - - diff --git a/branches/sca-android/samples/feed-aggregator/README b/branches/sca-android/samples/feed-aggregator/README deleted file mode 100644 index f73baec2fd..0000000000 --- a/branches/sca-android/samples/feed-aggregator/README +++ /dev/null @@ -1,110 +0,0 @@ -Feed Aggregator Sample -====================================== -This sample demonstrates using the Feed binding to aggregate ATOM and RSS -feeds and publish a new aggregated feed. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you run the sample using ant, navigate to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-feed-aggregator.jar launch.LaunchFeedServer - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-feed-aggregator.jar launch.LaunchFeedServer - -You should see the following output on the screen. - -run: - [java] Added Servlet mapping: http://localhost:8083/rssAggregator - [java] Added Servlet mapping: http://localhost:8083/atomAggregator/* - [java] Sample Feed server started (press enter to shutdown) - - [java] To read the aggregated feeds, point your Web browser to the following addresses: - [java] http://localhost:8083/atomAggregator - [java] http://localhost:8083/atomAggregator/atomsvc (for the Atom service document) - [java] http://localhost:8083/rssAggregator - -As this point the aggregated Feeds are exposed by a web server started -automatically by the SCA runtime. You can later stop the server by pressing enter. - -Now that the server is started you can point your Web browser to each URL of the -aggregated feeds to see the information in your broswer. These URLs are: - -http://localhost:8083/atomAggregator -http://localhost:8083/atomAggregator/atomsvc -http://localhost:8083/rssAggregator - -** Please note that if your browser is not configured correctly to receive -feed information, you will be prompted to open each file that contains the feed -information in xml. - -Sample Overview ---------------- -The sample provides a single component exposing a Web resource. - -web-resource/ - src/ - main/ - java/ - feed/ - AggregatorImpl.java - implementation of the Feed - aggregator component - Sort.java - utilty interface - SortImpl.java - implementation of the Sort component - launch - LaunchFeedServer.java - starts the SCA Runtime and - publishes the aggregated feeds - resources/ - FeedAggregator.composite - the SCA assembly for this sample - feed-aggregator.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - - -Details of how this sample works --------------------------------- -1. AggregatorImpl is used to implement the two main components here (RSSAggregator & AtomAggregator). -2. AggregatorImpl directly implements the Tuscany Atom Collection interface. It is a component - that provides an Atom feed to respond (see tuscany/modules/binding-atom-abdera) -3. The AggregatorImpl component is not explicitly configured using nested element nor its - implementation class is annotated with @Service annotation. Instead, the Tuscany Atom Collection interface - defines its services using @Remotable annotation. - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant using the -following commands - -cd feed-aggregator -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] Added Servlet mapping: http://localhost:8083/rssAggregator - [java] Added Servlet mapping: http://localhost:8083/atomAggregator/* - [java] Sample Feed server started (press enter to shutdown) - - [java] To read the aggregated feeds, point your Web browser to the following addresses: - [java] http://localhost:8083/atomAggregator - [java] http://localhost:8083/atomAggregator/atomsvc (for the Atom service document) - [java] http://localhost:8083/rssAggregator - - -Building The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built using -Maven as follows. - -cd feed-aggregator -mvn - diff --git a/branches/sca-android/samples/feed-aggregator/build.xml b/branches/sca-android/samples/feed-aggregator/build.xml deleted file mode 100644 index 0ab6fed7fc..0000000000 --- a/branches/sca-android/samples/feed-aggregator/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/feed-aggregator/feed-aggregator.png b/branches/sca-android/samples/feed-aggregator/feed-aggregator.png deleted file mode 100644 index c8fea8a7b8..0000000000 Binary files a/branches/sca-android/samples/feed-aggregator/feed-aggregator.png and /dev/null differ diff --git a/branches/sca-android/samples/feed-aggregator/feed-aggregator.svg b/branches/sca-android/samples/feed-aggregator/feed-aggregator.svg deleted file mode 100644 index 72fe6a00ac..0000000000 --- a/branches/sca-android/samples/feed-aggregator/feed-aggregator.svg +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - - - - - - - FeedAggregator - Sort - - newFirst = true - - RssAggregator - - - - - AtomAggregator - - - Rss Sample - Atom Sample - - - - - - - - - - Engadget - BBC - Oreilly - Apache - - - RSS Atom - diff --git a/branches/sca-android/samples/feed-aggregator/pom.xml b/branches/sca-android/samples/feed-aggregator/pom.xml deleted file mode 100644 index 5e869ba608..0000000000 --- a/branches/sca-android/samples/feed-aggregator/pom.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../pom.xml - - sample-feed-aggregator - Apache Tuscany SCA Atom+RSS Feed Aggregator Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-rss-rome - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/feed-aggregator/src/main/java/feed/AggregatorImpl.java b/branches/sca-android/samples/feed-aggregator/src/main/java/feed/AggregatorImpl.java deleted file mode 100644 index 70e05b3bb3..0000000000 --- a/branches/sca-android/samples/feed-aggregator/src/main/java/feed/AggregatorImpl.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package feed; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.OutputStreamWriter; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import org.apache.abdera.Abdera; -import org.apache.abdera.factory.Factory; -import org.apache.abdera.model.Document; -import org.apache.abdera.model.Entry; -import org.apache.abdera.model.Feed; -import org.apache.abdera.model.Person; -import org.apache.abdera.parser.Parser; -import org.apache.tuscany.sca.binding.atom.collection.Collection; -import org.apache.tuscany.sca.binding.atom.collection.NotFoundException; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; - -import com.sun.syndication.feed.synd.SyndFeed; -import com.sun.syndication.io.SyndFeedOutput; - -/** - * Implementation of an SCA component that aggregates several - * Atom and RSS feeds. - * - * @version $Rev$ $Date$ - */ -public class AggregatorImpl implements org.apache.tuscany.sca.binding.atom.collection.Collection { - - @Reference(required = false) - public Collection atomFeed1; - @Reference(required = false) - public Collection atomFeed2; - - @Reference(required = false) - public org.apache.tuscany.sca.binding.rss.collection.Collection rssFeed1; - @Reference(required = false) - public org.apache.tuscany.sca.binding.rss.collection.Collection rssFeed2; - - @Reference(required = false) - public Sort sort; - - @Property - public String feedTitle = "Aggregated Feed"; - @Property - public String feedDescription = "Anonymous Aggregated Feed"; - @Property - public String feedAuthor = "anonymous"; - - public Feed getFeed() { - - // Create a new Feed - Factory factory = Abdera.getNewFactory(); - Feed feed = factory.newFeed(); - feed.setTitle(feedTitle); - feed.setSubtitle(feedDescription); - Person author = factory.newAuthor(); - author.setName(feedAuthor); - feed.addAuthor(author); - feed.addLink("http://tuscany.apache.org/", "alternate"); - - // Aggregate entries from atomFeed1, atomFeed2, rssFeed1 and rssFeed2 - List entries = new ArrayList(); - if (atomFeed1 != null) { - try { - entries.addAll(atomFeed1.getFeed().getEntries()); - } catch (Exception e) {} - } - if (atomFeed2 != null) { - try { - entries.addAll(atomFeed2.getFeed().getEntries()); - } catch (Exception e) {} - } - if (rssFeed1 != null) { - try { - entries.addAll(atomFeed(rssFeed1.getFeed()).getEntries()); - } catch (Exception e) {} - } - if (rssFeed2 != null) { - try { - entries.addAll(atomFeed(rssFeed2.getFeed()).getEntries()); - } catch (Exception e) {} - } - - // Sort entries by updated date - if (sort != null) { - entries = sort.sort(entries); - } - - // Add the entries to the new feed - // Also synthesize a feed id and updated field base on entries - Date feedUpdated = new Date( 0 ); - for (Entry entry: entries) { - Date entryUpdated = entry.getUpdated(); - if (( entryUpdated != null ) && ( entryUpdated.compareTo( feedUpdated ) > 0 )) { - feedUpdated = entryUpdated; - } - feed.addEntry(entry); - } - feed.setUpdated( feedUpdated ); - // Note that feed id should be permanent, immutable, and unique - // in order to support proper ETag creation. - // Tough to do when the feed is regenerated with each get. - feed.setId( "http://tuscany.apache.org/feed", true ); - - return feed; - } - - public Feed query(String queryString) { - Factory factory = Abdera.getNewFactory(); - Feed feed = factory.newFeed(); - feed.setTitle(feedTitle); - feed.setSubtitle(feedDescription); - Person author = factory.newAuthor(); - author.setName(feedAuthor); - feed.addAuthor(author); - feed.addLink("http://tuscany.apache.org", "alternate"); - - Feed allFeed = getFeed(); - if (queryString.startsWith("title=")) { - String title = queryString.substring(6); - - for (Entry entry: allFeed.getEntries()) { - if (entry.getTitle().contains(title)) { - feed.addEntry(entry); - } - } - } - return feed; - } - - public void delete(String id) throws NotFoundException { - } - - public Entry get(String id) throws NotFoundException { - return null; - } - - public Entry post(Entry entry) { - return null; - } - - public void put(String id, Entry entry) throws NotFoundException { - } - - /** - * Convert a ROME feed to an Abdera feed. - * - * @param romeFeed - * @return - */ - private static Feed atomFeed(SyndFeed syndFeed) { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - - syndFeed.setFeedType("atom_1.0"); - SyndFeedOutput syndOutput = new SyndFeedOutput(); - try { - syndOutput.output(syndFeed, new OutputStreamWriter(bos)); - } catch (Exception e) { - throw new RuntimeException(e); - } - Parser parser = Abdera.getNewParser(); - Document document = parser.parse(new ByteArrayInputStream(bos.toByteArray())); - - return document.getRoot(); - } -} diff --git a/branches/sca-android/samples/feed-aggregator/src/main/java/feed/Sort.java b/branches/sca-android/samples/feed-aggregator/src/main/java/feed/Sort.java deleted file mode 100644 index dec073c36b..0000000000 --- a/branches/sca-android/samples/feed-aggregator/src/main/java/feed/Sort.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package feed; - -import java.util.List; - -import org.apache.abdera.model.Entry; - -/** - * The Sort service business interface. - * - * @version $Rev$ $Date$ - */ -public interface Sort { - - /** - * Sort feed entries by published date. - * @param entries - * @return - */ - List sort(List entries); -} diff --git a/branches/sca-android/samples/feed-aggregator/src/main/java/feed/SortImpl.java b/branches/sca-android/samples/feed-aggregator/src/main/java/feed/SortImpl.java deleted file mode 100644 index f7ead126a7..0000000000 --- a/branches/sca-android/samples/feed-aggregator/src/main/java/feed/SortImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package feed; - -import java.util.Arrays; -import java.util.Comparator; -import java.util.Date; -import java.util.List; - -import org.apache.abdera.model.Entry; -import org.osoa.sca.annotations.Property; - -/** - * Implementation of a Feed Sort service component. - * - * @version $Rev$ $Date$ - */ -public class SortImpl implements Sort { - - @Property - public boolean newFirst = true; - - @SuppressWarnings("unchecked") - public List sort(List entries) { - Entry[] entriesArray = new Entry[entries.size()]; - entriesArray = (Entry[])entries.toArray(entriesArray); - Arrays.sort(entriesArray, new Comparator() { - public int compare(final Object xObj, final Object yObj) { - Date xDate = ((Entry)xObj).getUpdated(); - Date yDate = ((Entry)yObj).getUpdated(); - if (xDate == null) - return -1; - if (newFirst) - return yDate.compareTo(xDate); - else - return xDate.compareTo(yDate); - } - }); - return Arrays.asList(entriesArray); - } -} diff --git a/branches/sca-android/samples/feed-aggregator/src/main/java/launch/LaunchFeedServer.java b/branches/sca-android/samples/feed-aggregator/src/main/java/launch/LaunchFeedServer.java deleted file mode 100644 index 1c549f7cd2..0000000000 --- a/branches/sca-android/samples/feed-aggregator/src/main/java/launch/LaunchFeedServer.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -import java.io.IOException; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class LaunchFeedServer { - public static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("FeedAggregator.composite"); - - try { - System.out.println("Sample Feed server started (press enter to shutdown)"); - System.out.println(); - System.out.println("To read the aggregated feeds, point your Web browser to the following addresses:"); - System.out.println("http://localhost:8083/atomAggregator"); - System.out.println("http://localhost:8083/atomAggregator/atomsvc (for the Atom service document)"); - System.out.println("http://localhost:8083/rssAggregator"); - System.out.println(); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - - - scaDomain.close(); - System.out.println("Sample Feed server stopped"); - } -} diff --git a/branches/sca-android/samples/feed-aggregator/src/main/resources/FeedAggregator.composite b/branches/sca-android/samples/feed-aggregator/src/main/resources/FeedAggregator.composite deleted file mode 100644 index 8a3a53b4d5..0000000000 --- a/branches/sca-android/samples/feed-aggregator/src/main/resources/FeedAggregator.composite +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - RSS Aggregator Sample - - - - true - - - - - - - - - - - - Atom Aggregator Sample - - - diff --git a/branches/sca-android/samples/feed-aggregator/src/test/java/feed/FeedAggregatorTest.java b/branches/sca-android/samples/feed-aggregator/src/test/java/feed/FeedAggregatorTest.java deleted file mode 100644 index 9fdfe711be..0000000000 --- a/branches/sca-android/samples/feed-aggregator/src/test/java/feed/FeedAggregatorTest.java +++ /dev/null @@ -1,332 +0,0 @@ -package feed; - -import java.io.IOException; -import java.io.Reader; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.List; - -import junit.framework.Assert; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import org.apache.abdera.Abdera; -import org.apache.abdera.i18n.iri.IRI; -import org.apache.abdera.factory.Factory; -import org.apache.abdera.model.Base; -import org.apache.abdera.model.Content; -import org.apache.abdera.model.Entry; -import org.apache.abdera.model.Feed; -import org.apache.abdera.model.Document; -import org.apache.abdera.model.Collection; -import org.apache.abdera.protocol.Response.ResponseType; -import org.apache.abdera.protocol.client.AbderaClient; -import org.apache.abdera.protocol.client.ClientResponse; -import org.apache.abdera.protocol.client.RequestOptions; -import org.apache.abdera.util.EntityTag; -import org.apache.abdera.writer.Writer; -import org.apache.abdera.writer.WriterFactory; -import org.apache.abdera.parser.Parser; - -/** - * Tests use of server provided feed entity tags for Atom binding in Tuscany. - * Tests conditional gets (e.g. get if-none-match) or conditional posts (post if-match) - * using entity tags and last modified entries in headers. - * Uses the SCA provided Provider composite to act as a server. - * Uses the Abdera provided Client to act as a client. - */ -public class FeedAggregatorTest { - public final static String providerURI = "http://localhost:8083/atomAggregator"; - protected static SCADomain scaProviderDomain; - protected static Abdera abdera; - protected static AbderaClient client; - protected static Parser abderaParser; - protected static String eTag; - protected static Date lastModified; - protected static long contentLength; - protected static int numberEntries; - protected static final SimpleDateFormat dateFormat = new SimpleDateFormat( "EEE, dd MMM yyyy HH:mm:ss Z" ); // RFC 822 date time - - @BeforeClass - public static void init() throws Exception { - try { - System.out.println(">>>FeedAggregatorTest.init"); - scaProviderDomain = SCADomain.newInstance("FeedAggregator.composite"); - abdera = new Abdera(); - client = new AbderaClient(abdera); - abderaParser = Abdera.getNewParser(); - } catch ( Throwable e ) { - System.out.println( e ); - e.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - System.out.println(">>>FeedAggregatorTest.destroy"); - scaProviderDomain.close(); - } - - @Test - public void testPrelim() throws Exception { - Assert.assertNotNull(scaProviderDomain); - Assert.assertNotNull( client ); - } - - @Test - public void testFeedBasics() throws Exception { - System.out.println(">>>FeedAggregatorTest.testFeedBasics"); - RequestOptions opts = new RequestOptions(); - // Normal feed request - ClientResponse res = client.get(providerURI, opts); - Assert.assertNotNull(res); - try { - // Asser feed provided since no predicates - Assert.assertEquals(200, res.getStatus()); - Assert.assertEquals(ResponseType.SUCCESS, res.getType()); - // AtomTestCaseUtils.printResponseHeaders( "Feed response headers:", " ", res ); - - // Perform other tests on feed. - contentLength = getContentLength( res ); - System.out.println( "FeedAggregatorTest.testFeedBasics full contentLength=" + contentLength ); - - Document doc = res.getDocument(); - Assert.assertNotNull( doc ); - Feed feed = doc.getRoot(); - Assert.assertNotNull( feed ); - - // printFeed( "Feed values", " ", feed ); - // RFC 4287 requires non-null id, title, updated elements - Assert.assertNotNull( feed.getId() ); - Assert.assertNotNull( feed.getTitle() ); - Assert.assertNotNull( feed.getUpdated() ); - - eTag = res.getHeader("ETag"); - Assert.assertNotNull( eTag ); - lastModified = res.getLastModified(); - Assert.assertNotNull( lastModified ); - - numberEntries = getEntryCount( feed ); - System.out.println( "FeedAggregatorTest.testFeedBasics number entries=" + numberEntries ); - - // printFeed( "Aggregated Feed Contents:", " ", feed ); - // System.out.println( "FeedAggregatorTest.testFeedBasics feed=" + feed ); - // printResponseHeaders( "Aggregated Feed response headers:", " ", res ); - // System.out.println("Aggregated Feed response body:"); - // prettyPrint(abdera, res.getDocument()); - // printEntryUpdates( "Aggregated Feed feed updates", " ", feed ); - } finally { - res.release(); - } - } - - @Test - public void testUnmodifiedGetIfModified() throws Exception { - System.out.println(">>>FeedAggregatorTest.testFeedUnmodifiedGetIfModified"); - // Feed request with predicates - RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml"; - opts.setContentType(contentType); - opts.setHeader( "If-Modified-Since", dateFormat.format( new Date( 0 ) )); - - ClientResponse res = client.get(providerURI, opts); - Assert.assertNotNull(res); - try { - // Should return 200 - Feed provided since feed is changed. - Assert.assertEquals(200, res.getStatus()); - Assert.assertEquals(ResponseType.SUCCESS, res.getType()); - - String thisETag = res.getHeader("ETag"); - Assert.assertNotNull( thisETag ); - Date thisLastModified = res.getLastModified(); - Assert.assertNotNull( thisLastModified ); - - // Entry count and body size should be equal to basic request - long thisContentLength = getContentLength( res ); - - Document doc = res.getDocument(); - Assert.assertNotNull( doc ); - Feed feed = doc.getRoot(); - Assert.assertNotNull( feed ); - int thisNumberEntries = getEntryCount( feed ); - // System.out.println( "FeedAggregatorTest.UnmodifiedGetIfModified number entries=" + numberEntries + ", this number entries=" + thisNumberEntries ) ; - } finally { - res.release(); - } - } - - @Test - public void testUnmodifiedGetIfUnModified() throws Exception { - System.out.println(">>>FeedAggregatorTest.testFeedUnmodifiedGetIfUnModified"); - // Feed request with predicates - RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml"; - opts.setContentType(contentType); - opts.setHeader( "If-Unmodified-Since", dateFormat.format( new Date( 0 ) )); - - ClientResponse res = client.get(providerURI, opts); - Assert.assertNotNull(res); - try { - // Should return 304 - Feed not provided since feed is modified since. - Assert.assertEquals(304, res.getStatus()); - - // Entry count and body size should be equal to basic request - long thisContentLength = getContentLength( res ); - System.out.println( "FeedAggregatorTest.UnModifiedGetIfUnModified saved " + (contentLength - thisContentLength) + " bytes of network traffic due to caching."); - } finally { - res.release(); - } - } - - /** Print feed vital fields. */ - public static void printFeed( String title, String indent, Feed feed ) { - if ( feed == null ) { - System.out.println( title + " feed is null"); - return; - } - - System.out.println( title ); - System.out.println( indent + "id=" + feed.getId() ); - System.out.println( indent + "title=" + feed.getTitle() ); - System.out.println( indent + "updated=" + feed.getUpdated() ); - System.out.println( indent + "author=" + feed.getAuthor() ); - System.out.println( indent + "self link=" + feed.getSelfLink() ); - Collection collection = feed.getCollection(); - if ( collection == null ) { - System.out.println( indent + "collection=null" ); - } else { - System.out.println( indent + "collection=" + collection ); - } - } - - /* Print headers of request. */ - public static void printRequestHeaders( String title, String indent, RequestOptions request ) { - System.out.println( title ); - if ( request == null ) { - System.out.println( indent + " request is null"); - return; - } - String [] headerNames = request.getHeaderNames(); - for ( String headerName: headerNames) { - String header = request.getHeader(headerName); - System.out.println( indent + " header name,value=" + headerName + "," + header ); - } - } - - /* Print headers of response. */ - public static void printResponseHeaders( String title, String indent, ClientResponse response ) { - System.out.println( title ); - if ( response == null ) { - System.out.println( indent + " response is null"); - return; - } - String [] headerNames = response.getHeaderNames(); - for ( String headerName: headerNames) { - String header = response.getHeader(headerName); - System.out.println( indent + " header name,value=" + headerName + "," + header ); - } - - } - - /** Pretty print the document body. */ - public static void prettyPrint(Abdera abdera, Base doc) throws IOException { - WriterFactory factory = abdera.getWriterFactory(); - Writer writer = factory.getWriter("prettyxml"); - writer.writeTo(doc, System.out); - System.out.println(); - } - - /** Print the updated elements of the feed entries. */ - public static void printEntryUpdates( String title, String indent, Feed feed ) { - if ( feed == null ) { - System.out.println( title + " feed is null"); - return; - } - - System.out.println( title ); - List entries = feed.getEntries(); - if ( entries == null ) { - System.out.println( indent + " null entries"); - } - System.out.println( indent + "entries size=" + entries.size()); - - int i = 0; - for ( Entry entry: entries ) { - String entryTitle = entry.getTitle(); - if (( entryTitle != null ) && ( entryTitle.length() > 20 )) - entryTitle = entryTitle.substring( 0, 20 ); - // System.out.println( indent + i++ + ": title=\"" + entryTitle + - // "\", updated=" + entry.getUpdated() + ", published=" + entry.getPublished() ); - System.out.println( indent + i++ + ": title=\"" + entryTitle + - "\", updated=" + entry.getUpdated() ); - } - } - - /** Get the length of the response body content. */ - public static long getContentLength( ClientResponse response ) { - // getContentLenght returns -1 - // contentLength = response.getContentLength(); - try { - Reader reader = response.getReader(); - long actualSkip = reader.skip( Long.MAX_VALUE ); - return actualSkip; - } catch ( IOException e ) { - } - return -1L; - } - - /** Get a count of entries in the feed. */ - public static int getEntryCount( Feed feed ) { - if ( feed == null ) { - return 0; - } - - List entries = feed.getEntries(); - if ( entries == null ) { - return 0; - } - return entries.size(); - } - - /** Given a feed, determine the median point of the entries. - * Use the updated field of the entries to determine median. - * @param feed - * @return - */ - public static Date getUpdatedMedian( Feed feed ) { - Date sentinal = null; - if ( feed == null ) { - return sentinal; - } - - List entries = feed.getEntries(); - if ( entries == null ) { - return sentinal; - } - int size = entries.size(); - if( size == 0 ) { - return sentinal; - } - // System.out.println( "getUpdatedMedian entries size=" + entries.size()); - ArrayList updates = new ArrayList( size ); - - for ( Entry entry: entries ) { - Date entryUpdated = entry.getUpdated(); - if ( entryUpdated == null ) { - entryUpdated = new Date( 0 ); - } - updates.add( entryUpdated ); - } - Collections.sort( updates ); - // System.out.println( "getUpdatedMedian entry min update=" + updates.get( 0 )); - // System.out.println( "getUpdatedMedian entry max update=" + updates.get( size - 1 )); - Date median = updates.get( size/2 ); - // System.out.println( "getUpdatedMedian entry max median=" + median ); - return median; - } -} diff --git a/branches/sca-android/samples/helloworld-bpel-ws/README b/branches/sca-android/samples/helloworld-bpel-ws/README deleted file mode 100644 index 5c669f5da5..0000000000 --- a/branches/sca-android/samples/helloworld-bpel-ws/README +++ /dev/null @@ -1,151 +0,0 @@ -Hello World BPEL Webservices Sample -====================================== -This sample demonstrates an SCA service implemented by a BPEL process, made available as a Web service. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory, and do - -ant compile run - -OR if you don't have ant, on Windows do - -mkdir target\classes -mkdir target\wsdl2java-source -java -cp ..\..\lib\tuscany-sca-manifest.jar org.apache.tuscany.sdo.generate.XSD2JavaGenerator -targetDirectory target/wsdl2java-source -prefix HelloWorld -noContainment -noUnsettable src/main/resources/helloworld.wsdl -java -cp ..\..\lib\tuscany-sca-manifest.jar org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator -targetDirectory target/wsdl2java-source src/main/resources/helloworld.wsdl -unzip ..\..\lib\ode-dao-jpa-ojpa-derby-1.1.zip -d target\database -javac -d target\classes -cp target\classes;..\..\lib\tuscany-sca-manifest.jar -sourcepath src\main\java;target\wsdl2java-source -target 1.5 -g -source 1.5 src\main\java\helloworld\BPELClient.java -copy src\main\resources\* target\classes -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\classes;target\database helloworld.BPELClient - -and on *nix do - -mkdir target/classes -mkdir target/wsdl2java-source -java -cp ../../lib/tuscany-sca-manifest.jar org.apache.tuscany.sdo.generate.XSD2JavaGenerator -targetDirectory target/wsdl2java-source -prefix HelloWorld -noContainment -noUnsettable src/main/resources/helloworld.wsdl -java -cp ../../lib/tuscany-sca-manifest.jar org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator -targetDirectory target/wsdl2java-source src/main/resources/helloworld.wsdl -unzip ../../lib/ode-dao-jpa-ojpa-derby-1.1.zip -d target/database -javac -d target/classes -cp target/classes;../../lib/tuscany-sca-manifest.jar -sourcepath src/main/java;target/wsdl2java-source -target 1.5 -g -source 1.5 src/main/java/helloworld/BPELClient.java -cp src/main/resources/* target/classes -java -cp ../../lib/tuscany-sca-manifest.jar:target/classes:target/database helloworld.BPELClient - -The sample will start an embedded BPEL engine, deploy a process and invoke it. - -Sample Overview ---------------- -The sample provides a single component that is wired to a service with a -web service binding. - -helloworld-bpel/ - src/ - main/ - java/ - helloworld/ - BPELClient.java - client application for - BEPELHelloWorldComponent - - resources/ - deploy.xml - ODE deployment descriptor - helloworld.bpel - helloworld bpel process - helloworld.componentType - helloworld bpel service description - helloworld.composite - the SCA assembly for this sample - helloworld.wsdl - the service description that describes - the bpel process - log4j.properties - logging configuration - - test/ - java/ - helloworld/ - BPELHelloWorldTestCase.java - JUnit test case - helloworld-bpel.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ - -With the binary distribution the sample can be built and run using Ant as -follows - -cd helloworld-bpel -ant compile -ant run - - -You should see the following output from the run target. - -run: - [java] Starting BPELHelloWorldComponent - [java] >>> Deploying : D:\temp\SCA1.1-RC1\tuscany-sca-1.1-incubating\samples\helloworld-bpel\target\classes - [java] ::arg:::::: - [java] Hello - [java] ::message:: - [java] Hello - [java] Status: RESPONSE - [java] Response: - [java] Hello World - [java] Hello World - [java] Stopping BPELHelloWorldComponent - [java] Stopped !!! - -BUILD SUCCESSFUL -Total time: 36 seconds - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. When using Maven, a simple test is present that exercise -the same logic as the client to invoke the BPEl process. - -cd helloworld-bpel -mvn - -You should see the following output from the test phase. - -- - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running helloworld.BPELHelloWorldTestCase -Starting BPELHelloWorldComponent ->>> Deploying : D:\dev\Opensource\Apache\Tuscany\source\java-sca-1.1\samples\helloworld-bpel\target\classes -::arg:::::: -Hello -::message:: -Hello -Status: RESPONSE -Response: -Hello World -Stopping BPELHelloWorldComponent -Stopped !!! -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.656 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -[INFO] [jar:jar] -[INFO] Building jar: D:\dev\Opensource\Apache\Tuscany\source\java-sca-1.1\samples\helloworld-bpel\target\sample-helloworld-bpel.jar -[INFO] [install:install] -[INFO] Installing D:\dev\Opensource\Apache\Tuscany\source\java-sca-1.1\samples\helloworld-bpel\target\sample-helloworld-bpel.jar to C:\Documents and Settings\lresend -e\.m2\repository\org\apache\tuscany\sca\sample-helloworld-bpel\1.1-incubating-SNAPSHOT\sample-helloworld-bpel-1.1-incubating-SNAPSHOT.jar -[INFO] ------------------------------------------------------------------------ -[INFO] BUILD SUCCESSFUL -[INFO] ------------------------------------------------------------------------ -[INFO] Total time: 53 seconds -[INFO] Finished at: Sun Jan 13 09:54:39 PST 2008 -[INFO] Final Memory: 24M/43M -[INFO] ------------------------------------------------------------------------ - - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/helloworld-bpel-ws/build.xml b/branches/sca-android/samples/helloworld-bpel-ws/build.xml deleted file mode 100644 index c8917007f1..0000000000 --- a/branches/sca-android/samples/helloworld-bpel-ws/build.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-bpel-ws/helloworld-bpel.png b/branches/sca-android/samples/helloworld-bpel-ws/helloworld-bpel.png deleted file mode 100644 index 5f53a3c5d1..0000000000 Binary files a/branches/sca-android/samples/helloworld-bpel-ws/helloworld-bpel.png and /dev/null differ diff --git a/branches/sca-android/samples/helloworld-bpel-ws/helloworld-bpel.svg b/branches/sca-android/samples/helloworld-bpel-ws/helloworld-bpel.svg deleted file mode 100644 index 5a98f1a07c..0000000000 --- a/branches/sca-android/samples/helloworld-bpel-ws/helloworld-bpel.svg +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldws - - HelloWorldServiceComponent - - HelloWorldWebService - - implementation.bpel helloworld.bpel - - diff --git a/branches/sca-android/samples/helloworld-bpel-ws/pom.xml b/branches/sca-android/samples/helloworld-bpel-ws/pom.xml deleted file mode 100644 index c20ade8d82..0000000000 --- a/branches/sca-android/samples/helloworld-bpel-ws/pom.xml +++ /dev/null @@ -1,205 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-helloworld-bpel-ws - Apache Tuscany SCA HelloWorld BPEL as Webservice Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-bpel-ode - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sdo - tuscany-sdo-impl - 1.1-incubating - - - - xerces - xercesImpl - 2.8.1 - - - - junit - junit - 4.2 - test - - - - org.apache.tuscany.sca - tuscany-wsdl2java - 1.4-SNAPSHOT - - - - org.apache.tuscany.sdo - tuscany-sdo-tools - 1.1-incubating - - - - org.codehaus.woodstox - wstx-asl - 3.2.1 - runtime - - - - com.sun.xml.bind - jaxb-impl - 2.1.7 - compile - - - javax.xml.stream - stax-api - - - - - - - - ${artifactId} - - - org.apache.maven.plugins - maven-surefire-plugin - - 2.3.1 - - false - false - true - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack - test-compile - - unpack - - - - - org.apache.ode - ode-dao-jpa-ojpa-derby - 1.1 - zip - true - ${project.build.directory}/test-classes/ - - - - - - - - org.apache.tuscany.sdo - tuscany-sdo-plugin - 1.1-incubating - - - generate-bpel-helloworld - generate-sources - - ${basedir}/src/main/resources/helloworld.wsdl - ${basedir}/target/wsdl2java-source - HelloWorld - true - true - true - - - generate - - - - - - org.apache.tuscany.sca - tuscany-maven-wsdl2java - 1.4-SNAPSHOT - - - - ${basedir}/src/main/resources/helloworld.wsdl - - - generate - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-bpel-ws/src/main/java/helloworld/BPELClient.java b/branches/sca-android/samples/helloworld-bpel-ws/src/main/java/helloworld/BPELClient.java deleted file mode 100644 index 971a5373e9..0000000000 --- a/branches/sca-android/samples/helloworld-bpel-ws/src/main/java/helloworld/BPELClient.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package helloworld; - -import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType; -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Simple BPEL sample application invoking a helloworld - * - * @version $Rev: 613905 $ $Date: 2008-01-21 14:41:15 +0000 (Mon, 21 Jan 2008) $ - */ -public class BPELClient { - public static void main(String[] args) throws Exception { - - SCADomain scaDomain = SCADomain.newInstance("helloworld.composite"); - HelloPortType bpelService = scaDomain.getService(HelloPortType.class, "BPELHelloWorldComponent"); - - String result = bpelService.hello("Hello"); - System.out.println(result); - - scaDomain.close(); - - System.exit(0); - } -} diff --git a/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/deploy.xml b/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/deploy.xml deleted file mode 100644 index d9d4363832..0000000000 --- a/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/deploy.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - true - - - - - diff --git a/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/helloworld.bpel b/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/helloworld.bpel deleted file mode 100644 index a88aa7960c..0000000000 --- a/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/helloworld.bpel +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - concat($tmpVar,' World') - - - - - - diff --git a/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/helloworld.componentType b/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/helloworld.componentType deleted file mode 100644 index 70273245d7..0000000000 --- a/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/helloworld.componentType +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/helloworld.composite b/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/helloworld.composite deleted file mode 100644 index 97262109e6..0000000000 --- a/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/helloworld.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/helloworld.wsdl b/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/helloworld.wsdl deleted file mode 100644 index 1cb338b283..0000000000 --- a/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/helloworld.wsdl +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/log4j.properties b/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/log4j.properties deleted file mode 100644 index c1bc0a0b81..0000000000 --- a/branches/sca-android/samples/helloworld-bpel-ws/src/main/resources/log4j.properties +++ /dev/null @@ -1,35 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Set root logger level to WARN and its only appender to CONSOLE -log4j.rootLogger=OFF, CONSOLE - -# log4j properties to work with commandline tools. -log4j.category.org.mortbay=OFF -log4j.category.org.hibernate.type=OFF -log4j.category.org.objectweb=OFF -log4j.category.org.apache.ode.sql=OFF -log4j.category.org.apache.ode.axis2=OFF -log4j.category.org.apache.ode.bpel.engine=OFF -log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF -log4j.category.org.apache.ode.bpel.epr=OFF -log4j.category.org.apache.openjpa.kernel=OFF - -# Console appender -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=%p - %C{1}.%M(%L) | %m%n \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-bpel-ws/src/test/java/helloworld/BPELHelloWorldTestCase.java b/branches/sca-android/samples/helloworld-bpel-ws/src/test/java/helloworld/BPELHelloWorldTestCase.java deleted file mode 100644 index 6ad63f87d9..0000000000 --- a/branches/sca-android/samples/helloworld-bpel-ws/src/test/java/helloworld/BPELHelloWorldTestCase.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package helloworld; - -import junit.framework.TestCase; - -import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType; -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Tests the BPEL service - * - * @version $Rev: 636807 $ $Date: 2008-03-13 17:32:45 +0000 (Thu, 13 Mar 2008) $ - */ -public class BPELHelloWorldTestCase extends TestCase { - - private SCADomain scaDomain; - HelloPortType bpelService = null; - - /** - * @throws java.lang.Exception - */ - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("helloworld.composite"); - bpelService = scaDomain.getService(HelloPortType.class, "BPELHelloWorldComponent"); - - } - - /** - * @throws java.lang.Exception - */ - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testInvoke() throws Exception { - String response = bpelService.hello("Hello"); - assertEquals("Hello World", response); - } -} diff --git a/branches/sca-android/samples/helloworld-bpel/README b/branches/sca-android/samples/helloworld-bpel/README deleted file mode 100644 index bf5f500ef3..0000000000 --- a/branches/sca-android/samples/helloworld-bpel/README +++ /dev/null @@ -1,151 +0,0 @@ -Hello World BPEL Sample -====================================== -This sample demonstrates an SCA service implemented by a BPEL process. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory, and do - -ant compile run - -OR if you don't have ant, on Windows do - -mkdir target\classes -mkdir target\wsdl2java-source -java -cp ..\..\lib\tuscany-sca-manifest.jar org.apache.tuscany.sdo.generate.XSD2JavaGenerator -targetDirectory target/wsdl2java-source -prefix HelloWorld -noContainment -noUnsettable src/main/resources/helloworld.wsdl -java -cp ..\..\lib\tuscany-sca-manifest.jar org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator -targetDirectory target/wsdl2java-source src/main/resources/helloworld.wsdl -unzip ..\..\lib\ode-dao-jpa-ojpa-derby-1.1.zip -d target\database -javac -d target\classes -cp target\classes;..\..\lib\tuscany-sca-manifest.jar -sourcepath src\main\java;target\wsdl2java-source -target 1.5 -g -source 1.5 src\main\java\helloworld\BPELClient.java -copy src\main\resources\* target\classes -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\classes;target\database helloworld.BPELClient - -and on *nix do - -mkdir target/classes -mkdir target/wsdl2java-source -java -cp ../../lib/tuscany-sca-manifest.jar org.apache.tuscany.sdo.generate.XSD2JavaGenerator -targetDirectory target/wsdl2java-source -prefix HelloWorld -noContainment -noUnsettable src/main/resources/helloworld.wsdl -java -cp ../../lib/tuscany-sca-manifest.jar org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator -targetDirectory target/wsdl2java-source src/main/resources/helloworld.wsdl -unzip ../../lib/ode-dao-jpa-ojpa-derby-1.1.zip -d target/database -javac -d target/classes -cp target/classes;../../lib/tuscany-sca-manifest.jar -sourcepath src/main/java;target/wsdl2java-source -target 1.5 -g -source 1.5 src/main/java/helloworld/BPELClient.java -cp src/main/resources/* target/classes -java -cp ../../lib/tuscany-sca-manifest.jar:target/classes:target/database helloworld.BPELClient - -The sample will start an embedded BPEL engine, deploy a process and invoke it. - -Sample Overview ---------------- -The sample provides a single component that is wired to a service with a -web service binding. - -helloworld-bpel/ - src/ - main/ - java/ - helloworld/ - BPELClient.java - client application for - BEPELHelloWorldComponent - - resources/ - deploy.xml - ODE deployment descriptor - helloworld.bpel - helloworld bpel process - helloworld.componentType - helloworld bpel service description - helloworld.composite - the SCA assembly for this sample - helloworld.wsdl - the service description that describes - the bpel process - log4j.properties - logging configuration - - test/ - java/ - helloworld/ - BPELHelloWorldTestCase.java - JUnit test case - helloworld-bpel.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ - -With the binary distribution the sample can be built and run using Ant as -follows - -cd helloworld-bpel -ant compile -ant run - - -You should see the following output from the run target. - -run: - [java] Starting BPELHelloWorldComponent - [java] >>> Deploying : D:\temp\SCA1.1-RC1\tuscany-sca-1.1-incubating\samples\helloworld-bpel\target\classes - [java] ::arg:::::: - [java] Hello - [java] ::message:: - [java] Hello - [java] Status: RESPONSE - [java] Response: - [java] Hello World - [java] Hello World - [java] Stopping BPELHelloWorldComponent - [java] Stopped !!! - -BUILD SUCCESSFUL -Total time: 36 seconds - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. When using Maven, a simple test is present that exercise -the same logic as the client to invoke the BPEl process. - -cd helloworld-bpel -mvn - -You should see the following output from the test phase. - -- - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running helloworld.BPELHelloWorldTestCase -Starting BPELHelloWorldComponent ->>> Deploying : D:\dev\Opensource\Apache\Tuscany\source\java-sca-1.1\samples\helloworld-bpel\target\classes -::arg:::::: -Hello -::message:: -Hello -Status: RESPONSE -Response: -Hello World -Stopping BPELHelloWorldComponent -Stopped !!! -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.656 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -[INFO] [jar:jar] -[INFO] Building jar: D:\dev\Opensource\Apache\Tuscany\source\java-sca-1.1\samples\helloworld-bpel\target\sample-helloworld-bpel.jar -[INFO] [install:install] -[INFO] Installing D:\dev\Opensource\Apache\Tuscany\source\java-sca-1.1\samples\helloworld-bpel\target\sample-helloworld-bpel.jar to C:\Documents and Settings\lresend -e\.m2\repository\org\apache\tuscany\sca\sample-helloworld-bpel\1.1-incubating-SNAPSHOT\sample-helloworld-bpel-1.1-incubating-SNAPSHOT.jar -[INFO] ------------------------------------------------------------------------ -[INFO] BUILD SUCCESSFUL -[INFO] ------------------------------------------------------------------------ -[INFO] Total time: 53 seconds -[INFO] Finished at: Sun Jan 13 09:54:39 PST 2008 -[INFO] Final Memory: 24M/43M -[INFO] ------------------------------------------------------------------------ - - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/helloworld-bpel/build.xml b/branches/sca-android/samples/helloworld-bpel/build.xml deleted file mode 100644 index 890a6427b8..0000000000 --- a/branches/sca-android/samples/helloworld-bpel/build.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-bpel/helloworld-bpel.png b/branches/sca-android/samples/helloworld-bpel/helloworld-bpel.png deleted file mode 100644 index 5f53a3c5d1..0000000000 Binary files a/branches/sca-android/samples/helloworld-bpel/helloworld-bpel.png and /dev/null differ diff --git a/branches/sca-android/samples/helloworld-bpel/helloworld-bpel.svg b/branches/sca-android/samples/helloworld-bpel/helloworld-bpel.svg deleted file mode 100644 index 5a98f1a07c..0000000000 --- a/branches/sca-android/samples/helloworld-bpel/helloworld-bpel.svg +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldws - - HelloWorldServiceComponent - - HelloWorldWebService - - implementation.bpel helloworld.bpel - - diff --git a/branches/sca-android/samples/helloworld-bpel/pom.xml b/branches/sca-android/samples/helloworld-bpel/pom.xml deleted file mode 100644 index e606edb2e5..0000000000 --- a/branches/sca-android/samples/helloworld-bpel/pom.xml +++ /dev/null @@ -1,198 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-helloworld-bpel - Apache Tuscany SCA HelloWorld BPEL Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-bpel-ode - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sdo - tuscany-sdo-impl - 1.1.1 - - - - xerces - xercesImpl - 2.8.1 - - - - junit - junit - 4.2 - test - - - - org.apache.tuscany.sca - tuscany-wsdl2java - 1.4-SNAPSHOT - - - - org.apache.tuscany.sdo - tuscany-sdo-tools - 1.1.1 - - - - org.codehaus.woodstox - wstx-asl - 3.2.1 - runtime - - - - javax.xml.bind - jaxb-api - 2.1 - compile - - - javax.xml.stream - stax-api - - - - - - com.sun.xml.bind - jaxb-impl - 2.1.7 - runtime - - - - - - ${artifactId} - - - org.apache.maven.plugins - maven-surefire-plugin - - 2.3.1 - - false - false - true - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack - test-compile - - unpack - - - - - org.apache.ode - ode-dao-jpa-ojpa-derby - 1.1 - zip - true - ${project.build.directory}/test-classes/ - - - - - - - - org.apache.tuscany.sdo - tuscany-sdo-plugin - 1.1.1 - - - generate-bpel-helloworld - generate-sources - - ${basedir}/src/main/resources/helloworld.wsdl - ${basedir}/target/wsdl2java-source - HelloWorld - true - true - true - - - generate - - - - - - org.apache.tuscany.sca - tuscany-maven-wsdl2java - 1.4-SNAPSHOT - - - - ${basedir}/src/main/resources/helloworld.wsdl - - - generate - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-bpel/src/main/java/helloworld/BPELClient.java b/branches/sca-android/samples/helloworld-bpel/src/main/java/helloworld/BPELClient.java deleted file mode 100644 index 1826c885c4..0000000000 --- a/branches/sca-android/samples/helloworld-bpel/src/main/java/helloworld/BPELClient.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package helloworld; - -import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType; -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Simple BPEL sample application invoking a helloworld - * - * @version $Rev$ $Date$ - */ -public class BPELClient { - public static void main(String[] args) throws Exception { - - SCADomain scaDomain = SCADomain.newInstance("helloworld.composite"); - HelloPortType bpelService = scaDomain.getService(HelloPortType.class, "BPELHelloWorldComponent"); - - String result = bpelService.hello("Hello"); - System.out.println(result); - - scaDomain.close(); - - System.exit(0); - } -} diff --git a/branches/sca-android/samples/helloworld-bpel/src/main/resources/deploy.xml b/branches/sca-android/samples/helloworld-bpel/src/main/resources/deploy.xml deleted file mode 100644 index 9bd95b2c58..0000000000 --- a/branches/sca-android/samples/helloworld-bpel/src/main/resources/deploy.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - true - - - - - diff --git a/branches/sca-android/samples/helloworld-bpel/src/main/resources/helloworld.bpel b/branches/sca-android/samples/helloworld-bpel/src/main/resources/helloworld.bpel deleted file mode 100644 index a88aa7960c..0000000000 --- a/branches/sca-android/samples/helloworld-bpel/src/main/resources/helloworld.bpel +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - concat($tmpVar,' World') - - - - - - diff --git a/branches/sca-android/samples/helloworld-bpel/src/main/resources/helloworld.componentType b/branches/sca-android/samples/helloworld-bpel/src/main/resources/helloworld.componentType deleted file mode 100644 index 2b360111cb..0000000000 --- a/branches/sca-android/samples/helloworld-bpel/src/main/resources/helloworld.componentType +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-bpel/src/main/resources/helloworld.composite b/branches/sca-android/samples/helloworld-bpel/src/main/resources/helloworld.composite deleted file mode 100644 index b4623b5c2d..0000000000 --- a/branches/sca-android/samples/helloworld-bpel/src/main/resources/helloworld.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-bpel/src/main/resources/helloworld.wsdl b/branches/sca-android/samples/helloworld-bpel/src/main/resources/helloworld.wsdl deleted file mode 100644 index 46cf381577..0000000000 --- a/branches/sca-android/samples/helloworld-bpel/src/main/resources/helloworld.wsdl +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-bpel/src/main/resources/log4j.properties b/branches/sca-android/samples/helloworld-bpel/src/main/resources/log4j.properties deleted file mode 100644 index 8649a71550..0000000000 --- a/branches/sca-android/samples/helloworld-bpel/src/main/resources/log4j.properties +++ /dev/null @@ -1,35 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Set root logger level to WARN and its only appender to CONSOLE -log4j.rootLogger=OFF, CONSOLE - -# log4j properties to work with commandline tools. -log4j.category.org.mortbay=OFF -log4j.category.org.hibernate.type=OFF -log4j.category.org.objectweb=OFF -log4j.category.org.apache.ode.sql=OFF -log4j.category.org.apache.ode.axis2=OFF -log4j.category.org.apache.ode.bpel.engine=OFF -log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF -log4j.category.org.apache.ode.bpel.epr=OFF -log4j.category.org.apache.openjpa.kernel=OFF - -# Console appender -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=%p - %C{1}.%M(%L) | %m%n \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java b/branches/sca-android/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java deleted file mode 100644 index 1caaa78878..0000000000 --- a/branches/sca-android/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package helloworld; - -import junit.framework.TestCase; - -import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType; -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Tests the BPEL service - * - * @version $Rev$ $Date$ - */ -public class BPELHelloWorldTestCase extends TestCase { - - private SCADomain scaDomain; - HelloPortType bpelService = null; - - /** - * @throws java.lang.Exception - */ - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("helloworld.composite"); - bpelService = scaDomain.getService(HelloPortType.class, "BPELHelloWorldComponent"); - - } - - /** - * @throws java.lang.Exception - */ - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testInvoke() throws Exception { - String response = bpelService.hello("Hello"); - assertEquals("Hello World", response); - } -} diff --git a/branches/sca-android/samples/helloworld-dojo-webapp/README b/branches/sca-android/samples/helloworld-dojo-webapp/README deleted file mode 100644 index 38392a13b6..0000000000 --- a/branches/sca-android/samples/helloworld-dojo-webapp/README +++ /dev/null @@ -1,104 +0,0 @@ -Hello World Dojo RPC Sample -=========================== - -Note. This sample is currently not working correctly on WebSphere - see TUSCANY-1990 - -This sample demostrates the SCA JSONRPC binding using a simple web app that -uses the RPC support of the Dojo Toolkit to an SCA service. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -As this sample provides a web app there is a manual step where the WAR file -that contains the sample is copied to your web app container. If you just want -to give this sample a go deploy the WAR file (target/sample-helloworld-dojo-webapp.war) -to you web application server. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-helloworld-dojo-webapp - -The port and hostname will of course vary depending on your local installation. - -See also the similar helloworld-jsonrpc-webapp sample which also uses the SCA JSONRPC binding -but uses SCA scaDomain.js script on the client instead of the Dojo Toolkit. - -Sample Overview ---------------- -The sample provides a single service with an operation that reflects -a greeting back to the caller. The service is exposed using the JSONRPC -binding. The web app provided shows how the Dojo Toolkit JSON-RPC support can be -used to invoke the SCA service. - -The web app provided shows how the service can be called by using the DOJO toolkit. - -helloworld-dojo-webapp/ - build-dojo.xml - This file is an Ant script used by the - sample build process to download the Dojo Toolkit - and get it included in the WAR file - for use by the sample. - src/ - main/ - java/ - helloworldjsonrpc/ - HelloWorldService.java - service interface - HelloWorldServiceImpl.java - service implementation - resources/ - jsonrpc.composite - the SCA assembly for this sample - webapp - dojo/ - the Dojo toolkit (this directory is created only - when you build the samples from the source distribution) - META-INF/ - sca-contribution.xml - specifies the composite to be deployed - WEB-INF/ - web.xml - defines the listener that starts up the - Tuscany SCA runtime - HelloWorldJSONRPC.html - the web application that calls the - SCA service via JSONRPC - style.css - style sheet - - helloworld-jsonrpc-webapp.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file that unpacks the - dojo installation - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built using Ant as -follows - -cd helloworld-dojo-webapp -ant package - -This should result in a war file (sample-helloworld-dojo-webapp.war) in the target -directory. Copy this war file to your web app deployment directory in your -web app container. - -The process for getting the web app running will depend on which web app container -you are using. For example, if you are using Tomcat then it is simply a matter -of copying the WAR file to the webapps directory. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-helloworld-dojo-webapp - -The port and hostname will of course vary depending on your local installation. - -You should see a web page that allows you to send messages, via JSONRPC, to the -application running in the Tuscany SCA Runtime - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd helloworld-dojo-webapp -mvn - -Again this should result in a war file (sample-helloworld-dojo-webapp.war) in the target -directory. Follow the steps described in the previous section for running the web -app and for the expected results. - - diff --git a/branches/sca-android/samples/helloworld-dojo-webapp/build-dojo.xml b/branches/sca-android/samples/helloworld-dojo-webapp/build-dojo.xml deleted file mode 100644 index 534a1dacd9..0000000000 --- a/branches/sca-android/samples/helloworld-dojo-webapp/build-dojo.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-dojo-webapp/build.xml b/branches/sca-android/samples/helloworld-dojo-webapp/build.xml deleted file mode 100644 index 95813af65a..0000000000 --- a/branches/sca-android/samples/helloworld-dojo-webapp/build.xml +++ /dev/null @@ -1,70 +0,0 @@ - - -]> - - - - &buildDependency; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-dojo-webapp/helloworld-jsonrpc.png b/branches/sca-android/samples/helloworld-dojo-webapp/helloworld-jsonrpc.png deleted file mode 100644 index 57f90aed01..0000000000 Binary files a/branches/sca-android/samples/helloworld-dojo-webapp/helloworld-jsonrpc.png and /dev/null differ diff --git a/branches/sca-android/samples/helloworld-dojo-webapp/helloworld-jsonrpc.svg b/branches/sca-android/samples/helloworld-dojo-webapp/helloworld-jsonrpc.svg deleted file mode 100644 index d5c3bc5d3e..0000000000 --- a/branches/sca-android/samples/helloworld-dojo-webapp/helloworld-jsonrpc.svg +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldjsonrpc - - HelloWorldJSONServiceComponent - HelloWorldService - WebApp - DOJO - - diff --git a/branches/sca-android/samples/helloworld-dojo-webapp/pom.xml b/branches/sca-android/samples/helloworld-dojo-webapp/pom.xml deleted file mode 100644 index 35d4abd6c7..0000000000 --- a/branches/sca-android/samples/helloworld-dojo-webapp/pom.xml +++ /dev/null @@ -1,163 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-helloworld-dojo-webapp - war - Apache Tuscany SCA HelloWorld DOJO Sample WebApp - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.4-SNAPSHOT - runtime - - - - - stax - stax-api - 1.0.1 - provided - - - - - javax.servlet - servlet-api - 2.3 - provided - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - org.apache.maven.plugins - maven-antrun-plugin - - - - ant - ant-trax - 1.6.5 - - - - - install-dojo - validate - - run - - - - - - - - - - - copy-dojo-files - generate-resources - - run - - - - - - - - - - - - clean-dojo-files - clean - - run - - - - - - - - - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - true - - - generate - - - - - - - diff --git a/branches/sca-android/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java b/branches/sca-android/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java deleted file mode 100644 index 3d8ea24f04..0000000000 --- a/branches/sca-android/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworldjsonrpc; - -/** - * This is the business interface of the HelloWorld service component. - */ -public interface HelloWorldService { - - String getGreetings(String name); - -} diff --git a/branches/sca-android/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java b/branches/sca-android/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java deleted file mode 100644 index e205f4da9b..0000000000 --- a/branches/sca-android/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworldjsonrpc; - -import java.util.Date; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service component. - */ -@Service(HelloWorldService.class) -public class HelloWorldServiceImpl implements HelloWorldService { - - /* - * @see org.apache.tuscany.samples.helloworld.HelloWorldServiceComponent#getGreetings() - */ - public String getGreetings(String name) { - return new Date() + ": [JSONRPC] Hello " + name; - } - -} diff --git a/branches/sca-android/samples/helloworld-dojo-webapp/src/main/resources/jsonrpc.composite b/branches/sca-android/samples/helloworld-dojo-webapp/src/main/resources/jsonrpc.composite deleted file mode 100644 index e895ab455d..0000000000 --- a/branches/sca-android/samples/helloworld-dojo-webapp/src/main/resources/jsonrpc.composite +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-dojo-webapp/src/main/webapp/HelloWorldJSONRPC.html b/branches/sca-android/samples/helloworld-dojo-webapp/src/main/webapp/HelloWorldJSONRPC.html deleted file mode 100644 index 4195f3288c..0000000000 --- a/branches/sca-android/samples/helloworld-dojo-webapp/src/main/webapp/HelloWorldJSONRPC.html +++ /dev/null @@ -1,98 +0,0 @@ - - - -Tuscany JSON-RPC HelloWorld Example - - - - - - - - - - - - - -

Tuscany Dojo JSON-RPC HelloWorld Sample

- -
- - - - - - - - - - - - - - - - -
Dojo Example
-

This example uses the Dojo - Toolkit to create a JavaScript object helloWorldService - for the SCA service 'HelloWorldService' using Dojo's - RPC classes and providing them with HelloWorldService?smd - for Simple Method Description - (SMD) input.

-

It then creates a Dojo button that will envoke the getGreetings - method of the HelloWorldService object.

-
RequestResponse

- -
-
None Yet.
-
-
Dojo Debug:
-
- - - - - - - - diff --git a/branches/sca-android/samples/helloworld-dojo-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-android/samples/helloworld-dojo-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index 2c178c1ddc..0000000000 --- a/branches/sca-android/samples/helloworld-dojo-webapp/src/main/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/branches/sca-android/samples/helloworld-dojo-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-android/samples/helloworld-dojo-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 70cd67890a..0000000000 --- a/branches/sca-android/samples/helloworld-dojo-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - Apache Tuscany DOJO HelloWorld Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - HelloWorldJSONRPC.html - - - diff --git a/branches/sca-android/samples/helloworld-dojo-webapp/src/main/webapp/style.css b/branches/sca-android/samples/helloworld-dojo-webapp/src/main/webapp/style.css deleted file mode 100644 index 1071583264..0000000000 --- a/branches/sca-android/samples/helloworld-dojo-webapp/src/main/webapp/style.css +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -* { font-family: arial; } - -table, th, td { border: 2px solid blue; border-collapse: collapse; } -th { color: white; background-color: blue; } diff --git a/branches/sca-android/samples/helloworld-jms-webapp/README b/branches/sca-android/samples/helloworld-jms-webapp/README deleted file mode 100644 index 9be2e0b0f6..0000000000 --- a/branches/sca-android/samples/helloworld-jms-webapp/README +++ /dev/null @@ -1,130 +0,0 @@ -JMS HelloWorld Sample -===================== -This sample demonstrates a simple webapp containing a hello world style client -and service using the JMS binding for request-response style messaging. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -As this sample provides a web app there is a manual step where the WAR file -that contains the sample is copied to your web app container. If you just want -to give this sample a go deploy the WAR file (target/sample-helloworld-jms-webapp.war ) -to you web application server. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-helloworld-jms-webapp/ - -The port and hostname will of course vary depending on your local installation. - -Configuring the JMS resources ------------------------------ - -The sample requires JMS resources be manually configured in the server environment, these are: - -- a JMS connection factory named "ConnectionFactory" -- a JMS queue named "HelloWorldService" - -See the following for how to define these resources depending on the application server being used: - -Tuscany with embedded ActiveMQ broker -------------------------------------- - - -Apache Tomcat -------------- - -No configuration is necessary for Tomcat as the sample WAR includes everything pre-configured to run -an ActiveMQ embedded JMS broker and to configure the JMS resources in JNDI. - -The JNDI resources are configured in the META-INF/comtext.xml file, for more information on running -ActiveMQ in Tomcat see: http://activemq.apache.org/tomcat.html - - -Apache Geronimo ---------------- - -For Apache Geronimo 2.0.1 (2.0.2 fails to define JMS resources for me) - -Logon to the Geronimo Server Console (http://localhost:8080/console, uid system, pswd manager) - -In the Console Navigation on the left under Services click JMS Resources - -At the bottom of the JMS Resources panel click under Create a new JMS Resource Group click For ActiveMQ - -In Resource Group Name enter "MyRGN" and click next - -At JMS Resource Group click Add Connection Factory - -For JMS Factory Type choose javax.jms.ConnectionFactory and click Next - -In Connection Factory Name enter "ConnectionFactory" and click Next - -Click Add destination - -For JMS Destination Type choose javax.jms.Queue and click Next - -Enter "HelloWorldService" for both Message Destination Name and PhysicalName and click Next - -Click Deploy Now - -Thats it, you're done. - - -WebSphere ---------- - -To define the JMS resources in a new WebSphere Application Server 6.1 installation: - -1) First define a Service integration bus: - -Logon to the WebSphere Integrated Solutions Console (http://localhost:9060/ibm/console) - -On the Left hand menu expand Service integration, and click on Buses. - -In the Buses panel click on New - -Enter a name for the bus, eg MyBus, and click Next, and then click Finish and Save the changes. - -In the Buses panel click on MyBus - -Find the Topology secion and click on Bus members - -Click on Add, leave the defaults and click Next, Next, Next, Finish, and Save the changes. - -Restart WebSphere and when back up logon back on to the Integrated Solutions Console - -2) Now define the JMS rescources - -On the Left hand menu expand Resources, and JMS and click on Connection Facotories. - -In the Connection factories panel click New. - -Leave the Default messaging provider and click OK - -Enter "ConnectionFactory" in the Name and JNDI name and in the Bus name in the Connection pane choose MyBus and click OK - -On the Left hand menu in JMS click on Queues - -In the Queues panel click New, accept the defaults and click OK - -Enter "HelloWorldService" for the Name and JNDI name and in the Bus name in the Connection pane choose MyBus, -and then in the Queue name drop down list choose "Create SIB destination" - -In the Set queue attributes panel enter "HelloWorldService" for the Identifier and click Next, Next, and Finish - -That should take you back to the Queues panel where you can click OK to create the new JMS queue. - -Save the changes - -Restart WebSphere and you're done. - - - -Others... ---------- - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-jms-webapp/pom.xml b/branches/sca-android/samples/helloworld-jms-webapp/pom.xml deleted file mode 100644 index 48ff33be2d..0000000000 --- a/branches/sca-android/samples/helloworld-jms-webapp/pom.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-helloworld-jms-webapp - war - Apache Tuscany SCA JMS HelloWorld Sample in a WebApp - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - - ${pom.groupId} - tuscany-host-webapp - ${pom.version} - - - - ${pom.groupId} - tuscany-binding-jms-runtime - ${pom.version} - - - - ${pom.groupId} - tuscany-implementation-java-runtime - ${pom.version} - - - - org.apache.activemq - activemq-core - 5.1.0 - runtime - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldClient.java b/branches/sca-android/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldClient.java deleted file mode 100644 index c24a741ee2..0000000000 --- a/branches/sca-android/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldClient.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -/** - * The HelloWorld client implementation - */ -public class HelloWorldClient implements HelloWorldService { - - HelloWorldService helloWorldRef; - - public String sayHello(String name) { - System.out.println("HelloWorldClient.sayHello " + name); - return helloWorldRef.sayHello(name); - } - - public void setHelloWorldRef(HelloWorldService helloWorldRef) { - System.out.println("HelloWorldClient .setHelloWorldService " + helloWorldRef); - this.helloWorldRef = helloWorldRef; - } -} \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldService.java b/branches/sca-android/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 2af978b9ce..0000000000 --- a/branches/sca-android/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Remotable; - -/** - * The interface for the helloworld service - */ -@Remotable -public interface HelloWorldService { - public String sayHello(String name); -} diff --git a/branches/sca-android/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldServiceImpl.java b/branches/sca-android/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index 280388f443..0000000000 --- a/branches/sca-android/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldServiceImpl implements HelloWorldService { - - public String sayHello(String name) { - System.out.println("HelloWorldServiceImpl .sayHello " + name); - return "Hello " + name; - } - -} diff --git a/branches/sca-android/samples/helloworld-jms-webapp/src/main/webapp/META-INF/context.xml b/branches/sca-android/samples/helloworld-jms-webapp/src/main/webapp/META-INF/context.xml deleted file mode 100644 index 2419887413..0000000000 --- a/branches/sca-android/samples/helloworld-jms-webapp/src/main/webapp/META-INF/context.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-jms-webapp/src/main/webapp/META-INF/sca-deployables/HelloWorld.composite b/branches/sca-android/samples/helloworld-jms-webapp/src/main/webapp/META-INF/sca-deployables/HelloWorld.composite deleted file mode 100644 index f6328d156c..0000000000 --- a/branches/sca-android/samples/helloworld-jms-webapp/src/main/webapp/META-INF/sca-deployables/HelloWorld.composite +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-jms-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-android/samples/helloworld-jms-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 86710435ae..0000000000 --- a/branches/sca-android/samples/helloworld-jms-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - Apache Tuscany JMS Web Service Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - hello.jsp - - - - - - - diff --git a/branches/sca-android/samples/helloworld-jms-webapp/src/main/webapp/hello.jsp b/branches/sca-android/samples/helloworld-jms-webapp/src/main/webapp/hello.jsp deleted file mode 100644 index bc6ef59a9b..0000000000 --- a/branches/sca-android/samples/helloworld-jms-webapp/src/main/webapp/hello.jsp +++ /dev/null @@ -1,44 +0,0 @@ -<%-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---%> - -<%@ page import="org.apache.tuscany.sca.host.embedded.SCADomain"%> -<%@ page import="helloworld.HelloWorldService" %> - -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<% - SCADomain scaDomain = (SCADomain) application.getAttribute("org.apache.tuscany.sca.SCADomain"); - HelloWorldService helloWorldService = (HelloWorldService)scaDomain.getService(HelloWorldService.class, "HelloWorldClient"); -%> - -HelloWorld JMS sample - - - -If this sample is working correctly you should see "Hello World" on the next line... -

-<%= helloWorldService.sayHello("world") %> -

-If you do not see "Hello World" on the line above then there has been a problem. -

-The sample requires JMS resources be manually configured in the server environment, these are: -a JMS connection factory named "ConnectionFactory", and a destination queues named "HelloWorldService". -See the sample README file for more information. - - - diff --git a/branches/sca-android/samples/helloworld-jsonrpc-webapp/README b/branches/sca-android/samples/helloworld-jsonrpc-webapp/README deleted file mode 100644 index 07253d039b..0000000000 --- a/branches/sca-android/samples/helloworld-jsonrpc-webapp/README +++ /dev/null @@ -1,90 +0,0 @@ -Hello World JSONRPC Sample -========================== -This sample demostrates the JSONRPC binding using a simple web app that -talks JSONRPC to an SCA service. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -As this sample provides a web app there is a manual step where the WAR file -that contains the sample is copied to your web app container. If you just want -to give this sample a go deploy the WAR file (target/sample-helloworld-jsonrpc-webapp.war) -to you web application server. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-helloworld-jsonrpc-webapp - -The port and hostname will of course vary depending on your local installation. - -Sample Overview ---------------- -The sample provides a single service with an operation that reflects -a greeting back to the caller. The service is exposed using the JSONRPC -binding. The web app provided shows how the SCA-provided JSON client can be -used to invoke the SCA service. - -helloworld-jsonrpc-webapp/ - src/ - main/ - java/ - helloworldjsonrpc/ - HelloWorldService.java - service interface - HelloWorldServiceImpl.java - service implementation - resources/ - jsonrpc.composite - the SCA assembly for this sample - webapp - META-INF/ - sca-contribution.xml - specifies the composite to be deployed - WEB-INF/ - web.xml - defines the listener that starts up the - Tuscany SCA runtime - HelloWorldJSONRPC.html - the web application that calls the - SCA service via JSONRPC - style.css - style sheet - - helloworld-jsonrpc-webapp.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file that unpacks the - dojo installation - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built using Ant as -follows - -cd helloworld-jsonrpc-webapp -ant package - -This should result in a war file (sample-helloworld-jsonrpc-webapp.war) in the target -directory. Copy this war file to your web app deployment directory in your -web app container. - -The process for getting the web app running will depend on which web app container -you are using. For example, if you are using Tomcat then it is simply a matter -of copying the WAR file to the webapps directory. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-helloworld-jsonrpc-webapp - -The port and hostname will of course vary depending on your local installation. - -You should see a web page that allows you to send messages, via JSONRPC, to the -application running in the Tuscany SCA Runtime - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd helloworld-jsonrpc-webapp -mvn - -Again this should result in a war file (sample-helloworld-jsonrpc-webapp.war) in the target -directory. Follow the steps described in the previous section for running the web -app and for the expected results. - - diff --git a/branches/sca-android/samples/helloworld-jsonrpc-webapp/helloworld-jsonrpc.png b/branches/sca-android/samples/helloworld-jsonrpc-webapp/helloworld-jsonrpc.png deleted file mode 100644 index 57f90aed01..0000000000 Binary files a/branches/sca-android/samples/helloworld-jsonrpc-webapp/helloworld-jsonrpc.png and /dev/null differ diff --git a/branches/sca-android/samples/helloworld-jsonrpc-webapp/helloworld-jsonrpc.svg b/branches/sca-android/samples/helloworld-jsonrpc-webapp/helloworld-jsonrpc.svg deleted file mode 100644 index 6ef1f438fb..0000000000 --- a/branches/sca-android/samples/helloworld-jsonrpc-webapp/helloworld-jsonrpc.svg +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldjsonrpc - - HelloWorldJSONServiceComponent - HelloWorldService - WebApp - DOJO - - diff --git a/branches/sca-android/samples/helloworld-jsonrpc-webapp/pom.xml b/branches/sca-android/samples/helloworld-jsonrpc-webapp/pom.xml deleted file mode 100644 index 8f4db306bd..0000000000 --- a/branches/sca-android/samples/helloworld-jsonrpc-webapp/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-helloworld-jsonrpc-webapp - war - Apache Tuscany SCA HelloWorld JSON-RPC Sample WebApp - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.4-SNAPSHOT - runtime - - - - - stax - stax-api - 1.0.1 - provided - - - - - javax.servlet - servlet-api - 2.3 - provided - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java b/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java deleted file mode 100644 index 3d8ea24f04..0000000000 --- a/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworldjsonrpc; - -/** - * This is the business interface of the HelloWorld service component. - */ -public interface HelloWorldService { - - String getGreetings(String name); - -} diff --git a/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java b/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java deleted file mode 100644 index 35fd00fabd..0000000000 --- a/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworldjsonrpc; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service component. - */ -@Service(HelloWorldService.class) -public class HelloWorldServiceImpl implements HelloWorldService { - - /* - * @see org.apache.tuscany.samples.helloworld.HelloWorldServiceComponent#getGreetings() - */ - public String getGreetings(String name) { - return "jsonrpcHello " + name; - } - -} diff --git a/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/resources/jsonrpc.composite b/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/resources/jsonrpc.composite deleted file mode 100644 index e895ab455d..0000000000 --- a/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/resources/jsonrpc.composite +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/webapp/HelloWorldJSONRPC.html b/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/webapp/HelloWorldJSONRPC.html deleted file mode 100644 index 75dd9050fa..0000000000 --- a/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/webapp/HelloWorldJSONRPC.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - Tuscany JSON-RPC HelloWorld Example - - - - - - - - - - -

Tuscany JSON-RPC HelloWorld Sample

- - - - - - - - - - - - - - - -
Non-Dojo Example
- This example uses the JavaScript served from - SCADomain/scaDomain.js - to make JSON-RPC requests to the SCA service 'HelloWorldService' -
RequestResponse
-

- Name please:     - - -

- -
-
None Yet.
-
- - - diff --git a/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index c8246e15a7..0000000000 --- a/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 267bed176c..0000000000 --- a/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - Apache Tuscany JSON-RPC HelloWorld Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - HelloWorldJSONRPC.html - - - diff --git a/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/webapp/style.css b/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/webapp/style.css deleted file mode 100644 index 1071583264..0000000000 --- a/branches/sca-android/samples/helloworld-jsonrpc-webapp/src/main/webapp/style.css +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -* { font-family: arial; } - -table, th, td { border: 2px solid blue; border-collapse: collapse; } -th { color: white; background-color: blue; } diff --git a/branches/sca-android/samples/helloworld-reference-jms/README b/branches/sca-android/samples/helloworld-reference-jms/README deleted file mode 100644 index 184e67a239..0000000000 --- a/branches/sca-android/samples/helloworld-reference-jms/README +++ /dev/null @@ -1,114 +0,0 @@ -Hello World JMS References Sample -================================= -This sample demonstrates an SCA reference that uses a JMS binding - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens you need to run the server first -so open a command prompt, navigate to the helloworld-service-jms sample directory -and do - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-service-jms.jar helloworld.HelloWorldServer - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-service-jms.jar helloworld.HelloWorldServer - - -Once the server is running open a command prompt, navigate to this sample -directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-reference-jms.jar helloworld.HelloWorldJmsClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-reference-jms.jar helloworld.HelloWorldJmsClient - - -Sample Overview ---------------- -The sample provides a component that has a reference with a JMS binding. -The binding refers to JMS queue and communicates with a service -exposed by the helloworld-service-jms sample. - -helloworld-reference-jms/ - src/ - main/ - java/ - helloworld/ - HelloWorldService.java - interface description for - HelloWorldServiceComponent - HelloWorldServiceComponent.java - component implementation - HelloWorldJmsClient.java - starts the SCA Runtime and - deploys the helloworldwsjmsclient - .composite. It then calls the - HelloWorldServiceComponent - resources/ - helloworldjmsclient.composite - the SCA assembly for this sample - helloworldjms.composite - the SCA assembly for the server - that is used by the JUnit tests - logging.properties - log4j configuration file - test/ - java/ - helloworld/ - HelloWorldJMSClientTestCase.java - JUnit test case - helloworld-reference.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant. Before -you do this start up the service that the reference will talk to. To do this -run up the helloworld-service-jms test. Take a look at the README in that sample -and you will see you need the following commands - -cd helloworld-service-jms -ant run - -Once done you can now compile and run this sample using the following commands; - -cd helloworld-reference-jms -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] log4j:WARN No appenders could be found for logger (org.apache.axiom. -om.util.StAXUtils). - [java] log4j:WARN Please initialize the log4j system properly. - [java] Injected helloWorldService - [java] Called getGreetings - [java] Hello World - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. When using Maven you don't need to run the helloworld- -service-jms sample first as the JUnit test does this for you. - -cd helloworld-reference-jms -mvn - -You should see the following output from the test phase. - -run: - [java] Injected helloWorldService - [java] Called getGreetings - [java] javax.naming.NameNotFoundException: RequestQueue - ... - [java] Hello World - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/helloworld-reference-jms/build.xml b/branches/sca-android/samples/helloworld-reference-jms/build.xml deleted file mode 100644 index 4702beed0d..0000000000 --- a/branches/sca-android/samples/helloworld-reference-jms/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-reference-jms/helloworld-reference.png b/branches/sca-android/samples/helloworld-reference-jms/helloworld-reference.png deleted file mode 100644 index ab80b1f91c..0000000000 Binary files a/branches/sca-android/samples/helloworld-reference-jms/helloworld-reference.png and /dev/null differ diff --git a/branches/sca-android/samples/helloworld-reference-jms/helloworld-reference.svg b/branches/sca-android/samples/helloworld-reference-jms/helloworld-reference.svg deleted file mode 100644 index 40f4e8f271..0000000000 --- a/branches/sca-android/samples/helloworld-reference-jms/helloworld-reference.svg +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldjmsreference - - HelloWorldServiceComponent - - HelloWorldService ReferenceJMS - diff --git a/branches/sca-android/samples/helloworld-reference-jms/pom.xml b/branches/sca-android/samples/helloworld-reference-jms/pom.xml deleted file mode 100644 index 21ed69d7e9..0000000000 --- a/branches/sca-android/samples/helloworld-reference-jms/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-helloworld-reference-jms - Apache Tuscany SCA HelloWorld Reference JMS Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - sample-helloworld-service-jms - 1.4-SNAPSHOT - test - - - - junit - junit - 4.2 - test - - - - org.apache.activemq - apache-activemq - 4.1.1 - test - - - org.apache.activemq - activemq-web-demo - - - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-android/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 4cdcc1fd0b..0000000000 --- a/branches/sca-android/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldImpl implements HelloWorldService { - - public String getGreetings(String name) { - return "Hello " + name; - } - -} diff --git a/branches/sca-android/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java b/branches/sca-android/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java deleted file mode 100644 index 5bec27a137..0000000000 --- a/branches/sca-android/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program shows how to create an SCA runtime, start it, - * locate the HelloWorld service and invoke it. - */ -public class HelloWorldJmsClient { - - public final static void main(String[] args) throws Exception { - //SCANode node = SCANodeFactory.createNodeWithComposite("helloworldjmsreference.composite"); - //HelloWorldService helloWorldService = node.getDomain().getService(HelloWorldService.class, "HelloWorldServiceComponent"); - - SCADomain scaDomain = SCADomain.newInstance("helloworldjmsreference.composite"); - HelloWorldService helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent"); - - String value = helloWorldService.getGreetings("World"); - System.out.println(value); - - scaDomain.close(); - } -} diff --git a/branches/sca-android/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldService.java b/branches/sca-android/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index c0259c6e07..0000000000 --- a/branches/sca-android/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Remotable; - -/** - * The interface for the helloworld service - */ -@Remotable -public interface HelloWorldService { - public String getGreetings(String name); -} diff --git a/branches/sca-android/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldServiceComponent.java b/branches/sca-android/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldServiceComponent.java deleted file mode 100644 index 27cef47677..0000000000 --- a/branches/sca-android/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldServiceComponent.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -/** - * The HelloWorld service implementation - */ -public class HelloWorldServiceComponent implements HelloWorldService { - - HelloWorldService helloWorldService; - - public String getGreetings(String name) { - System.out.println("Called getGreetings"); - return helloWorldService.getGreetings(name); - } - - public HelloWorldService getHelloWorldService() { - System.out.println("Got Injected helloWorldService"); - return helloWorldService; - } - - public void setHelloWorldService(HelloWorldService helloWorldService) { - System.out.println("Injected helloWorldService"); - this.helloWorldService = helloWorldService; - } -} \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-reference-jms/src/main/resources/helloworldjmsreference.composite b/branches/sca-android/samples/helloworld-reference-jms/src/main/resources/helloworldjmsreference.composite deleted file mode 100644 index 3cf1104562..0000000000 --- a/branches/sca-android/samples/helloworld-reference-jms/src/main/resources/helloworldjmsreference.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite b/branches/sca-android/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite deleted file mode 100644 index e692ef8e4c..0000000000 --- a/branches/sca-android/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-reference-jms/src/main/resources/logging.properties b/branches/sca-android/samples/helloworld-reference-jms/src/main/resources/logging.properties deleted file mode 100644 index a2a4067921..0000000000 --- a/branches/sca-android/samples/helloworld-reference-jms/src/main/resources/logging.properties +++ /dev/null @@ -1,30 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# $Rev: 582827 $ $Date: 2007-10-08 15:01:31 +0100 (Mon, 08 Oct 2007) $ -# - -# Custom logging configuration for Tuscany samples -# By default, only INFO level logging is enabled and ALL messages get sent to the console -# For more messages from the runtime, uncomment specific settings at the end of this file -handlers = java.util.logging.ConsoleHandler -java.util.logging.ConsoleHandler.level = ALL -java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter -.level=INFO - -# Uncomment the next setting to get all Tuscany messages (this will be a lot) -#org.apache.tuscany.level=FINEST diff --git a/branches/sca-android/samples/helloworld-reference-jms/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-android/samples/helloworld-reference-jms/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index e0ea596dd3..0000000000 --- a/branches/sca-android/samples/helloworld-reference-jms/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java b/branches/sca-android/samples/helloworld-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java deleted file mode 100644 index f5380d9ccd..0000000000 --- a/branches/sca-android/samples/helloworld-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package helloworld; - -import junit.framework.Assert; - -import org.apache.activemq.broker.BrokerService; -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - - -/** - * Test case for helloworld web service client - */ -public class HelloWorldJmsClientTestCase { - - private HelloWorldService helloWorldService; - private HelloWorldService helloTuscanyService; - private SCADomain scaClientDomain; - private SCADomain scaServiceDomain; - private BrokerService jmsBroker; - - - @Before - public void startClient() throws Exception { - try { - startBroker(); - scaServiceDomain = SCADomain.newInstance("helloworldjmsservice.composite"); - scaClientDomain = SCADomain.newInstance("helloworldjmsreference.composite"); - helloWorldService = scaClientDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent"); - - } catch (Throwable e) { - e.printStackTrace(); - } - } - - @Test - public void testWSClient() throws Exception { - String msg = helloWorldService.getGreetings("Smith"); - Assert.assertEquals("Hello Smith", msg); - Thread.sleep(2000); - } - - - @After - public void stopClient() throws Exception { - scaServiceDomain.close(); - scaClientDomain.close(); - if (jmsBroker != null) { - jmsBroker.stop(); - } - } - - protected void startBroker() throws Exception { - jmsBroker = new BrokerService(); - jmsBroker.setPersistent(false); - jmsBroker.setUseJmx(false); - jmsBroker.addConnector("tcp://localhost:61619"); - jmsBroker.start(); - } -} diff --git a/branches/sca-android/samples/helloworld-service-jms/README b/branches/sca-android/samples/helloworld-service-jms/README deleted file mode 100644 index 49feabaa07..0000000000 --- a/branches/sca-android/samples/helloworld-service-jms/README +++ /dev/null @@ -1,101 +0,0 @@ -Hello World JMS Service Sample -============================== -This sample demonstrates an SCA service that uses a JMS binding - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-service-jms.jar helloworld.HelloWorldServer - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-service-jms.jar helloworld.HelloWorldServer - -Now the server is started you can use the helloworld-reference-jms sample to -exercise it. - -Sample Overview ---------------- -The sample provides a single component that is wired to a service with a -JMS binding. - -helloworld-service-jms/ - src/ - main/ - java/ - helloworld/ - HelloWorldService.java - interface description for - HelloWorldServiceComponent - HelloWorldImpl.java - component implementation - HelloWorldServer.java - starts the SCA Runtime and - deploys the helloworldjmsservice - .composite and then waits for the - service to be called via JMS - resources/ - helloworldjmsservice.composite - the SCA assembly for this sample - - test/ - java/ - helloworld/ - HelloWorldJMSServerTestCase.java- JUnit test case - helloworld-service.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant using the -following commands - -cd helloworld-service-jms -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] log4j:WARN No appenders could be found for logger (org.apache.axiom. -om.util.StAXUtils). - [java] log4j:WARN Please initialize the log4j system properly. - [java] HelloWorld server started (press enter to shutdown) - -As this point the SCA service is exposed as a JMS service via ActiveMQ which is -started automatically by the SCA runtime. To stop the server just press -enter. - -To exercise the service run up the helloworld-reference-jms sample. Take a look at -the README in that sample and you will see you need the following commands - -cd helloworld-reference-jms -ant run - -Building Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built -using Maven as follows. - -cd helloworld-service-jms -mvn - -You should see the following output - -... -[INFO] ------------------------------------------------------------------------ -[INFO] BUILD SUCCESSFUL -[INFO] ------------------------------------------------------------------------ -[INFO] Total time: 15 seconds -[INFO] Finished at: Wed Jul 02 12:50:24 BST 2008 -[INFO] Final Memory: 13M/51M -[INFO] ------------------------------------------------------------------------ - - -This shows that the module has compiled successfully. diff --git a/branches/sca-android/samples/helloworld-service-jms/build.xml b/branches/sca-android/samples/helloworld-service-jms/build.xml deleted file mode 100644 index 330de7f7e5..0000000000 --- a/branches/sca-android/samples/helloworld-service-jms/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-service-jms/helloworld-service.png b/branches/sca-android/samples/helloworld-service-jms/helloworld-service.png deleted file mode 100644 index ef27c71f54..0000000000 Binary files a/branches/sca-android/samples/helloworld-service-jms/helloworld-service.png and /dev/null differ diff --git a/branches/sca-android/samples/helloworld-service-jms/helloworld-service.svg b/branches/sca-android/samples/helloworld-service-jms/helloworld-service.svg deleted file mode 100644 index dd7a9dd87d..0000000000 --- a/branches/sca-android/samples/helloworld-service-jms/helloworld-service.svg +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworld - - HelloWorldServiceComponent - HelloWorldServiceJMS - diff --git a/branches/sca-android/samples/helloworld-service-jms/pom.xml b/branches/sca-android/samples/helloworld-service-jms/pom.xml deleted file mode 100644 index 87c981b5c5..0000000000 --- a/branches/sca-android/samples/helloworld-service-jms/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-helloworld-service-jms - Apache Tuscany SCA HelloWorld Service JMS Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - org.apache.activemq - apache-activemq - 4.1.1 - - - org.apache.activemq - activemq-web-demo - - - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-android/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 4cdcc1fd0b..0000000000 --- a/branches/sca-android/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldImpl implements HelloWorldService { - - public String getGreetings(String name) { - return "Hello " + name; - } - -} diff --git a/branches/sca-android/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java b/branches/sca-android/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java deleted file mode 100644 index d4ea391a00..0000000000 --- a/branches/sca-android/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import java.io.IOException; - -import org.apache.activemq.broker.BrokerService; -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This server program shows how to create an SCA runtime, and start it which - * activates the helloworld Web service endpoint. - */ -public class HelloWorldServer { - - public static void main(String[] args) { - try { - BrokerService jmsBroker; - jmsBroker = new BrokerService(); - jmsBroker.setPersistent(false); - jmsBroker.setUseJmx(false); - jmsBroker.addConnector("tcp://localhost:61619"); - jmsBroker.start(); - - SCADomain scaDomain = SCADomain.newInstance("helloworldjmsservice.composite"); - - System.out.println("HelloWorld server started (press enter to shutdown)"); - System.in.read(); - - scaDomain.close(); - - jmsBroker.stop(); - System.out.println("HelloWorld server stopped"); - - } catch (IOException e) { - e.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - } - -} diff --git a/branches/sca-android/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldService.java b/branches/sca-android/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 4b019b21bf..0000000000 --- a/branches/sca-android/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public String getGreetings(String name); -} - diff --git a/branches/sca-android/samples/helloworld-service-jms/src/main/resources/definitions.xml b/branches/sca-android/samples/helloworld-service-jms/src/main/resources/definitions.xml deleted file mode 100644 index 8c881ab0bb..0000000000 --- a/branches/sca-android/samples/helloworld-service-jms/src/main/resources/definitions.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - The general intent that a transport is available over which SOAP messages flow - - - - - - A JMS transport is required - - - - - - An HTTP transport is required - - - - - - - An HTTPS transport is required - - - - - - - org.apache.activemq.jndi.ActiveMQInitialContextFactory - tcp://localhost:61619 - QueueConnectionFactory - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite b/branches/sca-android/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite deleted file mode 100644 index 3135cdc320..0000000000 --- a/branches/sca-android/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-service-jms/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-android/samples/helloworld-service-jms/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 3f9e00689e..0000000000 --- a/branches/sca-android/samples/helloworld-service-jms/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-service-jms/src/test/java/helloworld/HelloWorldJmsServerTestCaseOff.java b/branches/sca-android/samples/helloworld-service-jms/src/test/java/helloworld/HelloWorldJmsServerTestCaseOff.java deleted file mode 100644 index 7930f98716..0000000000 --- a/branches/sca-android/samples/helloworld-service-jms/src/test/java/helloworld/HelloWorldJmsServerTestCaseOff.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertNotNull; - -import java.io.IOException; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Tests that the helloworld server is available - */ -public class HelloWorldJmsServerTestCaseOff { - - private SCADomain scaDomain; - - @Before - public void startServer() throws Exception { - // ActiveMQModuleActivator.startBroker(); - scaDomain = SCADomain.newInstance("helloworldjmsservice.composite"); - } - - @Test - public void testServiceCall() throws IOException { - HelloWorldService helloWorldService = - scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService"); - assertNotNull(helloWorldService); - - assertEquals("Hello Smith", helloWorldService.getGreetings("Smith")); - } - - @After - public void stopServer() throws Exception { - if (scaDomain != null) { - scaDomain.close(); - } - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-reference-jms/README b/branches/sca-android/samples/helloworld-ws-reference-jms/README deleted file mode 100644 index abf10ef1f2..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-jms/README +++ /dev/null @@ -1,127 +0,0 @@ -Hello World Web Service References Sample -========================================= -This sample demonstrates an SCA reference that uses a web service binding running -over a JMS protocl. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens you need to run the server first -so open a command prompt, navigate to the helloworld-ws-service-jms sample directory -and do - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-service-jms.jar helloworld.HelloWorldServer - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-service-jms.jar helloworld.HelloWorldServer - - -Once the server is running open a command prompt, navigate to this sample -directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-reference-jms.jar helloworld.HelloWorldJmsClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-reference-jms.jar helloworld.HelloWorldJmsClient - - -Sample Overview ---------------- -The sample provides two components that are have a reference with a -web service binding. The binding refers to WSDL that identifies the service -exposed by the helloworld-ws-service-jms sample. - -helloworld-ws-reference-jms/ - src/ - main/ - java/ - helloworld/ - HelloWorldService.java - interface description for - HelloWorldServiceComponent - HelloWorldServiceComponent.java - component implementation - HelloWorldJmsClient.java - starts the SCA Runtime and - deploys the helloworldwsjmsclient - .composite. It then calls the - HelloWorldServiceComponent - resources/ - wsdl - helloworld.wsdl - the service description that the - SCA reference uses to bind to - helloworldwsjmsclient.composite - the SCA assembly for this sample - helloworldwsjms.composite - the SCA assembly for the server - that is used by the JUnit tests - logging.properties - log4j configuration file - test/ - java/ - helloworld/ - HelloWorldJMSClientTestCase.java - JUnit test case - helloworld-ws-reference.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant. Before -you do this start up the service that the reference will talk to. To do this -run up the helloworld-ws-service-jms test. Take a look at the README in that sample -and you will see you need the following commands - -cd helloworld-ws-service-jms -ant run - -Once done you can now compile and run this sample using the following commands; - -cd helloworld-ws-reference-jms -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] log4j:WARN No appenders could be found for logger (org.apache.axiom. -om.util.StAXUtils). - [java] log4j:WARN Please initialize the log4j system properly. - [java] Injected helloWorldService - [java] Called getGreetings - [java] Hello World - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. When using Maven you don't need to run the helloworld- -ws-service-jms sample first as the JUnit test does this for you. - -cd helloworld-ws-reference-jms -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running helloworld.HelloWorldJmsClientTestCase -08-Jan-2008 10:40:15 org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvide -r start -INFO: Axis2 JMS URL=jms:/queue.sample?transport.jms.ConnectionFactoryJNDIName=Qu -eueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.Active -MQInitialContextFactory&java.naming.provider.url=tcp://localhost:61619 -Injected helloWorldService -Called getGreetings -Injected helloWorldService -Called getGreetings -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.89 sec - - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/helloworld-ws-reference-jms/build.xml b/branches/sca-android/samples/helloworld-ws-reference-jms/build.xml deleted file mode 100644 index 4f83c8ae9d..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-jms/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-jms/helloworld-ws-reference.png b/branches/sca-android/samples/helloworld-ws-reference-jms/helloworld-ws-reference.png deleted file mode 100644 index bd2bba41db..0000000000 Binary files a/branches/sca-android/samples/helloworld-ws-reference-jms/helloworld-ws-reference.png and /dev/null differ diff --git a/branches/sca-android/samples/helloworld-ws-reference-jms/helloworld-ws-reference.svg b/branches/sca-android/samples/helloworld-ws-reference-jms/helloworld-ws-reference.svg deleted file mode 100644 index 333ad53e0a..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-jms/helloworld-ws-reference.svg +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldwsclient - - HelloWorldServiceComponent - - - HelloWorldService - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-jms/pom.xml b/branches/sca-android/samples/helloworld-ws-reference-jms/pom.xml deleted file mode 100644 index 8015eddca9..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-jms/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-helloworld-ws-reference-jms - Apache Tuscany SCA HelloWorld Web Service Reference JMS Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - sample-helloworld-ws-service-jms - 1.4-SNAPSHOT - test - - - - junit - junit - 4.2 - test - - - - org.apache.activemq - apache-activemq - 4.1.1 - test - - - org.apache.activemq - activemq-web-demo - - - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 4cdcc1fd0b..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldImpl implements HelloWorldService { - - public String getGreetings(String name) { - return "Hello " + name; - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java b/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java deleted file mode 100644 index b3db243a1f..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program shows how to create an SCA runtime, start it, - * locate the HelloWorld service and invoke it. - */ -public class HelloWorldJmsClient { - - public final static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("helloworldwsjmsclient.composite"); - HelloWorldService helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent"); - - String value = helloWorldService.getGreetings("World"); - System.out.println(value); - - scaDomain.close(); - } -} diff --git a/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldService.java b/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index db0c947cf7..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Remotable; - -/** - * The interface for the helloworld service - */ -@Remotable -public interface HelloWorldService { - public String getGreetings(String name); -} diff --git a/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldServiceComponent.java b/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldServiceComponent.java deleted file mode 100644 index 0dee19550b..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldServiceComponent.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -/** - * The HelloWorld service implementation - */ -public class HelloWorldServiceComponent implements HelloWorldService { - - HelloWorldService helloWorldService; - - public String getGreetings(String name) { - System.out.println("Called getGreetings"); - return helloWorldService.getGreetings(name); - } - - public HelloWorldService getHelloWorldService() { - System.out.println("Got Injected helloWorldService"); - return helloWorldService; - } - - public void setHelloWorldService(HelloWorldService helloWorldService) { - System.out.println("Injected helloWorldService"); - this.helloWorldService = helloWorldService; - } -} \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/resources/helloworldwsjms.composite b/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/resources/helloworldwsjms.composite deleted file mode 100644 index d029ba3e1c..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/resources/helloworldwsjms.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/resources/helloworldwsjmsclient.composite b/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/resources/helloworldwsjmsclient.composite deleted file mode 100644 index a4eb217310..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/resources/helloworldwsjmsclient.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/resources/logging.properties b/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/resources/logging.properties deleted file mode 100644 index 3dca310cdb..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/resources/logging.properties +++ /dev/null @@ -1,30 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# $Rev$ $Date$ -# - -# Custom logging configuration for Tuscany samples -# By default, only INFO level logging is enabled and ALL messages get sent to the console -# For more messages from the runtime, uncomment specific settings at the end of this file -handlers = java.util.logging.ConsoleHandler -java.util.logging.ConsoleHandler.level = ALL -java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter -.level=INFO - -# Uncomment the next setting to get all Tuscany messages (this will be a lot) -#org.apache.tuscany.level=FINEST diff --git a/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 013a55b61e..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-jms/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java b/branches/sca-android/samples/helloworld-ws-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java deleted file mode 100644 index 12b0716b5d..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package helloworld; - -import junit.framework.Assert; - -import org.apache.activemq.broker.BrokerService; -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - - -/** - * Test case for helloworld web service client - */ -public class HelloWorldJmsClientTestCase { - - private HelloWorldService helloWorldService; - private HelloWorldService helloTuscanyService; - private SCADomain scaClientDomain; - private SCADomain scaServiceDomain; - private BrokerService jmsBroker; - - - @Before - public void startClient() throws Exception { - try { - startBroker(); - scaServiceDomain = SCADomain.newInstance("helloworldwsjms.composite"); - scaClientDomain = SCADomain.newInstance("helloworldwsjmsclient.composite"); - helloWorldService = scaClientDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent"); - helloTuscanyService = scaClientDomain.getService(HelloWorldService.class, "HelloTuscanyServiceComponent"); - - } catch (Throwable e) { - e.printStackTrace(); - } - } - - @Test - public void testWSClient() throws Exception { - String msg = helloWorldService.getGreetings("Smith"); - Assert.assertEquals("Hello Smith", msg); - msg = helloTuscanyService.getGreetings("Green"); - Assert.assertEquals("Hello Green", msg); - - Thread.sleep(2000); - } - - - @After - public void stopClient() throws Exception { - scaServiceDomain.close(); - scaClientDomain.close(); - if (jmsBroker != null) { - jmsBroker.stop(); - } - } - - protected void startBroker() throws Exception { - jmsBroker = new BrokerService(); - jmsBroker.setPersistent(false); - jmsBroker.setUseJmx(false); - jmsBroker.addConnector("tcp://localhost:61619"); - jmsBroker.start(); - } -} diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/README b/branches/sca-android/samples/helloworld-ws-reference-lean/README deleted file mode 100644 index 13c89ab2f6..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/README +++ /dev/null @@ -1,178 +0,0 @@ -Hello World Web Service References Sample -========================================= -This sample demonstrates an SCA reference that uses a web service binding. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens you need to run the server first -so open a command prompt, navigate to the helloworld-ws-service sample directory -and do - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-service.jar helloworld.HelloWorldServer - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-service.jar helloworld.HelloWorldServer - - -Once the server is running open a command prompt, navigate to this sample -directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-reference.jar helloworld.HelloWorldClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-reference.jar helloworld.HelloWorldClient - - -Sample Overview ---------------- -The sample provides a single component that is wired to a reference with a -web service binding. The binding refers to WSDL that identifies the service -exposed by the helloworld-ws-service sample. - -helloworld-ws-reference/ - src/ - main/ - java/ - helloworld/ - HelloWorldService.java - interface description for - HelloWorldServiceComponent - HelloWorldServiceComponent.java - component implementation - HelloWorldClient.java - starts the SCA Runtime and - deploys the helloworldwsclient - .composite. It then calls the - HelloWorldServiceComponent - resources/ - wsdl - helloworld.wsdl - the service description that the - SCA reference uses to bind to - helloworldwsclient.composite - the SCA assembly for this sample - logging.properties - log4j configuration file - test/ - java/ - helloworld/ - HelloWorldClientTestCase.java - JUnit test case - HelloWorldServerTest.java - starts the Web service - helloworld-ws-reference.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant. Before -you do this start up the service that the reference will talk to. To do this -run up the helloworld-ws-service test. Take a look at the README in that sample -and you will see you need the following commands - -cd helloworld-ws-service -ant run - -Once done you can now compile and run this sample using the following commands; - -cd helloworld-ws-reference -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] Injected helloWorldService - [java] Called getGreetings - [java] Hello World - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. When using Maven you don't need to run the helloworld- -ws-service sample first as Maven does this for you. - -cd helloworld-ws-reference -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running helloworld.HelloWorldClientTestCase -14-Jan-2008 14:06:12 org.apache.catalina.core.StandardEngine start -INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 -14-Jan-2008 14:06:12 org.apache.catalina.startup.ContextConfig defaultWebConfig -INFO: No default web.xml -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_1_4.xsd -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/xml.xsd -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_ -0.xsd -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/web-app_2_4.xsd -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xs -d -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_client -_1_1.xsd -14-Jan-2008 14:06:12 org.apache.coyote.http11.Http11Protocol init -INFO: Initializing Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:06:12 org.apache.coyote.http11.Http11Protocol start -INFO: Starting Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:06:12 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:8085/HelloWorldService -Injected helloWorldService -Called getGreetings -14-Jan-2008 14:06:14 org.apache.coyote.http11.Http11Protocol destroy -INFO: Stopping Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:06:17 org.apache.catalina.core.StandardEngine start -INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 -14-Jan-2008 14:06:17 org.apache.catalina.loader.WebappLoader start -INFO: Dual registration of jndi stream handler: factory already defined -14-Jan-2008 14:06:17 org.apache.catalina.startup.ContextConfig defaultWebConfig -INFO: No default web.xml -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_1_4.xsd -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/xml.xsd -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_ -0.xsd -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/web-app_2_4.xsd -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xs -d -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_client -_1_1.xsd -14-Jan-2008 14:06:17 org.apache.coyote.http11.Http11Protocol init -INFO: Initializing Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:06:17 org.apache.coyote.http11.Http11Protocol start -INFO: Starting Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:06:17 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:8085/HelloWorldService -Injected helloWorldService -Called getGreetings -14-Jan-2008 14:06:18 org.apache.coyote.http11.Http11Protocol destroy -INFO: Stopping Coyote HTTP/1.1 on http-8085 -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.625 sec - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/helloworld-ws-reference.png b/branches/sca-android/samples/helloworld-ws-reference-lean/helloworld-ws-reference.png deleted file mode 100644 index bd2bba41db..0000000000 Binary files a/branches/sca-android/samples/helloworld-ws-reference-lean/helloworld-ws-reference.png and /dev/null differ diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/helloworld-ws-reference.svg b/branches/sca-android/samples/helloworld-ws-reference-lean/helloworld-ws-reference.svg deleted file mode 100644 index 354ffbae8f..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/helloworld-ws-reference.svg +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldwsclient - - HelloWorldServiceComponent - - - HelloWorldService - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/pom.xml b/branches/sca-android/samples/helloworld-ws-reference-lean/pom.xml deleted file mode 100644 index 6f672b5054..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-helloworld-ws-reference-lean - Apache Tuscany SCA HelloWorld Web Service Reference Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - sample-helloworld-ws-service - 1.4-SNAPSHOT - test - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient.java b/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient.java deleted file mode 100644 index f8d66876fa..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -/** - * The HelloWorld client implementation - */ -@Scope("COMPOSITE") @EagerInit -public class HelloWorldClient { - - static HelloWorldService helloWorldService; - - @Reference - public void setHelloWorldService(HelloWorldService service) { - helloWorldService = service; - } - - public final static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("helloworldwsclient.composite"); - - String value = helloWorldService.getGreetings("World"); - System.out.println(value); - - scaDomain.close(); - } -} \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient2.java b/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient2.java deleted file mode 100644 index 13a31b6391..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient2.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -/** - * The HelloWorld client implementation - */ -@Scope("COMPOSITE") @EagerInit -public class HelloWorldClient2 { - - private static HelloWorldClient2 client; - - @Reference - public HelloWorldService helloWorldService; - - public HelloWorldClient2() { - client = this; - } - - public final static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("helloworldwsclient2.composite"); - - client.doit(args); - - scaDomain.close(); - } - - void doit(String[] args) { - String value = helloWorldService.getGreetings("World"); - System.out.println(value); - } -} \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient3.java b/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient3.java deleted file mode 100644 index 6d1722095b..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient3.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -/** - * The HelloWorld client implementation - */ -@Scope("COMPOSITE") @EagerInit -public class HelloWorldClient3 { - - @Reference - public HelloWorldService helloWorldService; - - public final static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("helloworldwsclient3.composite"); - - scaDomain.getService(HelloWorldClient3.class, "HelloWorldClient3").doit(args); - - scaDomain.close(); - } - - public void doit(String[] args) { - String value = helloWorldService.getGreetings("World"); - System.out.println(value); - } -} \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient4.java b/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient4.java deleted file mode 100644 index 3def5194a5..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient4.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.osoa.sca.ComponentContext; -import org.osoa.sca.annotations.Context; -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Scope; - -/** - * The HelloWorld client implementation - */ -@Scope("COMPOSITE") @EagerInit -public class HelloWorldClient4 { - - static ComponentContext clientContext; - - @Context - public void setContext(ComponentContext context) { - clientContext = context; - } - - public final static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("helloworldwsclient4.composite"); - - HelloWorldService helloWorldService = clientContext.getService(HelloWorldService.class, "helloWorldService"); - String value = helloWorldService.getGreetings("World"); - System.out.println(value); - - scaDomain.close(); - } - - public void doit(String[] args) { - } -} \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient5.java b/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient5.java deleted file mode 100644 index 7c1853566f..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldClient5.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -/** - * The HelloWorld client implementation - */ -@Scope("COMPOSITE") @EagerInit -public class HelloWorldClient5 { - - @Reference - public HelloWorldService helloWorldService; - - public final static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("helloworldwsclient5.composite"); - - scaDomain.close(); - } - - @Init - public void doit() { - String value = helloWorldService.getGreetings("World"); - System.out.println(value); - } -} \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldService.java b/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index db0c947cf7..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Remotable; - -/** - * The interface for the helloworld service - */ -@Remotable -public interface HelloWorldService { - public String getGreetings(String name); -} diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient.composite b/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient.composite deleted file mode 100644 index 991e4b4881..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient2.composite b/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient2.composite deleted file mode 100644 index 6ea14602b3..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient2.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient3.composite b/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient3.composite deleted file mode 100644 index 3d6364f55f..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient3.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient4.composite b/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient4.composite deleted file mode 100644 index 106e9db988..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient4.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient5.composite b/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient5.composite deleted file mode 100644 index bbac4c3703..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/helloworldwsclient5.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/logging.properties b/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/logging.properties deleted file mode 100644 index 3dca310cdb..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/logging.properties +++ /dev/null @@ -1,30 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# $Rev$ $Date$ -# - -# Custom logging configuration for Tuscany samples -# By default, only INFO level logging is enabled and ALL messages get sent to the console -# For more messages from the runtime, uncomment specific settings at the end of this file -handlers = java.util.logging.ConsoleHandler -java.util.logging.ConsoleHandler.level = ALL -java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter -.level=INFO - -# Uncomment the next setting to get all Tuscany messages (this will be a lot) -#org.apache.tuscany.level=FINEST diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 662c9affac..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/src/test/java/helloworld/HelloWorldClientTestCase.java b/branches/sca-android/samples/helloworld-ws-reference-lean/src/test/java/helloworld/HelloWorldClientTestCase.java deleted file mode 100644 index 51b70f47c2..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/src/test/java/helloworld/HelloWorldClientTestCase.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package helloworld; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.apache.tuscany.sca.host.embedded.SCATestCaseRunner; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Test case for helloworld web service client - */ -public class HelloWorldClientTestCase extends HelloWorldClient { - - private SCADomain scaDomain; - private SCATestCaseRunner server; - - @Before - public void startClient() throws Exception { - scaDomain = SCADomain.newInstance("helloworldwsclient.composite"); - - server = new SCATestCaseRunner(HelloWorldTestServer.class); - server.before(); - } - - @Test - public void testWSClient() throws Exception { - String msg = helloWorldService.getGreetings("Smith"); - Assert.assertEquals("Hello Smith", msg); - } - - @After - public void stopClient() throws Exception { - server.after(); - scaDomain.close(); - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-reference-lean/src/test/java/helloworld/HelloWorldTestServer.java b/branches/sca-android/samples/helloworld-ws-reference-lean/src/test/java/helloworld/HelloWorldTestServer.java deleted file mode 100644 index 8226ec884e..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-lean/src/test/java/helloworld/HelloWorldTestServer.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import java.io.IOException; -import java.net.Socket; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Starts up the SCA runtime which starts listening for service requests - */ -public class HelloWorldTestServer { - - private SCADomain scaDomain; - - @Before - public void startServer() throws Exception { - try { - scaDomain = SCADomain.newInstance("META-INF/sca-deployables/helloworldws.composite"); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Test - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - @After - public void stopServer() throws Exception { - scaDomain.close(); - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-reference-secure/README b/branches/sca-android/samples/helloworld-ws-reference-secure/README deleted file mode 100644 index 167991c8f7..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-secure/README +++ /dev/null @@ -1,176 +0,0 @@ -Hello World Secure Web Service References Sample -================================================ -This sample demonstrates an SCA reference that uses a web service binding. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens you need to run the server first -so open a command prompt, navigate to the helloworld-ws-service sample directory -and do - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-service-secure.jar helloworld.HelloWorldServer - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-service-secure.jar helloworld.HelloWorldServer - - -Once the server is running open a command prompt, navigate to this sample -directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-reference-secure.jar helloworld.HelloWorldClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-reference-secure.jar helloworld.HelloWorldClient - - -Sample Overview ---------------- -The sample provides a single component that is wired to a reference with a -web service binding. The binding refers to WSDL that identifies the service -exposed by the helloworld-ws-service-secure sample. This sample invokes a -secure web-serivce and hence specifies a policy intent named 'authentication' -which is fulfilled by a suitable policyset that is defined for the SCA Domain. -Over the helloworld-ws-reference sample, this sample demonstrate generally -the use of policy intents and policy sets in Tuscany taking the specific instance -of a security policy. - -Note : ------- -The policies mentioned and supported are instances of Tuscany specified policies and -not instnaces of WS-Policy. - -helloworld-ws-reference-secure/ - src/ - main/ - java/ - helloworld/ - HelloWorldService.java - interface description for - HelloWorldServiceComponent - HelloWorldServiceComponent.java - component implementation - HelloWorldClient.java - starts the SCA Runtime and - deploys the helloworldwsclient - .composite. It then calls the - HelloWorldServiceComponent - ClientPWCBHandler.java - Callback handler class to provide client password. The - handle(Callback[] callbacks) method of this class is where - code for accessing user registries and retrieving passwords - for given user identifiers can be encapsulated. For example - here is where one could access LDAP registries to obtain or - compare user identities and passwords. - - resources/ - wsdl - helloworld.wsdl - the service description that the - SCA reference uses to bind to - helloworldwsclient.composite - the SCA assembly for this sample - logging.properties - log4j configuration file - definitions.xml - the SCA Definitions file that contains intents and policysets - defined for the SCA Domain - test/ - java/ - helloworld/ - HelloWorldClientTestCase.java - JUnit test case - HelloWorldServerTest.java - starts the Web service - helloworld-ws-reference-secure.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant. Before -you do this start up the service that the reference will talk to. To do this -run up the helloworld-ws-service-secure test. Take a look at the README in that sample -and you will see you need the following commands - -cd helloworld-ws-service-secure -ant run - -Once done you can now compile and run this sample using the following commands; - -cd helloworld-ws-reference-secure -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] log4j:WARN No appenders could be found for logger (org.apache.axiom. -om.util.StAXUtils). - [java] log4j:WARN Please initialize the log4j system properly. - [java] Injected helloWorldService - [java] Called getGreetings - [java] *** Calling Client UserId/Password Handler .... - [java] Hello World - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. When using Maven you don't need to run the helloworld- -ws-service-secure sample first as Maven does this for you. - -cd helloworld-ws-reference-secure -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running helloworld.HelloWorldClientTestCase -log4j:WARN No appenders could be found for logger (org.apache.axiom.om.util.StAX -Utils). -log4j:WARN Please initialize the log4j system properly. -log4j:WARN No appenders could be found for logger (org.apache.axiom.om.util.StAX -Utils). -log4j:WARN Please initialize the log4j system properly. -10-May-2007 13:40:34 org.apache.catalina.core.StandardEngine start -INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 -10-May-2007 13:40:35 org.apache.catalina.startup.ContextConfig defaultWebConfig -INFO: No default web.xml -10-May-2007 13:40:35 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_1_4.xsd -10-May-2007 13:40:35 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/xml.xsd -10-May-2007 13:40:35 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd -10-May-2007 13:40:35 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_ -0.xsd -10-May-2007 13:40:35 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/web-app_2_4.xsd -10-May-2007 13:40:35 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xs -d -10-May-2007 13:40:35 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_client -_1_1.xsd -10-May-2007 13:40:35 org.apache.coyote.http11.Http11Protocol init -INFO: Initializing Coyote HTTP/1.1 on http-8085 -10-May-2007 13:40:35 org.apache.coyote.http11.Http11Protocol start -INFO: Starting Coyote HTTP/1.1 on http-8085 -Injected helloWorldService -Called getGreetings -*** Calling Client UserId/Password Handler .... -*** Calling Server User/Passwd Handler.... -10-May-2007 13:40:36 org.apache.coyote.http11.Http11Protocol destroy -INFO: Stopping Coyote HTTP/1.1 on http-8085 -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.349 sec - -Results : - - -This shows that the Junit test cases have run successfully. Also note that the client side and server side -callback handlers for authentication have been called. diff --git a/branches/sca-android/samples/helloworld-ws-reference-secure/build.xml b/branches/sca-android/samples/helloworld-ws-reference-secure/build.xml deleted file mode 100644 index 38f1b7549d..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-secure/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-secure/helloworld-ws-reference-secure.png b/branches/sca-android/samples/helloworld-ws-reference-secure/helloworld-ws-reference-secure.png deleted file mode 100644 index bd2bba41db..0000000000 Binary files a/branches/sca-android/samples/helloworld-ws-reference-secure/helloworld-ws-reference-secure.png and /dev/null differ diff --git a/branches/sca-android/samples/helloworld-ws-reference-secure/helloworld-ws-reference-secure.svg b/branches/sca-android/samples/helloworld-ws-reference-secure/helloworld-ws-reference-secure.svg deleted file mode 100644 index 333ad53e0a..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-secure/helloworld-ws-reference-secure.svg +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldwsclient - - HelloWorldServiceComponent - - - HelloWorldService - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-secure/pom.xml b/branches/sca-android/samples/helloworld-ws-reference-secure/pom.xml deleted file mode 100644 index 8c624a72b3..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-secure/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-helloworld-ws-reference-secure - Apache Tuscany SCA HelloWorld Secure Web Service Reference Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.ws.security - wss4j - 1.5.3 - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - sample-helloworld-ws-service-secure - 1.4-SNAPSHOT - test - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/java/helloworld/ClientPWCBHandler.java b/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/java/helloworld/ClientPWCBHandler.java deleted file mode 100644 index 0f1ebf46d6..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/java/helloworld/ClientPWCBHandler.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.apache.ws.security.WSPasswordCallback; - -/** - * Sample userid passwd generation class - */ -public class ClientPWCBHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, - UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - System.out.println("*** Calling Client UserId/Password Handler .... "); - WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i]; - System.out.println("User Id = " + pwcb.getIdentifer()); - pwcb.setPassword("TuscanyWsUserPasswd"); - System.out.println("Set Password = " + pwcb.getPassword()); - } - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldClient.java b/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldClient.java deleted file mode 100644 index a21619fc8a..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldClient.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program shows how to create an SCA runtime, start it, - * locate the HelloWorld service and invoke it. - */ -public class HelloWorldClient { - - public final static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("helloworldwsclient.composite"); - HelloWorldService helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent"); - - String value = helloWorldService.getGreetings("World"); - System.out.println(value); - - helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldWsPolicyServiceComponent"); - value = helloWorldService.getGreetings("WsPolicyWorld"); - System.out.println(value); - - scaDomain.close(); - } -} diff --git a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldService.java b/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index c0259c6e07..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Remotable; - -/** - * The interface for the helloworld service - */ -@Remotable -public interface HelloWorldService { - public String getGreetings(String name); -} diff --git a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldServiceComponent.java b/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldServiceComponent.java deleted file mode 100644 index 27cef47677..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldServiceComponent.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -/** - * The HelloWorld service implementation - */ -public class HelloWorldServiceComponent implements HelloWorldService { - - HelloWorldService helloWorldService; - - public String getGreetings(String name) { - System.out.println("Called getGreetings"); - return helloWorldService.getGreetings(name); - } - - public HelloWorldService getHelloWorldService() { - System.out.println("Got Injected helloWorldService"); - return helloWorldService; - } - - public void setHelloWorldService(HelloWorldService helloWorldService) { - System.out.println("Injected helloWorldService"); - this.helloWorldService = helloWorldService; - } -} \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler b/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler deleted file mode 100644 index 8b089c7222..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler +++ /dev/null @@ -1,21 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# PolicyHandlerClasses to interpret specific PolicyModels against specific QoS infrastructures -# handler classname;qname=;model= -org.apache.tuscany.sca.policy.security.ws.Axis2ConfigParamPolicyHandler;intent=http://helloworld#wsAuthentication,model=org.apache.tuscany.sca.policy.security.ws.Axis2ConfigParamPolicy -org.apache.tuscany.sca.policy.security.ws.WSSecurityPolicyHandler;intent=http://helloworld#wsIntegrity,model=org.apache.neethi.Policy \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/definitions.xml b/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/definitions.xml deleted file mode 100644 index 0ab3a5a9f1..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/definitions.xml +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - - - UsernameToken - TuscanyWsUser - helloworld.ClientPWCBHandler" + - PasswordText - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TuscanyWsUser - TuscanyWsUser - helloworld.ClientPWCBHandler - - - - JKS - helloworldKeys.jks - TuscanyWsUserPasswd - - - - - - - - - - - - - - - - - UsernameToken - helloworld.ServerPWCBHandler - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TuscanyWsUser - TuscanyWsUser - helloworld.ServerPWCBHandler - - - - JKS - helloworldKeys.jks - TuscanyWsUserPasswd - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/helloworldKeys.jks b/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/helloworldKeys.jks deleted file mode 100644 index 0b4f2399f0..0000000000 Binary files a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/helloworldKeys.jks and /dev/null differ diff --git a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/helloworldwsclient.composite b/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/helloworldwsclient.composite deleted file mode 100644 index 904befaf60..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/helloworldwsclient.composite +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/logging.properties b/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/logging.properties deleted file mode 100644 index 3a4b43222d..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/logging.properties +++ /dev/null @@ -1,30 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# $Rev: 463856 $ $Date: 2006-10-14 03:54:29 +0530 (Sat, 14 Oct 2006) $ -# - -# Custom logging configuration for Tuscany samples -# By default, only INFO level logging is enabled and ALL messages get sent to the console -# For more messages from the runtime, uncomment specific settings at the end of this file -handlers = java.util.logging.ConsoleHandler -java.util.logging.ConsoleHandler.level = ALL -java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter -.level=INFO - -# Uncomment the next setting to get all Tuscany messages (this will be a lot) -#org.apache.tuscany.level=FINEST diff --git a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index e6fcc6f4a6..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-secure/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference-secure/src/test/java/helloworld/HelloWorldClientTestCase.java b/branches/sca-android/samples/helloworld-ws-reference-secure/src/test/java/helloworld/HelloWorldClientTestCase.java deleted file mode 100644 index 848c41d1c7..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-secure/src/test/java/helloworld/HelloWorldClientTestCase.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package helloworld; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.apache.tuscany.sca.host.embedded.SCATestCaseRunner; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Test case for helloworld web service client - */ -public class HelloWorldClientTestCase { - - private HelloWorldService helloWorldService; - private HelloWorldService helloTuscanyService; - private SCADomain scaDomain; - - private SCATestCaseRunner server; - - @Before - public void startClient() throws Exception { - try { - scaDomain = SCADomain.newInstance("helloworldwsclient.composite"); - helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent"); - helloTuscanyService = scaDomain.getService(HelloWorldService.class, "HelloTuscanyServiceComponent"); - - server = new SCATestCaseRunner(HelloWorldTestServer.class); - server.before(); - - } catch (Throwable e) { - e.printStackTrace(); - } - } - - @Test - public void testWSClient() throws Exception { - String msg = helloWorldService.getGreetings("Smith"); - Assert.assertEquals("Hello Smith", msg); - } - - @Test - public void testEmbeddedReferenceClient() throws Exception { - String msg = helloTuscanyService.getGreetings("Tuscany"); - Assert.assertEquals("Hello Tuscany", msg); - } - - @After - public void stopClient() throws Exception { - server.after(); - scaDomain.close(); - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-reference-secure/src/test/java/helloworld/HelloWorldTestServer.java b/branches/sca-android/samples/helloworld-ws-reference-secure/src/test/java/helloworld/HelloWorldTestServer.java deleted file mode 100644 index 21f2166560..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference-secure/src/test/java/helloworld/HelloWorldTestServer.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import java.io.IOException; -import java.net.Socket; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Starts up the SCA runtime which starts listening for service requests - */ -public class HelloWorldTestServer { - - private SCADomain scaDomain; - - @Before - public void startServer() throws Exception { - try { - scaDomain = SCADomain.newInstance("helloworldws.composite"); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Test - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - @After - public void stopServer() throws Exception { - scaDomain.close(); - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-reference/README b/branches/sca-android/samples/helloworld-ws-reference/README deleted file mode 100644 index 13c89ab2f6..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference/README +++ /dev/null @@ -1,178 +0,0 @@ -Hello World Web Service References Sample -========================================= -This sample demonstrates an SCA reference that uses a web service binding. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens you need to run the server first -so open a command prompt, navigate to the helloworld-ws-service sample directory -and do - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-service.jar helloworld.HelloWorldServer - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-service.jar helloworld.HelloWorldServer - - -Once the server is running open a command prompt, navigate to this sample -directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-reference.jar helloworld.HelloWorldClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-reference.jar helloworld.HelloWorldClient - - -Sample Overview ---------------- -The sample provides a single component that is wired to a reference with a -web service binding. The binding refers to WSDL that identifies the service -exposed by the helloworld-ws-service sample. - -helloworld-ws-reference/ - src/ - main/ - java/ - helloworld/ - HelloWorldService.java - interface description for - HelloWorldServiceComponent - HelloWorldServiceComponent.java - component implementation - HelloWorldClient.java - starts the SCA Runtime and - deploys the helloworldwsclient - .composite. It then calls the - HelloWorldServiceComponent - resources/ - wsdl - helloworld.wsdl - the service description that the - SCA reference uses to bind to - helloworldwsclient.composite - the SCA assembly for this sample - logging.properties - log4j configuration file - test/ - java/ - helloworld/ - HelloWorldClientTestCase.java - JUnit test case - HelloWorldServerTest.java - starts the Web service - helloworld-ws-reference.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant. Before -you do this start up the service that the reference will talk to. To do this -run up the helloworld-ws-service test. Take a look at the README in that sample -and you will see you need the following commands - -cd helloworld-ws-service -ant run - -Once done you can now compile and run this sample using the following commands; - -cd helloworld-ws-reference -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] Injected helloWorldService - [java] Called getGreetings - [java] Hello World - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. When using Maven you don't need to run the helloworld- -ws-service sample first as Maven does this for you. - -cd helloworld-ws-reference -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running helloworld.HelloWorldClientTestCase -14-Jan-2008 14:06:12 org.apache.catalina.core.StandardEngine start -INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 -14-Jan-2008 14:06:12 org.apache.catalina.startup.ContextConfig defaultWebConfig -INFO: No default web.xml -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_1_4.xsd -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/xml.xsd -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_ -0.xsd -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/web-app_2_4.xsd -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xs -d -14-Jan-2008 14:06:12 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_client -_1_1.xsd -14-Jan-2008 14:06:12 org.apache.coyote.http11.Http11Protocol init -INFO: Initializing Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:06:12 org.apache.coyote.http11.Http11Protocol start -INFO: Starting Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:06:12 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:8085/HelloWorldService -Injected helloWorldService -Called getGreetings -14-Jan-2008 14:06:14 org.apache.coyote.http11.Http11Protocol destroy -INFO: Stopping Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:06:17 org.apache.catalina.core.StandardEngine start -INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 -14-Jan-2008 14:06:17 org.apache.catalina.loader.WebappLoader start -INFO: Dual registration of jndi stream handler: factory already defined -14-Jan-2008 14:06:17 org.apache.catalina.startup.ContextConfig defaultWebConfig -INFO: No default web.xml -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_1_4.xsd -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/xml.xsd -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_ -0.xsd -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/web-app_2_4.xsd -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xs -d -14-Jan-2008 14:06:17 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_client -_1_1.xsd -14-Jan-2008 14:06:17 org.apache.coyote.http11.Http11Protocol init -INFO: Initializing Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:06:17 org.apache.coyote.http11.Http11Protocol start -INFO: Starting Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:06:17 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:8085/HelloWorldService -Injected helloWorldService -Called getGreetings -14-Jan-2008 14:06:18 org.apache.coyote.http11.Http11Protocol destroy -INFO: Stopping Coyote HTTP/1.1 on http-8085 -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.625 sec - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/helloworld-ws-reference/build.xml b/branches/sca-android/samples/helloworld-ws-reference/build.xml deleted file mode 100644 index 71ee66b31e..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference/helloworld-ws-reference.png b/branches/sca-android/samples/helloworld-ws-reference/helloworld-ws-reference.png deleted file mode 100644 index bd2bba41db..0000000000 Binary files a/branches/sca-android/samples/helloworld-ws-reference/helloworld-ws-reference.png and /dev/null differ diff --git a/branches/sca-android/samples/helloworld-ws-reference/helloworld-ws-reference.svg b/branches/sca-android/samples/helloworld-ws-reference/helloworld-ws-reference.svg deleted file mode 100644 index 354ffbae8f..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference/helloworld-ws-reference.svg +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldwsclient - - HelloWorldServiceComponent - - - HelloWorldService - - diff --git a/branches/sca-android/samples/helloworld-ws-reference/pom.xml b/branches/sca-android/samples/helloworld-ws-reference/pom.xml deleted file mode 100644 index f8da8ad6e0..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-helloworld-ws-reference - Apache Tuscany SCA HelloWorld Web Service Reference Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - sample-helloworld-ws-service - 1.4-SNAPSHOT - test - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldClient.java b/branches/sca-android/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldClient.java deleted file mode 100644 index 4559b282fe..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldClient.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program shows how to create an SCA runtime, start it, - * locate the HelloWorld service and invoke it. - */ -public class HelloWorldClient { - - public final static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("helloworldwsclient.composite"); - HelloWorldService helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent"); - - String value = helloWorldService.getGreetings("World"); - System.out.println(value); - - scaDomain.close(); - } -} diff --git a/branches/sca-android/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldService.java b/branches/sca-android/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index db0c947cf7..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Remotable; - -/** - * The interface for the helloworld service - */ -@Remotable -public interface HelloWorldService { - public String getGreetings(String name); -} diff --git a/branches/sca-android/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldServiceComponent.java b/branches/sca-android/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldServiceComponent.java deleted file mode 100644 index 0dee19550b..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldServiceComponent.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -/** - * The HelloWorld service implementation - */ -public class HelloWorldServiceComponent implements HelloWorldService { - - HelloWorldService helloWorldService; - - public String getGreetings(String name) { - System.out.println("Called getGreetings"); - return helloWorldService.getGreetings(name); - } - - public HelloWorldService getHelloWorldService() { - System.out.println("Got Injected helloWorldService"); - return helloWorldService; - } - - public void setHelloWorldService(HelloWorldService helloWorldService) { - System.out.println("Injected helloWorldService"); - this.helloWorldService = helloWorldService; - } -} \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-ws-reference/src/main/resources/helloworldwsclient.composite b/branches/sca-android/samples/helloworld-ws-reference/src/main/resources/helloworldwsclient.composite deleted file mode 100644 index 899ad5ce35..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference/src/main/resources/helloworldwsclient.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference/src/main/resources/logging.properties b/branches/sca-android/samples/helloworld-ws-reference/src/main/resources/logging.properties deleted file mode 100644 index 3dca310cdb..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference/src/main/resources/logging.properties +++ /dev/null @@ -1,30 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# $Rev$ $Date$ -# - -# Custom logging configuration for Tuscany samples -# By default, only INFO level logging is enabled and ALL messages get sent to the console -# For more messages from the runtime, uncomment specific settings at the end of this file -handlers = java.util.logging.ConsoleHandler -java.util.logging.ConsoleHandler.level = ALL -java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter -.level=INFO - -# Uncomment the next setting to get all Tuscany messages (this will be a lot) -#org.apache.tuscany.level=FINEST diff --git a/branches/sca-android/samples/helloworld-ws-reference/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-android/samples/helloworld-ws-reference/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 662c9affac..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldClientTestCase.java b/branches/sca-android/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldClientTestCase.java deleted file mode 100644 index 7ce89179c2..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldClientTestCase.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package helloworld; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.apache.tuscany.sca.host.embedded.SCATestCaseRunner; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Test case for helloworld web service client - */ -public class HelloWorldClientTestCase { - - private HelloWorldService helloWorldService; - private HelloWorldService helloTuscanyService; - private SCADomain scaDomain; - - private SCATestCaseRunner server; - - @Before - public void startClient() throws Exception { - try { - scaDomain = SCADomain.newInstance("helloworldwsclient.composite"); - helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent"); - helloTuscanyService = scaDomain.getService(HelloWorldService.class, "HelloTuscanyServiceComponent"); - - server = new SCATestCaseRunner(HelloWorldTestServer.class); - server.before(); - - } catch (Throwable e) { - e.printStackTrace(); - } - } - - @Test - public void testWSClient() throws Exception { - String msg = helloWorldService.getGreetings("Smith"); - Assert.assertEquals("Hello Smith", msg); - } - - @Test - public void testEmbeddedReferenceClient() throws Exception { - String msg = helloTuscanyService.getGreetings("Tuscany"); - Assert.assertEquals("Hello Tuscany", msg); - } - - @After - public void stopClient() throws Exception { - server.after(); - scaDomain.close(); - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldTestServer.java b/branches/sca-android/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldTestServer.java deleted file mode 100644 index 8226ec884e..0000000000 --- a/branches/sca-android/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldTestServer.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import java.io.IOException; -import java.net.Socket; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Starts up the SCA runtime which starts listening for service requests - */ -public class HelloWorldTestServer { - - private SCADomain scaDomain; - - @Before - public void startServer() throws Exception { - try { - scaDomain = SCADomain.newInstance("META-INF/sca-deployables/helloworldws.composite"); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Test - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - @After - public void stopServer() throws Exception { - scaDomain.close(); - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-sdo-webapp/README b/branches/sca-android/samples/helloworld-ws-sdo-webapp/README deleted file mode 100644 index aa4819927a..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo-webapp/README +++ /dev/null @@ -1,92 +0,0 @@ -Hello World Web Service SDO WebApp Sample -========================================= -This sample demonstrates an SCA web service binding which works with -SDO and runs as a web application. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -As this sample provides a web app there is a manual step where the WAR file -that contains the sample is is built and copied to your web app container. -See the sections below for instructions on building the war. - -Once the web app is deployed use your browser to visit the following URL; - - http://localhost:8080/sample-helloworld-ws-sdo-webapp - -The port and hostname will of course vary depending on your local installation. - -The resulting web page displayed should show: - - Hello John Smith, Jane Doe! - -Sample Overview ---------------- -The sample builds a war with a single JSP (HelloWorld.jsp). This JSP -calls an SCA component with an SDO parameter. This in turn calls another -SCA component with the SDO parameter. The contents of the SDO are then -returned as a simple string. This sample shows how SDO objects can -be passed into and between services in the context of a web application. - - -helloworld-jsonrpc-webapp/ - src/ - main/ - java/ - helloworld/ - HelloWorld.java - service interface - HelloWorldComponent.java - first service implementation - HelloWorldmpl.java - second service implementation - resources/ - wsdl/ - helloworld.wsdl - the web services description - helloworld.xsd - the SDO description - helloworldws.composite - the SCA assembly for this sample - webapp - META-INF/ - sca-contribution.xml - specifies the composite to be deployed - WEB-INF/ - web.xml - defines the listener that starts up the - Tuscany SCA runtime - HelloWorld.jsp - the web application that calls the - SCA service passing in an SDO - - helloworld-ws-sdo-webapp.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built using Ant as -follows - -cd helloworld-ws-sdo-webapp -ant package - -This should result in a war file (sample-helloworld-ws-sdo-webapp.war) in the target -directory. Copy this war file to your web app deployment directory in your -web app container. - -The process for getting the web app running will depend on which web app container -you are using. For example, if you are using Tomcat then it is simply a matter -of copying the WAR file to the webapps directory. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-helloworld-ws-sdo-webapp - -The port and hostname will of course vary depending on your local installation. - -Building The Sample Using Maven -------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. When using Maven you don't need to run the helloworld- -ws-service sample first as Maven does this for you. - -cd helloworld-ws-sdo-webapp -mvn - -That should end with "BUILD SUCCESSFUL" and create the target/sample-helloworld-ws-sdo-webapp.war -which you can copy to your server. diff --git a/branches/sca-android/samples/helloworld-ws-sdo-webapp/build.xml b/branches/sca-android/samples/helloworld-ws-sdo-webapp/build.xml deleted file mode 100644 index 386008e707..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo-webapp/build.xml +++ /dev/null @@ -1,99 +0,0 @@ - - -]> - - - &buildDependency; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-sdo-webapp/helloworld-ws-sdo-webapp.png b/branches/sca-android/samples/helloworld-ws-sdo-webapp/helloworld-ws-sdo-webapp.png deleted file mode 100644 index 2590f02a45..0000000000 Binary files a/branches/sca-android/samples/helloworld-ws-sdo-webapp/helloworld-ws-sdo-webapp.png and /dev/null differ diff --git a/branches/sca-android/samples/helloworld-ws-sdo-webapp/helloworld-ws-sdo-webapp.svg b/branches/sca-android/samples/helloworld-ws-sdo-webapp/helloworld-ws-sdo-webapp.svg deleted file mode 100644 index 56a29db23c..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo-webapp/helloworld-ws-sdo-webapp.svg +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldws - - HelloWorldServiceComponent - - - - HelloWorldImpl - - - SDO - HelloWorld.jsp - - - sample-helloworld-ws-sdo-webapp.war - - - diff --git a/branches/sca-android/samples/helloworld-ws-sdo-webapp/pom.xml b/branches/sca-android/samples/helloworld-ws-sdo-webapp/pom.xml deleted file mode 100644 index 7d4fdd95e6..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo-webapp/pom.xml +++ /dev/null @@ -1,200 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-helloworld-ws-sdo-webapp - war - Apache Tuscany SCA HelloWorld Web Service SDO Sample WebApp - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.4-SNAPSHOT - - - - org.apache.tuscany.sdo - tuscany-sdo-api-r2.1 - 1.1.1 - - - org.apache.tuscany.sdo - tuscany-sdo-lib - 1.1.1 - - - org.apache.tuscany.sdo - tuscany-sdo-impl - 1.1.1 - - - org.apache.tuscany.sca - tuscany-databinding-sdo - 1.4-SNAPSHOT - compile - - - - - - - - stax - stax-api - 1.0.1 - provided - - - - - javax.servlet - servlet-api - 2.3 - provided - - - - junit - junit - 4.2 - test - - - - org.codehaus.woodstox - wstx-asl - 3.2.1 - runtime - - - - - - ${artifactId} - - - org.codehaus.mojo - build-helper-maven-plugin - 1.0 - - - add-source - generate-sources - - add-test-source - - - - target/sdo-source - - - - - - - org.apache.tuscany.sdo - tuscany-sdo-plugin - 1.1.1 - - - generate-helloworld-sdo - generate-sources - - - - ${basedir}/src/main/resources/wsdl/helloworld.xsd - helloworld.type - Type - true - - - ${basedir}/src/main/resources/wsdl/helloworld.wsdl - helloworld - Helloworld - true - - - - - generate - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - true - - - generate - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorld.java b/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorld.java deleted file mode 100644 index eb82418516..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorld.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * HelloWorld.java - * - * This file was auto-generated from WSDL - * by the Apache Axis2 version: #axisVersion# #today# - */ -package helloworld; - -import org.osoa.sca.annotations.Remotable; - -/* - * HelloWorld java interface - */ - -@Remotable -public interface HelloWorld { - - /** - * Auto generated method signatures - * - * @param getGreetings - */ - public java.lang.String getGreetings(helloworld.Party getGreetings); - -} diff --git a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldComponent.java b/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldComponent.java deleted file mode 100644 index fea4e2a16c..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldComponent.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - - -public class HelloWorldComponent implements HelloWorld { - - HelloWorld helloWorld; - - public String getGreetings(Party party) { - System.out.println("Called getGreetings"); - return helloWorld.getGreetings(party); - } - - public HelloWorld getHelloWorld() { - System.out.println("Got Injected helloWorld"); - return helloWorld; - } - - public void setHelloWorld(HelloWorld helloWorld) { - System.out.println("Injected helloWorld"); - this.helloWorld = helloWorld; - } -} diff --git a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 3d6576aca0..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import java.util.List; - -import org.osoa.sca.annotations.Service; - -@Service(HelloWorld.class) -public class HelloWorldImpl implements HelloWorld { - - public String getGreetings(Party party) { - System.out.println("Greeting party"); - StringBuffer greetings = new StringBuffer(); - greetings.append("Hello "); - List people = party.getPeople(); - int i=0; - for (Person person : people) { - greetings.append(person.getFirstName()); - greetings.append(" "); - greetings.append(person.getLastName()); - i++; - if (i < people.size()) { - greetings.append(", "); - } - } - greetings.append("!"); - - return greetings.toString(); - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/resources/helloworldws.composite b/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/resources/helloworldws.composite deleted file mode 100644 index 34396b1b02..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/resources/helloworldws.composite +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index fe79094b94..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.xsd b/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.xsd deleted file mode 100644 index a0b7c37cd9..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/webapp/HelloWorld.jsp b/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/webapp/HelloWorld.jsp deleted file mode 100644 index 4657c6cdc1..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/webapp/HelloWorld.jsp +++ /dev/null @@ -1,48 +0,0 @@ -<%-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---%> - -<%@ page import="org.apache.tuscany.sca.host.embedded.SCADomain"%> -<%@ page import="helloworld.HelloWorld" %> -<%@ page import="helloworld.HelloworldFactory"%> -<%@ page import="helloworld.Party"%> -<%@ page import="helloworld.Person"%> - -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<% - SCADomain scaDomain = (SCADomain) application.getAttribute("org.apache.tuscany.sca.SCADomain"); - HelloWorld helloWorld = (HelloWorld)scaDomain.getService(HelloWorld.class, "HelloWorldServiceComponent"); -%> - -Hello World SDO sample - - -<% - Party party = HelloworldFactory.INSTANCE.createParty(); - Person person = HelloworldFactory.INSTANCE.createPerson(); - person.setFirstName("John"); - person.setLastName("Smith"); - party.getPeople().add(person); - person = HelloworldFactory.INSTANCE.createPerson(); - person.setFirstName("Jane"); - person.setLastName("Doe"); - party.getPeople().add(person); -%> -<%= helloWorld.getGreetings(party) %> - - diff --git a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index 6f241cc90c..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/geronimo-web.xml b/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/geronimo-web.xml deleted file mode 100644 index 9a4b963cb6..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/geronimo-web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - org.apache.tuscany.sca - sample-helloworld-ws-sdo-webapp - 1.4-SNAPSHOT - war - - - - - org.apache.geronimo.configs - sharedlib - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 257e65aad4..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - Apache Tuscany Hello World Web Service SDO Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - tuscany - /services/* - - - - HelloWorld.jsp - - - diff --git a/branches/sca-android/samples/helloworld-ws-sdo/README b/branches/sca-android/samples/helloworld-ws-sdo/README deleted file mode 100644 index be947b1923..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo/README +++ /dev/null @@ -1,214 +0,0 @@ -Hello World Web Service References using SDO Sample -=================================================== -This sample demonstrates an SCA reference that uses a web service binding which works with SDO. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -To run this sample ------------------- -This sample is dependent on helloworld-ws-service. Open a command prompt to start -the service. If you are running ant do the following: - -cd helloworld-ws-service -ant run - -if you don't have ant, issue one of the following commands for windows or *nix: - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-service.jar helloworld.HelloWorldServer - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-service.jar helloworld.HelloWorldServer - -You should see the following output: - -Buildfile: build.xml - -run-server: - [java] log4j:WARN No appenders could be found for logger (org.apache.axiom. -om.util.StAXUtils). - [java] log4j:WARN Please initialize the log4j system properly. - [java] Aug 24, 2007 11:17:33 AM org.apache.catalina.core.StandardEngine sta -rt - [java] INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 - [java] Aug 24, 2007 11:17:34 AM org.apache.catalina.startup.ContextConfig d -efaultWebConfig - [java] INFO: No default web.xml - [java] Aug 24, 2007 11:17:34 AM org.apache.catalina.startup.DigesterFactory - register - [java] WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0. -xsd - [java] Aug 24, 2007 11:17:34 AM org.apache.catalina.startup.DigesterFactory - register - [java] WARNING: Could not get url for /javax/servlet/jsp/resources/web-jspt -aglibrary_1_1.dtd - [java] Aug 24, 2007 11:17:34 AM org.apache.catalina.startup.DigesterFactory - register - [java] WARNING: Could not get url for /javax/servlet/jsp/resources/web-jspt -aglibrary_1_2.dtd - [java] Aug 24, 2007 11:17:34 AM org.apache.catalina.startup.DigesterFactory - register - [java] WARNING: Could not get url for /javax/servlet/jsp/resources/web-jspt -aglibrary_2_0.xsd - [java] Aug 24, 2007 11:17:34 AM org.apache.catalina.startup.DigesterFactory - register - [java] WARNING: Could not get url for /javax/servlet/resources/j2ee_web_ser -vices_1_1.xsd - [java] Aug 24, 2007 11:17:34 AM org.apache.coyote.http11.Http11Protocol ini -t - [java] INFO: Initializing Coyote HTTP/1.1 on http-8085 - [java] Aug 24, 2007 11:17:34 AM org.apache.coyote.http11.Http11Protocol sta -rt - [java] INFO: Starting Coyote HTTP/1.1 on http-8085 - [java] Aug 24, 2007 11:17:34 AM org.apache.tuscany.sca.http.tomcat.TomcatSe -rver addServletMapping - [java] INFO: Added Servlet mapping: http://localhost:8085/HelloWorldService - - [java] HelloWorld server started (press enter to shutdown) - -The server is now ready. - - -Now, open another command window to run the client. - -cd helloworld-ws-sdo -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-sdo.jar helloworld.HelloWorldClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-sdo.jar helloworl.HelloWorldClient - -You should be able to see the following result: - -Buildfile: build.xml - -run: - [java] log4j:WARN No appenders could be found for logger (org.apache.axiom. -om.util.StAXUtils). - [java] log4j:WARN Please initialize the log4j system properly. - [java] Injected helloWorldService - [java] Called getGreetings - [java] Hello David Haney - -BUILD SUCCESSFUL -Total time: 9 seconds - - -Sample Overview ---------------- -The sample provides a single component that is wired to a reference with a -web service binding. The binding refers to WSDL that identifies the service -exposed by the helloworld-ws-service sample. - -helloworld-ws-sdo/ - src/ - main/ - java/ - helloworld/ - HelloWorldService.java - interface description for - HelloWorldServiceComponent - HelloWorldServiceComponent.java - component implementation - HelloWorldClient.java - starts the SCA Runtime and - deploys the helloworldwsclient - .composite. It then calls the - HelloWorldServiceComponent - resources/ - wsdl - helloworld.wsdl - the service description that the - SCA reference uses to bind to service. - - test/ - java/ - helloworld/ - HelloWorldClientTestCase.java - JUnit test case - helloworld-ws-sdo.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -You can build and run the sample with the binary distribution using Ant. -Make sure that you have started helloworld-ws-service which this sample is dependent on -in a separate command window. You can either follow the instruction at the begining of this -sample file or if you want to build and run the service, follow the README under helloworld-ws-service. - -Now, let's build and run helloworld-ws-sdo sample: - -cd helloworld-ws-sdo -ant -ant run - -You should see the following output from the run target. - -run: - [java] log4j:WARN No appenders could be found for logger (org.apache.axiom. -om.util.StAXUtils). - [java] log4j:WARN Please initialize the log4j system properly. - [java] Injected helloWorldService - [java] Called getGreetings - [java] Hello World - -Building And Running The Sample Using Maven -------------------------------------------- -You can build and run the sample with either the binary or source distributions using Maven. Please note that you do not need to start helloworld-ws-service in this case since Maven does this for you. - -cd helloworld-ws-sdo -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running helloworld.HelloWorldClientTestCase -log4j:WARN No appenders could be found for logger (org.apache.axiom.om.util.StAX -Utils). -log4j:WARN Please initialize the log4j system properly. -log4j:WARN No appenders could be found for logger (org.apache.axiom.om.util.StAX -Utils). -log4j:WARN Please initialize the log4j system properly. -Aug 23, 2007 2:27:32 PM org.apache.catalina.core.StandardEngine start -INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 -Aug 23, 2007 2:27:32 PM org.apache.catalina.startup.ContextConfig defaultWebConf -ig -INFO: No default web.xml -Aug 23, 2007 2:27:32 PM org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd -Aug 23, 2007 2:27:32 PM org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_ -1.dtd -Aug 23, 2007 2:27:32 PM org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_ -2.dtd -Aug 23, 2007 2:27:32 PM org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_ -0.xsd -Aug 23, 2007 2:27:32 PM org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xs -d -Aug 23, 2007 2:27:32 PM org.apache.coyote.http11.Http11Protocol init -INFO: Initializing Coyote HTTP/1.1 on http-8085 -Aug 23, 2007 2:27:32 PM org.apache.coyote.http11.Http11Protocol start -INFO: Starting Coyote HTTP/1.1 on http-8085 -Aug 23, 2007 2:27:32 PM org.apache.tuscany.sca.http.tomcat.TomcatServer addServl -etMapping -INFO: Added Servlet mapping: http://localhost:8085/HelloWorldService -Injected helloWorldService -Called getGreetings -Aug 23, 2007 2:27:34 PM org.apache.coyote.http11.Http11Protocol destroy -INFO: Stopping Coyote HTTP/1.1 on http-8085 -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.502 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/helloworld-ws-sdo/build.xml b/branches/sca-android/samples/helloworld-ws-sdo/build.xml deleted file mode 100644 index 401315d424..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo/build.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-sdo/helloworld-ws-sdo.png b/branches/sca-android/samples/helloworld-ws-sdo/helloworld-ws-sdo.png deleted file mode 100644 index bd2bba41db..0000000000 Binary files a/branches/sca-android/samples/helloworld-ws-sdo/helloworld-ws-sdo.png and /dev/null differ diff --git a/branches/sca-android/samples/helloworld-ws-sdo/helloworld-ws-sdo.svg b/branches/sca-android/samples/helloworld-ws-sdo/helloworld-ws-sdo.svg deleted file mode 100644 index 333ad53e0a..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo/helloworld-ws-sdo.svg +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldwsclient - - HelloWorldServiceComponent - - - HelloWorldService - - diff --git a/branches/sca-android/samples/helloworld-ws-sdo/pom.xml b/branches/sca-android/samples/helloworld-ws-sdo/pom.xml deleted file mode 100644 index 58dc56828f..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo/pom.xml +++ /dev/null @@ -1,139 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-helloworld-ws-sdo - Apache Tuscany SCA HelloWorld Web Service SDO Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sdo - tuscany-sdo-lib - 1.1.1 - - - org.apache.tuscany.sdo - tuscany-sdo-impl - 1.1.1 - - - org.apache.tuscany.sca - tuscany-databinding-sdo - 1.4-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - org.codehaus.mojo - build-helper-maven-plugin - 1.0 - - - add-source - generate-sources - - add-test-source - - - - target/sdo-source - - - - - - - org.apache.tuscany.sdo - tuscany-sdo-plugin - 1.1.1 - - - generate-helloworld-sdo - generate-sources - - ${basedir}/src/main/resources/wsdl/helloworld.wsdl - helloworld - Helloworld - true - true - true - - - generate - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldClient.java b/branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldClient.java deleted file mode 100644 index de4795ceaf..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldClient.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program shows how to create an SCA runtime, start it, locate the - * HelloWorld service and invoke it. - */ -public class HelloWorldClient { - - public final static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("helloworldwsclient.composite"); - HelloWorldService helloWorldService = - scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent"); - - Name name = HelloworldFactory.INSTANCE.createName(); - - name.setFirst("David"); - name.setLast("Haney"); - - String value = helloWorldService.getGreetings(name); - System.out.println(value); - - scaDomain.close(); - } -} diff --git a/branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index c950f7df04..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldImpl implements HelloWorldService { - - public String getGreetings(Name name) { - return "Hello " + name.getFirst() + " " + name.getLast(); - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldServer.java b/branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldServer.java deleted file mode 100644 index e03ed4dc25..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldServer.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import java.io.IOException; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This server program shows how to create an SCA runtime, and start it which - * activates the helloworld Web service endpoint. - */ -public class HelloWorldServer { - - public static void main(String[] args) { - - SCADomain scaDomain = SCADomain.newInstance("helloworldws.composite"); - - try { - System.out.println("HelloWorld server started (press enter to shutdown)"); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - - scaDomain.close(); - System.out.println("HelloWorld server stopped"); - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldService.java b/branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 367c5b4a12..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Remotable; - -/** - * The interface for the helloworld service - */ -@Remotable -public interface HelloWorldService { - public String getGreetings(Name name); -} diff --git a/branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldServiceComponent.java b/branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldServiceComponent.java deleted file mode 100644 index 711eef63b5..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldServiceComponent.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -/** - * The HelloWorld service implementation - */ -public class HelloWorldServiceComponent implements HelloWorldService { - - HelloWorldService helloWorldService; - - public String getGreetings(Name name) { - System.out.println("Called getGreetings"); - return helloWorldService.getGreetings(name); - } - - public HelloWorldService getHelloWorldService() { - System.out.println("Got Injected helloWorldService"); - return helloWorldService; - } - - public void setHelloWorldService(HelloWorldService helloWorldService) { - System.out.println("Injected helloWorldService"); - this.helloWorldService = helloWorldService; - } -} diff --git a/branches/sca-android/samples/helloworld-ws-sdo/src/main/resources/helloworldws.composite b/branches/sca-android/samples/helloworld-ws-sdo/src/main/resources/helloworldws.composite deleted file mode 100644 index c255df2897..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo/src/main/resources/helloworldws.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-sdo/src/main/resources/helloworldwsclient.composite b/branches/sca-android/samples/helloworld-ws-sdo/src/main/resources/helloworldwsclient.composite deleted file mode 100644 index d4fba548d5..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo/src/main/resources/helloworldwsclient.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-sdo/src/main/resources/logging.properties b/branches/sca-android/samples/helloworld-ws-sdo/src/main/resources/logging.properties deleted file mode 100644 index 3dca310cdb..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo/src/main/resources/logging.properties +++ /dev/null @@ -1,30 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# $Rev$ $Date$ -# - -# Custom logging configuration for Tuscany samples -# By default, only INFO level logging is enabled and ALL messages get sent to the console -# For more messages from the runtime, uncomment specific settings at the end of this file -handlers = java.util.logging.ConsoleHandler -java.util.logging.ConsoleHandler.level = ALL -java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter -.level=INFO - -# Uncomment the next setting to get all Tuscany messages (this will be a lot) -#org.apache.tuscany.level=FINEST diff --git a/branches/sca-android/samples/helloworld-ws-sdo/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-android/samples/helloworld-ws-sdo/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 2ecc0bea43..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-sdo/src/test/java/helloworld/HelloWorldClientTestCase.java b/branches/sca-android/samples/helloworld-ws-sdo/src/test/java/helloworld/HelloWorldClientTestCase.java deleted file mode 100644 index 11564c370f..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo/src/test/java/helloworld/HelloWorldClientTestCase.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package helloworld; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.apache.tuscany.sca.host.embedded.SCATestCaseRunner; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Test case for helloworld web service client - */ -public class HelloWorldClientTestCase { - - private HelloWorldService helloWorldService; - private SCADomain scaDomain; - - private SCATestCaseRunner server; - - @Before - public void startClient() throws Exception { - try { - scaDomain = SCADomain.newInstance("helloworldwsclient.composite"); - helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent"); - - server = new SCATestCaseRunner(HelloWorldTestServer.class); - server.before(); - - } catch (Throwable e) { - e.printStackTrace(); - } - } - - @Test - public void testWSClient() throws Exception { - Name name = HelloworldFactory.INSTANCE.createName(); - name.setFirst("John"); - name.setLast("Smith"); - String msg = helloWorldService.getGreetings(name); - Assert.assertEquals("Hello John Smith", msg); - } - - @After - public void stopClient() throws Exception { - server.after(); - scaDomain.close(); - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-sdo/src/test/java/helloworld/HelloWorldTestServer.java b/branches/sca-android/samples/helloworld-ws-sdo/src/test/java/helloworld/HelloWorldTestServer.java deleted file mode 100644 index 4b0c40dafd..0000000000 --- a/branches/sca-android/samples/helloworld-ws-sdo/src/test/java/helloworld/HelloWorldTestServer.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import java.io.IOException; -import java.net.Socket; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Starts up the SCA runtime which starts listening for service requests - */ -public class HelloWorldTestServer { - - private SCADomain scaDomain; - - @Before - public void startServer() throws Exception { - try { - scaDomain = SCADomain.newInstance("helloworldws.composite"); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Test - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - @After - public void stopServer() throws Exception { - scaDomain.close(); - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-service-jms/README b/branches/sca-android/samples/helloworld-ws-service-jms/README deleted file mode 100644 index 26272b1d91..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-jms/README +++ /dev/null @@ -1,119 +0,0 @@ -Hello World SOAP/JMS Service Sample -=================================== -This sample demonstrates an SCA service that uses a web service binding using -a SOAP/JMS protocol - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-service-jms.jar helloworld.HelloWorldServer - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-service-jms.jar helloworld.HelloWorldServer - -Now the server is started you can use the helloworld-ws-reference-jms sample to -exercise it. - -Sample Overview ---------------- -The sample provides a single component that is wired to a service with a -web service binding. - -helloworld-ws-service-jms/ - src/ - main/ - java/ - helloworld/ - HelloWorldService.java - interface description for - HelloWorldServiceComponent - HelloWorldImpl.java - component implementation - HelloWorldServer.java - starts the SCA Runtime and - deploys the helloworldwsjms - .composite and then waits for the - service to be called via web services - resources/ - wsdl/ - helloworld.wsdl - the service description that describes - the exposed service - helloworldwsjms.composite - the SCA assembly for this sample - helloworldwsjmspolicy.composite - shows how the protocol can be - selected using policy. Not run - by the sample - test/ - java/ - helloworld/ - HelloWorldJMSServerTestCase.java- JUnit test case - HelloWorldJMSPolicyServerTestCase.java- JUnit test case - helloworld-ws-service.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant using the -following commands - -cd helloworld-ws-service-jms -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] log4j:WARN No appenders could be found for logger (org.apache.axiom. -om.util.StAXUtils). - [java] log4j:WARN Please initialize the log4j system properly. - [java] HelloWorld server started (press enter to shutdown) - -As this point the SCA service is exposed as a web service by a web server -started automatically by the SCA runtime. To stop the server just press -enter. - -To exercise the service run up the helloworld-ws-reference-jms sample. Take a look at -the README in that sample and you will see you need the following commands - -cd helloworld-ws-reference-jms -ant run - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. When using Maven you don't need to run the helloworld- -ws-reference-jms sample as Maven includes a simple ping test to make sure that the -service is available - -cd helloworld-ws-service-jms -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running helloworld.HelloWorldJmsPolicyServerTestCase -08-Jan-2008 10:41:17 org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvide -r start -INFO: Axis2 JMS URL=jms:/HelloWorldServiceComponent?java.naming.factory.initial= -org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url= -tcp://localhost:61619&transport.jms.ConnectionFactoryJNDIName=QueueConnectionFac -tory -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.984 sec -Running helloworld.HelloWorldJmsServerTestCase -08-Jan-2008 10:41:22 org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvide -r start -INFO: Axis2 JMS URL=jms:/queue.sample?transport.jms.ConnectionFactoryJNDIName=Qu -eueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.Active -MQInitialContextFactory&java.naming.provider.url=tcp://localhost:61619 -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.266 sec - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/helloworld-ws-service-jms/build.xml b/branches/sca-android/samples/helloworld-ws-service-jms/build.xml deleted file mode 100644 index 330de7f7e5..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-jms/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-service-jms/helloworld-ws-service.png b/branches/sca-android/samples/helloworld-ws-service-jms/helloworld-ws-service.png deleted file mode 100644 index eab29d0bcd..0000000000 Binary files a/branches/sca-android/samples/helloworld-ws-service-jms/helloworld-ws-service.png and /dev/null differ diff --git a/branches/sca-android/samples/helloworld-ws-service-jms/helloworld-ws-service.svg b/branches/sca-android/samples/helloworld-ws-service-jms/helloworld-ws-service.svg deleted file mode 100644 index 8d2ae98c82..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-jms/helloworld-ws-service.svg +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldws - - HelloWorldServiceComponent - - HelloWorldWebService - - diff --git a/branches/sca-android/samples/helloworld-ws-service-jms/pom.xml b/branches/sca-android/samples/helloworld-ws-service-jms/pom.xml deleted file mode 100644 index d3e376bd3d..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-jms/pom.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-helloworld-ws-service-jms - Apache Tuscany SCA HelloWorld Web Service JMS Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.4-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - compile - - - - org.apache.activemq - activemq-core - 4.1.1 - compile - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-android/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 4cdcc1fd0b..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldImpl implements HelloWorldService { - - public String getGreetings(String name) { - return "Hello " + name; - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldServer.java b/branches/sca-android/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldServer.java deleted file mode 100644 index 5454487ff6..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldServer.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import java.io.IOException; - -import org.apache.activemq.broker.BrokerService; -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This server program shows how to create an SCA runtime, and start it which - * activates the helloworld Web service endpoint. - */ -public class HelloWorldServer { - - protected static BrokerService startBroker() throws Exception { - BrokerService jmsBroker = new BrokerService(); - jmsBroker.setPersistent(false); - jmsBroker.setUseJmx(false); - jmsBroker.addConnector("tcp://localhost:61619"); - jmsBroker.start(); - return jmsBroker; - } - - public static void main(String[] args) throws Exception { - - BrokerService broker = startBroker(); - SCADomain scaDomain = SCADomain.newInstance("helloworldwsjms.composite"); - - try { - System.out.println("HelloWorld server started (press enter to shutdown)"); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - - scaDomain.close(); - broker.stop(); - System.out.println("HelloWorld server stopped"); - // FIXME: Workaround for http://issues.apache.org/jira/browse/AXIS2-3685 - System.exit(0); - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldService.java b/branches/sca-android/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 4b019b21bf..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public String getGreetings(String name); -} - diff --git a/branches/sca-android/samples/helloworld-ws-service-jms/src/main/resources/definitions.xml b/branches/sca-android/samples/helloworld-ws-service-jms/src/main/resources/definitions.xml deleted file mode 100644 index 8c881ab0bb..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-jms/src/main/resources/definitions.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - The general intent that a transport is available over which SOAP messages flow - - - - - - A JMS transport is required - - - - - - An HTTP transport is required - - - - - - - An HTTPS transport is required - - - - - - - org.apache.activemq.jndi.ActiveMQInitialContextFactory - tcp://localhost:61619 - QueueConnectionFactory - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-ws-service-jms/src/main/resources/helloworldwsjms.composite b/branches/sca-android/samples/helloworld-ws-service-jms/src/main/resources/helloworldwsjms.composite deleted file mode 100644 index 67079f738e..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-jms/src/main/resources/helloworldwsjms.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-service-jms/src/main/resources/helloworldwsjmspolicy.composite b/branches/sca-android/samples/helloworld-ws-service-jms/src/main/resources/helloworldwsjmspolicy.composite deleted file mode 100644 index 10faf374f3..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-jms/src/main/resources/helloworldwsjmspolicy.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-service-jms/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-android/samples/helloworld-ws-service-jms/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 3f9e00689e..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-jms/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-service-jms/src/test/java/helloworld/HelloWorldJmsPolicyServerTestCase.java b/branches/sca-android/samples/helloworld-ws-service-jms/src/test/java/helloworld/HelloWorldJmsPolicyServerTestCase.java deleted file mode 100644 index 34f8605d5d..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-jms/src/test/java/helloworld/HelloWorldJmsPolicyServerTestCase.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertNotNull; - -import java.io.IOException; - -import org.apache.activemq.broker.BrokerService; -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Tests that the helloworld server is available - */ -public class HelloWorldJmsPolicyServerTestCase{ - - private SCADomain scaDomain; - private BrokerService jmsBroker; - - @Before - public void startServer() throws Exception { - startBroker(); - scaDomain = SCADomain.newInstance("helloworldwsjmspolicy.composite"); - } - - protected void startBroker() throws Exception { - jmsBroker = new BrokerService(); - jmsBroker.setPersistent(false); - jmsBroker.setUseJmx(false); - jmsBroker.addConnector("tcp://localhost:61619"); - jmsBroker.start(); - } - - @Test - public void testServiceCall() throws IOException { - HelloWorldService helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService"); - assertNotNull(helloWorldService); - assertEquals("Hello Smith", helloWorldService.getGreetings("Smith")); - } - - @After - public void stopServer() throws Exception { - scaDomain.close(); - if (jmsBroker != null) { - jmsBroker.stop(); - } - } -} diff --git a/branches/sca-android/samples/helloworld-ws-service-jms/src/test/java/helloworld/HelloWorldJmsServerTestCase.java b/branches/sca-android/samples/helloworld-ws-service-jms/src/test/java/helloworld/HelloWorldJmsServerTestCase.java deleted file mode 100644 index 03d566cc17..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-jms/src/test/java/helloworld/HelloWorldJmsServerTestCase.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertNotNull; - -import java.io.IOException; - -import org.apache.activemq.broker.BrokerService; -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Tests that the helloworld server is available - */ -public class HelloWorldJmsServerTestCase{ - - private SCADomain scaDomain; - private BrokerService jmsBroker; - - @Before - public void startServer() throws Exception { - startBroker(); - scaDomain = SCADomain.newInstance("helloworldwsjms.composite"); - } - - protected void startBroker() throws Exception { - jmsBroker = new BrokerService(); - jmsBroker.setPersistent(false); - jmsBroker.setUseJmx(false); - jmsBroker.addConnector("tcp://localhost:61619"); - jmsBroker.start(); - } - - @Test - public void testServiceCall() throws IOException { - HelloWorldService helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService"); - assertNotNull(helloWorldService); - - assertEquals("Hello Smith", helloWorldService.getGreetings("Smith")); - } - - @After - public void stopServer() throws Exception { - if (scaDomain != null) { - scaDomain.close(); - } - if (jmsBroker != null) { - jmsBroker.stop(); - } - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-service-secure/README b/branches/sca-android/samples/helloworld-ws-service-secure/README deleted file mode 100644 index f32eb08b05..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-secure/README +++ /dev/null @@ -1,152 +0,0 @@ -Hello World Secure Web Service Service Sample -============================================= -This sample demonstrates an SCA service that uses a web service binding that is enabled for simple -authentication using UseridToken and PasswordText - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-service-secure.jar helloworld.HelloWorldServer - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-service-secure.jar helloworld.HelloWorldServer - -Now the server is started you can use the helloworld-ws-reference-secure sample to -exercise it. - -Sample Overview ---------------- -The sample provides a single component that is wired to a service with a -web service binding. The service specifies a policy intent named 'authentication' -which is fulfilled by a suitable policyset that is defined for the SCA Domain. Over -the helloworld-ws-service sample, this sample demonstrate generally the use of policy -intents and policy sets in Tuscany taking the specific instance of a security policy. - -Note : ------- -The policies mentioned and supported are instances of Tuscany specified policies and -not instnaces of WS-Policy. - -helloworld-ws-service-secure/ - src/ - main/ - java/ - helloworld/ - HelloWorldService.java - interface description for - HelloWorldServiceComponent - HelloWorldImpl.java - component implementation - HelloWorldServer.java - starts the SCA Runtime and - deploys the helloworldws - .composite and then waits for the - service to be called via web services - ServerPWCBHandler.java - callback handler to authenticate client userid and password. - The handle(Callback[] callbacks) method of this class typically contains - code for accessing user registries and retrieving passwords - for user identifiers sent by the client and verifying them - against the password sent by the client. For example - here is where one could access LDAP registries to obtain or - compare user identities and passwords. - resources/ - wsdl/ - helloworld.wsdl - the service description that describes - the exposed service - helloworldws.composite - the SCA assembly for this sample - definitions.xml - the SCA Definitions file that contains intents and policysets - defined for the SCA Domain - - helloworld-ws-service-secure.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant using the -following commands - -cd helloworld-ws-service-secure -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 14-Jan-2008 14:22:07 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:8085/HelloWorldService - [java] 14-Jan-2008 14:22:07 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:8085/HelloWorldWsPolicyS -ervice - [java] HelloWorld server started (press enter to shutdown) - -As this point the SCA service is exposed as a web service by a web server -started automatically by the SCA runtime. The webservice requires clients to -have security headers that carry userid tonken and password text. - -To stop the server just press enter. - -To exercise the service run up the helloworld-ws-reference-secure sample. Take a look at -the README in that sample and you will see you need the following commands - -cd helloworld-ws-reference-secure -ant run - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. When using Maven you don't need to run the helloworld- -ws-reference-secure sample as Maven includes a simple ping test to make sure that the -service is available - -cd helloworld-ws-service-secure -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running helloworld.HelloWorldServerTestCase -14-Jan-2008 14:23:20 org.apache.catalina.core.StandardEngine start -INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 -14-Jan-2008 14:23:20 org.apache.catalina.startup.ContextConfig defaultWebConfig -INFO: No default web.xml -14-Jan-2008 14:23:20 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd -14-Jan-2008 14:23:20 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_ -1.dtd -14-Jan-2008 14:23:20 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_ -2.dtd -14-Jan-2008 14:23:20 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_ -0.xsd -14-Jan-2008 14:23:20 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xs -d -14-Jan-2008 14:23:21 org.apache.coyote.http11.Http11Protocol init -INFO: Initializing Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:23:21 org.apache.coyote.http11.Http11Protocol start -INFO: Starting Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:23:21 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:8085/HelloWorldService -14-Jan-2008 14:23:21 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:8085/HelloWorldWsPolicyService -14-Jan-2008 14:23:21 org.apache.coyote.http11.Http11Protocol destroy -INFO: Stopping Coyote HTTP/1.1 on http-8085 -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.734 sec - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/helloworld-ws-service-secure/build.xml b/branches/sca-android/samples/helloworld-ws-service-secure/build.xml deleted file mode 100644 index 29bbae0173..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-secure/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-service-secure/helloworld-ws-service-secure.png b/branches/sca-android/samples/helloworld-ws-service-secure/helloworld-ws-service-secure.png deleted file mode 100644 index 6f7d9dd450..0000000000 Binary files a/branches/sca-android/samples/helloworld-ws-service-secure/helloworld-ws-service-secure.png and /dev/null differ diff --git a/branches/sca-android/samples/helloworld-ws-service-secure/helloworld-ws-service-secure.svg b/branches/sca-android/samples/helloworld-ws-service-secure/helloworld-ws-service-secure.svg deleted file mode 100644 index 53eb552923..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-secure/helloworld-ws-service-secure.svg +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldws - - HelloWorldServiceComponent - - HelloWorldWebService - - diff --git a/branches/sca-android/samples/helloworld-ws-service-secure/pom.xml b/branches/sca-android/samples/helloworld-ws-service-secure/pom.xml deleted file mode 100644 index b47a865b63..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-secure/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-helloworld-ws-service-secure - Apache Tuscany SCA HelloWorld Secure Web Service Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.ws.security - wss4j - 1.5.3 - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-android/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 4cdcc1fd0b..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldImpl implements HelloWorldService { - - public String getGreetings(String name) { - return "Hello " + name; - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldServer.java b/branches/sca-android/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldServer.java deleted file mode 100644 index 3d43290380..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldServer.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import java.io.IOException; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This server program shows how to create an SCA runtime, and start it which - * activates the helloworld Web service endpoint. - */ -public class HelloWorldServer { - - public static void main(String[] args) { - - SCADomain scaDomain = SCADomain.newInstance("helloworldws.composite"); - - try { - System.out.println("HelloWorld server started (press enter to shutdown)"); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - - scaDomain.close(); - System.out.println("HelloWorld server stopped"); - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldService.java b/branches/sca-android/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 4b019b21bf..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public String getGreetings(String name); -} - diff --git a/branches/sca-android/samples/helloworld-ws-service-secure/src/main/java/helloworld/ServerPWCBHandler.java b/branches/sca-android/samples/helloworld-ws-service-secure/src/main/java/helloworld/ServerPWCBHandler.java deleted file mode 100644 index ded02f09d6..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-secure/src/main/java/helloworld/ServerPWCBHandler.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.apache.ws.security.WSPasswordCallback; - -/** - * Sample userid passwd generation class - */ -public class ServerPWCBHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, - UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - System.out.println("*** Calling Server User/Passwd Handler...."); - WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i]; - System.out.println("User Id = " + pwcb.getIdentifer()); - System.out.println("Password = " + pwcb.getPassword()); - - if ( pwcb.getUsage() == WSPasswordCallback.USERNAME_TOKEN ) { - if ( pwcb.getIdentifer().equals("TuscanyWsUser") && - pwcb.getPassword().equals("TuscanyWsUserPasswd") ){ - return; - } else { - throw new UnsupportedCallbackException(pwcb, "Authentication Failed : UserId - Password mismatch"); - } - } else if ( pwcb.getUsage() == WSPasswordCallback.SIGNATURE ) { - pwcb.setPassword("TuscanyWsUserPasswd"); - } - } - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-service-secure/src/main/resources/definitions.xml b/branches/sca-android/samples/helloworld-ws-service-secure/src/main/resources/definitions.xml deleted file mode 100644 index 10fa7b8652..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-secure/src/main/resources/definitions.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - UsernameToken - helloworld.ServerPWCBHandler - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TuscanyWsUser - TuscanyWsUser - helloworld.ServerPWCBHandler - - - - JKS - helloworldKeys.jks - TuscanyWsUserPasswd - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/helloworld-ws-service-secure/src/main/resources/helloworldKeys.jks b/branches/sca-android/samples/helloworld-ws-service-secure/src/main/resources/helloworldKeys.jks deleted file mode 100644 index 0b4f2399f0..0000000000 Binary files a/branches/sca-android/samples/helloworld-ws-service-secure/src/main/resources/helloworldKeys.jks and /dev/null differ diff --git a/branches/sca-android/samples/helloworld-ws-service-secure/src/main/resources/helloworldws.composite b/branches/sca-android/samples/helloworld-ws-service-secure/src/main/resources/helloworldws.composite deleted file mode 100644 index d1e18d7929..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-secure/src/main/resources/helloworldws.composite +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-service-secure/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-android/samples/helloworld-ws-service-secure/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 068229be6f..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-secure/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-service-secure/src/test/java/helloworld/HelloWorldServerTestCase.java b/branches/sca-android/samples/helloworld-ws-service-secure/src/test/java/helloworld/HelloWorldServerTestCase.java deleted file mode 100644 index 4a14afcd9d..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-secure/src/test/java/helloworld/HelloWorldServerTestCase.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertNotNull; - -import java.io.IOException; -import java.net.Socket; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Tests that the helloworld server is available - */ -public class HelloWorldServerTestCase{ - - private SCADomain scaDomain; - - @Before - public void startServer() throws Exception { - scaDomain = SCADomain.newInstance("helloworldws.composite"); - } - - @Test - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - @Test - public void testServiceCall() throws IOException { - HelloWorldService helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService"); - assertNotNull(helloWorldService); - - assertEquals("Hello Smith", helloWorldService.getGreetings("Smith")); - } - - @After - public void stopServer() throws Exception { - scaDomain.close(); - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-service-webapp/README b/branches/sca-android/samples/helloworld-ws-service-webapp/README deleted file mode 100644 index 66040004f8..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-webapp/README +++ /dev/null @@ -1 +0,0 @@ -http://localhost:8080/sample-helloworld-ws-service-webapp/SCA/HelloWorldService?wsdl diff --git a/branches/sca-android/samples/helloworld-ws-service-webapp/build.xml b/branches/sca-android/samples/helloworld-ws-service-webapp/build.xml deleted file mode 100644 index ff850203b3..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-webapp/build.xml +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-service-webapp/pom.xml b/branches/sca-android/samples/helloworld-ws-service-webapp/pom.xml deleted file mode 100644 index 1fbfb2a49d..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-webapp/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - - sample-helloworld-ws-service-webapp - Apache Tuscany SCA HelloWorld Web Service Sample Webapp - war - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - - stax - stax-api - 1.0.1 - provided - - - - - javax.servlet - servlet-api - 2.3 - provided - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 0de3c70303..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldImpl implements HelloWorldService { - - public String getGreetings(String name) { - return "Hello " + name; - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/java/helloworld/HelloWorldService.java b/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 268d90e910..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public String getGreetings(String name); -} diff --git a/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 0b95fbd14f..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/webapp/META-INF/sca-deployables/helloworldws.composite b/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/webapp/META-INF/sca-deployables/helloworldws.composite deleted file mode 100644 index 114608e4d8..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/webapp/META-INF/sca-deployables/helloworldws.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/webapp/WEB-INF/geronimo-web.xml b/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/webapp/WEB-INF/geronimo-web.xml deleted file mode 100644 index af87f30703..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/webapp/WEB-INF/geronimo-web.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - org.apache.tuscany.sca - sample-helloworld-ws-service-webapp - 1.4-SNAPSHOT - war - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 3f3c92fa78..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - Apache Tuscany HelloWorld Web Service Sample - - - org.apache.tuscany.sca.host.webapp.TuscanyContextListener - - - - TuscanyServlet - org.apache.tuscany.sca.host.webapp.TuscanyServlet - - - - TuscanyServlet - /SCA/* - - - - /SCA/HelloWorldComponent/HelloWorldService?wsdl - - - diff --git a/branches/sca-android/samples/helloworld-ws-service/README b/branches/sca-android/samples/helloworld-ws-service/README deleted file mode 100644 index 44dc7ab4e8..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service/README +++ /dev/null @@ -1,141 +0,0 @@ -Hello World Web Service Service Sample -====================================== -This sample demonstrates an SCA service that uses a web service binding. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-service.jar helloworld.HelloWorldServer - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-service.jar helloworld.HelloWorldServer - -Now the server is started you can use the helloworld-ws-reference sample to -exercise it. - -Sample Overview ---------------- -The sample provides a single component that is wired to a service with a -web service binding. - -helloworld-ws-service/ - src/ - main/ - java/ - helloworld/ - HelloWorldService.java - interface description for - HelloWorldServiceComponent - HelloWorldImpl.java - component implementation - HelloWorldServer.java - starts the SCA Runtime and - deploys the helloworldws - .composite and then waits for the - service to be called via web services - resources/ - wsdl/ - helloworld.wsdl - the service description that describes - the exposed service - helloworldws.composite - the SCA assembly for this sample - test/ - java/ - helloworld/ - HelloWorldServerTestCase.java - JUnit test case - helloworld-ws-service.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant using the -following commands - -cd helloworld-ws-service -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 14-Jan-2008 14:18:47 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:8085/HelloWorldService - [java] HelloWorld server started (press enter to shutdown) - -As this point the SCA service is exposed as a web service by a web server -started automatically by the SCA runtime. To stop the server just press -enter. - -To exercise the service run up the helloworld-ws-reference sample. Take a look at -the README in that sample and you will see you need the following commands - -cd helloworld-ws-reference -ant run - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. When using Maven you don't need to run the helloworld- -ws-reference sample as Maven includes a simple ping test to make sure that the -service is available - -cd helloworld-ws-service -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running helloworld.HelloWorldServerTestCase -14-Jan-2008 14:19:57 org.apache.catalina.core.StandardEngine start -INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 -14-Jan-2008 14:19:57 org.apache.catalina.startup.ContextConfig defaultWebConfig -INFO: No default web.xml -14-Jan-2008 14:19:57 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd -14-Jan-2008 14:19:57 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_ -1.dtd -14-Jan-2008 14:19:57 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_ -2.dtd -14-Jan-2008 14:19:57 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_ -0.xsd -14-Jan-2008 14:19:57 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xs -d -14-Jan-2008 14:19:57 org.apache.coyote.http11.Http11Protocol init -INFO: Initializing Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:19:57 org.apache.coyote.http11.Http11Protocol start -INFO: Starting Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:19:57 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:8085/HelloWorldService -14-Jan-2008 14:19:57 org.apache.coyote.http11.Http11Protocol destroy -INFO: Stopping Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:19:58 org.apache.catalina.core.StandardEngine start -INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 -14-Jan-2008 14:19:58 org.apache.catalina.startup.ContextConfig defaultWebConfig -INFO: No default web.xml -14-Jan-2008 14:19:58 org.apache.coyote.http11.Http11Protocol init -INFO: Initializing Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:19:58 org.apache.coyote.http11.Http11Protocol start -INFO: Starting Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:19:58 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:8085/HelloWorldService -14-Jan-2008 14:19:59 org.apache.coyote.http11.Http11Protocol destroy -INFO: Stopping Coyote HTTP/1.1 on http-8085 -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.75 sec - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/helloworld-ws-service/build.xml b/branches/sca-android/samples/helloworld-ws-service/build.xml deleted file mode 100644 index 46678febc3..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-service/helloworld-ws-service.png b/branches/sca-android/samples/helloworld-ws-service/helloworld-ws-service.png deleted file mode 100644 index eab29d0bcd..0000000000 Binary files a/branches/sca-android/samples/helloworld-ws-service/helloworld-ws-service.png and /dev/null differ diff --git a/branches/sca-android/samples/helloworld-ws-service/helloworld-ws-service.svg b/branches/sca-android/samples/helloworld-ws-service/helloworld-ws-service.svg deleted file mode 100644 index 61cd93ead9..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service/helloworld-ws-service.svg +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldws - - HelloWorldServiceComponent - - HelloWorldWebService - - diff --git a/branches/sca-android/samples/helloworld-ws-service/pom.xml b/branches/sca-android/samples/helloworld-ws-service/pom.xml deleted file mode 100644 index ebb56b9a7e..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-helloworld-ws-service - Apache Tuscany SCA HelloWorld Web Service Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-android/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 0de3c70303..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldImpl implements HelloWorldService { - - public String getGreetings(String name) { - return "Hello " + name; - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldServer.java b/branches/sca-android/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldServer.java deleted file mode 100644 index c37bfcda65..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldServer.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import java.io.IOException; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This server program shows how to create an SCA runtime, and start it which - * activates the helloworld Web service endpoint. - */ -public class HelloWorldServer { - - public static void main(String[] args) { - - SCADomain scaDomain = SCADomain.newInstance("META-INF/sca-deployables/helloworldws.composite"); - - try { - System.out.println("HelloWorld server started (press enter to shutdown)"); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - - scaDomain.close(); - System.out.println("HelloWorld server stopped"); - } - -} diff --git a/branches/sca-android/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldService.java b/branches/sca-android/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 7245513b2a..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import org.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public String getGreetings(String name); -} - diff --git a/branches/sca-android/samples/helloworld-ws-service/src/main/resources/META-INF/sca-deployables/helloworldws.composite b/branches/sca-android/samples/helloworld-ws-service/src/main/resources/META-INF/sca-deployables/helloworldws.composite deleted file mode 100644 index d767625ae7..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service/src/main/resources/META-INF/sca-deployables/helloworldws.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-service/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-android/samples/helloworld-ws-service/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 454763410c..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldServerTestCase.java b/branches/sca-android/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldServerTestCase.java deleted file mode 100644 index 189332be91..0000000000 --- a/branches/sca-android/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldServerTestCase.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package helloworld; - -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertNotNull; - -import java.io.IOException; -import java.net.Socket; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Tests that the helloworld server is available - */ -public class HelloWorldServerTestCase{ - - private SCADomain scaDomain; - - @Before - public void startServer() throws Exception { - scaDomain = SCADomain.newInstance("META-INF/sca-deployables/helloworldws.composite"); - } - - @Test - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - @Test - public void testServiceCall() throws IOException { - HelloWorldService helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService"); - assertNotNull(helloWorldService); - - assertEquals("Hello Smith", helloWorldService.getGreetings("Smith")); - } - - @After - public void stopServer() throws Exception { - scaDomain.close(); - } - -} diff --git a/branches/sca-android/samples/loanapplication/pom.xml b/branches/sca-android/samples/loanapplication/pom.xml deleted file mode 100644 index e2551fd7dc..0000000000 --- a/branches/sca-android/samples/loanapplication/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-loanapplication - Apache Tuscany SCA Loan Application Conversation Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanApplication.java b/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanApplication.java deleted file mode 100644 index 4fedb70782..0000000000 --- a/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanApplication.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package loanapplication; - -public class LoanApplication { - - private String customerName; - private float loanAmount; - - public LoanApplication(String customerName, float loanAmount) { - this.customerName = customerName; - this.loanAmount = loanAmount; - } - - @Override - public String toString() { - return "[Customer: " + customerName + ", loan amount: " - + loanAmount + "]"; - } -} diff --git a/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanApplicationClient.java b/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanApplicationClient.java deleted file mode 100644 index 5183ece867..0000000000 --- a/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanApplicationClient.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package loanapplication; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - - -public class LoanApplicationClient { - - public static void main(String[] args) throws Exception { - SCADomain domain = SCADomain.newInstance("loanapplication.composite"); - - // Locate the MyClient component and invoke it - LoanClient loanClient = domain.getService(LoanClient.class, "LoanClientComponent"); - loanClient.applyForLoan("John Doe", 1000.0f); - System.out.println(loanClient.displayLoan()); - System.out.println("Loan approved: " + loanClient.isApproved()); - - domain.close(); - } -} diff --git a/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanClient.java b/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanClient.java deleted file mode 100644 index 7e4438bbff..0000000000 --- a/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanClient.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package loanapplication; - -public interface LoanClient { - - void applyForLoan(String customerName, float amount); - boolean isApproved(); - boolean isCancelled(); - String displayLoan(); - void cancelLoan(); - void closeLoan(); -} diff --git a/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanClientImpl.java b/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanClientImpl.java deleted file mode 100644 index b06d9465a2..0000000000 --- a/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanClientImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package loanapplication; - - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -@Scope("COMPOSITE") -public class LoanClientImpl implements LoanClient { - - private LoanService loanService; - - @Reference - public void setLoanService(LoanService loanService) { - this.loanService = loanService; - } - - public void applyForLoan(String customerName, float amount) { - loanService.apply(new LoanApplication(customerName, amount)); - } - - public boolean isApproved() { - if (loanService.getLoanStatus() == null) { - return false; - } - return loanService.getLoanStatus().equals("approved"); - } - - public boolean isCancelled() { - if (loanService.getLoanStatus() == null) { - return false; - } - return loanService.getLoanStatus().equals("cancelled"); - } - - public String displayLoan() { - return loanService.display(); - } - - public void cancelLoan() { - loanService.cancelApplication(); - } - - public void closeLoan() { - loanService.close(); - } -} diff --git a/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanService.java b/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanService.java deleted file mode 100644 index 9dfd8b42fe..0000000000 --- a/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanService.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package loanapplication; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.EndsConversation; -import org.osoa.sca.annotations.OneWay; -import org.osoa.sca.annotations.Remotable; - -@Conversational -@Remotable -public interface LoanService { - - void apply(LoanApplication application); - - void lockCurrentRate(int termInYears); - - @OneWay - void cancelApplication(); - - String getLoanStatus(); - - String display(); - - @EndsConversation - void close(); -} diff --git a/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanServiceImpl.java b/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanServiceImpl.java deleted file mode 100644 index 76a53323bd..0000000000 --- a/branches/sca-android/samples/loanapplication/src/main/java/loanapplication/LoanServiceImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package loanapplication; - -import org.osoa.sca.annotations.AllowsPassByReference; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Scope; - -@Scope("CONVERSATION") -@AllowsPassByReference -public class LoanServiceImpl implements LoanService { - - private LoanApplication application; - private String status; - private int termLocked = 0; - @ConversationID - protected String conversationID; - - public void apply(LoanApplication application) { - this.application = application; - status = "open"; - } - - public void lockCurrentRate(int termInYears) { - termLocked = termInYears; - status = "locked"; - } - - public void cancelApplication() { - status = "cancelled"; - } - - public String getLoanStatus() { - return status; - } - - public String display() { - return "Loan application: " + application + ", term: " - + termLocked + ", status: " + status - + ", conversationID: " + conversationID; - } - - public void close() { - this.application = null; - this.status = "closed"; - } -} diff --git a/branches/sca-android/samples/loanapplication/src/main/resources/loanapplication.composite b/branches/sca-android/samples/loanapplication/src/main/resources/loanapplication.composite deleted file mode 100644 index 3aa8d030b7..0000000000 --- a/branches/sca-android/samples/loanapplication/src/main/resources/loanapplication.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/loanapplication/src/test/java/loanapplication/LoanApplicationTestCase.java b/branches/sca-android/samples/loanapplication/src/test/java/loanapplication/LoanApplicationTestCase.java deleted file mode 100644 index e88e48a53a..0000000000 --- a/branches/sca-android/samples/loanapplication/src/test/java/loanapplication/LoanApplicationTestCase.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package loanapplication; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class LoanApplicationTestCase extends TestCase { - - private LoanClient loanClient; - private SCADomain domain; - - @Override - protected void setUp() throws Exception { - domain = SCADomain.newInstance("loanapplication.composite"); - - loanClient = domain.getService(LoanClient.class, "LoanClientComponent"); - } - - @Override - protected void tearDown() throws Exception { - domain.close(); - } - - public void test() throws Exception { - try { - loanClient.applyForLoan("John Doe", 1000.0f); - System.out.println("Applied: " + loanClient.displayLoan()); - System.out.println("Loan approved: " + loanClient.isApproved()); - loanClient.cancelLoan(); - System.out.println("Sleeping to let cancel complete ..."); - Thread.sleep(500); - if (!loanClient.isCancelled()) { - fail("Loan should be cancelled"); - } - System.out.println("Cancelled: " + loanClient.displayLoan()); - loanClient.closeLoan(); - - /* This is a mistake, after @EndsConversation, a new conversation is - * started automatically, so we should not get TargetNotFoundException. - * Keep this for the timeout case, where we should get the exception - try { - System.out.println("Trying to use the closed loan in the ended conversation ..."); - System.out.println("Closed: " + loanClient.displayLoan()); - fail("Target should not be found"); - } catch(TargetNotFoundException e) { - System.out.println("Target not found as expected"); - } - */ - - // Now check that a new conversation's loan is not cancelled - - if (loanClient.isCancelled()) { - fail("Loan should not be cancelled"); - } - } catch(Throwable e) { - e.printStackTrace(); - if (e instanceof Exception) { - throw (Exception)e; - } - if (e instanceof Error) { - throw (Error)e; - } - } - } -} diff --git a/branches/sca-android/samples/osgi-supplychain/README b/branches/sca-android/samples/osgi-supplychain/README deleted file mode 100644 index 11fecf2ae8..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/README +++ /dev/null @@ -1,161 +0,0 @@ -osgi-supplychain Sample -======================= - -The Tuscany OSGi supply chain sample shows using the Tuscany SCA runtime in a J2SE environment executing the SCA asynchronous API with OSGi and Java implementation types. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -In the directory samples\osgi-supplychain use the JDK 1.5 java command to run the class supplychain.SupplyChainClient - -Linux: java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-osgi-supplychain.jar supplychain.SupplyChainClient -Windows: java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-osgi-supplychain.jar supplychain.SupplyChainClient - -Results ----------- -The sample when run should simply display on the standard output some startup messages followed by: - -Work thread Thread[Thread-1,5,main] - Order, submitted, fulfilled, shipped - - -Sample Overview ---------------- - -The sample provides a Customer service with a purchaseGoods operation -and a notifyShipment operation annotated with the SCA @OneWay annotation. -The SupplyChainClient exercises this interface by calling the -purchaseGoods operation. This results in messages passing to -the Retailer, Warehouse, and Shipper components and the result returned -to the Customer service on a separate callback thread. The Customer -and Shipper components are implemented as OSGi bundles which use -implementation.osgi, while the Retailer and Warehouse components are -implemented using implementation.java. - - -src -+---main - +---java - ¦ +---supplychain - ¦ OSGiBundleImpl.java - ¦ SupplyChainClient.java - ¦ +---customer - ¦ Customer.java - ¦ JavaCustomerComponentImpl.java - ¦ OSGiCustomerComponentImpl.java - ¦ OSGiCustomerImpl.java - ¦ +---retailer - ¦ Retailer.java - ¦ JavaRetailerComponentImpl.java - ¦ OSGiRetailerComponentImpl.java - ¦ OSGiRetailerImpl.java - ¦ +---shipper - ¦ Shipper.java - ¦ JavaShipperComponentImpl.java - ¦ OSGiShipperComponentImpl.java - ¦ OSGiShipperImpl.java - ¦ +---warehouse - ¦ Warehouse.java - ¦ JavaWarehouseComponentImpl.java - ¦ OSGiWarehouseComponentImpl.java - ¦ OSGiWarehouseImpl.java - ¦ - +---resources - ¦ +---osgi - ¦ Customer.mf - ¦ Retailer.mf - ¦ Shipper.mf - ¦ Warehouse.mf - ¦ +---ds - ¦ Customer.mf - ¦ Retailer.mf - ¦ Shipper.mf - ¦ Warehouse.mf - ¦ Customer.xml - ¦ Retailer.xml - ¦ Shipper.xml - ¦ Warehouse.xml - ¦ Customer.componentType - ¦ Retailer.componentType - ¦ Shipper.componentType - ¦ Warehouse.componentType - ¦ supplychain.composite - ¦-- supplychain.ds.composite - - - build.xml - the Ant build file - pom.xml - the Maven build file - -Understanding OSGI implementation files ---------------------------------------- -Some of the files introduced by OSGI implementation are explained below. - -OSG files related to customer. java are: -OSGiCustomerComponentImpl.java: OSGi Declarative Services Implementation of the SCA Customer component. -OSGiCustomerImpl.java: OSGi Procedural Services Implementation of the SCA Customer component. - -You notice the same pattern for shipper.java, retailer.java, SupplyChainClient.java. - -The rest of OSGI related files are: -OSGiBundleImpl.java: Common code for OSGi Procedural Services Implementation of the SCA components - -resources/osgi/*.mf: Manifest files for OSGi bundles for OSGi procedural services implementation - -resources/osgi/ds/*.m:f Manifest files for OSGi bundles for OSGi declarative services implementation - -resources/osgi/ds/*.xml: OSGi Declarative services component xml files - -resources/*.componentType: Component types used by OSGi implementation provider for SCA - -resources/supplychain.composite: Composite file using OSGi and Java implementation types - -resources/supplychain.ds.composite: Composite file using OSGi (declarative services) and Java implementation types - -Building And Running The Sample Using Ant ------------------------------------------ -cd osgi-supplychain -ant compile -ant run - -you should see: -Buildfile: build.xml - -run: - [java] Main thread Thread[main,5,main] - [java] Started OSGi bundle with activator OSGiCustomerImpl - [java] Started OSGi bundle with activator OSGiShipperImpl - [java] Main thread sleeping ... - [java] Work thread Thread[pool-1-thread-1,5,main] - Order, submitted, fulfi -lled, shipped - [java] Stop OSGi bundle with activator OSGiShipperImpl - [java] Stop OSGi bundle with activator OSGiCustomerImpl - - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd osgi-supplychain -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running supplychain.SupplyChainClientTestCase -Started OSGi bundle with activator OSGiCustomerImpl -Started OSGi bundle with activator OSGiShipperImpl -Sleeping ... -Work thread Thread[pool-1-thread-1,5,main] - Order, submitted, fulfilled, shippe -d -Test complete -Stop OSGi bundle with activator OSGiShipperImpl -Stop OSGi bundle with activator OSGiCustomerImpl -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.062 sec - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/osgi-supplychain/build-bundles.xml b/branches/sca-android/samples/osgi-supplychain/build-bundles.xml deleted file mode 100644 index 7a31e6016b..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/build-bundles.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/osgi-supplychain/build.xml b/branches/sca-android/samples/osgi-supplychain/build.xml deleted file mode 100644 index 2e103e5a15..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/build.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/osgi-supplychain/osgi-supplychain.png b/branches/sca-android/samples/osgi-supplychain/osgi-supplychain.png deleted file mode 100644 index 2bec57ac8a..0000000000 Binary files a/branches/sca-android/samples/osgi-supplychain/osgi-supplychain.png and /dev/null differ diff --git a/branches/sca-android/samples/osgi-supplychain/osgi-supplychain.svg b/branches/sca-android/samples/osgi-supplychain/osgi-supplychain.svg deleted file mode 100644 index 43cb427944..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/osgi-supplychain.svg +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - supplychain - - CustomerComponent - - - RetailerComponent - - - WharehouseComponent - - - ShipperComponent - - - - - - OSGi - Java - Java - OSGi - - diff --git a/branches/sca-android/samples/osgi-supplychain/pom.xml b/branches/sca-android/samples/osgi-supplychain/pom.xml deleted file mode 100644 index e2a2e0574e..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/pom.xml +++ /dev/null @@ -1,187 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-osgi-supplychain - Apache Tuscany SCA OSGi Supply Chain Sample - - - - - org.apache.felix - org.apache.felix.main - 1.0.4 - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-osgi - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - sample-osgi-supplychain - - - org.apache.maven.plugins - maven-antrun-plugin - 1.1 - - - - ant - ant-trax - 1.6.5 - - - - - - create-bundles - generate-test-sources - - run - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/OSGiBundleImpl.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/OSGiBundleImpl.java deleted file mode 100644 index 5f40054ada..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/OSGiBundleImpl.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain; - - -import java.lang.reflect.Field; -import java.util.Hashtable; - -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceEvent; -import org.osgi.framework.ServiceListener; -import org.osgi.framework.ServiceReference; - - -/** - * Common code for all OSGi bundles which dont use declarative services. - * Registers services and sets references. - */ -public class OSGiBundleImpl implements ServiceListener, BundleActivator { - - - String name; - String serviceName; - String[] references; - Class[] referenceClasses; - Field[] referenceFields; - - Class myClass; - - private BundleContext bundleContext; - - public OSGiBundleImpl(String serviceName, String... references) { - - myClass = this.getClass(); - this.name = this.getClass().getSimpleName(); - this.serviceName = serviceName; - this.references = references; - - try { - referenceClasses = new Class[references.length]; - referenceFields = new Field[references.length]; - for (int i = 0; i < references.length; i++) { - referenceFields[i] = this.getClass().getDeclaredField(references[i]); - referenceFields[i].setAccessible(true); - referenceClasses[i] = referenceFields[i].getType(); - } - - } catch (Exception e) { - throw new RuntimeException(e); - } - - } - - public void start(BundleContext bc) { - - System.out.println("Started OSGi bundle with activator " + name); - - this.bundleContext = bc; - - bundleContext.registerService(serviceName, this, new Hashtable()); - - for (int i = 0; i < references.length; i++) { - - try { - - ServiceReference ref = bundleContext.getServiceReference(referenceClasses[i].getName()); - if (ref != null) { - Object obj = bundleContext.getService(ref); - referenceFields[i].set(this, referenceClasses[i].cast(obj)); - } else { - String filter = "(objectclass=" + referenceClasses[i].getName() + ")"; - this.bundleContext.addServiceListener(this, filter); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } - - public void stop(BundleContext bc) { - System.out.println("Stop OSGi bundle with activator " + name); - - } - - - public void serviceChanged(ServiceEvent event) { - try { - if (event.getType() == ServiceEvent.REGISTERED) { - - ServiceReference ref = event.getServiceReference(); - Object obj = bundleContext.getService(ref); - for (int i = 0; i < references.length; i++) { - if (referenceClasses[i].isAssignableFrom(obj.getClass())) { - referenceFields[i].set(this, referenceClasses[i].cast(obj)); - } - } - } - } catch (Throwable e) { - e.printStackTrace(); - } - } - - -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/SupplyChainClient.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/SupplyChainClient.java deleted file mode 100644 index 64814487cb..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/SupplyChainClient.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import supplychain.customer.Customer; - - -/** - * This client program shows how to create an SCA runtime, start it, - * locate a Customer service component and invoke it. - */ -public class SupplyChainClient { - - public static final void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("supplychain.composite"); - Customer customer = scaDomain.getService(Customer.class, "CustomerComponent"); - - System.out.println("Main thread " + Thread.currentThread()); - customer.purchaseGoods(); - System.out.println("Main thread sleeping ..."); - Thread.sleep(1000); - - scaDomain.close(); - } -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/customer/Customer.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/customer/Customer.java deleted file mode 100644 index 225dce0236..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/customer/Customer.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain.customer; - -import org.osoa.sca.annotations.OneWay; - -/** - * This is the business interface of the Customer service component. - */ -public interface Customer { - - public void purchaseGoods(); - - @OneWay - public void notifyShipment(String order); - -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java deleted file mode 100644 index 023d716651..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain.customer; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import supplychain.retailer.Retailer; - -/** - * This class implements the Customer service component (POJO implementation). - */ -@Service(Customer.class) -@Scope("COMPOSITE") -public class JavaCustomerComponentImpl implements Customer { - - private Retailer retailer; - - @Reference - public void setRetailer(Retailer retailer) { - this.retailer = retailer; - } - - public void purchaseGoods() { - retailer.submitOrder("Order"); - } - - public void notifyShipment(String order) { - System.out.print("Work thread " + Thread.currentThread() + " - "); - System.out.println(order); - } - -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java deleted file mode 100644 index a1c7fce60a..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain.customer; - - -import supplychain.retailer.Retailer; - -/** - * This class implements the Customer service component (OSGi declarative services implementation). - */ -public class OSGiCustomerComponentImpl implements Customer { - - - private Retailer retailer; - - - protected void setRetailer(Retailer retailer) { - this.retailer = retailer; - } - - protected void unsetRetailer(Retailer retailer) { - this.retailer = null; - } - - public void purchaseGoods() { - retailer.submitOrder("Order"); - } - - public void notifyShipment(String order) { - System.out.print("Work thread " + Thread.currentThread() + " - "); - System.out.println(order); - } - - -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerImpl.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerImpl.java deleted file mode 100644 index 4647a716c7..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain.customer; - - -import supplychain.OSGiBundleImpl; -import supplychain.retailer.Retailer; - -/** - * This class implements the Customer service component (OSGi procedural services implementation). - */ -public class OSGiCustomerImpl extends OSGiBundleImpl implements Customer { - - private Retailer retailer; - - public OSGiCustomerImpl() { - super("supplychain.customer.Customer", "retailer"); - - } - - public void purchaseGoods() { - retailer.submitOrder("Order"); - } - - public void notifyShipment(String order) { - System.out.print("Work thread " + Thread.currentThread() + " - "); - System.out.println(order); - } - - -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java deleted file mode 100644 index d0d29f94f8..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain.retailer; - - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import supplychain.warehouse.Warehouse; - -/** - * This class implements the Retailer service component (POJO implementation). - */ -@Service(Retailer.class) -@Scope("STATELESS") -public class JavaRetailerComponentImpl implements Retailer { - - private Warehouse warehouse; - - - @Reference - public void setWarehouse(Warehouse warehouse) { - this.warehouse = warehouse; - } - - - public void submitOrder(String order) { - - warehouse.fulfillOrder(order + ", submitted"); - - } - - - - -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java deleted file mode 100644 index 1b7fb15bf1..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain.retailer; - -import supplychain.warehouse.Warehouse; - -/** - * This class implements the Retailer service component (OSGi declarative services implementation). - */ -public class OSGiRetailerComponentImpl implements Retailer { - - private Warehouse warehouse; - - - protected void setWarehouse(Warehouse warehouse) { - this.warehouse = warehouse; - } - - protected void unsetWarehouse(Warehouse warehouse) { - this.warehouse = null; - } - - public void submitOrder(String order) { - - warehouse.fulfillOrder(order + ", submitted"); - - } - - -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerImpl.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerImpl.java deleted file mode 100644 index e97331c06c..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain.retailer; - - -import supplychain.OSGiBundleImpl; -import supplychain.warehouse.Warehouse; - -/** - * This class implements the Retailer service component (OSGi procedural services implementation). - */ -public class OSGiRetailerImpl extends OSGiBundleImpl implements Retailer { - - private Warehouse warehouse; - - public OSGiRetailerImpl() { - - super("supplychain.retailer.Retailer", "warehouse"); - } - - public void submitOrder(String order) { - warehouse.fulfillOrder(order + ", submitted"); - - } - - - -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/retailer/Retailer.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/retailer/Retailer.java deleted file mode 100644 index 1e87d59af1..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/retailer/Retailer.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain.retailer; - -/** - * This is the business interface of the Retailer service component. - */ -public interface Retailer { - - public void submitOrder(String order); - -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java deleted file mode 100644 index 4206ce7dc8..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain.shipper; - - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import supplychain.customer.Customer; - -/** - * This class implements the Shipper service component (POJO implementation). - */ -@Service(Shipper.class) -@Scope("COMPOSITE") -public class JavaShipperComponentImpl implements Shipper { - - private Customer customer; - - @Reference - public void setCustomer(Customer customer) { - this.customer = customer; - } - - public void processShipment(String order) { - customer.notifyShipment(order + ", shipped"); - } - - -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java deleted file mode 100644 index 0f88cca213..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain.shipper; - - -import supplychain.customer.Customer; - -/** - * This class implements the Shipper service component (OSGi declarative services implementation). - */ -public class OSGiShipperComponentImpl implements Shipper { - - private Customer customer; - - - protected void setCustomer(Customer customer) { - this.customer = customer; - } - - protected void unsetCustomer(Customer customer) { - this.customer = null; - } - - public void processShipment(String order) { - customer.notifyShipment(order + ", shipped"); - } - - -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperImpl.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperImpl.java deleted file mode 100644 index f55a068ede..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain.shipper; - - -import supplychain.OSGiBundleImpl; -import supplychain.customer.Customer; - -/** - * This class implements the Shipper service component (OSGi procedural services implementation). - */ -public class OSGiShipperImpl extends OSGiBundleImpl implements Shipper { - - private Customer customer; - - public OSGiShipperImpl() { - super("supplychain.shipper.Shipper", "customer"); - } - - - public void processShipment(String order) { - customer.notifyShipment(order + ", shipped"); - } - - -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/shipper/Shipper.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/shipper/Shipper.java deleted file mode 100644 index 2514928c10..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/shipper/Shipper.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain.shipper; - -/** - * This is the business interface of the Shipper service component. - */ -public interface Shipper { - - public void processShipment(String order); - -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java deleted file mode 100644 index 72eec76cc2..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain.warehouse; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import supplychain.shipper.Shipper; - -/** - * This class implements the Warehouse service component (POJO implementation). - */ -@Service(Warehouse.class) -@Scope("STATELESS") -public class JavaWarehouseComponentImpl implements Warehouse { - - private Shipper shipper; - - - @Reference - public void setShipper(Shipper shipper) { - this.shipper = shipper; - } - - public void fulfillOrder(String order) { - shipper.processShipment(order + ", fulfilled"); - } - - -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java deleted file mode 100644 index 600f3f0c74..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain.warehouse; - -import supplychain.shipper.Shipper; - -/** - * This class implements the Warehouse service component (OSGi declarative services implementation). - */ - -public class OSGiWarehouseComponentImpl implements Warehouse { - - private Shipper shipper; - - - protected void setShipper(Shipper shipper) { - this.shipper = shipper; - } - - protected void unsetShipper(Shipper shipper) { - this.shipper = null; - } - - public void fulfillOrder(String order) { - shipper.processShipment(order + ", fulfilled"); - - } - - - -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java deleted file mode 100644 index b8bca97bd0..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain.warehouse; - - -import supplychain.OSGiBundleImpl; -import supplychain.shipper.Shipper; - -/** - * This class implements the Warehouse service componentm (OSGi procedural services implementation). - */ - -public class OSGiWarehouseImpl extends OSGiBundleImpl implements Warehouse { - - private Shipper shipper; - - public OSGiWarehouseImpl() { - super("supplychain.warehouse.Warehouse", "shipper"); - } - - - public void fulfillOrder(String order) { - shipper.processShipment(order + ", fulfilled"); - - } - - -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/warehouse/Warehouse.java b/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/warehouse/Warehouse.java deleted file mode 100644 index 6f1f6b8730..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/java/supplychain/warehouse/Warehouse.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain.warehouse; - -/** - * This is the business interface of the Warehouse service component. - */ -public interface Warehouse { - - public void fulfillOrder(String order); - -} diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/Customer.componentType b/branches/sca-android/samples/osgi-supplychain/src/main/resources/Customer.componentType deleted file mode 100644 index 5c61a0961c..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/Customer.componentType +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/DSCustomer.componentType b/branches/sca-android/samples/osgi-supplychain/src/main/resources/DSCustomer.componentType deleted file mode 100644 index 87a184d968..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/DSCustomer.componentType +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/DSRetailer.componentType b/branches/sca-android/samples/osgi-supplychain/src/main/resources/DSRetailer.componentType deleted file mode 100644 index 872ab6601a..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/DSRetailer.componentType +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/DSShipper.componentType b/branches/sca-android/samples/osgi-supplychain/src/main/resources/DSShipper.componentType deleted file mode 100644 index 57fcbbc5d1..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/DSShipper.componentType +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/DSWarehouse.componentType b/branches/sca-android/samples/osgi-supplychain/src/main/resources/DSWarehouse.componentType deleted file mode 100644 index 75fa8029f7..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/DSWarehouse.componentType +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/Retailer.componentType b/branches/sca-android/samples/osgi-supplychain/src/main/resources/Retailer.componentType deleted file mode 100644 index 15185f2bf9..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/Retailer.componentType +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/Shipper.componentType b/branches/sca-android/samples/osgi-supplychain/src/main/resources/Shipper.componentType deleted file mode 100644 index 675597d80b..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/Shipper.componentType +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/Warehouse.componentType b/branches/sca-android/samples/osgi-supplychain/src/main/resources/Warehouse.componentType deleted file mode 100644 index 6e1ac3e5a9..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/Warehouse.componentType +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/Customer.mf b/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/Customer.mf deleted file mode 100644 index 88d79e5219..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/Customer.mf +++ /dev/null @@ -1,11 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Customer -Bundle-SymbolicName: supplychain.customer.Customer -Bundle-Version: 1.0.0 -Bundle-Localization: plugin -Import-Package: org.osgi.framework, - supplychain.retailer -Export-Package: supplychain.customer -Bundle-Activator: supplychain.customer.OSGiCustomerImpl - diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/Retailer.mf b/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/Retailer.mf deleted file mode 100644 index d95ef5d582..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/Retailer.mf +++ /dev/null @@ -1,10 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Retailer -Bundle-SymbolicName: supplychain.retailer.Retailer -Bundle-Version: 1.0.0 -Bundle-Localization: plugin -Import-Package: org.osgi.framework, - supplychain.warehouse -Export-Package: supplychain.retailer -Bundle-Activator: supplychain.retailer.OSGiRetailerImpl diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/Shipper.mf b/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/Shipper.mf deleted file mode 100644 index de7ac7ec7a..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/Shipper.mf +++ /dev/null @@ -1,10 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Shipper -Bundle-SymbolicName: supplychain.shipper.Shipper -Bundle-Version: 1.0.0 -Bundle-Localization: plugin -Import-Package: org.osgi.framework, - supplychain.customer -Export-Package: supplychain.shipper -Bundle-Activator: supplychain.shipper.OSGiShipperImpl diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/Warehouse.mf b/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/Warehouse.mf deleted file mode 100644 index 21241a6899..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/Warehouse.mf +++ /dev/null @@ -1,10 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Warehouse -Bundle-SymbolicName: supplychain.warehouse.Warehouse -Bundle-Version: 1.0.0 -Bundle-Localization: plugin -Import-Package: org.osgi.framework, - supplychain.shipper -Export-Package: supplychain.warehouse -Bundle-Activator: supplychain.warehouse.OSGiWarehouseImpl diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Customer.mf b/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Customer.mf deleted file mode 100644 index b5c5a862be..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Customer.mf +++ /dev/null @@ -1,10 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Customer -Bundle-SymbolicName: ds.supplychain.customer.Customer -Bundle-Version: 1.0.0 -Bundle-Localization: plugin -Import-Package: org.osgi.framework, - org.osgi.service.component, supplychain.retailer -Export-Package: supplychain.customer -Service-Component: osgi/ds/Customer.xml diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Customer.xml b/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Customer.xml deleted file mode 100644 index 5b368afd5b..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Customer.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Retailer.mf b/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Retailer.mf deleted file mode 100644 index 47897d16ca..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Retailer.mf +++ /dev/null @@ -1,11 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Retailer -Bundle-SymbolicName: ds.supplychain.retailer.Retailer -Bundle-Version: 1.0.0 -Bundle-Localization: plugin -Import-Package: org.osgi.framework, - org.osgi.service.component, - supplychain.warehouse -Export-Package: supplychain.retailer -Service-Component: osgi/ds/Retailer.xml diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Retailer.xml b/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Retailer.xml deleted file mode 100644 index cae7fdfde2..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Retailer.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Shipper.mf b/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Shipper.mf deleted file mode 100644 index f5333c7caa..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Shipper.mf +++ /dev/null @@ -1,10 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Shipper -Bundle-SymbolicName: ds.supplychain.shipper.Shipper -Bundle-Version: 1.0.0 -Bundle-Localization: plugin -Import-Package: org.osgi.framework, - org.osgi.service.component, supplychain.customer -Export-Package: supplychain.shipper -Service-Component: osgi/ds/Shipper.xml diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Shipper.xml b/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Shipper.xml deleted file mode 100644 index d894309b71..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Shipper.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Warehouse.mf b/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Warehouse.mf deleted file mode 100644 index 6166549e5a..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Warehouse.mf +++ /dev/null @@ -1,11 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Warehouse -Bundle-SymbolicName: ds.supplychain.warehouse.Warehouse -Bundle-Version: 1.0.0 -Bundle-Localization: plugin -Import-Package: org.osgi.framework, - org.osgi.service.component, - supplychain.shipper -Export-Package: supplychain.warehouse -Service-Component: osgi/ds/Warehouse.xml diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Warehouse.xml b/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Warehouse.xml deleted file mode 100644 index fc86a76784..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/osgi/ds/Warehouse.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/supplychain.composite b/branches/sca-android/samples/osgi-supplychain/src/main/resources/supplychain.composite deleted file mode 100644 index 0bbfed9176..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/supplychain.composite +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/osgi-supplychain/src/main/resources/supplychain.ds.composite b/branches/sca-android/samples/osgi-supplychain/src/main/resources/supplychain.ds.composite deleted file mode 100644 index d1e11168e2..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/main/resources/supplychain.ds.composite +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/osgi-supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java b/branches/sca-android/samples/osgi-supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java deleted file mode 100644 index ff15c0d9a2..0000000000 --- a/branches/sca-android/samples/osgi-supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package supplychain; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - - -import supplychain.customer.Customer; - -/** - * This client program shows how to create an SCA runtime, start it, locate a simple HelloWorld service component and - * invoke it. - */ -public class SupplyChainClientTestCase extends TestCase { - - private SCADomain scaDomain; - private Customer customer; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("supplychain.composite"); - customer = scaDomain.getService(Customer.class, "CustomerComponent"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - - public void test() throws Exception { - - customer.purchaseGoods(); - - System.out.println("Sleeping ..."); - Thread.sleep(2000); - System.out.println("Test complete"); - - } - - -} diff --git a/branches/sca-android/samples/photo-gallery/README b/branches/sca-android/samples/photo-gallery/README deleted file mode 100644 index c66edea985..0000000000 --- a/branches/sca-android/samples/photo-gallery/README +++ /dev/null @@ -1,28 +0,0 @@ -Photo-Gallery Sample -====================================== - -This is a sample store scenario that is used as a getting started guide -for Tuscany SCA. For detailed information, please see: - -http://tuscany.apache.org/getting-started-with-tuscany.html - -or - -http://tuscany.apache.org/getting-started-with-tuscany-using-tuscany-eclipse-plugin.html - - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built using Ant as follows: - -cd store -ant compile - -and then, to run: - -ant run - -Once the store application is running use your browser to visit the following -URL: - -http://localhost:8080/gallery/ diff --git a/branches/sca-android/samples/photo-gallery/build.xml b/branches/sca-android/samples/photo-gallery/build.xml deleted file mode 100644 index 652afc3570..0000000000 --- a/branches/sca-android/samples/photo-gallery/build.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/photo-gallery/photo-gallery.png b/branches/sca-android/samples/photo-gallery/photo-gallery.png deleted file mode 100644 index da413edeee..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/photo-gallery.png and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/photo-gallery.svg b/branches/sca-android/samples/photo-gallery/photo-gallery.svg deleted file mode 100644 index 74f8ecd36d..0000000000 --- a/branches/sca-android/samples/photo-gallery/photo-gallery.svg +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - store - ufs - - ShoppingCart - - CurrencyConverter - - - - - - - - - - CurrenyCode HTTP JSONRPC Atom - - Catalog - - - - diff --git a/branches/sca-android/samples/photo-gallery/pom.xml b/branches/sca-android/samples/photo-gallery/pom.xml deleted file mode 100644 index 1c258b47c8..0000000000 --- a/branches/sca-android/samples/photo-gallery/pom.xml +++ /dev/null @@ -1,148 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../pom.xml - - sample-photo-gallery - Apache Tuscany SCA Getting Started Online Store Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-data-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-widget-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.4-SNAPSHOT - runtime - - - - org.apache.derby - derby - 10.2.1.6 - - - - org.slf4j - slf4j-api - 1.3.0 - - - - org.slf4j - slf4j-log4j12 - 1.3.0 - - - - org.slf4j - jcl104-over-slf4j - 1.3.0 - - - - javax.jcr - jcr - 1.0 - - - - org.apache.jackrabbit - jackrabbit-core - 1.4 - - - - org.apache.jackrabbit - jackrabbit-api - 1.4 - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/photo-gallery/src/main/java/launch/LaunchGallery.java b/branches/sca-android/samples/photo-gallery/src/main/java/launch/LaunchGallery.java deleted file mode 100644 index 1007cd49b0..0000000000 --- a/branches/sca-android/samples/photo-gallery/src/main/java/launch/LaunchGallery.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class LaunchGallery { - public static void main(String[] args) throws Exception { - System.out.println("Starting ..."); - SCADomain scaDomain = SCADomain.newInstance("photo-gallery.composite"); - System.out.println("photo.gallery.composite ready for big business !!!"); - System.in.read(); - System.out.println("Stopping ..."); - scaDomain.close(); - System.out.println(); - } -} diff --git a/branches/sca-android/samples/photo-gallery/src/main/java/launch/LaunchGalleryJCR.java b/branches/sca-android/samples/photo-gallery/src/main/java/launch/LaunchGalleryJCR.java deleted file mode 100644 index d07dc63592..0000000000 --- a/branches/sca-android/samples/photo-gallery/src/main/java/launch/LaunchGalleryJCR.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class LaunchGalleryJCR { - public static void main(String[] args) throws Exception { - System.out.println("Starting ..."); - SCADomain scaDomain = SCADomain.newInstance("photo-gallery-jcr.composite"); - System.out.println("photo.gallery.composite ready for big business !!!"); - System.in.read(); - System.out.println("Stopping ..."); - scaDomain.close(); - System.out.println(); - } -} diff --git a/branches/sca-android/samples/photo-gallery/src/main/java/services/Album.java b/branches/sca-android/samples/photo-gallery/src/main/java/services/Album.java deleted file mode 100644 index 5257d0e703..0000000000 --- a/branches/sca-android/samples/photo-gallery/src/main/java/services/Album.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Album { - - public String[] getPictures(); - -} diff --git a/branches/sca-android/samples/photo-gallery/src/main/java/services/AlbumImpl.java b/branches/sca-android/samples/photo-gallery/src/main/java/services/AlbumImpl.java deleted file mode 100644 index dd2b086e29..0000000000 --- a/branches/sca-android/samples/photo-gallery/src/main/java/services/AlbumImpl.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import java.io.File; -import java.io.FilenameFilter; -import java.net.URL; -import java.util.ArrayList; -import java.util.List; - -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; - -public class AlbumImpl implements Album { - private String gallery; - private String album; - private String location; - private List pictures = new ArrayList(); - - @Property - public void setGallery(String gallery) { - this.gallery = gallery; - this.location = null; - } - @Property - public void setAlbum(String album) { - this.album = album; - this.location = null; - } - - protected String getLocation() { - if (location == null) { - location = gallery + "/" + album + "/"; - } - return location; - - } - - @Init - public void init() { - try { - URL albumURL = this.getClass().getClassLoader().getResource(getLocation()); - if(albumURL != null) { - File album = new File(albumURL.toURI()); - if (album.isDirectory() && album.exists()) { - String[] listPictures = album.list(new ImageFilter(".jpg")); - for(String image : listPictures) { - image = getLocation() + image; - pictures.add(image); - } - } - } - } catch (Exception e) { - // FIXME: ignore for now - e.printStackTrace(); - } - } - - public String[] getPictures() { - String[] pictureArray = new String[pictures.size()]; - pictures.toArray(pictureArray); - return pictureArray; - } - - /** - * Inner fileFilter class - */ - private class ImageFilter implements FilenameFilter { - String afn; - ImageFilter(String afn) { this.afn = afn; } - public boolean accept(File dir, String name) { - // Strip path information: - String f = new File(name).getName(); - return f.indexOf(afn) != -1; - } - } ///:~ - -} diff --git a/branches/sca-android/samples/photo-gallery/src/main/java/services/jcr/AlbumImpl.java b/branches/sca-android/samples/photo-gallery/src/main/java/services/jcr/AlbumImpl.java deleted file mode 100644 index ac4e6f52f4..0000000000 --- a/branches/sca-android/samples/photo-gallery/src/main/java/services/jcr/AlbumImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services.jcr; - -import java.io.File; -import java.io.FilenameFilter; -import java.io.InputStream; -import java.net.URL; -import java.util.ArrayList; -import java.util.List; - -import javax.jcr.Node; -import javax.jcr.NodeIterator; -import javax.jcr.Repository; -import javax.jcr.Session; -import javax.jcr.SimpleCredentials; - -import org.apache.jackrabbit.core.TransientRepository; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; - -import services.Album; - -public class AlbumImpl implements Album { - private String gallery; - private String album; - private String location; - private Repository repository=null; - private Session session=null; - - @Property - public void setGallery(String gallery) { - this.gallery = gallery; - this.location = null; - } - @Property - public void setAlbum(String album) { - this.album = album; - this.location = null; - } - - protected String getLocation() { - if (location == null) { - location = gallery + "/" + album + "/"; - } - return location; - - } - - @Init - public void init() { - try { - URL albumURL = this.getClass().getClassLoader().getResource(getLocation()); - if(albumURL != null) { - repository = new TransientRepository(); - session = repository.login( - new SimpleCredentials("username", "password".toCharArray())); - try { - File album = new File(albumURL.toURI()); - if (album.isDirectory() && album.exists()) { - String[] listPictures = album.list(new ImageFilter(".jpg")); - for(String image : listPictures) { - Node root=session.getRootNode(); - Node picNode=root.addNode(image); - InputStream inFile = getClass().getClassLoader().getResourceAsStream(getLocation()+image); - picNode.setProperty("image", inFile ); - picNode.setProperty("name", image); - picNode.setProperty("location", getLocation()+image); - //image = getLocation() + image; - //pictures.add(image); - } - } - - session.save(); - }catch (Exception e){ - // FIXME: ignore for now - e.printStackTrace(); - } - } - } catch (Exception e) { - // FIXME: ignore for now - e.printStackTrace(); - } - } - - public String[] getPictures() { - List pictures = new ArrayList(); - - try{ - Node root=session.getRootNode(); - NodeIterator nodes = root.getNodes(); - - while(nodes.hasNext()){ - Node node=nodes.nextNode(); - if(node.getPath().equals("/jcr:system")) continue; - - pictures.add(node.getProperty("location").getString()); - //System.out.println(node.getProperty("name").getString()); - //System.out.println(node.getPath()); - } - }catch (Exception e) { - // FIXME: ignore for now - e.printStackTrace(); - } - - String[] pictureArray = new String[pictures.size()]; - pictures.toArray(pictureArray); - removeNodes(); - return pictureArray; - } - - - public void removeNodes(){ - try{ - Node root=session.getRootNode(); - NodeIterator nodes = root.getNodes(); - while(nodes.hasNext()){ - Node node=nodes.nextNode(); - if(node.getPath().equals("/jcr:system")) continue; - else node.remove(); - } - session.save(); - }catch (Exception e) { - // FIXME: ignore for now - e.printStackTrace(); - } - - } - /** - * Inner fileFilter class - */ - private class ImageFilter implements FilenameFilter { - String afn; - ImageFilter(String afn) { this.afn = afn; } - public boolean accept(File dir, String name) { - // Strip path information: - String f = new File(name).getName(); - return f.indexOf(afn) != -1; - } - } ///:~ - -} diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery.html b/branches/sca-android/samples/photo-gallery/src/main/resources/gallery.html deleted file mode 100644 index f6566e88ec..0000000000 --- a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery.html +++ /dev/null @@ -1,135 +0,0 @@ - - - -Photo Gallery - - - - - - - - - -
-

Apache Tuscany Photo Gallery

-
-
- - -
- - - - - -
- - - - - - - - -
-
- - - - - -
- -
- -
- - - diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00368.jpg b/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00368.jpg deleted file mode 100644 index 9437b321e2..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00368.jpg and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00369.jpg b/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00369.jpg deleted file mode 100644 index 07f37ec505..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00369.jpg and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00370.jpg b/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00370.jpg deleted file mode 100644 index 2193784271..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00370.jpg and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00371.jpg b/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00371.jpg deleted file mode 100644 index 1532ee2c1b..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00371.jpg and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00373.jpg b/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00373.jpg deleted file mode 100644 index 17ffd73aec..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00373.jpg and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00375.jpg b/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00375.jpg deleted file mode 100644 index 19e9ec37df..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00375.jpg and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00376.jpg b/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00376.jpg deleted file mode 100644 index 022416dbce..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00376.jpg and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00377.jpg b/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00377.jpg deleted file mode 100644 index c78a974714..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00377.jpg and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00378.jpg b/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00378.jpg deleted file mode 100644 index a98070925a..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00378.jpg and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00379.jpg b/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00379.jpg deleted file mode 100644 index dc83889116..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00379.jpg and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00380.jpg b/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00380.jpg deleted file mode 100644 index 0e33548135..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/gallery/boston/dsc00380.jpg and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/index.gif b/branches/sca-android/samples/photo-gallery/src/main/resources/index.gif deleted file mode 100755 index 7599ac7686..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/index.gif and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/index_on.gif b/branches/sca-android/samples/photo-gallery/src/main/resources/index_on.gif deleted file mode 100755 index 153e9879d6..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/index_on.gif and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/next.gif b/branches/sca-android/samples/photo-gallery/src/main/resources/next.gif deleted file mode 100755 index 002eaf6951..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/next.gif and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/next_disabled.gif b/branches/sca-android/samples/photo-gallery/src/main/resources/next_disabled.gif deleted file mode 100755 index 38b1298453..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/next_disabled.gif and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/next_on.gif b/branches/sca-android/samples/photo-gallery/src/main/resources/next_on.gif deleted file mode 100755 index 4e5bb3e7ef..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/next_on.gif and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/photo-gallery-jcr.composite b/branches/sca-android/samples/photo-gallery/src/main/resources/photo-gallery-jcr.composite deleted file mode 100644 index 23190de555..0000000000 --- a/branches/sca-android/samples/photo-gallery/src/main/resources/photo-gallery-jcr.composite +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - gallery - boston - - - - - - - - - diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/photo-gallery.composite b/branches/sca-android/samples/photo-gallery/src/main/resources/photo-gallery.composite deleted file mode 100644 index 0bb3c4b4db..0000000000 --- a/branches/sca-android/samples/photo-gallery/src/main/resources/photo-gallery.composite +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - gallery - boston - - - - - - - - - diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/prev.gif b/branches/sca-android/samples/photo-gallery/src/main/resources/prev.gif deleted file mode 100755 index 4eea10f1dc..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/prev.gif and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/prev_disabled.gif b/branches/sca-android/samples/photo-gallery/src/main/resources/prev_disabled.gif deleted file mode 100755 index 7e35f07076..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/prev_disabled.gif and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/prev_on.gif b/branches/sca-android/samples/photo-gallery/src/main/resources/prev_on.gif deleted file mode 100755 index 3ef9a776bb..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/prev_on.gif and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/show_slide.gif b/branches/sca-android/samples/photo-gallery/src/main/resources/show_slide.gif deleted file mode 100644 index a5b6a15c2b..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/show_slide.gif and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/space.gif b/branches/sca-android/samples/photo-gallery/src/main/resources/space.gif deleted file mode 100644 index 170fe82b65..0000000000 Binary files a/branches/sca-android/samples/photo-gallery/src/main/resources/space.gif and /dev/null differ diff --git a/branches/sca-android/samples/photo-gallery/src/main/resources/styles.css b/branches/sca-android/samples/photo-gallery/src/main/resources/styles.css deleted file mode 100755 index d23d949858..0000000000 --- a/branches/sca-android/samples/photo-gallery/src/main/resources/styles.css +++ /dev/null @@ -1,121 +0,0 @@ -body { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 12px; - color: #888888; - background-color: #000000; - margin-top: 0px; -} - -html { - scrollbar-face-color:#444444; - scrollbar-highlight-color:#000000; - scrollbar-3dlight-color:#000000; - scrollbar-darkshadow-color:#000000; - scrollbar-shadow-color:#000000; - scrollbar-arrow-color:#888888; - scrollbar-track-color:#000000; -} - -a:link { - text-decoration: none; - color: #AAAAAA; -} - -a:visited { - text-decoration: none; - color: #AAAAAA; -} - -a:hover { - text-decoration: none; - color: #FFFFFF; -} - -.current { - font-weight: bold; - color: #AAAAAA; - background-color: #666666; -} - -.cthumb { - background-color: #666666; - border: 0px; border-width: 0px; -} - -.thumb { - background-color: #333333; - border: 0px; border-width: 0px; -} - -.image { margin: 0px; border-width: 1px; border: 1px solid;} -a:link .image { border-color: #aaaaaa; color: #aaaaaa;} -a:visited .image { border-color: #666666; color: #666666;} -a:hover .image { border-color: #ffffff; color: #ffffff;} - -.slideImage { border-width: 0px; border: 0px solid; border-color: #ffffff;} -a:link .slideImage { border-color: #ffffff;} -a:visited .slideImage { border-color: #ffffff;} - -.title { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 14px; - font-weight: bold; - color: #000000; -} - -.title a:link { - text-decoration: none; - color: #000000; -} - -.title a:visited { - text-decoration: none; - color: #000000; -} - -.title a:hover { - text-decoration: none; - color: #ffffff; -} - -.infotable { - border: 1px solid #444444; - border-collapse: collapse; -} - -.infotable td { - border: 1px solid #444444; -} - -.infotable table td { - border: 0px; -} - -.dirname { - font-size: 12px; - font-weight: bold; - color: #AAAAAA; -} - -.comment { - color: #CCCCCC; - font-weight: bold; - font-size: 12px; -} - -.smalltxt { - color: #888888; - font-size: 11px; -} - -.xsmalltxt { - color: #888888; - font-size: 9px; -} - -.newlabel { - font-size: 8px; - font-weight: bold; - color: #EEEEEE; - background-color: #558800; -} \ No newline at end of file diff --git a/branches/sca-android/samples/pom.xml b/branches/sca-android/samples/pom.xml index 28ed3c1048..e7af01dbac 100644 --- a/branches/sca-android/samples/pom.xml +++ b/branches/sca-android/samples/pom.xml @@ -46,65 +46,15 @@ binding-echo binding-echo-extension calculator - calculator2 - calculator-distributed - calculator-implementation-policies calculator-lean - calculator-osgi - calculator-rcp - calculator-rmi-reference - calculator-rmi-service - calculator-script - calculator-webapp - calculator-ws-secure-webapp - calculator-ws-webapp - callback-ws-client - callback-ws-service - customer-dojo databinding-echo - domain-management - feed-aggregator - feed-aggregator-webapp - helloworld-bpel - helloworld-bpel-ws - helloworld-dojo-webapp - helloworld-jms-webapp - helloworld-jsonrpc-webapp - helloworld-jsp - helloworld-reference-jms - helloworld-service-jms - helloworld-servlet - helloworld-web - helloworld-web-callback - helloworld-ws-reference - helloworld-ws-reference-lean - helloworld-ws-reference-jms - helloworld-ws-reference-secure - helloworld-ws-sdo - helloworld-ws-sdo-webapp - helloworld-ws-service - helloworld-ws-service-jms - helloworld-ws-service-secure - helloworld-ws-service-webapp implementation-composite implementation-crud implementation-crud-extension implementation-pojo-extension - loanapplication - photo-gallery - quote-xquery simple-bigbank - simple-bigbank-spring simple-callback - simple-callback-ws - spring-bigbank-calculator - spring-bigbank-checkaccount - spring-bigbank-stockquote - store - store-distributed supplychain - web-resource - zipcode-jaxws diff --git a/branches/sca-android/samples/quote-xquery/README b/branches/sca-android/samples/quote-xquery/README deleted file mode 100644 index cf8a4609a6..0000000000 --- a/branches/sca-android/samples/quote-xquery/README +++ /dev/null @@ -1,450 +0,0 @@ -Quote Xquery Sample -=================== - - This sample covers the most important integration scenarios for the xquery - implementation type and its corresponding saxon data bindings. - -If you just want to run it to see what happens open two command prompts (one for the server -and the other for the client), navigate to this sample directory and do: - -Command Prompt 1: -ant -ant run-server - -Command Prompt 2: -ant run - -OR if you don't have ant, on Windows do - -In the directory samples\quote-xquery use the JDK 1.5 java command to run the class xquery.quote.XQueryQuoteClient - -Linux: java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-quote-xquery.jar xquery.quote.XQueryQuoteServer -Linux: java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-quote-xquery.jar xquery.quote.XQueryQuoteClient - -Windows: java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-quote-xquery.jar xquery.quote.XQueryQuoteServer -Windows: java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-quote-xquery.jar xquery.quote.XQueryQuoteClient - -Results ----------- -The sample when run should simply display on the standard output some startup messages followed by: - -The compilation: - -Buildfile: build.xml - -init: - -generate-sdo: - [java] >> Generating code - [java] >> Generating packages - [java] >> Generating package QuotePackageImpl - [java] >> Generating Java interface org.example.quote.QuoteFactory - [java] >> Generating /TargetProject/org/example/quote/QuoteFactory.java - [java] >> Examining old /TargetProject/org/example/quote/QuoteFactory.java - [java] >> Generating Java class org.example.quote.impl.QuoteFactoryImpl - [java] >> Generating /TargetProject/org/example/quote/impl/QuoteFactoryImpl.java - [java] >> Examining old /TargetProject/org/example/quote/impl/QuoteFactoryImpl.java - [java] >> Generating Quote - [java] >> Generating Java interface org.example.quote.Quote - [java] >> Generating /TargetProject/org/example/quote/Quote.java - [java] >> Examining old /TargetProject/org/example/quote/Quote.java - [java] >> Generating Java class org.example.quote.impl.QuoteImpl - [java] >> Generating /TargetProject/org/example/quote/impl/QuoteImpl.java - [java] >> Examining old /TargetProject/org/example/quote/impl/QuoteImpl.java - [java] >> Generating Response - [java] >> Generating Java interface org.example.quote.QuoteResponse - [java] >> Generating /TargetProject/org/example/quote/QuoteResponse.java - [java] >> Examining old /TargetProject/org/example/quote/QuoteResponse.java - [java] >> Generating Java class org.example.quote.impl.QuoteResponseImpl - [java] >> Generating /TargetProject/org/example/quote/impl/QuoteResponseImpl.java - [java] >> Examining old /TargetProject/org/example/quote/impl/QuoteResponseImpl.java - [java] >> Generating code - [java] >> Generating packages - [java] >> Generating package AvailPackageImpl - [java] >> Generating Java interface org.example.avail.AvailFactory - [java] >> Generating /TargetProject/org/example/avail/AvailFactory.java - [java] >> Examining old /TargetProject/org/example/avail/AvailFactory.java - [java] >> Generating Java class org.example.avail.impl.AvailFactoryImpl - [java] >> Generating /TargetProject/org/example/avail/impl/AvailFactoryImpl.java - [java] >> Examining old /TargetProject/org/example/avail/impl/AvailFactoryImpl.java - [java] >> Generating Quote - [java] >> Generating Java interface org.example.avail.AvailQuote - [java] >> Generating /TargetProject/org/example/avail/AvailQuote.java - [java] >> Examining old /TargetProject/org/example/avail/AvailQuote.java - [java] >> Generating Java class org.example.avail.impl.AvailQuoteImpl - [java] >> Generating /TargetProject/org/example/avail/impl/AvailQuoteImpl.java - [java] >> Examining old /TargetProject/org/example/avail/impl/AvailQuoteImpl.java - [java] >> Generating Request - [java] >> Generating Java interface org.example.avail.AvailRequest - [java] >> Generating /TargetProject/org/example/avail/AvailRequest.java - [java] >> Examining old /TargetProject/org/example/avail/AvailRequest.java - [java] >> Generating Java class org.example.avail.impl.AvailRequestImpl - [java] >> Generating /TargetProject/org/example/avail/impl/AvailRequestImpl.java - [java] >> Examining old /TargetProject/org/example/avail/impl/AvailRequestImpl.java - [java] >> Generating code - [java] >> Generating packages - [java] >> Generating package PricePackageImpl - [java] >> Generating Java interface org.example.price.PriceFactory - [java] >> Generating /TargetProject/org/example/price/PriceFactory.java - [java] >> Examining old /TargetProject/org/example/price/PriceFactory.java - [java] >> Generating Java class org.example.price.impl.PriceFactoryImpl - [java] >> Generating /TargetProject/org/example/price/impl/PriceFactoryImpl.java - [java] >> Examining old /TargetProject/org/example/price/impl/PriceFactoryImpl.java - [java] >> Generating Quote - [java] >> Generating Java interface org.example.price.PriceQuote - [java] >> Generating /TargetProject/org/example/price/PriceQuote.java - [java] >> Examining old /TargetProject/org/example/price/PriceQuote.java - [java] >> Generating Java class org.example.price.impl.PriceQuoteImpl - [java] >> Generating /TargetProject/org/example/price/impl/PriceQuoteImpl.java - [java] >> Examining old /TargetProject/org/example/price/impl/PriceQuoteImpl.java - [java] >> Generating Request - [java] >> Generating Java interface org.example.price.PriceRequest - [java] >> Generating /TargetProject/org/example/price/PriceRequest.java - [java] >> Examining old /TargetProject/org/example/price/PriceRequest.java - [java] >> Generating Java class org.example.price.impl.PriceRequestImpl - [java] >> Generating /TargetProject/org/example/price/impl/PriceRequestImpl.java - [java] >> Examining old /TargetProject/org/example/price/impl/PriceRequestImpl.java - [java] >> Generating Requests - [java] >> Generating Java interface org.example.price.PriceRequests - [java] >> Generating /TargetProject/org/example/price/PriceRequests.java - [java] >> Examining old /TargetProject/org/example/price/PriceRequests.java - [java] >> Generating Java class org.example.price.impl.PriceRequestsImpl - [java] >> Generating /TargetProject/org/example/price/impl/PriceRequestsImpl.java - [java] >> Examining old /TargetProject/org/example/price/impl/PriceRequestsImpl.java - [java] >> Generating Ship Address - [java] >> Generating Java interface org.example.price.ShipAddress - [java] >> Generating /TargetProject/org/example/price/ShipAddress.java - [java] >> Examining old /TargetProject/org/example/price/ShipAddress.java - [java] >> Generating Java class org.example.price.impl.ShipAddressImpl - [java] >> Generating /TargetProject/org/example/price/impl/ShipAddressImpl.java - [java] >> Examining old /TargetProject/org/example/price/impl/ShipAddressImpl.java - -compile: - [jar] Building jar: C:\Apache\tuscany-sca-1.0-incubating-SNAPSHOT\samples\quote-xquery\target\sample-quote-xquery.jar -BUILD SUCCESSFUL - - -The service side: - -run-server: - [java] Sep 18, 2007 1:14:16 PM org.apache.catalina.core.StandardEngine start - [java] INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 - [java] Sep 18, 2007 1:14:16 PM org.apache.catalina.startup.ContextConfig defaultWebConfig - [java] INFO: No default web.xml - [java] Sep 18, 2007 1:14:16 PM org.apache.catalina.startup.DigesterFactory register - [java] WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd - [java] Sep 18, 2007 1:14:16 PM org.apache.catalina.startup.DigesterFactory register - [java] WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd - [java] Sep 18, 2007 1:14:16 PM org.apache.catalina.startup.DigesterFactory register - [java] WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd - [java] Sep 18, 2007 1:14:16 PM org.apache.catalina.startup.DigesterFactory register - [java] WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd - [java] Sep 18, 2007 1:14:16 PM org.apache.catalina.startup.DigesterFactory register - [java] WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xsd - [java] Sep 18, 2007 1:14:17 PM org.apache.coyote.http11.Http11Protocol init - [java] INFO: Initializing Coyote HTTP/1.1 on http-8085 - [java] Sep 18, 2007 1:14:17 PM org.apache.coyote.http11.Http11Protocol start - [java] INFO: Starting Coyote HTTP/1.1 on http-8085 - [java] Sep 18, 2007 1:14:17 PM org.apache.tuscany.sca.http.tomcat.TomcatServer addServletMapping - [java] INFO: Added Servlet mapping: http://localhost:8085/QuoteJoinService - [java] Sep 18, 2007 1:14:17 PM org.apache.tuscany.sca.http.tomcat.TomcatServer addServletMapping - [java] INFO: Added Servlet mapping: http://localhost:8085/AvailQuoteProviderService - [java] XQuery Quote server started (press enter to shutdown) - [java] Sep 18, 2007 1:16:54 PM org.apache.coyote.http11.Http11Protocol destroy - [java] INFO: Stopping Coyote HTTP/1.1 on http-8085 - -BUILD SUCCESSFUL -Total time: 2 minutes 51 seconds - -The client side: -Buildfile: build.xml - -run: - [java] Input quote for the price list: - [java] - [java] - [java] Acme Inc - [java] - [java] - [java] - [java] 12 - [java] 1.0 - [java] - [java] - [java] 134 - [java] 34.1 - [java] - [java] - [java] 211 - [java] 10.0 - [java] - [java] - [java] - [java] - [java] Input quote for the availability: - [java] - [java] - [java] - [java] 12 - [java] 10 - [java] true - [java] 2003-03-22 - [java] - [java] - [java] 134 - [java] 345 - [java] false - [java] BackOrder - [java] - [java] - [java] 211 - [java] 100 - [java] true - [java] 2003-04-21 - [java] - [java] - [java] - [java] - [java] Output quote from local join: - [java] - [java] - [java] Acme Inc - [java]
12 Springs Rd,Morris Plains,NJ,07960
- [java] - [java] 12 - [java] 1.0 - [java] 10 - [java] true - [java] 2003-03-22 - [java] 0.1 - [java] 11.0 - [java] - [java] - [java] 134 - [java] 34.1 - [java] 345 - [java] false - [java] BackOrder - [java] 0.1 - [java] 0.0 - [java] - [java] - [java] 211 - [java] 10.0 - [java] 100 - [java] true - [java] 2003-04-21 - [java] 0.1 - [java] 1100.0 - [java] - [java]
- [java] - [java] - [java] Output quote from local join (second invokation): - [java] - [java] - [java] Acme Inc - [java]
12 Springs Rd,Morris Plains,NJ,07960
- [java] - [java] 12 - [java] 1.0 - [java] 10 - [java] true - [java] 2003-03-22 - [java] 0.2 - [java] 12.0 - [java] - [java] - [java] 134 - [java] 34.1 - [java] 345 - [java] false - [java] BackOrder - [java] 0.2 - [java] 0.0 - [java] - [java] - [java] 211 - [java] 10.0 - [java] 100 - [java] true - [java] 2003-04-21 - [java] 0.2 - [java] 1200.0 - [java] - [java]
- [java] - [java] - [java] Output quote from web service join: - [java] - [java] - [java] Acme Inc - [java]
12 Springs Rd,Morris Plains,NJ,07960
- [java] - [java] 12 - [java] 1.0 - [java] 10 - [java] true - [java] 2003-03-22 - [java] 0.1 - [java] 11.0 - [java] - [java] - [java] 134 - [java] 34.1 - [java] 345 - [java] false - [java] BackOrder - [java] 0.1 - [java] 0.0 - [java] - [java] - [java] 211 - [java] 10.0 - [java] 100 - [java] true - [java] 2003-04-21 - [java] 0.1 - [java] 1100.0 - [java] - [java]
- [java] - [java] - [java] Output quote from properties join: - [java] - [java] - [java] Acme Inc - [java]
12 Springs Rd,Morris Plains,NJ,07960
- [java] - [java] 12 - [java] 1.0 - [java] 10 - [java] true - [java] 2003-03-22 - [java] 0.1 - [java] 11.0 - [java] - [java] - [java] 134 - [java] 34.1 - [java] 345 - [java] false - [java] BackOrder - [java] 0.1 - [java] 0.0 - [java] - [java] - [java] 211 - [java] 10.0 - [java] 100 - [java] true - [java] 2003-04-21 - [java] 0.1 - [java] 1100.0 - [java] - [java]
- [java] - [java] - [java] Output quote from external references join: - [java] - [java] - [java] Acme Inc - [java]
12 Springs Rd,Morris Plains,NJ,07960
- [java] - [java] 12 - [java] 1.0 - [java] 10 - [java] true - [java] 2003-03-22 - [java] 0.1 - [java] 11.0 - [java] - [java] - [java] 134 - [java] 34.1 - [java] 345 - [java] false - [java] BackOrder - [java] 0.1 - [java] 0.0 - [java] - [java] - [java] 211 - [java] 10.0 - [java] 100 - [java] true - [java] 2003-04-21 - [java] 0.1 - [java] 1100.0 - [java] - [java]
- [java] - -BUILD SUCCESSFUL -Total time: 16 seconds - - - -Sample Overview ---------------- - - 1. There is a central component for invoking the different - scenarios: QuoteJoinLocalComponent - 2. It provides the following cases: - - invoke XQuery component in the current assembly, by providing all needed - information as input parameters - - invoke XQuery component in external assembly, which is exposed as a web - service - - invoke XQuery component in the current assembly, which retrieves the needed - information from the component properties - - invoke XQuery component in the current assembly, which retrieves the needed - information from its references to other components: - - one of the components is in the current assembly - - the other component is in anther assembly and it is exposed (and accessed) - as web service - - 3. All of the XQuery components have reference to a component for calculation of the - total price - 4. SDO is used for data interchange - -src/main/resources - wsdl - AvailQuote.xsd - PriceQuote.xsd - Quote.xsd - quotejoin.wsdl - META-INF - sca - quote_join_external_references.xq --- the external references xquery script - quote_join_properties.xq --- the property-based join xquery script - quote_join.xq --- the join xquery script - xqueryquotews.composite --- composite file for the client side - xqueryquotewsclient.composite --- composite file for the service side - - build.xml - the Ant build file - pom.xml - the Maven build file - - -Building And Running The Sample Using Ant ------------------------------------------ -cd quote-xquery -ant compile -ant run-server - -you should see: -Buildfile: build.xml - -run: - - - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd quote-xquery -mvn - - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/quote-xquery/build.xml b/branches/sca-android/samples/quote-xquery/build.xml deleted file mode 100644 index a3a5acf102..0000000000 --- a/branches/sca-android/samples/quote-xquery/build.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/quote-xquery/pom.xml b/branches/sca-android/samples/quote-xquery/pom.xml deleted file mode 100644 index b8a294de08..0000000000 --- a/branches/sca-android/samples/quote-xquery/pom.xml +++ /dev/null @@ -1,184 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-quote-xquery - Apache Tuscany SCA XQuery Quote Implementation Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-xquery - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sdo - tuscany-sdo-lib - 1.1.1 - - - - org.apache.tuscany.sdo - tuscany-sdo-impl - 1.1.1 - - - - - - net.sf.saxon - saxon - 8.7 - - - - org.apache.tuscany.sca - tuscany-databinding-sdo - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - compile - - - - - - ${artifactId} - - - org.codehaus.mojo - build-helper-maven-plugin - 1.0 - - - add-source - generate-sources - - add-test-source - - - - target/sdo-source - - - - - - - org.apache.tuscany.sdo - tuscany-sdo-plugin - 1.1.1 - - - generate-quotejoin-sdo - generate-sources - - ${basedir}/src/main/resources/wsdl/quotejoin.wsdl - - - generate - - - - generate-quote-sdo - generate-sources - - ${basedir}/src/main/resources/wsdl/Quote.xsd - - - generate - - - - generate-avail-quote-sdo - generate-sources - - ${basedir}/src/main/resources/wsdl/AvailQuote.xsd - - - generate - - - - generate-price-quote-sdo - generate-sources - - ${basedir}/src/main/resources/wsdl/PriceQuote.xsd - - - generate - - - - - - - - diff --git a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderImpl.java b/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderImpl.java deleted file mode 100644 index 8a42136b5d..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -import org.example.avail.AvailQuote; -import org.osoa.sca.annotations.Service; - -@Service(AvailQuoteProviderService.class) -public class AvailQuoteProviderImpl implements AvailQuoteProviderService { - - public AvailQuote provideAvailQuote(String dummyString) { - return QuoteDataUtil.buildAvailQuoteData(); - } -} diff --git a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderNodeInfo.java b/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderNodeInfo.java deleted file mode 100644 index 41d78683cc..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderNodeInfo.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -import net.sf.saxon.om.NodeInfo; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface AvailQuoteProviderNodeInfo { - NodeInfo provideAvailQuote(String dummyString); -} diff --git a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderService.java b/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderService.java deleted file mode 100644 index f744a59744..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderService.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -import org.example.avail.AvailQuote; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface AvailQuoteProviderService { - AvailQuote provideAvailQuote(String dummyString); -} diff --git a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/ExternalReferencesQuoteJoin.java b/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/ExternalReferencesQuoteJoin.java deleted file mode 100644 index 374c0825e9..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/ExternalReferencesQuoteJoin.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -import org.example.quote.Quote; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface ExternalReferencesQuoteJoin { - public Quote joinPriceAndAvailQuotes(float taxRate); -} diff --git a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProvider.java b/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProvider.java deleted file mode 100644 index fbe38b8269..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProvider.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -import org.example.price.PriceQuote; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface PriceQuoteProvider { - - public PriceQuote providePriceQuote(); -} diff --git a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProviderImpl.java b/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProviderImpl.java deleted file mode 100644 index d2d175430b..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProviderImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -import org.example.price.PriceQuote; - -public class PriceQuoteProviderImpl implements PriceQuoteProvider { - public PriceQuote providePriceQuote() { - return QuoteDataUtil.buildPriceQuoteData(); - } -} diff --git a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProviderNodeInfo.java b/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProviderNodeInfo.java deleted file mode 100644 index 06c3945a6e..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProviderNodeInfo.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -import net.sf.saxon.om.NodeInfo; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface PriceQuoteProviderNodeInfo { - public NodeInfo providePriceQuote(); -} diff --git a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/PropertiesQuoteJoin.java b/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/PropertiesQuoteJoin.java deleted file mode 100644 index 1ecdf120c2..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/PropertiesQuoteJoin.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -import javax.xml.ws.RequestWrapper; -import javax.xml.ws.ResponseWrapper; - -import org.example.quote.Quote; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface PropertiesQuoteJoin { - @RequestWrapper(className="xquery.quote.joinPriceAndAvailQuotes") - @ResponseWrapper(className="xquery.quote.joinPriceAndAvailQuotesResponse") - public Quote joinPriceAndAvailQuotes(); -} diff --git a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteCalculator.java b/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteCalculator.java deleted file mode 100644 index 85508eaa46..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteCalculator.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface QuoteCalculator { - public float calculateTotalPrice(float taxRate, int quantity, float price, boolean fillOrder); -} diff --git a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteCalculatorImpl.java b/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteCalculatorImpl.java deleted file mode 100644 index 26331381a8..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteCalculatorImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -public class QuoteCalculatorImpl implements QuoteCalculator { - - public float calculateTotalPrice(float taxRate, int quantity, float price, boolean fillOrder) { - float totalTax, costNoTax, totalCost; - if (fillOrder) { - // Calculate the total tax - totalTax = taxRate * quantity * price; - // Calculate the total cost without tax - costNoTax = quantity * price; - // Add the tax and the cost to get the total cost - totalCost = totalTax + costNoTax; - } else { - totalCost = 0; - } - return totalCost; - } - -} diff --git a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteDataUtil.java b/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteDataUtil.java deleted file mode 100644 index 8ed02dc1ef..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteDataUtil.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -import java.io.IOException; -import java.math.BigInteger; - - -import org.example.avail.AvailFactory; -import org.example.avail.AvailQuote; -import org.example.avail.AvailRequest; -import org.example.price.PriceFactory; -import org.example.price.PriceQuote; -import org.example.price.PriceRequest; -import org.example.price.PriceRequests; -import org.example.price.ShipAddress; - -import commonj.sdo.DataObject; -import commonj.sdo.helper.XMLHelper; - -public class QuoteDataUtil { - - public static AvailQuote buildAvailQuoteData() { - AvailQuote availQuote = AvailFactory.INSTANCE.createAvailQuote(); - AvailRequest availRequest = AvailFactory.INSTANCE.createAvailRequest(); - availRequest.setWidgetId(BigInteger.valueOf(12)); - availRequest.setRequestedQuantity(10); - availRequest.setQuantityAvail(true); - availRequest.setShipDate("2003-03-22"); - availQuote.getAvailRequest().add(availRequest); - - availRequest = AvailFactory.INSTANCE.createAvailRequest(); - availRequest.setWidgetId(BigInteger.valueOf(134)); - availRequest.setRequestedQuantity(345); - availRequest.setQuantityAvail(false); - availRequest.setShipDate("BackOrder"); - availQuote.getAvailRequest().add(availRequest); - - availRequest = AvailFactory.INSTANCE.createAvailRequest(); - availRequest.setWidgetId(BigInteger.valueOf(211)); - availRequest.setRequestedQuantity(100); - availRequest.setQuantityAvail(true); - availRequest.setShipDate("2003-04-21"); - availQuote.getAvailRequest().add(availRequest); - - return availQuote; - } - - public static PriceQuote buildPriceQuoteData() { - PriceQuote priceQuote = PriceFactory.INSTANCE.createPriceQuote(); - priceQuote.setCustomerName("Acme Inc"); - - ShipAddress shipAddress = PriceFactory.INSTANCE.createShipAddress(); - shipAddress.setStreet("12 Springs Rd"); - shipAddress.setCity("Morris Plains"); - shipAddress.setState("nj"); - shipAddress.setZip("07960"); - priceQuote.setShipAddress(shipAddress); - - PriceRequests priceRequests = PriceFactory.INSTANCE.createPriceRequests(); - PriceRequest priceRequest = PriceFactory.INSTANCE.createPriceRequest(); - priceRequest.setWidgetId(BigInteger.valueOf(12)); - priceRequest.setPrice(1.00f); - priceRequests.getPriceRequest().add(priceRequest); - - priceRequest = PriceFactory.INSTANCE.createPriceRequest(); - priceRequest.setWidgetId(BigInteger.valueOf(134)); - priceRequest.setPrice(34.10f); - priceRequests.getPriceRequest().add(priceRequest); - - priceRequest = PriceFactory.INSTANCE.createPriceRequest(); - priceRequest.setWidgetId(BigInteger.valueOf(211)); - priceRequest.setPrice(10.00f); - priceRequests.getPriceRequest().add(priceRequest); - - priceQuote.setPriceRequests(priceRequests); - - return priceQuote; - } - - public static void serializeToSystemOut(DataObject object, String name) { - XMLHelper helper = XMLHelper.INSTANCE; - - try { - helper.save(object, null, name, System.out); - System.out.println(); - } catch (IOException e) { - e.printStackTrace(); - } - } -} diff --git a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoin.java b/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoin.java deleted file mode 100644 index 425867055b..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoin.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -import javax.xml.ws.RequestWrapper; -import javax.xml.ws.ResponseWrapper; - -import org.example.avail.AvailQuote; -import org.example.price.PriceQuote; -import org.example.quote.Quote; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface QuoteJoin { - @RequestWrapper(className="xquery.quote.joinPriceAndAvailQuotes") - @ResponseWrapper(className="xquery.quote.joinPriceAndAvailQuotesResponse") - public Quote joinPriceAndAvailQuotes(PriceQuote priceQuote, AvailQuote availQuote, float taxRate); -} diff --git a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoinLocal.java b/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoinLocal.java deleted file mode 100644 index cfd201f883..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoinLocal.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -import org.example.avail.AvailQuote; -import org.example.price.PriceQuote; -import org.example.quote.Quote; - -public interface QuoteJoinLocal { - public Quote joinPriceAndAvailQuotes(PriceQuote priceQuote, AvailQuote availQuote, float taxRate); - - public Quote joinPriceAndAvailQuotesWs(PriceQuote priceQuote, AvailQuote availQuote, float taxRate); - - public Quote joinPriceAndAvailQuotes(); - - public Quote joinPriceAndAvailQuotes(float taxRate); - -} diff --git a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoinLocalImpl.java b/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoinLocalImpl.java deleted file mode 100644 index 20fe73fd92..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoinLocalImpl.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -import org.example.avail.AvailQuote; -import org.example.price.PriceQuote; -import org.example.quote.Quote; -import org.osoa.sca.annotations.Reference; - -public class QuoteJoinLocalImpl implements QuoteJoinLocal { - private QuoteJoin quoteJoin; - private QuoteJoin quoteJoinWs; - private PropertiesQuoteJoin propertiesQuoteJoin; - private ExternalReferencesQuoteJoin externalServicesQuoteJoin; - - @Reference - public void setQuoteJoin(QuoteJoin quoteJoin) { - this.quoteJoin = quoteJoin; - } - - @Reference - public void setQuoteJoinWs(QuoteJoin quoteJoinWs) { - this.quoteJoinWs = quoteJoinWs; - } - - @Reference - public void setPropertiesQuoteJoin(PropertiesQuoteJoin propertiesQuoteJoin) { - this.propertiesQuoteJoin = propertiesQuoteJoin; - } - - @Reference - public void setExternalServicesQuoteJoin(ExternalReferencesQuoteJoin externalServicesQuoteJoin) { - this.externalServicesQuoteJoin = externalServicesQuoteJoin; - } - - public Quote joinPriceAndAvailQuotes(PriceQuote priceQuote, AvailQuote availQuote, float taxRate) { - return quoteJoin.joinPriceAndAvailQuotes(priceQuote, availQuote, taxRate); - } - - public Quote joinPriceAndAvailQuotesWs(PriceQuote priceQuote, AvailQuote availQuote, float taxRate) { - return quoteJoinWs.joinPriceAndAvailQuotes(priceQuote, availQuote, taxRate); - } - - public Quote joinPriceAndAvailQuotes(float taxRate) { - return externalServicesQuoteJoin.joinPriceAndAvailQuotes(taxRate); - } - - public Quote joinPriceAndAvailQuotes() { - return propertiesQuoteJoin.joinPriceAndAvailQuotes(); - } -} diff --git a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/XQueryQuoteClient.java b/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/XQueryQuoteClient.java deleted file mode 100644 index adc852acd4..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/XQueryQuoteClient.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.example.avail.AvailQuote; -import org.example.price.PriceQuote; -import org.example.quote.Quote; - -import commonj.sdo.DataObject; - -/** - * Integration test for the XQuery implementation type - * @version $Rev: 577067 $ $Date: 2007-09-18 22:10:03 +0100 (Tue, 18 Sep 2007) $ - * This test covers the most important integration scenarios for the xquery - * implementation type and its corresponding saxon data bindings: - * - * 1. There is a central component for invoking the different - * scenarios: QuoteJoinLocalComponent - * 2. It provides the following tests: - * - invoke XQuery component in the current assembly, by providing all needed - * information as input parameters - * - invoke XQuery component in external assembly, which is exposed as a web - * service - * - invoke XQuery component in the current assembly, which retrieves the needed - * information from the component properties - * - invoke XQuery component in the current assembly, which retrieves the needed - * information from its references to other components: - * - one of the components is in the current assembly - * - the other component is in anther assembly and it is exposed (and accessed) - * as web service - * - * 3. All of the XQuery components have reference to a component for calculation of the - * total price - * 4. SDO is used for data interchange - */ -public class XQueryQuoteClient { - - public static boolean SHOW_DEBUG_MSG = false; - - private SCADomain scaDomain; - - private QuoteJoinLocal quoteJoinLocal; - - public void startClient() throws Exception { - try { - scaDomain = SCADomain.newInstance("xqueryquotewsclient.composite"); - quoteJoinLocal = scaDomain.getService(QuoteJoinLocal.class, "QuoteJoinLocalComponent"); - } catch (Throwable t) { - t.printStackTrace(); - } - } - - public void testQuoteJoin() { - AvailQuote availQuote = QuoteDataUtil.buildAvailQuoteData(); - PriceQuote priceQuote = QuoteDataUtil.buildPriceQuoteData(); - - if (SHOW_DEBUG_MSG) { - System.out.println("Input quote for the price list:"); - QuoteDataUtil.serializeToSystemOut((DataObject)priceQuote, "priceQuote"); - System.out.println(); - System.out.println("Input quote for the availability:"); - QuoteDataUtil.serializeToSystemOut((DataObject)availQuote, "availQuote"); - System.out.println(); - } - - Quote quote = quoteJoinLocal.joinPriceAndAvailQuotes(priceQuote, availQuote, 0.1f); - if (SHOW_DEBUG_MSG) { - System.out.println(); - System.out.println("Output quote from local join:"); - QuoteDataUtil.serializeToSystemOut((DataObject)quote, "quote"); - System.out.println(); - } - // TestHelper.assertQuote(availQuote, priceQuote, quote, 0.1f); - - quote = quoteJoinLocal.joinPriceAndAvailQuotes(priceQuote, availQuote, 0.2f); - if (SHOW_DEBUG_MSG) { - System.out.println(); - System.out.println("Output quote from local join (second invokation):"); - QuoteDataUtil.serializeToSystemOut((DataObject)quote, "quote"); - System.out.println(); - } - // TestHelper.assertQuote(availQuote, priceQuote, quote, 0.2f); - - quote = quoteJoinLocal.joinPriceAndAvailQuotesWs(priceQuote, availQuote, 0.1f); - if (SHOW_DEBUG_MSG) { - System.out.println(); - System.out.println("Output quote from web service join:"); - QuoteDataUtil.serializeToSystemOut((DataObject)quote, "quote"); - System.out.println(); - } - // TestHelper.assertQuote(availQuote, priceQuote, quote, 0.1f); - - quote = quoteJoinLocal.joinPriceAndAvailQuotes(); - if (SHOW_DEBUG_MSG) { - System.out.println(); - System.out.println("Output quote from properties join:"); - QuoteDataUtil.serializeToSystemOut((DataObject)quote, "quote"); - System.out.println(); - } - // TestHelper.assertQuote(availQuote, priceQuote, quote, 0.1f); - - quote = quoteJoinLocal.joinPriceAndAvailQuotes(0.1f); - if (SHOW_DEBUG_MSG) { - System.out.println(); - System.out.println("Output quote from external references join:"); - QuoteDataUtil.serializeToSystemOut((DataObject)quote, "quote"); - System.out.println(); - } - // TestHelper.assertQuote(availQuote, priceQuote, quote, 0.1f); - } - - public void stopClient() throws Exception { - if (scaDomain != null) { - scaDomain.close(); - } - } - - public static void main(String[] args) throws Exception { - SHOW_DEBUG_MSG = true; - XQueryQuoteClient client = new XQueryQuoteClient(); - client.startClient(); - try { - client.testQuoteJoin(); - } finally { - client.stopClient(); - } - } -} diff --git a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/XQueryQuoteServer.java b/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/XQueryQuoteServer.java deleted file mode 100644 index 3fa3cdb637..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/java/xquery/quote/XQueryQuoteServer.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -import java.io.IOException; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class XQueryQuoteServer { - - public static void main(String[] args) { - SCADomain scaDomain = SCADomain.newInstance("xqueryquotews.composite"); - try { - System.out.println("XQuery Quote server is started (press enter to shutdown)."); - System.in.read(); - System.out.println("XQuery Quote server is stopping..."); - } catch (IOException e) { - e.printStackTrace(); - } - scaDomain.close(); - System.out.println("XQuery Quote server is now stopped."); - } -} diff --git a/branches/sca-android/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join.xq b/branches/sca-android/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join.xq deleted file mode 100644 index d504f40f04..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join.xq +++ /dev/null @@ -1,61 +0,0 @@ -(: - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. -:) - -declare namespace quoteJoin="scaservice:java/xquery.quote.QuoteJoin"; - -declare namespace quoteCalculator="scareference:java/xquery.quote.QuoteCalculator"; - -declare namespace quo="http://www.example.org/quote"; - -declare variable $quoteCalculator external; - -declare function quoteJoin:joinPriceAndAvailQuotes($priceQuoteDoc, $availQuoteDoc, $taxRate) { - - { data($priceQuoteDoc/*/customerName) } - { concat($priceQuoteDoc/*/shipAddress/@street , ",", $priceQuoteDoc/*/shipAddress/@city ,",", fn:upper-case($priceQuoteDoc/*/shipAddress/@state) , ",", $priceQuoteDoc/*/shipAddress/@zip) } - { - for $priceRequest in $priceQuoteDoc/*/priceRequests/priceRequest, - $availRequest in $availQuoteDoc/*/availRequest - where data($priceRequest/widgetId) = data($availRequest/widgetId) - return - - { data($priceRequest/widgetId) } - { data($priceRequest/price) } - { data($availRequest/requestedQuantity) } - { data($availRequest/quantityAvail) } - { - for $shipDate in $availRequest/shipDate - return - { data($shipDate) } - } - { $taxRate } - { quoteCalculator:calculateTotalPrice( - $quoteCalculator, - - xs:float($taxRate), - - $availRequest/requestedQuantity, - - $priceRequest/price, - - $availRequest/quantityAvail) } - - } - -}; diff --git a/branches/sca-android/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_external_references.xq b/branches/sca-android/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_external_references.xq deleted file mode 100644 index cc50da164a..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_external_references.xq +++ /dev/null @@ -1,69 +0,0 @@ -(: - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. -:) -declare namespace quoteJoin="scaservice:java/xquery.quote.ExternalReferencesQuoteJoin"; - -declare namespace quoteCalculator="scareference:java/xquery.quote.QuoteCalculator"; - -declare namespace priceQuoteProvider="scareference:java/xquery.quote.PriceQuoteProviderNodeInfo"; -declare namespace availQuoteProvider="scareference:java/xquery.quote.AvailQuoteProviderNodeInfo"; - -declare namespace quo="http://www.example.org/quote"; - -declare variable $quoteCalculator external; - -declare variable $priceQuoteProvider external; -declare variable $availQuoteProvider external; - -declare function quoteJoin:joinPriceAndAvailQuotes($taxRate) { -let $priceQuoteDoc := priceQuoteProvider:providePriceQuote($priceQuoteProvider) -let $availQuoteDoc := availQuoteProvider:provideAvailQuote($availQuoteProvider, 'dummy') -return - - { data($priceQuoteDoc/priceQuote/customerName) } - { concat($priceQuoteDoc/priceQuote/shipAddress/@street , ",", $priceQuoteDoc/priceQuote/shipAddress/@city ,",", fn:upper-case($priceQuoteDoc/priceQuote/shipAddress/@state) , ",", $priceQuoteDoc/priceQuote/shipAddress/@zip) } - { - for $priceRequest in $priceQuoteDoc/priceQuote/priceRequests/priceRequest, - $availRequest in $availQuoteDoc/availQuote/availRequest - where data($priceRequest/widgetId) = data($availRequest/widgetId) - return - - { data($priceRequest/widgetId) } - { data($priceRequest/price) } - { data($availRequest/requestedQuantity) } - { data($availRequest/quantityAvail) } - { - for $shipDate in $availRequest/shipDate - return - { data($shipDate) } - } - { $taxRate } - { quoteCalculator:calculateTotalPrice( - $quoteCalculator, - - $taxRate, - - $availRequest/requestedQuantity, - - $priceRequest/price, - - $availRequest/quantityAvail) } - - } - -}; diff --git a/branches/sca-android/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_properties.xq b/branches/sca-android/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_properties.xq deleted file mode 100644 index cf41ab528d..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_properties.xq +++ /dev/null @@ -1,74 +0,0 @@ -(: - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. -:) - -declare namespace quoteJoin="scaservice:java/xquery.quote.PropertiesQuoteJoin"; - -declare namespace quoteCalculator="scareference:java/xquery.quote.QuoteCalculator"; - -declare namespace priceQuoteDoc="scaproperty:xml/http://www.example.org/price:priceQuote"; -declare namespace availQuoteDoc="scaproperty:xml/http://www.example.org/avail:availQuote"; -declare namespace taxRate="scaproperty:java/java.lang.Float"; - -declare namespace pri="http://www.example.org/price"; -declare namespace ava="http://www.example.org/avail"; -declare namespace quo="http://www.example.org/quote"; - -declare variable $quoteCalculator external; - -declare variable $priceQuoteDoc external; -declare variable $availQuoteDoc external; -declare variable $taxRate external; - -declare function quoteJoin:joinPriceAndAvailQuotes() { - - { data($priceQuoteDoc/pri:priceQuote/customerName) } - { concat($priceQuoteDoc/pri:priceQuote/shipAddress/@street , ",", - $priceQuoteDoc/pri:priceQuote/shipAddress/@city ,",", - fn:upper-case($priceQuoteDoc/pri:priceQuote/shipAddress/@state) , ",", - $priceQuoteDoc/pri:priceQuote/shipAddress/@zip) } - { - for $priceRequest in $priceQuoteDoc/pri:priceQuote/priceRequests/priceRequest, - $availRequest in $availQuoteDoc/ava:availQuote/availRequest - where data($priceRequest/widgetId) = data($availRequest/widgetId) - return - - { data($priceRequest/widgetId) } - { data($priceRequest/price) } - { data($availRequest/requestedQuantity) } - { data($availRequest/quantityAvail) } - { - for $shipDate in $availRequest/shipDate - return - { data($shipDate) } - } - { $taxRate } - { quoteCalculator:calculateTotalPrice( - $quoteCalculator, - - $taxRate, - - $availRequest/requestedQuantity, - - $priceRequest/price, - - $availRequest/quantityAvail) } - - } - -}; diff --git a/branches/sca-android/samples/quote-xquery/src/main/resources/wsdl/AvailQuote.xsd b/branches/sca-android/samples/quote-xquery/src/main/resources/wsdl/AvailQuote.xsd deleted file mode 100644 index e7f3e67068..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/resources/wsdl/AvailQuote.xsd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/quote-xquery/src/main/resources/wsdl/PriceQuote.xsd b/branches/sca-android/samples/quote-xquery/src/main/resources/wsdl/PriceQuote.xsd deleted file mode 100644 index 4c437586ef..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/resources/wsdl/PriceQuote.xsd +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/quote-xquery/src/main/resources/wsdl/Quote.xsd b/branches/sca-android/samples/quote-xquery/src/main/resources/wsdl/Quote.xsd deleted file mode 100644 index 4f64850056..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/resources/wsdl/Quote.xsd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/quote-xquery/src/main/resources/wsdl/quotejoin.wsdl b/branches/sca-android/samples/quote-xquery/src/main/resources/wsdl/quotejoin.wsdl deleted file mode 100644 index 96c2af138a..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/resources/wsdl/quotejoin.wsdl +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/quote-xquery/src/main/resources/xqueryquotews.composite b/branches/sca-android/samples/quote-xquery/src/main/resources/xqueryquotews.composite deleted file mode 100644 index 9e35e2ecb2..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/resources/xqueryquotews.composite +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/quote-xquery/src/main/resources/xqueryquotewsclient.composite b/branches/sca-android/samples/quote-xquery/src/main/resources/xqueryquotewsclient.composite deleted file mode 100644 index 35306b9f89..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/main/resources/xqueryquotewsclient.composite +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - Acme Inc - - - - 12 - 1.0 - - - 134 - 34.1 - - - 211 - 10.0 - - - - - - - - - - 12 - 10 - true - 2003-03-22 - - - 134 - 345 - false - BackOrder - - - 211 - 100 - true - 2003-04-21 - - - - 0.1 - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/quote-xquery/src/test/java/xquery/quote/XQueryQuoteClientTestCase.java b/branches/sca-android/samples/quote-xquery/src/test/java/xquery/quote/XQueryQuoteClientTestCase.java deleted file mode 100644 index 9555532b3e..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/test/java/xquery/quote/XQueryQuoteClientTestCase.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -import java.util.List; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.apache.tuscany.sca.host.embedded.SCATestCaseRunner; -import org.example.avail.AvailQuote; -import org.example.avail.AvailRequest; -import org.example.price.PriceQuote; -import org.example.price.PriceRequest; -import org.example.price.ShipAddress; -import org.example.quote.Quote; -import org.example.quote.QuoteResponse; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import commonj.sdo.DataObject; - -/** - * Integration test for the XQuery implementation type - * @version $Rev$ $Date$ - * This test covers the most important integration scenarios for the xquery - * implementation type and its corresponding saxon data bindings: - * - * 1. There is a central component for invoking the different - * scenarios: QuoteJoinLocalComponent - * 2. It provides the following tests: - * - invoke XQuery component in the current assembly, by providing all needed - * information as input parameters - * - invoke XQuery component in external assembly, which is exposed as a web - * service - * - invoke XQuery component in the current assembly, which retrieves the needed - * information from the component properties - * - invoke XQuery component in the current assembly, which retrieves the needed - * information from its references to other components: - * - one of the components is in the current assembly - * - the other component is in anther assembly and it is exposed (and accessed) - * as web service - * - * 3. All of the XQuery components have reference to a component for calculation of the - * total price - * 4. SDO is used for data interchange - */ -public class XQueryQuoteClientTestCase { - - public static boolean SHOW_DEBUG_MSG = false; - - private SCADomain scaDomain; - private SCATestCaseRunner server; - - private QuoteJoinLocal quoteJoinLocal; - - @Before - public void startClient() throws Exception { - try { - scaDomain = SCADomain.newInstance("xqueryquotewsclient.composite"); - - quoteJoinLocal = scaDomain.getService(QuoteJoinLocal.class, "QuoteJoinLocalComponent"); - - server = new SCATestCaseRunner(XQueryQuoteTestServer.class); - server.before(); - } catch (Throwable t) { - t.printStackTrace(); - } - } - - @Test - public void testQuoteJoin() { - AvailQuote availQuote = QuoteDataUtil.buildAvailQuoteData(); - PriceQuote priceQuote = QuoteDataUtil.buildPriceQuoteData(); - - if (SHOW_DEBUG_MSG) { - System.out.println("Input quote for the price list:"); - QuoteDataUtil.serializeToSystemOut((DataObject)priceQuote, "priceQuote"); - System.out.println(); - System.out.println("Input quote for the availability:"); - QuoteDataUtil.serializeToSystemOut((DataObject)availQuote, "availQuote"); - System.out.println(); - } - - Quote quote = quoteJoinLocal.joinPriceAndAvailQuotes(priceQuote, availQuote, 0.1f); - if (SHOW_DEBUG_MSG) { - System.out.println(); - System.out.println("Output quote from local join:"); - QuoteDataUtil.serializeToSystemOut((DataObject)quote, "quote"); - System.out.println(); - } - XQueryQuoteClientTestCase.assertQuote(availQuote, priceQuote, quote, 0.1f); - - quote = quoteJoinLocal.joinPriceAndAvailQuotes(priceQuote, availQuote, 0.2f); - if (SHOW_DEBUG_MSG) { - System.out.println(); - System.out.println("Output quote from local join (second invokation):"); - QuoteDataUtil.serializeToSystemOut((DataObject)quote, "quote"); - System.out.println(); - } - XQueryQuoteClientTestCase.assertQuote(availQuote, priceQuote, quote, 0.2f); - - quote = quoteJoinLocal.joinPriceAndAvailQuotesWs(priceQuote, availQuote, 0.1f); - if (SHOW_DEBUG_MSG) { - System.out.println(); - System.out.println("Output quote from web service join:"); - QuoteDataUtil.serializeToSystemOut((DataObject)quote, "quote"); - System.out.println(); - } - XQueryQuoteClientTestCase.assertQuote(availQuote, priceQuote, quote, 0.1f); - - quote = quoteJoinLocal.joinPriceAndAvailQuotes(); - if (SHOW_DEBUG_MSG) { - System.out.println(); - System.out.println("Output quote from properties join:"); - QuoteDataUtil.serializeToSystemOut((DataObject)quote, "quote"); - System.out.println(); - } - XQueryQuoteClientTestCase.assertQuote(availQuote, priceQuote, quote, 0.1f); - - quote = quoteJoinLocal.joinPriceAndAvailQuotes(0.1f); - if (SHOW_DEBUG_MSG) { - System.out.println(); - System.out.println("Output quote from external references join:"); - QuoteDataUtil.serializeToSystemOut((DataObject)quote, "quote"); - System.out.println(); - } - XQueryQuoteClientTestCase.assertQuote(availQuote, priceQuote, quote, 0.1f); - } - - @After - public void stopClient() throws Exception { - server.after(); - scaDomain.close(); - } - - public static void assertQuote(AvailQuote availQuote, PriceQuote priceQuote, Quote quote, float taxRate) { - QuoteCalculatorImpl quoteCalculatorImpl = new QuoteCalculatorImpl(); - - TestCase.assertEquals(priceQuote.getCustomerName(), quote.getName()); - ShipAddress shipAddress = priceQuote.getShipAddress(); - TestCase.assertEquals(shipAddress.getStreet() + "," - + shipAddress.getCity() - + "," - + shipAddress.getState().toUpperCase() - + "," - + shipAddress.getZip(), quote.getAddress()); - List availRequests = availQuote.getAvailRequest(); - List priceRequests = priceQuote.getPriceRequests().getPriceRequest(); - List quoteResponses = quote.getQuoteResponse(); - TestCase.assertEquals(availRequests.size(), priceRequests.size()); - TestCase.assertEquals(availRequests.size(), quoteResponses.size()); - - for (int i = 0; i < availRequests.size(); i++) { - AvailRequest availRequest = (AvailRequest)availRequests.get(i); - PriceRequest priceRequest = (PriceRequest)priceRequests.get(i); - QuoteResponse quoteResponse = (QuoteResponse)quoteResponses.get(i); - TestCase.assertEquals(availRequest.getWidgetId(), quoteResponse.getWidgetId()); - TestCase.assertEquals(priceRequest.getPrice(), quoteResponse.getUnitPrice()); - TestCase.assertEquals(availRequest.getRequestedQuantity(), quoteResponse.getRequestedQuantity()); - TestCase.assertEquals(availRequest.isQuantityAvail(), quoteResponse.isFillOrder()); - if (availRequest.getShipDate() == null) { - TestCase.assertNull(quoteResponse.getShipDate()); - } else { - TestCase.assertEquals(availRequest.getShipDate(), quoteResponse.getShipDate()); - } - TestCase.assertEquals(taxRate, quoteResponse.getTaxRate()); - TestCase.assertEquals(quoteCalculatorImpl.calculateTotalPrice(taxRate, - availRequest.getRequestedQuantity(), - priceRequest.getPrice(), - availRequest.isQuantityAvail()), - quoteResponse.getTotalCost()); - } - } -} diff --git a/branches/sca-android/samples/quote-xquery/src/test/java/xquery/quote/XQueryQuoteTestServer.java b/branches/sca-android/samples/quote-xquery/src/test/java/xquery/quote/XQueryQuoteTestServer.java deleted file mode 100644 index 9a4be5bda6..0000000000 --- a/branches/sca-android/samples/quote-xquery/src/test/java/xquery/quote/XQueryQuoteTestServer.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package xquery.quote; - -import java.io.IOException; -import java.net.Socket; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class XQueryQuoteTestServer { - private SCADomain scaDomain; - - @Before - public void startServer() throws Exception { - try { - scaDomain = SCADomain.newInstance("xqueryquotews.composite"); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Test - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - @After - public void stopServer() throws Exception { - scaDomain.close(); - } -} diff --git a/branches/sca-android/samples/simple-bigbank-spring/README b/branches/sca-android/samples/simple-bigbank-spring/README deleted file mode 100644 index bb44d63719..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/README +++ /dev/null @@ -1,148 +0,0 @@ -Spring Bigbank Sample -====================== -This sample is made of 3 modules that represent the different aspects of a fictitious banking application. - -To run the simple-bigbank-spring sample you need to first run spring-bigbank-calculator, spring-bigbank-checkaccount and spring-bigbank-stockquote composites. -This will bring up Tuscany runtime and load the three applications and make them available as services. -Bigbank-Spring is dependent on these services. - -This demo uses ant. This is just one way of running this demo. - -Start Spring-Bigbank-calculator Composite ------------------------------------------ - -Spring-Bigbank-calculator is a calculator application which handles add, subtract, multiply and divide operations. Each of these operations is implemented in a different language, including JavaScript, groovy, Ruby and Python. - -To run the spring-bigbank-calculator composite and make it available as a service for this demo do the following: - -cd spring-bigbank-calculator -ant compile -ant run - -.. Leave the server running - -Note that 'ant compile' needs to be done the first time you run this demo out of the binary distribution. No need to do 'ant compile' from there on. - -Start Spring-Bigbank-checkaccount Composite -------------------------------------------- - -This contains all artifacts that deal with the account management within the bigbank. The services offered by the bigbank-account module are used by the bigbank. - -cd spring-bigbank-checkaccount -ant compile -ant run - -.. Leave the server running - -Note that 'ant compile' needs to be done the first time you run this demo out of the binary distribution. No need to do 'ant compile' from there on. - -Start Spring-Bigbank-stockquote Composite ------------------------------------------ - -A very simple web services based stock quote application which returns random -stock quotes on request. Please note that the stockquote service is not live and is implemented instead to allow for this application to always run without dependency on the availability of a webservice. - -cd spring-bigbank-stockquote -ant compile -ant run - -.. Leave the server running - -Start Spring Bigbank --------------------- -This contains all artifacts that make up the bigbank application. This is the application that the end user interacts with - -Start spring-bigbank in the following way: - -i ) Compile the spring-bigbank as follows : - - cd simple-bigbank-spring - ant compile - -ii) Now start the bigbank service as follows : - - cd bigbank - ant compile - ant run - - .. Leave the server running - -Note that 'ant compile' needs to be done the first time you run this demo out ofthe binary distribution. -No need to do 'ant compile' from there on. - -Sample Overview ---------------- -This sample demonstrates a simple bank summary transaction using Spring for one of the components. - -A request to the AccountComponent results in a request to the AccountDataComponent to get account data -which is based on a random stock quote price. Therefore result for this sample will vary on each run. - - -simple-bigbank-spring/ - src/ - main/ - java/ - bigbank/ - account/ - AccountComponent implementation using Spring - accountdata/ - AccountDataComponent implementation using Spring - sockquote/ - stockquote implementation using Java - client/ - starts the SCA Runtime and - deploys the BigBank.composite. - It then calls the deployed AccountService - resources/ - Account.composite - SCA assembly for this sample - BigBank.composite - SCA assembly for this sample - StockQuote.composite - SCA assembly for this sample - test/ - java/ - bigbank/ - BigBankTestCase.java - JUnit test case - simple-bigbank-spring.png - a pictorial representation of the sample - .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd simple-bigbank-spring -ant compile -ant run - -You should see the following output. -** Please note that balance amount will vary depending on the random stock value. - -run: - [java] Spring parent context - getBean called for name: stockQuoteService - [java] Getting stock quote for: IBM, value: 104.97 - [java] Account summary: currency: USD, [ID:Foo_CHA12345, balance:1500.0, ID -:Foo_SAA12345, balance:1500.0, ID:Foo_STA12345, symbol:IBM, quantity:100, balance:10497.0] - - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd simple-bigbank-spring -mvn - -You should see the following output from the test phase. -** Please note that balance amount will vary depending on the random stock value. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running bigbank.BigBankTestCase -Getting stock quote for: IBM, value: 104.02 -Account summary: currency: USD, [ID:Foo_CHA12345, balance:1500.0, ID:Foo_SAA1234 -5, balance:1500.0, ID:Foo_STA12345, symbol:IBM, quantity:100, balance:10402.0] -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.502 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/simple-bigbank-spring/build-dojo.xml b/branches/sca-android/samples/simple-bigbank-spring/build-dojo.xml deleted file mode 100644 index 9d282c2dd2..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/build-dojo.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/simple-bigbank-spring/build.xml b/branches/sca-android/samples/simple-bigbank-spring/build.xml deleted file mode 100644 index ecc2596d71..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/simple-bigbank-spring/pom.xml b/branches/sca-android/samples/simple-bigbank-spring/pom.xml deleted file mode 100644 index 9e5dc673b9..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/pom.xml +++ /dev/null @@ -1,252 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-simple-bigbank-spring - Apache Tuscany SCA Spring-Based Simplified BigBank Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-node-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-core-spi - 1.4-SNAPSHOT - - - - org.apache.ws.security - wss4j - 1.5.3 - - - - commons-httpclient - commons-httpclient - 3.0.1 - - - - commons-logging - commons-logging - 1.1 - - - javax.servlet - servlet-api - - - - - - org.apache.tuscany.sca - tuscany-data-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-spring - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-rmi - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-rss-rome - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-resource-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - org.apache.maven.plugins - maven-antrun-plugin - - - - ant - ant-trax - 1.6.5 - - - - - - install-dojo - validate - - run - - - - - - - - - - - copy-dojo-files - generate-resources - - run - - - - - - - - - - - - clean-dojo-files - clean - - run - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/simple-bigbank-spring/simple-bigbank-spring.png b/branches/sca-android/samples/simple-bigbank-spring/simple-bigbank-spring.png deleted file mode 100644 index 593c047f6a..0000000000 Binary files a/branches/sca-android/samples/simple-bigbank-spring/simple-bigbank-spring.png and /dev/null differ diff --git a/branches/sca-android/samples/simple-bigbank-spring/simple-bigbank-spring.svg b/branches/sca-android/samples/simple-bigbank-spring/simple-bigbank-spring.svg deleted file mode 100644 index c64f6de6b9..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/simple-bigbank-spring.svg +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - BigBank - - AccountServiceComponent - - - - - AccountDataServiceComponent - - - currency AccountService - diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountReport.java b/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountReport.java deleted file mode 100644 index 1625ff5b65..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountReport.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account; - -import java.util.List; - -/** - */ -public class AccountReport { - private List summaries; - private String currency; - - public AccountReport(String currency, List summaries) { - this.currency = currency; - this.summaries = summaries; - } - - public List getAccountSummaries() { return summaries; } - - public String getCurrency() { return currency; } - - @Override - public String toString() { - return "currency: "+ currency + ", " + summaries; - } - -} diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountService.java b/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountService.java deleted file mode 100644 index 7c9082b944..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountService.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account; - -/** - * Interface for a account service - */ -public interface AccountService { - public AccountReport getAccountReport(String customerID); -} diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountServiceImpl.java b/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountServiceImpl.java deleted file mode 100644 index ce41006fa6..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountServiceImpl.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account; - -import java.util.ArrayList; -import java.util.List; - -import org.osoa.sca.annotations.Service; - -import bigbank.account.checking.CheckingAccountDetails; -import bigbank.account.checking.CheckingAccountService; -import bigbank.account.savings.SavingsAccountDetails; -import bigbank.account.savings.SavingsAccountService; -import bigbank.account.stock.StockAccountDetails; -import bigbank.account.stock.StockAccountService; -import bigbank.stockquote.StockQuoteService; -import bigbank.calculator.CalculatorService; - -/** - * Account service implementation - */ -@Service(AccountService.class) -public class AccountServiceImpl implements AccountService { - - private SavingsAccountService savingsAccountService; - - private CheckingAccountService checkingAccountService; - - private StockAccountService stockAccountService; - - private CalculatorService calculatorService; - - private StockQuoteService stockQuoteService; - - private String currency; - - public AccountReport getAccountReport(String customerID) { - - // Get the checking, savings and stock accounts from the AccountData - // service component - CheckingAccountDetails checking = null; - List summaries = new ArrayList(); - try { - checking = checkingAccountService.getAccountDetails(customerID); - System.out.println("Checking account: " + checking); - summaries.add(checking.toString()); - - SavingsAccountDetails savings = savingsAccountService.getAccountDetails(customerID); - System.out.println("Savings account: " + savings); - summaries.add(savings.toString()); - - StockAccountDetails stock = stockAccountService.getAccountDetails(customerID); - System.out.println("Stock account: " + stock); - summaries.add(stock.toString()); - - // Get the stock price in USD - double price = stockQuoteService.getQuote(stock.getSymbol()); - System.out.println("Stock price for " + stock.getSymbol() + ": " + price); - - // Convert to the configured currency - if (currency.equals("EURO")) { - - // Use our fancy calculator service to convert to the target currency - price = calculatorService.multiply(price, 0.70); - - System.out.println("Converted to " + currency + ": " + price); - } - - // Calculate the value of the stock account - double stockValue = price * stock.getQuantity(); - summaries.add(stock.toString()); - - AccountReport report = new AccountReport(currency, summaries); - - return report; - } catch ( Throwable e ) { - e.printStackTrace(); - return null; - } - } - - public SavingsAccountService getSavingsAccountService() { - return savingsAccountService; - } - - public void setSavingsAccountService(SavingsAccountService savingsAccountService) { - this.savingsAccountService = savingsAccountService; - } - - public CheckingAccountService getCheckingAccountService() { - return checkingAccountService; - } - - public void setCheckingAccountService(CheckingAccountService checkingAccountService) { - this.checkingAccountService = checkingAccountService; - } - - public StockAccountService getStockAccountService() { - return stockAccountService; - } - - public void setStockAccountService(StockAccountService stockAccountService) { - this.stockAccountService = stockAccountService; - } - - public String getCurrency() { - return currency; - } - - public void setCurrency(String currency) { - this.currency = currency; - } - - public CalculatorService getCalculatorService() { - return calculatorService; - } - - public void setCalculatorService(CalculatorService calculatorService) { - this.calculatorService = calculatorService; - } - - public StockQuoteService getStockQuoteService() { - return stockQuoteService; - } - - public void setStockQuoteService(StockQuoteService stockQuoteService) { - this.stockQuoteService = stockQuoteService; - } -} diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountDetails.java b/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountDetails.java deleted file mode 100644 index 3f81f48fb9..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountDetails.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.checking; - -public class CheckingAccountDetails { - private String accountNumber; - private double balance; - - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String n) { - this.accountNumber = n; - } - - public double getBalance() { - return balance; - } - - public void setBalance(double b) { - this.balance = b; - } - - @Override - public String toString() { - return accountNumber + ", balance:" + balance; - } -} diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountService.java b/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountService.java deleted file mode 100644 index 2b52909bc1..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/checking/CheckingAccountService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.checking; - -import org.osoa.sca.annotations.Remotable; -import org.osoa.sca.annotations.Service; - -@Service -@Remotable -public interface CheckingAccountService { - - public CheckingAccountDetails getAccountDetails(String customerID); - - public double deposit(String accountNo, double depositAmt); - - public double withdraw(String accountNo, double withdrawalAmount); - -} diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/feed/AccountFeedImpl.java b/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/feed/AccountFeedImpl.java deleted file mode 100644 index 386f7bb90d..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/feed/AccountFeedImpl.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.feed; - -import org.apache.tuscany.sca.data.collection.Collection; -import org.apache.tuscany.sca.data.collection.Entry; -import org.apache.tuscany.sca.data.collection.NotFoundException; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import bigbank.account.AccountService; -import bigbank.account.AccountReport; - -/** - * @version $$Rev$$ $$Date$$ - */ - -@Service(Collection.class) -public class AccountFeedImpl implements Collection { - - @Reference - protected AccountService accountService; - - public Entry[] getAll() { - - // Add the Account report entry - String report = get("1234"); - Entry entry = new Entry("1234", report); - - return new Entry[] { entry } ; - } - - public String get(String id) { - - // Get the account report for the specified customer ID - AccountReport accreport = accountService.getAccountReport(id); - String report = accreport.getCurrency(); - - return report; - } - - public void delete(String key) throws NotFoundException { - } - - public String post(String key, String item) { - return null; - } - - public void put(String key, String item) throws NotFoundException { - } - - public Entry[] query(String queryString) { - return null; - } -} diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountDetails.java b/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountDetails.java deleted file mode 100644 index bcac678cd7..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountDetails.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.savings; - -import java.io.Serializable; - -public class SavingsAccountDetails implements Serializable { - private String accountNumber; - private double balance; - - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String n) { - this.accountNumber = n; - } - - public double getBalance() { - return balance; - } - - public void setBalance(double b) { - this.balance = b; - } - - @Override - public String toString() { - return accountNumber + ", balance:" + balance; - } -} diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountService.java b/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountService.java deleted file mode 100644 index 8a012c12f9..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountService.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.savings; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface SavingsAccountService { - - public SavingsAccountDetails getAccountDetails(String customerID); - - public double deposit(String accountNo, double depositAmt); - - public double withdraw(String accountNo, double withdrawalAmount); - -} diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountServiceImpl.java b/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountServiceImpl.java deleted file mode 100644 index 980ec1c335..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/savings/SavingsAccountServiceImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.savings; - -import java.util.HashMap; -import java.util.Map; - -import org.osoa.sca.annotations.Service; - -@Service(SavingsAccountService.class) -public class SavingsAccountServiceImpl implements SavingsAccountService { - private Map custAcctMap = new HashMap(); - private Map savingsAccts = new HashMap(); - - public SavingsAccountServiceImpl() { - custAcctMap.put("Customer_01", "SVA_Customer_01"); - custAcctMap.put("Customer_02", "SVA_Customer_02"); - custAcctMap.put("Customer_03", "SVA_Customer_03"); - - savingsAccts.put("SVA_Customer_01", new Double(1000)); - savingsAccts.put("SVA_Customer_02", new Double(1500)); - savingsAccts.put("SVA_Customer_03", new Double(2000)); - } - - public double deposit(String accountNo, double depositAmt) { - savingsAccts.put(accountNo, new Double(savingsAccts.get(accountNo).doubleValue() + depositAmt)); - return savingsAccts.get(accountNo).doubleValue(); - } - - public SavingsAccountDetails getAccountDetails(String customerID) { - SavingsAccountDetails savingsAccount = new SavingsAccountDetails(); - savingsAccount.setAccountNumber(custAcctMap.get(customerID)); - savingsAccount.setBalance(savingsAccts.get(savingsAccount.getAccountNumber()).doubleValue()); - - return savingsAccount; - } - - public double withdraw(String accountNo, double withdrawalAmount) { - double balance = savingsAccts.get(accountNo).doubleValue(); - if ( balance - withdrawalAmount > 0 ) { - balance = balance - withdrawalAmount; - savingsAccts.put(accountNo, balance); - } - return balance; - } -} diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountDetails.java b/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountDetails.java deleted file mode 100644 index 9f06a71bae..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountDetails.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.stock; - -public class StockAccountDetails { - private String accountNumber; - private String symbol; - private int quantity; - - public StockAccountDetails() { - } - - public StockAccountDetails(String acNo, String symbol, int qty) { - this.accountNumber = acNo; - this.symbol = symbol; - this.quantity = qty; - } - - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String n) { - this.accountNumber = n; - } - - public int getQuantity() { - return quantity; - } - - public void setQuantity(int a) { - this.quantity = a; - } - - public String getSymbol() { - return symbol; - } - - public void setSymbol(String s) { - this.symbol = s; - } - - @Override - public String toString() { - return accountNumber + ", symbol:" + symbol + ", quantity:" + quantity; - } -} diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountService.java b/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountService.java deleted file mode 100644 index 1ee386ba90..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountService.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.stock; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface StockAccountService { - - public StockAccountDetails getAccountDetails(String customerID); - - public StockAccountDetails buy(String accountNo, String symbol, int quantity); - - public StockAccountDetails sell(String accountNo, String symbol, int quantity); - - -} diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountServiceImpl.java b/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountServiceImpl.java deleted file mode 100644 index 61aea6869e..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/account/stock/StockAccountServiceImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.stock; - -import java.util.HashMap; -import java.util.Map; - -import org.osoa.sca.annotations.Service; - -@Service(StockAccountService.class) -public class StockAccountServiceImpl implements StockAccountService { - private Map custAcctMap = new HashMap(); - private Map stockAccts = new HashMap(); - - public StockAccountServiceImpl() { - custAcctMap.put("Customer_01", "STA_Customer_01"); - custAcctMap.put("Customer_02", "STA_Customer_02"); - custAcctMap.put("Customer_03", "STA_Customer_03"); - - stockAccts.put("STA_Customer_01", new StockAccountDetails("STA_Customer_01", "IBM", 100)); - stockAccts.put("STA_Customer_02", new StockAccountDetails("STA_Customer_02", "IBM", 200)); - stockAccts.put("STA_Customer_03", new StockAccountDetails("STA_Customer_03", "SYM_3", 125)); - } - - - public StockAccountDetails buy(String accountNo, String symbol, int quantity) { - return null; - } - - public StockAccountDetails getAccountDetails(String customerID) { - return stockAccts.get(custAcctMap.get(customerID)); - } - - public StockAccountDetails sell(String accountNo, String symbol, int quantity) { - return null; - } - - - -} diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/calculator/CalculatorService.java b/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/calculator/CalculatorService.java deleted file mode 100644 index 66a0ba0e63..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/calculator/CalculatorService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.calculator; - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/client/BigBankClient.java b/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/client/BigBankClient.java deleted file mode 100644 index f7b940f873..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/client/BigBankClient.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.client; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -import bigbank.account.AccountService; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class BigBankClient { - public static void main(String[] args) throws Exception { - - SCANodeFactory factory = SCANodeFactory.newInstance(); - SCANode node = factory.createSCANodeFromClassLoader("BigBank.composite", BigBankClient.class.getClassLoader()); - node.start(); - - AccountService accountService = ((SCAClient)node).getService(AccountService.class, "AccountServiceComponent"); - - System.out.println("Account summary: " + accountService.getAccountReport("Customer_01") ); - - node.stop(); - } - -} diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/server/BigBankServer.java b/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/server/BigBankServer.java deleted file mode 100644 index 241347e417..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/server/BigBankServer.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.server; - -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class BigBankServer { - - public static void main(String[] args) throws Exception { - long timeout = -1L; - if (args.length > 0) { - timeout = Long.parseLong(args[0]); - } - - System.out.println("Starting the Sample SCA Spring BigBank server..."); - - SCANodeFactory factory = SCANodeFactory.newInstance(); - SCANode node = factory.createSCANodeFromClassLoader("BigBank.composite", BigBankServer.class.getClassLoader()); - node.start(); - - if (timeout < 0) { - System.out.println("Press Enter to Exit..."); - System.in.read(); - } else { - Thread.sleep(timeout); - } - - node.stop(); - - System.out.println("Bye"); - } -} diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/stockquote/StockQuoteService.java b/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/stockquote/StockQuoteService.java deleted file mode 100644 index 2d97b57066..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/java/bigbank/stockquote/StockQuoteService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.stockquote; - -import org.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the StockQuote service. - */ -@Remotable -public interface StockQuoteService { - - public double getQuote(String symbol); -} - diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/BigBank.composite b/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/BigBank.composite deleted file mode 100644 index ea2dbc7e1c..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/BigBank.composite +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/SavingsAccount.composite b/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/SavingsAccount.composite deleted file mode 100644 index 4bb2ce61ef..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/SavingsAccount.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/StockAccount.composite b/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/StockAccount.composite deleted file mode 100644 index 97dff499ba..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/StockAccount.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/spring-context/Account-spring-context.xml b/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/spring-context/Account-spring-context.xml deleted file mode 100644 index 899d8d7d62..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/spring-context/Account-spring-context.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/spring-context/SavingsAccount-context.xml b/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/spring-context/SavingsAccount-context.xml deleted file mode 100644 index b9e26bf81b..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/spring-context/SavingsAccount-context.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/MANIFEST.MF b/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/MANIFEST.MF deleted file mode 100644 index 32fa070ffb..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/MANIFEST.MF +++ /dev/null @@ -1,4 +0,0 @@ -Manifest-Version: 1.0 -Spring-Context: META-INF/spring/StockAccount-context.xml - - diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/spring/StockAccount-context.xml b/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/spring/StockAccount-context.xml deleted file mode 100644 index b30f821f7e..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/spring-context/StockAccount/META-INF/spring/StockAccount-context.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/web/style.css b/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/web/style.css deleted file mode 100644 index 1071583264..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/main/resources/web/style.css +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -* { font-family: arial; } - -table, th, td { border: 2px solid blue; border-collapse: collapse; } -th { color: white; background-color: blue; } diff --git a/branches/sca-android/samples/simple-bigbank-spring/src/test/java/bigbank/BigBankTestCase.java b/branches/sca-android/samples/simple-bigbank-spring/src/test/java/bigbank/BigBankTestCase.java deleted file mode 100644 index d82e383e46..0000000000 --- a/branches/sca-android/samples/simple-bigbank-spring/src/test/java/bigbank/BigBankTestCase.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank; - -import junit.framework.TestCase; - -import bigbank.server.BigBankServer; - -/** - * Tests out the big bank service - * - */ -public class BigBankTestCase extends TestCase { - - public void testServer() throws Exception { - BigBankServer.main(new String[] {"1000"}); - } -} diff --git a/branches/sca-android/samples/simple-callback-ws/README b/branches/sca-android/samples/simple-callback-ws/README deleted file mode 100644 index 6b27718f74..0000000000 --- a/branches/sca-android/samples/simple-callback-ws/README +++ /dev/null @@ -1,144 +0,0 @@ -Simple Callback Sample Using Web Services -========================================= -This sample demonstrates asynchronous messaging using a callback over the -Web Service binding. It is very similar to the simple-callback sample. -The only differences are that simplecallback.composite has been updated -to use the Web Service binding, and there is a simplecallback.wsdl file. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-simple-callback.jar simplecallback.SimpleCallbackClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-simple-callback.jar simplecallback.SimpleCallbackClient - - -Sample Overview ---------------- -The sample provides a single composite with two components. MyClientComponent is -wired to MyServiceComponent. The interface of MyServiceComponent describes one -method as ONEWAY and with a callback semantic. When a message passes from -client to service the response is returned via the callback asynchronously. - -simple-callback/ - src/ - main/ - java/ - simplecallback/ - MyClient.java - client interface - MyClientImpl.java - implements the client and service callback - interfaces - MyService.java - service interface - MyServiceCallback.java - service callback interface, implemented by the - client - MyServiceImpl.java - implements the service interface - SimpleCallbackClient.java - starts the SCA Runtime and - deploys the simplecallback.composite. - It then calls MyClientComponent which in turn - calls MyServiceComponent - resources/ - simplecallback.composite - the SCA assembly for this sample - wsdl/ - simplecallback.wsdl - the service description and callback binding - test/ - java/ - simplecallback/ - SimpleCallbackTestCase.java - JUnit test case - simple-callback.png - a pictorial representation of the sample - .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd simple-callback-ws -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 14-Jan-2008 14:25:02 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:8085/MyServiceCallbackCo -mponent - [java] 14-Jan-2008 14:25:02 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:8085/MyServiceComponent - [java] Main thread Thread[main,5,main] - [java] aClientMethod on thread Thread[main,5,main] - [java] aClientMethod return from someMethod on thread Thread[main,5,main] - [java] setMyServiceCallback on thread Thread[pool-1-thread-2,5,main] - [java] someMethod on thread Thread[pool-1-thread-2,5,main] - [java] receiveResult on thread Thread[pool-1-thread-4,5,main] - [java] Result: -> someMethod -> receiveResult - - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd simple-callback-ws -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running simplecallback.SimpleCallbackTestCase -14-Jan-2008 14:26:28 org.apache.catalina.core.StandardEngine start -INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 -14-Jan-2008 14:26:28 org.apache.catalina.startup.ContextConfig defaultWebConfig -INFO: No default web.xml -14-Jan-2008 14:26:28 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd -14-Jan-2008 14:26:28 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_ -1.dtd -14-Jan-2008 14:26:28 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_ -2.dtd -14-Jan-2008 14:26:28 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_ -0.xsd -14-Jan-2008 14:26:28 org.apache.catalina.startup.DigesterFactory register -WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xs -d -14-Jan-2008 14:26:28 org.apache.coyote.http11.Http11Protocol init -INFO: Initializing Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:26:28 org.apache.coyote.http11.Http11Protocol start -INFO: Starting Coyote HTTP/1.1 on http-8085 -14-Jan-2008 14:26:28 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:8085/MyServiceCallbackComponent -14-Jan-2008 14:26:28 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletM -apping -INFO: Added Servlet mapping: http://L3AW203:8085/MyServiceComponent -Main thread Thread[main,5,main] -aClientMethod on thread Thread[main,5,main] -aClientMethod return from someMethod on thread Thread[main,5,main] -Sleeping ... -setMyServiceCallback on thread Thread[pool-1-thread-1,5,main] -someMethod on thread Thread[pool-1-thread-1,5,main] -receiveResult on thread Thread[pool-1-thread-2,5,main] -Result: -> someMethod -> receiveResult -14-Jan-2008 14:26:31 org.apache.coyote.http11.Http11Protocol destroy -INFO: Stopping Coyote HTTP/1.1 on http-8085 -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.312 sec - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-android/samples/simple-callback-ws/build.xml b/branches/sca-android/samples/simple-callback-ws/build.xml deleted file mode 100644 index 10b69bd395..0000000000 --- a/branches/sca-android/samples/simple-callback-ws/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/simple-callback-ws/pom.xml b/branches/sca-android/samples/simple-callback-ws/pom.xml deleted file mode 100644 index d3482afb8b..0000000000 --- a/branches/sca-android/samples/simple-callback-ws/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-simple-callback-ws - Apache Tuscany SCA Simple Callback Web Service Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/simple-callback-ws/simple-callback-ws.png b/branches/sca-android/samples/simple-callback-ws/simple-callback-ws.png deleted file mode 100644 index 1b6353f5cf..0000000000 Binary files a/branches/sca-android/samples/simple-callback-ws/simple-callback-ws.png and /dev/null differ diff --git a/branches/sca-android/samples/simple-callback-ws/simple-callback-ws.svg b/branches/sca-android/samples/simple-callback-ws/simple-callback-ws.svg deleted file mode 100644 index 7d9e3de510..0000000000 --- a/branches/sca-android/samples/simple-callback-ws/simple-callback-ws.svg +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - simplecallback - MyServiceComponent - - - MyClientComponent - - - diff --git a/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyClient.java b/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyClient.java deleted file mode 100644 index 4cc00d6d0f..0000000000 --- a/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyClient.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package simplecallback; - -/** - * The client interface - */ -public interface MyClient { - - void aClientMethod(); -} diff --git a/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyClientImpl.java b/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyClientImpl.java deleted file mode 100644 index ad7c6d8fef..0000000000 --- a/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyClientImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package simplecallback; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -/** - * Demonstrates a component-to-component callback invocation - */ -@Service(MyClient.class) -@Scope("COMPOSITE") -public class MyClientImpl implements MyClient, MyServiceCallback { - - private MyService myService; - static String result; - - @Reference - public void setMyService(MyService myService) { - this.myService = myService; - } - - public void aClientMethod() { - System.out.println("aClientMethod on thread " + Thread.currentThread()); - myService.someMethod("-> someMethod"); - System.out.println("aClientMethod return from someMethod on thread " + Thread.currentThread()); - } - - public void receiveResult(String result) { - System.out.println("receiveResult on thread " + Thread.currentThread()); - System.out.println("Result: " + result); - MyClientImpl.result = result; - } -} diff --git a/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyService.java b/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyService.java deleted file mode 100644 index 48acc0e94f..0000000000 --- a/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package simplecallback; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.OneWay; -import org.osoa.sca.annotations.Remotable; - -/** - * This service that will be invoked in a non-blocking fashion - */ -@Remotable -@Callback(MyServiceCallback.class) -public interface MyService { - - @OneWay - void someMethod(String arg); -} diff --git a/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceCallback.java b/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceCallback.java deleted file mode 100644 index 66cfb2bc8a..0000000000 --- a/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceCallback.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package simplecallback; - -import org.osoa.sca.annotations.Remotable; - -/** - * The callback interface for {@link MyService}. - */ -@Remotable -public interface MyServiceCallback { - - void receiveResult(String result); -} diff --git a/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceImpl.java b/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceImpl.java deleted file mode 100644 index 08057d2fcc..0000000000 --- a/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package simplecallback; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -/** - * This class implements MyService and uses a callback. - */ -@Service(MyService.class) -@Scope("COMPOSITE") -public class MyServiceImpl implements MyService { - - private MyServiceCallback myServiceCallback; - - /** - * The setter used by the runtime to set the callback reference - * @param myServiceCallback - */ - @Callback - public void setMyServiceCallback(MyServiceCallback myServiceCallback) { - System.out.println("setMyServiceCallback on thread " + Thread.currentThread()); - this.myServiceCallback = myServiceCallback; - } - - public void someMethod(String arg) { - System.out.println("someMethod on thread " + Thread.currentThread()); - // invoke the callback - try { - myServiceCallback.receiveResult(arg + " -> receiveResult"); - } catch(RuntimeException e) { - System.out.println("RuntimeException invoking receiveResult: " + e.toString()); - e.printStackTrace(); - } - } -} diff --git a/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/SimpleCallbackClient.java b/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/SimpleCallbackClient.java deleted file mode 100644 index eeb0e52163..0000000000 --- a/branches/sca-android/samples/simple-callback-ws/src/main/java/simplecallback/SimpleCallbackClient.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package simplecallback; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Demonstrates resolving the client service and initiating the callback sequence - */ -public class SimpleCallbackClient { - - public static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance("simplecallback.composite"); - MyClient myClient = scaDomain.getService(MyClient.class, "MyClientComponent"); - - System.out.println("Main thread " + Thread.currentThread()); - myClient.aClientMethod(); - Thread.sleep(1000); - - scaDomain.close(); - } -} diff --git a/branches/sca-android/samples/simple-callback-ws/src/main/resources/simplecallback.composite b/branches/sca-android/samples/simple-callback-ws/src/main/resources/simplecallback.composite deleted file mode 100644 index 53e7fe66af..0000000000 --- a/branches/sca-android/samples/simple-callback-ws/src/main/resources/simplecallback.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/simple-callback-ws/src/main/resources/wsdl/simplecallback.wsdl b/branches/sca-android/samples/simple-callback-ws/src/main/resources/wsdl/simplecallback.wsdl deleted file mode 100644 index 8a6465de3a..0000000000 --- a/branches/sca-android/samples/simple-callback-ws/src/main/resources/wsdl/simplecallback.wsdl +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/simple-callback-ws/src/test/java/simplecallback/SimpleCallbackTestCase.java b/branches/sca-android/samples/simple-callback-ws/src/test/java/simplecallback/SimpleCallbackTestCase.java deleted file mode 100644 index 580a7f6b0c..0000000000 --- a/branches/sca-android/samples/simple-callback-ws/src/test/java/simplecallback/SimpleCallbackTestCase.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package simplecallback; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * A testcase that demonstrates resolving the client service and initiating the callback sequence - */ -public class SimpleCallbackTestCase extends TestCase { - - private SCADomain scaDomain; - private MyClient myClient; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("simplecallback.composite"); - myClient = scaDomain.getService(MyClient.class, "MyClientComponent"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void test() throws Exception { - System.out.println("Main thread " + Thread.currentThread()); - myClient.aClientMethod(); - System.out.println("Sleeping ..."); - Thread.sleep(2000); - assertEquals("-> someMethod -> receiveResult", MyClientImpl.result); - } -} - - diff --git a/branches/sca-android/samples/spring-bigbank-calculator/README b/branches/sca-android/samples/spring-bigbank-calculator/README deleted file mode 100644 index 3869ea6a12..0000000000 --- a/branches/sca-android/samples/spring-bigbank-calculator/README +++ /dev/null @@ -1,2 +0,0 @@ -Spring-bigbank-calculator is part of a spring-bigbank sample. -Please see the Readme file under spring-bigbank to understand how spring-bigbank-calculator fits into the overall picture. diff --git a/branches/sca-android/samples/spring-bigbank-calculator/build.xml b/branches/sca-android/samples/spring-bigbank-calculator/build.xml deleted file mode 100644 index 9d69ee9ba0..0000000000 --- a/branches/sca-android/samples/spring-bigbank-calculator/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/spring-bigbank-calculator/pom.xml b/branches/sca-android/samples/spring-bigbank-calculator/pom.xml deleted file mode 100644 index 45117a03de..0000000000 --- a/branches/sca-android/samples/spring-bigbank-calculator/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-spring-bigbank-calculator - Apache Tuscany SCA Spring-Based BigBank Calculator Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-node-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-script - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-spring - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-rmi - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/AddService.java b/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/AddService.java deleted file mode 100644 index ecaa4e28de..0000000000 --- a/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/AddService.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.calculator; - -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/CalculatorService.java b/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/CalculatorService.java deleted file mode 100644 index 66a0ba0e63..0000000000 --- a/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/CalculatorService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.calculator; - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/CalculatorServiceImpl.java b/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 2a529dddeb..0000000000 --- a/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.calculator; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * An implementation of the Calculator service. - */ -@Service(CalculatorService.class) -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - System.err.println("Multiply"); - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/DivideService.java b/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/DivideService.java deleted file mode 100644 index 22e9d58a94..0000000000 --- a/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/DivideService.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.calculator; - -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/MultiplyService.java b/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/MultiplyService.java deleted file mode 100644 index ba3d43448e..0000000000 --- a/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/MultiplyService.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.calculator; - -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/SubtractService.java b/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/SubtractService.java deleted file mode 100644 index 17691af0e8..0000000000 --- a/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/SubtractService.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.calculator; - -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/server/CalculatorServer.java b/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/server/CalculatorServer.java deleted file mode 100644 index b0737899dc..0000000000 --- a/branches/sca-android/samples/spring-bigbank-calculator/src/main/java/bigbank/calculator/server/CalculatorServer.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.calculator.server; - -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -public class CalculatorServer { - - public static void main(String[] args) throws Exception { - - System.out.println("Starting the Sample SCA Calculator..."); - - SCANodeFactory factory = SCANodeFactory.newInstance(); - SCANode node = factory.createSCANodeFromClassLoader("Calculator.composite", CalculatorServer.class.getClassLoader()); - node.start(); - - System.out.println("Press Enter to Exit..."); - System.in.read(); - - node.stop(); - - System.out.println("Bye"); - System.exit(0); - } - -} diff --git a/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/Calculator.composite b/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/Calculator.composite deleted file mode 100644 index 504a4ccfcd..0000000000 --- a/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/Calculator.composite +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/META-INF/spring/CalculatorService-context.xml b/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/META-INF/spring/CalculatorService-context.xml deleted file mode 100644 index 42e5f824f9..0000000000 --- a/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/META-INF/spring/CalculatorService-context.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/calculator/AddServiceImpl.js b/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/calculator/AddServiceImpl.js deleted file mode 100644 index 6f11106ddd..0000000000 --- a/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/calculator/AddServiceImpl.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -function add(n1, n2) { - return n1 + n2; -} \ No newline at end of file diff --git a/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/calculator/DivideServiceImpl.groovy b/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/calculator/DivideServiceImpl.groovy deleted file mode 100644 index c31c1e8fd6..0000000000 --- a/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/calculator/DivideServiceImpl.groovy +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -def divide(n1, n2) { - return n1 / n2 -} \ No newline at end of file diff --git a/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/calculator/MultiplyServiceImpl.py b/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/calculator/MultiplyServiceImpl.py deleted file mode 100644 index cfd96f287a..0000000000 --- a/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/calculator/MultiplyServiceImpl.py +++ /dev/null @@ -1,21 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -def multiply(n1, n2): - print "Python Calculator component: multiply(", n1, ",", n2, ")" - return n1 * n2 \ No newline at end of file diff --git a/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/calculator/SubtractServiceImpl.rb b/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/calculator/SubtractServiceImpl.rb deleted file mode 100644 index 8e7a884d41..0000000000 --- a/branches/sca-android/samples/spring-bigbank-calculator/src/main/resources/calculator/SubtractServiceImpl.rb +++ /dev/null @@ -1,22 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -def subtract(n1, n2) - print "Ruby Calculator subtract(", n1, ",", n2, ")\n" - return n1 - n2 -end \ No newline at end of file diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/README b/branches/sca-android/samples/spring-bigbank-checkaccount/README deleted file mode 100644 index 17b71e7590..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/README +++ /dev/null @@ -1,4 +0,0 @@ -Spring-bigbank-checkaccount is a part of a spring-bigbank sample. -Please see the Readme file under spring-bigbank to understand how spring-bigbank-checkaccount fits into the overall picture. - - diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/build.xml b/branches/sca-android/samples/spring-bigbank-checkaccount/build.xml deleted file mode 100644 index 26d71c146f..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/build.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/pom.xml b/branches/sca-android/samples/spring-bigbank-checkaccount/pom.xml deleted file mode 100644 index 19321adbb6..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/pom.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-spring-bigbank-checkaccount - Apache Tuscany SCA Spring-Based BigBank Checking Accounts Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-node-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-core-spi - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-spring - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.ws.security - wss4j - 1.5.3 - - - - junit - junit - 4.2 - test - - - - org.apache.activemq - apache-activemq - 4.1.1 - - - org.apache.activemq - activemq-web-demo - - - - - - - ${artifactId} - - diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/checking/CheckingAccountDetails.java b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/checking/CheckingAccountDetails.java deleted file mode 100644 index 9737ac27eb..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/checking/CheckingAccountDetails.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.checking; - -/** - * @version $$Rev: 635619 $$ $$Date: 2007-04-09 12:03:34 -0700 (Mon, 09 Apr - * 2007) $$ - */ - -public class CheckingAccountDetails { - private String accountNumber; - private double balance; - - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String n) { - this.accountNumber = n; - } - - public double getBalance() { - return balance; - } - - public void setBalance(double b) { - this.balance = b; - } - - @Override - public String toString() { - return accountNumber + ", balance:" + balance; - } -} diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/checking/CheckingAccountService.java b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/checking/CheckingAccountService.java deleted file mode 100644 index a8b958010a..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/checking/CheckingAccountService.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.checking; - -import org.osoa.sca.annotations.Remotable; -import org.osoa.sca.annotations.Service; - -/** - * @version $$Rev: 636465 $$ $$Date: 2008-03-13 00:49:26 +0530 (Thu, 13 Mar 2008) $$ - */ -@Service -@Remotable -public interface CheckingAccountService { - - public CheckingAccountDetails getAccountDetails(String customerID); - - public double deposit(String accountNo, double depositAmt); - - public double withdraw(String accountNo, double withdrawalAmount); - -} diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/checking/CheckingAccountServiceImpl.java b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/checking/CheckingAccountServiceImpl.java deleted file mode 100644 index a18a4920b8..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/checking/CheckingAccountServiceImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.checking; - -import java.util.HashMap; -import java.util.Map; - -import org.osoa.sca.annotations.Service; - -/** - * - * */ - -@Service(CheckingAccountService.class) -public class CheckingAccountServiceImpl implements CheckingAccountService { - private Map custAcctMap = new HashMap(); - private Map checkingAccts = new HashMap(); - - public CheckingAccountServiceImpl() { - custAcctMap.put("Customer_01", "CHA_Customer_01"); - custAcctMap.put("Customer_02", "CHA_Customer_02"); - custAcctMap.put("Customer_03", "CHA_Customer_03"); - - checkingAccts.put("CHA_Customer_01", new Double(1000)); - checkingAccts.put("CHA_Customer_02", new Double(1500)); - checkingAccts.put("CHA_Customer_03", new Double(2000)); - } - - public double deposit(String accountNo, double depositAmt) { - checkingAccts.put(accountNo, new Double(checkingAccts.get(accountNo).doubleValue() + depositAmt)); - return checkingAccts.get(accountNo).doubleValue(); - } - - public CheckingAccountDetails getAccountDetails(String customerID) { - CheckingAccountDetails checkingAccount = new CheckingAccountDetails(); - checkingAccount.setAccountNumber(custAcctMap.get(customerID)); - checkingAccount.setBalance(checkingAccts.get(checkingAccount.getAccountNumber()).doubleValue()); - - return checkingAccount; - } - - public double withdraw(String accountNo, double withdrawalAmount) { - double balance = checkingAccts.get(accountNo).doubleValue(); - if ( balance - withdrawalAmount > 0 ) { - balance = balance - withdrawalAmount; - checkingAccts.put(accountNo, balance); - } - return balance; - } -} diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/checking/server/CheckingAccountServer.java b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/checking/server/CheckingAccountServer.java deleted file mode 100644 index 2e367cf32b..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/checking/server/CheckingAccountServer.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.checking.server; - -import java.io.IOException; - -import org.apache.activemq.broker.BrokerService; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -/** - * This server program shows how to create an SCA runtime, and start it which - * activates the Spring BigBank CheckingsAccount JMS endpoint. - */ -public class CheckingAccountServer { - - public static void main(String[] args) { - try { - BrokerService jmsBroker; - jmsBroker = new BrokerService(); - jmsBroker.setPersistent(false); - jmsBroker.setUseJmx(false); - jmsBroker.addConnector("tcp://localhost:61619"); - jmsBroker.start(); - - SCANodeFactory factory = SCANodeFactory.newInstance(); - SCANode node = factory.createSCANodeFromClassLoader("CheckingsAccount.composite", CheckingAccountServer.class.getClassLoader()); - node.start(); - - System.out.println("CheckingsAccount server started (press enter to shutdown)"); - System.in.read(); - - node.stop(); - - jmsBroker.stop(); - System.out.println("CheckingsAccount server stopped"); - - } catch (IOException e) { - e.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - } - -} diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/AccountsDataPasswordCallbackHandler.java b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/AccountsDataPasswordCallbackHandler.java deleted file mode 100644 index ad17ab8cf5..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/AccountsDataPasswordCallbackHandler.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.security; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.apache.ws.security.WSPasswordCallback; - -/** - * Sample userid passwd generation class - */ -public class AccountsDataPasswordCallbackHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, - UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i]; - if ( pwcb.getUsage() == WSPasswordCallback.SIGNATURE ) { - System.out.println(" Usage is SIGNATURE ... "); - pwcb.setPassword("bbservice"); - } else if ( pwcb.getUsage() == WSPasswordCallback.USERNAME_TOKEN_UNKNOWN ) { - System.out.println("*** Calling ACCOUNTS-DATA Passwd Handler for AUTHENTICATING userID = " - + pwcb.getIdentifer() + " and password = " + pwcb.getPassword() ); - if ( pwcb.getIdentifer().equals("bbaservice") && pwcb.getPassword().equals("bbaservice")) { - System.out.println("AUTHENTICATION SUCCESSFUL!"); - } else { - System.out.println("AUTHENTICATION FAILED!"); - throw new UnsupportedCallbackException(pwcb, "UserId - Password Authentication Failed!"); - } - } - } - } - -} diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/BigbankCheckingsAcl.java b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/BigbankCheckingsAcl.java deleted file mode 100644 index 7b44a28bc9..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/BigbankCheckingsAcl.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.account.security; - -import java.security.Principal; -import java.util.Hashtable; -import java.util.Map; - -/** - * @version $Rev: 635619 $ $Date: 2008-03-10 23:24:29 +0530 (Mon, 10 Mar 2008) $ - */ -public class BigbankCheckingsAcl { - private static MapcheckingsAcl = new Hashtable(); - - static { - checkingsAcl.put("bbaservice", "Customer_01"); - checkingsAcl.put("bbUser01", "Customer_01"); - } - - - public static void authorize(Principal principal, String resource) { - if ( checkingsAcl.get(principal.getName()) == null || - !checkingsAcl.get(principal.getName()).equals(resource) ) { - throw new RuntimeException("User - " + principal.getName() + " not authorized to access account " + - resource); - } else { - System.out.println("Successfully Authorized '" + principal.getName() + " to access accounts of " + resource); - } - } - -} diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthImplementationPolicyProvider.java b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthImplementationPolicyProvider.java deleted file mode 100644 index bbd5b0c325..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthImplementationPolicyProvider.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.account.security; - -import org.apache.tuscany.sca.assembly.ConfiguredOperation; -import org.apache.tuscany.sca.assembly.Implementation; -import org.apache.tuscany.sca.assembly.OperationsConfigurator; -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Interceptor; -import org.apache.tuscany.sca.invocation.Phase; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.provider.PolicyProvider; -import org.apache.tuscany.sca.runtime.RuntimeComponent; - -/** - * @version $Rev: 641726 $ $Date: 2008-03-27 12:54:37 +0530 (Thu, 27 Mar 2008) $ - */ -public class CheckingsDeptAuthImplementationPolicyProvider implements PolicyProvider { - private RuntimeComponent component; - private Implementation implementation; - - public CheckingsDeptAuthImplementationPolicyProvider(RuntimeComponent component, Implementation implementation) { - super(); - this.component = component; - this.implementation = implementation; - } - - private String getContext() { - return "component.implementation: " + component.getURI() + "(" + implementation.getClass().getName() + ")"; - } - - private PolicySet findPolicySet(Operation operation) { - for (PolicySet ps : component.getPolicySets()) { - for (Object p : ps.getPolicies()) { - if (CheckingsDeptAuthPolicy.class.isInstance(p)) { - return ps; - } - } - } - - if ( component instanceof OperationsConfigurator ) { - for ( ConfiguredOperation confOp : ((OperationsConfigurator)component).getConfiguredOperations() ) { - if ( confOp.getName().equals(operation.getName())) { - for (PolicySet ps : confOp.getPolicySets()) { - for (Object p : ps.getPolicies()) { - if (CheckingsDeptAuthPolicy.class.isInstance(p)) { - return ps; - } - } - } - } - } - } - - return null; - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProvider#createInterceptor(org.apache.tuscany.sca.interfacedef.Operation) - */ - public Interceptor createInterceptor(Operation operation) { - PolicySet ps = findPolicySet(operation); - return ps == null ? null : new CheckingsDeptAuthPolicyInterceptor(getContext(), operation, ps); - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProvider#getPhase() - */ - public String getPhase() { - return Phase.IMPLEMENTATION_POLICY; - } - -} diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicy.java b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicy.java deleted file mode 100644 index cb26ca809d..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicy.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.account.security; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.policy.Policy; - -/** - * @version $Rev: 641726 $ $Date: 2008-03-27 12:54:37 +0530 (Thu, 27 Mar 2008) $ - */ -public class CheckingsDeptAuthPolicy implements Policy { - - public QName getSchemaName() { - // TODO Auto-generated method stub - return null; - } - - public boolean isUnresolved() { - // TODO Auto-generated method stub - return false; - } - - public void setUnresolved(boolean unresolved) { - // TODO Auto-generated method stub - - } - -} diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyInterceptor.java b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyInterceptor.java deleted file mode 100644 index 2ebcc8470a..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyInterceptor.java +++ /dev/null @@ -1,71 +0,0 @@ -package bigbank.account.security; - -import java.security.Principal; - -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Interceptor; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.invocation.Message; -import org.apache.tuscany.sca.policy.PolicySet; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * Policy handler to handle PolicySet related to Logging with the QName - * {http://tuscany.apache.org/xmlns/sca/1.0/impl/java}LoggingPolicy - */ -public class CheckingsDeptAuthPolicyInterceptor implements Interceptor { - private Invoker next; - - public CheckingsDeptAuthPolicyInterceptor(String context, Operation operation, PolicySet policySet) { - super(); - init(); - } - - private final void init() { - } - - public Message invoke(Message msg) { - Object msgBody = msg.getBody(); - if (msgBody instanceof Object[]) { - Object args[] = (Object[])msg.getBody(); - if ( msg.getQoSContext().get(Message.QOS_CTX_SECURITY_PRINCIPAL) != null ) { - BigbankCheckingsAcl.authorize((Principal)msg.getQoSContext().get(Message.QOS_CTX_SECURITY_PRINCIPAL), - (String)args[0]); - } - } - - Message responseMsg = null; - try { - responseMsg = getNext().invoke(msg); - return responseMsg; - } catch (RuntimeException e) { - throw e; - } - } - - public Invoker getNext() { - return next; - } - - public void setNext(Invoker next) { - this.next = next; - } -} diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyProviderFactory.java b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyProviderFactory.java deleted file mode 100644 index 24da9878a5..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthPolicyProviderFactory.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.account.security; - -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Implementation; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.provider.PolicyProvider; -import org.apache.tuscany.sca.provider.PolicyProviderFactory; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentReference; -import org.apache.tuscany.sca.runtime.RuntimeComponentService; - -/** - * @version $Rev: 641726 $ $Date: 2008-03-27 12:54:37 +0530 (Thu, 27 Mar 2008) $ - */ -public class CheckingsDeptAuthPolicyProviderFactory implements PolicyProviderFactory { - private ExtensionPointRegistry registry; - - public CheckingsDeptAuthPolicyProviderFactory(ExtensionPointRegistry registry) { - super(); - this.registry = registry; - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createImplementationPolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.assembly.Implementation) - */ - public PolicyProvider createImplementationPolicyProvider(RuntimeComponent component, Implementation implementation) { - return new CheckingsDeptAuthImplementationPolicyProvider(component, implementation); - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createReferencePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference, org.apache.tuscany.sca.assembly.Binding) - */ - public PolicyProvider createReferencePolicyProvider(RuntimeComponent component, - RuntimeComponentReference reference, - Binding binding) { - return null; - } - - /** - * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createServicePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService, org.apache.tuscany.sca.assembly.Binding) - */ - public PolicyProvider createServicePolicyProvider(RuntimeComponent component, - RuntimeComponentService service, - Binding binding) { - return null; - } - - /** - * @see org.apache.tuscany.sca.provider.ProviderFactory#getModelType() - */ - public Class getModelType() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyHandler.java b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyHandler.java deleted file mode 100644 index 5668fa23b9..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyHandler.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package bigbank.account.security; - -import java.security.Principal; - -import org.apache.tuscany.sca.invocation.Message; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.policy.util.PolicyHandler; - -/** - * @version $Rev: 635619 $ $Date: 2008-03-10 23:24:29 +0530 (Mon, 10 Mar 2008) $ - */ -public class CheckingsDeptAuthorizationPolicyHandler implements PolicyHandler { - private PolicySet applicablePolicySet = null; - - public void afterInvoke(Object... context) { - } - - public void beforeInvoke(Object... context) { - for ( int count = 0 ; count < context.length ; ++count ) { - if ( context[count] instanceof Message ) { - Message msg = (Message)context[count]; - Object args[] = (Object[])msg.getBody(); - if ( msg.getQoSContext().get(Message.QOS_CTX_SECURITY_PRINCIPAL) != null ) { - BigbankCheckingsAcl.authorize((Principal)msg.getQoSContext().get(Message.QOS_CTX_SECURITY_PRINCIPAL), - (String)args[0]); - } - } - } - } - - public void cleanUp(Object... arg0) { - } - - public PolicySet getApplicablePolicySet() { - return this.applicablePolicySet; - } - - public void setApplicablePolicySet(PolicySet policySet) { - this.applicablePolicySet = policySet; - } - - public void setUp(Object... arg0) { - - } - -} diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyProcessor.java b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyProcessor.java deleted file mode 100644 index 96a5b2ca1f..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/java/bigbank/account/security/CheckingsDeptAuthorizationPolicyProcessor.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.account.security; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.stream.XMLStreamWriter; - -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.contribution.service.ContributionReadException; -import org.apache.tuscany.sca.contribution.service.ContributionResolveException; -import org.apache.tuscany.sca.contribution.service.ContributionWriteException; - -/** - * Implementation of a Policy Processor - * - */ -public class CheckingsDeptAuthorizationPolicyProcessor implements StAXArtifactProcessor { - private static final QName CHECKINGS_DEPT_AUTHORIZATION_POLICY_QNAME = new QName("http://bigbank/checkings", "AuthPolicy"); - public QName getArtifactType() { - return CHECKINGS_DEPT_AUTHORIZATION_POLICY_QNAME; - } - - public CheckingsDeptAuthorizationPolicyProcessor(ModelFactoryExtensionPoint modelFactories) { - } - - - public CheckingsDeptAuthPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException { - CheckingsDeptAuthPolicy policy = new CheckingsDeptAuthPolicy(); - return policy; - } - - public void write(CheckingsDeptAuthPolicy policy, XMLStreamWriter writer) throws ContributionWriteException, - XMLStreamException { - String prefix = "tuscany"; - writer.writeStartElement(prefix, - CHECKINGS_DEPT_AUTHORIZATION_POLICY_QNAME.getLocalPart(), - CHECKINGS_DEPT_AUTHORIZATION_POLICY_QNAME.getNamespaceURI()); - writer.writeNamespace("chk", "http://bigbank/checkings"); - - - writer.writeEndElement(); - } - - public Class getModelType() { - return CheckingsDeptAuthPolicy.class; - } - - public void resolve(CheckingsDeptAuthPolicy arg0, ModelResolver arg1) throws ContributionResolveException { - - } - -} diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/CheckingsAccount.composite b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/CheckingsAccount.composite deleted file mode 100644 index 371a1afd32..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/CheckingsAccount.composite +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor deleted file mode 100644 index 6491a0d326..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Implementation class for the artifact processor extension -bigbank.account.security.CheckingsDeptAuthorizationPolicyProcessor;qname=http://bigbank/checkings#AuthPolicy,model=bigbank.account.security.CheckingsDeptAuthPolicy diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler deleted file mode 100644 index b1bce4339d..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler +++ /dev/null @@ -1,20 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# PolicyHandlerClasses to interpret specific PolicyModels against specific QoS infrastructures -# handler classname;qname=;model= -bigbank.account.security.CheckingsDeptAuthorizationPolicyHandler;intent=http://bigbankAccount#authorization,model=bigbank.account.security.CheckingsDeptAuthPolicy diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory deleted file mode 100644 index d6bfe2167e..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Implementation class for the policy extension -bigbank.account.security.CheckingsDeptAuthPolicyProviderFactory;model=bigbank.account.security.CheckingsDeptAuthPolicy \ No newline at end of file diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/definitions.xml b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/definitions.xml deleted file mode 100644 index d57d02297c..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/definitions.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - Authorization Intent - - - - - - - - - UsernameToken - bigbank.account.security.AccountsDataPasswordCallbackHandler - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/spring-context/META-INF/spring/CheckingAccountService-context.xml b/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/spring-context/META-INF/spring/CheckingAccountService-context.xml deleted file mode 100644 index 6b2338f611..0000000000 --- a/branches/sca-android/samples/spring-bigbank-checkaccount/src/main/resources/spring-context/META-INF/spring/CheckingAccountService-context.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - diff --git a/branches/sca-android/samples/spring-bigbank-stockquote/README b/branches/sca-android/samples/spring-bigbank-stockquote/README deleted file mode 100644 index b90bafeb59..0000000000 --- a/branches/sca-android/samples/spring-bigbank-stockquote/README +++ /dev/null @@ -1,4 +0,0 @@ -Spring-bigbank-stockquote is a part of a spring-bigbank sample. -Please see the Readme file under spring-bigbank to understand how spring-bigbank-stockquote fits into the overall picture. - - diff --git a/branches/sca-android/samples/spring-bigbank-stockquote/build.xml b/branches/sca-android/samples/spring-bigbank-stockquote/build.xml deleted file mode 100644 index 1b38a40495..0000000000 --- a/branches/sca-android/samples/spring-bigbank-stockquote/build.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/spring-bigbank-stockquote/pom.xml b/branches/sca-android/samples/spring-bigbank-stockquote/pom.xml deleted file mode 100644 index 97cbc2d329..0000000000 --- a/branches/sca-android/samples/spring-bigbank-stockquote/pom.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-spring-bigbank-stockquote - Apache Tuscany SCA Spring-Based BigBank StockQuote Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-node-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-spring - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - org.springframework - spring-core - 2.0.8 - - - - org.springframework - spring-beans - 2.0.8 - - - - org.springframework - spring-context - 2.0.8 - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/StockQuoteImpl.java b/branches/sca-android/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/StockQuoteImpl.java deleted file mode 100644 index 81c47a78d1..0000000000 --- a/branches/sca-android/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/StockQuoteImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.stockquote; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the StockQuote service. - */ -@Service(StockQuoteService.class) -public class StockQuoteImpl implements StockQuoteService { - - public double getQuote(String symbol) { - double price = 104.0 + Math.random(); - price = ((int)(price * 100)) / 100.0; - - System.out.println("Getting stock quote for: " + symbol + ", value: "+ price); - - return price; - } - -} diff --git a/branches/sca-android/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/StockQuoteService.java b/branches/sca-android/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/StockQuoteService.java deleted file mode 100644 index d4b3fe9035..0000000000 --- a/branches/sca-android/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/StockQuoteService.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.stockquote; - -import org.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the StockQuote service. - */ -@Remotable -public interface StockQuoteService { - - public double getQuote(String symbol); -} diff --git a/branches/sca-android/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/SCAApplicationContextProvider.java b/branches/sca-android/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/SCAApplicationContextProvider.java deleted file mode 100644 index 643f9a187c..0000000000 --- a/branches/sca-android/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/SCAApplicationContextProvider.java +++ /dev/null @@ -1,19 +0,0 @@ -package bigbank.stockquote.server; - -import org.springframework.beans.BeansException; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; - -public class SCAApplicationContextProvider implements ApplicationContextAware { - - private static ApplicationContext ctx; - - public void setApplicationContext(ApplicationContext appContext) throws BeansException { - // Wiring the ApplicationContext into a static method - ctx = appContext; - } - - public static ApplicationContext getApplicationContext() { - return ctx; - } -} diff --git a/branches/sca-android/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/StockQuoteServer.java b/branches/sca-android/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/StockQuoteServer.java deleted file mode 100644 index b9abb53eb4..0000000000 --- a/branches/sca-android/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/StockQuoteServer.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package bigbank.stockquote.server; - -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.springframework.context.ApplicationContext; - -/** - * This server program shows how to bootstrap SCA from a simple J2SE program - * and start it which activates the StockQuote Web service endpoint. - */ -public class StockQuoteServer { - - public static void main(String[] args) throws Exception { - - System.out.println("Starting the Sample SCA StockQuote Service..."); - - SCANodeFactory factory = SCANodeFactory.newInstance(); - SCANode node = factory.createSCANodeFromClassLoader("StockQuote.composite", StockQuoteServer.class.getClassLoader()); - node.start(); - - // Method 1: To access the Spring Application Context instance - ApplicationContext ctx = SCAApplicationContextProvider.getApplicationContext(); - if (ctx.containsBean("StockQuoteServiceBean")) - System.out.println("StockQuoteServiceBean is now available for use..."); - - System.out.println("Press Enter to Exit..."); - System.in.read(); - - node.stop(); - System.out.println("Bye"); - } -} diff --git a/branches/sca-android/samples/spring-bigbank-stockquote/src/main/resources/META-INF/spring/StockQuoteService-context.xml b/branches/sca-android/samples/spring-bigbank-stockquote/src/main/resources/META-INF/spring/StockQuoteService-context.xml deleted file mode 100644 index 87dd006b5a..0000000000 --- a/branches/sca-android/samples/spring-bigbank-stockquote/src/main/resources/META-INF/spring/StockQuoteService-context.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/spring-bigbank-stockquote/src/main/resources/StockQuote.composite b/branches/sca-android/samples/spring-bigbank-stockquote/src/main/resources/StockQuote.composite deleted file mode 100644 index 06544c6883..0000000000 --- a/branches/sca-android/samples/spring-bigbank-stockquote/src/main/resources/StockQuote.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/store-distributed/README b/branches/sca-android/samples/store-distributed/README deleted file mode 100644 index 46e71bf51e..0000000000 --- a/branches/sca-android/samples/store-distributed/README +++ /dev/null @@ -1,28 +0,0 @@ -Store Sample -====================================== - -This is a sample store scenario that is used as a getting started guide -for Tuscany SCA. For detailed information, please see: - -http://tuscany.apache.org/getting-started-with-tuscany.html - -or - -http://tuscany.apache.org/getting-started-with-tuscany-using-tuscany-eclipse-plugin.html - - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built using Ant as follows: - -cd store -ant compile - -and then, to run: - -ant run - -Once the store application is running use your browser to visit the following -URL: - -http://localhost:8080/store/ diff --git a/branches/sca-android/samples/store-distributed/build.xml b/branches/sca-android/samples/store-distributed/build.xml deleted file mode 100644 index 652afc3570..0000000000 --- a/branches/sca-android/samples/store-distributed/build.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/store-distributed/cloud.composite b/branches/sca-android/samples/store-distributed/cloud.composite deleted file mode 100644 index 7bd13d5b6f..0000000000 --- a/branches/sca-android/samples/store-distributed/cloud.composite +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - diff --git a/branches/sca-android/samples/store-distributed/domain.composite b/branches/sca-android/samples/store-distributed/domain.composite deleted file mode 100644 index 6898c454af..0000000000 --- a/branches/sca-android/samples/store-distributed/domain.composite +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - diff --git a/branches/sca-android/samples/store-distributed/pom.xml b/branches/sca-android/samples/store-distributed/pom.xml deleted file mode 100644 index 1cd493807e..0000000000 --- a/branches/sca-android/samples/store-distributed/pom.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../pom.xml - - sample-store-distributed - Apache Tuscany SCA Getting Started Online Store Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - - org.apache.tuscany.sca - tuscany-node-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-launcher - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-domain-manager - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-data-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-widget-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/store-distributed/src/main/java/node/LaunchDomain.java b/branches/sca-android/samples/store-distributed/src/main/java/node/LaunchDomain.java deleted file mode 100644 index dd19f6b49b..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/java/node/LaunchDomain.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package node; - -import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher; - -/** - * This server program that loads a composite to provide simple registry function. - * This server can be replaced with any registry that is appropriate but the components - * in each node that talk to the registry should be replaced also. - */ -public class LaunchDomain { - public static void main(String[] args) throws Exception { - DomainManagerLauncher.main(args); - } - -} diff --git a/branches/sca-android/samples/store-distributed/src/main/java/node/LaunchStoreNodeA.java b/branches/sca-android/samples/store-distributed/src/main/java/node/LaunchStoreNodeA.java deleted file mode 100644 index 9016e515fb..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/java/node/LaunchStoreNodeA.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package node; - -import org.apache.tuscany.sca.node.launcher.NodeLauncher; - -public class LaunchStoreNodeA { - public static void main(String[] args) throws Exception { - NodeLauncher.main(new String[] {"http://localhost:9990/node-config/NodeA"}); - } -} diff --git a/branches/sca-android/samples/store-distributed/src/main/java/node/LaunchStoreNodeB.java b/branches/sca-android/samples/store-distributed/src/main/java/node/LaunchStoreNodeB.java deleted file mode 100644 index 2b387aec82..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/java/node/LaunchStoreNodeB.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package node; - -import org.apache.tuscany.sca.node.launcher.NodeLauncher; - -public class LaunchStoreNodeB { - public static void main(String[] args) throws Exception { - NodeLauncher.main(new String[] {"http://localhost:9990/node-config/NodeB"}); - } -} diff --git a/branches/sca-android/samples/store-distributed/src/main/java/node/LaunchStoreNodeC.java b/branches/sca-android/samples/store-distributed/src/main/java/node/LaunchStoreNodeC.java deleted file mode 100644 index fb138e484f..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/java/node/LaunchStoreNodeC.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package node; - -import org.apache.tuscany.sca.node.launcher.NodeLauncher; - -public class LaunchStoreNodeC { - public static void main(String[] args) throws Exception { - NodeLauncher.main(new String[] {"http://localhost:9990/node-config/NodeC"}); - } -} diff --git a/branches/sca-android/samples/store-distributed/src/main/java/services/Cart.java b/branches/sca-android/samples/store-distributed/src/main/java/services/Cart.java deleted file mode 100644 index 9e6226d963..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/java/services/Cart.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.apache.tuscany.sca.data.collection.Collection; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Cart extends Collection { - -} diff --git a/branches/sca-android/samples/store-distributed/src/main/java/services/Catalog.java b/branches/sca-android/samples/store-distributed/src/main/java/services/Catalog.java deleted file mode 100644 index 2c3b19f579..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/java/services/Catalog.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Catalog { - Item[] get(); -} diff --git a/branches/sca-android/samples/store-distributed/src/main/java/services/CurrencyConverter.java b/branches/sca-android/samples/store-distributed/src/main/java/services/CurrencyConverter.java deleted file mode 100644 index e104a0423a..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/java/services/CurrencyConverter.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface CurrencyConverter { - public double getConversion(String fromCurrenycCode, String toCurrencyCode, double amount); - - public String getCurrencySymbol(String currencyCode); -} diff --git a/branches/sca-android/samples/store-distributed/src/main/java/services/CurrencyConverterImpl.java b/branches/sca-android/samples/store-distributed/src/main/java/services/CurrencyConverterImpl.java deleted file mode 100644 index c354aed447..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/java/services/CurrencyConverterImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -public class CurrencyConverterImpl implements CurrencyConverter { - public double getConversion(String fromCurrencyCode, String toCurrencyCode, double amount) { - if (toCurrencyCode.equals("USD")) - return amount; - else if (toCurrencyCode.equals("EUR")) - return ((double)Math.round(amount * 0.7256 * 100)) /100; - return 0; - } - - public String getCurrencySymbol(String currencyCode) { - if (currencyCode.equals("USD")) - return "$"; - else if (currencyCode.equals("EUR")) - return "E"; //"€"; - return "?"; - } -} diff --git a/branches/sca-android/samples/store-distributed/src/main/java/services/FruitsCatalogImpl.java b/branches/sca-android/samples/store-distributed/src/main/java/services/FruitsCatalogImpl.java deleted file mode 100644 index 377b3d7e59..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/java/services/FruitsCatalogImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import java.util.ArrayList; -import java.util.List; - -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; - -public class FruitsCatalogImpl implements Catalog { - - @Property - public String currencyCode = "USD"; - - @Reference - public CurrencyConverter currencyConverter; - - private List catalog = new ArrayList(); - - @Init - public void init() { - String currencySymbol = currencyConverter.getCurrencySymbol(currencyCode); - catalog.add(new Item("Apple", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 2.99))); - catalog.add(new Item("Orange", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 3.55))); - catalog.add(new Item("Pear", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 1.55))); - } - - public Item[] get() { - Item[] catalogArray = new Item[catalog.size()]; - catalog.toArray(catalogArray); - return catalogArray; - } -} diff --git a/branches/sca-android/samples/store-distributed/src/main/java/services/Item.java b/branches/sca-android/samples/store-distributed/src/main/java/services/Item.java deleted file mode 100644 index 27abd4f016..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/java/services/Item.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - - -public class Item { - private String name; - private String price; - - public Item() { - } - - public Item(String name, String price) { - this.name = name; - this.price = price; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPrice() { - return price; - } - - public void setPrice(String price) { - this.price = price; - } - -} diff --git a/branches/sca-android/samples/store-distributed/src/main/java/services/ShoppingCartImpl.java b/branches/sca-android/samples/store-distributed/src/main/java/services/ShoppingCartImpl.java deleted file mode 100644 index 9889921a96..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/java/services/ShoppingCartImpl.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import org.apache.tuscany.sca.data.collection.Entry; -import org.apache.tuscany.sca.data.collection.NotFoundException; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Scope; - -@Scope("COMPOSITE") -public class ShoppingCartImpl implements Cart, Total { - - private Map cart; - - @Init - public void init() { - cart = new HashMap(); - } - - public Entry[] getAll() { - Entry[] entries = new Entry[cart.size()]; - int i = 0; - for (Map.Entry e: cart.entrySet()) { - entries[i++] = new Entry(e.getKey(), e.getValue()); - } - return entries; - } - - public Item get(String key) throws NotFoundException { - Item item = cart.get(key); - if (item == null) { - throw new NotFoundException(key); - } else { - return item; - } - } - - public String post(String key, Item item) { - if (key == null) { - key ="cart-" + UUID.randomUUID().toString(); - } - cart.put(key, item); - return key; - } - - public void put(String key, Item item) throws NotFoundException { - if (!cart.containsKey(key)) { - throw new NotFoundException(key); - } - cart.put(key, item); - } - - public void delete(String key) throws NotFoundException { - if (key == null || key.equals("")) { - cart.clear(); - } else { - Item item = cart.remove(key); - if (item == null) - throw new NotFoundException(key); - } - } - - public Entry[] query(String queryString) { - List> entries = new ArrayList>(); - if (queryString.startsWith("name=")) { - String name = queryString.substring(5); - for (Map.Entry e: cart.entrySet()) { - Item item = e.getValue(); - if (item.getName().equals(name)) { - entries.add(new Entry(e.getKey(), e.getValue())); - } - } - } - return entries.toArray(new Entry[entries.size()]); - } - - public String getTotal() { - double total = 0; - String currencySymbol = ""; - if (!cart.isEmpty()) { - Item item = cart.values().iterator().next(); - currencySymbol = item.getPrice().substring(0, 1); - } - for (Item item : cart.values()) { - total += Double.valueOf(item.getPrice().substring(1)); - } - return currencySymbol + String.valueOf(total); - } -} diff --git a/branches/sca-android/samples/store-distributed/src/main/java/services/Total.java b/branches/sca-android/samples/store-distributed/src/main/java/services/Total.java deleted file mode 100644 index 8f464e526f..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/java/services/Total.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Total { - - String getTotal(); - -} diff --git a/branches/sca-android/samples/store-distributed/src/main/resources/cloud/NodeA.composite b/branches/sca-android/samples/store-distributed/src/main/resources/cloud/NodeA.composite deleted file mode 100644 index f7bfd0fcb6..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/resources/cloud/NodeA.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/store-distributed/src/main/resources/cloud/NodeB.composite b/branches/sca-android/samples/store-distributed/src/main/resources/cloud/NodeB.composite deleted file mode 100644 index 187c5caf1c..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/resources/cloud/NodeB.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/store-distributed/src/main/resources/cloud/NodeC.composite b/branches/sca-android/samples/store-distributed/src/main/resources/cloud/NodeC.composite deleted file mode 100644 index 98113a3576..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/resources/cloud/NodeC.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/store-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml b/branches/sca-android/samples/store-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml deleted file mode 100644 index f165ee0e29..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/store-distributed/src/main/resources/nodeA/store.composite b/branches/sca-android/samples/store-distributed/src/main/resources/nodeA/store.composite deleted file mode 100644 index 2ac608d43f..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/resources/nodeA/store.composite +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - USD - - - - - - - - - - - diff --git a/branches/sca-android/samples/store-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml b/branches/sca-android/samples/store-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml deleted file mode 100644 index 0f8e76ccd7..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/store-distributed/src/main/resources/nodeB/store.composite b/branches/sca-android/samples/store-distributed/src/main/resources/nodeB/store.composite deleted file mode 100644 index 062a7aa2cd..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/resources/nodeB/store.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/store-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml b/branches/sca-android/samples/store-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml deleted file mode 100644 index 15bab17c1a..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-android/samples/store-distributed/src/main/resources/nodeC/store.composite b/branches/sca-android/samples/store-distributed/src/main/resources/nodeC/store.composite deleted file mode 100644 index 5de310128d..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/resources/nodeC/store.composite +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/store-distributed/src/main/resources/nodeC/uiservices/store.html b/branches/sca-android/samples/store-distributed/src/main/resources/nodeC/uiservices/store.html deleted file mode 100644 index 45604463d1..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/resources/nodeC/uiservices/store.html +++ /dev/null @@ -1,162 +0,0 @@ - - - -Store - - - - - - - - -

Store

-
-

Catalog

-
-
-
- -
- -
- -

Your Shopping Cart

-
-
-
-
-
- - - (feed) -
-
- - diff --git a/branches/sca-android/samples/store-distributed/src/main/resources/uiservices/store.html b/branches/sca-android/samples/store-distributed/src/main/resources/uiservices/store.html deleted file mode 100644 index 45604463d1..0000000000 --- a/branches/sca-android/samples/store-distributed/src/main/resources/uiservices/store.html +++ /dev/null @@ -1,162 +0,0 @@ - - - -Store - - - - - - - - -

Store

-
-

Catalog

-
-
-
- -
- -
- -

Your Shopping Cart

-
-
-
-
-
- - - (feed) -
-
- - diff --git a/branches/sca-android/samples/store-distributed/store.png b/branches/sca-android/samples/store-distributed/store.png deleted file mode 100644 index da413edeee..0000000000 Binary files a/branches/sca-android/samples/store-distributed/store.png and /dev/null differ diff --git a/branches/sca-android/samples/store-distributed/store.svg b/branches/sca-android/samples/store-distributed/store.svg deleted file mode 100644 index 74f8ecd36d..0000000000 --- a/branches/sca-android/samples/store-distributed/store.svg +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - store - ufs - - ShoppingCart - - CurrencyConverter - - - - - - - - - - CurrenyCode HTTP JSONRPC Atom - - Catalog - - - - diff --git a/branches/sca-android/samples/store-distributed/workspace.xml b/branches/sca-android/samples/store-distributed/workspace.xml deleted file mode 100644 index d6cb2bfc81..0000000000 --- a/branches/sca-android/samples/store-distributed/workspace.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - diff --git a/branches/sca-android/samples/store/README b/branches/sca-android/samples/store/README deleted file mode 100644 index 46e71bf51e..0000000000 --- a/branches/sca-android/samples/store/README +++ /dev/null @@ -1,28 +0,0 @@ -Store Sample -====================================== - -This is a sample store scenario that is used as a getting started guide -for Tuscany SCA. For detailed information, please see: - -http://tuscany.apache.org/getting-started-with-tuscany.html - -or - -http://tuscany.apache.org/getting-started-with-tuscany-using-tuscany-eclipse-plugin.html - - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built using Ant as follows: - -cd store -ant compile - -and then, to run: - -ant run - -Once the store application is running use your browser to visit the following -URL: - -http://localhost:8080/store/ diff --git a/branches/sca-android/samples/store/build.xml b/branches/sca-android/samples/store/build.xml deleted file mode 100644 index 652afc3570..0000000000 --- a/branches/sca-android/samples/store/build.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/store/pom.xml b/branches/sca-android/samples/store/pom.xml deleted file mode 100644 index ce00e13bb5..0000000000 --- a/branches/sca-android/samples/store/pom.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../pom.xml - - sample-store - Apache Tuscany SCA Getting Started Online Store Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-data-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-widget-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/store/src/main/java/launch/Launch.java b/branches/sca-android/samples/store/src/main/java/launch/Launch.java deleted file mode 100644 index 801697abea..0000000000 --- a/branches/sca-android/samples/store/src/main/java/launch/Launch.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class Launch { - public static void main(String[] args) throws Exception { - System.out.println("Starting ..."); - SCADomain scaDomain = SCADomain.newInstance("store.composite"); - System.out.println("store.composite ready for big business !!!"); - System.in.read(); - System.out.println("Stopping ..."); - scaDomain.close(); - System.out.println(); - } -} diff --git a/branches/sca-android/samples/store/src/main/java/services/Cart.java b/branches/sca-android/samples/store/src/main/java/services/Cart.java deleted file mode 100644 index 9e6226d963..0000000000 --- a/branches/sca-android/samples/store/src/main/java/services/Cart.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.apache.tuscany.sca.data.collection.Collection; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Cart extends Collection { - -} diff --git a/branches/sca-android/samples/store/src/main/java/services/Catalog.java b/branches/sca-android/samples/store/src/main/java/services/Catalog.java deleted file mode 100644 index 2c3b19f579..0000000000 --- a/branches/sca-android/samples/store/src/main/java/services/Catalog.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Catalog { - Item[] get(); -} diff --git a/branches/sca-android/samples/store/src/main/java/services/CurrencyConverter.java b/branches/sca-android/samples/store/src/main/java/services/CurrencyConverter.java deleted file mode 100644 index e104a0423a..0000000000 --- a/branches/sca-android/samples/store/src/main/java/services/CurrencyConverter.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface CurrencyConverter { - public double getConversion(String fromCurrenycCode, String toCurrencyCode, double amount); - - public String getCurrencySymbol(String currencyCode); -} diff --git a/branches/sca-android/samples/store/src/main/java/services/CurrencyConverterImpl.java b/branches/sca-android/samples/store/src/main/java/services/CurrencyConverterImpl.java deleted file mode 100644 index c354aed447..0000000000 --- a/branches/sca-android/samples/store/src/main/java/services/CurrencyConverterImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -public class CurrencyConverterImpl implements CurrencyConverter { - public double getConversion(String fromCurrencyCode, String toCurrencyCode, double amount) { - if (toCurrencyCode.equals("USD")) - return amount; - else if (toCurrencyCode.equals("EUR")) - return ((double)Math.round(amount * 0.7256 * 100)) /100; - return 0; - } - - public String getCurrencySymbol(String currencyCode) { - if (currencyCode.equals("USD")) - return "$"; - else if (currencyCode.equals("EUR")) - return "E"; //"€"; - return "?"; - } -} diff --git a/branches/sca-android/samples/store/src/main/java/services/FruitsCatalogImpl.java b/branches/sca-android/samples/store/src/main/java/services/FruitsCatalogImpl.java deleted file mode 100644 index 377b3d7e59..0000000000 --- a/branches/sca-android/samples/store/src/main/java/services/FruitsCatalogImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import java.util.ArrayList; -import java.util.List; - -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; - -public class FruitsCatalogImpl implements Catalog { - - @Property - public String currencyCode = "USD"; - - @Reference - public CurrencyConverter currencyConverter; - - private List catalog = new ArrayList(); - - @Init - public void init() { - String currencySymbol = currencyConverter.getCurrencySymbol(currencyCode); - catalog.add(new Item("Apple", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 2.99))); - catalog.add(new Item("Orange", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 3.55))); - catalog.add(new Item("Pear", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 1.55))); - } - - public Item[] get() { - Item[] catalogArray = new Item[catalog.size()]; - catalog.toArray(catalogArray); - return catalogArray; - } -} diff --git a/branches/sca-android/samples/store/src/main/java/services/Item.java b/branches/sca-android/samples/store/src/main/java/services/Item.java deleted file mode 100644 index 27abd4f016..0000000000 --- a/branches/sca-android/samples/store/src/main/java/services/Item.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - - -public class Item { - private String name; - private String price; - - public Item() { - } - - public Item(String name, String price) { - this.name = name; - this.price = price; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPrice() { - return price; - } - - public void setPrice(String price) { - this.price = price; - } - -} diff --git a/branches/sca-android/samples/store/src/main/java/services/ShoppingCartImpl.java b/branches/sca-android/samples/store/src/main/java/services/ShoppingCartImpl.java deleted file mode 100644 index 9889921a96..0000000000 --- a/branches/sca-android/samples/store/src/main/java/services/ShoppingCartImpl.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import org.apache.tuscany.sca.data.collection.Entry; -import org.apache.tuscany.sca.data.collection.NotFoundException; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Scope; - -@Scope("COMPOSITE") -public class ShoppingCartImpl implements Cart, Total { - - private Map cart; - - @Init - public void init() { - cart = new HashMap(); - } - - public Entry[] getAll() { - Entry[] entries = new Entry[cart.size()]; - int i = 0; - for (Map.Entry e: cart.entrySet()) { - entries[i++] = new Entry(e.getKey(), e.getValue()); - } - return entries; - } - - public Item get(String key) throws NotFoundException { - Item item = cart.get(key); - if (item == null) { - throw new NotFoundException(key); - } else { - return item; - } - } - - public String post(String key, Item item) { - if (key == null) { - key ="cart-" + UUID.randomUUID().toString(); - } - cart.put(key, item); - return key; - } - - public void put(String key, Item item) throws NotFoundException { - if (!cart.containsKey(key)) { - throw new NotFoundException(key); - } - cart.put(key, item); - } - - public void delete(String key) throws NotFoundException { - if (key == null || key.equals("")) { - cart.clear(); - } else { - Item item = cart.remove(key); - if (item == null) - throw new NotFoundException(key); - } - } - - public Entry[] query(String queryString) { - List> entries = new ArrayList>(); - if (queryString.startsWith("name=")) { - String name = queryString.substring(5); - for (Map.Entry e: cart.entrySet()) { - Item item = e.getValue(); - if (item.getName().equals(name)) { - entries.add(new Entry(e.getKey(), e.getValue())); - } - } - } - return entries.toArray(new Entry[entries.size()]); - } - - public String getTotal() { - double total = 0; - String currencySymbol = ""; - if (!cart.isEmpty()) { - Item item = cart.values().iterator().next(); - currencySymbol = item.getPrice().substring(0, 1); - } - for (Item item : cart.values()) { - total += Double.valueOf(item.getPrice().substring(1)); - } - return currencySymbol + String.valueOf(total); - } -} diff --git a/branches/sca-android/samples/store/src/main/java/services/Total.java b/branches/sca-android/samples/store/src/main/java/services/Total.java deleted file mode 100644 index 8f464e526f..0000000000 --- a/branches/sca-android/samples/store/src/main/java/services/Total.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Total { - - String getTotal(); - -} diff --git a/branches/sca-android/samples/store/src/main/resources/store.composite b/branches/sca-android/samples/store/src/main/resources/store.composite deleted file mode 100644 index 571678839d..0000000000 --- a/branches/sca-android/samples/store/src/main/resources/store.composite +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - USD - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/store/src/main/resources/uiservices/store.html b/branches/sca-android/samples/store/src/main/resources/uiservices/store.html deleted file mode 100644 index 45604463d1..0000000000 --- a/branches/sca-android/samples/store/src/main/resources/uiservices/store.html +++ /dev/null @@ -1,162 +0,0 @@ - - - -Store - - - - - - - - -

Store

-
-

Catalog

-
-
-
- -
- -
- -

Your Shopping Cart

-
-
-
-
-
- - - (feed) -
-
- - diff --git a/branches/sca-android/samples/store/store.png b/branches/sca-android/samples/store/store.png deleted file mode 100644 index da413edeee..0000000000 Binary files a/branches/sca-android/samples/store/store.png and /dev/null differ diff --git a/branches/sca-android/samples/store/store.svg b/branches/sca-android/samples/store/store.svg deleted file mode 100644 index 74f8ecd36d..0000000000 --- a/branches/sca-android/samples/store/store.svg +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - store - ufs - - ShoppingCart - - CurrencyConverter - - - - - - - - - - CurrenyCode HTTP JSONRPC Atom - - Catalog - - - - diff --git a/branches/sca-android/samples/web-resource/README b/branches/sca-android/samples/web-resource/README deleted file mode 100644 index 56bffba6a3..0000000000 --- a/branches/sca-android/samples/web-resource/README +++ /dev/null @@ -1,76 +0,0 @@ -Web Resource Component Sample -====================================== -This sample demonstrates an SCA Web resource component. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-web-resource.jar web.resource.SampleServer - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-web-resource.jar web.resource.SampleServer - -Now the server is started you can point your Web browser to the URL of the Web resource. - -Sample Overview ---------------- -The sample provides a single component exposing a Web resource. - -web-resource/ - src/ - main/ - java/ - web/resource/ - SampleServer.java - starts the SCA Runtime and - deploys the WebResource.composite - resources/ - myContent/ - index.html - a Web HTML resource - WebResource.composite - the SCA assembly for this sample - web-resource.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant using the -following commands - -cd web-resource -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 14-Jan-2008 14:28:07 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:8080/myWeb/* - [java] Sample server started (press enter to shutdown) - [java] - [java] To get the Web resource, point your Web browser to the following add -ress: - [java] http://localhost:8080/myWeb/index.html - [java] - -As this point the Web resource is exposed by a web server started automatically -by the SCA runtime. To stop the server just press enter. - -Building The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built using -Maven as follows. - -cd web-resource -mvn - diff --git a/branches/sca-android/samples/web-resource/build.xml b/branches/sca-android/samples/web-resource/build.xml deleted file mode 100644 index 5f6b6091e7..0000000000 --- a/branches/sca-android/samples/web-resource/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/web-resource/pom.xml b/branches/sca-android/samples/web-resource/pom.xml deleted file mode 100644 index 8c3f8d894c..0000000000 --- a/branches/sca-android/samples/web-resource/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-web-resource - Apache Tuscany SCA Web Resource Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-resource-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/web-resource/src/main/java/web/resource/SampleServer.java b/branches/sca-android/samples/web-resource/src/main/java/web/resource/SampleServer.java deleted file mode 100644 index 9410de08c4..0000000000 --- a/branches/sca-android/samples/web-resource/src/main/java/web/resource/SampleServer.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package web.resource; - -import java.io.IOException; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class SampleServer { - public static void main(String[] args) throws Exception { - - SCADomain scaDomain = SCADomain.newInstance("WebResource.composite"); - - try { - System.out.println("Sample server started (press enter to shutdown)"); - System.out.println(); - System.out.println("To get the Web resource, point your Web browser to the following address:"); - System.out.println("http://localhost:8080/myWeb/index.html"); - System.out.println(); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - - scaDomain.close(); - System.out.println("Sample server stopped"); - } -} diff --git a/branches/sca-android/samples/web-resource/src/main/resources/WebResource.composite b/branches/sca-android/samples/web-resource/src/main/resources/WebResource.composite deleted file mode 100644 index 4536136a8b..0000000000 --- a/branches/sca-android/samples/web-resource/src/main/resources/WebResource.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-android/samples/web-resource/src/main/resources/myContent/index.html b/branches/sca-android/samples/web-resource/src/main/resources/myContent/index.html deleted file mode 100644 index 55de048373..0000000000 --- a/branches/sca-android/samples/web-resource/src/main/resources/myContent/index.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - Tuscany Sample Web Resource - - - -

A Sample Web Resource

- -

Tuscany allows you to publish Web resources using SCA components declared with an - <implementation.resource> component implementation type and made available - to HTTP clients using a <binding.http> binding.

- -

Here is the SCA composite that publishes this page:

- -
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-  targetNamespace="http://web"
-  name="WebResource">
-
-  <component name="myWeb">
-    <implementation.resource location="myContent"/>
-    <service name="Resource">
-      <binding.http/>
-    </service>
-  </component>      
-
-</composite>
-  	
- - - diff --git a/branches/sca-android/samples/web-resource/web-resource.png b/branches/sca-android/samples/web-resource/web-resource.png deleted file mode 100644 index 7259447b65..0000000000 Binary files a/branches/sca-android/samples/web-resource/web-resource.png and /dev/null differ diff --git a/branches/sca-android/samples/web-resource/web-resource.svg b/branches/sca-android/samples/web-resource/web-resource.svg deleted file mode 100644 index 0d1257316c..0000000000 --- a/branches/sca-android/samples/web-resource/web-resource.svg +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - WebResource - - - myWeb - implementation.resource - - File System - ./myContent /index.html - - binding.http - - diff --git a/branches/sca-android/samples/zipcode-jaxws/LICENSE b/branches/sca-android/samples/zipcode-jaxws/LICENSE deleted file mode 100644 index 6e529a25c4..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/samples/zipcode-jaxws/NOTICE b/branches/sca-android/samples/zipcode-jaxws/NOTICE deleted file mode 100644 index 1325efd8bf..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/samples/zipcode-jaxws/README b/branches/sca-android/samples/zipcode-jaxws/README deleted file mode 100644 index 12f81543f0..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/README +++ /dev/null @@ -1,72 +0,0 @@ -ZipCode JAX-WS Sample -====================================== -This sample demonstrates how to access an existing web service using JAX-WS/JAXB generated java interfaces/classes. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-zipcode-jaxws.jar zipcode.ZipCodeClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-zipcode-jaxws.jar zipcode.ZipCodeClient - - -Sample Overview ---------------- -The sample provides a single component exposing a Web resource. - -zipcode-jaxws/ - src/ - main/ - java/ - - resources/ - ZipCode.composite - the SCA assembly for this sample - zipcode-jaxws.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant using the -following commands - -cd zipcode-jaxws -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 14-Jan-2008 14:28:07 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:8080/myWeb/* - [java] Sample server started (press enter to shutdown) - [java] - [java] To get the Web resource, point your Web browser to the following add -ress: - [java] http://localhost:8080/myWeb/index.html - [java] - -As this point the Web resource is exposed by a web server started automatically -by the SCA runtime. To stop the server just press enter. - -Building The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built using -Maven as follows. - -cd zipcode-jaxws -mvn - diff --git a/branches/sca-android/samples/zipcode-jaxws/build.xml b/branches/sca-android/samples/zipcode-jaxws/build.xml deleted file mode 100644 index 85caf5954e..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/build.xml +++ /dev/null @@ -1,68 +0,0 @@ - - -]> - - - &buildDependency; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/zipcode-jaxws/pom.xml b/branches/sca-android/samples/zipcode-jaxws/pom.xml deleted file mode 100644 index eace7b1bfe..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/pom.xml +++ /dev/null @@ -1,245 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-zipcode-jaxws - jar - Apache Tuscany SCA US Zip Code JAX-WS Sample - Apache Tuscany SCA US Zip Code JAX-WS Sample - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - - java.net - java.net Maven 1.x Repository - http://download.java.net/maven/1 - legacy - - - java.net2 - java.net Maven 2.x Repository - http://download.java.net/maven/2 - - - - - - java.net2 - java.net Maven 2.x Repository - http://download.java.net/maven/2 - - - - - - ${artifactId} - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.1 - - - - install-wsdl - validate - - run - - - - - - - - - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - location.LocationClient - true - - - generate - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - -Djava.endorsed.dirs=target/endorsed - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy - generate-sources - - copy - - - - - javax.xml.ws - jaxws-api - 2.1 - jar - - - javax.xml.bind - jaxb-api - 2.1 - jar - - - ${project.build.directory}/endorsed - false - true - - - - - - - - - - diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCode.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCode.java deleted file mode 100644 index 8c9a48bf40..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCode.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.uszip; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="USAreaCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "usAreaCode" -}) -@XmlRootElement(name = "GetInfoByAreaCode") -public class GetInfoByAreaCode { - - @XmlElement(name = "USAreaCode") - protected String usAreaCode; - - /** - * Gets the value of the usAreaCode property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getUSAreaCode() { - return usAreaCode; - } - - /** - * Sets the value of the usAreaCode property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setUSAreaCode(String value) { - this.usAreaCode = value; - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCodeResponse.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCodeResponse.java deleted file mode 100644 index 93847c8809..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCodeResponse.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.uszip; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="GetInfoByAreaCodeResult" minOccurs="0">
- *           <complexType>
- *             <complexContent>
- *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *                 <sequence>
- *                   <any/>
- *                 </sequence>
- *               </restriction>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "getInfoByAreaCodeResult" -}) -@XmlRootElement(name = "GetInfoByAreaCodeResponse") -public class GetInfoByAreaCodeResponse { - - @XmlElement(name = "GetInfoByAreaCodeResult") - protected GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult getInfoByAreaCodeResult; - - /** - * Gets the value of the getInfoByAreaCodeResult property. - * - * @return - * possible object is - * {@link GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult } - * - */ - public GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult getGetInfoByAreaCodeResult() { - return getInfoByAreaCodeResult; - } - - /** - * Sets the value of the getInfoByAreaCodeResult property. - * - * @param value - * allowed object is - * {@link GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult } - * - */ - public void setGetInfoByAreaCodeResult(GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult value) { - this.getInfoByAreaCodeResult = value; - } - - - /** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

-     * <complexType>
-     *   <complexContent>
-     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
-     *       <sequence>
-     *         <any/>
-     *       </sequence>
-     *     </restriction>
-     *   </complexContent>
-     * </complexType>
-     * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "content" - }) - public static class GetInfoByAreaCodeResult { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List content; - - /** - * Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the content property. - * - *

- * For example, to add a new item, do as follows: - *

-         *    getContent().add(newItem);
-         * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link String } - * {@link Object } - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCity.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCity.java deleted file mode 100644 index cf9276d417..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCity.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.uszip; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="USCity" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "usCity" -}) -@XmlRootElement(name = "GetInfoByCity") -public class GetInfoByCity { - - @XmlElement(name = "USCity") - protected String usCity; - - /** - * Gets the value of the usCity property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getUSCity() { - return usCity; - } - - /** - * Sets the value of the usCity property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setUSCity(String value) { - this.usCity = value; - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCityResponse.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCityResponse.java deleted file mode 100644 index 9dc0e41b2b..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCityResponse.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.uszip; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="GetInfoByCityResult" minOccurs="0">
- *           <complexType>
- *             <complexContent>
- *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *                 <sequence>
- *                   <any/>
- *                 </sequence>
- *               </restriction>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "getInfoByCityResult" -}) -@XmlRootElement(name = "GetInfoByCityResponse") -public class GetInfoByCityResponse { - - @XmlElement(name = "GetInfoByCityResult") - protected GetInfoByCityResponse.GetInfoByCityResult getInfoByCityResult; - - /** - * Gets the value of the getInfoByCityResult property. - * - * @return - * possible object is - * {@link GetInfoByCityResponse.GetInfoByCityResult } - * - */ - public GetInfoByCityResponse.GetInfoByCityResult getGetInfoByCityResult() { - return getInfoByCityResult; - } - - /** - * Sets the value of the getInfoByCityResult property. - * - * @param value - * allowed object is - * {@link GetInfoByCityResponse.GetInfoByCityResult } - * - */ - public void setGetInfoByCityResult(GetInfoByCityResponse.GetInfoByCityResult value) { - this.getInfoByCityResult = value; - } - - - /** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

-     * <complexType>
-     *   <complexContent>
-     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
-     *       <sequence>
-     *         <any/>
-     *       </sequence>
-     *     </restriction>
-     *   </complexContent>
-     * </complexType>
-     * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "content" - }) - public static class GetInfoByCityResult { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List content; - - /** - * Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the content property. - * - *

- * For example, to add a new item, do as follows: - *

-         *    getContent().add(newItem);
-         * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link String } - * {@link Object } - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByState.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByState.java deleted file mode 100644 index 48be94b14a..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByState.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.uszip; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="USState" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "usState" -}) -@XmlRootElement(name = "GetInfoByState") -public class GetInfoByState { - - @XmlElement(name = "USState") - protected String usState; - - /** - * Gets the value of the usState property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getUSState() { - return usState; - } - - /** - * Sets the value of the usState property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setUSState(String value) { - this.usState = value; - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByStateResponse.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByStateResponse.java deleted file mode 100644 index 1645e11ca2..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByStateResponse.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.uszip; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="GetInfoByStateResult" minOccurs="0">
- *           <complexType>
- *             <complexContent>
- *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *                 <sequence>
- *                   <any/>
- *                 </sequence>
- *               </restriction>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "getInfoByStateResult" -}) -@XmlRootElement(name = "GetInfoByStateResponse") -public class GetInfoByStateResponse { - - @XmlElement(name = "GetInfoByStateResult") - protected GetInfoByStateResponse.GetInfoByStateResult getInfoByStateResult; - - /** - * Gets the value of the getInfoByStateResult property. - * - * @return - * possible object is - * {@link GetInfoByStateResponse.GetInfoByStateResult } - * - */ - public GetInfoByStateResponse.GetInfoByStateResult getGetInfoByStateResult() { - return getInfoByStateResult; - } - - /** - * Sets the value of the getInfoByStateResult property. - * - * @param value - * allowed object is - * {@link GetInfoByStateResponse.GetInfoByStateResult } - * - */ - public void setGetInfoByStateResult(GetInfoByStateResponse.GetInfoByStateResult value) { - this.getInfoByStateResult = value; - } - - - /** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

-     * <complexType>
-     *   <complexContent>
-     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
-     *       <sequence>
-     *         <any/>
-     *       </sequence>
-     *     </restriction>
-     *   </complexContent>
-     * </complexType>
-     * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "content" - }) - public static class GetInfoByStateResult { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List content; - - /** - * Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the content property. - * - *

- * For example, to add a new item, do as follows: - *

-         *    getContent().add(newItem);
-         * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link String } - * {@link Object } - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIP.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIP.java deleted file mode 100644 index 45c948b4b4..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIP.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.uszip; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="USZip" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "usZip" -}) -@XmlRootElement(name = "GetInfoByZIP") -public class GetInfoByZIP { - - @XmlElement(name = "USZip") - protected String usZip; - - /** - * Gets the value of the usZip property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getUSZip() { - return usZip; - } - - /** - * Sets the value of the usZip property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setUSZip(String value) { - this.usZip = value; - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIPResponse.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIPResponse.java deleted file mode 100644 index 9e78dc6d0a..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIPResponse.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.uszip; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="GetInfoByZIPResult" minOccurs="0">
- *           <complexType>
- *             <complexContent>
- *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *                 <sequence>
- *                   <any/>
- *                 </sequence>
- *               </restriction>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "getInfoByZIPResult" -}) -@XmlRootElement(name = "GetInfoByZIPResponse") -public class GetInfoByZIPResponse { - - @XmlElement(name = "GetInfoByZIPResult") - protected GetInfoByZIPResponse.GetInfoByZIPResult getInfoByZIPResult; - - /** - * Gets the value of the getInfoByZIPResult property. - * - * @return - * possible object is - * {@link GetInfoByZIPResponse.GetInfoByZIPResult } - * - */ - public GetInfoByZIPResponse.GetInfoByZIPResult getGetInfoByZIPResult() { - return getInfoByZIPResult; - } - - /** - * Sets the value of the getInfoByZIPResult property. - * - * @param value - * allowed object is - * {@link GetInfoByZIPResponse.GetInfoByZIPResult } - * - */ - public void setGetInfoByZIPResult(GetInfoByZIPResponse.GetInfoByZIPResult value) { - this.getInfoByZIPResult = value; - } - - - /** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

-     * <complexType>
-     *   <complexContent>
-     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
-     *       <sequence>
-     *         <any/>
-     *       </sequence>
-     *     </restriction>
-     *   </complexContent>
-     * </complexType>
-     * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "content" - }) - public static class GetInfoByZIPResult { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List content; - - /** - * Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the content property. - * - *

- * For example, to add a new item, do as follows: - *

-         *    getContent().add(newItem);
-         * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link String } - * {@link Object } - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/ObjectFactory.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/ObjectFactory.java deleted file mode 100644 index ced83ff09a..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/ObjectFactory.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.uszip; - -import javax.xml.bind.annotation.XmlRegistry; - - -/** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the com.example.uszip package. - *

An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.example.uszip - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link GetInfoByCity } - * - */ - public GetInfoByCity createGetInfoByCity() { - return new GetInfoByCity(); - } - - /** - * Create an instance of {@link GetInfoByState } - * - */ - public GetInfoByState createGetInfoByState() { - return new GetInfoByState(); - } - - /** - * Create an instance of {@link GetInfoByZIPResponse.GetInfoByZIPResult } - * - */ - public GetInfoByZIPResponse.GetInfoByZIPResult createGetInfoByZIPResponseGetInfoByZIPResult() { - return new GetInfoByZIPResponse.GetInfoByZIPResult(); - } - - /** - * Create an instance of {@link GetInfoByStateResponse.GetInfoByStateResult } - * - */ - public GetInfoByStateResponse.GetInfoByStateResult createGetInfoByStateResponseGetInfoByStateResult() { - return new GetInfoByStateResponse.GetInfoByStateResult(); - } - - /** - * Create an instance of {@link GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult } - * - */ - public GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult createGetInfoByAreaCodeResponseGetInfoByAreaCodeResult() { - return new GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult(); - } - - /** - * Create an instance of {@link GetInfoByZIP } - * - */ - public GetInfoByZIP createGetInfoByZIP() { - return new GetInfoByZIP(); - } - - /** - * Create an instance of {@link GetInfoByAreaCodeResponse } - * - */ - public GetInfoByAreaCodeResponse createGetInfoByAreaCodeResponse() { - return new GetInfoByAreaCodeResponse(); - } - - /** - * Create an instance of {@link GetInfoByCityResponse } - * - */ - public GetInfoByCityResponse createGetInfoByCityResponse() { - return new GetInfoByCityResponse(); - } - - /** - * Create an instance of {@link GetInfoByStateResponse } - * - */ - public GetInfoByStateResponse createGetInfoByStateResponse() { - return new GetInfoByStateResponse(); - } - - /** - * Create an instance of {@link GetInfoByCityResponse.GetInfoByCityResult } - * - */ - public GetInfoByCityResponse.GetInfoByCityResult createGetInfoByCityResponseGetInfoByCityResult() { - return new GetInfoByCityResponse.GetInfoByCityResult(); - } - - /** - * Create an instance of {@link GetInfoByZIPResponse } - * - */ - public GetInfoByZIPResponse createGetInfoByZIPResponse() { - return new GetInfoByZIPResponse(); - } - - /** - * Create an instance of {@link GetInfoByAreaCode } - * - */ - public GetInfoByAreaCode createGetInfoByAreaCode() { - return new GetInfoByAreaCode(); - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZip.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZip.java deleted file mode 100644 index 22493ba9b8..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZip.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.uszip; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.logging.Logger; - -import javax.xml.namespace.QName; -import javax.xml.ws.Service; -import javax.xml.ws.WebEndpoint; -import javax.xml.ws.WebServiceClient; -import javax.xml.ws.WebServiceFeature; - - -/** - * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.1.3-b02- - * Generated source version: 2.1 - * - */ -@WebServiceClient(name = "USZip", targetNamespace = "http://www.webserviceX.NET", wsdlLocation = "file:/C:/Tuscany/java/sca/demos/us-location/src/main/resources/wsdl/uszip.wsdl") -public class USZip - extends Service -{ - - private final static URL USZIP_WSDL_LOCATION; - private final static Logger logger = Logger.getLogger(com.example.uszip.USZip.class.getName()); - - static { - URL url = null; - try { - URL baseUrl; - baseUrl = com.example.uszip.USZip.class.getResource("."); - url = new URL(baseUrl, "file:/C:/Tuscany/java/sca/demos/us-location/src/main/resources/wsdl/uszip.wsdl"); - } catch (MalformedURLException e) { - logger.warning("Failed to create URL for the wsdl Location: 'file:/C:/Tuscany/java/sca/demos/us-location/src/main/resources/wsdl/uszip.wsdl', retrying as a local file"); - logger.warning(e.getMessage()); - } - USZIP_WSDL_LOCATION = url; - } - - public USZip(URL wsdlLocation, QName serviceName) { - super(wsdlLocation, serviceName); - } - - public USZip() { - super(USZIP_WSDL_LOCATION, new QName("http://www.webserviceX.NET", "USZip")); - } - - /** - * - * @return - * returns USZipSoap - */ - @WebEndpoint(name = "USZipSoap") - public USZipSoap getUSZipSoap() { - return super.getPort(new QName("http://www.webserviceX.NET", "USZipSoap"), USZipSoap.class); - } - - /** - * - * @param features - * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values. - * @return - * returns USZipSoap - */ - @WebEndpoint(name = "USZipSoap") - public USZipSoap getUSZipSoap(WebServiceFeature... features) { - return super.getPort(new QName("http://www.webserviceX.NET", "USZipSoap"), USZipSoap.class, features); - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZipSoap.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZipSoap.java deleted file mode 100644 index 5ac370005f..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZipSoap.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.uszip; - -import javax.jws.WebMethod; -import javax.jws.WebParam; -import javax.jws.WebResult; -import javax.jws.WebService; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.ws.RequestWrapper; -import javax.xml.ws.ResponseWrapper; - - -/** - * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.1.3-b02- - * Generated source version: 2.1 - * - */ -@WebService(name = "USZipSoap", targetNamespace = "http://www.webserviceX.NET") -@XmlSeeAlso({ - ObjectFactory.class -}) -public interface USZipSoap { - - - /** - * Get State Code,City,Area Code,Time Zone,Zip Code by Zip Code - * - * @param usZip - * @return - * returns com.example.uszip.GetInfoByZIPResponse.GetInfoByZIPResult - */ - @WebMethod(operationName = "GetInfoByZIP", action = "http://www.webserviceX.NET/GetInfoByZIP") - @WebResult(name = "GetInfoByZIPResult", targetNamespace = "http://www.webserviceX.NET") - @RequestWrapper(localName = "GetInfoByZIP", targetNamespace = "http://www.webserviceX.NET", className = "com.example.uszip.GetInfoByZIP") - @ResponseWrapper(localName = "GetInfoByZIPResponse", targetNamespace = "http://www.webserviceX.NET", className = "com.example.uszip.GetInfoByZIPResponse") - public com.example.uszip.GetInfoByZIPResponse.GetInfoByZIPResult getInfoByZIP( - @WebParam(name = "USZip", targetNamespace = "http://www.webserviceX.NET") - String usZip); - - /** - * Get State Code,City,Area Code,Time Zone,Zip Code by City - * - * @param usCity - * @return - * returns com.example.uszip.GetInfoByCityResponse.GetInfoByCityResult - */ - @WebMethod(operationName = "GetInfoByCity", action = "http://www.webserviceX.NET/GetInfoByCity") - @WebResult(name = "GetInfoByCityResult", targetNamespace = "http://www.webserviceX.NET") - @RequestWrapper(localName = "GetInfoByCity", targetNamespace = "http://www.webserviceX.NET", className = "com.example.uszip.GetInfoByCity") - @ResponseWrapper(localName = "GetInfoByCityResponse", targetNamespace = "http://www.webserviceX.NET", className = "com.example.uszip.GetInfoByCityResponse") - public com.example.uszip.GetInfoByCityResponse.GetInfoByCityResult getInfoByCity( - @WebParam(name = "USCity", targetNamespace = "http://www.webserviceX.NET") - String usCity); - - /** - * Get State Code,City,Area Code,Time Zone,Zip Code by state - * - * @param usState - * @return - * returns com.example.uszip.GetInfoByStateResponse.GetInfoByStateResult - */ - @WebMethod(operationName = "GetInfoByState", action = "http://www.webserviceX.NET/GetInfoByState") - @WebResult(name = "GetInfoByStateResult", targetNamespace = "http://www.webserviceX.NET") - @RequestWrapper(localName = "GetInfoByState", targetNamespace = "http://www.webserviceX.NET", className = "com.example.uszip.GetInfoByState") - @ResponseWrapper(localName = "GetInfoByStateResponse", targetNamespace = "http://www.webserviceX.NET", className = "com.example.uszip.GetInfoByStateResponse") - public com.example.uszip.GetInfoByStateResponse.GetInfoByStateResult getInfoByState( - @WebParam(name = "USState", targetNamespace = "http://www.webserviceX.NET") - String usState); - - /** - * Get State Code,City,Area Code,Time Zone,Zip Code by Area Code - * - * @param usAreaCode - * @return - * returns com.example.uszip.GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult - */ - @WebMethod(operationName = "GetInfoByAreaCode", action = "http://www.webserviceX.NET/GetInfoByAreaCode") - @WebResult(name = "GetInfoByAreaCodeResult", targetNamespace = "http://www.webserviceX.NET") - @RequestWrapper(localName = "GetInfoByAreaCode", targetNamespace = "http://www.webserviceX.NET", className = "com.example.uszip.GetInfoByAreaCode") - @ResponseWrapper(localName = "GetInfoByAreaCodeResponse", targetNamespace = "http://www.webserviceX.NET", className = "com.example.uszip.GetInfoByAreaCodeResponse") - public com.example.uszip.GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult getInfoByAreaCode( - @WebParam(name = "USAreaCode", targetNamespace = "http://www.webserviceX.NET") - String usAreaCode); - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/package-info.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/package-info.java deleted file mode 100644 index d120f34ee5..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/uszip/package-info.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.webserviceX.NET", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) -package com.example.uszip; diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/ArrayOfWeatherData.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/ArrayOfWeatherData.java deleted file mode 100644 index 5385fb57be..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/ArrayOfWeatherData.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.weather; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for ArrayOfWeatherData complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="ArrayOfWeatherData">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="WeatherData" type="{http://www.webservicex.net}WeatherData" maxOccurs="unbounded" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ArrayOfWeatherData", propOrder = { - "weatherData" -}) -public class ArrayOfWeatherData { - - @XmlElement(name = "WeatherData") - protected List weatherData; - - /** - * Gets the value of the weatherData property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the weatherData property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getWeatherData().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link WeatherData } - * - * - */ - public List getWeatherData() { - if (weatherData == null) { - weatherData = new ArrayList(); - } - return this.weatherData; - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceName.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceName.java deleted file mode 100644 index 9eb205e75d..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceName.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.weather; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="PlaceName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "placeName" -}) -@XmlRootElement(name = "GetWeatherByPlaceName") -public class GetWeatherByPlaceName { - - @XmlElement(name = "PlaceName") - protected String placeName; - - /** - * Gets the value of the placeName property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getPlaceName() { - return placeName; - } - - /** - * Sets the value of the placeName property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setPlaceName(String value) { - this.placeName = value; - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceNameResponse.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceNameResponse.java deleted file mode 100644 index e281509623..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceNameResponse.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.weather; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="GetWeatherByPlaceNameResult" type="{http://www.webservicex.net}WeatherForecasts"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "getWeatherByPlaceNameResult" -}) -@XmlRootElement(name = "GetWeatherByPlaceNameResponse") -public class GetWeatherByPlaceNameResponse { - - @XmlElement(name = "GetWeatherByPlaceNameResult", required = true) - protected WeatherForecasts getWeatherByPlaceNameResult; - - /** - * Gets the value of the getWeatherByPlaceNameResult property. - * - * @return - * possible object is - * {@link WeatherForecasts } - * - */ - public WeatherForecasts getGetWeatherByPlaceNameResult() { - return getWeatherByPlaceNameResult; - } - - /** - * Sets the value of the getWeatherByPlaceNameResult property. - * - * @param value - * allowed object is - * {@link WeatherForecasts } - * - */ - public void setGetWeatherByPlaceNameResult(WeatherForecasts value) { - this.getWeatherByPlaceNameResult = value; - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCode.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCode.java deleted file mode 100644 index 08d4a70364..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCode.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.weather; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="ZipCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "zipCode" -}) -@XmlRootElement(name = "GetWeatherByZipCode") -public class GetWeatherByZipCode { - - @XmlElement(name = "ZipCode") - protected String zipCode; - - /** - * Gets the value of the zipCode property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getZipCode() { - return zipCode; - } - - /** - * Sets the value of the zipCode property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setZipCode(String value) { - this.zipCode = value; - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCodeResponse.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCodeResponse.java deleted file mode 100644 index 9288f5332e..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCodeResponse.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.weather; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="GetWeatherByZipCodeResult" type="{http://www.webservicex.net}WeatherForecasts"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "getWeatherByZipCodeResult" -}) -@XmlRootElement(name = "GetWeatherByZipCodeResponse") -public class GetWeatherByZipCodeResponse { - - @XmlElement(name = "GetWeatherByZipCodeResult", required = true) - protected WeatherForecasts getWeatherByZipCodeResult; - - /** - * Gets the value of the getWeatherByZipCodeResult property. - * - * @return - * possible object is - * {@link WeatherForecasts } - * - */ - public WeatherForecasts getGetWeatherByZipCodeResult() { - return getWeatherByZipCodeResult; - } - - /** - * Sets the value of the getWeatherByZipCodeResult property. - * - * @param value - * allowed object is - * {@link WeatherForecasts } - * - */ - public void setGetWeatherByZipCodeResult(WeatherForecasts value) { - this.getWeatherByZipCodeResult = value; - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/ObjectFactory.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/ObjectFactory.java deleted file mode 100644 index 0c4fdbcde1..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/ObjectFactory.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.weather; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlElementDecl; -import javax.xml.bind.annotation.XmlRegistry; -import javax.xml.namespace.QName; - - -/** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the com.example.weather package. - *

An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - private final static QName _WeatherForecasts_QNAME = new QName("http://www.webservicex.net", "WeatherForecasts"); - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.example.weather - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link WeatherData } - * - */ - public WeatherData createWeatherData() { - return new WeatherData(); - } - - /** - * Create an instance of {@link GetWeatherByPlaceName } - * - */ - public GetWeatherByPlaceName createGetWeatherByPlaceName() { - return new GetWeatherByPlaceName(); - } - - /** - * Create an instance of {@link GetWeatherByPlaceNameResponse } - * - */ - public GetWeatherByPlaceNameResponse createGetWeatherByPlaceNameResponse() { - return new GetWeatherByPlaceNameResponse(); - } - - /** - * Create an instance of {@link GetWeatherByZipCodeResponse } - * - */ - public GetWeatherByZipCodeResponse createGetWeatherByZipCodeResponse() { - return new GetWeatherByZipCodeResponse(); - } - - /** - * Create an instance of {@link GetWeatherByZipCode } - * - */ - public GetWeatherByZipCode createGetWeatherByZipCode() { - return new GetWeatherByZipCode(); - } - - /** - * Create an instance of {@link WeatherForecasts } - * - */ - public WeatherForecasts createWeatherForecasts() { - return new WeatherForecasts(); - } - - /** - * Create an instance of {@link ArrayOfWeatherData } - * - */ - public ArrayOfWeatherData createArrayOfWeatherData() { - return new ArrayOfWeatherData(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link WeatherForecasts }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.webservicex.net", name = "WeatherForecasts") - public JAXBElement createWeatherForecasts(WeatherForecasts value) { - return new JAXBElement(_WeatherForecasts_QNAME, WeatherForecasts.class, null, value); - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherData.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherData.java deleted file mode 100644 index a4ca6190b5..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherData.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.weather; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for WeatherData complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="WeatherData">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Day" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *         <element name="WeatherImage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *         <element name="MaxTemperatureF" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *         <element name="MinTemperatureF" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *         <element name="MaxTemperatureC" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *         <element name="MinTemperatureC" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "WeatherData", propOrder = { - "day", - "weatherImage", - "maxTemperatureF", - "minTemperatureF", - "maxTemperatureC", - "minTemperatureC" -}) -public class WeatherData { - - @XmlElement(name = "Day") - protected String day; - @XmlElement(name = "WeatherImage") - protected String weatherImage; - @XmlElement(name = "MaxTemperatureF") - protected String maxTemperatureF; - @XmlElement(name = "MinTemperatureF") - protected String minTemperatureF; - @XmlElement(name = "MaxTemperatureC") - protected String maxTemperatureC; - @XmlElement(name = "MinTemperatureC") - protected String minTemperatureC; - - /** - * Gets the value of the day property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDay() { - return day; - } - - /** - * Sets the value of the day property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDay(String value) { - this.day = value; - } - - /** - * Gets the value of the weatherImage property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getWeatherImage() { - return weatherImage; - } - - /** - * Sets the value of the weatherImage property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setWeatherImage(String value) { - this.weatherImage = value; - } - - /** - * Gets the value of the maxTemperatureF property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getMaxTemperatureF() { - return maxTemperatureF; - } - - /** - * Sets the value of the maxTemperatureF property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setMaxTemperatureF(String value) { - this.maxTemperatureF = value; - } - - /** - * Gets the value of the minTemperatureF property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getMinTemperatureF() { - return minTemperatureF; - } - - /** - * Sets the value of the minTemperatureF property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setMinTemperatureF(String value) { - this.minTemperatureF = value; - } - - /** - * Gets the value of the maxTemperatureC property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getMaxTemperatureC() { - return maxTemperatureC; - } - - /** - * Sets the value of the maxTemperatureC property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setMaxTemperatureC(String value) { - this.maxTemperatureC = value; - } - - /** - * Gets the value of the minTemperatureC property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getMinTemperatureC() { - return minTemperatureC; - } - - /** - * Sets the value of the minTemperatureC property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setMinTemperatureC(String value) { - this.minTemperatureC = value; - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecast.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecast.java deleted file mode 100644 index 0902ce67fe..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecast.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.weather; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.logging.Logger; - -import javax.xml.namespace.QName; -import javax.xml.ws.Service; -import javax.xml.ws.WebEndpoint; -import javax.xml.ws.WebServiceClient; -import javax.xml.ws.WebServiceFeature; - - -/** - * Get one week weather forecast for valid zip code or Place name in USA - * - * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.1.3-b02- - * Generated source version: 2.1 - * - */ -@WebServiceClient(name = "WeatherForecast", targetNamespace = "http://www.webservicex.net", wsdlLocation = "file:/C:/Tuscany/java/sca/demos/us-location/src/main/resources/wsdl/WeatherForecast.wsdl") -public class WeatherForecast - extends Service -{ - - private final static URL WEATHERFORECAST_WSDL_LOCATION; - private final static Logger logger = Logger.getLogger(com.example.weather.WeatherForecast.class.getName()); - - static { - URL url = null; - try { - URL baseUrl; - baseUrl = com.example.weather.WeatherForecast.class.getResource("."); - url = new URL(baseUrl, "file:/C:/Tuscany/java/sca/demos/us-location/src/main/resources/wsdl/WeatherForecast.wsdl"); - } catch (MalformedURLException e) { - logger.warning("Failed to create URL for the wsdl Location: 'file:/C:/Tuscany/java/sca/demos/us-location/src/main/resources/wsdl/WeatherForecast.wsdl', retrying as a local file"); - logger.warning(e.getMessage()); - } - WEATHERFORECAST_WSDL_LOCATION = url; - } - - public WeatherForecast(URL wsdlLocation, QName serviceName) { - super(wsdlLocation, serviceName); - } - - public WeatherForecast() { - super(WEATHERFORECAST_WSDL_LOCATION, new QName("http://www.webservicex.net", "WeatherForecast")); - } - - /** - * - * @return - * returns WeatherForecastSoap - */ - @WebEndpoint(name = "WeatherForecastSoap") - public WeatherForecastSoap getWeatherForecastSoap() { - return super.getPort(new QName("http://www.webservicex.net", "WeatherForecastSoap"), WeatherForecastSoap.class); - } - - /** - * - * @param features - * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values. - * @return - * returns WeatherForecastSoap - */ - @WebEndpoint(name = "WeatherForecastSoap") - public WeatherForecastSoap getWeatherForecastSoap(WebServiceFeature... features) { - return super.getPort(new QName("http://www.webservicex.net", "WeatherForecastSoap"), WeatherForecastSoap.class, features); - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecastSoap.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecastSoap.java deleted file mode 100644 index aa000a44d2..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecastSoap.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.weather; - -import javax.jws.WebMethod; -import javax.jws.WebParam; -import javax.jws.WebResult; -import javax.jws.WebService; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.ws.RequestWrapper; -import javax.xml.ws.ResponseWrapper; - - -/** - * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.1.3-b02- - * Generated source version: 2.1 - * - */ -@WebService(name = "WeatherForecastSoap", targetNamespace = "http://www.webservicex.net") -@XmlSeeAlso({ - ObjectFactory.class -}) -public interface WeatherForecastSoap { - - - /** - * Get one week weather forecast for a valid Zip Code(USA) - * - * @param zipCode - * @return - * returns com.example.weather.WeatherForecasts - */ - @WebMethod(operationName = "GetWeatherByZipCode", action = "http://www.webservicex.net/GetWeatherByZipCode") - @WebResult(name = "GetWeatherByZipCodeResult", targetNamespace = "http://www.webservicex.net") - @RequestWrapper(localName = "GetWeatherByZipCode", targetNamespace = "http://www.webservicex.net", className = "com.example.weather.GetWeatherByZipCode") - @ResponseWrapper(localName = "GetWeatherByZipCodeResponse", targetNamespace = "http://www.webservicex.net", className = "com.example.weather.GetWeatherByZipCodeResponse") - public WeatherForecasts getWeatherByZipCode( - @WebParam(name = "ZipCode", targetNamespace = "http://www.webservicex.net") - String zipCode); - - /** - * Get one week weather forecast for a place name(USA) - * - * @param placeName - * @return - * returns com.example.weather.WeatherForecasts - */ - @WebMethod(operationName = "GetWeatherByPlaceName", action = "http://www.webservicex.net/GetWeatherByPlaceName") - @WebResult(name = "GetWeatherByPlaceNameResult", targetNamespace = "http://www.webservicex.net") - @RequestWrapper(localName = "GetWeatherByPlaceName", targetNamespace = "http://www.webservicex.net", className = "com.example.weather.GetWeatherByPlaceName") - @ResponseWrapper(localName = "GetWeatherByPlaceNameResponse", targetNamespace = "http://www.webservicex.net", className = "com.example.weather.GetWeatherByPlaceNameResponse") - public WeatherForecasts getWeatherByPlaceName( - @WebParam(name = "PlaceName", targetNamespace = "http://www.webservicex.net") - String placeName); - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecasts.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecasts.java deleted file mode 100644 index 8ded0946d9..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecasts.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package com.example.weather; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for WeatherForecasts complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="WeatherForecasts">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Latitude" type="{http://www.w3.org/2001/XMLSchema}float"/>
- *         <element name="Longitude" type="{http://www.w3.org/2001/XMLSchema}float"/>
- *         <element name="AllocationFactor" type="{http://www.w3.org/2001/XMLSchema}float"/>
- *         <element name="FipsCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *         <element name="PlaceName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *         <element name="StateCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *         <element name="Status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *         <element name="Details" type="{http://www.webservicex.net}ArrayOfWeatherData" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "WeatherForecasts", propOrder = { - "latitude", - "longitude", - "allocationFactor", - "fipsCode", - "placeName", - "stateCode", - "status", - "details" -}) -public class WeatherForecasts { - - @XmlElement(name = "Latitude") - protected float latitude; - @XmlElement(name = "Longitude") - protected float longitude; - @XmlElement(name = "AllocationFactor") - protected float allocationFactor; - @XmlElement(name = "FipsCode") - protected String fipsCode; - @XmlElement(name = "PlaceName") - protected String placeName; - @XmlElement(name = "StateCode") - protected String stateCode; - @XmlElement(name = "Status") - protected String status; - @XmlElement(name = "Details") - protected ArrayOfWeatherData details; - - /** - * Gets the value of the latitude property. - * - */ - public float getLatitude() { - return latitude; - } - - /** - * Sets the value of the latitude property. - * - */ - public void setLatitude(float value) { - this.latitude = value; - } - - /** - * Gets the value of the longitude property. - * - */ - public float getLongitude() { - return longitude; - } - - /** - * Sets the value of the longitude property. - * - */ - public void setLongitude(float value) { - this.longitude = value; - } - - /** - * Gets the value of the allocationFactor property. - * - */ - public float getAllocationFactor() { - return allocationFactor; - } - - /** - * Sets the value of the allocationFactor property. - * - */ - public void setAllocationFactor(float value) { - this.allocationFactor = value; - } - - /** - * Gets the value of the fipsCode property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFipsCode() { - return fipsCode; - } - - /** - * Sets the value of the fipsCode property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFipsCode(String value) { - this.fipsCode = value; - } - - /** - * Gets the value of the placeName property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getPlaceName() { - return placeName; - } - - /** - * Sets the value of the placeName property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setPlaceName(String value) { - this.placeName = value; - } - - /** - * Gets the value of the stateCode property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getStateCode() { - return stateCode; - } - - /** - * Sets the value of the stateCode property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setStateCode(String value) { - this.stateCode = value; - } - - /** - * Gets the value of the status property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getStatus() { - return status; - } - - /** - * Sets the value of the status property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setStatus(String value) { - this.status = value; - } - - /** - * Gets the value of the details property. - * - * @return - * possible object is - * {@link ArrayOfWeatherData } - * - */ - public ArrayOfWeatherData getDetails() { - return details; - } - - /** - * Sets the value of the details property. - * - * @param value - * allowed object is - * {@link ArrayOfWeatherData } - * - */ - public void setDetails(ArrayOfWeatherData value) { - this.details = value; - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/package-info.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/package-info.java deleted file mode 100644 index 6543ed7abf..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/com/example/weather/package-info.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.webservicex.net", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) -package com.example.weather; diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/location/LocationClient.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/location/LocationClient.java deleted file mode 100644 index 35c114093a..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/location/LocationClient.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package location; - -import java.io.StringWriter; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.Marshaller; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import com.example.uszip.GetInfoByZIPResponse; -import com.example.uszip.USZipSoap; - -/** - * This client program to invoke the Mortgage LoanApproval service - */ -public class LocationClient { - - public static void main(String[] args) throws Exception { - - SCADomain domain = SCADomain.newInstance("USLocation.composite"); - USZipSoap zipService = domain.getService(USZipSoap.class, "USLocationService"); - - GetInfoByZIPResponse.GetInfoByZIPResult result = zipService.getInfoByZIP("94555"); - - GetInfoByZIPResponse response = new GetInfoByZIPResponse(); - response.setGetInfoByZIPResult(result); - - JAXBContext context = JAXBContext.newInstance(GetInfoByZIPResponse.class); - StringWriter writer = new StringWriter(); - Marshaller marshaller = context.createMarshaller(); - marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); - marshaller.marshal(response, writer); - - String xml = writer.toString(); - System.out.println(xml); - } -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/location/USLocationImpl.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/location/USLocationImpl.java deleted file mode 100644 index cf27332e60..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/location/USLocationImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package location; - -import org.osoa.sca.annotations.AllowsPassByReference; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import com.example.uszip.USZipSoap; -import com.example.uszip.GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult; -import com.example.uszip.GetInfoByCityResponse.GetInfoByCityResult; -import com.example.uszip.GetInfoByStateResponse.GetInfoByStateResult; -import com.example.uszip.GetInfoByZIPResponse.GetInfoByZIPResult; - -/** - * @version $Rev$ $Date$ - */ -@Service(USZipSoap.class) -@AllowsPassByReference -public class USLocationImpl implements USZipSoap { - @Reference - protected USZipSoap usZipService; - - public GetInfoByAreaCodeResult getInfoByAreaCode(String usAreaCode) { - return usZipService.getInfoByAreaCode(usAreaCode); - } - - public GetInfoByCityResult getInfoByCity(String usCity) { - return usZipService.getInfoByCity(usCity); - } - - public GetInfoByStateResult getInfoByState(String usState) { - return usZipService.getInfoByState(usState); - } - - public GetInfoByZIPResult getInfoByZIP(String usZip) { - return usZipService.getInfoByZIP(usZip); - } -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastClient.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastClient.java deleted file mode 100644 index c03cf2955f..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastClient.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package weather; - -import java.io.StringWriter; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.Marshaller; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import com.example.weather.GetWeatherByZipCodeResponse; -import com.example.weather.WeatherForecastSoap; -import com.example.weather.WeatherForecasts; - -/** - * This client program to invoke the Mortgage LoanApproval service - */ -public class WeatherForecastClient { - - public static void main(String[] args) throws Exception { - - SCADomain domain = SCADomain.newInstance("WeatherForecast.composite"); - WeatherForecastSoap weatherService = domain.getService(WeatherForecastSoap.class, "WeatherForecastService"); - - WeatherForecasts result = weatherService.getWeatherByZipCode("94555"); - - // Dump the result as XML - - // Wrap the result so that it can be marshaled - GetWeatherByZipCodeResponse response = new GetWeatherByZipCodeResponse(); - response.setGetWeatherByZipCodeResult(result); - - // Marshal the JAXB object into XML - JAXBContext context = JAXBContext.newInstance(GetWeatherByZipCodeResponse.class); - StringWriter writer = new StringWriter(); - Marshaller marshaller = context.createMarshaller(); - marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); - marshaller.marshal(response, writer); - - String xml = writer.toString(); - System.out.println(xml); - } -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastImpl.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastImpl.java deleted file mode 100644 index cf50a6cd9e..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package weather; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import com.example.weather.WeatherForecastSoap; -import com.example.weather.WeatherForecasts; - -/** - * @version $Rev$ $Date$ - */ -@Service(WeatherForecastSoap.class) -public class WeatherForecastImpl implements WeatherForecastSoap{ - @Reference - protected WeatherForecastSoap weatherForecast; - - public WeatherForecasts getWeatherByPlaceName(String placeName) { - return weatherForecast.getWeatherByPlaceName(placeName); - } - - public WeatherForecasts getWeatherByZipCode(String zipCode) { - return weatherForecast.getWeatherByZipCode(zipCode); - } -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeClient.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeClient.java deleted file mode 100644 index c470230b7a..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeClient.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package zipcode; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program to invoke the Mortgage LoanApproval service - */ -public class ZipCodeClient { - - public static void main(String[] args) throws Exception { - - SCADomain domain = SCADomain.newInstance("ZipCode.composite"); - ZipCodeService zipService = domain.getService(ZipCodeService.class, "ZipCodeService"); - - String result = zipService.lookup("94555"); - System.out.println(result); - } -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeService.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeService.java deleted file mode 100644 index ec0f05dd6c..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeService.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package zipcode; - -import org.osoa.sca.annotations.Remotable; - -/** - * @version $Rev$ $Date$ - */ -@Remotable -public interface ZipCodeService { - String lookup(String zipCode); -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeServiceImpl.java b/branches/sca-android/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeServiceImpl.java deleted file mode 100644 index 284e5a3aa3..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeServiceImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package zipcode; - -import java.io.StringWriter; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.Marshaller; - -import org.osoa.sca.ServiceRuntimeException; -import org.osoa.sca.annotations.AllowsPassByReference; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -import com.example.uszip.GetInfoByZIPResponse; -import com.example.uszip.USZipSoap; -import com.example.uszip.GetInfoByZIPResponse.GetInfoByZIPResult; -import com.example.weather.GetWeatherByZipCodeResponse; -import com.example.weather.WeatherForecastSoap; -import com.example.weather.WeatherForecasts; - -/** - * @version $Rev$ $Date$ - */ -@Service(ZipCodeService.class) -@AllowsPassByReference -public class ZipCodeServiceImpl implements ZipCodeService { - @Reference - protected USZipSoap usZipService; - - @Reference - protected WeatherForecastSoap weatherForecast; - - public String lookup(String zipCode) { - GetInfoByZIPResult result1 = usZipService.getInfoByZIP(zipCode); - - GetInfoByZIPResponse response1 = new GetInfoByZIPResponse(); - response1.setGetInfoByZIPResult(result1); - - String xml1 = toXML(response1); - - WeatherForecasts result2 = weatherForecast.getWeatherByZipCode(zipCode); - // Wrap the result so that it can be marshaled - GetWeatherByZipCodeResponse response2 = new GetWeatherByZipCodeResponse(); - response2.setGetWeatherByZipCodeResult(result2); - - String xml2 = toXML(response2); - // Marshal the JAXB object into XML - return xml1 + "\n" + xml2; - } - - private String toXML(Object jaxb) { - try { - JAXBContext context = JAXBContext.newInstance(jaxb.getClass()); - StringWriter writer = new StringWriter(); - Marshaller marshaller = context.createMarshaller(); - marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); - marshaller.marshal(jaxb, writer); - return writer.toString(); - } catch (Exception e) { - throw new ServiceRuntimeException(e); - } - } - -} diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/resources/USLocation.composite b/branches/sca-android/samples/zipcode-jaxws/src/main/resources/USLocation.composite deleted file mode 100644 index a171fe62c9..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/resources/USLocation.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/resources/WeatherForecast.composite b/branches/sca-android/samples/zipcode-jaxws/src/main/resources/WeatherForecast.composite deleted file mode 100644 index 0e1b118e44..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/resources/WeatherForecast.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-android/samples/zipcode-jaxws/src/main/resources/ZipCode.composite b/branches/sca-android/samples/zipcode-jaxws/src/main/resources/ZipCode.composite deleted file mode 100644 index 28d674c29b..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/main/resources/ZipCode.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/zipcode-jaxws/src/test/java/zipcode/ZipCodeClientTestCase.java b/branches/sca-android/samples/zipcode-jaxws/src/test/java/zipcode/ZipCodeClientTestCase.java deleted file mode 100644 index 019fce26d6..0000000000 --- a/branches/sca-android/samples/zipcode-jaxws/src/test/java/zipcode/ZipCodeClientTestCase.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package zipcode; - -import location.LocationClient; -import weather.WeatherForecastClient; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Tests that the callback server is available - */ -public class ZipCodeClientTestCase { - - @Before - public void startServer() throws Exception { - } - - @Test - public void testClient() throws Exception { - /* - System.out.println("Running LocationClient..."); - LocationClient.main(null); - System.out.println("Running WeatherForecastClient..."); - WeatherForecastClient.main(null); - */ - System.out.println("Running ZipCodeClient..."); - ZipCodeClient.main(null); - } - - @After - public void stopServer() throws Exception { - } -} diff --git a/branches/sca-android/tools/java2wsdl/LICENSE b/branches/sca-android/tools/java2wsdl/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-android/tools/java2wsdl/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/tools/java2wsdl/NOTICE b/branches/sca-android/tools/java2wsdl/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-android/tools/java2wsdl/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/tools/java2wsdl/pom.xml b/branches/sca-android/tools/java2wsdl/pom.xml deleted file mode 100644 index a760c26d1b..0000000000 --- a/branches/sca-android/tools/java2wsdl/pom.xml +++ /dev/null @@ -1,235 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca-tools - 1.4-SNAPSHOT - ../pom.xml - - tuscany-java2wsdl - Apache Tuscany SCA Java2WSDL Tool - - - - org.apache.tuscany.sdo - tuscany-sdo-impl - 1.1.1 - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-databinding - 1.4-SNAPSHOT - - - - javax.xml.stream - stax-api - 1.0-2 - - - - wsdl4j - wsdl4j - 1.6.2 - - - - org.apache.neethi - neethi - 2.0.2 - - - wsdl4j - wsdl4j - - - org.codehaus.woodstox - wstx-asl - - - - - - org.apache.ws.commons.schema - XmlSchema - 1.3.2 - - - - org.apache.ws.commons.axiom - axiom-api - - - xerces - xercesImpl - - - xml-apis - xml-apis - - - 1.2.5 - - - - org.apache.ws.commons.axiom - axiom-impl - 1.2.5 - - - - org.apache.axis2 - axis2-kernel - 1.3 - - - org.codehaus.woodstox - wstx-asl - - - - - - org.apache.axis2 - axis2-java2wsdl - 1.3 - - - org.apache.ant - ant - - - - - - org.apache.axis2 - axis2-codegen - 1.3 - - - org.apache.geronimo.specs - geronimo-activation_1.1_spec - - - - - - org.eclipse.emf - codegen - 2.2.3 - - - - org.eclipse.emf - codegen-ecore - 2.2.3 - - - - annogen - annogen - 0.1.0 - - - - commons-logging - commons-logging - 1.1 - - - - org.codehaus.woodstox - wstx-asl - 3.2.1 - runtime - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.0 - - - add-test-source - generate-sources - - add-test-source - - - - target/sdo-source - - - - - - - org.apache.tuscany.sdo - tuscany-sdo-plugin - 1.1.1 - - - generate-sdo - generate-sources - - ${basedir}/src/test/resources/CreditScoreDocLit.wsdl - org.example.creditscore.doclit - true - true - true - - - generate - - - - - - - - - - - - - indiana - http://ftp.ussg.iu.edu/eclipse/modeling/emf/emf/maven2/ - - true - - - - - diff --git a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/GenerationParameters.java b/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/GenerationParameters.java deleted file mode 100644 index 60afe70534..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/GenerationParameters.java +++ /dev/null @@ -1,423 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.ArrayList; -import java.util.Hashtable; -import java.util.Map; - -import org.apache.axis2.description.java2wsdl.Java2WSDLUtils; -import org.apache.ws.java2wsdl.utils.Java2WSDLCommandLineOption; - -/** - * This class encapsulates the parameters that effect the generation of the WSDL. For example they contain all user settings such as source class, - * target location etc. - * - */ -public class GenerationParameters implements TuscanyJava2WSDLConstants { - public static final String WSDL_FILENAME_SUFFIX = ".wsdl"; - - public static final String XSD_IMPORT_DELIMITER = "[,]"; - - private Map cmdLineOptions = null; - - private File outputFile = null; - - private FileOutputStream outputFileStream = null; - - private String sourceClassName = null; - - private ArrayList extraClasses; - - private ArrayList factoryClassNames; - - private String attrFormDefault = null; - - private String elementFormDefault = null; - - private String targetNamespace = null; - - private String targetNamespacePrefix = null; - - private String schemaTargetNamespace = null; - - private String schemaTargetNamespacePrefix = null; - - private String outputFileName = null; - - private ClassLoader classLoader = null; - - private String serviceName = null; - - private String style = DOCUMENT; - - private String use = LITERAL; - - private String locationUri = DEFAULT_LOCATION_URL; - - private Map schemaLocationMap = null; - - public GenerationParameters(Map cmdLineOptions) throws Exception { - this.cmdLineOptions = cmdLineOptions; - loadParameters(); - } - - protected void loadParameters() throws Exception { - initializeSourceClassName(); - resolveFileOutputStream(); - resolveClassLoader4InputClasspath(); - loadSchemaLocationMap(); - initializeOtherParams(); - } - - private Java2WSDLCommandLineOption loadOption(String shortOption, String longOption) { - // short option gets precedence - Java2WSDLCommandLineOption option = null; - if (longOption != null) { - option = (Java2WSDLCommandLineOption) cmdLineOptions.get(longOption); - if (option != null) { - return option; - } - } - if (shortOption != null) { - option = (Java2WSDLCommandLineOption) cmdLineOptions.get(shortOption); - } - - return option; - } - - protected void initializeSourceClassName() throws Exception { - Java2WSDLCommandLineOption option = loadOption(CLASSNAME_OPTION, CLASSNAME_OPTION_LONG); - sourceClassName = option == null ? null : option.getOptionValue(); - - if (sourceClassName == null || sourceClassName.equals("")) { - throw new Exception("class name must be present!"); - } - } - - /** - * @throws Exception - */ - protected void resolveFileOutputStream() throws Exception { - File outputFolder; - Java2WSDLCommandLineOption option = loadOption(OUTPUT_LOCATION_OPTION, OUTPUT_LOCATION_OPTION_LONG); - String outputFolderName = option == null ? System.getProperty("user.dir") : option.getOptionValue(); - - outputFolder = new File(outputFolderName); - if (!outputFolder.exists()) { - outputFolder.mkdirs(); - } else if (!outputFolder.isDirectory()) { - throw new Exception("The specified location " + outputFolderName + "is not a folder"); - } - - option = loadOption(OUTPUT_FILENAME_OPTION, OUTPUT_FILENAME_OPTION_LONG); - String outputFileName = option == null ? null : option.getOptionValue(); - // derive a file name from the class name if the filename is not specified - if (outputFileName == null) { - outputFileName = Java2WSDLUtils.getSimpleClassName(sourceClassName) + WSDL_FILENAME_SUFFIX; - } - - // first create a file in the given location - File outputFile = new File(outputFolder, outputFileName); - try { - if (!outputFile.exists()) { - outputFile.createNewFile(); - } - outputFileStream = new FileOutputStream(outputFile); - } catch (IOException e) { - throw new Exception(e); - } - } - - protected void addToSchemaLocationMap(String optionValue) throws Exception { - // option value will be of the form [namespace, schemalocation] - // hence we take the two substrings starting after '[' and upto ',' and - // starting after ',' and upto ']' - getSchemaLocationMap().put(optionValue.substring(1, optionValue.indexOf(COMMA)), - optionValue.substring(optionValue.indexOf(COMMA) + 1, optionValue.length() - 1)); - } - - protected void loadSchemaLocationMap() throws Exception { - Java2WSDLCommandLineOption option = loadOption(IMPORT_XSD_OPTION, IMPORT_XSD_OPTION_LONG); - - if (option != null) { - ArrayList optionValues = option.getOptionValues(); - - for (int count = 0; count < optionValues.size(); ++count) { - addToSchemaLocationMap(((String) optionValues.get(count)).trim()); - } - } - } - - protected void resolveClassLoader4InputClasspath() throws Exception { - URL[] urls = null; - Java2WSDLCommandLineOption option = loadOption(CLASSPATH_OPTION, CLASSPATH_OPTION_LONG); - - if (option != null) { - ArrayList optionValues = option.getOptionValues(); - urls = new URL[optionValues.size()]; - String[] classPathEntries = (String[]) optionValues.toArray(new String[optionValues.size()]); - - try { - for (int i = 0; i < classPathEntries.length; i++) { - String classPathEntry = classPathEntries[i]; - // this should be a file(or a URL) - if (Java2WSDLUtils.isURL(classPathEntry)) { - urls[i] = new URL(classPathEntry); - } else { - urls[i] = new File(classPathEntry).toURL(); - } - } - } catch (MalformedURLException e) { - throw new Exception(e); - } - - } else { - //Default to pwd - urls = new URL[1]; - File pwd = new File("."); - urls[0] = pwd.toURL(); - } - - classLoader = new URLClassLoader(urls, Thread.currentThread().getContextClassLoader()); - } - - protected void initializeOtherParams() { - // set the other parameters to the builder - Java2WSDLCommandLineOption option = - loadOption(SCHEMA_TARGET_NAMESPACE_OPTION, SCHEMA_TARGET_NAMESPACE_OPTION_LONG); - schemaTargetNamespace = (option == null) ? null : option.getOptionValue(); - - option = loadOption(SCHEMA_TARGET_NAMESPACE_PREFIX_OPTION, SCHEMA_TARGET_NAMESPACE_PREFIX_OPTION_LONG); - schemaTargetNamespacePrefix = (option == null) ? null : option.getOptionValue(); - - option = loadOption(TARGET_NAMESPACE_OPTION, TARGET_NAMESPACE_OPTION_LONG); - targetNamespace = (option == null) ? null : option.getOptionValue(); - - option = loadOption(TARGET_NAMESPACE_PREFIX_OPTION, TARGET_NAMESPACE_PREFIX_OPTION_LONG); - targetNamespacePrefix = (option == null) ? null : option.getOptionValue(); - - option = loadOption(SERVICE_NAME_OPTION, SERVICE_NAME_OPTION_LONG); - serviceName = (option == null) ? Java2WSDLUtils.getSimpleClassName(sourceClassName) : option.getOptionValue(); - - option = loadOption(STYLE_OPTION, STYLE_OPTION); - style = (option == null) ? null : option.getOptionValue(); - - option = loadOption(LOCATION_OPTION, LOCATION_OPTION); - locationUri = (option == null) ? null : option.getOptionValue(); - - option = loadOption(USE_OPTION, USE_OPTION); - use = (option == null) ? null : option.getOptionValue(); - - option = loadOption(ATTR_FORM_DEFAULT_OPTION, ATTR_FORM_DEFAULT_OPTION_LONG); - attrFormDefault = (option == null) ? null : option.getOptionValue(); - - option = loadOption(ELEMENT_FORM_DEFAULT_OPTION, ELEMENT_FORM_DEFAULT_OPTION_LONG); - elementFormDefault = option == null ? null : option.getOptionValue(); - - option = loadOption(TuscanyJava2WSDLConstants.EXTRA_CLASSES_DEFAULT_OPTION, TuscanyJava2WSDLConstants.EXTRA_CLASSES_DEFAULT_OPTION_LONG); - extraClasses = option == null ? new ArrayList() : option.getOptionValues(); - - option = loadOption(TuscanyJava2WSDLConstants.FACTORY_CLASSNAMES_OPTION, TuscanyJava2WSDLConstants.FACTORY_CLASSNAMES_OPTION_LONG); - factoryClassNames = option == null ? new ArrayList() : option.getOptionValues(); - } - - public ClassLoader getClassLoader() { - return classLoader; - } - - public void setClassLoader(ClassLoader classLoader) { - this.classLoader = classLoader; - } - - public String getLocationUri() { - if (locationUri == null) { - locationUri = DEFAULT_LOCATION_URL; - } - return locationUri; - } - - public void setLocationUri(String locationUri) { - this.locationUri = locationUri; - } - - public FileOutputStream getOutputFileStream() { - return outputFileStream; - } - - public void setOutputFileStream(FileOutputStream outputFileStream) { - this.outputFileStream = outputFileStream; - } - - public String getSchemaTargetNamespace() throws Exception { - if (schemaTargetNamespace == null || schemaTargetNamespace.trim().equals("")) { - // This amounts to assuming we want the wrapper elements in the same TNS - // as the WSDL definitions. - // - // If the user neither specifies a TNS nor a SchemaTNS then both of these two - // will continue to default to the same NS calculated from the input class' package name. - // - // The wrapper elements aren't really interesting outside the context of the WSDL types - // section, so it seems reasonable to think that a user who cares to select a non-default - // TNS for the WSDL definitions might want the wrapper elements defined in that same - // NS. - // - // The user can always override this default. - - this.schemaTargetNamespace = this.getTargetNamespace(); - } - return schemaTargetNamespace; - } - - public void setSchemaTargetNamespace(String schemaTargetNamespace) { - this.schemaTargetNamespace = schemaTargetNamespace; - } - - public String getSchemaTargetNamespacePrefix() { - if (schemaTargetNamespacePrefix == null || schemaTargetNamespacePrefix.trim().equals("")) { - this.schemaTargetNamespacePrefix = SCHEMA_NAMESPACE_PRFIX; - } - - return schemaTargetNamespacePrefix; - } - - public void setSchemaTargetNamespacePrefix(String schemaTargetNamespacePrefix) { - this.schemaTargetNamespacePrefix = schemaTargetNamespacePrefix; - } - - public String getServiceName() { - if (serviceName == null) { - serviceName = Java2WSDLUtils.getSimpleClassName(getSourceClassName()); - } - return serviceName; - } - - public void setServiceName(String serviceName) { - this.serviceName = serviceName; - } - - public String getSourceClassName() { - return sourceClassName; - } - - public void setSourceClassName(String sourceClassName) { - this.sourceClassName = sourceClassName; - } - - public String getStyle() { - if (style == null) { - style = DOCUMENT; - } - return style; - } - - public void setStyle(String style) { - this.style = style; - } - - public String getTargetNamespace() throws Exception { - if (targetNamespace == null) { - targetNamespace = Java2WSDLUtils.namespaceFromClassName(this.sourceClassName, this.classLoader).toString(); - } - return targetNamespace; - } - - public void setTargetNamespace(String targetNamespace) { - this.targetNamespace = targetNamespace; - } - - public String getTargetNamespacePrefix() { - return targetNamespacePrefix; - } - - public void setTargetNamespacePrefix(String targetNamespacePrefix) { - this.targetNamespacePrefix = targetNamespacePrefix; - } - - public String getUse() { - if (use == null) { - use = LITERAL; - } - return use; - } - - public void setUse(String use) { - this.use = use; - } - - public Map getSchemaLocationMap() { - if (schemaLocationMap == null) { - schemaLocationMap = new Hashtable(); - } - return schemaLocationMap; - } - - public void setSchemaLocationMap(Map schemaLocationMap) { - this.schemaLocationMap = schemaLocationMap; - } - - public String getAttrFormDefault() { - if (attrFormDefault == null) { - attrFormDefault = FORM_DEFAULT_UNQUALIFIED; - } - return attrFormDefault; - } - - public void setAttrFormDefault(String attrFormDefault) { - this.attrFormDefault = attrFormDefault; - } - - public String getElementFormDefault() { - if (elementFormDefault == null) { - elementFormDefault = FORM_DEFAULT_QUALIFIED; - } - return elementFormDefault; - } - - public void setElementFormDefault(String elementFormDefault) { - this.elementFormDefault = elementFormDefault; - } - - public ArrayList getExtraClasses() { - return extraClasses; - } - - public void setExtraClasses(ArrayList extraClasses) { - this.extraClasses = extraClasses; - } - - public ArrayList getFactoryClassNames() { - return factoryClassNames; - } - - public void setFactoryClassNames(ArrayList factoryClassNames) { - this.factoryClassNames = factoryClassNames; - } - - // Not a command-line parameter, but will be useful for printing status message - protected File getOutputFile() { - return outputFile; - } -} diff --git a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDL.java b/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDL.java deleted file mode 100644 index a890dd624d..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDL.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import org.apache.ws.java2wsdl.utils.Java2WSDLCommandLineOptionParser; - -/** - * This class provides the tooling abstraction to Tuscany Java2WSDL and can be - * invoked from command line with the following options as with Axis2 Java2WSDL - */ -public class Java2WSDL { - /** - * @param args - */ - public static void main(String[] args) { - // parse the cmd line args - Java2WSDLCommandLineOptionParser commandLineOptionParser = new Java2WSDLCommandLineOptionParser(args); - - // validate the arguments - validateCommandLineOptions(commandLineOptionParser); - - Java2WSDLGeneratorFactory.getInstance().createGenerator().generateWSDL(commandLineOptionParser.getAllOptions()); - - // Uncomment the following statement to directly run the Axis2 tool - // without - // runAxis2Tool(args); - } - - private static void runAxis2Tool(String[] args) { - org.apache.ws.java2wsdl.Java2WSDL.main(args); - } - - private static void validateCommandLineOptions(Java2WSDLCommandLineOptionParser parser) { - if (parser.getAllOptions().size() == 0) { - printUsage(); - } else if (parser.getInvalidOptions(new TuscanyJava2WSDLOptionsValidator()).size() > 0) { - printUsage(); - } - - } - - public static void printUsage() { - System.out.println("Usage java2wsdl -cn : class file name"); - System.out.println("-o : output file location"); - System.out.println("-cp : list of classpath entries - (urls)"); - System.out.println("-tn : target namespace"); - System.out.println("-tp : target namespace prefix"); - System.out.println("-stn : target namespace for schema"); - System.out.println("-stp : target namespace prefix for schema"); - System.out.println("-sn : service name"); - System.out.println("-of : output file name for the WSDL"); - System.out.println("-st : style for the WSDL"); - System.out.println("-u : use for the WSDL"); - System.out.println("-l : address of the port for the WSDL"); - System.out - .println("-ixsd [,] [,] ... [,] : schemas to be imported (without a comma in between brackets)"); - System.out.println("-efd : Setting for elementFormDefault (defaults to qualified)"); - System.out.println("-afd : Setting for attributeFormDefault (defaults to qualified)"); - System.out - .println("-fcn ... (without a comma in between) "); - - System.out - .println("-xc : Extra class for which schematype must be generated. " + "\t\tUse as : -xc class1 -xc class2 ..."); - System.exit(0); - } -} diff --git a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDLGenerator.java b/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDLGenerator.java deleted file mode 100644 index 9c8ff9df9e..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDLGenerator.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import java.io.OutputStream; -import java.util.Map; - -/** - * This is the Java2WSDL Generator facade that will be used by Tuscany - * components for Java to WSDL conversion. - * - */ -public interface Java2WSDLGenerator { - public void generateWSDL(String[] args); - - public void generateWSDL(Map commandLineOptions); - - public void addWSDLGenListener(WSDLGenListener l); - - public void removeWSDLGenListener(WSDLGenListener l); - - public Map getCommandLineOptions(); - - public void setCommandLineOptoins(Map cmdLineOpts); - - public OutputStream getOutputStream(); - - public void setOutputStream(OutputStream outStream); - -} diff --git a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDLGeneratorFactory.java b/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDLGeneratorFactory.java deleted file mode 100644 index e8f3db95b0..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDLGeneratorFactory.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import java.util.Vector; - -/** - * Factory that creates Java2WSDL Generators. Presently the there is a Default - * Generator that wraps around the AXIS2 Java2WSDL implementation. The factory - * can be extended to create generators that wrap around other implementations - * if required. - */ - -public class Java2WSDLGeneratorFactory { - /* - * singleton instance of this factory class - */ - private static Java2WSDLGeneratorFactory factory = null; - - /** - * code for the default generator - */ - public static final int DEFAULT_GENERATOR = 0; - - /** - * Default Generator class name - */ - public static final String DEFAULT_GENERATOR_CLASSNAME = "org.apache.tuscany.tools.java2wsdl.generate.Java2WSDLGeneratorImpl"; - - /** - * list of generator classnames in a position that corresponds to their - * code. For example the default generator's code is 0 and hence this - * generator's classname is stored at index '0' of the list - */ - protected Vector generatorClassNames = new Vector(); - - /** - * @return the singleton instance of this generator factory - */ - public static Java2WSDLGeneratorFactory getInstance() { - if (factory == null) { - factory = new Java2WSDLGeneratorFactory(); - } - return factory; - } - - private Java2WSDLGeneratorFactory() { - generatorClassNames.addElement(DEFAULT_GENERATOR_CLASSNAME); - } - - public Java2WSDLGenerator createGenerator() { - return createGenerator(DEFAULT_GENERATOR); - } - - /** - * creates an instance of a Java2WSDL Generator based on the input type - * - * @param genType - * type of the generator to be created - * @return an instance of a Java2WSDL Generator - */ - public Java2WSDLGenerator createGenerator(int genType) { - try { - return (Java2WSDLGenerator) (Class.forName(generatorClassNames - .elementAt(genType)).newInstance()); - } catch (Exception e) { - System.out - .println(" Unable to create Java2WSDL generator due to ....."); - System.out.println(e); - return null; - } - } -} diff --git a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDLGeneratorImpl.java b/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDLGeneratorImpl.java deleted file mode 100644 index bce30a48d3..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDLGeneratorImpl.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import java.io.OutputStream; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Vector; - -import org.apache.axiom.om.OMElement; -import org.apache.ws.java2wsdl.Java2WSDL; -import org.apache.ws.java2wsdl.utils.Java2WSDLCommandLineOption; -import org.apache.ws.java2wsdl.utils.Java2WSDLCommandLineOptionParser; -import org.apache.ws.java2wsdl.utils.Java2WSDLOptionsValidator; -import org.apache.xml.serialize.OutputFormat; -import org.apache.xml.serialize.XMLSerializer; -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -/** - * This is an implementation of the Java2WSDLGenerator facade. This - * implementation is a decorator around the Axis2 implementation of the - * Java2WSDL conversion. The WSDL generation is divided into phases that are - * stringed up as a template method. The phases are - User Input Validation - - * WSDL Java Model Generation - Serialization of WSDL Java Model The function of - * each phase is accomplished by delegation to the appropriate classes in Axis2. - * At the start and end of each phase an event is published to subscribers - * denoting the start and end of the phase. Such a splitting up of the Java2WSDL - * conversion into phases has been designed to enable interceptors to modify the - * model or apply transformations to the output. Typically the interceptors can - * subscribe to the start and end events of these phases and hence be able to - * intercept. Note: This class contains substantial AXIS2 Java2WSDL code - * refactored into it. These will be removed as and when the Axis2 code is - * fixed. - */ -public class Java2WSDLGeneratorImpl implements Java2WSDLGenerator, TuscanyJava2WSDLConstants { - private List genPhaseListeners = new Vector(); - private GenerationParameters genParams = null; - private Map commandLineOptions = null; - private TuscanyJava2WSDLBuilder java2WsdlBuilder; - private OutputStream outputStream = null; - - public Java2WSDLGeneratorImpl() { - - } - - private void multicastGenPhaseCompletionEvent(int genPhase) { - WSDLGenEvent event = new WSDLGenEvent(this, genPhase); - Iterator iterator = genPhaseListeners.iterator(); - while (iterator.hasNext()) { - ((WSDLGenListener)iterator.next()).WSDLGenPhaseCompleted(event); - } - } - - private void initJava2WSDLBuilder() throws Exception { - // Now we are done with loading the basic values - time to create the - // builder - java2WsdlBuilder = new TuscanyJava2WSDLBuilder(genParams); - } - - protected boolean validateInputArgs(String[] args) { - boolean isValid = true; - Java2WSDLCommandLineOptionParser parser = new Java2WSDLCommandLineOptionParser(args); - if (parser.getAllOptions().size() == 0) { - Java2WSDL.printUsage(); - isValid = false; - } else if (parser.getInvalidOptions(new Java2WSDLOptionsValidator()).size() > 0) { - Java2WSDL.printUsage(); - isValid = false; - } - - if (isValid) { - commandLineOptions = parser.getAllOptions(); - } - - return isValid; - } - - public boolean buildWSDLDocument() throws Exception { - boolean isComplete = true; - initJava2WSDLBuilder(); - java2WsdlBuilder.buildWSDL(); - - return isComplete; - } - - public boolean serializeWSDLDocument() throws Exception { - boolean isComplete = true; - - if (getOutputStream() == null) { - setOutputStream(genParams.getOutputFileStream()); - } - - // transform the OMElement - OMElement om = java2WsdlBuilder.getWsdlDocument(); - javax.xml.stream.XMLStreamReader stream = om.getXMLStreamReader(); - - org.apache.tuscany.sca.databinding.xml.XMLStreamReader2Node xform = - new org.apache.tuscany.sca.databinding.xml.XMLStreamReader2Node(); - - Node node = xform.transform(stream, null); - - Document doc = node.getOwnerDocument(); - - // pretty-print WSDL document - OutputFormat format = new OutputFormat(doc); - format.setLineWidth(65); - format.setIndenting(true); - format.setIndent(2); - XMLSerializer serializer = new XMLSerializer(getOutputStream(), format); - serializer.serialize(doc); - - return isComplete; - - } - - /* - * This is the template method that splits the Java2WSDL generation cycle - * into phase / steps. - * - * @see tuscany.tools.Java2WSDLGeneratorIfc#generateWSDL(java.lang.String[]) - */ - public void generateWSDL(Map commandLineOptions) { - try { - // load the user options into an easy to access abstraction - genParams = new GenerationParameters(commandLineOptions); - - // if the WSDL Model generation was successful - if (buildWSDLDocument()) { - // multicast event for generation of WSDL model - multicastGenPhaseCompletionEvent(WSDLGenListener.WSDL_MODEL_CREATION); - // if the Serialization of the generated (and fixed) model - // is successful - if (serializeWSDLDocument()) { - // multicast event for writing of the WSDL Model to - // supplied output stream - multicastGenPhaseCompletionEvent(WSDLGenListener.WSDL_MODEL_WRITING); - } - } - } catch (Exception e) { - e.printStackTrace(); - } - } - - public void generateWSDL(String[] args) { - // if the argument input are found to be valid - if (validateInputArgs(args)) { - // multicast event for input args validation complete - multicastGenPhaseCompletionEvent(WSDLGenListener.INPUT_ARGS_VALIDATION); - generateWSDL(commandLineOptions); - } - } - - public void addWSDLGenListener(WSDLGenListener l) { - genPhaseListeners.add(l); - - } - - public void removeWSDLGenListener(WSDLGenListener l) { - genPhaseListeners.remove(l); - } - - public Map getCommandLineOptions() { - return commandLineOptions; - } - - public void setCommandLineOptoins(Map cmdLineOpts) { - commandLineOptions = cmdLineOpts; - } - - public OutputStream getOutputStream() { - return outputStream; - } - - public void setOutputStream(OutputStream outStream) { - outputStream = outStream; - } - - public TuscanyJava2WSDLBuilder getJava2WsdlBuilder() { - return java2WsdlBuilder; - } - - public void setJava2WsdlBuilder(TuscanyJava2WSDLBuilder java2WsdlBuilder) { - this.java2WsdlBuilder = java2WsdlBuilder; - } - - // - // Works recursively with node's entire subtree - // There's no tie to fields in this object so I made this public. - // - public static void removeTextNodes(Node node) { - - if (node == null) - return; - - if (node.getNodeType() == Node.TEXT_NODE) { - node.getParentNode().removeChild(node); - } else { - int origNumNodes; - NodeList children = null; - do { - children = node.getChildNodes(); - origNumNodes = children.getLength(); - - for (int i = 0; i < origNumNodes; i++) { - removeTextNodes(children.item(i)); - } - } while (node.getChildNodes().getLength() != origNumNodes); - } - } - - protected void printGenerationMessage() { - System.out.println(""); - System.out.println("Generating " + genParams.getOutputFile() - + " from Java class " - + genParams.getSourceClassName() - + "."); - System.out.println(""); - } -} diff --git a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/SchemaBuilder.java b/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/SchemaBuilder.java deleted file mode 100644 index 897700ffd9..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/SchemaBuilder.java +++ /dev/null @@ -1,613 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import java.io.StringReader; -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Set; -import java.util.Vector; - -import javax.xml.namespace.QName; - -import org.apache.axis2.description.java2wsdl.Java2WSDLUtils; -import org.apache.ws.commons.schema.XmlSchema; -import org.apache.ws.commons.schema.XmlSchemaCollection; -import org.apache.ws.commons.schema.XmlSchemaComplexType; -import org.apache.ws.commons.schema.XmlSchemaElement; -import org.apache.ws.commons.schema.XmlSchemaForm; -import org.apache.ws.commons.schema.XmlSchemaGroupBase; -import org.apache.ws.commons.schema.XmlSchemaImport; -import org.apache.ws.commons.schema.XmlSchemaInclude; -import org.apache.ws.commons.schema.XmlSchemaSequence; -import org.apache.ws.commons.schema.XmlSchemaType; -import org.apache.ws.commons.schema.utils.NamespaceMap; -import org.codehaus.jam.JClass; -import org.codehaus.jam.JProperty; - -import commonj.sdo.DataObject; -import commonj.sdo.Type; -import commonj.sdo.helper.HelperContext; -import commonj.sdo.helper.XSDHelper; - -public class SchemaBuilder implements TuscanyJava2WSDLConstants { - public static final String NAME_SPACE_PREFIX = "stn_"; - - private static int prefixCount = 1; - - public static final String MIXED = "mixed"; - - public static final String GROUP = "group"; - - protected String attrFormDefault = null; - - protected String elementFormDefault = null; - - protected XmlSchemaCollection xmlSchemaCollection = new XmlSchemaCollection(); - - private Hashtable schemaMap = new Hashtable(); - - protected Hashtable targetNamespacePrefixMap = new Hashtable(); - - protected TuscanyTypeTable typeTable = new TuscanyTypeTable(); - - protected Map schemaLocationMap = null; - - private ClassLoader classLoader = null; - - private ArrayList factoryClassNames = null; - - private HelperContext helperContext = null; - - private XSDHelper xsdHelper = null; - - private Set registeredSDOFactories = new HashSet(); - - boolean alreadyPrintedDefaultSDOFactoryFound = false; - - boolean alreadyPrintedDefaultSDOFactoryNotFound = false; - - protected SchemaBuilder(XmlSchemaCollection schemaCollection, - Hashtable schemaMap, - Hashtable nsPrefixMap, - TuscanyTypeTable typeTable, - String attrFormDef, - String eleFormDef, - Map schemaLocMap, - ClassLoader classLoader, - ArrayList factoryClassNames) { - this.schemaMap = schemaMap; - this.xmlSchemaCollection = schemaCollection; - this.targetNamespacePrefixMap = nsPrefixMap; - this.typeTable = typeTable; - this.schemaLocationMap = schemaLocMap; - this.classLoader = classLoader; - this.attrFormDefault = attrFormDef; - this.elementFormDefault = eleFormDef; - this.factoryClassNames = factoryClassNames; - - // Register the types in the generated SDO factories - this.helperContext = org.apache.tuscany.sdo.api.SDOUtil.createHelperContext(); - this.xsdHelper = helperContext.getXSDHelper(); - - Class factoryClass = null; - for (Object factoryClassName : this.factoryClassNames) { - try { - factoryClass = Class.forName((String)factoryClassName, true, classLoader); - } catch (ClassNotFoundException e) { - e.printStackTrace(); - System.out.println(""); - System.out.println("Generated SDO Factory class with name: " + factoryClassName + " could not be loaded. Exiting."); - throw new IllegalArgumentException(e); - } - registerSDOFactory(factoryClass); - } - } - - private boolean isSDO(JClass javaType) throws Exception { - - Class sdoClass = Class.forName(javaType.getQualifiedName(), true, classLoader); - - return DataObject.class.isAssignableFrom(sdoClass); - } - - private void buildComplexTypeContents_JavaType(JClass javaType, - XmlSchemaComplexType complexType, - XmlSchema xmlSchema) throws Exception { - JProperty[] properties = javaType.getDeclaredProperties(); - - for (int i = 0; i < properties.length; i++) { - JProperty property = properties[i]; - String propertyName = property.getType().getQualifiedName(); - boolean isArryType = property.getType().isArrayType(); - if (isArryType) { - propertyName = property.getType().getArrayComponentType().getQualifiedName(); - } - - if (typeTable.isSimpleType(propertyName)) { - XmlSchemaElement elt1 = new XmlSchemaElement(); - elt1.setName(getCorrectName(property.getSimpleName())); - elt1.setSchemaTypeName(typeTable.getSimpleSchemaTypeName(propertyName)); - ((XmlSchemaGroupBase) complexType.getParticle()).getItems().add(elt1); - if (isArryType) { - elt1.setMaxOccurs(Long.MAX_VALUE); - elt1.setMinOccurs(0); - } - } else { - QName schemaTypeName = null; - if (isArryType) { - schemaTypeName = generateSchema(property.getType().getArrayComponentType()); - } else { - schemaTypeName = generateSchema(property.getType()); - } - - XmlSchemaElement elt1 = new XmlSchemaElement(); - elt1.setName(getCorrectName(property.getSimpleName())); - elt1.setSchemaTypeName(schemaTypeName); - ((XmlSchemaGroupBase) complexType.getParticle()).getItems().add(elt1); - - if (isArryType) { - elt1.setMaxOccurs(Long.MAX_VALUE); - elt1.setMinOccurs(0); - } - - addImports(xmlSchema, - schemaTypeName); - } - } - } - - protected QName buildSchema_JavaType(JClass javaType) throws Exception { - QName schemaTypeName = typeTable.getComplexSchemaTypeName(javaType, this.classLoader); - if (schemaTypeName == null) { - String simpleName = javaType.getSimpleName(); - - String packageName = javaType.getContainingPackage().getQualifiedName(); - - String targetNameSpace = - Java2WSDLUtils.schemaNamespaceFromClassName(javaType.getQualifiedName(), this.classLoader) - .toString(); - - XmlSchema xmlSchema = getXmlSchema(targetNameSpace); - String targetNamespacePrefix = (String) targetNamespacePrefixMap.get(targetNameSpace); - - schemaTypeName = new QName(targetNameSpace, simpleName, targetNamespacePrefix); - XmlSchemaComplexType complexType = new XmlSchemaComplexType(xmlSchema); - complexType.setName(simpleName); - - XmlSchemaSequence sequence = new XmlSchemaSequence(); - complexType.setParticle(sequence); - - createGlobalElement(xmlSchema, - complexType, - schemaTypeName); - xmlSchema.getItems().add(complexType); - xmlSchema.getSchemaTypes().add(schemaTypeName, - complexType); - - // adding this type to the table - // typeTable.addComplexScheam(name, complexType.getQName()); - typeTable.addComplexSchemaType(targetNameSpace, - simpleName, - schemaTypeName); - buildComplexTypeContents_JavaType(javaType, - complexType, - xmlSchema); - } - return schemaTypeName; - } - - protected QName buildSchema_SDO(Type dataType) // throws Exception - { - QName schemaTypeName = typeTable.getComplexSchemaTypeName(dataType.getURI(), - dataType.getName()); - - if (schemaTypeName == null) { - // We can't load the XSDs into an XSDHelper and match them against the static SDOs; they will - // never match. Instead let's take an all-or-nothing approach and say, if we've got this NS - // in our map then we assume we have this Type as well in the corresponding XSD file. - // - boolean inXSDForm = schemaLocationMap.get(dataType.getURI()) != null; - - if (inXSDForm) { - // if schemalocations for XSD has been specified, include them - - // External XSDs will be handled in processing the schema TNS of the wrapper elements. - // This is partly because SDO codegen needs some modification in this area - // So we won't bother including the external XSDs here at all. - // - // includeExtXSD(dataType); - } else { - List typeList = new Vector(); - typeList.add(dataType); - - // the xsdhelper returns a string that contains the schemas for this type - String schemaDefns = xsdHelper.generate(typeList, schemaLocationMap); - - // extract the schema elements and store them in the schema map - extractSchemas(schemaDefns); - } - // since the XSDHelper will not return the type name, create it and store it in typetable - schemaTypeName = new QName(dataType.getURI(), dataType.getName(), generatePrefix()); - typeTable.addComplexSchemaType(dataType.getURI(), - dataType.getName(), - schemaTypeName); - - } - return schemaTypeName; - } - - /** - * Identify the java type (pojo versus sdo) and build the schema accordingly - * - * @param javaType reference to the class - * @return - * @throws Exception - */ - public QName generateSchema(JClass javaType) throws Exception { - if (isSDO(javaType)) { - Type dataType = createDataObject(javaType).getType(); - return buildSchema_SDO(dataType); - } else { - return buildSchema_JavaType(javaType); - } - } - - private XmlSchema getXmlSchema(String targetNamespace) { - XmlSchema xmlSchema; - - if ((xmlSchema = (XmlSchema) schemaMap.get(targetNamespace)) == null) { - String targetNamespacePrefix = generatePrefix(); - - xmlSchema = new XmlSchema(targetNamespace, xmlSchemaCollection); - xmlSchema.setAttributeFormDefault(getAttrFormDefaultSetting()); - xmlSchema.setElementFormDefault(getElementFormDefaultSetting()); - - targetNamespacePrefixMap.put(targetNamespace, targetNamespacePrefix); - schemaMap.put(targetNamespace, xmlSchema); - - NamespaceMap prefixmap = new NamespaceMap(); - prefixmap.put(TuscanyTypeTable.XS_URI_PREFIX, TuscanyTypeTable.XML_SCHEMA_URI); - prefixmap.put(targetNamespacePrefix, targetNamespace); - xmlSchema.setNamespaceContext(prefixmap); - } - return xmlSchema; - } - - /** - * JAM convert first name of an attribute into UpperCase as an example if there is a instance variable called foo in a bean , then Jam give that - * as Foo so this method is to correct that error - * - * @param wrongName - * @return the right name, using English as the locale for case conversion - */ - public static String getCorrectName(String wrongName) { - if (wrongName.length() > 1) { - return wrongName.substring(0, 1).toLowerCase(Locale.ENGLISH) + wrongName.substring(1, wrongName.length()); - } else { - return wrongName.substring(0, 1).toLowerCase(Locale.ENGLISH); - } - } - - private String addImports(XmlSchema xmlSchema, QName schemaTypeName) { - String prefix = null; - String[] prefixes = xmlSchema.getNamespaceContext().getDeclaredPrefixes(); - for (int count = 0; count < prefixes.length; ++count) { - if (schemaTypeName.getNamespaceURI(). - equals(xmlSchema.getNamespaceContext().getNamespaceURI(prefixes[count])) ) { - return prefixes[count]; - } - } - - XmlSchemaImport importElement = new XmlSchemaImport(); - importElement.setNamespace(schemaTypeName.getNamespaceURI()); - xmlSchema.getItems().add(importElement); - prefix = generatePrefix(); - //it is safe to cast like this since it was this class that instantiated the - //NamespaceContext and assigned it to an instance of a NamespaceMap (see method getXmlSchema) - ((NamespaceMap)xmlSchema.getNamespaceContext()).put(prefix, - schemaTypeName.getNamespaceURI()); - - return prefix; - } - - private String formGlobalElementName(String typeName) { - String firstChar = typeName.substring(0, 1); - return typeName.replaceFirst(firstChar, firstChar.toLowerCase()); - } - - private void createGlobalElement(XmlSchema xmlSchema, XmlSchemaComplexType complexType, QName elementName) { - XmlSchemaElement globalElement = new XmlSchemaElement(); - globalElement.setSchemaTypeName(complexType.getQName()); - globalElement.setName(formGlobalElementName(complexType.getName())); - globalElement.setQName(elementName); - - xmlSchema.getItems().add(globalElement); - xmlSchema.getElements().add(elementName, globalElement); - } - - private DataObject createDataObject(JClass sdoClass) throws Exception { - Class sdoType = Class.forName(sdoClass.getQualifiedName(), true, classLoader); - - //register the factory - detectAndRegisterFactory(sdoType); - - //create data object - Constructor constructor = sdoType.getDeclaredConstructor(new Class[0]); - constructor.setAccessible(true); - Object instance = constructor.newInstance(new Object[0]); - return (DataObject) instance; - } - - private String generatePrefix() { - return NAME_SPACE_PREFIX + prefixCount++; - } - - private void includeExtXSD(Type dataType) { - // now we know there is a type for which the XSD must come from outside - // create a schema for the namespace of this type and add an include in it for - // the xsd that is defined externally - XmlSchema xmlSchema = getXmlSchema(dataType.getURI()); - - // ideally there could be more than one external schema definitions for a namespace - // and hence schemalocations will be a list of locations - // List schemaLocations = (List)schemaLocationMap.get(dataType.getURI()); - - // since as per the specs the input to XSDHelper is a map of allowing - // only one schemalocation for a namespace. So for now this single location will be - // picked up and put into a list - List schemaLocations = new Vector(); - - if (schemaLocationMap.get(dataType.getURI()) != null) { - schemaLocations.add(schemaLocationMap.get(dataType.getURI())); - } - - if (schemaLocations.size() <= 0) { - schemaLocations.add(DEFAULT_SCHEMA_LOCATION); - } - - Iterator includesIterator = xmlSchema.getIncludes().getIterator(); - Iterator schemaLocIterator = schemaLocations.iterator(); - String aSchemaLocation = null; - boolean includeExists = false; - // include all external schema locations - while (schemaLocIterator.hasNext()) { - aSchemaLocation = (String) schemaLocIterator.next(); - while (includesIterator.hasNext()) { - if (!includeExists - && aSchemaLocation.equals(((XmlSchemaInclude) includesIterator.next()).getSchemaLocation())) { - includeExists = true; - } - } - - if (!includeExists) { - XmlSchemaInclude includeElement = new XmlSchemaInclude(); - includeElement.setSchemaLocation(aSchemaLocation); - xmlSchema.getIncludes().add(includeElement); - xmlSchema.getItems().add(includeElement); - } - } - - } - - private void extractSchemas(String schemaDefns) { - // load each schema element and add it to the schema map - - String token = getToken(schemaDefns); - int curIndex = schemaDefns.indexOf(token); - int nextIndex = schemaDefns.indexOf(token, - curIndex + token.length()); - - while (curIndex != -1) { - StringReader sr = null; - if (nextIndex != -1) - sr = new StringReader(schemaDefns.substring(curIndex, - nextIndex)); - else - sr = new StringReader(schemaDefns.substring(curIndex)); - - XmlSchemaCollection collection = new XmlSchemaCollection(); - XmlSchema aSchema = collection.read(sr, - null); - addSchemaToMap(aSchema); - - curIndex = nextIndex; - nextIndex = schemaDefns.indexOf(token, - curIndex + token.length()); - } - } - - private void addSchemaToMap(XmlSchema extractedSchema) { - // check if a Schema object already exists in schema map for targetNamespace of this schema element - // if it does then copy the contents of this schema element to the existing one, ensuring that - // duplicate elements are not created. i.e. before adding some child element like 'include' or 'import' - // check if it already exists, if it does don't add this - XmlSchema existingSchema = (XmlSchema) schemaMap.get(extractedSchema.getTargetNamespace()); - - if (existingSchema == null) { - extractedSchema.setAttributeFormDefault(getAttrFormDefaultSetting()); - extractedSchema.setElementFormDefault(getElementFormDefaultSetting()); - schemaMap.put(extractedSchema.getTargetNamespace(), extractedSchema); - - } else { - copySchemaItems(existingSchema, - extractedSchema); - } - } - - private void copySchemaItems(XmlSchema existingSchema, XmlSchema aSchema) { - // items to copy are imports, includes, elements, types ... - // each item is checked if it is a duplicate entry and copied only if it isn't - Iterator itemsIterator = aSchema.getItems().getIterator(); - Object schemaObject = null; - XmlSchemaElement schemaElement = null; - XmlSchemaType schemaType = null; - XmlSchemaInclude schemaInclude = null; - QName qName = null; - List existingIncludes = getExistingIncludes(existingSchema); - - while (itemsIterator.hasNext()) { - schemaObject = itemsIterator.next(); - if (schemaObject instanceof XmlSchemaElement) { - schemaElement = (XmlSchemaElement) schemaObject; - qName = schemaElement.getQName(); - // if the element does not exist in the existing schema - if (existingSchema.getElementByName(qName) == null) { - // add it to the existing schema - existingSchema.getElements().add(qName, schemaElement); - existingSchema.getItems().add(schemaElement); - } - } else if (schemaObject instanceof XmlSchemaType) { - schemaType = (XmlSchemaType) itemsIterator.next(); - qName = schemaType.getQName(); - // if the element does not exist in the existing schema - if (existingSchema.getElementByName(qName) == null) { - // add it to the existing schema - existingSchema.getSchemaTypes().add(qName, schemaType); - existingSchema.getItems().add(schemaType); - // add imports - addImports(existingSchema, qName); - } - } else if (schemaObject instanceof XmlSchemaInclude) { - schemaInclude = (XmlSchemaInclude) itemsIterator.next(); - if (!existingIncludes.contains(schemaInclude.getSchemaLocation())) { - existingSchema.getIncludes().add(schemaInclude); - existingSchema.getItems().add(schemaInclude); - } - } - } - } - - private List getExistingIncludes(XmlSchema xmlSchema) { - List includeSchemaLocations = new Vector(); - Iterator iterator = xmlSchema.getIncludes().getIterator(); - - while (iterator.hasNext()) { - includeSchemaLocations.add(((XmlSchemaInclude) iterator.next()).getSchemaLocation()); - } - return includeSchemaLocations; - } - - private XmlSchemaForm getAttrFormDefaultSetting() { - if (FORM_DEFAULT_UNQUALIFIED.equals(getAttrFormDefault())) { - return new XmlSchemaForm(XmlSchemaForm.UNQUALIFIED); - } else { - return new XmlSchemaForm(XmlSchemaForm.QUALIFIED); - } - } - - private XmlSchemaForm getElementFormDefaultSetting() { - if (FORM_DEFAULT_UNQUALIFIED.equals(getElementFormDefault())) { - return new XmlSchemaForm(XmlSchemaForm.UNQUALIFIED); - } else { - return new XmlSchemaForm(XmlSchemaForm.QUALIFIED); - } - } - - private String getToken(String s) { - // get the schema element name e.g. cls) { - String name = cls.getName(); - int index = name.lastIndexOf('.'); - return index == -1 ? "" : name.substring(0, index); - } - - /** - * Recognize the pattern of generated SDO type names vs. SDO factory names. - * E.g. SDO class: test.sca.w2j.gen.Company will be associated with - * SDO factory: test.sca.w2j.gen.GenFactory - */ - private void detectAndRegisterFactory(Class sdoClass) { - String pkgName = getPackageName(sdoClass); - - // Find last segment, e.g. from 'test.sca.w2j.gen' produce 'gen'. - int lastDot = pkgName.lastIndexOf('.'); - String lastSegment = pkgName.substring(lastDot+1); - - String rest = lastSegment.substring(1); - String firstChar = lastSegment.substring(0,1).toUpperCase(); - - String factoryBaseName = pkgName + "." + firstChar + rest + "Factory"; - - Class factoryClass = null; - try { - factoryClass = Class.forName(factoryBaseName, true, classLoader); - if (!alreadyPrintedDefaultSDOFactoryFound) { - System.out.println("Found default generated SDO Factory with name: " + factoryBaseName + "; Registering."); - alreadyPrintedDefaultSDOFactoryFound = true; - } - registerSDOFactory(factoryClass); - } catch (ClassNotFoundException e) { - if (!alreadyPrintedDefaultSDOFactoryNotFound) { - System.out.println("Did not find default generated SDO Factory with name: " + factoryBaseName + "; Continue." ); - alreadyPrintedDefaultSDOFactoryNotFound = true; - } - } - } - - private void registerSDOFactory(Class factoryClass) { - String factoryClassName = factoryClass.getName(); - if (!registeredSDOFactories.contains(factoryClassName)) { - try { - Field field = factoryClass.getField("INSTANCE"); - Object factoryImpl = field.get(null); - Method method = factoryImpl.getClass().getMethod("register", new Class[] {HelperContext.class}); - method.invoke(factoryImpl, new Object[] {this.helperContext}); - } catch (Exception e) { - e.printStackTrace(); - System.out.println(""); - System.out.println("Fatal error registering factoryClassName = " + factoryClassName); - throw new IllegalArgumentException(e); - } - registeredSDOFactories.add(factoryClassName); - } - } -} diff --git a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2OMBuilder.java b/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2OMBuilder.java deleted file mode 100644 index fd10c77f8b..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2OMBuilder.java +++ /dev/null @@ -1,429 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import java.io.ByteArrayInputStream; -import java.io.StringWriter; -import java.util.Collection; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.Iterator; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamReader; - -import org.apache.axiom.om.OMAbstractFactory; -import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.OMFactory; -import org.apache.axiom.om.OMNamespace; -import org.apache.axiom.om.OMNode; -import org.apache.axiom.om.impl.builder.StAXOMBuilder; -import org.apache.ws.commons.schema.XmlSchema; -import org.codehaus.jam.JMethod; - -public class TuscanyJava2OMBuilder implements TuscanyJava2WSDLConstants { - - private TuscanyTypeTable typeTable = null; - - private static int prefixCount = 1; - - private static final String NAMESPACE_PREFIX = "ns"; - - private JMethod method[]; - - private Collection schemaCollection; - - private GenerationParameters generationParams; - - private OMNamespace ns1; - - private OMNamespace soap; - - private OMNamespace soap12; - - private OMNamespace tns; - - private OMNamespace wsdl; - - private OMNamespace mime; - - private OMNamespace http; - - public TuscanyJava2OMBuilder(JMethod[] method, - Collection schemaCollection, - TuscanyTypeTable typeTab, - GenerationParameters genParams) { - this.method = method; - this.schemaCollection = schemaCollection; - this.typeTable = typeTab; - this.generationParams = genParams; - } - - public OMElement generateOM() throws Exception { - OMFactory fac = OMAbstractFactory.getOMFactory(); - wsdl = fac.createOMNamespace(WSDL_NAMESPACE, DEFAULT_WSDL_NAMESPACE_PREFIX); - OMElement ele = fac.createOMElement("definitions", wsdl); - - ele.addAttribute("targetNamespace", generationParams.getTargetNamespace(), null); - generateNamespaces(fac, ele); - generateTypes(fac, ele); - generateMessages(fac, ele); - generatePortType(fac, ele); - generateBinding(fac, ele); - generateService(fac, ele); - return ele; - } - - private void generateNamespaces(OMFactory fac, OMElement defintions) throws Exception { - soap = defintions.declareNamespace(URI_WSDL11_SOAP, SOAP11_PREFIX); - tns = - defintions.declareNamespace(generationParams.getTargetNamespace(), generationParams - .getTargetNamespacePrefix()); - soap12 = defintions.declareNamespace(URI_WSDL12_SOAP, SOAP12_PREFIX); - http = defintions.declareNamespace(HTTP_NAMESPACE, HTTP_PREFIX); - mime = defintions.declareNamespace(MIME_NAMESPACE, MIME_PREFIX); - } - - private void generateTypes(OMFactory fac, OMElement defintions) throws Exception { - OMElement wsdlTypes = fac.createOMElement("types", wsdl); - StringWriter writer = new StringWriter(); - - // wrap the Schema elements with this start and end tags to create a - // document root - // under which the schemas can fall into - writer.write(""); - writeSchemas(writer); - writer.write(""); - - XMLStreamReader xmlReader = - XMLInputFactory.newInstance().createXMLStreamReader(new ByteArrayInputStream(writer.toString().getBytes())); - - StAXOMBuilder staxOMBuilders = new StAXOMBuilder(fac, xmlReader); - OMElement documentElement = staxOMBuilders.getDocumentElement(); - - Iterator iterator = documentElement.getChildElements(); - while (iterator.hasNext()) { - wsdlTypes.addChild((OMNode)iterator.next()); - } - defintions.addChild(wsdlTypes); - } - - private void writeSchemas(StringWriter writer) { - Iterator iterator = schemaCollection.iterator(); - XmlSchema xmlSchema = null; - - while (iterator.hasNext()) { - xmlSchema = (XmlSchema)iterator.next(); - // typeIterator = xmlSchema.getSchemaTypes().getValues(); - /* - * while (typeIterator.hasNext()) { - * xmlSchema.getItems().add((XmlSchemaObject) typeIterator.next()); } - */ - xmlSchema.write(writer); - } - } - - private void generateMessages(OMFactory fac, OMElement definitions) throws Exception { - Hashtable namespaceMap = new Hashtable(); - String namespacePrefix = null; - String namespaceURI = null; - QName messagePartType = null; - for (int i = 0; i < method.length; i++) { - JMethod jmethod = method[i]; - - if (jmethod.isPublic()) { - // Request Message - OMElement requestMessge = fac.createOMElement(MESSAGE_LOCAL_NAME, wsdl); - requestMessge.addAttribute(ATTRIBUTE_NAME, jmethod.getSimpleName() + MESSAGE_SUFFIX, null); - definitions.addChild(requestMessge); - - // only if a type for the message part has already been defined - if ((messagePartType = - typeTable.getComplexSchemaTypeName(generationParams.getSchemaTargetNamespace(), jmethod - .getSimpleName())) != null) { - namespaceURI = messagePartType.getNamespaceURI(); - // avoid duplicate namespaces - if ((namespacePrefix = (String)namespaceMap.get(namespaceURI)) == null) { - namespacePrefix = generatePrefix(); - namespaceMap.put(namespaceURI, namespacePrefix); - } - - OMElement requestPart = fac.createOMElement(PART_ATTRIBUTE_NAME, wsdl); - requestMessge.addChild(requestPart); - requestPart.addAttribute(ATTRIBUTE_NAME, "part1", null); - - requestPart.addAttribute(ELEMENT_ATTRIBUTE_NAME, namespacePrefix + COLON_SEPARATOR - + jmethod.getSimpleName(), null); - } - - // only if a type for the message part has already been defined - if ((messagePartType = - typeTable.getComplexSchemaTypeName(generationParams.getSchemaTargetNamespace(), jmethod - .getSimpleName() + RESPONSE)) != null) { - namespaceURI = messagePartType.getNamespaceURI(); - if ((namespacePrefix = (String)namespaceMap.get(namespaceURI)) == null) { - namespacePrefix = generatePrefix(); - namespaceMap.put(namespaceURI, namespacePrefix); - } - // Response Message - OMElement responseMessge = fac.createOMElement(MESSAGE_LOCAL_NAME, wsdl); - responseMessge.addAttribute(ATTRIBUTE_NAME, jmethod.getSimpleName() + RESPONSE_MESSAGE, null); - definitions.addChild(responseMessge); - OMElement responsePart = fac.createOMElement(PART_ATTRIBUTE_NAME, wsdl); - responseMessge.addChild(responsePart); - responsePart.addAttribute(ATTRIBUTE_NAME, "part1", null); - - responsePart.addAttribute(ELEMENT_ATTRIBUTE_NAME, namespacePrefix + COLON_SEPARATOR - + jmethod.getSimpleName() - + RESPONSE, null); - } - } - } - - // now add these unique namespaces to the the definitions element - Enumeration enumeration = namespaceMap.keys(); - while (enumeration.hasMoreElements()) { - namespaceURI = (String)enumeration.nextElement(); - definitions.declareNamespace(namespaceURI, (String)namespaceMap.get(namespaceURI)); - } - } - - /** - * Generate the porttypes - */ - private void generatePortType(OMFactory fac, OMElement defintions) { - JMethod jmethod = null; - OMElement operation = null; - OMElement message = null; - OMElement portType = fac.createOMElement(PORT_TYPE_LOCAL_NAME, wsdl); - defintions.addChild(portType); - // changed default PortType name to match Java interface name - // instead of appending "PortType". - portType.addAttribute(ATTRIBUTE_NAME, generationParams.getServiceName(), null); - // adding message refs - for (int i = 0; i < method.length; i++) { - jmethod = method[i]; - - if (jmethod.isPublic()) { - operation = fac.createOMElement(OPERATION_LOCAL_NAME, wsdl); - portType.addChild(operation); - operation.addAttribute(ATTRIBUTE_NAME, jmethod.getSimpleName(), null); - - message = fac.createOMElement(IN_PUT_LOCAL_NAME, wsdl); - message.addAttribute(MESSAGE_LOCAL_NAME, tns.getPrefix() + COLON_SEPARATOR - + jmethod.getSimpleName() - + MESSAGE_SUFFIX, null); - operation.addChild(message); - - if (!jmethod.getReturnType().isVoidType() || - jmethod.getAnnotation("org.osoa.sca.annotations.OneWay") == null) { - message = fac.createOMElement(OUT_PUT_LOCAL_NAME, wsdl); - message.addAttribute(MESSAGE_LOCAL_NAME, tns.getPrefix() + COLON_SEPARATOR - + jmethod.getSimpleName() - + RESPONSE_MESSAGE, null); - operation.addChild(message); - } - } - } - - } - - /** - * Generate the service - */ - public void generateService(OMFactory fac, OMElement defintions) { - OMElement service = fac.createOMElement(SERVICE_LOCAL_NAME, wsdl); - defintions.addChild(service); - // Add "WebService" to the end of WSDL service name - service.addAttribute(ATTRIBUTE_NAME, generationParams.getServiceName() + WSDL_SERVICE_SUFFIX, null); - OMElement port = fac.createOMElement(PORT, wsdl); - service.addChild(port); - port.addAttribute(ATTRIBUTE_NAME, generationParams.getServiceName() + SOAP11PORT, null); - port.addAttribute(BINDING_LOCAL_NAME, tns.getPrefix() + COLON_SEPARATOR - + generationParams.getServiceName() - + BINDING_NAME_SUFFIX, null); - addExtensionElement(fac, - port, - soap, - SOAP_ADDRESS, - LOCATION, - generationParams.getLocationUri() + generationParams.getServiceName()); - - port = fac.createOMElement(PORT, wsdl); - service.addChild(port); - port.addAttribute(ATTRIBUTE_NAME, generationParams.getServiceName() + SOAP12PORT, null); - port.addAttribute(BINDING_LOCAL_NAME, tns.getPrefix() + COLON_SEPARATOR - + generationParams.getServiceName() - + SOAP12BINDING_NAME_SUFFIX, null); - addExtensionElement(fac, - port, - soap12, - SOAP_ADDRESS, - LOCATION, - generationParams.getLocationUri() + generationParams.getServiceName()); - } - - /** - * Generate the bindings - */ - private void generateBinding(OMFactory fac, OMElement defintions) throws Exception { - generateSoap11Binding(fac, defintions); - generateSoap12Binding(fac, defintions); - } - - private void generateSoap11Binding(OMFactory fac, OMElement defintions) throws Exception { - OMElement binding = fac.createOMElement(BINDING_LOCAL_NAME, wsdl); - defintions.addChild(binding); - binding.addAttribute(ATTRIBUTE_NAME, generationParams.getServiceName() + BINDING_NAME_SUFFIX, null); - // changed default PortType name to match Java interface name - // instead of appending "PortType". - binding.addAttribute("type", tns.getPrefix() + COLON_SEPARATOR + generationParams.getServiceName(), null); - - addExtensionElement(fac, binding, soap, BINDING_LOCAL_NAME, TRANSPORT, TRANSPORT_URI, STYLE, generationParams - .getStyle()); - - for (int i = 0; i < method.length; i++) { - JMethod jmethod = method[i]; - if (jmethod.isPublic()) { - OMElement operation = fac.createOMElement(OPERATION_LOCAL_NAME, wsdl); - binding.addChild(operation); - - addExtensionElement(fac, - operation, - soap, - OPERATION_LOCAL_NAME, - SOAP_ACTION, - URN_PREFIX + COLON_SEPARATOR + jmethod.getSimpleName(), - STYLE, - generationParams.getStyle()); - operation.addAttribute(ATTRIBUTE_NAME, jmethod.getSimpleName(), null); - - OMElement input = fac.createOMElement(IN_PUT_LOCAL_NAME, wsdl); - addExtensionElement(fac, - input, - soap, - SOAP_BODY, - SOAP_USE, - generationParams.getUse(), - "namespace", - generationParams.getTargetNamespace()); - operation.addChild(input); - - if (!jmethod.getReturnType().isVoidType()) { - OMElement output = fac.createOMElement(OUT_PUT_LOCAL_NAME, wsdl); - addExtensionElement(fac, - output, - soap, - SOAP_BODY, - SOAP_USE, - generationParams.getUse(), - "namespace", - generationParams.getTargetNamespace()); - operation.addChild(output); - } - } - } - } - - private void generateSoap12Binding(OMFactory fac, OMElement defintions) throws Exception { - OMElement binding = fac.createOMElement(BINDING_LOCAL_NAME, wsdl); - defintions.addChild(binding); - binding.addAttribute(ATTRIBUTE_NAME, generationParams.getServiceName() + SOAP12BINDING_NAME_SUFFIX, null); - // changed default PortType name to match Java interface name - // instead of appending "PortType". - binding.addAttribute("type", tns.getPrefix() + COLON_SEPARATOR + generationParams.getServiceName(), null); - - addExtensionElement(fac, binding, soap12, BINDING_LOCAL_NAME, TRANSPORT, TRANSPORT_URI, STYLE, generationParams - .getStyle()); - - for (int i = 0; i < method.length; i++) { - JMethod jmethod = method[i]; - - if (jmethod.isPublic()) { - OMElement operation = fac.createOMElement(OPERATION_LOCAL_NAME, wsdl); - binding.addChild(operation); - operation.declareNamespace(URI_WSDL12_SOAP, SOAP12_PREFIX); - - addExtensionElement(fac, - operation, - soap12, - OPERATION_LOCAL_NAME, - SOAP_ACTION, - URN_PREFIX + COLON_SEPARATOR + jmethod.getSimpleName(), - STYLE, - generationParams.getStyle()); - operation.addAttribute(ATTRIBUTE_NAME, jmethod.getSimpleName(), null); - - OMElement input = fac.createOMElement(IN_PUT_LOCAL_NAME, wsdl); - addExtensionElement(fac, - input, - soap12, - SOAP_BODY, - SOAP_USE, - generationParams.getUse(), - "namespace", - generationParams.getTargetNamespace()); - operation.addChild(input); - - if (!jmethod.getReturnType().isVoidType()) { - OMElement output = fac.createOMElement(OUT_PUT_LOCAL_NAME, wsdl); - addExtensionElement(fac, - output, - soap12, - SOAP_BODY, - SOAP_USE, - generationParams.getUse(), - "namespace", - generationParams.getTargetNamespace()); - operation.addChild(output); - } - } - } - } - - private void addExtensionElement(OMFactory fac, - OMElement element, - OMNamespace namespace, - String name, - String att1Name, - String att1Value, - String att2Name, - String att2Value) { - OMElement soapbinding = fac.createOMElement(name, namespace); - element.addChild(soapbinding); - soapbinding.addAttribute(att1Name, att1Value, null); - soapbinding.addAttribute(att2Name, att2Value, null); - } - - private void addExtensionElement(OMFactory fac, - OMElement element, - OMNamespace namespace, - String name, - String att1Name, - String att1Value) { - OMElement soapbinding = fac.createOMElement(name, namespace); - element.addChild(soapbinding); - soapbinding.addAttribute(att1Name, att1Value, null); - } - - private String generatePrefix() { - return NAMESPACE_PREFIX + prefixCount++; - } -} diff --git a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLBuilder.java b/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLBuilder.java deleted file mode 100644 index 18cfafa4e3..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLBuilder.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import java.io.OutputStream; -import java.util.ArrayList; -import java.util.Collection; - -import org.apache.axiom.om.OMElement; -import org.apache.axis2.description.java2wsdl.Java2WSDLConstants; - -public class TuscanyJava2WSDLBuilder implements Java2WSDLConstants { - - private OutputStream out; - private String className; - private ClassLoader classLoader; - private String wsdlPrefix = "wsdl"; - - // these apply for the WSDL - private GenerationParameters generationParams; - - private OMElement wsdlDocument = null; - - public String getWsdlPrefix() { - return wsdlPrefix; - } - - public void setWsdlPrefix(String wsdlPrefix) { - this.wsdlPrefix = wsdlPrefix; - } - - public TuscanyJava2WSDLBuilder(GenerationParameters genParams) { - this.generationParams = genParams; - } - - /** - * Externally visible generator method - * - * @throws Exception - */ - public void buildWSDL() throws Exception { - ArrayList excludeOpeartion = new ArrayList(); - excludeOpeartion.add("init"); - excludeOpeartion.add("setOperationContext"); - excludeOpeartion.add("destroy"); - - TuscanyWSDLTypesGenerator typesGenerator = new TuscanyWSDLTypesGenerator(generationParams); - typesGenerator.setExcludeMethods(excludeOpeartion); - Collection schemaCollection = typesGenerator.buildWSDLTypes(); - - TuscanyJava2OMBuilder java2OMBuilder = - new TuscanyJava2OMBuilder(typesGenerator.getMethods(), schemaCollection, typesGenerator - .getTypeTable(), generationParams); - - wsdlDocument = java2OMBuilder.generateOM(); - } - - public OMElement getWsdlDocument() { - return wsdlDocument; - } - - public void setWsdlDocument(OMElement wsdlDocument) { - this.wsdlDocument = wsdlDocument; - } -} diff --git a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLConstants.java b/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLConstants.java deleted file mode 100644 index 3750dc27f5..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLConstants.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import org.apache.axis2.description.java2wsdl.Java2WSDLConstants; - -/** - * This is a extension from the Axis2 Java2WSDLConstants to handle additions specific to Tuscany. - * This class can be done away with once Axis2 is also enhanced to support these - * additional options. - * - */ -public interface TuscanyJava2WSDLConstants extends Java2WSDLConstants -{ - public static final char OPEN_BRACKET = '['; - public static final char COMMA = ','; - public static final char CLOSE_BRACKET = ']'; - public static final String DEFAULT_SCHEMA_LOCATION = "*.xsd"; - public static final String SCHEMA_ELEMENT_NAME = "schema"; - - String FORM_DEFAULT_QUALIFIED = "qualified"; - String FORM_DEFAULT_UNQUALIFIED = "unqualified"; - - //short options - String IMPORT_XSD_OPTION = "ixsd"; //option for importing XSDs - String ATTR_FORM_DEFAULT_OPTION = "afd"; - String ELEMENT_FORM_DEFAULT_OPTION = "efd"; - String EXTRA_CLASSES_DEFAULT_OPTION = "xc"; - String FACTORY_CLASSNAMES_OPTION = "fcn"; - - //long options - String IMPORT_XSD_OPTION_LONG = "import_xsd"; //option for importing XSDs - String ATTR_FORM_DEFAULT_OPTION_LONG = "attributeFormDefault"; - String ELEMENT_FORM_DEFAULT_OPTION_LONG = "elementFormDefault"; - String EXTRA_CLASSES_DEFAULT_OPTION_LONG = "extraClasses"; - String FACTORY_CLASSNAMES_OPTION_LONG = "factoryClassNames"; - - // This is a new creation, not an override. - String WSDL_SERVICE_SUFFIX = "WebService"; -} diff --git a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLOptionsValidator.java b/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLOptionsValidator.java deleted file mode 100644 index d6cd8a7f57..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLOptionsValidator.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import java.util.ArrayList; - -import org.apache.ws.java2wsdl.utils.Java2WSDLCommandLineOption; -import org.apache.ws.java2wsdl.utils.Java2WSDLOptionsValidator; - -/** - * This class is an extension from the Axis2 implementation in order to handle - * additional options specific to Tuscany. This class can be done away with once - * Axis2 is also enhanced to support these additional options. - */ -public class TuscanyJava2WSDLOptionsValidator extends Java2WSDLOptionsValidator implements TuscanyJava2WSDLConstants { - @Override - public boolean isInvalid(Java2WSDLCommandLineOption option) { - boolean invalid; - String optionType = option.getOptionType(); - - invalid = - !((IMPORT_XSD_OPTION).equalsIgnoreCase(optionType) || (IMPORT_XSD_OPTION_LONG).equalsIgnoreCase(optionType) - || (TuscanyJava2WSDLConstants.EXTRA_CLASSES_DEFAULT_OPTION_LONG).equalsIgnoreCase(optionType) - || (TuscanyJava2WSDLConstants.EXTRA_CLASSES_DEFAULT_OPTION).equalsIgnoreCase(optionType) - || (TuscanyJava2WSDLConstants.FACTORY_CLASSNAMES_OPTION_LONG).equalsIgnoreCase(optionType) - || (TuscanyJava2WSDLConstants.FACTORY_CLASSNAMES_OPTION).equalsIgnoreCase(optionType) || !super - .isInvalid(option)); - - invalid = validateImportXSDOption(invalid, option); - - return invalid; - } - - private boolean validateImportXSDOption(boolean invalid, Java2WSDLCommandLineOption option) { - String optionType = option.getOptionType(); - String schemaNSLocationPair = null; - - if (!invalid && (IMPORT_XSD_OPTION).equalsIgnoreCase(optionType) - || (IMPORT_XSD_OPTION_LONG).equalsIgnoreCase(optionType)) { - ArrayList optionValues = option.getOptionValues(); - - for (int count = 0; count < optionValues.size(); ++count) { - schemaNSLocationPair = ((String)optionValues.get(count)).trim(); - if ((schemaNSLocationPair.charAt(0) != OPEN_BRACKET) || (schemaNSLocationPair - .charAt(schemaNSLocationPair.length() - 1) != CLOSE_BRACKET) - || (schemaNSLocationPair.indexOf(COMMA) == -1)) - - { - System.out.println("Schema Namespace-Location pair option not specified properly!!"); - invalid = true; - } - } - } - - return invalid; - } -} diff --git a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanySchemaGenerator.java b/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanySchemaGenerator.java deleted file mode 100644 index 03291428a2..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanySchemaGenerator.java +++ /dev/null @@ -1,348 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.Hashtable; -import java.util.Map; - -import javax.xml.namespace.QName; - -import org.apache.axis2.description.java2wsdl.bytecode.MethodTable; -import org.apache.tuscany.sdo.util.DataObjectUtil; -import org.apache.ws.commons.schema.XmlSchema; -import org.apache.ws.commons.schema.XmlSchemaCollection; -import org.apache.ws.commons.schema.XmlSchemaComplexType; -import org.apache.ws.commons.schema.XmlSchemaElement; -import org.apache.ws.commons.schema.XmlSchemaForm; -import org.apache.ws.commons.schema.XmlSchemaImport; -import org.apache.ws.commons.schema.XmlSchemaInclude; -import org.apache.ws.commons.schema.XmlSchemaSequence; -import org.apache.ws.commons.schema.utils.NamespaceMap; -import org.codehaus.jam.JClass; -import org.codehaus.jam.JMethod; -import org.codehaus.jam.JParameter; -import org.codehaus.jam.JamClassIterator; -import org.codehaus.jam.JamService; -import org.codehaus.jam.JamServiceFactory; -import org.codehaus.jam.JamServiceParams; - -public class TuscanySchemaGenerator implements TuscanyJava2WSDLConstants { - public static final String NAME_SPACE_PREFIX = "stn_"; - public static final String PERIOD_SEPARATOR = "."; - private static int prefixCount = 1; - - protected String attrFormDefault = null; - protected String elementFormDefault = null; - protected Hashtable targetNamespacePrefixMap = new Hashtable(); - protected Hashtable schemaMap = new Hashtable(); - protected Hashtable sdoAnnoMap = new Hashtable(); - protected XmlSchemaCollection xmlSchemaCollection = new XmlSchemaCollection(); - private TuscanyTypeTable typeTable = new TuscanyTypeTable(); - protected SchemaBuilder schemaBuilder = null; - protected Map schemaLocationMap = null; - - private ClassLoader classLoader; - private String className; - - // to keep loaded method using JAM - private JMethod methods[]; - - // to store byte code method using Axis 1.x codes - private MethodTable methodTable; - private String schemaTargetNameSpace; - private String schema_namespace_prefix; - private Class clazz; - private ArrayList excludeMethods = new ArrayList(); - - public TuscanySchemaGenerator(ClassLoader loader, - String className, - String schematargetNamespace, - String schematargetNamespacePrefix, - Map schemaLocMap) throws Exception { - DataObjectUtil.initRuntime(); - this.classLoader = loader; - this.className = className; - clazz = Class.forName(className, true, loader); - methodTable = new MethodTable(clazz); - this.schemaTargetNameSpace = schematargetNamespace; - this.schema_namespace_prefix = schematargetNamespacePrefix; - this.schemaLocationMap = schemaLocMap; - - initializeSchemaMap(this.schemaTargetNameSpace, this.schema_namespace_prefix); - schemaBuilder = - new SchemaBuilder(xmlSchemaCollection, schemaMap, targetNamespacePrefixMap, typeTable, - getAttrFormDefault(), getElementFormDefault(), schemaLocMap, this.classLoader, null); - } - - /** - * Generates schema for all the parameters in method. First generates schema - * for all different parameter type and later refers to them. - * - * @return Returns XmlSchema. - * @throws Exception - */ - public Collection buildWSDLTypes() throws Exception { - JamServiceFactory factory = JamServiceFactory.getInstance(); - JamServiceParams jam_service_parms = factory.createServiceParams(); - // setting the classLoder - // jam_service_parms.setParentClassLoader(factory.createJamClassLoader(classLoader)); - // it can possible to add the classLoader as well - jam_service_parms.addClassLoader(classLoader); - jam_service_parms.includeClass(className); - JamService service = factory.createService(jam_service_parms); - - JamClassIterator jClassIter = service.getClasses(); - // all most all the time the ittr will have only one class in it - while (jClassIter.hasNext()) { - JClass jclass = (JClass)jClassIter.next(); - // serviceName = jclass.getSimpleName(); - // todo in the future , when we support annotation we can use this - // JAnnotation[] annotations = jclass.getAnnotations(); - - /** - * Schema generation done in two stage 1. Load all the methods and - * create type for methods parameters (if the parameters are Bean - * then it will create Complex types for those , and if the - * parameters are simple type which describe in SimpleTypeTable - * nothing will happen) 2. In the next stage for all the methods - * messages and port types will be created - */ - methods = jclass.getDeclaredMethods(); - - // since we do not support overload - HashMap uniqueMethods = new HashMap(); - XmlSchemaComplexType methodSchemaType = null; - XmlSchemaSequence sequence = null; - for (int i = 0; i < methods.length; i++) { - String methodName = methods[i].getSimpleName(); - JMethod jMethod = methods[i]; - // no need to think about this method , since that is system - // config method - if (excludeMethods.contains(jMethod.getSimpleName())) { - continue; - } - // if (jMethod.getSimpleName().equals("init") - // || "setOperationContext".equals(jMethod.getSimpleName()) - // || "destroy".equals(jMethod.getSimpleName())) - // continue; - if (uniqueMethods.get(jMethod.getSimpleName()) != null) { - throw new Exception(" Sorry we don't support methods overloading !!!! "); - } - - if (!jMethod.isPublic()) { - // no need to generate Schema for non public methods - continue; - } - - uniqueMethods.put(jMethod.getSimpleName(), jMethod); - JParameter[] paras = jMethod.getParameters(); - String parameterNames[] = null; - if (paras.length > 0) { - parameterNames = methodTable.getParameterNames(methodName); - sequence = new XmlSchemaSequence(); - - // create the schema type for the method wrapper - methodSchemaType = createSchemaTypeForMethodPart(jMethod.getSimpleName()); - methodSchemaType.setParticle(sequence); - } - - for (int j = 0; j < paras.length; j++) { - JParameter methodParameter = paras[j]; - JClass paraType = methodParameter.getType(); - generateSchemaForType(sequence, paraType, (parameterNames != null && parameterNames[j] != null) - ? parameterNames[j] : methodParameter.getSimpleName()); - } - // for its return type - JClass returnType = jMethod.getReturnType(); - if (!returnType.isVoidType()) { - methodSchemaType = createSchemaTypeForMethodPart(jMethod.getSimpleName() + RESPONSE); - sequence = new XmlSchemaSequence(); - methodSchemaType.setParticle(sequence); - generateSchemaForType(sequence, returnType, "return"); - } - } - // generateWrapperElements(methods); - } - return schemaMap.values(); - } - - private QName generateSchemaForType(XmlSchemaSequence sequence, JClass type, String partName) throws Exception { - boolean isArrayType = type.isArrayType(); - if (isArrayType) { - type = type.getArrayComponentType(); - } - - String classTypeName = type.getQualifiedName(); - - QName schemaTypeName = typeTable.getSimpleSchemaTypeName(classTypeName); - if (schemaTypeName == null) { - schemaTypeName = schemaBuilder.generateSchema(type); - addContentToMethodSchemaType(sequence, schemaTypeName, partName, type.isArrayType()); - addImportORInclude((XmlSchema)schemaMap.get(schemaTargetNameSpace), schemaTypeName); - - } else { - addContentToMethodSchemaType(sequence, schemaTypeName, partName, type.isArrayType()); - } - - return schemaTypeName; - } - - private void addContentToMethodSchemaType(XmlSchemaSequence sequence, - QName schemaTypeName, - String paraName, - boolean isArray) { - XmlSchemaElement elt1 = new XmlSchemaElement(); - elt1.setName(paraName); - elt1.setSchemaTypeName(schemaTypeName); - sequence.getItems().add(elt1); - - if (isArray) { - elt1.setMaxOccurs(Long.MAX_VALUE); - elt1.setMinOccurs(0); - } - } - - private XmlSchemaComplexType createSchemaTypeForMethodPart(String localPartName) { - XmlSchema xmlSchema = (XmlSchema)schemaMap.get(schemaTargetNameSpace); - QName elementName = new QName(this.schemaTargetNameSpace, localPartName, this.schema_namespace_prefix); - XmlSchemaComplexType complexType = new XmlSchemaComplexType(xmlSchema); - - XmlSchemaElement globalElement = new XmlSchemaElement(); - globalElement.setSchemaType(complexType); - globalElement.setName(formGlobalElementName(localPartName)); - globalElement.setQName(elementName); - - xmlSchema.getItems().add(globalElement); - xmlSchema.getElements().add(elementName, globalElement); - - typeTable.addComplexSchemaType(this.schemaTargetNameSpace, globalElement.getName(), elementName); - - return complexType; - } - - private String formGlobalElementName(String typeName) { - String firstChar = typeName.substring(0, 1); - return typeName.replaceFirst(firstChar, firstChar.toLowerCase()); - } - - public TuscanyTypeTable getTypeTable() { - return typeTable; - } - - public JMethod[] getMethods() { - return methods; - } - - private String generatePrefix() { - return NAME_SPACE_PREFIX + prefixCount++; - } - - public void setExcludeMethods(ArrayList excludeMethods) { - this.excludeMethods = excludeMethods; - } - - private void initializeSchemaMap(String targetNamespace, String targetNamespacePrefix) { - XmlSchema xmlSchema = new XmlSchema(targetNamespace, xmlSchemaCollection); - xmlSchema.setAttributeFormDefault(getAttrFormDefaultSetting()); - xmlSchema.setElementFormDefault(getElementFormDefaultSetting()); - - targetNamespacePrefixMap.put(targetNamespace, targetNamespacePrefix); - schemaMap.put(targetNamespace, xmlSchema); - - NamespaceMap prefixmap = new NamespaceMap(); - prefixmap.put(TuscanyTypeTable.XS_URI_PREFIX, TuscanyTypeTable.XML_SCHEMA_URI); - prefixmap.put(targetNamespacePrefix, targetNamespace); - xmlSchema.setNamespaceContext(prefixmap); - } - - private void setFormDefaults() { - - } - - public Hashtable getSdoAnnoMap() { - return sdoAnnoMap; - } - - public void setSdoAnnoMap(Hashtable sdoAnnoMap) { - this.sdoAnnoMap = sdoAnnoMap; - } - - private void addImportORInclude(XmlSchema xmlSchema, QName schemaTypeName) { - // decide whether there must be an import or an include - if (xmlSchema.getTargetNamespace().equals(schemaTypeName.getNamespaceURI())) { - XmlSchema containingSchema = (XmlSchema)schemaMap.get(schemaTypeName.getNamespaceURI()); - // if the type is not defined in the Schema then include - if (containingSchema.getTypeByName(schemaTypeName) == null) { - String schemaLocation = null; - if ((schemaLocation = (String)schemaLocationMap.get(schemaTypeName.getNamespaceURI())) != null) { - schemaLocation = DEFAULT_SCHEMA_LOCATION; - } - - XmlSchemaInclude includeElement = new XmlSchemaInclude(); - includeElement.setSchemaLocation(schemaLocation); - - if (!xmlSchema.getIncludes().contains(includeElement)) { - xmlSchema.getIncludes().add(includeElement); - } - } - } else { - if (!((NamespaceMap)xmlSchema.getNamespaceContext()).values().contains(schemaTypeName.getNamespaceURI())) { - XmlSchemaImport importElement = new XmlSchemaImport(); - importElement.setNamespace(schemaTypeName.getNamespaceURI()); - xmlSchema.getItems().add(importElement); - ((NamespaceMap)xmlSchema.getNamespaceContext()).put(generatePrefix(), schemaTypeName.getNamespaceURI()); - } - } - } - - private XmlSchemaForm getAttrFormDefaultSetting() { - if (FORM_DEFAULT_UNQUALIFIED.equals(getAttrFormDefault())) { - return new XmlSchemaForm(XmlSchemaForm.UNQUALIFIED); - } else { - return new XmlSchemaForm(XmlSchemaForm.QUALIFIED); - } - } - - private XmlSchemaForm getElementFormDefaultSetting() { - if (FORM_DEFAULT_UNQUALIFIED.equals(getElementFormDefault())) { - return new XmlSchemaForm(XmlSchemaForm.UNQUALIFIED); - } else { - return new XmlSchemaForm(XmlSchemaForm.QUALIFIED); - } - } - - public String getAttrFormDefault() { - return attrFormDefault; - } - - public void setAttrFormDefault(String attrFormDefault) { - this.attrFormDefault = attrFormDefault; - } - - public String getElementFormDefault() { - return elementFormDefault; - } - - public void setElementFormDefault(String elementFormDefault) { - this.elementFormDefault = elementFormDefault; - } -} diff --git a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyTypeTable.java b/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyTypeTable.java deleted file mode 100644 index cb41c56b94..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyTypeTable.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import java.util.ArrayList; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.List; -import java.util.Vector; - -import javax.xml.namespace.QName; - -import org.apache.axiom.om.OMElement; -import org.apache.axis2.description.java2wsdl.Java2WSDLUtils; -import org.codehaus.jam.JClass; - -import commonj.sdo.DataObject; - -public class TuscanyTypeTable -{ - public static final String XML_SCHEMA_URI = "http://www.w3.org/2001/XMLSchema"; - public static final String XS_URI_PREFIX = "xs"; - public static final QName XS_QNAME = new QName(XML_SCHEMA_URI, "schema", XS_URI_PREFIX); - public static final String DELIMITER = "#"; - - private Hashtable simpleXSDTypes; - private Hashtable complexXSDTypes; - - public static String asQualifiedName(String uri, String typeName) - { - return (uri + DELIMITER + typeName); - } - - - public TuscanyTypeTable() - { - simpleXSDTypes = new Hashtable(); - complexXSDTypes = new Hashtable(); - populateSimpleXSDTypes(); - populateStdSDOTypes(); - } - - private void populateStdSDOTypes() - { - simpleXSDTypes.put("Boolean", - new QName(XML_SCHEMA_URI, "boolean", XS_URI_PREFIX)); - simpleXSDTypes.put("Byte", - new QName(XML_SCHEMA_URI, "byte", XS_URI_PREFIX)); - simpleXSDTypes.put("Bytes", - new QName(XML_SCHEMA_URI, "hexBinary", XS_URI_PREFIX)); - simpleXSDTypes.put("Character", - new QName(XML_SCHEMA_URI, "string", XS_URI_PREFIX)); - simpleXSDTypes.put("DataObject", - new QName(XML_SCHEMA_URI, "anyType", XS_URI_PREFIX)); - simpleXSDTypes.put("Date", - new QName(XML_SCHEMA_URI, "dateTime", XS_URI_PREFIX)); - simpleXSDTypes.put("Day", - new QName(XML_SCHEMA_URI, "gDay", XS_URI_PREFIX)); - simpleXSDTypes.put("Decimal", - new QName(XML_SCHEMA_URI, "decimal", XS_URI_PREFIX)); - simpleXSDTypes.put("Double", - new QName(XML_SCHEMA_URI, "double", XS_URI_PREFIX)); - simpleXSDTypes.put("Duration", - new QName(XML_SCHEMA_URI, "duration", XS_URI_PREFIX)); - simpleXSDTypes.put("Float", - new QName(XML_SCHEMA_URI, "float", XS_URI_PREFIX)); - simpleXSDTypes.put("Int", - new QName(XML_SCHEMA_URI, "int", XS_URI_PREFIX)); - simpleXSDTypes.put("Integer", - new QName(XML_SCHEMA_URI, "integer", XS_URI_PREFIX)); - simpleXSDTypes.put("Long", - new QName(XML_SCHEMA_URI, "long", XS_URI_PREFIX)); - simpleXSDTypes.put("Month", - new QName(XML_SCHEMA_URI, "gMonth", XS_URI_PREFIX)); - simpleXSDTypes.put("monthDay", - new QName(XML_SCHEMA_URI, "gMonthDay", XS_URI_PREFIX)); - simpleXSDTypes.put("Object", - new QName(XML_SCHEMA_URI, "anySimpleType", XS_URI_PREFIX)); - simpleXSDTypes.put("Short", - new QName(XML_SCHEMA_URI, "short", XS_URI_PREFIX)); - simpleXSDTypes.put("String", - new QName(XML_SCHEMA_URI, "string", XS_URI_PREFIX)); - simpleXSDTypes.put("Strings", - new QName(XML_SCHEMA_URI, "string", XS_URI_PREFIX)); - simpleXSDTypes.put("Time", - new QName(XML_SCHEMA_URI, "time", XS_URI_PREFIX)); - simpleXSDTypes.put("Year", - new QName(XML_SCHEMA_URI, "gYear", XS_URI_PREFIX)); - simpleXSDTypes.put("YearMonth", - new QName(XML_SCHEMA_URI, "gYearMonth", XS_URI_PREFIX)); - simpleXSDTypes.put("YearMonthDay", - new QName(XML_SCHEMA_URI, "date", XS_URI_PREFIX)); - simpleXSDTypes.put("URI", - new QName(XML_SCHEMA_URI, "anyURI", XS_URI_PREFIX)); - } - - private void populateSimpleXSDTypes() { - //todo pls use the types from org.apache.ws.commons.schema.constants.Constants - simpleXSDTypes.put("int", - new QName(XML_SCHEMA_URI, "int", XS_URI_PREFIX)); - simpleXSDTypes.put("java.lang.String", - new QName(XML_SCHEMA_URI, "string", XS_URI_PREFIX)); - simpleXSDTypes.put("boolean", - new QName(XML_SCHEMA_URI, "boolean", XS_URI_PREFIX)); - simpleXSDTypes.put("float", - new QName(XML_SCHEMA_URI, "float", XS_URI_PREFIX)); - simpleXSDTypes.put("double", - new QName(XML_SCHEMA_URI, "double", XS_URI_PREFIX)); - simpleXSDTypes.put("short", - new QName(XML_SCHEMA_URI, "short", XS_URI_PREFIX)); - simpleXSDTypes.put("long", - new QName(XML_SCHEMA_URI, "long", XS_URI_PREFIX)); - simpleXSDTypes.put("byte", - new QName(XML_SCHEMA_URI, "byte", XS_URI_PREFIX)); - simpleXSDTypes.put("char", - new QName(XML_SCHEMA_URI, "anyType", XS_URI_PREFIX)); - simpleXSDTypes.put("java.lang.Integer", - new QName(XML_SCHEMA_URI, "int", XS_URI_PREFIX)); - simpleXSDTypes.put("java.lang.Double", - new QName(XML_SCHEMA_URI, "double", XS_URI_PREFIX)); - simpleXSDTypes.put("java.lang.Float", - new QName(XML_SCHEMA_URI, "float", XS_URI_PREFIX)); - simpleXSDTypes.put("java.lang.Long", - new QName(XML_SCHEMA_URI, "long", XS_URI_PREFIX)); - simpleXSDTypes.put("java.lang.Character", - new QName(XML_SCHEMA_URI, "anyType", XS_URI_PREFIX)); - simpleXSDTypes.put("java.lang.Boolean", - new QName(XML_SCHEMA_URI, "boolean", XS_URI_PREFIX)); - simpleXSDTypes.put("java.lang.Byte", - new QName(XML_SCHEMA_URI, "byte", XS_URI_PREFIX)); - simpleXSDTypes.put("java.lang.Short", - new QName(XML_SCHEMA_URI, "short", XS_URI_PREFIX)); - simpleXSDTypes.put("java.util.Date", - new QName(XML_SCHEMA_URI, "dateTime", XS_URI_PREFIX)); - simpleXSDTypes.put("java.util.Calendar", - new QName(XML_SCHEMA_URI, "dateTime", XS_URI_PREFIX)); - simpleXSDTypes.put("java.lang.Object", - new QName(XML_SCHEMA_URI, "anyType", XS_URI_PREFIX)); - simpleXSDTypes.put("java.math.BigDecimal", - new QName(XML_SCHEMA_URI, "decimal", XS_URI_PREFIX)); - - // Any types - simpleXSDTypes.put(OMElement.class.getName(), - new QName(XML_SCHEMA_URI, "anyType", XS_URI_PREFIX)); - simpleXSDTypes.put(ArrayList.class.getName(), - new QName(XML_SCHEMA_URI, "anyType", XS_URI_PREFIX)); - simpleXSDTypes.put(Vector.class.getName(), - new QName(XML_SCHEMA_URI, "anyType", XS_URI_PREFIX)); - simpleXSDTypes.put(List.class.getName(), - new QName(XML_SCHEMA_URI, "anyType", XS_URI_PREFIX)); - - // I'm unsure what populateStdSDOTypes is supposed to be setting up, - // given that I still have to do this to map "commonj.sdo.DataObject" - // to xsd:anyType, but I'll do it anyway. - // - simpleXSDTypes.put(DataObject.class.getName(), - new QName(XML_SCHEMA_URI, "anyType", XS_URI_PREFIX)); - } - - public QName getStdSdoType(String typename) { - return (QName) simpleXSDTypes.get(typename); - } - - public QName getComplexSchemaTypeName(String sdoURI, String sdoTypeName) { - return (QName) complexXSDTypes.get(asQualifiedName(sdoURI, sdoTypeName)); - } - - public QName getComplexSchemaTypeName(JClass javaClass, ClassLoader cl) throws Exception { - String namespace = Java2WSDLUtils.schemaNamespaceFromClassName(javaClass.getQualifiedName(), cl).toString(); - return (QName) complexXSDTypes.get(asQualifiedName(namespace, javaClass.getSimpleName())); - } - - public boolean isSimpleType(String typeName) { - Iterator keys = simpleXSDTypes.keySet().iterator(); - while (keys.hasNext()) { - String s = (String) keys.next(); - if (s.equals(typeName)) { - return true; - } - } - return false; - } - - public QName getSimpleSchemaTypeName(String typename) { - return (QName) simpleXSDTypes.get(typename); - } - - public void addSimpleSchemaType(String typeName, QName schemaType) { - simpleXSDTypes.put(typeName, schemaType); - } - - public void addComplexSchemaType(String namespaceURI, String name, QName schemaType) { - complexXSDTypes.put(asQualifiedName(namespaceURI, name), schemaType); - } - - public QName getQNamefortheType(String namespaceURI, String typeName) { - if (XML_SCHEMA_URI.equals(namespaceURI)) { - return getSimpleSchemaTypeName(typeName); - } else { - return getComplexSchemaTypeName(namespaceURI, typeName); - } - } -} - diff --git a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyWSDLTypesGenerator.java b/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyWSDLTypesGenerator.java deleted file mode 100644 index 66c9100ef9..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyWSDLTypesGenerator.java +++ /dev/null @@ -1,370 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashMap; -import java.util.Hashtable; -import java.util.Map; - -import javax.xml.namespace.QName; - -import org.apache.axis2.description.java2wsdl.bytecode.MethodTable; -import org.apache.ws.commons.schema.XmlSchema; -import org.apache.ws.commons.schema.XmlSchemaCollection; -import org.apache.ws.commons.schema.XmlSchemaComplexType; -import org.apache.ws.commons.schema.XmlSchemaElement; -import org.apache.ws.commons.schema.XmlSchemaForm; -import org.apache.ws.commons.schema.XmlSchemaImport; -import org.apache.ws.commons.schema.XmlSchemaInclude; -import org.apache.ws.commons.schema.XmlSchemaSequence; -import org.apache.ws.commons.schema.utils.NamespaceMap; -import org.codehaus.jam.JClass; -import org.codehaus.jam.JMethod; -import org.codehaus.jam.JParameter; -import org.codehaus.jam.JamClassIterator; -import org.codehaus.jam.JamService; -import org.codehaus.jam.JamServiceFactory; -import org.codehaus.jam.JamServiceParams; - -public class TuscanyWSDLTypesGenerator implements TuscanyJava2WSDLConstants { - public static final String NAME_SPACE_PREFIX = "stn_"; - - public static final String PERIOD_SEPARATOR = "."; - - private static int prefixCount = 1; - - protected GenerationParameters generationParams; - - protected Hashtable targetNamespacePrefixMap = new Hashtable(); - - protected Hashtable schemaMap = new Hashtable(); - - protected XmlSchemaCollection xmlSchemaCollection = new XmlSchemaCollection(); - - private TuscanyTypeTable typeTable = new TuscanyTypeTable(); - - protected SchemaBuilder schemaBuilder = null; - - protected Map schemaLocationMap = null; - - // to keep loaded method using JAM - private JMethod methods[]; - - // to store byte code method using Axis 1.x codes - private MethodTable methodTable; - - private Class clazz; - - private ArrayList excludeMethods = new ArrayList(); - - boolean alreadyPrintedArrayWarningMessage = false; - - public TuscanyWSDLTypesGenerator(GenerationParameters genParams) throws Exception { - this.generationParams = genParams; - - String inputClassName = generationParams.getSourceClassName(); - - try { - clazz = Class.forName(inputClassName, true, generationParams.getClassLoader()); - } catch (ClassNotFoundException cfne) { - printInputSourceClassNotFoundMessage(inputClassName); - throw new IllegalArgumentException("Input className not found:" + inputClassName, cfne); - } - - methodTable = new MethodTable(clazz); - - initializeSchemaMap(generationParams.getSchemaTargetNamespace(), generationParams - .getSchemaTargetNamespacePrefix()); - - this.schemaLocationMap = generationParams.getSchemaLocationMap(); - schemaBuilder = - new SchemaBuilder(xmlSchemaCollection, schemaMap, targetNamespacePrefixMap, typeTable, generationParams - .getAttrFormDefault(), generationParams.getElementFormDefault(), generationParams - .getSchemaLocationMap(), generationParams.getClassLoader(), generationParams.getFactoryClassNames()); - } - - /** - * Generates schema for all the parameters in method. First generates schema - * for all different parameter type and later refers to them. - * - * @return Returns XmlSchema. - * @throws Exception - */ - public Collection buildWSDLTypes() throws Exception { - JamServiceFactory factory = JamServiceFactory.getInstance(); - JamServiceParams jam_service_parms = factory.createServiceParams(); - // setting the classLoder - // jam_service_parms.setParentClassLoader(factory.createJamClassLoader(classLoader)); - // it can possible to add the classLoader as well - jam_service_parms.addClassLoader(generationParams.getClassLoader()); - jam_service_parms.includeClass(generationParams.getSourceClassName()); - - for (int count = 0; count < generationParams.getExtraClasses().size(); ++count) { - jam_service_parms.includeClass((String)generationParams.getExtraClasses().get(count)); - } - - JamService service = factory.createService(jam_service_parms); - QName extraSchemaTypeName = null; - JamClassIterator jClassIter = service.getClasses(); - // all most all the time the ittr will have only one class in it - while (jClassIter.hasNext()) { - JClass jclass = (JClass)jClassIter.next(); - // serviceName = jclass.getSimpleName(); - // todo in the future , when we support annotation we can use this - // JAnnotation[] annotations = jclass.getAnnotations(); - - if (jclass.getQualifiedName().equals(generationParams.getSourceClassName())) { - /** - * Schema generation done in two stage 1. Load all the methods - * and create type for methods parameters (if the parameters are - * Bean then it will create Complex types for those , and if the - * parameters are simple type which describe in SimpleTypeTable - * nothing will happen) 2. In the next stage for all the methods - * messages and port types will be created - */ - methods = jclass.getDeclaredMethods(); - // short the elements in the array - Arrays.sort(methods); - - // since we do not support overload - HashMap uniqueMethods = new HashMap(); - XmlSchemaComplexType methodSchemaType; - XmlSchemaSequence sequence = null; - - for (int i = 0; i < methods.length; i++) { - JMethod jMethod = methods[i]; - - String methodName = methods[i].getSimpleName(); - // no need to think about this method , since that is system - // config method - if (excludeMethods.contains(jMethod.getSimpleName())) { - continue; - } - - if (uniqueMethods.get(jMethod.getSimpleName()) != null) { - throw new Exception(" Sorry we don't support methods overloading !!!! "); - } - - if (!jMethod.isPublic()) { - // no need to generate Schema for non public methods - continue; - } - uniqueMethods.put(jMethod.getSimpleName(), jMethod); - // create the schema type for the method wrapper - - uniqueMethods.put(jMethod.getSimpleName(), jMethod); - JParameter[] paras = jMethod.getParameters(); - String parameterNames[] = null; - // better to handle void types too - parameterNames = methodTable.getParameterNames(methodName); - sequence = new XmlSchemaSequence(); - - methodSchemaType = createSchemaTypeForMethodPart(jMethod.getSimpleName()); - methodSchemaType.setParticle(sequence); - - for (int j = 0; j < paras.length; j++) { - JParameter methodParameter = paras[j]; - JClass paraType = methodParameter.getType(); - generateSchemaForType(sequence, paraType, (parameterNames != null && parameterNames[j] != null) - ? parameterNames[j] : methodParameter.getSimpleName()); - } - // for its return type - JClass returnType = jMethod.getReturnType(); - - // better to handle void types too - methodSchemaType = createSchemaTypeForMethodPart(jMethod.getSimpleName() + RESPONSE); - sequence = new XmlSchemaSequence(); - methodSchemaType.setParticle(sequence); - generateSchemaForType(sequence, returnType, "return"); - } - } else { - // generate the schema type for extra classes - extraSchemaTypeName = typeTable.getSimpleSchemaTypeName(jclass.getQualifiedName()); - if (extraSchemaTypeName == null) { - extraSchemaTypeName = schemaBuilder.generateSchema(jclass); - } - } - } - return schemaMap.values(); - } - - private QName generateSchemaForType(XmlSchemaSequence sequence, JClass type, String partName) throws Exception { - if (type.isVoidType()) { - return null; - } - boolean isArrayType = type.isArrayType(); - if (isArrayType) { - type = type.getArrayComponentType(); - } - - String classTypeName = type.getQualifiedName(); - - QName schemaTypeName = typeTable.getSimpleSchemaTypeName(classTypeName); - if (schemaTypeName == null) { - schemaTypeName = schemaBuilder.generateSchema(type); - addContentToMethodSchemaType(sequence, schemaTypeName, partName, type.isArrayType()); - addImportORInclude((XmlSchema)schemaMap.get(generationParams.getSchemaTargetNamespace()), schemaTypeName); - - } else { - addContentToMethodSchemaType(sequence, schemaTypeName, partName, type.isArrayType()); - } - - return schemaTypeName; - } - - private void addContentToMethodSchemaType(XmlSchemaSequence sequence, - QName schemaTypeName, - String paraName, - boolean isArray) { - XmlSchemaElement elt1 = new XmlSchemaElement(); - elt1.setName(paraName); - elt1.setSchemaTypeName(schemaTypeName); - sequence.getItems().add(elt1); - - if (isArray) { - // FIXME: lresende to check this - if (!alreadyPrintedArrayWarningMessage) { - alreadyPrintedArrayWarningMessage = true; - System.out.println("Warning!: Array type detected as Java method parameter. The WSDL"); - System.out.println("will be generated anyway in spite of the fact that round-trip (WSDL2Java)"); - System.out.println("may not be handled in the expected manner. There may be runtime issues as "); - System.out.println("well as array types are not necessarily supported yet."); - System.out.println(""); - } - elt1.setMaxOccurs(Long.MAX_VALUE); - elt1.setMinOccurs(0); - } - } - - private XmlSchemaComplexType createSchemaTypeForMethodPart(String localPartName) throws Exception { - XmlSchema xmlSchema = (XmlSchema)schemaMap.get(generationParams.getSchemaTargetNamespace()); - QName elementName = - new QName(generationParams.getSchemaTargetNamespace(), localPartName, generationParams - .getSchemaTargetNamespacePrefix()); - XmlSchemaComplexType complexType = new XmlSchemaComplexType(xmlSchema); - - XmlSchemaElement globalElement = new XmlSchemaElement(); - globalElement.setSchemaType(complexType); - globalElement.setName(localPartName); - globalElement.setQName(elementName); - - xmlSchema.getItems().add(globalElement); - xmlSchema.getElements().add(elementName, globalElement); - - typeTable.addComplexSchemaType(generationParams.getSchemaTargetNamespace(), - globalElement.getName(), - elementName); - - return complexType; - } - - public TuscanyTypeTable getTypeTable() { - return typeTable; - } - - public JMethod[] getMethods() { - return methods; - } - - private String generatePrefix() { - return NAME_SPACE_PREFIX + prefixCount++; - } - - public void setExcludeMethods(ArrayList excludeMethods) { - this.excludeMethods = excludeMethods; - } - - private void initializeSchemaMap(String targetNamespace, String targetNamespacePrefix) { - XmlSchema xmlSchema = new XmlSchema(targetNamespace, xmlSchemaCollection); - xmlSchema.setAttributeFormDefault(getAttrFormDefaultSetting()); - xmlSchema.setElementFormDefault(getElementFormDefaultSetting()); - - targetNamespacePrefixMap.put(targetNamespace, targetNamespacePrefix); - schemaMap.put(targetNamespace, xmlSchema); - - NamespaceMap prefixmap = new NamespaceMap(); - prefixmap.put(TuscanyTypeTable.XS_URI_PREFIX, TuscanyTypeTable.XML_SCHEMA_URI); - prefixmap.put(targetNamespacePrefix, targetNamespace); - xmlSchema.setNamespaceContext(prefixmap); - } - - /* - * Adds to 'xmlSchema' an import or include of the XMLSchema containing - * 'schemaTypeName' - */ - private void addImportORInclude(XmlSchema xmlSchema, QName schemaTypeName) { - // decide whether there must be an import or an include - if (xmlSchema.getTargetNamespace().equals(schemaTypeName.getNamespaceURI())) { - XmlSchema containingSchema = (XmlSchema)schemaMap.get(schemaTypeName.getNamespaceURI()); - // if the type is not defined in the Schema then include - if (containingSchema.getTypeByName(schemaTypeName) == null) { - String schemaLocation = null; - // This looked backwards so I flipped it - if ((schemaLocation = (String)schemaLocationMap.get(schemaTypeName.getNamespaceURI())) != null) { - schemaLocation = DEFAULT_SCHEMA_LOCATION; - } - - XmlSchemaInclude includeElement = new XmlSchemaInclude(); - includeElement.setSchemaLocation(schemaLocation); - - if (!xmlSchema.getIncludes().contains(includeElement)) { - xmlSchema.getIncludes().add(includeElement); - // Add this so it will be serialized - xmlSchema.getItems().add(includeElement); - } - } - } else { - if (!((NamespaceMap)xmlSchema.getNamespaceContext()).values().contains(schemaTypeName.getNamespaceURI())) { - XmlSchemaImport importElement = new XmlSchemaImport(); - importElement.setNamespace(schemaTypeName.getNamespaceURI()); - - // Add schemaLocation on imports - String schemaLocation = (String)schemaLocationMap.get(schemaTypeName.getNamespaceURI()); - importElement.setSchemaLocation(schemaLocation); - xmlSchema.getItems().add(importElement); - ((NamespaceMap)xmlSchema.getNamespaceContext()).put(generatePrefix(), schemaTypeName.getNamespaceURI()); - } - } - } - - private XmlSchemaForm getAttrFormDefaultSetting() { - if (FORM_DEFAULT_UNQUALIFIED.equals(generationParams.getAttrFormDefault())) { - return new XmlSchemaForm(XmlSchemaForm.UNQUALIFIED); - } else { - return new XmlSchemaForm(XmlSchemaForm.QUALIFIED); - } - } - - private XmlSchemaForm getElementFormDefaultSetting() { - if (FORM_DEFAULT_UNQUALIFIED.equals(generationParams.getElementFormDefault())) { - return new XmlSchemaForm(XmlSchemaForm.UNQUALIFIED); - } else { - return new XmlSchemaForm(XmlSchemaForm.QUALIFIED); - } - } - - private void printInputSourceClassNotFoundMessage(String inputClassName) { - System.out.println("ERROR!!: The input class: " + inputClassName + " could not be found."); - System.out.println("Please check the value you provided for the -cp option."); - System.out.println(""); - } -} diff --git a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/WSDLGenEvent.java b/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/WSDLGenEvent.java deleted file mode 100644 index e30ada3af5..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/WSDLGenEvent.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import java.util.EventObject; - -public class WSDLGenEvent extends EventObject { - /** - * - */ - private static final long serialVersionUID = -356100754190514245L; - private int generationPhase = WSDLGenListener.UNKNOWN; - - public WSDLGenEvent(Object source, int genPhase) { - super(source); - this.generationPhase = genPhase; - } - - public int getGenerationPhase() { - return generationPhase; - } - - public void setGenerationPhase(int generationPhase) { - this.generationPhase = generationPhase; - } -} diff --git a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/WSDLGenListener.java b/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/WSDLGenListener.java deleted file mode 100644 index 788d162f34..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/WSDLGenListener.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -public interface WSDLGenListener { - public static int UNKNOWN = 0; - - public static int INPUT_ARGS_PARSING = 1; - - public static int INPUT_ARGS_VALIDATION = 2; - - public static int WSDL_MODEL_CREATION = 3; - - public static int WSDL_MODEL_WRITING = 4; - - public static String[] phaseAsString = { "Unknown", - "Input Arguments Parsing", "Input Arguments Validation", - "WSDL Model Creation", "WSDL Model Writing" }; - - public void WSDLGenPhaseStarted(WSDLGenEvent event); - - public void WSDLGenPhaseCompleted(WSDLGenEvent event); -} diff --git a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/util/XMLNameUtil.java b/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/util/XMLNameUtil.java deleted file mode 100644 index b30b8cd62b..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/util/XMLNameUtil.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.util; - -import java.util.ArrayList; -import java.util.List; - -public class XMLNameUtil { - - /** - * Returns a valid Java name from an XML Name. - * - * @param name - * @param isUpperCase - * @return a valid Java name from an XML Name - */ - public static String getJavaNameFromXMLName(String name, boolean isUpperCase) { - List parsedName = parseName(name, '_'); - StringBuilder result = new StringBuilder(64 * parsedName.size()); - for (String nameComponent: parsedName) { - if (nameComponent.length() > 0) { - if (result.length() > 0 || isUpperCase) { - result.append(Character.toUpperCase(nameComponent.charAt(0))); - result.append(nameComponent.substring(1)); - } else { - result.append(nameComponent); - } - } - } - - if (result.length() == 0) { - return "_"; - } - if (Character.isJavaIdentifierStart(result.charAt(0))) { - return isUpperCase ? result.toString() : decapitalizeName(result.toString()); - } - return "_" + result; - } - - /** - * Decapitalize a name. - * @param name - * @return a decapitalized name - */ - public static String decapitalizeName(String name) { - if (name.length() == 0) { - return name; - } else { - String lowerName = name.toLowerCase(); - int i; - for (i = 0; i < name.length(); i++) { - if (name.charAt(i) == lowerName.charAt(i)) { - break; - } - } - if (i > 1 && i < name.length()) { - --i; - } - return name.substring(0, i).toLowerCase() + name.substring(i); - } - } - - /** - * Parse the given name. - * - * @param sourceName - * @param separator - * @return some stuff parsed from the name - */ - private static List parseName(String sourceName, char separator) { - List result = new ArrayList(); - if (sourceName != null) { - StringBuilder currentWord = new StringBuilder(64); - boolean lastIsLower = false; - int index; - int length; - for (index = 0, length = sourceName.length(); index < length; ++index) { - char curChar = sourceName.charAt(index); - if (!Character.isJavaIdentifierPart(curChar)) { - curChar = separator; - } - if (Character.isUpperCase(curChar) - || (!lastIsLower && Character.isDigit(curChar)) - || curChar == separator) { - - if (lastIsLower && currentWord.length() > 1 - || curChar == separator && currentWord.length() > 0) { - result.add(currentWord.toString()); - currentWord = new StringBuilder(64); - } - lastIsLower = false; - } else { - if (!lastIsLower) { - int currentWordLength = currentWord.length(); - if (currentWordLength > 1) { - char lastChar = currentWord.charAt(--currentWordLength); - currentWord.setLength(currentWordLength); - result.add(currentWord.toString()); - currentWord = new StringBuilder(64); - currentWord.append(lastChar); - } - } - lastIsLower = true; - } - - if (curChar != separator) { - currentWord.append(curChar); - } - } - - result.add(currentWord.toString()); - } - return result; - } - - /** - * Return an EPackage name for the given namespace. - * - * @param namespace - * @return an EPackage name for the given namespace - */ - public static String getPackageNameFromNamespace(String namespace) { - return org.apache.tuscany.sdo.helper.SDOXSDEcoreBuilder.getDefaultPackageName(namespace); - } - - -} diff --git a/branches/sca-android/tools/java2wsdl/src/main/resources/META-INF/LICENSE.txt b/branches/sca-android/tools/java2wsdl/src/main/resources/META-INF/LICENSE.txt deleted file mode 100644 index 0084319535..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/main/resources/META-INF/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - 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, serviceDefinition 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/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/CustomerValue.java b/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/CustomerValue.java deleted file mode 100644 index 135b374357..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/CustomerValue.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import org.apache.tuscany.tools.java2wsdl.generate.customer.Customer; - -public class CustomerValue { - - public int getValue(String custId, String stockSymbol) { - return 0; - } - - public Customer getCustomerDetails(String custId) { - return new Customer(); - } - - public String noArgsServiceMethod() { - return new String(); - } - - private void privateServiceMethod() { - - } - -} diff --git a/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/CustomerWithAccount.java b/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/CustomerWithAccount.java deleted file mode 100644 index dfebd77215..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/CustomerWithAccount.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import org.apache.tuscany.tools.java2wsdl.generate.account.Account; -import org.apache.tuscany.tools.java2wsdl.generate.customer.Customer; - -public class CustomerWithAccount { - - private Customer customer = new Customer(); - - private Account[] accounts; - - public int getValue(String custId, String stockSymbol) { - return 123; - } - - public Customer getCustomerDetails(String custId) { - return customer; - } - - public Account getCustomerAccount(String custId, String accountId) { - return accounts[0]; - } - - public Account[] getAccounts() { - return accounts; - } - - public void setAccounts(Account[] accounts) { - this.accounts = accounts; - } -} diff --git a/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/ExampleService.java b/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/ExampleService.java deleted file mode 100644 index 5406025643..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/ExampleService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import org.osoa.sca.annotations.OneWay; - -public interface ExampleService { - - void sayHelloTwoWay(String name); - - @OneWay - void sayHelloOneWay(String name); - - String getGreeting(); -} diff --git a/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLTestCase.java b/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLTestCase.java deleted file mode 100644 index c587252d23..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLTestCase.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate; - -import java.io.File; - -import junit.framework.TestCase; - -/** - * A JUnit test case to test the Tuscany Java 2 WSDL Generation - */ -public class TuscanyJava2WSDLTestCase extends TestCase { - - /** - * setup the pre-requisites for the test case to run - * - * @exception Exception - */ - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - /** - * @exception Exception - */ - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - - /** - * Simple WSDL generation test. - */ - public void testSimpleWSDLGeneration() { - String[] arguments = - new String[] {"-cn", "org.apache.tuscany.tools.java2wsdl.generate.CustomerValue", - "-o", "target/java2wsdl-source", "-xc", - "org.apache.tuscany.tools.java2wsdl.generate.extra.GoldCustomer"}; - - Java2WSDL.main(arguments); - - File file = new File("target/java2wsdl-source/CustomerValue.wsdl"); - assertTrue(file.exists() && file.isFile()); - } - - /** - * Test WSDL generation where a parameter Object[] is involved. - */ - public void testWsdlGeneration2() { - - String[] arguments = - new String[] {"-cn", "org.apache.tuscany.tools.java2wsdl.generate.CustomerWithAccount", - "-o", "target/java2wsdl-source",}; - Java2WSDL.main(arguments); - - File file = new File("target/java2wsdl-source/CustomerWithAccount.wsdl"); - assertTrue(file.exists() && file.isFile()); - } - - public void testWsdlGeneration_SDO_Static() { - // tests for SDOs where XSD exist. Hence no XSDs must be generated - String[] arguments = - new String[] {"-cn", "org.soapinterop.CreditScoreDocLit", - "-o", "target/java2wsdl-source", - "-ixsd", "[http://www.example.org/creditscore/doclit/," + "http://www.example.org/creditscore/doclit/xsd]"}; - Java2WSDL.main(arguments); - - File file = new File("target/java2wsdl-source/CreditScoreDocLit.wsdl"); - assertTrue(file.exists() && file.isFile()); - } - - /** - * Test WSDL generation for a service interface. - */ - public void testServiceWSDLGeneration() { - String[] arguments = - new String[] {"-cn", "org.apache.tuscany.tools.java2wsdl.generate.ExampleService", - "-o", "target/java2wsdl-source"}; - - Java2WSDL.main(arguments); - - File file = new File("target/java2wsdl-source/ExampleService.wsdl"); - assertTrue(file.exists() && file.isFile()); - } - - /** - * Test WSDL generation from a java interface and then generate the java - * interface using the generated WSDL. - */ - public void _testRoundTrip() { - // TODO implement round trip - // this should re-generate java interfaces from the generated wsdl - // and compile (?) the generated java code. - // fail(); - - } -} diff --git a/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/account/Account.java b/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/account/Account.java deleted file mode 100644 index bf49d98888..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/account/Account.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate.account; - -import java.math.BigDecimal; - -public class Account { - int accountType; - - String accountNo; - - BigDecimal balance; - - public String getAccountNo() { - return accountNo; - } - - public void setAccountNo(String accountNo) { - this.accountNo = accountNo; - } - - public int getAccountType() { - return accountType; - } - - public void setAccountType(int accountType) { - this.accountType = accountType; - } - - public BigDecimal getBalance() { - return balance; - } - - public void setBalance(BigDecimal balance) { - this.balance = balance; - } -} diff --git a/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/customer/Customer.java b/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/customer/Customer.java deleted file mode 100644 index cf83095852..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/customer/Customer.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate.customer; - -public class Customer { - private String name = ""; - - public int custType = 0; - - public String getName() { - return name; - } -} diff --git a/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/extra/GoldCustomer.java b/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/extra/GoldCustomer.java deleted file mode 100644 index 901da8e551..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/extra/GoldCustomer.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.generate.extra; - -import org.apache.tuscany.tools.java2wsdl.generate.customer.Customer; - -public class GoldCustomer extends Customer { - public String goldCustNumber = ""; - - public String getGoldCustNumber() { - return goldCustNumber; - } - - public void setGoldCustNumber(String goldCustNumber) { - this.goldCustNumber = goldCustNumber; - } -} diff --git a/branches/sca-android/tools/java2wsdl/src/test/java/org/soapinterop/CreditScoreDocLit.java b/branches/sca-android/tools/java2wsdl/src/test/java/org/soapinterop/CreditScoreDocLit.java deleted file mode 100644 index 78a64dcc64..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/test/java/org/soapinterop/CreditScoreDocLit.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.soapinterop; - -public interface CreditScoreDocLit { - public org.example.creditscore.doclit.CreditReport getCreditScore(org.example.creditscore.doclit.Customer param0) - throws java.rmi.RemoteException; -} diff --git a/branches/sca-android/tools/java2wsdl/src/test/resources/AccountService.wsdl b/branches/sca-android/tools/java2wsdl/src/test/resources/AccountService.wsdl deleted file mode 100644 index 6f2fed1e2a..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/test/resources/AccountService.wsdl +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tools/java2wsdl/src/test/resources/CreditScoreDocLit.wsdl b/branches/sca-android/tools/java2wsdl/src/test/resources/CreditScoreDocLit.wsdl deleted file mode 100644 index 09d1a58589..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/test/resources/CreditScoreDocLit.wsdl +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tools/java2wsdl/src/test/resources/helloworld.wsdl b/branches/sca-android/tools/java2wsdl/src/test/resources/helloworld.wsdl deleted file mode 100644 index 051f604bb2..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/test/resources/helloworld.wsdl +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tools/java2wsdl/src/test/resources/interopdoc.wsdl b/branches/sca-android/tools/java2wsdl/src/test/resources/interopdoc.wsdl deleted file mode 100644 index 820c26ca34..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/test/resources/interopdoc.wsdl +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tools/java2wsdl/src/test/resources/sequences.xsd b/branches/sca-android/tools/java2wsdl/src/test/resources/sequences.xsd deleted file mode 100644 index a565f3fa65..0000000000 --- a/branches/sca-android/tools/java2wsdl/src/test/resources/sequences.xsd +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tools/maven/maven-dependency-lister/LICENSE b/branches/sca-android/tools/maven/maven-dependency-lister/LICENSE deleted file mode 100644 index 6e529a25c4..0000000000 --- a/branches/sca-android/tools/maven/maven-dependency-lister/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/tools/maven/maven-dependency-lister/NOTICE b/branches/sca-android/tools/maven/maven-dependency-lister/NOTICE deleted file mode 100644 index 1325efd8bf..0000000000 --- a/branches/sca-android/tools/maven/maven-dependency-lister/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/tools/maven/maven-dependency-lister/README b/branches/sca-android/tools/maven/maven-dependency-lister/README deleted file mode 100644 index d53760029f..0000000000 --- a/branches/sca-android/tools/maven/maven-dependency-lister/README +++ /dev/null @@ -1,46 +0,0 @@ -Tuscany SCA Dependency Lister -============================= - -Makes use of the extension Maven dependency support to list out all of the -dependencis in the module where the plugin is used. The module is -analysed and a report (dependency.txt) is written into the modules directory including -each dependency and the path through the maven transitive dependencies that caused -the original dependency to be included. For example, Here is a line which lists -a a jar dependency, the phase in which it was found, the module being processed -and he path that causes the dependency - -DEPENDENCY PHASE MODULE PATH TO DEPENDENCY -jaxb-api-2.1.jar compile Apache Tuscany SCA Atom+RSS Feed Aggregator Sample Webapp tuscany-host-webapp-1.1-incubating-SNAPSHOT tuscany-host-embedded-1.1-incubating-SNAPSHOT tuscany-core-databinding-1.1-incubating-SNAPSHOT tuscany-databinding-jaxb-1.1-incubating-SNAPSHOT jaxb-api-2.1 - -It is often convenient to further analyse these entries using the spreadsheet of your -choice so the columns are tab separated to allow for easy conversion. - -The plugin can be included in a module using the following, - - - org.apache.tuscany.sca - tuscany-maven-dependency-lister - 1.1-incubating-SNAPSHOT - - - - execute - - - - - -If you include this at the top level of you project and have it run for each model you -will get a report for each model independently. For example, in the Tuscany SCA project -the plugin is included in the pom.xml files at the sca level under the profile -"dependecies" so to generate a dependencies report for the Tuscany SCA project: - -cd sca -mvn -o -Pdependencies -Dmaven.test.skip=true - -Once you have dependency.txt files in your modules -the you favourite command line tools can be used to concatenate and sort them -to get a full picture of the dependencies in you project, for example, with linux you -could do, - -find . -name dependency.txt -exec cat '{}' >> deptotal.txt \; diff --git a/branches/sca-android/tools/maven/maven-dependency-lister/pom.xml b/branches/sca-android/tools/maven/maven-dependency-lister/pom.xml deleted file mode 100644 index 7656b48a68..0000000000 --- a/branches/sca-android/tools/maven/maven-dependency-lister/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca-maven-tools - 1.4-SNAPSHOT - ../pom.xml - - tuscany-maven-dependency-lister - maven-plugin - Apache Tuscany SCA Dependency Lister Maven Plugin - - - - org.apache.maven - maven-plugin-api - 2.0.7 - - - - org.apache.maven - maven-project - 2.0.7 - - - - org.apache.maven - maven-settings - 2.0.7 - - - - org.apache.maven - maven-artifact - 2.0.7 - - - - org.apache.maven - maven-model - 2.0.7 - - - - org.apache.maven.shared - maven-dependency-tree - 1.0 - - - - - diff --git a/branches/sca-android/tools/maven/maven-dependency-lister/src/main/java/org/apache/tuscany/tools/sca/dependency/lister/plugin/DependencyListerMojo.java b/branches/sca-android/tools/maven/maven-dependency-lister/src/main/java/org/apache/tuscany/tools/sca/dependency/lister/plugin/DependencyListerMojo.java deleted file mode 100644 index b904ac4804..0000000000 --- a/branches/sca-android/tools/maven/maven-dependency-lister/src/main/java/org/apache/tuscany/tools/sca/dependency/lister/plugin/DependencyListerMojo.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.sca.dependency.lister.plugin; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.PrintWriter; -import java.util.Iterator; -import java.util.List; - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.factory.ArtifactFactory; -import org.apache.maven.artifact.metadata.ArtifactMetadataSource; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.resolver.ArtifactCollector; -import org.apache.maven.artifact.resolver.ArtifactResolver; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.project.MavenProject; -import org.apache.maven.project.MavenProjectBuilder; -import org.apache.maven.settings.Settings; -import org.apache.maven.shared.dependency.tree.DependencyNode; -import org.apache.maven.shared.dependency.tree.DependencyTree; -import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder; -import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException; - -/** - * @version $Rev: 588816 $ $Date: 2007-10-27 01:22:38 +0100 (Sat, 27 Oct 2007) $ - * @goal execute - * @phase generate-sources - * @requiresDependencyResolution test - * @description List dependencies for an SCA project - */ -public class DependencyListerMojo extends AbstractMojo { - /** - * The project to create a build for. - * - * @parameter expression="${project}" - * @required - */ - private MavenProject project; - - /** - * Used for resolving artifacts - * - * @component - */ - private ArtifactResolver artifactResolver; - - /** - * Factory for creating artifact objects - * - * @component - */ - private ArtifactFactory artifactFactory; - - /** - * @component - */ - private ArtifactMetadataSource artifactMetadataSource; - - /** - * @component - */ - private DependencyTreeBuilder dependencyTreeBuilder; - - /** - * @component - */ - private ArtifactCollector collector; - - /** - * @component - */ - private MavenProjectBuilder mavenProjectBuilder; - - /** - * The local repository where the artifacts are located - * - * @parameter expression="${localRepository}" - * @required - */ - private ArtifactRepository localRepository; - - /** - * The remote repositories where artifacts are located - * - * @parameter expression="${project.remoteArtifactRepositories}" - */ - private List remoteRepositories; - - /** - * The current user system settings for use in Maven. - * - * @parameter expression="${settings}" - * @required - * @readonly - */ - private Settings settings; - - - /** - * The build.xml file to generate. - * @parameter expression="${basedir}/target/dependency.txt" - */ - private String buildFile; - - public void execute() throws MojoExecutionException { - - System.out.println("Analysing " + buildFile); - - // Open the target build.xml file - File targetFile = new File(buildFile); - PrintWriter pw; - try { - pw = new PrintWriter(new FileOutputStream(targetFile)); - } catch (FileNotFoundException e) { - System.out.println(e.toString()); - return; - } - - DependencyTree dependencyTree; - - try - { - dependencyTree = dependencyTreeBuilder.buildDependencyTree( project, localRepository, artifactFactory, - artifactMetadataSource, collector ); - } - catch ( DependencyTreeBuilderException e ) - { - throw new MojoExecutionException( "Can't build dependency tree", e ); - } - - // processNode(dependencyTree.getRootNode(), "--", pw); - - for (Artifact artifact: (List)project.getTestArtifacts()) { - pw.println( artifact.getFile().getName() + "\t" + - artifact.getScope() + "\t" + - project.getName() + "\t" + - findArtifactPath(dependencyTree.getRootNode(), artifact)); - } - - pw.close(); - } - - private void processNode(DependencyNode node, String indent, PrintWriter pw){ - - pw.println(indent + node.getArtifact().getScope() + " " + node.getArtifact().toString()); - - Iterator it = node.getChildren().iterator(); - while ( it.hasNext() ) - { - DependencyNode child = (DependencyNode) it.next(); - - processNode(child, indent + "--", pw); - } - } - - private String findArtifactPath(DependencyNode node, Artifact artifact){ - String path = null; - - Iterator it = node.getChildren().iterator(); - while ( it.hasNext() && (path == null) ) - { - DependencyNode child = (DependencyNode) it.next(); - - if (child.getArtifact().getArtifactId().equals(artifact.getArtifactId())) { - path = child.getArtifact().getArtifactId() + "-" + child.getArtifact().getVersion(); - } else { - path = findArtifactPath(child, artifact); - - if (path != null){ - path = child.getArtifact().getArtifactId() + "-" + child.getArtifact().getVersion() + "\t" + path; - } - } - } - - return path; - } - -} \ No newline at end of file diff --git a/branches/sca-android/tools/maven/maven-java2wsdl/LICENSE b/branches/sca-android/tools/maven/maven-java2wsdl/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-android/tools/maven/maven-java2wsdl/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/tools/maven/maven-java2wsdl/NOTICE b/branches/sca-android/tools/maven/maven-java2wsdl/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-android/tools/maven/maven-java2wsdl/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/tools/maven/maven-java2wsdl/pom.xml b/branches/sca-android/tools/maven/maven-java2wsdl/pom.xml deleted file mode 100644 index a9b3126cdf..0000000000 --- a/branches/sca-android/tools/maven/maven-java2wsdl/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca-maven-tools - 1.4-SNAPSHOT - ../pom.xml - - tuscany-maven-java2wsdl - maven-plugin - Apache Tuscany SCA Java2WSDL Maven Plugin - - - - org.apache.maven - maven-plugin-api - 2.0 - - - - org.apache.tuscany.sca - tuscany-java2wsdl - 1.4-SNAPSHOT - - - diff --git a/branches/sca-android/tools/maven/maven-java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/plugin/Java2WSDLGeneratorMojo.java b/branches/sca-android/tools/maven/maven-java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/plugin/Java2WSDLGeneratorMojo.java deleted file mode 100644 index 620e32a6fd..0000000000 --- a/branches/sca-android/tools/maven/maven-java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/plugin/Java2WSDLGeneratorMojo.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.java2wsdl.plugin; - -import java.util.Hashtable; -import java.util.Map; - -import org.apache.axis2.description.java2wsdl.Java2WSDLConstants; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.tuscany.tools.java2wsdl.generate.Java2WSDLGeneratorFactory; -import org.apache.ws.java2wsdl.utils.Java2WSDLCommandLineOption; - -/** - * @version $Rev$ $Date$ - * @goal generate - * @phase generate-sources - * @description Generate WSDL from a given Java class / interface - */ -public class Java2WSDLGeneratorMojo extends AbstractMojo -{ - - /** - * The name of the class for which the WSDL must be generated - * @parameter - * - */ - private String sourceClassName; - - /** - * The location where the WSDLs should be generated into - * @parameter expression="${project.build.directory}\\java2wsdl-wsdl" - */ - private String targetLocation; - - /** - * The name of the WSDL file - * @parameter - */ - private String wsdlFilename; - - - /** - * Classpaths to be included - * @parameter - * - */ - String[] classpaths; - - /** - * The name of the service - * @parameter - */ - private String serviceName; - - /** - * The binding style for the service - * @parameter - */ - private String bindingStyle; - - /** - * The binding use option - * @parameter - */ - private String bindingUse; - - /** - * The soap address - * @parameter - */ - private String soapAddress; - - public void execute() throws MojoExecutionException - { - try - { - Java2WSDLGeneratorFactory.getInstance().createGenerator().generateWSDL(createOptionsMap ()); - } - catch ( Exception e ) - { - throw new MojoExecutionException("Exception in Java2WSDL Maven Plugin ", e); - } - } - - protected Map createOptionsMap() - { - Map optionsMap = new Hashtable(); - - optionsMap.put(Java2WSDLConstants.CLASSNAME_OPTION, - new Java2WSDLCommandLineOption(Java2WSDLConstants.CLASSNAME_OPTION, new String[]{sourceClassName})); - - if ( targetLocation != null ) - { - optionsMap.put(Java2WSDLConstants.OUTPUT_LOCATION_OPTION, - new Java2WSDLCommandLineOption(Java2WSDLConstants.OUTPUT_LOCATION_OPTION, new String[]{targetLocation})); - } - - if ( wsdlFilename != null ) - { - optionsMap.put(Java2WSDLConstants.OUTPUT_FILENAME_OPTION, - new Java2WSDLCommandLineOption(Java2WSDLConstants.OUTPUT_FILENAME_OPTION, new String[]{wsdlFilename})); - } - - if ( classpaths != null && classpaths.length > 0 ) - { - optionsMap.put(Java2WSDLConstants.CLASSPATH_OPTION, - new Java2WSDLCommandLineOption(Java2WSDLConstants.CLASSPATH_OPTION, classpaths)); - } - - if ( serviceName != null ) - { - optionsMap.put(Java2WSDLConstants.SERVICE_NAME_OPTION, - new Java2WSDLCommandLineOption(Java2WSDLConstants.SERVICE_NAME_OPTION, new String[]{serviceName})); - } - - if ( bindingStyle != null ) - { - optionsMap.put(Java2WSDLConstants.STYLE_OPTION, - new Java2WSDLCommandLineOption(Java2WSDLConstants.STYLE_OPTION, new String[]{bindingStyle})); - } - - if ( bindingUse != null ) - { - optionsMap.put(Java2WSDLConstants.USE_OPTION, - new Java2WSDLCommandLineOption(Java2WSDLConstants.USE_OPTION, new String[]{bindingUse})); - } - - if ( soapAddress != null ) - { - optionsMap.put(Java2WSDLConstants.LOCATION_OPTION, - new Java2WSDLCommandLineOption(Java2WSDLConstants.LOCATION_OPTION, new String[]{soapAddress})); - } - - return optionsMap; - } -} diff --git a/branches/sca-android/tools/maven/maven-osgi-junit/LICENSE b/branches/sca-android/tools/maven/maven-osgi-junit/LICENSE deleted file mode 100644 index 6e529a25c4..0000000000 --- a/branches/sca-android/tools/maven/maven-osgi-junit/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/tools/maven/maven-osgi-junit/NOTICE b/branches/sca-android/tools/maven/maven-osgi-junit/NOTICE deleted file mode 100644 index 1325efd8bf..0000000000 --- a/branches/sca-android/tools/maven/maven-osgi-junit/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/tools/maven/maven-osgi-junit/pom.xml b/branches/sca-android/tools/maven/maven-osgi-junit/pom.xml deleted file mode 100644 index 278ef80f71..0000000000 --- a/branches/sca-android/tools/maven/maven-osgi-junit/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca-maven-tools - 1.4-SNAPSHOT - ../pom.xml - - tuscany-maven-osgi-junit - maven-plugin - Apache Tuscany SCA OSGi JUnit Maven Plugin - - - - - org.apache.maven - maven-plugin-api - 2.0.7 - - - - org.apache.maven - maven-project - 2.0.7 - - - - org.apache.tuscany.sca - tuscany-node-launcher-osgi - 1.4-SNAPSHOT - - - - junit - junit - 4.2 - compile - - - - diff --git a/branches/sca-android/tools/maven/maven-osgi-junit/src/main/java/org/apache/tuscany/tools/sca/osgi/junit/plugin/OSGiJUnitMojo.java b/branches/sca-android/tools/maven/maven-osgi-junit/src/main/java/org/apache/tuscany/tools/sca/osgi/junit/plugin/OSGiJUnitMojo.java deleted file mode 100644 index a2251a6a2a..0000000000 --- a/branches/sca-android/tools/maven/maven-osgi-junit/src/main/java/org/apache/tuscany/tools/sca/osgi/junit/plugin/OSGiJUnitMojo.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.sca.osgi.junit.plugin; - -import java.io.File; -import java.lang.reflect.Method; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; - -import junit.framework.Assert; - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.resolver.ArtifactNotFoundException; -import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; -import org.apache.maven.artifact.versioning.VersionRange; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.logging.Log; -import org.apache.maven.project.MavenProject; -import org.apache.tuscany.sca.node.osgi.launcher.FelixOSGiHost; -import org.apache.tuscany.sca.node.osgi.launcher.LauncherBundleActivator; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; - -/** - * @version $Rev$ $Date$ - * @goal test - * @phase integration-test - * @requiresDependencyResolution test - * @description Run the unit test with OSGi - */ -public class OSGiJUnitMojo extends AbstractMojo { - /** - * The project to create a build for. - * - * @parameter expression="${project}" - * @required - * @readonly - */ - private MavenProject project; - - /** - * The basedir of the project. - * - * @parameter expression="${basedir}" - * @required @readonly - */ - protected File basedir; - - /** - * Used to look up Artifacts in the remote repository. - * - * @parameter expression="${component.org.apache.maven.artifact.factory.ArtifactFactory}" - * @required - * @readonly - */ - protected org.apache.maven.artifact.factory.ArtifactFactory factory; - - /** - * Used to look up Artifacts in the remote repository. - * - * @parameter expression="${component.org.apache.maven.artifact.resolver.ArtifactResolver}" - * @required - * @readonly - */ - protected org.apache.maven.artifact.resolver.ArtifactResolver resolver; - - /** - * Location of the local repository. - * - * @parameter expression="${localRepository}" - * @readonly - * @required - */ - protected org.apache.maven.artifact.repository.ArtifactRepository local; - - /** - * List of Remote Repositories used by the resolver - * - * @parameter expression="${project.remoteArtifactRepositories}" - * @readonly - * @required - */ - protected java.util.List remoteRepos; - - /** - * @parameter - */ - protected String osgiRuntime; - - protected Artifact getArtifact(String groupId, String artifactId) throws MojoExecutionException { - Artifact artifact; - VersionRange vr; - try { - vr = VersionRange.createFromVersionSpec(project.getVersion()); - } catch (InvalidVersionSpecificationException e1) { - vr = VersionRange.createFromVersion(project.getVersion()); - } - artifact = factory.createDependencyArtifact(groupId, artifactId, vr, "jar", null, Artifact.SCOPE_TEST); - - try { - resolver.resolve(artifact, remoteRepos, local); - } catch (ArtifactResolutionException e) { - throw new MojoExecutionException("Unable to resolve artifact.", e); - } catch (ArtifactNotFoundException e) { - throw new MojoExecutionException("Unable to find artifact.", e); - } - - return artifact; - } - - public void execute() throws MojoExecutionException { - if (project.getPackaging().equals("pom")) { - return; - } - - Log log = getLog(); - List jarFiles = new ArrayList(); - for (Object o : project.getArtifacts()) { - Artifact a = (Artifact)o; - try { - if (log.isDebugEnabled()) { - log.debug("Adding: " + a); - } - jarFiles.add(a.getFile().toURI().toURL()); - } catch (MalformedURLException e) { - getLog().error(e); - } - } - - /* - * Add org.apache.tuscany.sca:tuscany-extensibility-osgi module - */ - String aid = "equinox".equals(osgiRuntime) ? "tuscany-extensibility-equinox" : "tuscany-extensibility-osgi"; - Artifact ext = getArtifact("org.apache.tuscany.sca", aid); - try { - URL url = ext.getFile().toURI().toURL(); - if (!jarFiles.contains(url)) { - if (log.isDebugEnabled()) { - log.debug("Adding: " + ext); - } - jarFiles.add(url); - } - } catch (MalformedURLException e) { - getLog().error(e); - } - - // String home = new File(basedir, "target/tuscany").toString(); - // System.setProperty("TUSCANY_HOME", home); - // getLog().info(home); - try { - FelixOSGiHost host = new FelixOSGiHost(); - host.setActivator(new LauncherBundleActivator(jarFiles)); - BundleContext context = host.start(); - - for (Bundle b : context.getBundles()) { - if (getLog().isDebugEnabled()) { - getLog().debug(LauncherBundleActivator.toString(b, false)); - } - } - - ClassLoader tccl = Thread.currentThread().getContextClassLoader(); - URL[] urls = - new URL[] {new File(project.getBuild().getOutputDirectory()).toURI().toURL(), - new File(project.getBuild().getTestOutputDirectory()).toURI().toURL()}; - - URLClassLoader cl = new URLClassLoader(urls, tccl); - Thread.currentThread().setContextClassLoader(cl); - try { - runAllTestsFromDirs(cl, project.getBuild().getTestOutputDirectory()); - } finally { - Thread.currentThread().setContextClassLoader(tccl); - } - host.stop(); - } catch (Throwable e) { - throw new MojoExecutionException(e.getMessage(), e); - } - // finally { - // System.clearProperty("TUSCANY_HOME"); - // } - - } - - public void getTestCases(File dir, String prefix, HashSet testCaseSet) { - File[] files = dir.listFiles(); - for (File file : files) { - if (file.isDirectory()) { - String newPrefix = prefix == null ? file.getName() : prefix + "." + file.getName(); - getTestCases(file, newPrefix, testCaseSet); - } else if (file.getName().endsWith("TestCase.class")) { - String name = file.getName(); - name = name.substring(0, name.length() - 6); // remove .class - name = (prefix == null) ? name : prefix + "." + name; - - testCaseSet.add(name); - } - } - } - - public void runAllTestsFromDirs(ClassLoader testClassLoader, String testDir) throws Exception { - - int failures = 0; - HashSet testCaseSet = new HashSet(); - getTestCases(new File(testDir), null, testCaseSet); - for (String className : testCaseSet) { - Class testClass = testClassLoader.loadClass(className); - failures += runTestCase(testClassLoader, testClass); - } - - Assert.assertEquals(0, failures); - - } - - /** - * Use java reflection to call JUNIT as the JUNIT might be in the bundles - * @param testClassLoader - * @param testClass - * @return - * @throws Exception - */ - public int runTestCase(ClassLoader testClassLoader, Class testClass) throws Exception { - - if (testClass.getName().endsWith("TestCase")) { - getLog().info("Running: " + testClass.getName()); - Class coreClass = Class.forName("org.junit.runner.JUnitCore", true, testClassLoader); - Object core = coreClass.newInstance(); - Class reqClass = Class.forName("org.junit.runner.Request", true, testClassLoader); - Method aClass = reqClass.getMethod("aClass", Class.class); - Object req = aClass.invoke(null, testClass); - Method run = coreClass.getMethod("run", reqClass); - Object result = run.invoke(core, req); - Object runs = result.getClass().getMethod("getRunCount").invoke(result); - Object ignores = result.getClass().getMethod("getIgnoreCount").invoke(result); - List failureList = (List)result.getClass().getMethod("getFailures").invoke(result); - - int failures = 0, errors = 0; - Class errorClass = Class.forName("junit.framework.AssertionFailedError", true, testClassLoader); - for (Object f : failureList) { - Object ex = f.getClass().getMethod("getException").invoke(f); - if (errorClass.isInstance(ex)) { - failures++; - } else { - errors++; - } - getLog().error((Throwable)ex); - } - - getLog().info("Test Runs: " + runs - + ", Failures: " - + failures - + ", Errors: " - + errors - + ", Ignores: " - + ignores); - - return failureList.size(); - - } - return 0; - - } - -} diff --git a/branches/sca-android/tools/maven/maven-tuscany-bundle-plugin/pom.xml b/branches/sca-android/tools/maven/maven-tuscany-bundle-plugin/pom.xml deleted file mode 100644 index c6e972f044..0000000000 --- a/branches/sca-android/tools/maven/maven-tuscany-bundle-plugin/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca-maven-tools - 1.4-SNAPSHOT - ../pom.xml - - tuscany-maven-bundle-plugin - maven-plugin - Apache Tuscany SCA Maven OSGi Bundle Plugin - - - - org.apache.maven - maven-plugin-api - 2.0.7 - - - - org.apache.maven - maven-project - 2.0.7 - - - - org.apache.maven - maven-settings - 2.0.7 - - - - org.apache.maven - maven-artifact - 2.0.7 - - - - org.apache.maven - maven-model - 2.0.7 - - - - org.apache.maven.shared - maven-dependency-tree - 1.1 - - - - org.apache.felix - maven-bundle-plugin - 1.4.3 - - - - - diff --git a/branches/sca-android/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/LibraryBundleMojo.java b/branches/sca-android/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/LibraryBundleMojo.java deleted file mode 100644 index a1189d91b7..0000000000 --- a/branches/sca-android/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/LibraryBundleMojo.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.sca.tuscany.bundle.plugin; - -import static org.apache.tuscany.tools.sca.tuscany.bundle.plugin.LibraryBundleUtil.write; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.jar.Manifest; - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.factory.ArtifactFactory; -import org.apache.maven.artifact.metadata.ArtifactMetadataSource; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.resolver.ArtifactCollector; -import org.apache.maven.artifact.resolver.ArtifactNotFoundException; -import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.maven.artifact.resolver.ArtifactResolver; -import org.apache.maven.artifact.versioning.VersionRange; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.logging.Log; -import org.apache.maven.project.MavenProject; -import org.apache.maven.shared.dependency.tree.DependencyTree; -import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder; -import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException; - -/** - * @version $Rev$ $Date$ - * @goal build - * @phase process-sources - * @requiresDependencyResolution test - * @description Build a virtual bundle for 3rd party dependencies - */ -public class LibraryBundleMojo extends AbstractMojo { - /** - * The project to create a build for. - * - * @parameter expression="${project}" - * @required - * @readonly - */ - private MavenProject project; - - /** - * The basedir of the project. - * - * @parameter expression="${basedir}" - * @required @readonly - */ - private File basedir; - - /** - * Used to look up Artifacts in the remote repository. - * - * @parameter expression="${component.org.apache.maven.artifact.factory.ArtifactFactory}" - * @required - * @readonly - */ - private org.apache.maven.artifact.factory.ArtifactFactory factory; - - /** - * Used to look up Artifacts in the remote repository. - * - * @parameter expression="${component.org.apache.maven.artifact.resolver.ArtifactResolver}" - * @required - * @readonly - */ - private org.apache.maven.artifact.resolver.ArtifactResolver resolver; - - /** - * Location of the local repository. - * - * @parameter expression="${localRepository}" - * @readonly - * @required - */ - private org.apache.maven.artifact.repository.ArtifactRepository local; - - /** - * List of Remote Repositories used by the resolver - * - * @parameter expression="${project.remoteArtifactRepositories}" - * @readonly - * @required - */ - private java.util.List remoteRepos; - - /** - * @parameter - */ - private boolean copyJars = false; - - /** - * Dependency tree builder - * - * @component - */ - private DependencyTreeBuilder dependencyTreeBuilder; - - /** - * Artifact factory - * - * @component - */ - private ArtifactFactory artifactFactory; - - /** - * @component - */ - private ArtifactMetadataSource artifactMetadataSource; - - /** - * @component - */ - private ArtifactCollector collector; - - /** - * The local repository - * - * @parameter expression="${localRepository}" - * @required - */ - private ArtifactRepository localRepository; - - /** - * The remote repositories - * - * @parameter expression="${project.remoteArtifactRepositories}" - */ - private List remoteRepositories; - - /** - * Artifact resolver - * - * @component - */ - private ArtifactResolver artifactResolver; - - public void execute() throws MojoExecutionException { - Log log = getLog(); - - if (project.getPackaging().equals("pom")) { - return; - } - - DependencyTree dependencyTree; - try { - dependencyTree = dependencyTreeBuilder.buildDependencyTree(project, - localRepository, artifactFactory, - artifactMetadataSource, collector ); - - } catch (DependencyTreeBuilderException e) { - throw new MojoExecutionException("Could not build dependency tree", e); - } - - Set jarFiles = new HashSet(); - for (Object o : dependencyTree.getArtifacts()) { - Artifact artifact = (Artifact)o; - - if (!(Artifact.SCOPE_COMPILE.equals(artifact.getScope()) || Artifact.SCOPE_RUNTIME.equals(artifact.getScope()))) { - if (log.isDebugEnabled()) { - log.debug("Skipping artifact: " + artifact); - } - continue; - } - if (!"jar".equals(artifact.getType())) { - continue; - } - if ("org.apache.tuscany.sca".equals(artifact.getGroupId())) { - continue; - } - - VersionRange versionRange = artifact.getVersionRange(); - if (versionRange == null) - versionRange = VersionRange.createFromVersion(artifact.getVersion()); - Artifact dependencyArtifact = artifactFactory.createDependencyArtifact(artifact.getGroupId(), - artifact.getArtifactId(), - versionRange, - artifact.getType(), - artifact.getClassifier(), - artifact.getScope()); - - try { - artifactResolver.resolve(dependencyArtifact, remoteRepositories, localRepository); - } catch (ArtifactResolutionException e) { - log.warn("Artifact " + artifact + " could not be resolved."); - } catch (ArtifactNotFoundException e) { - log.warn("Artifact " + artifact + " could not be found."); - } - artifact = dependencyArtifact; - - if (log.isDebugEnabled()) { - log.debug("Artifact: " + artifact); - } - String bundleName = null; - try { - bundleName = LibraryBundleUtil.getBundleName(artifact.getFile()); - } catch (IOException e) { - throw new MojoExecutionException(e.getMessage(), e); - } - if (bundleName == null) { - if (artifact.getFile().exists()) { - log.info("Adding third party jar: " + artifact); - jarFiles.add(artifact.getFile()); - } else { - log.warn("Third party jar not found: " + artifact); - } - } - } - - try { - String version = project.getVersion(); - if (version.endsWith(Artifact.SNAPSHOT_VERSION)) { - version = version.substring(0, version.length() - Artifact.SNAPSHOT_VERSION.length() - 1); - } - - Manifest mf = LibraryBundleUtil.libraryManifest(jarFiles, project.getName(), version, copyJars); - File file = new File(project.getBasedir(), "META-INF"); - file.mkdir(); - file= new File(file, "MANIFEST.MF"); - if (log.isDebugEnabled()) { - log.debug("Generating " + file); - } - - FileOutputStream fos = new FileOutputStream(file); - write(mf, fos); - fos.close(); - - if (copyJars) { - File lib = new File(project.getBasedir(), "lib"); - if (lib.isDirectory()) { - for (File c : lib.listFiles()) { - c.delete(); - } - } - lib.mkdir(); - byte[] buf = new byte[4096]; - for (File jar : jarFiles) { - File jarFile = new File(lib, jar.getName()); - if (log.isDebugEnabled()) { - log.debug("Copying " + jar + " to " + jarFile); - } - FileInputStream in = new FileInputStream(jar); - FileOutputStream out = new FileOutputStream(jarFile); - for (;;) { - int len = in.read(buf); - if (len > 0) { - out.write(buf, 0, len); - } else { - break; - } - } - in.close(); - out.close(); - } - } - } catch (Exception e) { - throw new MojoExecutionException(e.getMessage(), e); - } - - } - -} diff --git a/branches/sca-android/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/LibraryBundleUtil.java b/branches/sca-android/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/LibraryBundleUtil.java deleted file mode 100644 index 39c02bd2b4..0000000000 --- a/branches/sca-android/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/LibraryBundleUtil.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.tools.sca.tuscany.bundle.plugin; - -import static org.osgi.framework.Constants.BUNDLE_CLASSPATH; -import static org.osgi.framework.Constants.BUNDLE_MANIFESTVERSION; -import static org.osgi.framework.Constants.BUNDLE_NAME; -import static org.osgi.framework.Constants.BUNDLE_SYMBOLICNAME; -import static org.osgi.framework.Constants.BUNDLE_VERSION; -import static org.osgi.framework.Constants.DYNAMICIMPORT_PACKAGE; -import static org.osgi.framework.Constants.EXPORT_PACKAGE; -import static org.osgi.framework.Constants.IMPORT_PACKAGE; - -import java.io.ByteArrayOutputStream; -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.net.URL; -import java.util.HashSet; -import java.util.Set; -import java.util.jar.Attributes; -import java.util.jar.JarFile; -import java.util.jar.JarOutputStream; -import java.util.jar.Manifest; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.zip.ZipEntry; -import java.util.zip.ZipInputStream; - -import org.osgi.framework.Bundle; - -/** - * Common functions and constants used by the admin components. - * - * @version $Rev$ $Date$ - */ -public final class LibraryBundleUtil { - - private static final String LAUNCHER_EQUINOX_LIBRARIES = "org.apache.tuscany.sca.node.launcher.equinox.libraries"; - - static File file(URL url) { - if (url == null || !url.getProtocol().equals("file")) { - return null; - } else { - String filename = url.getFile().replace('/', File.separatorChar); - int pos = 0; - while ((pos = filename.indexOf('%', pos)) >= 0) { - if (pos + 2 < filename.length()) { - String hexStr = filename.substring(pos + 1, pos + 3); - char ch = (char)Integer.parseInt(hexStr, 16); - filename = filename.substring(0, pos) + ch + filename.substring(pos + 3); - } - } - return new File(filename); - } - } - - static Pattern pattern = Pattern.compile("-([0-9.]+)"); - - private static String version(String jarFile) { - Matcher matcher = pattern.matcher(jarFile); - String version = "1.0.0"; - if (matcher.find()) { - version = matcher.group(); - if (version.endsWith(".")) { - version = version.substring(1, version.length() - 1); - } else { - version = version.substring(1); - } - } - return version; - } - - private static void addPackages(File jarFile, Set packages) throws IOException { - String version = ";version=" + version(jarFile.getPath()); - ZipInputStream is = new ZipInputStream(new FileInputStream(jarFile)); - ZipEntry entry; - while ((entry = is.getNextEntry()) != null) { - String entryName = entry.getName(); - if (!entry.isDirectory() && entryName != null - && entryName.length() > 0 - && !entryName.startsWith(".") - && entryName.endsWith(".class") // Exclude resources from Export-Package - && entryName.lastIndexOf("/") > 0 - && Character.isJavaIdentifierStart(entryName.charAt(0))) { - String pkg = entryName.substring(0, entryName.lastIndexOf("/")).replace('/', '.'); - if (!("org.apache.commons.lang.enum".equals(pkg))) { - packages.add(pkg + version); - } - } - } - is.close(); - } - - static Manifest libraryManifest(Set jarFiles, String name, String version, boolean copyJars) - throws IllegalStateException { - try { - - // List exported packages and bundle classpath entries - StringBuffer classpath = new StringBuffer(); - StringBuffer exports = new StringBuffer(); - StringBuffer imports = new StringBuffer(); - Set packages = new HashSet(); - for (File jarFile : jarFiles) { - addPackages(jarFile, packages); - if (copyJars) { - classpath.append("lib/"); - classpath.append(jarFile.getName()); - classpath.append(","); - } else { - classpath.append("\"external:"); - classpath.append(jarFile.getPath().replace(File.separatorChar, '/')); - classpath.append("\","); - } - } - - Set importPackages = new HashSet(); - for (String pkg : packages) { - exports.append(pkg); - exports.append(','); - - String importPackage = pkg; - int index = pkg.indexOf(';'); - if (index != -1) { - importPackage = pkg.substring(0, index); - } - if (!importPackages.contains(importPackage)) { - imports.append(importPackage); - imports.append(','); - importPackages.add(importPackage); - } - } - - // Create a manifest - Manifest manifest = new Manifest(); - Attributes attributes = manifest.getMainAttributes(); - attributes.putValue("Manifest-Version", "1.0"); - attributes.putValue(BUNDLE_MANIFESTVERSION, "2"); - attributes.putValue(BUNDLE_SYMBOLICNAME, LAUNCHER_EQUINOX_LIBRARIES); - attributes.putValue(BUNDLE_NAME, name); - attributes.putValue(BUNDLE_VERSION, version); - attributes.putValue(DYNAMICIMPORT_PACKAGE, "*"); - attributes.putValue(EXPORT_PACKAGE, exports.substring(0, exports.length() - 1)); - attributes.putValue(IMPORT_PACKAGE, imports.substring(0, imports.length() - 1)); - attributes.putValue(BUNDLE_CLASSPATH, classpath.substring(0, classpath.length() - 1)); - - return manifest; - } catch (IOException e) { - throw new IllegalStateException(e); - } - } - - static String dump(Manifest mf) throws IOException { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - mf.write(bos); - return new String(bos.toByteArray()); - } - - static byte[] generateBundle(Manifest mf) throws IOException { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - JarOutputStream jos = new JarOutputStream(bos, mf); - jos.close(); - return bos.toByteArray(); - } - - static void write(Manifest manifest, OutputStream out) throws IOException { - DataOutputStream dos = new DataOutputStream(out); - Attributes attributes = manifest.getMainAttributes(); - write(attributes, "Manifest-Version", dos); - write(attributes, BUNDLE_MANIFESTVERSION, dos); - write(attributes, BUNDLE_SYMBOLICNAME, dos); - write(attributes, BUNDLE_NAME, dos); - write(attributes, BUNDLE_VERSION, dos); - write(attributes, DYNAMICIMPORT_PACKAGE, dos); - write(attributes, EXPORT_PACKAGE, dos); - write(attributes, IMPORT_PACKAGE, dos); - write(attributes, BUNDLE_CLASSPATH, dos); - dos.flush(); - } - - private static void write(Attributes attributes, String key, DataOutputStream dos) throws IOException { - StringBuffer line = new StringBuffer(); - line.append(key); - line.append(": "); - String value = attributes.getValue(key); - line.append(new String(value.getBytes("UTF8"))); - line.append("\r\n"); - int l = line.length(); - if (l > 72) { - for (int i = 70; i < l - 2;) { - line.insert(i, "\r\n "); - i += 72; - l += 3; - } - } - dos.writeBytes(line.toString()); - } - - /** - * Returns the name of a bundle, or null if the given file is not a bundle. - * - * @param file - * @return - * @throws IOException - */ - static String getBundleName(File file) throws IOException { - if (!file.exists()) { - return null; - } - String bundleName = null; - if (file.isDirectory()) { - File mf = new File(file, "META-INF/MANIFEST.MF"); - if (mf.isFile()) { - Manifest manifest = new Manifest(new FileInputStream(mf)); - bundleName = manifest.getMainAttributes().getValue(BUNDLE_SYMBOLICNAME); - } - } else { - JarFile jar = new JarFile(file, false); - Manifest manifest = jar.getManifest(); - bundleName = manifest.getMainAttributes().getValue(BUNDLE_SYMBOLICNAME); - jar.close(); - } - if (bundleName == null) { - return bundleName; - } - int sc = bundleName.indexOf(';'); - if (sc != -1) { - bundleName = bundleName.substring(0, sc); - } - return bundleName; - } - - public static String string(Bundle b, boolean verbose) { - StringBuffer sb = new StringBuffer(); - sb.append(b.getBundleId()).append(" ").append(b.getSymbolicName()); - int s = b.getState(); - if ((s & Bundle.UNINSTALLED) != 0) { - sb.append(" UNINSTALLED"); - } - if ((s & Bundle.INSTALLED) != 0) { - sb.append(" INSTALLED"); - } - if ((s & Bundle.RESOLVED) != 0) { - sb.append(" RESOLVED"); - } - if ((s & Bundle.STARTING) != 0) { - sb.append(" STARTING"); - } - if ((s & Bundle.STOPPING) != 0) { - sb.append(" STOPPING"); - } - if ((s & Bundle.ACTIVE) != 0) { - sb.append(" ACTIVE"); - } - - if (verbose) { - sb.append(" ").append(b.getLocation()); - sb.append(" ").append(b.getHeaders()); - } - return sb.toString(); - } -} diff --git a/branches/sca-android/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/TuscanyBundlePluginMojo.java b/branches/sca-android/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/TuscanyBundlePluginMojo.java deleted file mode 100644 index 79b0db4223..0000000000 --- a/branches/sca-android/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/TuscanyBundlePluginMojo.java +++ /dev/null @@ -1,505 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.sca.tuscany.bundle.plugin; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.lang.reflect.Field; -import java.util.Collection; -import java.util.HashSet; -import java.util.Hashtable; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.jar.Attributes; -import java.util.jar.JarInputStream; -import java.util.jar.JarOutputStream; -import java.util.jar.Manifest; -import java.util.zip.ZipEntry; - -import org.apache.felix.bundleplugin.BundleAllPlugin; -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.factory.ArtifactFactory; -import org.apache.maven.artifact.metadata.ArtifactMetadataSource; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.resolver.ArtifactCollector; -import org.apache.maven.artifact.resolver.ArtifactNotFoundException; -import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.maven.artifact.resolver.ArtifactResolver; -import org.apache.maven.artifact.versioning.OverConstrainedVersionException; -import org.apache.maven.artifact.versioning.VersionRange; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.project.MavenProject; -import org.apache.maven.project.MavenProjectBuilder; -import org.apache.maven.project.ProjectBuildingException; -import org.apache.maven.project.artifact.InvalidDependencyVersionException; -import org.apache.maven.shared.dependency.tree.DependencyTree; -import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder; -import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException; -import org.apache.maven.shared.osgi.Maven2OsgiConverter; -import org.osgi.framework.Version; - -import aQute.lib.header.OSGiHeader; - -/** - * @version $$ - * @goal execute - * @phase compile - * @requiresDependencyResolution test - * @description Generate versioned OSGi bundles corresponding to Tuscany modules and all 3rd party dependencies - */ -public class TuscanyBundlePluginMojo extends BundleAllPlugin { - /** - * The maven project - * - * @parameter expression="${project}" - * @required - */ - private MavenProject project; - - /** - * Directory containing pom. - * - * @parameter expression="${basedir}" - * @required - */ - private File baseDir; - - /** - * Build directory for project - * - * @parameter expression="${project.build.directory}" - * @required - */ - private String buildDirectory; - - /** - * Output directory where bundles are generated. - * - * @parameter expression="${project.build.outputDirectory}" - * @required - */ - private File outputDirectory; - - /** - * Artifact resolver - * - * @component - */ - private ArtifactResolver artifactResolver; - - /** - * Artifact factory - * - * @component - */ - private ArtifactFactory artifactFactory; - - /** - * @component - */ - private ArtifactMetadataSource artifactMetadataSource; - - /** - * Dependency tree builder - * - * @component - */ - private DependencyTreeBuilder dependencyTreeBuilder; - - /** - * @component - */ - private ArtifactCollector collector; - - /** - * @component - */ - private MavenProjectBuilder mavenProjectBuilder; - - /** - * The local repository - * - * @parameter expression="${localRepository}" - * @required - */ - private ArtifactRepository localRepository; - - /** - * The remote repositories - * - * @parameter expression="${project.remoteArtifactRepositories}" - */ - private List remoteRepositories; - - /** - * @component - */ - private Maven2OsgiConverter maven2OsgiConverter; - - private static final HashSet dependenciesToIgnore = new HashSet(); - private static final HashSet importDirectives = new HashSet(); - private static final HashSet exportDirectives = new HashSet(); - private static final Hashtable privatePackages = new Hashtable(); - private static final Hashtable dynamicImports = new Hashtable(); - - static { - importDirectives.add("resolution"); - - exportDirectives.add("uses"); - exportDirectives.add("mandatory"); - exportDirectives.add("include"); - exportDirectives.add("exclude"); - - dependenciesToIgnore.add("xml-apis:xml-apis"); - dependenciesToIgnore.add("stax:stax-api"); - - - // Comma separated list of packages - privatePackages.put("org.apache.woden:woden", "javax.xml.namespace"); - privatePackages.put("org.apache.xmlbeans:xmlbeans", "org.w3c.dom"); - privatePackages.put("org.apache.axis2:axis2-adb", "org.apache.axis2.util"); - privatePackages.put("org.apache.axis2:addressing", "org.apache.axis2.addressing"); - privatePackages.put("org.apache.axis2:axis2-kernel", "org.apache.axis2.wsdl"); - privatePackages.put("org.apache.bsf:bsf-all", "org.mozilla.javascript"); - privatePackages.put("org.apache.axis2:axis2-codegen", "org.apache.axis2.wsdl,org.apache.axis2.wsdl.util"); - - dynamicImports.put("org.apache.ws.commons.axiom:axiom-api", "org.apache.axiom.om.impl.*,org.apache.axiom.soap.impl.*"); - dynamicImports.put("org.apache.bsf:bsf-all", "org.mozilla.*"); - dynamicImports.put("org.apache.santuario:xmlsec", "org.apache.ws.security.*"); - } - - - @SuppressWarnings("unchecked") - public void execute() throws MojoExecutionException { - try { - - setBasedir(baseDir); - setBuildDirectory(buildDirectory); - setOutputDirectory(outputDirectory); - setMaven2OsgiConverter(maven2OsgiConverter); - try { - Field importField = this.getClass().getSuperclass().getDeclaredField("wrapImportPackage"); - importField.setAccessible(true); - importField.set(this, "*;resolution:=optional"); - } catch (Exception e2) { - e2.printStackTrace(); - getLog().error("Could not set import instructions"); - } - - - DependencyTree dependencyTree = dependencyTreeBuilder.buildDependencyTree(project, - localRepository, artifactFactory, - artifactMetadataSource, collector ); - - Hashtable duplicateWarnings = new Hashtable(); - Hashtable artifactsToBundle = new Hashtable(); - - for (Object a : dependencyTree.getArtifacts()) { - Artifact artifact = (Artifact)a; - - if (project.getArtifactId().equals(artifact.getArtifactId()) && project.getGroupId().equals(artifact.getGroupId())) - continue; - - if (Artifact.SCOPE_SYSTEM.equals(artifact.getScope())||Artifact.SCOPE_TEST.equals(artifact.getScope())) - continue; - - String id = artifact.getGroupId() + ":" + artifact.getArtifactId(); - if (dependenciesToIgnore.contains(id)) - continue; - - Artifact old = artifactsToBundle.get(id); - if (old != null && !old.getVersion().equals(artifact.getVersion())) { - String oldVersion = old.getVersion(); - String thisVersion = artifact.getVersion(); - if (!thisVersion.equals(duplicateWarnings.get(oldVersion))&&!oldVersion.equals(duplicateWarnings.get(thisVersion))) { - getLog().warn("Multiple versions of artifacts : " + old + ", " + artifact); - duplicateWarnings.put(oldVersion, thisVersion); - } - - } - - VersionRange versionRange = artifact.getVersionRange(); - if (versionRange == null) - versionRange = VersionRange.createFromVersion(artifact.getVersion()); - - Artifact dependencyArtifact = artifactFactory.createDependencyArtifact(artifact.getGroupId(), - artifact.getArtifactId(), - versionRange, - artifact.getType(), - artifact.getClassifier(), - artifact.getScope()); - - try { - if (old != null && old.getSelectedVersion().compareTo(artifact.getSelectedVersion()) >= 0) - continue; - else - artifactsToBundle.remove(id); - } catch (OverConstrainedVersionException e1) { - getLog().warn("Could not process maven version for artifact " + artifact); - continue; - } - - try { - artifactResolver.resolve(dependencyArtifact, remoteRepositories, localRepository); - } catch (ArtifactResolutionException e) { - getLog().warn("Artifact " + artifact + " could not be resolved."); - } catch (ArtifactNotFoundException e) { - getLog().warn("Artifact " + artifact + " could not be found."); - } - - artifact.setFile(dependencyArtifact.getFile()); - - artifactsToBundle.put(id, artifact); - - } - - bundleArtifacts(artifactsToBundle.values()); - - - } catch (DependencyTreeBuilderException e) { - throw new MojoExecutionException("Could not build dependency tree", e); - } catch (ProjectBuildingException e) { - throw new MojoExecutionException("Could not build project for artifact", e); - } catch (InvalidDependencyVersionException e) { - throw new MojoExecutionException("Invalid dependency version", e); - } catch (IOException e) { - throw new MojoExecutionException("Could not build bundle manifest", e); - } - } - - - private void bundleArtifacts(Collection artifacts) throws ProjectBuildingException, - InvalidDependencyVersionException, MojoExecutionException, IOException { - - for (Artifact artifact : artifacts) { - - artifact.setFile(getFile( artifact )); - - MavenProject bundleProject; - try { - bundleProject = - mavenProjectBuilder.buildFromRepository(artifact, remoteRepositories, localRepository, true); - } catch (Exception e) { - getLog().error(e); - continue; - } - bundleProject.setArtifact(artifact); - - if ( bundleProject.getDependencyArtifacts() == null ) { - bundleProject.setDependencyArtifacts(bundleProject.createArtifacts(artifactFactory, null, null ) ); - } - - File outputFile = getOutputFile(bundleProject.getArtifact()); - if (outputFile.exists()) - outputFile.delete(); - bundle(bundleProject); - postProcessBundle(artifact, outputFile); - - } - } - - - @SuppressWarnings("unchecked") - private void postProcessBundle(Artifact artifact, File bundleFile) throws IOException { - - if (!bundleFile.exists()) - return; - - File processedFile = bundleFile; - boolean retainManifestEntries = false; - if (!artifact.getGroupId().equals("org.apache.tuscany.sca")) { - // For pre-bundled 3rd party bundles, retain all OSGi manifest entries except Require-Bundle - Manifest manifest = getManifest(artifact.getFile()); - if (manifest != null && manifest.getMainAttributes() != null && - manifest.getMainAttributes().getValue("Bundle-SymbolicName") != null) { - retainManifestEntries = true; - } - } - - Manifest manifest = getManifest(bundleFile); - Attributes attributes = manifest.getMainAttributes(); - - if (attributes == null) { - return; - } - - String artifactId = artifact.getGroupId() + ":" + artifact.getArtifactId(); - - String bundleSymName = (String)attributes.getValue("Bundle-SymbolicName"); - if (!bundleSymName.startsWith("org.apache.tuscany.sca")) { - bundleSymName = "org.apache.tuscany.sca.3rdparty." + bundleSymName; - attributes.putValue("Bundle-SymbolicName", bundleSymName); - - processedFile = new File(bundleFile.getParent(), "org.apache.tuscany.sca.3rdparty." + bundleFile.getName()); - } - - String imports = (String)attributes.getValue("Import-Package"); - String exports = (String)attributes.getValue("Export-Package"); - - // For EMF jars - if (attributes.getValue("Require-Bundle") != null) { - attributes.remove(new Attributes.Name("Require-Bundle")); - attributes.putValue("DynamicImport-Package", "*"); - attributes.remove(new Attributes.Name("Eclipse-LazyStart")); - } - - if (!retainManifestEntries && imports != null) { - StringBuilder newImportBuf = new StringBuilder(); - Map importMap = OSGiHeader.parseHeader(imports); - for (Object pkg : importMap.keySet()) { - - if (isPrivatePackage(artifactId, (String)pkg)) { - continue; - } - - Map importAttr = (Map)importMap.get(pkg); - String version = (String)importAttr.get("version"); - if (version != null && version.indexOf(',') == -1) { - if (((String)pkg).startsWith("org.osgi")) { - // Leave version as is - for OSGi packages, assume backward compatibility - } - else if (!version.matches(".*\\..*\\.")) { - Version curVersion = new Version(version); - Version nextVersion = new Version(curVersion.getMajor(), curVersion.getMinor()+1, 0); - version = '[' + version + ',' + nextVersion + ')'; - } - else - version = '[' + version + ',' + version + ']'; - importAttr.put("version", version); - } - updateManifestAttribute((String)pkg, importAttr, importDirectives, newImportBuf); - - } - attributes.putValue("Import-Package", newImportBuf.toString()); - } - - if (!retainManifestEntries && exports != null) { - StringBuilder newExportBuf = new StringBuilder(); - Map exportMap = OSGiHeader.parseHeader(exports); - - for (Object value : exportMap.keySet()) { - String pkg = (String)value; - if (!isPrivatePackage(artifactId, pkg)) { - Map exportAttr = (Map)exportMap.get(pkg); - updateManifestAttribute((String)pkg, exportAttr, exportDirectives, newExportBuf); - } - } - if (newExportBuf.length() > 0) - attributes.putValue("Export-Package", newExportBuf.toString()); - else - attributes.remove(new Attributes.Name("Export-Package")); - } - - String dynImport = dynamicImports.get(artifactId); - if (dynImport != null) - attributes.putValue("DynamicImport-Package", dynImport); - - ByteArrayOutputStream out = new ByteArrayOutputStream(); - JarOutputStream jarOut = new JarOutputStream(out, manifest); - copyJar(bundleFile, jarOut); - jarOut.close(); - out.close(); - bundleFile.delete(); - FileOutputStream fileOut = new FileOutputStream(processedFile); - fileOut.write(out.toByteArray()); - fileOut.close(); - - } - - - private void copyJar(File file, JarOutputStream jarOut) throws IOException { - - try { - JarInputStream jarIn = new JarInputStream(new FileInputStream(file)); - ZipEntry ze; - byte[] readBuf = new byte[1000]; - int bytesRead; - while ((ze = jarIn.getNextEntry()) != null) { - if (ze.getName().equals("META-INF/MANIFEST.MF")) - continue; - jarOut.putNextEntry(ze); - while ((bytesRead = jarIn.read(readBuf)) > 0) { - jarOut.write(readBuf, 0, bytesRead); - } - } - jarIn.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private Manifest getManifest(File jar) { - try { - JarInputStream jarIn = new JarInputStream(new FileInputStream(jar)); - Manifest manifest = jarIn.getManifest(); - if (manifest == null) { - ZipEntry ze; - while ((ze = jarIn.getNextEntry()) != null) { - if (ze.getName().equals("META-INF/MANIFEST.MF")) - break; - } - if (ze != null) { - byte[] bytes = new byte[(int)ze.getSize()]; - jarIn.read(bytes); - manifest = new Manifest(new ByteArrayInputStream(bytes)); - } - } - jarIn.close(); - return manifest; - } catch (IOException e) { - return null; - } - } - - private boolean isPrivatePackage(String artifactId, String pkg) { - String privatePkgs = privatePackages.get(artifactId); - if (privatePkgs != null) { - String[] pkgs = privatePkgs.split(","); - for (int i = 0; i < pkgs.length; i++) { - if (pkgs[i].trim().equals(pkg)) - return true; - } - } - return false; - } - - - private void updateManifestAttribute(String pkg, Map newMap, Set directives, StringBuilder newAttrBuffer) { - if (newAttrBuffer.length() != 0) newAttrBuffer.append(','); - newAttrBuffer.append(pkg); - if (newMap.size() > 0) { - for (Object attrName : newMap.keySet()) { - newAttrBuffer.append(';'); - newAttrBuffer.append(attrName); - if (directives.contains(attrName)) - newAttrBuffer.append(":="); - else - newAttrBuffer.append('='); - newAttrBuffer.append('\"'); - newAttrBuffer.append(newMap.get(attrName)); - newAttrBuffer.append('\"'); - } - } - } -} diff --git a/branches/sca-android/tools/maven/maven-web-junit/LICENSE b/branches/sca-android/tools/maven/maven-web-junit/LICENSE deleted file mode 100644 index 6e529a25c4..0000000000 --- a/branches/sca-android/tools/maven/maven-web-junit/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/tools/maven/maven-web-junit/NOTICE b/branches/sca-android/tools/maven/maven-web-junit/NOTICE deleted file mode 100644 index 1325efd8bf..0000000000 --- a/branches/sca-android/tools/maven/maven-web-junit/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/tools/maven/maven-web-junit/pom.xml b/branches/sca-android/tools/maven/maven-web-junit/pom.xml deleted file mode 100644 index 9399bf1456..0000000000 --- a/branches/sca-android/tools/maven/maven-web-junit/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca-maven-tools - 1.4-SNAPSHOT - ../pom.xml - - tuscany-maven-web-junit - maven-plugin - Apache Tuscany SCA Web JUnit Maven Plugin - - - - org.apache.httpcomponents - httpclient - 4.0-alpha2 - - - - org.apache.maven - maven-plugin-api - 2.0.7 - - - - org.apache.maven - maven-project - 2.0.7 - - - - diff --git a/branches/sca-android/tools/maven/maven-web-junit/src/main/java/org/apache/tuscany/tools/sca/web/junit/plugin/WebJUnitGeneratorMojo.java b/branches/sca-android/tools/maven/maven-web-junit/src/main/java/org/apache/tuscany/tools/sca/web/junit/plugin/WebJUnitGeneratorMojo.java deleted file mode 100644 index d1afe2c995..0000000000 --- a/branches/sca-android/tools/maven/maven-web-junit/src/main/java/org/apache/tuscany/tools/sca/web/junit/plugin/WebJUnitGeneratorMojo.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.sca.web.junit.plugin; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; - -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.project.MavenProject; - -/** - * @version $Rev$ $Date$ - * @goal generate - * @phase process-resources - * @requiresDependencyResolution runtime - * @description Generate the web.xml and geronimo-web.xml - */ -public class WebJUnitGeneratorMojo extends AbstractMojo { - private final static String ASL_HEADER = - "" + "\n"; - - private final static String GERONIMO_WEB_XML = - ASL_HEADER + "\n" - // + "\n ${context.root}" - + "\n " - + "\n " - + "\n ${groupId}" - + "\n ${artifactId}" - + "\n ${version}" - + "\n war" - + "\n " - + "\n " - + "\n " - + "\n\n"; - - private final static String WEB_XML = - ASL_HEADER + "\n" - + "\n" - + "\n ${display-name}" - + "\n " - + "\n tuscany" - + "\n org.apache.tuscany.sca.host.webapp.TuscanyServletFilter" - + "\n " - + "\n " - + "\n junit" - + "\n org.apache.tuscany.sca.host.webapp.junit.JUnitServletFilter" - + "\n " - + "\n junit.tests.path" - + "\n ${junit.tests.path}" - + "\n " - + "\n " - + "\n " - + "\n tuscany" - + "\n /*" - + "\n " - + "\n " - + "\n junit" - + "\n /junit/*" - + "\n " - + "\n\n"; - - /** - * @parameter - */ - private String testsPath; - - /** - * @parameter - */ - private boolean geronimo; - - /** - * The project to create a build for. - * - * @parameter expression="${project}" - * @required - * @readonly - */ - private MavenProject project; - - public void execute() throws MojoExecutionException { - File base = - new File(project.getBasedir(), "target" + File.separator - + project.getBuild().getFinalName() - + File.separator - + "WEB-INF"); - base.mkdirs(); - // Create the dir to work around the complaint from maven-war-plugin on non-existent folders - new File(project.getBasedir(), "target/classes/META-INF".replace('/', File.separatorChar)).mkdirs(); - File webxml = new File(base, "web.xml"); - getLog().info("Generating " + webxml.toString()); - - String name = project.getName(); - if (name == null) { - name = project.getGroupId() + "-" + project.getArtifactId(); - } - String content = setParameter(WEB_XML, "display-name", name); - - if (testsPath == null) { - testsPath = "/WEB-INF/classes/"; - } - content = setParameter(content, "junit.tests.path", testsPath); - - try { - FileWriter writer = new FileWriter(webxml); - writer.append(content); - writer.close(); - } catch (IOException e) { - throw new MojoExecutionException(e.getMessage(), e); - } - - if (geronimo) { - File geronimoxml = new File(base, "geronimo-web.xml"); - getLog().info("Generating " + geronimoxml.toString()); - content = setParameter(GERONIMO_WEB_XML, "groupId", project.getGroupId()); - content = setParameter(content, "artifactId", project.getArtifactId()); - content = setParameter(content, "version", project.getVersion()); - // content = setParameter(content, "context.root", "/" + project.getBuild().getFinalName()); - try { - geronimoxml.getParentFile().mkdirs(); - FileWriter writer = new FileWriter(geronimoxml); - writer.append(content); - writer.close(); - } catch (IOException e) { - throw new MojoExecutionException(e.getMessage(), e); - } - } - - // Workaround: maven-war-plugin doesn't like non-existing folders - // create target/test-classes - new File(project.getBasedir(), "target" + File.separator + "test-classes").mkdirs(); - - } - - private String setParameter(String xml, String name, String value) { - String pattern = "${" + name + "}"; - int index = xml.indexOf(pattern); - if (index != -1) { - String content = xml.substring(0, index) + value + xml.substring(index + pattern.length()); - return content; - } - return xml; - } - -} diff --git a/branches/sca-android/tools/maven/maven-web-junit/src/main/java/org/apache/tuscany/tools/sca/web/junit/plugin/WebJUnitMojo.java b/branches/sca-android/tools/maven/maven-web-junit/src/main/java/org/apache/tuscany/tools/sca/web/junit/plugin/WebJUnitMojo.java deleted file mode 100644 index 658d65d7c3..0000000000 --- a/branches/sca-android/tools/maven/maven-web-junit/src/main/java/org/apache/tuscany/tools/sca/web/junit/plugin/WebJUnitMojo.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.sca.web.junit.plugin; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; - -import org.apache.commons.logging.LogFactory; -import org.apache.http.Header; -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.HttpStatus; -import org.apache.http.StatusLine; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.impl.client.DefaultHttpClient; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.project.MavenProject; - -/** - * @version $Rev$ $Date$ - * @goal test - * @phase integration-test - * @requiresDependencyResolution test - * @description Run the unit test over HTTP - */ -public class WebJUnitMojo extends AbstractMojo { - /** - * The project to create a build for. - * - * @parameter expression="${project}" - * @required - * @readonly - */ - private MavenProject project; - - /** - * The test cases to run - * @parameter - */ - private String testCases[]; - - /** - * The URL for the web site - * @parameter - */ - private String url; - - /** - * Timeout for the HTTP connection - * @parameter - */ - private int timeout = 300000; // 5 minutes - - /** - * To avoid throwing exceptions because we want the stop container plugin to be executed - * @parameter - */ - private boolean ignoreErrors = true; - - public void execute() throws MojoExecutionException { - if (project.getPackaging().equals("pom")) { - return; - } - - reset(); - - if (url == null) { - url = "http://localhost:8080/" + project.getBuild().getFinalName() + "/junit?op=runAll"; - } - - if (testCases != null) { - StringBuffer buf = new StringBuffer(url); - for (int i = 0; i < testCases.length; i++) { - if (i == 0) { - buf.append('?'); - } - buf.append(testCases[i]); - if (i != testCases.length - 1) { - buf.append(','); - } - } - url = buf.toString(); - } - - getLog().info("Connecting to " + url); - - int runs = 0, errors = 0, failures = 0; - String xml = ""; - - try { - HttpClient client = new DefaultHttpClient(); - HttpGet httpget = new HttpGet(url); - httpget.getParams().setParameter("http.socket.timeout", new Integer(timeout)); - - // Execute HTTP request - HttpResponse response = client.execute(httpget); - - StatusLine status = response.getStatusLine(); - if (status.getStatusCode() != HttpStatus.SC_OK) { - if (!ignoreErrors) { - throw new MojoExecutionException(status.getStatusCode() + ": " + status.getReasonPhrase()); - } - getLog().error(status.getStatusCode() + ": " + status.getReasonPhrase()); - return; - } - Header header = response.getFirstHeader("junit.errors"); - errors = header == null ? 0 : Integer.parseInt(header.getValue()); - header = response.getFirstHeader("junit.failures"); - failures = header == null ? 0 : Integer.parseInt(header.getValue()); - header = response.getFirstHeader("junit.runs"); - runs = header == null ? 0 : Integer.parseInt(header.getValue()); - getLog().info("Runs: " + runs + ", Failures: " + failures + ", Errors: " + errors); - - // Get hold of the response entity - HttpEntity entity = response.getEntity(); - - // If the response does not enclose an entity, there is no need - // to bother about connection release - if (entity != null) { - BufferedReader reader = new BufferedReader(new InputStreamReader(entity.getContent())); - try { - StringBuffer sb = new StringBuffer(); - while (true) { - String line = reader.readLine(); - if (line == null) { - break; - } - sb.append(line); - } - xml = sb.toString(); - getLog().debug(xml); - - } catch (IOException ex) { - - // In case of an IOException the connection will be released - // back to the connection manager automatically - throw ex; - - } catch (RuntimeException ex) { - - // In case of an unexpected exception you may want to abort - // the HTTP request in order to shut down the underlying - // connection and release it back to the connection manager. - httpget.abort(); - throw ex; - - } finally { - - // Closing the input stream will trigger connection release - reader.close(); - - } - - } - } catch (Exception e) { - if (!ignoreErrors) { - throw new MojoExecutionException(e.getMessage(), e); - } - getLog().error(e); - } - if (errors != 0 || failures != 0) { - if (!ignoreErrors) { - throw new MojoExecutionException(xml); - } - getLog().error(xml); - } - - } - - /** - * A workaround to avoid logging conflict with Geronimo - */ - private static void reset() { - LogFactory.releaseAll(); - - // Restore a reasonable default log impl - System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog"); - - // Make SimpleLog look more like Maven logs - System.setProperty("org.apache.commons.logging.simplelog.showShortLogname", "false"); - - // Restore default Geronimo bootstrap behavior - System.getProperties().remove("geronimo.bootstrap.logging.enabled"); - } - -} diff --git a/branches/sca-android/tools/maven/maven-wsdl2java/LICENSE b/branches/sca-android/tools/maven/maven-wsdl2java/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-android/tools/maven/maven-wsdl2java/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/tools/maven/maven-wsdl2java/NOTICE b/branches/sca-android/tools/maven/maven-wsdl2java/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-android/tools/maven/maven-wsdl2java/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/tools/maven/maven-wsdl2java/pom.xml b/branches/sca-android/tools/maven/maven-wsdl2java/pom.xml deleted file mode 100644 index 0425f8826e..0000000000 --- a/branches/sca-android/tools/maven/maven-wsdl2java/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca-maven-tools - 1.4-SNAPSHOT - ../pom.xml - - tuscany-maven-wsdl2java - maven-plugin - Apache Tuscany SCA WSDL2Java Maven Plugin - - - - org.apache.maven - maven-plugin-api - 2.0 - - - - org.apache.tuscany.sca - tuscany-wsdl2java - 1.4-SNAPSHOT - - - diff --git a/branches/sca-android/tools/maven/maven-wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/plugin/WSDL2JavaGeneratorMojo.java b/branches/sca-android/tools/maven/maven-wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/plugin/WSDL2JavaGeneratorMojo.java deleted file mode 100644 index 8021692521..0000000000 --- a/branches/sca-android/tools/maven/maven-wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/plugin/WSDL2JavaGeneratorMojo.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.wsdl2java.plugin; - -import java.io.File; -import java.io.FileFilter; -import java.io.IOException; -import java.util.List; - -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator; - -/** - * @version $Rev$ $Date$ - * @goal generate - * @phase generate-sources - * @description Generate SDO interface classes from an XML Schema - */ -public class WSDL2JavaGeneratorMojo extends AbstractMojo { - /** - * The directory containing WSDL files; defaults to ${basedir}/src/main/wsdl - * @parameter expression="${basedir}/src/main/wsdl" - */ - private String wsdlDir; - - /** - * Name of the WSDL file; if omitted all files in the directory are processed - * @parameter - */ - private File wsdlFile; - - /** - * The Java package to generate into. By default the value is derived from the schema URI. - * - * @parameter - */ - private String javaPackage; - - /** - * The directory to generate into; defaults to ${project.build.directory}/wsdl2java-source - * - * @parameter expression="${project.build.directory}/wsdl2java-source" - */ - private String targetDirectory; - - /** - * The directory to generate into; defaults to ${project.build.directory}/wsdl2java-source - * - * @parameter - */ - private WSDLFileOption[] wsdlFiles; - - /** - * @parameter expression="${project.compileSourceRoots}" - * @readonly - */ - private List compilerSourceRoots; - - public void execute() throws MojoExecutionException { - - if(null != wsdlFiles){ - for(int i=0; i< wsdlFiles.length ; ++i ){ - System.err.println("wsdlFiles" + wsdlFiles[i].getFileName()); - WSDLFileOption wf = wsdlFiles[i]; - - if(null == wf.getTargetDirectory()) - wf.setTargetDirectory(targetDirectory); - if(null == wf.getJavaPackage()){ - wf.setJavaPackage(javaPackage); - } - if(wf.getFileName() == null || wf.getFileName().length() ==0){ - throw new MojoExecutionException("no fileName specfied for wsdl."); - } - if(!wf.getFileName().canRead() || !wf.getFileName().isFile()){ - - throw new MojoExecutionException("file can not be read:"+wf.getFileName()); - } - - } - }else{ - - - - if (wsdlFile == null) { - - File[] files = new File(wsdlDir).listFiles(FILTER); - - wsdlFiles= new WSDLFileOption[files.length]; - for(int i= files.length -1; i> -1; --i){ - - - wsdlFiles[i] = new WSDLFileOption(); - wsdlFiles[i].setFileName(files[i]); - wsdlFiles[i].setJavaPackage(javaPackage); - wsdlFiles[i].setPorts(null); - wsdlFiles[i].setTargetDirectory(targetDirectory); - - - } - - } else { - wsdlFiles= new WSDLFileOption[]{new WSDLFileOption()}; - wsdlFiles[0].setFileName(wsdlFile); - wsdlFiles[0].setJavaPackage(javaPackage); - wsdlFiles[0].setPorts(null); - wsdlFiles[0].setTargetDirectory(targetDirectory); - } - } - - int genOptions = 0; - - for (int i = 0; i < wsdlFiles.length; i++) { - File file = wsdlFiles[i].getFileName(); - File marker = new File(targetDirectory, ".gen#" + file.getName()+".wsdl2java"); - if (file.lastModified() > marker.lastModified()) { - getLog().info("Generating Java service interfaces from " + file); - WSDL2JavaGenerator.generateFromWSDL(file.toString(), wsdlFiles[i].getPorts(), wsdlFiles[i].getTargetDirectory(), wsdlFiles[i].getJavaPackage(), null, genOptions); - } - try { - marker.createNewFile(); - } catch (IOException e) { - throw new MojoExecutionException(e.getMessage(), e); - } - marker.setLastModified(System.currentTimeMillis()); - } - - compilerSourceRoots.add(targetDirectory); - } - - private static final FileFilter FILTER = new FileFilter() { - public boolean accept(File pathname) { - return (pathname.isFile() || !pathname.isHidden()); - } - }; -} \ No newline at end of file diff --git a/branches/sca-android/tools/maven/maven-wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/plugin/WSDLFileOption.java b/branches/sca-android/tools/maven/maven-wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/plugin/WSDLFileOption.java deleted file mode 100644 index cc10c351b1..0000000000 --- a/branches/sca-android/tools/maven/maven-wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/plugin/WSDLFileOption.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.wsdl2java.plugin; - -import java.io.File; - -public class WSDLFileOption { - /** - * Name of the WSDL file; if omitted all files in the directory are processed - * - */ - private File fileName; - - /** - * The Java package to generate into. By default the value is derived from the schema URI. - * - * - */ - private String javaPackage; - - /** - * The directory to generate into; defaults to ${project.build.directory}/wsdl2java-source - * - * - */ - private String targetDirectory; - - /** - * @parameter expression="${project.compileSourceRoots}" - * @readonly - */ - - private String ports[]; - - /** - * @parameter expression="${project.compileSourceRoots}" - * @readonly - */ - - - public WSDLFileOption(){} - - public String getJavaPackage() { - return javaPackage; - } - - public void setJavaPackage(String javaPackage) { - this.javaPackage = javaPackage; - } - - - public String[] getPorts() { - return ports; - } - - public void setPorts(String[] ports) { - this.ports = ports; - } - - public String getTargetDirectory() { - return targetDirectory; - } - - public void setTargetDirectory(String targetDirectory) { - this.targetDirectory = targetDirectory; - } - - public File getFileName() { - return fileName; - } - - public void setFileName(File fileName) { - this.fileName = fileName; - } - -} diff --git a/branches/sca-android/tools/maven/pom.xml b/branches/sca-android/tools/maven/pom.xml index fe08686bdf..0d0ee8b61b 100644 --- a/branches/sca-android/tools/maven/pom.xml +++ b/branches/sca-android/tools/maven/pom.xml @@ -38,12 +38,7 @@ maven-ant-generator - maven-dependency-lister maven-incremental-build - maven-java2wsdl - maven-web-junit - maven-wsdl2java - maven-tuscany-bundle-plugin diff --git a/branches/sca-android/tools/pom.xml b/branches/sca-android/tools/pom.xml index 66f10ca65b..0a6b907fc2 100644 --- a/branches/sca-android/tools/pom.xml +++ b/branches/sca-android/tools/pom.xml @@ -36,10 +36,10 @@ true + maven - wsdl2java diff --git a/branches/sca-android/tools/wsdl2java/LICENSE b/branches/sca-android/tools/wsdl2java/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/branches/sca-android/tools/wsdl2java/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - 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/sca-android/tools/wsdl2java/NOTICE b/branches/sca-android/tools/wsdl2java/NOTICE deleted file mode 100644 index fdfa0e9faa..0000000000 --- a/branches/sca-android/tools/wsdl2java/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/branches/sca-android/tools/wsdl2java/pom.xml b/branches/sca-android/tools/wsdl2java/pom.xml deleted file mode 100644 index c47f096dee..0000000000 --- a/branches/sca-android/tools/wsdl2java/pom.xml +++ /dev/null @@ -1,272 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca-tools - 1.4-SNAPSHOT - ../pom.xml - - tuscany-wsdl2java - Apache Tuscany SCA WSDL2Java Tool - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.4-SNAPSHOT - test - - - - org.apache.tuscany.sdo - tuscany-sdo-impl - 1.1.1 - - - - org.apache.tuscany.sdo - tuscany-sdo-tools - 1.1.1 - - - - com.sun.xml.bind - jaxb-xjc - 2.1.7 - - - - javax.xml.bind - jaxb-api - 2.1 - - - - com.sun.xml.bind - jaxb-impl - 2.1.7 - runtime - - - javax.xml.bind - jsr173_api - - - - - - javax.xml.stream - stax-api - 1.0-2 - - - - wsdl4j - wsdl4j - 1.6.2 - - - - org.apache.neethi - neethi - 2.0.2 - - - wsdl4j - wsdl4j - - - org.codehaus.woodstox - wstx-asl - - - - - - org.apache.ws.commons.schema - XmlSchema - 1.3.2 - - - - org.apache.ws.commons.axiom - axiom-api - - - xerces - xercesImpl - - - xml-apis - xml-apis - - - 1.2.5 - - - - org.apache.ws.commons.axiom - axiom-impl - 1.2.5 - - - - org.apache.axis2 - axis2-kernel - 1.3 - - - org.codehaus.woodstox - wstx-asl - - - - - - org.apache.axis2 - axis2-java2wsdl - 1.3 - - - org.apache.ant - ant - - - - - - org.apache.axis2 - axis2-codegen - 1.3 - - - org.apache.geronimo.specs - geronimo-activation_1.1_spec - - - - - - org.eclipse.emf - codegen - 2.2.3 - - - - org.eclipse.emf - codegen-ecore - 2.2.3 - - - - annogen - annogen - 0.1.0 - - - - commons-logging - commons-logging - 1.1 - - - - org.codehaus.woodstox - wstx-asl - 3.2.1 - runtime - - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.0 - - - add-test-source - generate-sources - - add-test-source - - - - target/sdo-source - - - - - - - org.apache.tuscany.sdo - tuscany-sdo-plugin - 1.1.1 - - - generate-sdo - generate-test-sources - - ${basedir}/src/test/resources/CreditScoreDocLit.wsdl - org.example.creditscore.doclit - true - true - true - - - generate - - - - - - - - - - - true - - java.net - java.net Maven 1.x Repository - http://download.java.net/maven/1 - legacy - - - - - - indiana - http://ftp.ussg.iu.edu/eclipse/modeling/emf/emf/maven2/ - - true - - - - - diff --git a/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/JavaInterfaceEmitter.java b/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/JavaInterfaceEmitter.java deleted file mode 100644 index a2220abe55..0000000000 --- a/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/JavaInterfaceEmitter.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.wsdl2java.generate; - -import static org.apache.tuscany.tools.wsdl2java.util.XMLNameUtil.getJavaNameFromXMLName; - -import java.io.File; -import java.util.ArrayList; -import java.util.List; - -import javax.xml.namespace.QName; - -import org.apache.axis2.description.AxisMessage; -import org.apache.axis2.description.AxisOperation; -import org.apache.axis2.util.FileWriter; -import org.apache.axis2.wsdl.WSDLConstants; -import org.apache.axis2.wsdl.codegen.CodeGenConfiguration; -import org.apache.axis2.wsdl.codegen.emitter.JavaEmitter; -import org.apache.axis2.wsdl.codegen.writer.InterfaceWriter; -import org.apache.axis2.wsdl.databinding.TypeMapper; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -/** - * Overrides the Axis2 JavaEmitter to generate unwrapped methods. - */ -public class JavaInterfaceEmitter extends JavaEmitter { - - private CodeGenConfiguration codegenConfiguration; - private TypeMapper typeMapper; - - @Override - public void setCodeGenConfiguration(CodeGenConfiguration configuration) { - super.setCodeGenConfiguration(configuration); - codegenConfiguration = configuration; - } - - @Override - public void setMapper(TypeMapper typeMapper) { - super.setMapper(typeMapper); - this.typeMapper = typeMapper; - } - - private List getParameterElementList(Document doc, AxisMessage message, boolean wrapped) { - List parameterElementList = new ArrayList(); - - if (message != null && message.getElementQName() != null) { - - SDODataBindingTypeMappingEntry typeMappingEntry = - (SDODataBindingTypeMappingEntry)this.typeMapper.getTypeMappingObject(message.getElementQName()); - List typeMappings; - if (wrapped) { - typeMappings = typeMappingEntry.getPropertyClassNames(); - if(typeMappings == null) { - typeMappings = new ArrayList(); - typeMappings.add(typeMappingEntry.getClassName()); - } - } else { - typeMappings = new ArrayList(); - typeMappings.add(typeMappingEntry.getClassName()); - } - - for (int i = 0; i < typeMappings.size(); i++) { - Element param = doc.createElement("param"); - parameterElementList.add(param); - - String typeMapping = (String)typeMappings.get(i); - - addAttribute(doc, "name", this.typeMapper.getParameterName(message.getElementQName()), param); - addAttribute(doc, "type", (typeMapping == null) ? "" : typeMapping, param); - - // add an extra attribute to say whether the type mapping is the - // default - // if (TypeMapper.DEFAULT_CLASS_NAME.equals(typeMapping)) { - if (typeMapper.getDefaultMappingName().equals(typeMapping)) { - - addAttribute(doc, "default", "yes", param); - } - - addAttribute(doc, "value", null, param); - - // add this as a body parameter - addAttribute(doc, "location", "body", param); - - } - } - - return parameterElementList; - } - - @Override - public List getParameterElementList(Document doc, List parameters, String location) { - List parameterElementList = new ArrayList(); - - if ((parameters != null) && !parameters.isEmpty()) { - int count = parameters.size(); - - for (int i = 0; i < count; i++) { - Element param = doc.createElement("param"); - QName name = (QName)parameters.get(i); - - addAttribute(doc, "name", this.typeMapper.getParameterName(name), param); - - String typeMapping = this.typeMapper.getTypeMappingName(name); - String typeMappingStr = (typeMapping == null) ? "" : typeMapping; - - addAttribute(doc, "type", typeMappingStr, param); - addAttribute(doc, "location", location, param); - parameterElementList.add(param); - } - } - - return parameterElementList; - } - - @Override - protected Element getInputElement(Document doc, AxisOperation operation, List headerParameterQNameList) { - return getElement(doc, - "input", - operation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE), - operation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE).isWrapped(), - headerParameterQNameList); - } - - @Override - protected Element getOutputElement(Document doc, AxisOperation operation, List headerParameterQNameList) { - return getElement(doc, - "output", - operation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE), - operation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE).isWrapped(), - headerParameterQNameList); - } - - protected Element getElement(Document doc, - String elementName, - AxisMessage message, - boolean wrapped, - List headerParameterQNameList) { - Element element = doc.createElement(elementName); - - List parameterElementList = getParameterElementList(doc, message, wrapped); - for (int i = 0; i < parameterElementList.size(); i++) { - element.appendChild((Element)parameterElementList.get(i)); - } - - List outputElementList = getParameterElementList(doc, headerParameterQNameList, "header"); - - for (int i = 0; i < outputElementList.size(); i++) { - element.appendChild((Element)outputElementList.get(i)); - } - - return element; - } - - @Override - protected void writeInterface(boolean writeDatabinders) throws Exception { - Document interfaceModel = createDOMDocumentForInterface(writeDatabinders); - if (!codegenConfiguration.getOutputLocation().exists()) { - codegenConfiguration.getOutputLocation().mkdirs(); - } - InterfaceWriter interfaceWriter = - new RemotableInterfaceWritter(this.codegenConfiguration.getOutputLocation(), this.codegenConfiguration - .getOutputLanguage()); - - String packageName = interfaceModel.getDocumentElement().getAttribute("package"); - String className = interfaceModel.getDocumentElement().getAttribute("name"); - - System.out.println(">> Generating Java class " + packageName + "." + className); - File outputFile = - FileWriter.createClassFile(this.codegenConfiguration.getOutputLocation(), packageName, className, ".java"); - if (outputFile.exists()) { - outputFile.delete(); - } - -// JIRA TUSCANY-1561 Port to Axis2 1.3 -// writeClass(interfaceModel, interfaceWriter); - - writeFile(interfaceModel, interfaceWriter); - } - - @Override - protected String makeJavaClassName(String word) { - // return XMLNameUtil.getJavaNameFromXMLName(word, true); - return getJavaNameFromXMLName(word, true); - } - - @Override - protected Element[] getFaultParamElements(Document doc, AxisOperation operation) { - ArrayList params = new ArrayList(); - ArrayList faultMessages = operation.getFaultMessages(); - - if (faultMessages != null && !faultMessages.isEmpty()) { - Element paramElement; - AxisMessage msg; - for (int i = 0; i < faultMessages.size(); i++) { - paramElement = doc.createElement("param"); - msg = (AxisMessage)faultMessages.get(i); - String msgClassName = WSDL2JavaGenerator.normalizeClassName(msg.getName()); - addAttribute(doc, "name", msgClassName, paramElement); - params.add(paramElement); - } - - return (Element[])params.toArray(new Element[params.size()]); - } else { - return new Element[] {};// return empty array - } - } -} diff --git a/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/JavaInterfaceGenerator.java b/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/JavaInterfaceGenerator.java deleted file mode 100644 index 8e0c3683a3..0000000000 --- a/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/JavaInterfaceGenerator.java +++ /dev/null @@ -1,327 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.wsdl2java.generate; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.PrintStream; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import javax.wsdl.Binding; -import javax.wsdl.Definition; -import javax.wsdl.Fault; -import javax.wsdl.Message; -import javax.wsdl.Operation; -import javax.wsdl.Part; -import javax.wsdl.Port; -import javax.wsdl.PortType; -import javax.wsdl.Service; -import javax.wsdl.WSDLException; -import javax.wsdl.factory.WSDLFactory; -import javax.wsdl.xml.WSDLReader; -import javax.xml.namespace.QName; -import javax.xml.parsers.ParserConfigurationException; - -import org.apache.axis2.AxisFault; -import org.apache.axis2.description.AxisService; -import org.apache.axis2.description.WSDL11ToAxisServiceBuilder; -import org.apache.axis2.util.FileWriter; -import org.apache.axis2.util.XMLUtils; -import org.apache.axis2.wsdl.codegen.CodeGenConfiguration; -import org.apache.axis2.wsdl.codegen.CodeGenerationException; -import org.apache.axis2.wsdl.codegen.extension.CodeGenExtension; -import org.apache.axis2.wsdl.codegen.extension.DefaultDatabindingExtension; -import org.apache.axis2.wsdl.codegen.extension.PackageFinder; -import org.apache.axis2.wsdl.codegen.extension.WSDLValidatorExtension; -import org.apache.axis2.wsdl.databinding.JavaTypeMapper; -import org.w3c.dom.Document; -import org.xml.sax.SAXException; - -import com.sun.tools.xjc.api.XJC; - -public class JavaInterfaceGenerator { - - private List codegenExtensions = new ArrayList(); - private List codegenConfigurations= new LinkedList(); - private String outputLocation; - - - - public JavaInterfaceGenerator(String uri, String ports[], String outputLocation, String packageName, - Map typeMapping) throws CodeGenerationException { - this.outputLocation = outputLocation; - - Definition definition; - try { - definition = readWSDL(uri); - } catch (WSDLException e) { - throw new CodeGenerationException(e); - } - - HashSet interestedPorts = ports == null ? null : new HashSet(Arrays.asList(ports)); - - // Service service=(Service)definition.getServices().values().().next(); - - HashSet donePortTypes= new HashSet(); - - for (Iterator sIter = definition.getServices().values().iterator(); sIter.hasNext(); ) { - Service service = (Service) sIter.next(); - - QName serviceQname = service.getQName(); - for (Iterator pIter= service.getPorts().values().iterator(); pIter.hasNext(); ) { - Port port= (Port) pIter.next(); - if(interestedPorts != null && ! interestedPorts.contains(port.getName())) continue;//not iterested. - PortType portType= getPortType(port); - if(null == portType) continue; // not connected. - QName pQName= portType.getQName(); - if(donePortTypes.contains(pQName)) continue; //allready did it. - donePortTypes.add(pQName); - - if (packageName == null) { - //use JAXWS/JAXB NS->package default algorithm, not the SDO/EMF one - packageName = XJC.getDefaultPackageName(definition.getTargetNamespace()); - } - // - // Use WSDL4J object to generate exception classes - // - generateFaults(packageName, portType, typeMapping); - JavaTypeMapper typeMapper = new JavaTypeMapper(); - for (Map.Entry e : typeMapping.entrySet()) { - typeMapper.addTypeMappingObject(e.getKey(), e.getValue()); - // Added for generation of exceptions from faults - typeMapper.addTypeMappingName(e.getKey(), e.getValue().getClassName()); - } - - - AxisService axisService; - WSDL11ToAxisServiceBuilder builder; - try { - // - // Added since at a newer level of Axis2, this doesn't work - // without the setCodegen(true) - // - builder = new WSDL11ToAxisServiceBuilder(definition, serviceQname, port.getName()); - builder.setCodegen(true); - axisService = builder.populateService(); - } catch (AxisFault e) { - throw new CodeGenerationException(e); - } - - axisService.setName(port.getBinding().getPortType().getQName().getLocalPart()); - CodeGenConfiguration codegenConfiguration = new CodeGenConfiguration(Collections.EMPTY_MAP); - codegenConfigurations.add(codegenConfiguration); - codegenConfiguration.setAxisService(axisService); - codegenConfiguration.setAdvancedCodeGenEnabled(false); - codegenConfiguration.setAsyncOn(false); - codegenConfiguration.setDatabindingType("sdo"); - codegenConfiguration.setGenerateAll(true); - codegenConfiguration.setGenerateDeployementDescriptor(false); - codegenConfiguration.setOutputLanguage("java"); - codegenConfiguration.setOutputLocation(new File(outputLocation)); - codegenConfiguration.setPackageName(packageName); - codegenConfiguration.setPackClasses(false); - codegenConfiguration.setPolicyMap(Collections.EMPTY_MAP); - codegenConfiguration.setPortName(port.getName()); - codegenConfiguration.setServerSide(false); - codegenConfiguration.setServiceName(service.getQName().getLocalPart()); - // This lines up with the sync/async variable from the XSL template - codegenConfiguration.setSyncOn(true); - codegenConfiguration.setTypeMapper(typeMapper); - -// JIRA TUSCANY-1561 Port to Axis2 1.3 -// codegenConfiguration.setWriteMessageReceiver(false); - codegenConfiguration.setSkipMessageReceiver(true); - - codegenConfiguration.setWriteTestCase(false); - addExtension(new WSDLValidatorExtension(), codegenConfiguration); - addExtension(new PackageFinder(), codegenConfiguration); - addExtension(new SDODataBindingCodegenExtension(typeMapper), codegenConfiguration); - addExtension(new DefaultDatabindingExtension(), codegenConfiguration); - } - } - } - - - private PortType getPortType(Port port) { - Binding binding = port.getBinding(); - if(null != binding){ - return binding.getPortType(); - } - return null; - - } - - - @SuppressWarnings("unchecked") - private void addExtension(CodeGenExtension ext, CodeGenConfiguration codegenConfiguration) { - //ext.init(codegenConfiguration); - codegenExtensions.add(new Object[]{ext, codegenConfiguration}); - } - - public void generate() throws CodeGenerationException { - try { - for (int i = 0; i < codegenExtensions.size(); i++) { - // CodeGenExtension - Object[] pair = (Object[])codegenExtensions.get(i); - - CodeGenExtension cge = (CodeGenExtension)pair[0]; - CodeGenConfiguration cgf = (CodeGenConfiguration)pair[1]; - - cge.engage(cgf); - } - - for (CodeGenConfiguration codegenConfiguration : codegenConfigurations) { - JavaInterfaceEmitter emitter = new JavaInterfaceEmitter(); - emitter.setCodeGenConfiguration(codegenConfiguration); - emitter.setMapper(codegenConfiguration.getTypeMapper()); - - emitter.writeInterface(false); - } - - } catch (Exception e) { - throw new CodeGenerationException(e); - } - } - - /** - * Read the WSDL file - * - * @param uri - * @return - * @throws WSDLException - */ - private Definition readWSDL(String uri) throws WSDLException { - - WSDLReader reader = WSDLFactory.newInstance().newWSDLReader(); - reader.setFeature("javax.wsdl.importDocuments", true); - - File file = new File(uri); - String baseURI; - - if (uri.startsWith("http://")) { - baseURI = uri; - } else { - if (file.getParentFile() == null) { - try { - baseURI = new File(".").getCanonicalFile().toURI().toString(); - } catch (IOException e) { - throw new RuntimeException(e); - } - } else { - baseURI = file.getParentFile().toURI().toString(); - } - } - - Document doc; - try { - doc = XMLUtils.newDocument(uri); - } catch (ParserConfigurationException e) { - throw new WSDLException(WSDLException.PARSER_ERROR, "Parser Configuration Error", e); - } catch (SAXException e) { - throw new WSDLException(WSDLException.PARSER_ERROR, "Parser SAX Error", e); - - } catch (IOException e) { - throw new WSDLException(WSDLException.INVALID_WSDL, "IO Error", e); - } - - return reader.readWSDL(baseURI, doc); - } - - private void generateFaults(String packageName, PortType portType, Map typeMapping) - throws CodeGenerationException{ - - for (Object o: portType.getOperations()) { - Operation op = (Operation)o; - Map messageMap = op.getFaults(); - Iterator iter = messageMap.values().iterator(); - while (iter.hasNext()) { - Fault fault = (Fault)iter.next(); - Message faultMsg = fault.getMessage(); - Iterator iter2 = faultMsg.getParts().values().iterator(); - Part faultMsgPart = (Part)iter2.next(); - // TODO - if other parts throw exc - QName faultMsgQName = faultMsg.getQName(); - QName faultMsgPartElementQName = faultMsgPart.getElementName(); - String faultClassName = typeMapping.get(faultMsgPartElementQName).getClassName(); - writeException(packageName, faultMsgQName, faultClassName, faultMsgPartElementQName); - } - } - } - - private void writeException(String packageName, QName faultMsgQName, String faultClassName, QName faultMsgPartElementQName) - throws CodeGenerationException{ - - try { - String faultWrapperClassName = - WSDL2JavaGenerator.normalizeClassName(faultMsgQName.getLocalPart()); - - File outputDir = new File(this.outputLocation); - - if (!outputDir.exists()) { - outputDir.mkdirs(); - } - File outputFile = FileWriter.createClassFile(outputDir, - packageName, faultWrapperClassName, ".java"); - - FileOutputStream fileStream = new FileOutputStream(outputFile); - PrintStream stream = new PrintStream(fileStream); - - System.out.println(">> Generating Java exception class " + packageName + "." + faultWrapperClassName); - - stream.println(); - stream.println("package " + packageName + ";"); - stream.println(); - stream.println("import javax.xml.ws.WebFault;"); - stream.println(); - stream.println("@WebFault(name=\"" + faultMsgPartElementQName.getLocalPart() - + "\", targetNamespace=\"" - + faultMsgPartElementQName.getNamespaceURI() - + "\")"); - stream.println("public class " + faultWrapperClassName + " extends Exception {"); - stream.println(); - stream.println(" private " + faultClassName + " fault;"); - stream.println(); - stream.println(" public " + faultWrapperClassName + "(String message, " + faultClassName + " fault) {"); - stream.println(" super(message);"); - stream.println(" this.fault = fault;"); - stream.println(" }"); - stream.println(); - stream.println(" public " + faultWrapperClassName + "(String message, " + faultClassName + " fault, Throwable cause) {"); - stream.println(" super(message, cause);"); - stream.println(" this.fault = fault;"); - stream.println(" }"); - stream.println(); - stream.println(" public " + faultClassName + " getFaultInfo() {"); - stream.println(" return this.fault;"); - stream.println(" }"); - stream.println("}"); - stream.println(); - } catch (Exception e) { - throw new CodeGenerationException(e); - } - } -} diff --git a/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/RemotableInterfaceWritter.java b/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/RemotableInterfaceWritter.java deleted file mode 100644 index 0c4f42633a..0000000000 --- a/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/RemotableInterfaceWritter.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.wsdl2java.generate; - -import java.io.File; - -import org.apache.axis2.wsdl.codegen.CodeGenerationException; -import org.apache.axis2.wsdl.codegen.writer.InterfaceWriter; - -/** - * - */ -public class RemotableInterfaceWritter extends InterfaceWriter { - private static final String REMOTABLE_INTERFACE_TEMPLATE="/RemotableInterfaceTemplate.xsl"; - - public RemotableInterfaceWritter(String outputFileLocation) { - super(outputFileLocation); - } - - public RemotableInterfaceWritter(File outputFileLocation, String language) { - super(outputFileLocation, language); - } - - /** - * Loads the template. - */ - @Override - public void loadTemplate() throws CodeGenerationException { - // the default behavior for the class writers is to use the property map from the language specific types - // The properties are arranged in the following order - // .* .template=, - - //override original behaviour to always load the template we specified - this.xsltStream = this.getClass().getResourceAsStream(REMOTABLE_INTERFACE_TEMPLATE); - - } -} diff --git a/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/SDODataBindingCodegenExtension.java b/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/SDODataBindingCodegenExtension.java deleted file mode 100644 index 4ab152fb90..0000000000 --- a/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/SDODataBindingCodegenExtension.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.wsdl2java.generate; - -import org.apache.axis2.wsdl.codegen.CodeGenConfiguration; -import org.apache.axis2.wsdl.codegen.CodeGenerationException; -import org.apache.axis2.wsdl.codegen.extension.AbstractDBProcessingExtension; -import org.apache.axis2.wsdl.databinding.TypeMapper; - -/** - * SDO data binding codegen extension. - */ -public class SDODataBindingCodegenExtension extends AbstractDBProcessingExtension { - - private TypeMapper typeMapper; - - public SDODataBindingCodegenExtension(TypeMapper typeMapper) { - this.typeMapper=typeMapper; - } - - @Override - protected boolean testFallThrough(String dbFrameworkName) { - return !dbFrameworkName.equals("sdo"); - } - -// public void engage() { -// if (testFallThrough(configuration.getDatabindingType())) { -// return; -// } -// -// // Set the type mapper into the config -// configuration.setTypeMapper(typeMapper); -// -// } - - public void engage(CodeGenConfiguration configuration) throws CodeGenerationException { - if (testFallThrough(configuration.getDatabindingType())) { - return; - } - - // Set the type mapper into the config - configuration.setTypeMapper(typeMapper); - - - } - -} diff --git a/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/SDODataBindingTypeMappingEntry.java b/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/SDODataBindingTypeMappingEntry.java deleted file mode 100644 index 2d81ef12bf..0000000000 --- a/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/SDODataBindingTypeMappingEntry.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.wsdl2java.generate; - -import java.util.List; - -/** - * This represents a type mapping entry, used by the JavaInterfaceEmitter to generate - * method signatures. - */ -public class SDODataBindingTypeMappingEntry { - - private final boolean anonymous; - private final List propertyClassNames; - private final String className; - - public SDODataBindingTypeMappingEntry(String className, boolean anonymous, List propertyClassNames) { - this.className = className; - this.anonymous = anonymous; - this.propertyClassNames = propertyClassNames; - } - - public boolean isAnonymous() { - return anonymous; - } - - public String getClassName() { - return className; - } - - public List getPropertyClassNames() { - return propertyClassNames; - } - -} diff --git a/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGenerator.java b/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGenerator.java deleted file mode 100644 index f6d1f3a64a..0000000000 --- a/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGenerator.java +++ /dev/null @@ -1,529 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.wsdl2java.generate; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileReader; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.StringTokenizer; -import java.util.Vector; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sdo.generate.XSD2JavaGenerator; -import org.apache.tuscany.sdo.helper.HelperContextImpl; -import org.apache.tuscany.sdo.util.DataObjectUtil; -import org.eclipse.emf.codegen.ecore.genmodel.GenClass; -import org.eclipse.emf.codegen.ecore.genmodel.GenModel; -import org.eclipse.emf.codegen.ecore.genmodel.GenModelFactory; -import org.eclipse.emf.codegen.ecore.genmodel.GenPackage; -import org.eclipse.emf.codegen.util.CodeGenUtil; -import org.eclipse.emf.common.util.Diagnostic; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.EPackageRegistryImpl; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.util.BasicExtendedMetaData; -import org.eclipse.emf.ecore.util.ExtendedMetaData; - -import commonj.sdo.helper.HelperContext; -import commonj.sdo.helper.XSDHelper; - -public class WSDL2JavaGenerator { - //Note: Dynamic SDO is defined as 0x4000 to avoid conflict with XSD2Java genOptions - static protected final int DYNAMIC_SDO = 0x1; - static protected final int GENERATE_SDO = 0x2; - static protected final int VERBOSE_MODE = 0x4; - static protected final String NO_GEN_PARM = "-noGenerate"; - static protected final String TARGET_DIR_PARM = "-targetDirectory"; - static protected final String JAVA_PACKAGE_PARM = "-javaPackage"; - static protected final String ALL_NAMESPACES_PARM = "-schemaNamespace all"; - - /** - * Generate Java interfaces from WSDL Usage arguments: [ -targetDirectory - * ] [ -javaPackage ] - * For example: generate somedir/somefile.wsdl Basic options: - * -targetDirectory Generates the Java source code in the specified - * directory. By default, the code is generated in the same directory as the - * input WSDL file. -javaPackage Overrides the Java package for the - * generated classes. By default the package name is derived from the - * targetNamespace of the WSDL definition being generated. For example, if - * the targetNamespace is "http://www.example.com/simple", the default - * package will be "com.example.simple". - */ - public static void main(String args[]) { - if (args.length == 0) { - printUsage(); - return; - } - - String portName = null; - String targetDirectory = null; - String wsdlJavaPackage = null; - String xsdJavaPackage = null; - String sdoGenArgs = null; - String sdoGenArgsString = null; - int genOptions = 0; - - int index = 0; - for (; index < args.length && args[index].startsWith("-"); ++index) { - if (args[index].equalsIgnoreCase("-port")) { - portName = args[++index]; - } else if (args[index].equalsIgnoreCase("-targetDirectory")) { - targetDirectory = args[++index]; - } else if (args[index].equalsIgnoreCase("-javaPackage")) { - wsdlJavaPackage = args[++index]; - } else if (args[index].equalsIgnoreCase("-dynamicSDO")) { - genOptions |= DYNAMIC_SDO; - } else if (args[index].equalsIgnoreCase("-generateSDO")){ - genOptions |= GENERATE_SDO; - } else if (args[index].equalsIgnoreCase("-sdoGenArgs")){ - sdoGenArgs = args[++index]; - } else if (args[index].equalsIgnoreCase("-verbose")){ - genOptions |= VERBOSE_MODE; - } - // else if (...) - else { - printUsage(); - return; - } - } - if (sdoGenArgs!=null && (GENERATE_SDO & genOptions)== 0){ - genOptions |= GENERATE_SDO; - } - - if (targetDirectory == null) { - targetDirectory = "."; - } - String wsdlFileName = args[index]; - if (wsdlFileName == null || ((DYNAMIC_SDO & genOptions)!=0 && (GENERATE_SDO & genOptions)!= 0)) { - printUsage(); - return; - } - if (sdoGenArgs !=null){ - try { - File inFile = new File(sdoGenArgs).getAbsoluteFile(); - FileReader inputFile = new FileReader(inFile); - BufferedReader bufRead = new BufferedReader(inputFile); - StringBuffer fileContents= new StringBuffer(); - String line; - while ((line = bufRead.readLine())!=null){ - fileContents.append(line + " "); - } - sdoGenArgsString = fileContents.toString(); - } catch (IOException e) { - e.printStackTrace(); - throw new IllegalArgumentException(e); - } - } else { - sdoGenArgsString = null; - } - - if ((DYNAMIC_SDO & genOptions) != 0){ - generateDynamicFromWSDL(wsdlFileName, portName!=null? new String[]{portName}:null, targetDirectory, wsdlJavaPackage, xsdJavaPackage, genOptions); - } else { - generateFromWSDL(wsdlFileName, portName!=null? new String[]{portName}:null, targetDirectory, wsdlJavaPackage, genOptions, sdoGenArgsString); - } - - } - - @SuppressWarnings("unchecked") - public static void generateFromWSDL(String wsdlFileName, String[] ports, String targetDirectory, String wsdlJavaPackage, int genOptions, String sdoGenArgsString) - { - try { - if (targetDirectory == null) { - targetDirectory = new File(wsdlFileName).getCanonicalFile().getParent(); - } else { - targetDirectory = new File(targetDirectory).getCanonicalPath(); - } - - // Populate the typeMapping table that will be given to the Axis2 WSDL2Java - Map typeMapping = - new HashMap(); - StringBuffer buildCommand = new StringBuffer(); - //build XSD command lines - //build generic command for simple case & dynamic SDO - buildCommand.append(ALL_NAMESPACES_PARM); - if (sdoGenArgsString == null){ - buildCommand.append(" " + TARGET_DIR_PARM + " " + targetDirectory); - if (wsdlJavaPackage != null && (genOptions & GENERATE_SDO)!=0){ - buildCommand.append(" " + JAVA_PACKAGE_PARM + " " + wsdlJavaPackage); - } - if ((genOptions & GENERATE_SDO)==0){ - buildCommand.append(" "); - buildCommand.append(NO_GEN_PARM); - } - } else { - buildCommand.append(" "); - buildCommand.append(sdoGenArgsString); - } - - //TUSCANY-1642 - We shouldn't split the wsdlFileName as it my contain a filename with spaces - Vector sdoCommand = new Vector(java.util.Arrays.asList(buildCommand.toString().split("\\s+"))); - sdoCommand.add(wsdlFileName); - - String[] sdoGenCommand = new String[sdoCommand.size()]; - sdoCommand.toArray(sdoGenCommand); - - if ((genOptions & VERBOSE_MODE)!=0){ - System.out.println("Options passed to XSD2Java: "); - for (int i=0; i typeMapping = - new HashMap(); - if (!packageRegistry.values().isEmpty()) { - ResourceSet resourceSet = DataObjectUtil.createResourceSet(); - - // Populate list of GenPackages and a map of GenClasses keyed by EClass - List genPackages = new ArrayList(); - Map genClasses = new HashMap(); - for (Iterator iter = packageRegistry.values().iterator(); iter.hasNext();) { - EPackage currentEPackage = (EPackage)iter.next(); - String currentBasePackage = extractBasePackageName(currentEPackage, xsdJavaPackage); - String currentPrefix = CodeGenUtil.capName(currentEPackage.getName()); - - GenPackage currentGenPackage = createGenPackage(currentEPackage, currentBasePackage, - currentPrefix, genOptions, resourceSet); - genPackages.add(currentGenPackage); - for (GenClass genClass : (List)currentGenPackage.getGenClasses()) { - genClasses.put(genClass.getEcoreClass(), genClass); - } - - } - - // Process all the SDO packages - // Populate the QName -> interfaceName typeMapping table - for (GenPackage currentGenPackage : genPackages) { - EPackage currentEPackage = currentGenPackage.getEcorePackage(); - - // Populate the type mappings for all the complex types - for (GenClass genClass : (List)currentGenPackage.getGenClasses()) { - QName qname = new QName(extendedMetaData.getNamespace(currentEPackage), - extendedMetaData.getName(genClass.getEcoreClass())); - String interfaceName = (DYNAMIC_SDO & genOptions) == DYNAMIC_SDO ? "commonj.sdo.DataObject" : currentGenPackage - .getInterfacePackageName() - + '.' + genClass.getInterfaceName(); - SDODataBindingTypeMappingEntry typeMappingEntry = - new SDODataBindingTypeMappingEntry(interfaceName, false, null); - typeMapping.put(qname, typeMappingEntry); - } - - // Process all the global XSD elements - EClass documentRoot = extendedMetaData.getDocumentRoot(currentEPackage); - if (documentRoot != null) { - for (EStructuralFeature element : (List)extendedMetaData - .getElements(documentRoot)) { - EClassifier elementType = element.getEType(); - - // Handle a complex type - if (elementType instanceof EClass) { - EClass eClass = (EClass)elementType; - - GenClass genClass = genClasses.get(elementType); - QName qname = new QName(extendedMetaData.getNamespace(currentEPackage), - extendedMetaData.getName(element)); - String interfaceName = (DYNAMIC_SDO & genOptions) == DYNAMIC_SDO ? "commonj.sdo.DataObject" : genClass - .getGenPackage().getInterfacePackageName() - + '.' + genClass.getInterfaceName(); - boolean anonymous = extendedMetaData.isAnonymous(eClass); - - // Build list of property class names - List propertyClassNames=new ArrayList(); - for (EStructuralFeature feature : (List)eClass.getEStructuralFeatures()) { - EClassifier propertyType = feature.getEType(); - if (propertyType instanceof EClass) { - GenClass propertyGenClass = genClasses.get(propertyType); - String propertyClassName = (DYNAMIC_SDO & genOptions) == DYNAMIC_SDO ? "commonj.sdo.DataObject" - : propertyGenClass.getGenPackage().getInterfacePackageName() + '.' - + '.' + propertyGenClass.getInterfaceName(); - propertyClassNames.add(propertyClassName); - } else if (propertyType instanceof EClassifier) { - String propertyClassName = propertyType.getInstanceClass().getName(); - propertyClassNames.add(propertyClassName); - } - } - - SDODataBindingTypeMappingEntry typeMappingEntry = - new SDODataBindingTypeMappingEntry(interfaceName, anonymous, propertyClassNames); - typeMapping.put(qname, typeMappingEntry); - - } else { - - // Handle a simple type - QName qname = new QName(extendedMetaData.getNamespace(currentEPackage), - extendedMetaData.getName(element)); - String className = elementType.getInstanceClass().getName(); - SDODataBindingTypeMappingEntry typeMappingEntry = - new SDODataBindingTypeMappingEntry(className, false, null); - typeMapping.put(qname, typeMappingEntry); - } - } - } - } - } - - try { - JavaInterfaceGenerator codeGenerator = new JavaInterfaceGenerator(wsdlFileName, - ports, - targetDirectory, - wsdlJavaPackage, - typeMapping); - codeGenerator.generate(); - } catch (Exception e) { - e.printStackTrace(); - throw new IllegalArgumentException(e); - } - - } catch (IOException e) { - e.printStackTrace(); - throw new IllegalArgumentException(e); - } - } - - @SuppressWarnings("unchecked") - public static GenPackage createGenPackage(EPackage ePackage, String basePackage, String prefix, - int genOptions, ResourceSet resourceSet) { - GenModel genModel = ecore2GenModel(ePackage, basePackage, prefix, genOptions); - - URI ecoreURI = URI.createURI("file:///" + ePackage.getName() + ".ecore"); - URI genModelURI = ecoreURI.trimFileExtension().appendFileExtension("genmodel"); - - Resource ecoreResource = resourceSet.createResource(ecoreURI); - ecoreResource.getContents().add(ePackage); - - Resource genModelResource = resourceSet.createResource(genModelURI); - genModelResource.getContents().add(genModel); - - return (GenPackage)genModel.getGenPackages().get(0); - } - - public static GenModel ecore2GenModel(EPackage ePackage, String basePackage, - String prefix, int genOptions) { - GenModel genModel = GenModelFactory.eINSTANCE.createGenModel(); - genModel.initialize(Collections.singleton(ePackage)); - - genModel.setRootExtendsInterface(""); - genModel.setRootImplementsInterface("commonj.sdo.DataObject"); - genModel.setRootExtendsClass("org.apache.tuscany.sdo.impl.DataObjectImpl"); - genModel.setFeatureMapWrapperInterface("commonj.sdo.Sequence"); - genModel.setFeatureMapWrapperInternalInterface("org.apache.tuscany.sdo.util.BasicSequence"); - genModel.setFeatureMapWrapperClass("org.apache.tuscany.sdo.util.BasicSequence"); - genModel.setSuppressEMFTypes(true); - genModel.setSuppressEMFMetaData(true); - genModel.setSuppressEMFModelTags(true); - genModel.setCanGenerate(true); - // FIXME workaround java.lang.NoClassDefFoundError: - // org/eclipse/jdt/core/jdom/IDOMNode with 02162006 build - genModel.setFacadeHelperClass("Hack"); - genModel.setForceOverwrite(true); - - GenPackage genPackage = (GenPackage)genModel.getGenPackages().get(0); - - if (basePackage != null) { - genPackage.setBasePackage(basePackage); - } - if (prefix != null) { - genPackage.setPrefix(prefix); - } - - return genModel; - } - - public static String extractBasePackageName(EPackage ePackage, String javaPackage) { - String qualifiedName = javaPackage != null ? javaPackage : ePackage.getName(); - String name = /* CodeGenUtil. */shortName(qualifiedName); - String baseName = qualifiedName.substring(0, qualifiedName.length() - name.length()); - if (javaPackage != null || !name.equals(qualifiedName)) { - ePackage.setName(name); - } - return baseName != null ? /* CodeGenUtil. */safeQualifiedName(baseName) : null; - } - - public static String shortName(String qualifiedName) { - int index = qualifiedName.lastIndexOf("."); - return index != -1 ? qualifiedName.substring(index + 1) : qualifiedName; - } - - public static String safeQualifiedName(String qualifiedName) { - StringBuffer safeQualifiedName = new StringBuffer(); - for (StringTokenizer stringTokenizer = new StringTokenizer(qualifiedName, "."); - stringTokenizer.hasMoreTokens();) { - String name = stringTokenizer.nextToken(); - safeQualifiedName.append(CodeGenUtil.safeName(name)); - if (stringTokenizer.hasMoreTokens()) { - safeQualifiedName.append('.'); - } - } - return safeQualifiedName.toString(); - } - /* - * Converts myClassName to MyClassName - */ - public static String normalizeClassName(String className) { - - StringBuffer normalizedClassName = new StringBuffer(); - - String beginPart = className.substring(0,1); - String endPart = className.substring(1); - - normalizedClassName.append(beginPart.toUpperCase()); - normalizedClassName.append(endPart); - - return normalizedClassName.toString(); - } - - protected static void printDiagnostic(Diagnostic diagnostic, String indent) { - System.out.print(indent); - System.out.println(diagnostic.getMessage()); - for (Iterator i = diagnostic.getChildren().iterator(); i.hasNext();) { - printDiagnostic((Diagnostic)i.next(), indent + " "); - } - } - - protected static void printUsage() { - System.out.println("Usage arguments:"); - System.out.println(" [ -targetDirectory ]"); - System.out.println(" [ -javaPackage ]"); - System.out.println(" [ -dynamicSDO | -generateSDO [ -sdoGenArgs ]]"); - System.out.println(" [ -verbose ]"); - System.out.println(" "); - System.out.println(""); - System.out.println("Where is a text file containing valid XSD2Java command\narguments (w/o the wsdl/xsd file name)"); - System.out.println("For example:"); - System.out.println(""); - System.out.println(" WSDL2JavaGenerator -targetDirectory myDir somedir/somefile.wsdl"); - } - - -} diff --git a/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/util/XMLNameUtil.java b/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/util/XMLNameUtil.java deleted file mode 100644 index d0b325982c..0000000000 --- a/branches/sca-android/tools/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/util/XMLNameUtil.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.wsdl2java.util; - -import java.util.ArrayList; -import java.util.List; - -public class XMLNameUtil { - - /** - * Returns a valid Java name from an XML Name. - * - * @param name - * @param isUpperCase - * @return a valid Java name from an XML Name - */ - public static String getJavaNameFromXMLName(String name, boolean isUpperCase) { - List parsedName = parseName(name, '_'); - StringBuilder result = new StringBuilder(64 * parsedName.size()); - for (String nameComponent: parsedName) { - if (nameComponent.length() > 0) { - if (result.length() > 0 || isUpperCase) { - result.append(Character.toUpperCase(nameComponent.charAt(0))); - result.append(nameComponent.substring(1)); - } else { - result.append(nameComponent); - } - } - } - - if (result.length() == 0) { - return "_"; - } - if (Character.isJavaIdentifierStart(result.charAt(0))) { - return isUpperCase ? result.toString() : decapitalizeName(result.toString()); - } - return "_" + result; - } - - /** - * Decapitalize a name. - * @param name - * @return a decapitalized name - */ - public static String decapitalizeName(String name) { - if (name.length() == 0) { - return name; - } else { - String lowerName = name.toLowerCase(); - int i; - for (i = 0; i < name.length(); i++) { - if (name.charAt(i) == lowerName.charAt(i)) { - break; - } - } - if (i > 1 && i < name.length()) { - --i; - } - return name.substring(0, i).toLowerCase() + name.substring(i); - } - } - - /** - * Parse the given name. - * - * @param sourceName - * @param separator - * @return some stuff parsed from the name - */ - private static List parseName(String sourceName, char separator) { - List result = new ArrayList(); - if (sourceName != null) { - StringBuilder currentWord = new StringBuilder(64); - boolean lastIsLower = false; - int index; - int length; - for (index = 0, length = sourceName.length(); index < length; ++index) { - char curChar = sourceName.charAt(index); - if (!Character.isJavaIdentifierPart(curChar)) { - curChar = separator; - } - if (Character.isUpperCase(curChar) - || (!lastIsLower && Character.isDigit(curChar)) - || curChar == separator) { - - if (lastIsLower && currentWord.length() > 1 - || curChar == separator && currentWord.length() > 0) { - result.add(currentWord.toString()); - currentWord = new StringBuilder(64); - } - lastIsLower = false; - } else { - if (!lastIsLower) { - int currentWordLength = currentWord.length(); - if (currentWordLength > 1) { - char lastChar = currentWord.charAt(--currentWordLength); - currentWord.setLength(currentWordLength); - result.add(currentWord.toString()); - currentWord = new StringBuilder(64); - currentWord.append(lastChar); - } - } - lastIsLower = true; - } - - if (curChar != separator) { - currentWord.append(curChar); - } - } - - result.add(currentWord.toString()); - } - return result; - } - - /** - * Return an EPackage name for the given namespace. - * - * @param namespace - * @return an EPackage name for the given namespace - */ - public static String getPackageNameFromNamespace(String namespace) { - return org.apache.tuscany.sdo.helper.SDOXSDEcoreBuilder.getDefaultPackageName(namespace); - } - - -} diff --git a/branches/sca-android/tools/wsdl2java/src/main/resources/META-INF/LICENSE.txt b/branches/sca-android/tools/wsdl2java/src/main/resources/META-INF/LICENSE.txt deleted file mode 100644 index 0084319535..0000000000 --- a/branches/sca-android/tools/wsdl2java/src/main/resources/META-INF/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - 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, serviceDefinition 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/sca-android/tools/wsdl2java/src/main/resources/RemotableInterfaceTemplate.xsl b/branches/sca-android/tools/wsdl2java/src/main/resources/RemotableInterfaceTemplate.xsl deleted file mode 100644 index 43005bcdbc..0000000000 --- a/branches/sca-android/tools/wsdl2java/src/main/resources/RemotableInterfaceTemplate.xsl +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - - - - - - - - - /** - * .java - * - * This file was auto-generated from WSDL - * by the Apache Axis2 version: #axisVersion# #today# - */ - package ; - - import org.osoa.sca.annotations.Remotable; - import org.osoa.sca.annotations.Service; - - /* - * java interface - */ - - @Remotable - @Service - public interface { - - - - - - - - - /** - * Auto generated method signatures - * @param - * @throws * - - */ - public void - ( - - , - ) throws - , , - - java.rmi.RemoteException; - - - - - - /** - * Auto generated method signature - * @param - * @throws * - - */ - - public void start( - - - , - ,final . callback) throws - , , - java.rmi.RemoteException; - - - - - - - - - /** - * Auto generated method signature - * @param - * @throws * - */ - public void - ( - - - , - - ) throws - , , - java.rmi.RemoteException; - - - - - - - // - } - - - - \ No newline at end of file diff --git a/branches/sca-android/tools/wsdl2java/src/test/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGeneratorTestCase.java b/branches/sca-android/tools/wsdl2java/src/test/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGeneratorTestCase.java deleted file mode 100644 index 92581d6ac2..0000000000 --- a/branches/sca-android/tools/wsdl2java/src/test/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGeneratorTestCase.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.tools.wsdl2java.generate; - -import junit.framework.TestCase; - -/** - * Test case for WSDL2Java - */ -public class WSDL2JavaGeneratorTestCase extends TestCase { - - - public void testAccountService() { - - String basedir = System.getProperty("basedir"); - if (basedir == null) - basedir = "."; - - String[] args = - new String[] {"-targetDirectory", basedir + "/target/wsdl2java-source", - "-javaPackage", "org.apache.tuscany.tools.wsdl2java.generate.account", - basedir + "/src/test/resources/AccountService.wsdl"}; - - WSDL2JavaGenerator.main(args); - - } - - /** - * Test WSDL with faults - * Sample WSDL originated from BigBank and Tuscany 978 - */ - public void testAccountServiceWithFaults() { - - String basedir = System.getProperty("basedir"); - if (basedir == null) - basedir = "."; - - String[] args = - new String[] {"-targetDirectory", basedir + "/target/wsdl2java-source", - "-javaPackage", "org.apache.tuscany.tools.wsdl2java.generate.account", - basedir + "/src/test/resources/AccountServiceWithFault.wsdl"}; - - WSDL2JavaGenerator.main(args); - - } - - /** - * Test Interopdoc WSDL - */ - public void testInteropdocWsdl() { - - String basedir = System.getProperty("basedir"); - if (basedir == null) - basedir = "."; - - String[] args = - new String[] {"-targetDirectory", basedir + "/target/wsdl2java-source", - "-javaPackage", "org.apache.tuscany.tools.wsdl2java.generate.account", - basedir + "/src/test/resources/interopdoc.wsdl"}; - - WSDL2JavaGenerator.main(args); - - } -} diff --git a/branches/sca-android/tools/wsdl2java/src/test/java/org/soapinterop/CreditScoreDocLit.java b/branches/sca-android/tools/wsdl2java/src/test/java/org/soapinterop/CreditScoreDocLit.java deleted file mode 100644 index e9e8aa882a..0000000000 --- a/branches/sca-android/tools/wsdl2java/src/test/java/org/soapinterop/CreditScoreDocLit.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.soapinterop; - -public interface CreditScoreDocLit { - public org.example.creditscore.doclit.CreditReport getCreditScore( - org.example.creditscore.doclit.Customer param0) throws java.rmi.RemoteException; - } - diff --git a/branches/sca-android/tools/wsdl2java/src/test/resources/AccountService.wsdl b/branches/sca-android/tools/wsdl2java/src/test/resources/AccountService.wsdl deleted file mode 100644 index 6f2fed1e2a..0000000000 --- a/branches/sca-android/tools/wsdl2java/src/test/resources/AccountService.wsdl +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tools/wsdl2java/src/test/resources/AccountServiceWithFault.wsdl b/branches/sca-android/tools/wsdl2java/src/test/resources/AccountServiceWithFault.wsdl deleted file mode 100644 index dda5a36085..0000000000 --- a/branches/sca-android/tools/wsdl2java/src/test/resources/AccountServiceWithFault.wsdl +++ /dev/null @@ -1,475 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tools/wsdl2java/src/test/resources/CreditScoreDocLit.wsdl b/branches/sca-android/tools/wsdl2java/src/test/resources/CreditScoreDocLit.wsdl deleted file mode 100644 index 09d1a58589..0000000000 --- a/branches/sca-android/tools/wsdl2java/src/test/resources/CreditScoreDocLit.wsdl +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tools/wsdl2java/src/test/resources/helloworld.wsdl b/branches/sca-android/tools/wsdl2java/src/test/resources/helloworld.wsdl deleted file mode 100644 index 051f604bb2..0000000000 --- a/branches/sca-android/tools/wsdl2java/src/test/resources/helloworld.wsdl +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tools/wsdl2java/src/test/resources/interopdoc.wsdl b/branches/sca-android/tools/wsdl2java/src/test/resources/interopdoc.wsdl deleted file mode 100644 index 820c26ca34..0000000000 --- a/branches/sca-android/tools/wsdl2java/src/test/resources/interopdoc.wsdl +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tools/wsdl2java/src/test/resources/sequences.xsd b/branches/sca-android/tools/wsdl2java/src/test/resources/sequences.xsd deleted file mode 100644 index a565f3fa65..0000000000 --- a/branches/sca-android/tools/wsdl2java/src/test/resources/sequences.xsd +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/pom.xml b/branches/sca-android/tutorials/pom.xml index 7491bc88cf..3f2d6359a8 100644 --- a/branches/sca-android/tutorials/pom.xml +++ b/branches/sca-android/tutorials/pom.xml @@ -36,8 +36,6 @@ true - store - diff --git a/branches/sca-android/tutorials/store/README b/branches/sca-android/tutorials/store/README deleted file mode 100644 index 6169a05292..0000000000 --- a/branches/sca-android/tutorials/store/README +++ /dev/null @@ -1,29 +0,0 @@ -Store Tutorial -====================================== - -This is a tutorial that shows how to use SCA and Tuscany to build multiple -variations of an online Store application. - -For an overview of the scenarios covered here, please refer to Tutorial.pdf. - -For more detailed information, please see: - -http://incubator.apache.org/tuscany/sca-java-tutorial.html - - -Running The Tutorial Application --------------------------------- - -Start the SCA Domain Manager: - cd domain - java -jar ../../modules/tuscany-node2-launcher-1.2-incubating.jar domain - -To access the SCA Manager application, point your Web browser to: - http://localhost:9990/ui/cloud/ - -Select the node you want to start (e.g StoreNode), then click the Start button. - -You should now be able to access the online Store application. Point your Web -browser to: - http://localhost:8100/ui/ - diff --git a/branches/sca-android/tutorials/store/Tutorial.pdf b/branches/sca-android/tutorials/store/Tutorial.pdf deleted file mode 100644 index e22f1b4c9d..0000000000 Binary files a/branches/sca-android/tutorials/store/Tutorial.pdf and /dev/null differ diff --git a/branches/sca-android/tutorials/store/assets/META-INF/sca-contribution.xml b/branches/sca-android/tutorials/store/assets/META-INF/sca-contribution.xml deleted file mode 100644 index cba1564cb4..0000000000 --- a/branches/sca-android/tutorials/store/assets/META-INF/sca-contribution.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/assets/pom.xml b/branches/sca-android/tutorials/store/assets/pom.xml deleted file mode 100644 index 4902105703..0000000000 --- a/branches/sca-android/tutorials/store/assets/pom.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-assets - Apache Tuscany SCA Store Tutorial Reusable Assets - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-data-api - 1.4-SNAPSHOT - - - - org.apache.derby - derby - 10.3.1.4 - - - - - ${artifactId} - ${basedir} - - - ${basedir} - - **/*.java - **/.*/** - pom.xml - build.xml - target/** - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - - diff --git a/branches/sca-android/tutorials/store/assets/services/Cart.java b/branches/sca-android/tutorials/store/assets/services/Cart.java deleted file mode 100644 index 9e6226d963..0000000000 --- a/branches/sca-android/tutorials/store/assets/services/Cart.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.apache.tuscany.sca.data.collection.Collection; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Cart extends Collection { - -} diff --git a/branches/sca-android/tutorials/store/assets/services/Catalog.java b/branches/sca-android/tutorials/store/assets/services/Catalog.java deleted file mode 100644 index 2c3b19f579..0000000000 --- a/branches/sca-android/tutorials/store/assets/services/Catalog.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Catalog { - Item[] get(); -} diff --git a/branches/sca-android/tutorials/store/assets/services/CurrencyConverter.java b/branches/sca-android/tutorials/store/assets/services/CurrencyConverter.java deleted file mode 100644 index e104a0423a..0000000000 --- a/branches/sca-android/tutorials/store/assets/services/CurrencyConverter.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface CurrencyConverter { - public double getConversion(String fromCurrenycCode, String toCurrencyCode, double amount); - - public String getCurrencySymbol(String currencyCode); -} diff --git a/branches/sca-android/tutorials/store/assets/services/CurrencyConverterImpl.java b/branches/sca-android/tutorials/store/assets/services/CurrencyConverterImpl.java deleted file mode 100644 index c354aed447..0000000000 --- a/branches/sca-android/tutorials/store/assets/services/CurrencyConverterImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -public class CurrencyConverterImpl implements CurrencyConverter { - public double getConversion(String fromCurrencyCode, String toCurrencyCode, double amount) { - if (toCurrencyCode.equals("USD")) - return amount; - else if (toCurrencyCode.equals("EUR")) - return ((double)Math.round(amount * 0.7256 * 100)) /100; - return 0; - } - - public String getCurrencySymbol(String currencyCode) { - if (currencyCode.equals("USD")) - return "$"; - else if (currencyCode.equals("EUR")) - return "E"; //"€"; - return "?"; - } -} diff --git a/branches/sca-android/tutorials/store/assets/services/FruitsCatalogImpl.java b/branches/sca-android/tutorials/store/assets/services/FruitsCatalogImpl.java deleted file mode 100644 index 377b3d7e59..0000000000 --- a/branches/sca-android/tutorials/store/assets/services/FruitsCatalogImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import java.util.ArrayList; -import java.util.List; - -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; - -public class FruitsCatalogImpl implements Catalog { - - @Property - public String currencyCode = "USD"; - - @Reference - public CurrencyConverter currencyConverter; - - private List catalog = new ArrayList(); - - @Init - public void init() { - String currencySymbol = currencyConverter.getCurrencySymbol(currencyCode); - catalog.add(new Item("Apple", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 2.99))); - catalog.add(new Item("Orange", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 3.55))); - catalog.add(new Item("Pear", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 1.55))); - } - - public Item[] get() { - Item[] catalogArray = new Item[catalog.size()]; - catalog.toArray(catalogArray); - return catalogArray; - } -} diff --git a/branches/sca-android/tutorials/store/assets/services/Item.java b/branches/sca-android/tutorials/store/assets/services/Item.java deleted file mode 100644 index 81cefcdbef..0000000000 --- a/branches/sca-android/tutorials/store/assets/services/Item.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - - -public class Item { - private String name; - private String price; - private String origin; - - public Item() { - } - - public Item(String name, String price, String origin) { - this.name = name; - this.price = price; - this.origin = origin; - } - - public Item(String name, String price) { - this.name = name; - this.price = price; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPrice() { - return price; - } - - public void setPrice(String price) { - this.price = price; - } - - public String getOrigin() { - return origin; - } - - public void setOrigin(String origin) { - this.origin = origin; - } - -} diff --git a/branches/sca-android/tutorials/store/assets/services/ShoppingCartImpl.java b/branches/sca-android/tutorials/store/assets/services/ShoppingCartImpl.java deleted file mode 100644 index 9889921a96..0000000000 --- a/branches/sca-android/tutorials/store/assets/services/ShoppingCartImpl.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import org.apache.tuscany.sca.data.collection.Entry; -import org.apache.tuscany.sca.data.collection.NotFoundException; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Scope; - -@Scope("COMPOSITE") -public class ShoppingCartImpl implements Cart, Total { - - private Map cart; - - @Init - public void init() { - cart = new HashMap(); - } - - public Entry[] getAll() { - Entry[] entries = new Entry[cart.size()]; - int i = 0; - for (Map.Entry e: cart.entrySet()) { - entries[i++] = new Entry(e.getKey(), e.getValue()); - } - return entries; - } - - public Item get(String key) throws NotFoundException { - Item item = cart.get(key); - if (item == null) { - throw new NotFoundException(key); - } else { - return item; - } - } - - public String post(String key, Item item) { - if (key == null) { - key ="cart-" + UUID.randomUUID().toString(); - } - cart.put(key, item); - return key; - } - - public void put(String key, Item item) throws NotFoundException { - if (!cart.containsKey(key)) { - throw new NotFoundException(key); - } - cart.put(key, item); - } - - public void delete(String key) throws NotFoundException { - if (key == null || key.equals("")) { - cart.clear(); - } else { - Item item = cart.remove(key); - if (item == null) - throw new NotFoundException(key); - } - } - - public Entry[] query(String queryString) { - List> entries = new ArrayList>(); - if (queryString.startsWith("name=")) { - String name = queryString.substring(5); - for (Map.Entry e: cart.entrySet()) { - Item item = e.getValue(); - if (item.getName().equals(name)) { - entries.add(new Entry(e.getKey(), e.getValue())); - } - } - } - return entries.toArray(new Entry[entries.size()]); - } - - public String getTotal() { - double total = 0; - String currencySymbol = ""; - if (!cart.isEmpty()) { - Item item = cart.values().iterator().next(); - currencySymbol = item.getPrice().substring(0, 1); - } - for (Item item : cart.values()) { - total += Double.valueOf(item.getPrice().substring(1)); - } - return currencySymbol + String.valueOf(total); - } -} diff --git a/branches/sca-android/tutorials/store/assets/services/Total.java b/branches/sca-android/tutorials/store/assets/services/Total.java deleted file mode 100644 index 8f464e526f..0000000000 --- a/branches/sca-android/tutorials/store/assets/services/Total.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Total { - - String getTotal(); - -} diff --git a/branches/sca-android/tutorials/store/assets/services/VegetablesCatalogImpl.java b/branches/sca-android/tutorials/store/assets/services/VegetablesCatalogImpl.java deleted file mode 100644 index 8bfbc757db..0000000000 --- a/branches/sca-android/tutorials/store/assets/services/VegetablesCatalogImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import java.util.ArrayList; -import java.util.List; - -import org.osoa.sca.annotations.Init; - -public class VegetablesCatalogImpl implements Catalog { - private List catalog = new ArrayList(); - - @Init - public void init() { - catalog.add(new Item("Broccoli", "$2.99")); - catalog.add(new Item("Asparagus", "$3.55")); - catalog.add(new Item("Cauliflower", "$1.55")); - } - - public Item[] get() { - Item[] catalogArray = new Item[catalog.size()]; - catalog.toArray(catalogArray); - return catalogArray; - } -} diff --git a/branches/sca-android/tutorials/store/assets/services/db/ShoppingCartTableImpl.java b/branches/sca-android/tutorials/store/assets/services/db/ShoppingCartTableImpl.java deleted file mode 100644 index cfc52c563c..0000000000 --- a/branches/sca-android/tutorials/store/assets/services/db/ShoppingCartTableImpl.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services.db; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -import org.apache.tuscany.sca.data.collection.Entry; -import org.apache.tuscany.sca.data.collection.NotFoundException; -import org.osoa.sca.ServiceRuntimeException; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; - -import services.Cart; -import services.Item; -import services.Total; - -public class ShoppingCartTableImpl implements Cart, Total { - - @Property - public String database; - - private Connection connection; - - @Init - public void init() throws Exception { - Class.forName("org.apache.derby.jdbc.EmbeddedDriver", true, Thread.currentThread().getContextClassLoader()); - String baseDir = System.getProperty("basedir"); - String url = "jdbc:derby:directory:" + (baseDir != null? baseDir + "/" + database : database); - System.out.println("Connecting to database: " + url); - connection = DriverManager.getConnection(url, "", ""); - } - - @Destroy - public void shutdown() throws Exception { - if(connection != null) { - connection.close(); - connection = null; - } - } - - public Entry[] getAll() { - try { - Statement statement = connection.createStatement(); - ResultSet results = statement.executeQuery("select * from Cart"); - List> entries = new ArrayList>(); - while (results.next()) { - Item item = new Item(results.getString("name"), results.getString("price")); - entries.add(new Entry(results.getString("id"), item)); - } - return entries.toArray(new Entry[entries.size()]); - } catch (SQLException e) { - throw new ServiceRuntimeException(e); - } - } - - public Item get(String key) throws NotFoundException { - try { - Statement statement = connection.createStatement(); - ResultSet results = statement.executeQuery("select * from Cart where id = '" + key + "'"); - if (results.next()) { - return new Item(results.getString("name"), results.getString("price")); - } else { - throw new NotFoundException(key); - } - } catch (SQLException e) { - throw new ServiceRuntimeException(e); - } - } - - public String post(String key, Item item) { - if (key == null) { - key = "cart-" + UUID.randomUUID().toString(); - } - try { - Statement statement = connection.createStatement(); - String query = "insert into Cart values ('" + key + "', '" + item.getName() + "', '" + item.getPrice() + "')"; - System.out.println(query); - statement.executeUpdate(query); - } catch (SQLException e) { - throw new ServiceRuntimeException(e); - } - return key; - } - - public void put(String key, Item item) throws NotFoundException { - try { - Statement statement = connection.createStatement(); - String query = "update into Cart set name = '" + item.getName() + "', price = '" + item.getPrice() + "' where id = '" + key + "'"; - System.out.println(query); - int count = statement.executeUpdate(query); - if (count == 0) - throw new NotFoundException(key); - } catch (SQLException e) { - throw new ServiceRuntimeException(e); - } - } - - public void delete(String key) throws NotFoundException { - try { - Statement statement = connection.createStatement(); - if (key == null || key.equals("")) { - String query = "delete from Cart"; - System.out.println(query); - statement.executeUpdate(query); - } else { - String query = "delete from Cart where id = '" + key + "'"; - System.out.println(query); - int count = statement.executeUpdate(query); - if (count == 0) - throw new NotFoundException(key); - } - } catch (SQLException e) { - throw new ServiceRuntimeException(e); - } - } - - public Entry[] query(String queryString) { - try { - Statement statement = connection.createStatement(); - ResultSet results = statement.executeQuery("select * from Cart where " + queryString); - List> entries = new ArrayList>(); - while (results.next()) { - Item item = new Item(results.getString("name"), results.getString("price")); - entries.add(new Entry(results.getString("id"), item)); - } - return entries.toArray(new Entry[entries.size()]); - } catch (SQLException e) { - throw new ServiceRuntimeException(e); - } - } - - public String getTotal() { - Entry[] entries = getAll(); - double total = 0; - String currencySymbol = ""; - if (entries.length > 0) { - Item item = entries[0].getData(); - currencySymbol = item.getPrice().substring(0, 1); - } - for (Entry entry : entries) { - Item item = entry.getData(); - total += Double.valueOf(item.getPrice().substring(1)); - } - return currencySymbol + total; - } -} diff --git a/branches/sca-android/tutorials/store/assets/services/db/cart.sql b/branches/sca-android/tutorials/store/assets/services/db/cart.sql deleted file mode 100644 index 25f16cb36b..0000000000 --- a/branches/sca-android/tutorials/store/assets/services/db/cart.sql +++ /dev/null @@ -1,27 +0,0 @@ --- --- Licensed to the Apache Software Foundation (ASF) under one --- or more contributor license agreements. See the NOTICE file --- distributed with this work for additional information --- regarding copyright ownership. The ASF licenses this file --- to you under the Apache License, Version 2.0 (the --- "License"); you may not use this file except in compliance --- with the License. You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, --- software distributed under the License is distributed on an --- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY --- KIND, either express or implied. See the License for the --- specific language governing permissions and limitations --- under the License. --- - -DROP TABLE CART; - -CREATE TABLE CART( - id VARCHAR(50) NOT NULL, - name VARCHAR(50), - price VARCHAR(10), - primary key (id) -); diff --git a/branches/sca-android/tutorials/store/assets/services/map/FruitsCatalogImpl.java b/branches/sca-android/tutorials/store/assets/services/map/FruitsCatalogImpl.java deleted file mode 100644 index b160ba7be0..0000000000 --- a/branches/sca-android/tutorials/store/assets/services/map/FruitsCatalogImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services.map; - -import java.util.ArrayList; -import java.util.List; - -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; - -import services.Catalog; -import services.CurrencyConverter; -import services.Item; - -public class FruitsCatalogImpl implements Catalog { - - @Property - public String currencyCode = "USD"; - - @Reference - public CurrencyConverter currencyConverter; - - private List catalog = new ArrayList(); - - @Init - public void init() { - String currencySymbol = currencyConverter.getCurrencySymbol(currencyCode); - catalog.add(new Item("Apple", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 2.99), "34.425744,-119.711151")); - catalog.add(new Item("Orange", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 3.55), "25.811018,-80.130844")); - catalog.add(new Item("Pear", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 1.55), "36.596649,-121.8964")); - } - - public Item[] get() { - Item[] catalogArray = new Item[catalog.size()]; - catalog.toArray(catalogArray); - return catalogArray; - } -} diff --git a/branches/sca-android/tutorials/store/assets/services/market/MarketCatalogImpl.java b/branches/sca-android/tutorials/store/assets/services/market/MarketCatalogImpl.java deleted file mode 100644 index bd2c7d76a2..0000000000 --- a/branches/sca-android/tutorials/store/assets/services/market/MarketCatalogImpl.java +++ /dev/null @@ -1,66 +0,0 @@ - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services.market; - -import java.util.Vector; - -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; - -import services.Catalog; -import services.CurrencyConverter; -import services.Item; - - -public class MarketCatalogImpl implements Catalog { - - @Property - public String currencyCode = "USD"; - - @Reference - public CurrencyConverter currencyConverter; - - @Reference(required=false) - protected Catalog[] goodsCatalog; - - - public Item[] get() { - - String currencySymbol = currencyConverter.getCurrencySymbol(currencyCode); - Vector catalog = new Vector(); - - for (int i = 0; i < goodsCatalog.length; i++) { - Item[] items = goodsCatalog[i].get(); - - for (Item item : items) { - double price = Double.valueOf(item.getPrice().substring(1)); - price = currencyConverter.getConversion("USD", currencyCode, price); - catalog.addElement(new Item(item.getName(), currencySymbol + price)); - } - } - - Item[] catalogArray = new Item[catalog.size()]; - catalog.copyInto(catalogArray); - - return catalogArray; - } - -} \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/assets/services/merger/MergedCatalogImpl.java b/branches/sca-android/tutorials/store/assets/services/merger/MergedCatalogImpl.java deleted file mode 100644 index c02b4e821e..0000000000 --- a/branches/sca-android/tutorials/store/assets/services/merger/MergedCatalogImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services.merger; - -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; - -import services.Catalog; -import services.CurrencyConverter; -import services.Item; - -public class MergedCatalogImpl implements Catalog { - - @Property - public String currencyCode = "USD"; - - @Reference - public CurrencyConverter currencyConverter; - - @Reference - public Catalog fruitsCatalog; - - @Reference - public Catalog vegetablesCatalog; - - public Item[] get() { - String currencySymbol = currencyConverter.getCurrencySymbol(currencyCode); - - Item[] fruits = fruitsCatalog.get(); - Item[] vegetables = vegetablesCatalog.get(); - - Item[] catalog = new Item[fruits.length + vegetables.length]; - int i =0; - for (Item item: fruits) { - double price = Double.valueOf(item.getPrice().substring(1)); - price = currencyConverter.getConversion("USD", currencyCode, price); - catalog[i++] = new Item(item.getName(), currencySymbol + price); - } - - for (Item item: vegetables) { - double price = Double.valueOf(item.getPrice().substring(1)); - price = currencyConverter.getConversion("USD", currencyCode, price); - catalog[i++] = new Item(item.getName(), currencySymbol + price); - } - - return catalog; - } - -} diff --git a/branches/sca-android/tutorials/store/assets/tutorial.html b/branches/sca-android/tutorials/store/assets/tutorial.html deleted file mode 100644 index 14f81e0c22..0000000000 --- a/branches/sca-android/tutorials/store/assets/tutorial.html +++ /dev/null @@ -1,37 +0,0 @@ - - - -Apache Tuscany - Online Store Tutorial - - - -

Apache Tuscany - Online Store Tutorial -

Online Store - SCA Domain -

Online Store - Fruits -

Vegetables Catalog Web Service -

Merger - Fruits and Vegetables -

Online Store - Cart Database -

Online Store - Supplier -

Online Store - Marketplace -

Merged Catalog Web Service -

EU Online Store -

Online Store Mashup - - \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/assets/uiservices/store.html b/branches/sca-android/tutorials/store/assets/uiservices/store.html deleted file mode 100644 index f2425b4885..0000000000 --- a/branches/sca-android/tutorials/store/assets/uiservices/store.html +++ /dev/null @@ -1,159 +0,0 @@ - - - -Store - - - - - - - - -

Store

-
-

Catalog

-
-
-
- -
- -
- -

Your Shopping Cart

-
-
-
-
-
- - - (feed) -
-
- - diff --git a/branches/sca-android/tutorials/store/catalog-ejb/pom.xml b/branches/sca-android/tutorials/store/catalog-ejb/pom.xml deleted file mode 100644 index 3636220631..0000000000 --- a/branches/sca-android/tutorials/store/catalog-ejb/pom.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - - tutorial-catalog-ejb - Apache Tuscany SCA Store Tutorial Catalog EJB - jar - - - - org.apache.geronimo.specs - geronimo-ejb_3.0_spec - 1.0 - provided - - - - junit - junit - 4.2 - test - - - - org.apache.geronimo.modules - geronimo-openejb - 2.1.1 - test - - - org.apache.geronimo.modules - geronimo-connector - - - org.apache.geronimo.modules - geronimo-persistence-jpa10 - - - org.apache.openejb - openejb-ejbd - - - org.apache.openejb - openejb-server - - - org.apache.openejb - openejb-loader - - - org.apache.openejb - openejb-jee - - - org.apache.openejb - openejb-ejbd - - - org.apache.openejb - openejb-javaagent - - - com.sun.xml.bind - jaxb-impl - - - - - - - - ${artifactId} - - - ${pom.basedir}/src/main/resources - true - - - - - - diff --git a/branches/sca-android/tutorials/store/catalog-ejb/src/main/java/services/ejb/CatalogEJBHome.java b/branches/sca-android/tutorials/store/catalog-ejb/src/main/java/services/ejb/CatalogEJBHome.java deleted file mode 100644 index c7ad31b682..0000000000 --- a/branches/sca-android/tutorials/store/catalog-ejb/src/main/java/services/ejb/CatalogEJBHome.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services.ejb; - -import javax.ejb.EJBHome; - -public interface CatalogEJBHome extends EJBHome { - - CatalogEJBRemote create() throws javax.ejb.CreateException, java.rmi.RemoteException; - -} diff --git a/branches/sca-android/tutorials/store/catalog-ejb/src/main/java/services/ejb/CatalogEJBRemote.java b/branches/sca-android/tutorials/store/catalog-ejb/src/main/java/services/ejb/CatalogEJBRemote.java deleted file mode 100644 index 7e79fc8b9d..0000000000 --- a/branches/sca-android/tutorials/store/catalog-ejb/src/main/java/services/ejb/CatalogEJBRemote.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services.ejb; - -import java.rmi.RemoteException; - -import javax.ejb.EJBObject; - -public interface CatalogEJBRemote extends EJBObject { - Vegetable[] get() throws RemoteException; -} diff --git a/branches/sca-android/tutorials/store/catalog-ejb/src/main/java/services/ejb/Vegetable.java b/branches/sca-android/tutorials/store/catalog-ejb/src/main/java/services/ejb/Vegetable.java deleted file mode 100644 index cf81539ba5..0000000000 --- a/branches/sca-android/tutorials/store/catalog-ejb/src/main/java/services/ejb/Vegetable.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services.ejb; - -import java.io.Serializable; - -public class Vegetable implements Serializable { - private static final long serialVersionUID = -5847326138627338217L; - - private String name; - private String price; - - public Vegetable() { - } - - public Vegetable(String name, String price) { - this.name = name; - this.price = price; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPrice() { - return price; - } - - public void setPrice(String price) { - this.price = price; - } - -} diff --git a/branches/sca-android/tutorials/store/catalog-ejb/src/main/java/services/ejb/VegetablesCatalogEJBSessionBean.java b/branches/sca-android/tutorials/store/catalog-ejb/src/main/java/services/ejb/VegetablesCatalogEJBSessionBean.java deleted file mode 100644 index ff2004fe1b..0000000000 --- a/branches/sca-android/tutorials/store/catalog-ejb/src/main/java/services/ejb/VegetablesCatalogEJBSessionBean.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services.ejb; - -import java.rmi.RemoteException; -import java.util.ArrayList; -import java.util.List; - -import javax.ejb.CreateException; -import javax.ejb.EJBException; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; - -public class VegetablesCatalogEJBSessionBean implements SessionBean { - private static final long serialVersionUID = -7421020241291271838L; - - private List catalog = new ArrayList(); - - public VegetablesCatalogEJBSessionBean() { - catalog.add(new Vegetable("Broccoli", "$2.99")); - catalog.add(new Vegetable("Asparagus", "$3.55")); - catalog.add(new Vegetable("Cauliflower", "$1.55")); - } - - public Vegetable[] get() { - Vegetable[] catalogArray = new Vegetable[catalog.size()]; - catalog.toArray(catalogArray); - return catalogArray; - } - - public void ejbCreate() throws CreateException { - } - - public void ejbActivate() throws EJBException, RemoteException { - } - - public void ejbPassivate() throws EJBException, RemoteException { - } - - public void ejbRemove() throws EJBException, RemoteException { - } - - public void setSessionContext(SessionContext arg0) throws EJBException, RemoteException { - } -} diff --git a/branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/META-INF/ejb-jar.xml b/branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/META-INF/ejb-jar.xml deleted file mode 100644 index a0a7adf6fa..0000000000 --- a/branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/META-INF/ejb-jar.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - Apache Tuscany SCA Tutorial Catalog EJB - - - VegetablesCatalogEJB - services.ejb.CatalogEJBHome - services.ejb.CatalogEJBRemote - services.ejb.VegetablesCatalogEJBSessionBean - Stateless - Container - - - diff --git a/branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/META-INF/openejb-jar.xml b/branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/META-INF/openejb-jar.xml deleted file mode 100644 index 04d77ee39e..0000000000 --- a/branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/META-INF/openejb-jar.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - ${pom.groupId} - ${pom.artifactId} - ${version} - jar - - - - org.apache.geronimo.configs - j2ee-corba-yoko - - car - - - - - - - - - VegetablesCatalogEJB - VegetablesCatalogEJB - IdentityTokenNoSecurity - - - - - - IdentityTokenNoSecurity - - UnprotectedServer - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 2e46b31047..0000000000 --- a/branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/VegetablesCatalogEJB.componentType b/branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/VegetablesCatalogEJB.componentType deleted file mode 100644 index bc57b35e79..0000000000 --- a/branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/VegetablesCatalogEJB.componentType +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/catalog-ejb.composite b/branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/catalog-ejb.composite deleted file mode 100644 index f733524809..0000000000 --- a/branches/sca-android/tutorials/store/catalog-ejb/src/main/resources/catalog-ejb.composite +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/client/CatalogEJBClientTestCase.java b/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/client/CatalogEJBClientTestCase.java deleted file mode 100644 index f9bd16f050..0000000000 --- a/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/client/CatalogEJBClientTestCase.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package client; - -import javax.naming.InitialContext; -import javax.rmi.PortableRemoteObject; - -import org.junit.Ignore; -import org.junit.Test; - -import services.ejb.CatalogEJBHome; -import services.ejb.CatalogEJBRemote; -import services.ejb.Vegetable; - -/** - * A test client for the catalog EJB. - * - * @version $Rev$ $Date$ - */ -public class CatalogEJBClientTestCase { - - @Test - @Ignore // Ignore the test case for maven build, remove it if you want to run - public void testCatalogEJB() throws Exception { - InitialContext context = new InitialContext(); - - Object o = context.lookup("corbaname:iiop:1.2@localhost:1050#VegetablesCatalogEJB"); - - // The narrow(...) call requires generated EJB stubs. Tuscany binding.ejb doesn't the stubs - CatalogEJBHome home = (CatalogEJBHome)PortableRemoteObject.narrow(o, CatalogEJBHome.class); - - // The following call will hang with SUN jdk1.6.0_05, please use SUN or IBM jdk 1.5.x instead - CatalogEJBRemote catalog = home.create(); - - Vegetable items[] = catalog.get(); - for (Vegetable item : items) { - System.out.println(item.getName() + " " + item.getPrice()); - } - } - - public static void main(String args[]) throws Exception { - String javaVersion = System.getProperty("java.version"); - String javaVendor = System.getProperty("java.vendor"); - - if (javaVendor.toUpperCase().contains("SUN") && javaVersion.startsWith("1.6.")) { - System.err.println("The EJB invocation may hang due to a bug in " + javaVendor + ":" + javaVersion); - } - new CatalogEJBClientTestCase().testCatalogEJB(); - } - -} diff --git a/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/org/omg/stub/javax/ejb/_EJBHome_Stub.java b/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/org/omg/stub/javax/ejb/_EJBHome_Stub.java deleted file mode 100644 index 6930093042..0000000000 --- a/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/org/omg/stub/javax/ejb/_EJBHome_Stub.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -// Stub class generated by rmic, do not edit. -// Contents subject to change without notice. - -package org.omg.stub.javax.ejb; - -import java.rmi.RemoteException; -import java.rmi.UnexpectedException; - -import javax.ejb.EJBHome; -import javax.ejb.EJBMetaData; -import javax.ejb.Handle; -import javax.ejb.HomeHandle; -import javax.ejb.RemoveException; -import javax.rmi.CORBA.Stub; -import javax.rmi.CORBA.Util; - -import org.omg.CORBA.SystemException; -import org.omg.CORBA.portable.ApplicationException; -import org.omg.CORBA.portable.OutputStream; -import org.omg.CORBA.portable.RemarshalException; -import org.omg.CORBA.portable.ServantObject; -import org.omg.CORBA_2_3.portable.InputStream; - -public class _EJBHome_Stub extends Stub implements EJBHome { - - private static final String[] _type_ids = { - "RMI:javax.ejb.EJBHome:0000000000000000" - }; - - public String[] _ids() { - return _type_ids; - } - - public EJBMetaData getEJBMetaData() throws RemoteException { - while(true) { - if (!Util.isLocal(this)) { - InputStream in = null; - try { - try { - OutputStream out = _request("_get_EJBMetaData", true); - in = (InputStream)_invoke(out); - return (EJBMetaData) in.read_value(EJBMetaData.class); - } catch (ApplicationException ex) { - in = (InputStream) ex.getInputStream(); - String id = in.read_string(); - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("_get_EJBMetaData",javax.ejb.EJBHome.class); - if (so == null) { - continue; - } - try { - EJBMetaData result = ((javax.ejb.EJBHome)so.servant).getEJBMetaData(); - return (EJBMetaData)Util.copyObject(result,_orb()); - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } - - public HomeHandle getHomeHandle() throws RemoteException { - while(true) { - if (!Util.isLocal(this)) { - InputStream in = null; - try { - try { - OutputStream out = _request("_get_homeHandle", true); - in = (InputStream)_invoke(out); - return (HomeHandle) in.read_abstract_interface(HomeHandle.class); - } catch (ApplicationException ex) { - in = (InputStream) ex.getInputStream(); - String id = in.read_string(); - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("_get_homeHandle",javax.ejb.EJBHome.class); - if (so == null) { - continue; - } - try { - HomeHandle result = ((javax.ejb.EJBHome)so.servant).getHomeHandle(); - return (HomeHandle)Util.copyObject(result,_orb()); - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } - - public void remove(Handle arg0) throws RemoteException, RemoveException { - while(true) { - if (!Util.isLocal(this)) { - InputStream in = null; - try { - try { - OutputStream out = _request("remove__javax_ejb_Handle", true); - Util.writeAbstractObject(out,arg0); - _invoke(out); - return; - } catch (ApplicationException ex) { - in = (InputStream) ex.getInputStream(); - String id = in.read_string(); - if (id.equals("IDL:javax/ejb/RemoveEx:1.0")) { - throw (RemoveException) in.read_value(RemoveException.class); - } - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("remove__javax_ejb_Handle",javax.ejb.EJBHome.class); - if (so == null) { - continue; - } - try { - Handle arg0Copy = (Handle) Util.copyObject(arg0,_orb()); - ((javax.ejb.EJBHome)so.servant).remove(arg0Copy); - return; - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - if (exCopy instanceof RemoveException) { - throw (RemoveException)exCopy; - } - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } - - public void remove(Object arg0) throws RemoteException, RemoveException { - while(true) { - if (!Util.isLocal(this)) { - InputStream in = null; - try { - try { - OutputStream out = _request("remove__java_lang_Object", true); - Util.writeAny(out,arg0); - _invoke(out); - return; - } catch (ApplicationException ex) { - in = (InputStream) ex.getInputStream(); - String id = in.read_string(); - if (id.equals("IDL:javax/ejb/RemoveEx:1.0")) { - throw (RemoveException) in.read_value(RemoveException.class); - } - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("remove__java_lang_Object",javax.ejb.EJBHome.class); - if (so == null) { - continue; - } - try { - Object arg0Copy = (Object) Util.copyObject(arg0,_orb()); - ((javax.ejb.EJBHome)so.servant).remove(arg0Copy); - return; - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - if (exCopy instanceof RemoveException) { - throw (RemoveException)exCopy; - } - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } -} diff --git a/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/org/omg/stub/javax/ejb/_EJBObject_Stub.java b/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/org/omg/stub/javax/ejb/_EJBObject_Stub.java deleted file mode 100644 index 3482ebb9ec..0000000000 --- a/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/org/omg/stub/javax/ejb/_EJBObject_Stub.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -// Stub class generated by rmic, do not edit. -// Contents subject to change without notice. - -package org.omg.stub.javax.ejb; - -import java.rmi.RemoteException; -import java.rmi.UnexpectedException; - -import javax.ejb.EJBHome; -import javax.ejb.EJBObject; -import javax.ejb.Handle; -import javax.ejb.RemoveException; -import javax.rmi.CORBA.Stub; -import javax.rmi.CORBA.Util; - -import org.omg.CORBA.SystemException; -import org.omg.CORBA.portable.ApplicationException; -import org.omg.CORBA.portable.InputStream; -import org.omg.CORBA.portable.OutputStream; -import org.omg.CORBA.portable.RemarshalException; -import org.omg.CORBA.portable.ServantObject; - -public class _EJBObject_Stub extends Stub implements EJBObject { - - private static final String[] _type_ids = { - "RMI:javax.ejb.EJBObject:0000000000000000" - }; - - public String[] _ids() { - return _type_ids; - } - - public EJBHome getEJBHome() throws RemoteException { - while(true) { - if (!Util.isLocal(this)) { - InputStream in = null; - try { - try { - OutputStream out = _request("_get_EJBHome", true); - in = _invoke(out); - return (EJBHome) in.read_Object(EJBHome.class); - } catch (ApplicationException ex) { - in = ex.getInputStream(); - String id = in.read_string(); - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("_get_EJBHome",javax.ejb.EJBObject.class); - if (so == null) { - continue; - } - try { - EJBHome result = ((javax.ejb.EJBObject)so.servant).getEJBHome(); - return (EJBHome)Util.copyObject(result,_orb()); - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } - - public Handle getHandle() throws RemoteException { - while(true) { - if (!Util.isLocal(this)) { - org.omg.CORBA_2_3.portable.InputStream in = null; - try { - try { - OutputStream out = _request("_get_handle", true); - in = (org.omg.CORBA_2_3.portable.InputStream)_invoke(out); - return (Handle) in.read_abstract_interface(Handle.class); - } catch (ApplicationException ex) { - in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream(); - String id = in.read_string(); - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("_get_handle",javax.ejb.EJBObject.class); - if (so == null) { - continue; - } - try { - Handle result = ((javax.ejb.EJBObject)so.servant).getHandle(); - return (Handle)Util.copyObject(result,_orb()); - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } - - public Object getPrimaryKey() throws RemoteException { - while(true) { - if (!Util.isLocal(this)) { - InputStream in = null; - try { - try { - OutputStream out = _request("_get_primaryKey", true); - in = _invoke(out); - return Util.readAny(in); - } catch (ApplicationException ex) { - in = ex.getInputStream(); - String id = in.read_string(); - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("_get_primaryKey",javax.ejb.EJBObject.class); - if (so == null) { - continue; - } - try { - Object result = ((javax.ejb.EJBObject)so.servant).getPrimaryKey(); - return (Object)Util.copyObject(result,_orb()); - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } - - public boolean isIdentical(EJBObject arg0) throws RemoteException { - while(true) { - if (!Util.isLocal(this)) { - InputStream in = null; - try { - try { - OutputStream out = _request("isIdentical", true); - Util.writeRemoteObject(out,arg0); - in = _invoke(out); - return in.read_boolean(); - } catch (ApplicationException ex) { - in = ex.getInputStream(); - String id = in.read_string(); - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("isIdentical",javax.ejb.EJBObject.class); - if (so == null) { - continue; - } - try { - EJBObject arg0Copy = (EJBObject) Util.copyObject(arg0,_orb()); - return ((javax.ejb.EJBObject)so.servant).isIdentical(arg0Copy); - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } - - public void remove() throws RemoteException, RemoveException { - while(true) { - if (!Util.isLocal(this)) { - org.omg.CORBA_2_3.portable.InputStream in = null; - try { - try { - OutputStream out = _request("remove", true); - _invoke(out); - return; - } catch (ApplicationException ex) { - in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream(); - String id = in.read_string(); - if (id.equals("IDL:javax/ejb/RemoveEx:1.0")) { - throw (RemoveException) in.read_value(RemoveException.class); - } - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("remove",javax.ejb.EJBObject.class); - if (so == null) { - continue; - } - try { - ((javax.ejb.EJBObject)so.servant).remove(); - return; - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - if (exCopy instanceof RemoveException) { - throw (RemoveException)exCopy; - } - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } -} diff --git a/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/org/omg/stub/javax/ejb/_Handle_Stub.java b/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/org/omg/stub/javax/ejb/_Handle_Stub.java deleted file mode 100644 index d848fbb280..0000000000 --- a/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/org/omg/stub/javax/ejb/_Handle_Stub.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -// Stub class generated by rmic, do not edit. -// Contents subject to change without notice. - -package org.omg.stub.javax.ejb; - -import java.rmi.Remote; -import java.rmi.RemoteException; -import java.rmi.UnexpectedException; - -import javax.ejb.EJBObject; -import javax.ejb.Handle; -import javax.rmi.CORBA.Stub; -import javax.rmi.CORBA.Util; - -import org.omg.CORBA.SystemException; -import org.omg.CORBA.portable.ApplicationException; -import org.omg.CORBA.portable.InputStream; -import org.omg.CORBA.portable.OutputStream; -import org.omg.CORBA.portable.RemarshalException; -import org.omg.CORBA.portable.ServantObject; - -public class _Handle_Stub extends Stub implements Handle, -Remote { - - private static final String[] _type_ids = { - "RMI:javax.ejb.Handle:0000000000000000" - }; - - public String[] _ids() { - return _type_ids; - } - - public EJBObject getEJBObject() throws RemoteException { - while(true) { - if (!Util.isLocal(this)) { - InputStream in = null; - try { - try { - OutputStream out = _request("_get_EJBObject", true); - in = _invoke(out); - return (EJBObject) in.read_Object(EJBObject.class); - } catch (ApplicationException ex) { - in = ex.getInputStream(); - String id = in.read_string(); - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("_get_EJBObject",javax.ejb.Handle.class); - if (so == null) { - continue; - } - try { - EJBObject result = ((javax.ejb.Handle)so.servant).getEJBObject(); - return (EJBObject)Util.copyObject(result,_orb()); - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } -} diff --git a/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/org/omg/stub/javax/ejb/_HomeHandle_Stub.java b/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/org/omg/stub/javax/ejb/_HomeHandle_Stub.java deleted file mode 100644 index 6efc86b608..0000000000 --- a/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/org/omg/stub/javax/ejb/_HomeHandle_Stub.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -// Stub class generated by rmic, do not edit. -// Contents subject to change without notice. - -package org.omg.stub.javax.ejb; - -import java.rmi.Remote; -import java.rmi.RemoteException; -import java.rmi.UnexpectedException; - -import javax.ejb.EJBHome; -import javax.ejb.HomeHandle; -import javax.rmi.CORBA.Stub; -import javax.rmi.CORBA.Util; - -import org.omg.CORBA.SystemException; -import org.omg.CORBA.portable.ApplicationException; -import org.omg.CORBA.portable.InputStream; -import org.omg.CORBA.portable.OutputStream; -import org.omg.CORBA.portable.RemarshalException; -import org.omg.CORBA.portable.ServantObject; - -public class _HomeHandle_Stub extends Stub implements HomeHandle, -Remote { - - private static final String[] _type_ids = { - "RMI:javax.ejb.HomeHandle:0000000000000000" - }; - - public String[] _ids() { - return _type_ids; - } - - public EJBHome getEJBHome() throws RemoteException { - while(true) { - if (!Util.isLocal(this)) { - InputStream in = null; - try { - try { - OutputStream out = _request("_get_EJBHome", true); - in = _invoke(out); - return (EJBHome) in.read_Object(EJBHome.class); - } catch (ApplicationException ex) { - in = ex.getInputStream(); - String id = in.read_string(); - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("_get_EJBHome",javax.ejb.HomeHandle.class); - if (so == null) { - continue; - } - try { - EJBHome result = ((javax.ejb.HomeHandle)so.servant).getEJBHome(); - return (EJBHome)Util.copyObject(result,_orb()); - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } -} diff --git a/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/services/ejb/_CatalogEJBHome_Stub.java b/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/services/ejb/_CatalogEJBHome_Stub.java deleted file mode 100644 index bdc1a5cfd5..0000000000 --- a/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/services/ejb/_CatalogEJBHome_Stub.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -// Stub class generated by rmic, do not edit. -// Contents subject to change without notice. - -package services.ejb; - -import java.rmi.RemoteException; -import java.rmi.UnexpectedException; - -import javax.ejb.CreateException; -import javax.ejb.EJBMetaData; -import javax.ejb.Handle; -import javax.ejb.HomeHandle; -import javax.ejb.RemoveException; -import javax.rmi.CORBA.Stub; -import javax.rmi.CORBA.Util; - -import org.omg.CORBA.SystemException; -import org.omg.CORBA.portable.ApplicationException; -import org.omg.CORBA.portable.OutputStream; -import org.omg.CORBA.portable.RemarshalException; -import org.omg.CORBA.portable.ServantObject; -import org.omg.CORBA_2_3.portable.InputStream; - -public class _CatalogEJBHome_Stub extends Stub implements CatalogEJBHome { - - private static final String[] _type_ids = { - "RMI:services.ejb.CatalogEJBHome:0000000000000000", - "RMI:javax.ejb.EJBHome:0000000000000000" - }; - - public String[] _ids() { - return _type_ids; - } - - public EJBMetaData getEJBMetaData() throws RemoteException { - while(true) { - if (!Util.isLocal(this)) { - InputStream in = null; - try { - try { - OutputStream out = _request("_get_EJBMetaData", true); - in = (InputStream)_invoke(out); - return (EJBMetaData) in.read_value(EJBMetaData.class); - } catch (ApplicationException ex) { - in = (InputStream) ex.getInputStream(); - String id = in.read_string(); - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("_get_EJBMetaData",javax.ejb.EJBHome.class); - if (so == null) { - continue; - } - try { - EJBMetaData result = ((javax.ejb.EJBHome)so.servant).getEJBMetaData(); - return (EJBMetaData)Util.copyObject(result,_orb()); - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } - - public HomeHandle getHomeHandle() throws RemoteException { - while(true) { - if (!Util.isLocal(this)) { - InputStream in = null; - try { - try { - OutputStream out = _request("_get_homeHandle", true); - in = (InputStream)_invoke(out); - return (HomeHandle) in.read_abstract_interface(HomeHandle.class); - } catch (ApplicationException ex) { - in = (InputStream) ex.getInputStream(); - String id = in.read_string(); - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("_get_homeHandle",javax.ejb.EJBHome.class); - if (so == null) { - continue; - } - try { - HomeHandle result = ((javax.ejb.EJBHome)so.servant).getHomeHandle(); - return (HomeHandle)Util.copyObject(result,_orb()); - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } - - public void remove(Handle arg0) throws RemoteException, RemoveException { - while(true) { - if (!Util.isLocal(this)) { - InputStream in = null; - try { - try { - OutputStream out = _request("remove__javax_ejb_Handle", true); - Util.writeAbstractObject(out,arg0); - _invoke(out); - return; - } catch (ApplicationException ex) { - in = (InputStream) ex.getInputStream(); - String id = in.read_string(); - if (id.equals("IDL:javax/ejb/RemoveEx:1.0")) { - throw (RemoveException) in.read_value(RemoveException.class); - } - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("remove__javax_ejb_Handle",javax.ejb.EJBHome.class); - if (so == null) { - continue; - } - try { - Handle arg0Copy = (Handle) Util.copyObject(arg0,_orb()); - ((javax.ejb.EJBHome)so.servant).remove(arg0Copy); - return; - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - if (exCopy instanceof RemoveException) { - throw (RemoveException)exCopy; - } - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } - - public void remove(Object arg0) throws RemoteException, RemoveException { - while(true) { - if (!Util.isLocal(this)) { - InputStream in = null; - try { - try { - OutputStream out = _request("remove__java_lang_Object", true); - Util.writeAny(out,arg0); - _invoke(out); - return; - } catch (ApplicationException ex) { - in = (InputStream) ex.getInputStream(); - String id = in.read_string(); - if (id.equals("IDL:javax/ejb/RemoveEx:1.0")) { - throw (RemoveException) in.read_value(RemoveException.class); - } - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("remove__java_lang_Object",javax.ejb.EJBHome.class); - if (so == null) { - continue; - } - try { - Object arg0Copy = (Object) Util.copyObject(arg0,_orb()); - ((javax.ejb.EJBHome)so.servant).remove(arg0Copy); - return; - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - if (exCopy instanceof RemoveException) { - throw (RemoveException)exCopy; - } - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } - - public CatalogEJBRemote create() throws CreateException, RemoteException { - while(true) { - if (!Util.isLocal(this)) { - InputStream in = null; - try { - try { - OutputStream out = _request("create", true); - in = (InputStream)_invoke(out); - return (CatalogEJBRemote) in.read_Object(CatalogEJBRemote.class); - } catch (ApplicationException ex) { - in = (InputStream) ex.getInputStream(); - String id = in.read_string(); - if (id.equals("IDL:javax/ejb/CreateEx:1.0")) { - throw (CreateException) in.read_value(CreateException.class); - } - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("create",services.ejb.CatalogEJBHome.class); - if (so == null) { - continue; - } - try { - CatalogEJBRemote result = ((services.ejb.CatalogEJBHome)so.servant).create(); - return (CatalogEJBRemote)Util.copyObject(result,_orb()); - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - if (exCopy instanceof CreateException) { - throw (CreateException)exCopy; - } - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } -} diff --git a/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/services/ejb/_CatalogEJBRemote_Stub.java b/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/services/ejb/_CatalogEJBRemote_Stub.java deleted file mode 100644 index a24108714e..0000000000 --- a/branches/sca-android/tutorials/store/catalog-ejb/src/test/java/services/ejb/_CatalogEJBRemote_Stub.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -// Stub class generated by rmic, do not edit. -// Contents subject to change without notice. - -package services.ejb; - -import java.rmi.RemoteException; -import java.rmi.UnexpectedException; - -import javax.ejb.EJBHome; -import javax.ejb.EJBObject; -import javax.ejb.Handle; -import javax.ejb.RemoveException; -import javax.rmi.CORBA.Stub; -import javax.rmi.CORBA.Util; - -import org.omg.CORBA.SystemException; -import org.omg.CORBA.portable.ApplicationException; -import org.omg.CORBA.portable.InputStream; -import org.omg.CORBA.portable.OutputStream; -import org.omg.CORBA.portable.RemarshalException; -import org.omg.CORBA.portable.ServantObject; - -public class _CatalogEJBRemote_Stub extends Stub implements CatalogEJBRemote { - - private static final String[] _type_ids = { - "RMI:services.ejb.CatalogEJBRemote:0000000000000000", - "RMI:javax.ejb.EJBObject:0000000000000000" - }; - - public String[] _ids() { - return _type_ids; - } - - public EJBHome getEJBHome() throws RemoteException { - while(true) { - if (!Util.isLocal(this)) { - InputStream in = null; - try { - try { - OutputStream out = _request("_get_EJBHome", true); - in = _invoke(out); - return (EJBHome) in.read_Object(EJBHome.class); - } catch (ApplicationException ex) { - in = ex.getInputStream(); - String id = in.read_string(); - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("_get_EJBHome",javax.ejb.EJBObject.class); - if (so == null) { - continue; - } - try { - EJBHome result = ((javax.ejb.EJBObject)so.servant).getEJBHome(); - return (EJBHome)Util.copyObject(result,_orb()); - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } - - public Handle getHandle() throws RemoteException { - while(true) { - if (!Util.isLocal(this)) { - org.omg.CORBA_2_3.portable.InputStream in = null; - try { - try { - OutputStream out = _request("_get_handle", true); - in = (org.omg.CORBA_2_3.portable.InputStream)_invoke(out); - return (Handle) in.read_abstract_interface(Handle.class); - } catch (ApplicationException ex) { - in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream(); - String id = in.read_string(); - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("_get_handle",javax.ejb.EJBObject.class); - if (so == null) { - continue; - } - try { - Handle result = ((javax.ejb.EJBObject)so.servant).getHandle(); - return (Handle)Util.copyObject(result,_orb()); - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } - - public Object getPrimaryKey() throws RemoteException { - while(true) { - if (!Util.isLocal(this)) { - InputStream in = null; - try { - try { - OutputStream out = _request("_get_primaryKey", true); - in = _invoke(out); - return Util.readAny(in); - } catch (ApplicationException ex) { - in = ex.getInputStream(); - String id = in.read_string(); - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("_get_primaryKey",javax.ejb.EJBObject.class); - if (so == null) { - continue; - } - try { - Object result = ((javax.ejb.EJBObject)so.servant).getPrimaryKey(); - return (Object)Util.copyObject(result,_orb()); - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } - - public boolean isIdentical(EJBObject arg0) throws RemoteException { - while(true) { - if (!Util.isLocal(this)) { - InputStream in = null; - try { - try { - OutputStream out = _request("isIdentical", true); - Util.writeRemoteObject(out,arg0); - in = _invoke(out); - return in.read_boolean(); - } catch (ApplicationException ex) { - in = ex.getInputStream(); - String id = in.read_string(); - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("isIdentical",javax.ejb.EJBObject.class); - if (so == null) { - continue; - } - try { - EJBObject arg0Copy = (EJBObject) Util.copyObject(arg0,_orb()); - return ((javax.ejb.EJBObject)so.servant).isIdentical(arg0Copy); - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } - - public void remove() throws RemoteException, RemoveException { - while(true) { - if (!Util.isLocal(this)) { - org.omg.CORBA_2_3.portable.InputStream in = null; - try { - try { - OutputStream out = _request("remove", true); - _invoke(out); - return; - } catch (ApplicationException ex) { - in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream(); - String id = in.read_string(); - if (id.equals("IDL:javax/ejb/RemoveEx:1.0")) { - throw (RemoveException) in.read_value(RemoveException.class); - } - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("remove",javax.ejb.EJBObject.class); - if (so == null) { - continue; - } - try { - ((javax.ejb.EJBObject)so.servant).remove(); - return; - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - if (exCopy instanceof RemoveException) { - throw (RemoveException)exCopy; - } - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } - - public Vegetable[] get() throws RemoteException { - while(true) { - if (!Util.isLocal(this)) { - org.omg.CORBA_2_3.portable.InputStream in = null; - try { - try { - OutputStream out = _request("get", true); - in = (org.omg.CORBA_2_3.portable.InputStream)_invoke(out); - return (Vegetable[]) in.read_value(Vegetable[].class); - } catch (ApplicationException ex) { - in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream(); - String id = in.read_string(); - throw new UnexpectedException(id); - } catch (RemarshalException ex) { - continue; - } - } catch (SystemException ex) { - throw Util.mapSystemException(ex); - } finally { - _releaseReply(in); - } - } else { - ServantObject so = _servant_preinvoke("get",services.ejb.CatalogEJBRemote.class); - if (so == null) { - continue; - } - try { - Vegetable[] result = ((services.ejb.CatalogEJBRemote)so.servant).get(); - return (Vegetable[])Util.copyObject(result,_orb()); - } catch (Throwable ex) { - Throwable exCopy = (Throwable)Util.copyObject(ex,_orb()); - throw Util.wrapException(exCopy); - } finally { - _servant_postinvoke(so); - } - } - } - } -} diff --git a/branches/sca-android/tutorials/store/catalog-mediation/META-INF/sca-contribution.xml b/branches/sca-android/tutorials/store/catalog-mediation/META-INF/sca-contribution.xml deleted file mode 100644 index 88950bf740..0000000000 --- a/branches/sca-android/tutorials/store/catalog-mediation/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/catalog-mediation/catalog-mediation.composite b/branches/sca-android/tutorials/store/catalog-mediation/catalog-mediation.composite deleted file mode 100644 index d832e88acc..0000000000 --- a/branches/sca-android/tutorials/store/catalog-mediation/catalog-mediation.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/catalog-mediation/pom.xml b/branches/sca-android/tutorials/store/catalog-mediation/pom.xml deleted file mode 100644 index 504908a9ab..0000000000 --- a/branches/sca-android/tutorials/store/catalog-mediation/pom.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-catalog-mediation - Apache Tuscany SCA Store Tutorial Catalog Mediation - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tutorial-assets - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tutorial-catalog-ejb - 1.4-SNAPSHOT - - - - org.apache.geronimo.specs - geronimo-ejb_3.0_spec - 1.0 - provided - - - - - ${artifactId} - ${basedir} - - - ${basedir} - - **/*.java - **/.*/** - pom.xml - build.xml - target/** - - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - - diff --git a/branches/sca-android/tutorials/store/catalog-mediation/services/mediation/VegetablesCatalogMediationImpl.java b/branches/sca-android/tutorials/store/catalog-mediation/services/mediation/VegetablesCatalogMediationImpl.java deleted file mode 100644 index 6cfa54e9de..0000000000 --- a/branches/sca-android/tutorials/store/catalog-mediation/services/mediation/VegetablesCatalogMediationImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services.mediation; - -import java.rmi.RemoteException; - -import org.osoa.sca.ServiceRuntimeException; -import org.osoa.sca.annotations.Reference; - -import services.Catalog; -import services.Item; -import services.ejb.CatalogEJBRemote; -import services.ejb.Vegetable; - -public class VegetablesCatalogMediationImpl implements Catalog { - - @Reference - public CatalogEJBRemote catalog; - - public Item[] get() { - Vegetable[] vegetables; - try { - vegetables = catalog.get(); - } catch (RemoteException e) { - throw new ServiceRuntimeException(e); - } - Item[] items = new Item[vegetables.length]; - for (int i = 0; i < vegetables.length; i++) { - items[i] = new Item(vegetables[i].getName(), vegetables[i].getPrice()); - } - return items; - } - -} diff --git a/branches/sca-android/tutorials/store/catalog-webapp/catalog-web.composite b/branches/sca-android/tutorials/store/catalog-webapp/catalog-web.composite deleted file mode 100644 index 3ba76da078..0000000000 --- a/branches/sca-android/tutorials/store/catalog-webapp/catalog-web.composite +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - USD - - - - - - - - USD - - - - - - diff --git a/branches/sca-android/tutorials/store/catalog-webapp/pom.xml b/branches/sca-android/tutorials/store/catalog-webapp/pom.xml deleted file mode 100644 index 80a8861a99..0000000000 --- a/branches/sca-android/tutorials/store/catalog-webapp/pom.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-catalog-webapp - Apache Tuscany SCA Store Tutorial Catalog WAR Contribution - war - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-node-api - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tutorial-assets - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-launcher - 1.4-SNAPSHOT - runtime - - - - - - ${artifactId} - ${basedir} - - - ${basedir} - - **/*.java - **/.*/** - pom.xml - build.xml - target/** - webapp/** - target/** - - - - - - - org.apache.maven.plugins - maven-war-plugin - - webapp - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - - diff --git a/branches/sca-android/tutorials/store/catalog-webapp/webapp/META-INF/sca-contribution.xml b/branches/sca-android/tutorials/store/catalog-webapp/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index 7f06dc7ccb..0000000000 --- a/branches/sca-android/tutorials/store/catalog-webapp/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/catalog-webapp/webapp/WEB-INF/web.xml b/branches/sca-android/tutorials/store/catalog-webapp/webapp/WEB-INF/web.xml deleted file mode 100644 index e08d617dad..0000000000 --- a/branches/sca-android/tutorials/store/catalog-webapp/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - Fruit Catalog - - - tuscany - org.apache.tuscany.sca.node.launcher.NodeServletFilter - - - - tuscany - /* - - - - catalog.jsp - - - diff --git a/branches/sca-android/tutorials/store/catalog-webapp/webapp/catalog.jsp b/branches/sca-android/tutorials/store/catalog-webapp/webapp/catalog.jsp deleted file mode 100644 index dcee7c33f4..0000000000 --- a/branches/sca-android/tutorials/store/catalog-webapp/webapp/catalog.jsp +++ /dev/null @@ -1,52 +0,0 @@ -<%-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---%> - -<%@ page import="org.apache.tuscany.sca.node.SCAClient"%> -<%@ page import="services.Catalog" %> -<%@page import="services.Item"%> - -<%@ page contentType="text/html;charset=UTF-8" language="java" %> - -<% - - SCAClient client = (SCAClient) application.getAttribute("org.apache.tuscany.sca.node.SCAClient"); - - Catalog catalog = (Catalog)client.getService(Catalog.class, "LocalFruitsCatalog"); - Item[] items = catalog.get(); - -%> - - -Catalog - - -

Catalog

- - - -<% for (int i = 0, n = items.length; i < n; i++) { %> - - - -<% } %> - -
<%=items[i].getName() %><%=items[i].getPrice() %>
- - - diff --git a/branches/sca-android/tutorials/store/domain/cloud.composite b/branches/sca-android/tutorials/store/domain/cloud.composite deleted file mode 100644 index 8f879c5261..0000000000 --- a/branches/sca-android/tutorials/store/domain/cloud.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/domain/cloud/CatalogEJBNode.composite b/branches/sca-android/tutorials/store/domain/cloud/CatalogEJBNode.composite deleted file mode 100644 index 02e83d4c8d..0000000000 --- a/branches/sca-android/tutorials/store/domain/cloud/CatalogEJBNode.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/domain/cloud/CatalogMediationNode.composite b/branches/sca-android/tutorials/store/domain/cloud/CatalogMediationNode.composite deleted file mode 100644 index bac96d9781..0000000000 --- a/branches/sca-android/tutorials/store/domain/cloud/CatalogMediationNode.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/domain/cloud/CatalogWebAppNode.composite b/branches/sca-android/tutorials/store/domain/cloud/CatalogWebAppNode.composite deleted file mode 100644 index f3ed2dfdd5..0000000000 --- a/branches/sca-android/tutorials/store/domain/cloud/CatalogWebAppNode.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/domain/cloud/CatalogsNode.composite b/branches/sca-android/tutorials/store/domain/cloud/CatalogsNode.composite deleted file mode 100644 index 3a5ec770cb..0000000000 --- a/branches/sca-android/tutorials/store/domain/cloud/CatalogsNode.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/domain/cloud/CurrencyNode.composite b/branches/sca-android/tutorials/store/domain/cloud/CurrencyNode.composite deleted file mode 100644 index ed80268f22..0000000000 --- a/branches/sca-android/tutorials/store/domain/cloud/CurrencyNode.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/domain/cloud/StoreClientNode.composite b/branches/sca-android/tutorials/store/domain/cloud/StoreClientNode.composite deleted file mode 100644 index 91948b5476..0000000000 --- a/branches/sca-android/tutorials/store/domain/cloud/StoreClientNode.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/domain/cloud/StoreDBNode.composite b/branches/sca-android/tutorials/store/domain/cloud/StoreDBNode.composite deleted file mode 100644 index 9b09bd7344..0000000000 --- a/branches/sca-android/tutorials/store/domain/cloud/StoreDBNode.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/domain/cloud/StoreEUNode.composite b/branches/sca-android/tutorials/store/domain/cloud/StoreEUNode.composite deleted file mode 100644 index 6a50de56d5..0000000000 --- a/branches/sca-android/tutorials/store/domain/cloud/StoreEUNode.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/domain/cloud/StoreMarketNode.composite b/branches/sca-android/tutorials/store/domain/cloud/StoreMarketNode.composite deleted file mode 100644 index 1bdd994c2b..0000000000 --- a/branches/sca-android/tutorials/store/domain/cloud/StoreMarketNode.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/domain/cloud/StoreMashupNode.composite b/branches/sca-android/tutorials/store/domain/cloud/StoreMashupNode.composite deleted file mode 100644 index 0db43df8c3..0000000000 --- a/branches/sca-android/tutorials/store/domain/cloud/StoreMashupNode.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/domain/cloud/StoreMergerNode.composite b/branches/sca-android/tutorials/store/domain/cloud/StoreMergerNode.composite deleted file mode 100644 index 0ce6e6a231..0000000000 --- a/branches/sca-android/tutorials/store/domain/cloud/StoreMergerNode.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/domain/cloud/StoreNode.composite b/branches/sca-android/tutorials/store/domain/cloud/StoreNode.composite deleted file mode 100644 index e2b61a98e1..0000000000 --- a/branches/sca-android/tutorials/store/domain/cloud/StoreNode.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/domain/cloud/StoreSupplierNode.composite b/branches/sca-android/tutorials/store/domain/cloud/StoreSupplierNode.composite deleted file mode 100644 index df46bb8813..0000000000 --- a/branches/sca-android/tutorials/store/domain/cloud/StoreSupplierNode.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/domain/domain.composite b/branches/sca-android/tutorials/store/domain/domain.composite deleted file mode 100644 index 8d47697df8..0000000000 --- a/branches/sca-android/tutorials/store/domain/domain.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/domain/launch/LaunchCatalogMediationNode.java b/branches/sca-android/tutorials/store/domain/launch/LaunchCatalogMediationNode.java deleted file mode 100644 index 4e0772d211..0000000000 --- a/branches/sca-android/tutorials/store/domain/launch/LaunchCatalogMediationNode.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -import org.apache.tuscany.sca.node.launcher.NodeLauncher; - -public class LaunchCatalogMediationNode { - public static void main(String[] args) throws Exception { - NodeLauncher.main(new String[] {"http://localhost:9990/node-config/CatalogMediationNode"}); - } -} diff --git a/branches/sca-android/tutorials/store/domain/launch/LaunchCatalogsNode.java b/branches/sca-android/tutorials/store/domain/launch/LaunchCatalogsNode.java deleted file mode 100644 index a0c04a2f34..0000000000 --- a/branches/sca-android/tutorials/store/domain/launch/LaunchCatalogsNode.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -import org.apache.tuscany.sca.node.launcher.NodeLauncher; - -public class LaunchCatalogsNode { - public static void main(String[] args) throws Exception { - NodeLauncher.main(new String[] {"http://localhost:9990/node-config/CatalogsNode"}); - } -} diff --git a/branches/sca-android/tutorials/store/domain/launch/LaunchCurrencyNode.java b/branches/sca-android/tutorials/store/domain/launch/LaunchCurrencyNode.java deleted file mode 100644 index d9110f5804..0000000000 --- a/branches/sca-android/tutorials/store/domain/launch/LaunchCurrencyNode.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -import org.apache.tuscany.sca.node.launcher.NodeLauncher; - -public class LaunchCurrencyNode { - public static void main(String[] args) throws Exception { - NodeLauncher.main(new String[] {"http://localhost:9990/node-config/CurrencyNode"}); - } -} diff --git a/branches/sca-android/tutorials/store/domain/launch/LaunchStoreDBNode.java b/branches/sca-android/tutorials/store/domain/launch/LaunchStoreDBNode.java deleted file mode 100644 index b83db75646..0000000000 --- a/branches/sca-android/tutorials/store/domain/launch/LaunchStoreDBNode.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -import org.apache.tuscany.sca.node.launcher.NodeLauncher; - -public class LaunchStoreDBNode { - public static void main(String[] args) throws Exception { - NodeLauncher.main(new String[] {"http://localhost:9990/node-config/StoreDBNode"}); - } -} diff --git a/branches/sca-android/tutorials/store/domain/launch/LaunchStoreEUNode.java b/branches/sca-android/tutorials/store/domain/launch/LaunchStoreEUNode.java deleted file mode 100644 index de0e421e2d..0000000000 --- a/branches/sca-android/tutorials/store/domain/launch/LaunchStoreEUNode.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -import org.apache.tuscany.sca.node.launcher.NodeLauncher; - -public class LaunchStoreEUNode { - public static void main(String[] args) throws Exception { - NodeLauncher.main(new String[] {"http://localhost:9990/node-config/StoreEUNode"}); - } -} diff --git a/branches/sca-android/tutorials/store/domain/launch/LaunchStoreMarketNode.java b/branches/sca-android/tutorials/store/domain/launch/LaunchStoreMarketNode.java deleted file mode 100644 index b95d2a8d74..0000000000 --- a/branches/sca-android/tutorials/store/domain/launch/LaunchStoreMarketNode.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -import org.apache.tuscany.sca.node.launcher.NodeLauncher; - -public class LaunchStoreMarketNode { - public static void main(String[] args) throws Exception { - NodeLauncher.main(new String[] {"http://localhost:9990/node-config/StoreMarketNode"}); - } -} diff --git a/branches/sca-android/tutorials/store/domain/launch/LaunchStoreMashupNode.java b/branches/sca-android/tutorials/store/domain/launch/LaunchStoreMashupNode.java deleted file mode 100644 index aa7cbdc4ca..0000000000 --- a/branches/sca-android/tutorials/store/domain/launch/LaunchStoreMashupNode.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -import org.apache.tuscany.sca.node.launcher.NodeLauncher; - -public class LaunchStoreMashupNode { - public static void main(String[] args) throws Exception { - NodeLauncher.main(new String[] {"http://localhost:9990/node-config/StoreMashupNode"}); - } -} diff --git a/branches/sca-android/tutorials/store/domain/launch/LaunchStoreMergerNode.java b/branches/sca-android/tutorials/store/domain/launch/LaunchStoreMergerNode.java deleted file mode 100644 index a29c9b7d61..0000000000 --- a/branches/sca-android/tutorials/store/domain/launch/LaunchStoreMergerNode.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -import org.apache.tuscany.sca.node.launcher.NodeLauncher; - -public class LaunchStoreMergerNode { - public static void main(String[] args) throws Exception { - NodeLauncher.main(new String[] {"http://localhost:9990/node-config/StoreMergerNode"}); - } -} diff --git a/branches/sca-android/tutorials/store/domain/launch/LaunchStoreNode.java b/branches/sca-android/tutorials/store/domain/launch/LaunchStoreNode.java deleted file mode 100644 index 11f1b2ce86..0000000000 --- a/branches/sca-android/tutorials/store/domain/launch/LaunchStoreNode.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -import org.apache.tuscany.sca.node.launcher.NodeLauncher; - -public class LaunchStoreNode { - public static void main(String[] args) throws Exception { - NodeLauncher.main(new String[] {"http://localhost:9990/node-config/StoreNode"}); - } -} diff --git a/branches/sca-android/tutorials/store/domain/launch/LaunchStoreSupplierNode.java b/branches/sca-android/tutorials/store/domain/launch/LaunchStoreSupplierNode.java deleted file mode 100644 index fce27d7d3b..0000000000 --- a/branches/sca-android/tutorials/store/domain/launch/LaunchStoreSupplierNode.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -import org.apache.tuscany.sca.node.launcher.NodeLauncher; - -public class LaunchStoreSupplierNode { - public static void main(String[] args) throws Exception { - NodeLauncher.main(new String[] {"http://localhost:9990/node-config/StoreSupplierNode"}); - } -} diff --git a/branches/sca-android/tutorials/store/domain/launch/LaunchTutorialDomainManager.java b/branches/sca-android/tutorials/store/domain/launch/LaunchTutorialDomainManager.java deleted file mode 100644 index 7408e99c63..0000000000 --- a/branches/sca-android/tutorials/store/domain/launch/LaunchTutorialDomainManager.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -/** - * Launches the domain manager from this module. - * - * @version $Rev$ $Date$ - */ -public class LaunchTutorialDomainManager { - - public static void main(String[] args) throws Exception { - org.apache.tuscany.sca.node.launcher.DomainManagerLauncher.main(args); - } - -} diff --git a/branches/sca-android/tutorials/store/domain/pom.xml b/branches/sca-android/tutorials/store/domain/pom.xml deleted file mode 100644 index be3c8c38c9..0000000000 --- a/branches/sca-android/tutorials/store/domain/pom.xml +++ /dev/null @@ -1,172 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-domain - Apache Tuscany SCA Store Tutorial Domain - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-node-launcher - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-domain-manager - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-node-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-widget-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-resource-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-sca-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ejb-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-ejb - 1.4-SNAPSHOT - runtime - - - - org.apache.derby - derby - 10.3.1.4 - runtime - - - - - - ${artifactId} - ${basedir} - - - ${basedir} - - **/*.java - **/.*/** - pom.xml - build.xml - target/** - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - launch.LaunchTutorialAdmin - - - generate - - - - - - - - diff --git a/branches/sca-android/tutorials/store/domain/workspace.xml b/branches/sca-android/tutorials/store/domain/workspace.xml deleted file mode 100644 index 9cdbe04ac7..0000000000 --- a/branches/sca-android/tutorials/store/domain/workspace.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/pom.xml b/branches/sca-android/tutorials/store/pom.xml deleted file mode 100644 index fd44a6d3b3..0000000000 --- a/branches/sca-android/tutorials/store/pom.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorials - 1.4-SNAPSHOT - ../pom.xml - - tuscany-tutorial-store - pom - Apache Tuscany SCA Store Tutorial - - - - default - - true - - - domain - assets - store - store-merger - store-client - store-db - store-supplier - store-market - store-eu - store-mashup - web-services - catalog-webapp - catalog-ejb - catalog-mediation - store-test - - - - - - diff --git a/branches/sca-android/tutorials/store/store-client/META-INF/sca-contribution.xml b/branches/sca-android/tutorials/store/store-client/META-INF/sca-contribution.xml deleted file mode 100644 index 30ffa61ed2..0000000000 --- a/branches/sca-android/tutorials/store/store-client/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/store-client/client/Shopper.java b/branches/sca-android/tutorials/store/store-client/client/Shopper.java deleted file mode 100644 index f8643d4c52..0000000000 --- a/branches/sca-android/tutorials/store/store-client/client/Shopper.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package client; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Shopper { - - String shop(String itemName, int quantity); - -} diff --git a/branches/sca-android/tutorials/store/store-client/client/ShopperImpl.java b/branches/sca-android/tutorials/store/store-client/client/ShopperImpl.java deleted file mode 100644 index c017548fb3..0000000000 --- a/branches/sca-android/tutorials/store/store-client/client/ShopperImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package client; - -import org.apache.tuscany.sca.data.collection.NotFoundException; -import org.osoa.sca.annotations.Reference; - -import services.Cart; -import services.Catalog; -import services.Item; -import services.Total; - -public class ShopperImpl implements Shopper { - - @Reference - public Catalog catalog; - - @Reference - public Cart shoppingCart; - - @Reference - public Total shoppingTotal; - - public String shop(String itemName, int quantity) { - - Item[] items = catalog.get(); - for (Item item: items) { - if (item.getName().startsWith(itemName)) { - - try { - shoppingCart.delete(""); - } catch (NotFoundException e) { - } - - for (int i = 0; i < quantity; i++) { - shoppingCart.post("item" + i, item); - } - - return shoppingTotal.getTotal(); - } - } - - return ""; - } - -} diff --git a/branches/sca-android/tutorials/store/store-client/launch/LaunchStoreClientNode.java b/branches/sca-android/tutorials/store/store-client/launch/LaunchStoreClientNode.java deleted file mode 100644 index d1a9dfb36c..0000000000 --- a/branches/sca-android/tutorials/store/store-client/launch/LaunchStoreClientNode.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.launcher.NodeLauncher; - -import client.Shopper; - -public class LaunchStoreClientNode { - - public static void main(String[] args) throws Exception { - NodeLauncher nodeLauncher = NodeLauncher.newInstance(); - SCANode storeClientNode = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/StoreClientNode"); - storeClientNode.start(); - SCAClient client = (SCAClient)storeClientNode; - - Shopper shopper = client.getService(Shopper.class, "StoreClient"); - - String total = shopper.shop("Orange", 5); - System.out.println("Total: " + total); - - storeClientNode.stop(); - } -} diff --git a/branches/sca-android/tutorials/store/store-client/pom.xml b/branches/sca-android/tutorials/store/store-client/pom.xml deleted file mode 100644 index bfcc1a912b..0000000000 --- a/branches/sca-android/tutorials/store/store-client/pom.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-store-client - Apache Tuscany SCA Store Tutorial Online Store Client - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-data-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-launcher - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-node-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - - ${artifactId} - ${basedir} - - - ${basedir} - - **/*.java - **/.*/** - pom.xml - build.xml - target/** - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-client/services/Cart.java b/branches/sca-android/tutorials/store/store-client/services/Cart.java deleted file mode 100644 index 9e6226d963..0000000000 --- a/branches/sca-android/tutorials/store/store-client/services/Cart.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.apache.tuscany.sca.data.collection.Collection; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Cart extends Collection { - -} diff --git a/branches/sca-android/tutorials/store/store-client/services/Catalog.java b/branches/sca-android/tutorials/store/store-client/services/Catalog.java deleted file mode 100644 index 2c3b19f579..0000000000 --- a/branches/sca-android/tutorials/store/store-client/services/Catalog.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Catalog { - Item[] get(); -} diff --git a/branches/sca-android/tutorials/store/store-client/services/Item.java b/branches/sca-android/tutorials/store/store-client/services/Item.java deleted file mode 100644 index 81cefcdbef..0000000000 --- a/branches/sca-android/tutorials/store/store-client/services/Item.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - - -public class Item { - private String name; - private String price; - private String origin; - - public Item() { - } - - public Item(String name, String price, String origin) { - this.name = name; - this.price = price; - this.origin = origin; - } - - public Item(String name, String price) { - this.name = name; - this.price = price; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPrice() { - return price; - } - - public void setPrice(String price) { - this.price = price; - } - - public String getOrigin() { - return origin; - } - - public void setOrigin(String origin) { - this.origin = origin; - } - -} diff --git a/branches/sca-android/tutorials/store/store-client/services/Total.java b/branches/sca-android/tutorials/store/store-client/services/Total.java deleted file mode 100644 index 8f464e526f..0000000000 --- a/branches/sca-android/tutorials/store/store-client/services/Total.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Total { - - String getTotal(); - -} diff --git a/branches/sca-android/tutorials/store/store-client/store-client.composite b/branches/sca-android/tutorials/store/store-client/store-client.composite deleted file mode 100644 index 3c5f1637ef..0000000000 --- a/branches/sca-android/tutorials/store/store-client/store-client.composite +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-db/META-INF/sca-contribution.xml b/branches/sca-android/tutorials/store/store-db/META-INF/sca-contribution.xml deleted file mode 100644 index 7a5d5613be..0000000000 --- a/branches/sca-android/tutorials/store/store-db/META-INF/sca-contribution.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/store-db/pom.xml b/branches/sca-android/tutorials/store/store-db/pom.xml deleted file mode 100644 index b3ec4949ab..0000000000 --- a/branches/sca-android/tutorials/store/store-db/pom.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-store-db - Apache Tuscany SCA Store Tutorial Online Store Using DB - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.4-SNAPSHOT - - - - - ${artifactId} - ${basedir} - - - ${basedir} - - **/*.java - **/.*/** - pom.xml - build.xml - target/** - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - org.codehaus.mojo - sql-maven-plugin - - 1.1-SNAPSHOT - - - - org.apache.derby - derby - 10.3.1.4 - - - - - - create-db - generate-resources - - execute - - - org.apache.derby.jdbc.EmbeddedDriver - jdbc:derby:${basedir}/target/cart-db;create=true - true - continue - skip - ; - - ${basedir}/../assets/services/db/cart.sql - - - - - - - shutdown-database-sothat-test-can-run - process-test-resources - - execute - - - org.apache.derby.jdbc.EmbeddedDriver - jdbc:derby:${basedir}/target/cart-db;shutdown=true - true - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-db/store-db.composite b/branches/sca-android/tutorials/store/store-db/store-db.composite deleted file mode 100644 index 03094be5ad..0000000000 --- a/branches/sca-android/tutorials/store/store-db/store-db.composite +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - USD - - - - - - - - - - - - - USD - - - - - - ../store-db/target/cart-db - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-eu/META-INF/sca-contribution.xml b/branches/sca-android/tutorials/store/store-eu/META-INF/sca-contribution.xml deleted file mode 100644 index 552932b0e7..0000000000 --- a/branches/sca-android/tutorials/store/store-eu/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/store-eu/pom.xml b/branches/sca-android/tutorials/store/store-eu/pom.xml deleted file mode 100644 index b689c888e6..0000000000 --- a/branches/sca-android/tutorials/store/store-eu/pom.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-store-eu - Apache Tuscany SCA Store Tutorial EU Online Store - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.4-SNAPSHOT - - - - - ${artifactId} - ${basedir} - - - ${basedir} - - **/*.java - **/.*/** - pom.xml - build.xml - target/** - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - org.codehaus.mojo - sql-maven-plugin - 1.0 - - - - org.apache.derby - derby - 10.3.1.4 - - - - - - create-db - generate-resources - - execute - - - org.apache.derby.jdbc.EmbeddedDriver - jdbc:derby:${basedir}/target/cart-eu-db;create=true - true - continue - ; - - ${basedir}/../assets/services/db/cart.sql - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-eu/store-eu.composite b/branches/sca-android/tutorials/store/store-eu/store-eu.composite deleted file mode 100644 index a0b8b50975..0000000000 --- a/branches/sca-android/tutorials/store/store-eu/store-eu.composite +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - EUR - - - - - - - - - - - - - - - - - - ../store-eu/target/cart-eu-db - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-eu/uiservices/store-eu.html b/branches/sca-android/tutorials/store/store-eu/uiservices/store-eu.html deleted file mode 100644 index 4569b76b3f..0000000000 --- a/branches/sca-android/tutorials/store/store-eu/uiservices/store-eu.html +++ /dev/null @@ -1,162 +0,0 @@ - - - -EU Store - - - - - - - - -

Store

-

Fruits and Vegetables - Fruits et Legumes - Obst und Gemuese -

-

Catalog

-
-
-
- -
- -
- -

Your Shopping Cart

-
-
-
-
-
- - - (feed) -
-
- - diff --git a/branches/sca-android/tutorials/store/store-market/META-INF/sca-contribution.xml b/branches/sca-android/tutorials/store/store-market/META-INF/sca-contribution.xml deleted file mode 100644 index 491230c952..0000000000 --- a/branches/sca-android/tutorials/store/store-market/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/store-market/build.xml b/branches/sca-android/tutorials/store/store-market/build.xml deleted file mode 100644 index a6b0b461b1..0000000000 --- a/branches/sca-android/tutorials/store/store-market/build.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-market/pom.xml b/branches/sca-android/tutorials/store/store-market/pom.xml deleted file mode 100644 index 50a931ead3..0000000000 --- a/branches/sca-android/tutorials/store/store-market/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-store-market - Apache Tuscany SCA Store Tutorial Marketplace Online Store - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.4-SNAPSHOT - - - - - ${artifactId} - ${basedir} - - - ${basedir} - - **/*.java - **/.*/** - pom.xml - build.xml - target/** - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-market/store-market.composite b/branches/sca-android/tutorials/store/store-market/store-market.composite deleted file mode 100644 index 1c225e6c07..0000000000 --- a/branches/sca-android/tutorials/store/store-market/store-market.composite +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - USD - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-mashup/META-INF/sca-contribution.xml b/branches/sca-android/tutorials/store/store-mashup/META-INF/sca-contribution.xml deleted file mode 100644 index 4ec08403e5..0000000000 --- a/branches/sca-android/tutorials/store/store-mashup/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-mashup/build-openajax.xml b/branches/sca-android/tutorials/store/store-mashup/build-openajax.xml deleted file mode 100644 index 4668dedc1d..0000000000 --- a/branches/sca-android/tutorials/store/store-mashup/build-openajax.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-mashup/gadget/map-gadget.html b/branches/sca-android/tutorials/store/store-mashup/gadget/map-gadget.html deleted file mode 100644 index d76bcad91b..0000000000 --- a/branches/sca-android/tutorials/store/store-mashup/gadget/map-gadget.html +++ /dev/null @@ -1,50 +0,0 @@ - - - -Map - - - - - - - -
- - diff --git a/branches/sca-android/tutorials/store/store-mashup/gadget/store-gadget.html b/branches/sca-android/tutorials/store/store-mashup/gadget/store-gadget.html deleted file mode 100644 index c09b9d28c8..0000000000 --- a/branches/sca-android/tutorials/store/store-mashup/gadget/store-gadget.html +++ /dev/null @@ -1,166 +0,0 @@ - - - -Store - - - - - - - - -

Store

-
-

Catalog

-
-
-
- -
- -
- -

Your Shopping Cart

-
-
-
-
-
- - - (feed) -
-
- - diff --git a/branches/sca-android/tutorials/store/store-mashup/map-gadget.composite b/branches/sca-android/tutorials/store/store-mashup/map-gadget.composite deleted file mode 100644 index 77db2edbf2..0000000000 --- a/branches/sca-android/tutorials/store/store-mashup/map-gadget.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-mashup/mashup/store-mash.html b/branches/sca-android/tutorials/store/store-mashup/mashup/store-mash.html deleted file mode 100644 index aab14bc065..0000000000 --- a/branches/sca-android/tutorials/store/store-mashup/mashup/store-mash.html +++ /dev/null @@ -1,70 +0,0 @@ - - - -Store Mashup - - - - - - - - - -

Store Mashup

-
- - - - - -
- - - diff --git a/branches/sca-android/tutorials/store/store-mashup/pom.xml b/branches/sca-android/tutorials/store/store-mashup/pom.xml deleted file mode 100644 index 475620e99f..0000000000 --- a/branches/sca-android/tutorials/store/store-mashup/pom.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-store-mashup - Apache Tuscany SCA Store Tutorial Online Store Mashup - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.4-SNAPSHOT - - - - - ${artifactId} - ${basedir} - - - ${basedir} - - **/*.java - **/.*/** - pom.xml - build.xml - target/** - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - ant - ant-trax - 1.6.5 - - - - - - install-openajax - validate - - run - - - - - - - - - - - copy-openajax-files - generate-resources - - run - - - - - - - - - - - - clean-openajax-files - clean - - run - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-mashup/store-gadget.composite b/branches/sca-android/tutorials/store/store-mashup/store-gadget.composite deleted file mode 100644 index 7c10651e52..0000000000 --- a/branches/sca-android/tutorials/store/store-mashup/store-gadget.composite +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - USD - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-mashup/store-mashup.composite b/branches/sca-android/tutorials/store/store-mashup/store-mashup.composite deleted file mode 100644 index 84e4933e63..0000000000 --- a/branches/sca-android/tutorials/store/store-mashup/store-mashup.composite +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-merger/META-INF/sca-contribution.xml b/branches/sca-android/tutorials/store/store-merger/META-INF/sca-contribution.xml deleted file mode 100644 index 700a84736c..0000000000 --- a/branches/sca-android/tutorials/store/store-merger/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/store-merger/pom.xml b/branches/sca-android/tutorials/store/store-merger/pom.xml deleted file mode 100644 index 5a0b6f6dec..0000000000 --- a/branches/sca-android/tutorials/store/store-merger/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-store-merger - Apache Tuscany SCA Store Tutorial Merger Online Store - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.4-SNAPSHOT - - - - - ${artifactId} - ${basedir} - - - ${basedir} - - **/*.java - **/.*/** - pom.xml - build.xml - target/** - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-merger/store-merger.composite b/branches/sca-android/tutorials/store/store-merger/store-merger.composite deleted file mode 100644 index 76d77dc693..0000000000 --- a/branches/sca-android/tutorials/store/store-merger/store-merger.composite +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - USD - - - - - - - - - - - - - - USD - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-supplier/META-INF/sca-contribution.xml b/branches/sca-android/tutorials/store/store-supplier/META-INF/sca-contribution.xml deleted file mode 100644 index a75087aca1..0000000000 --- a/branches/sca-android/tutorials/store/store-supplier/META-INF/sca-contribution.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/store-supplier/pom.xml b/branches/sca-android/tutorials/store/store-supplier/pom.xml deleted file mode 100644 index cc0cfdd630..0000000000 --- a/branches/sca-android/tutorials/store/store-supplier/pom.xml +++ /dev/null @@ -1,127 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-store-supplier - Apache Tuscany SCA Store Tutorial Supplier Online Store - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.4-SNAPSHOT - - - - - ${artifactId} - ${basedir} - - - ${basedir} - - **/*.java - **/.*/** - pom.xml - build.xml - target/** - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - org.codehaus.mojo - sql-maven-plugin - - 1.1-SNAPSHOT - - - - org.apache.derby - derby - 10.3.1.4 - - - - - - create-db - generate-resources - - execute - - - org.apache.derby.jdbc.EmbeddedDriver - jdbc:derby:${basedir}/target/cart-db;create=true - true - continue - skip - ; - - ${basedir}/../assets/services/db/cart.sql - - - - - - - shutdown-database-sothat-test-can-run - process-test-resources - - execute - - - org.apache.derby.jdbc.EmbeddedDriver - jdbc:derby:${basedir}/target/cart-db;shutdown=true - true - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-supplier/store-supplier.composite b/branches/sca-android/tutorials/store/store-supplier/store-supplier.composite deleted file mode 100644 index 525bc889cb..0000000000 --- a/branches/sca-android/tutorials/store/store-supplier/store-supplier.composite +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - USD - - - - - - - - - - - - - - USD - - - - - - ../store-supplier/target/cart-db - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-test/META-INF/sca-contribution.xml b/branches/sca-android/tutorials/store/store-test/META-INF/sca-contribution.xml deleted file mode 100644 index a75087aca1..0000000000 --- a/branches/sca-android/tutorials/store/store-test/META-INF/sca-contribution.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/store-test/client/Shopper.java b/branches/sca-android/tutorials/store/store-test/client/Shopper.java deleted file mode 100644 index f8643d4c52..0000000000 --- a/branches/sca-android/tutorials/store/store-test/client/Shopper.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package client; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Shopper { - - String shop(String itemName, int quantity); - -} diff --git a/branches/sca-android/tutorials/store/store-test/pom.xml b/branches/sca-android/tutorials/store/store-test/pom.xml deleted file mode 100644 index 7eb320a804..0000000000 --- a/branches/sca-android/tutorials/store/store-test/pom.xml +++ /dev/null @@ -1,201 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-store-test - Apache Tuscany SCA Store Tutorial Integration Test - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-data-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-launcher - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-domain-manager - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-node-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-widget-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-resource-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-sca-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ejb-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-ejb - 1.4-SNAPSHOT - runtime - - - - org.apache.derby - derby - 10.3.1.4 - runtime - - - - junit - junit - 4.2 - test - - - - org.apache.tuscany.sca - tutorial-store-supplier - 1.4-SNAPSHOT - runtime - - - - - - ${artifactId} - ${basedir} - - - ${basedir} - - **/.*/** - **/*.java - pom.xml - build.xml - target/** - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store-test/test/StoreSupplierTestCase.java b/branches/sca-android/tutorials/store/store-test/test/StoreSupplierTestCase.java deleted file mode 100644 index 5efec4ee2c..0000000000 --- a/branches/sca-android/tutorials/store/store-test/test/StoreSupplierTestCase.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package test; - -import junit.framework.Assert; -import junit.framework.TestCase; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher; -import org.apache.tuscany.sca.node.launcher.NodeLauncher; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import client.Shopper; - - -/** - * Test the store-merger. - * - * @version $Rev$ $Date$ - */ -public class StoreSupplierTestCase { - - private SCANode domainManager; - private SCANode storeSupplierNode; - private SCANode storeCatalogsNode; - private SCANode storeClientNode; - - @Before - public void setup() throws Exception { - String baseDir = System.getProperty("basedir"); - String domainDir = baseDir != null? baseDir + "/" + "../domain" : "../domain"; - - DomainManagerLauncher managerLauncher = DomainManagerLauncher.newInstance(); - domainManager = managerLauncher.createDomainManager(domainDir); - domainManager.start(); - - NodeLauncher nodeLauncher = NodeLauncher.newInstance(); - storeSupplierNode = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/StoreSupplierNode"); - storeSupplierNode.start(); - - storeCatalogsNode = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/CatalogsNode"); - storeCatalogsNode.start(); - - storeClientNode = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/StoreClientNode"); - storeClientNode.start(); - - } - - @After - public void tearDown() throws Exception { - storeSupplierNode.stop(); - storeCatalogsNode.stop(); - storeClientNode.stop(); - domainManager.stop(); - } - - @Test - public void testShop() { - SCAClient client = (SCAClient)storeClientNode; - Shopper shopper = client.getService(Shopper.class, "StoreClient"); - - String total = shopper.shop("Orange", 5); - System.out.println("Total: " + total); - - Assert.assertEquals("$17.75", total); - - } - -} diff --git a/branches/sca-android/tutorials/store/store/META-INF/sca-contribution.xml b/branches/sca-android/tutorials/store/store/META-INF/sca-contribution.xml deleted file mode 100644 index 3ed6e4a4ef..0000000000 --- a/branches/sca-android/tutorials/store/store/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/store/pom.xml b/branches/sca-android/tutorials/store/store/pom.xml deleted file mode 100644 index 232b9901f7..0000000000 --- a/branches/sca-android/tutorials/store/store/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-store - Apache Tuscany SCA Store Tutorial Online Store - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.4-SNAPSHOT - - - - - ${artifactId} - ${basedir} - - - ${basedir} - - **/*.java - **/.*/** - pom.xml - build.xml - target/** - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - - diff --git a/branches/sca-android/tutorials/store/store/store.composite b/branches/sca-android/tutorials/store/store/store.composite deleted file mode 100644 index b3f3140c8c..0000000000 --- a/branches/sca-android/tutorials/store/store/store.composite +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - USD - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/web-services/META-INF/sca-contribution.xml b/branches/sca-android/tutorials/store/web-services/META-INF/sca-contribution.xml deleted file mode 100644 index 10fbe6c448..0000000000 --- a/branches/sca-android/tutorials/store/web-services/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/web-services/catalogs.composite b/branches/sca-android/tutorials/store/web-services/catalogs.composite deleted file mode 100644 index 154d475165..0000000000 --- a/branches/sca-android/tutorials/store/web-services/catalogs.composite +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - USD - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/web-services/currency.composite b/branches/sca-android/tutorials/store/web-services/currency.composite deleted file mode 100644 index 7a3f70e299..0000000000 --- a/branches/sca-android/tutorials/store/web-services/currency.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/web-services/pom.xml b/branches/sca-android/tutorials/store/web-services/pom.xml deleted file mode 100644 index 43cc88510e..0000000000 --- a/branches/sca-android/tutorials/store/web-services/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-web-services - Apache Tuscany SCA Store Tutorial Web Services - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.4-SNAPSHOT - - - - - ${artifactId} - ${basedir} - - - ${basedir} - - **/*.java - **/.*/** - pom.xml - build.xml - target/** - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - - - diff --git a/branches/sca-android/tutorials/store/www-services/cart-amazon/amazon/cart/AmazonCart.java b/branches/sca-android/tutorials/store/www-services/cart-amazon/amazon/cart/AmazonCart.java deleted file mode 100644 index 6f968bdba3..0000000000 --- a/branches/sca-android/tutorials/store/www-services/cart-amazon/amazon/cart/AmazonCart.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package amazon.cart; - -import org.apache.tuscany.sca.databinding.annotation.DataBinding; -import org.osoa.sca.annotations.Remotable; - -import com.cart.amazon.CartAdd; -import com.cart.amazon.CartAddResponse; -import com.cart.amazon.CartClear; -import com.cart.amazon.CartClearResponse; -import com.cart.amazon.CartCreate; -import com.cart.amazon.CartCreateResponse; -import com.cart.amazon.CartGet; -import com.cart.amazon.CartGetResponse; - -@Remotable -@DataBinding(value="commonj.sdo.DataObject", wrapped=true) -public interface AmazonCart { - - public CartCreateResponse CartCreate(CartCreate cartCreate); - - public CartAddResponse CartAdd(CartAdd cartAdd); - - public CartClearResponse CartClear(CartClear cartClear); - - public CartGetResponse CartGet(CartGet cartGet); -} diff --git a/branches/sca-android/tutorials/store/www-services/cart-amazon/amazon/cart/AmazonCart.wsdl b/branches/sca-android/tutorials/store/www-services/cart-amazon/amazon/cart/AmazonCart.wsdl deleted file mode 100644 index 051c8ad906..0000000000 --- a/branches/sca-android/tutorials/store/www-services/cart-amazon/amazon/cart/AmazonCart.wsdl +++ /dev/null @@ -1,451 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/www-services/cart-amazon/amazon/cart/AmazonCartImpl.java b/branches/sca-android/tutorials/store/www-services/cart-amazon/amazon/cart/AmazonCartImpl.java deleted file mode 100644 index 66d72c57c4..0000000000 --- a/branches/sca-android/tutorials/store/www-services/cart-amazon/amazon/cart/AmazonCartImpl.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package amazon.cart; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.osoa.sca.annotations.Service; - -import com.cart.amazon.AmazonFactory; -import com.cart.amazon.Cart; -import com.cart.amazon.CartAdd; -import com.cart.amazon.CartAddRequest; -import com.cart.amazon.CartAddResponse; -import com.cart.amazon.CartClear; -import com.cart.amazon.CartClearResponse; -import com.cart.amazon.CartCreate; -import com.cart.amazon.CartCreateResponse; -import com.cart.amazon.CartGet; -import com.cart.amazon.CartGetResponse; -import com.cart.amazon.CartItem; -import com.cart.amazon.CartItems; -import com.cart.amazon.Item1; -import com.cart.amazon.Items1; - -@Service(AmazonCart.class) -public class AmazonCartImpl { - - protected Map cartsHash = new HashMap(); - - public CartCreateResponse CartCreate(CartCreate cartCreate) { - - System.out.println("CartServiceID: " + this.toString()); - System.out.println("Entering cartCreate..."); - String userId = cartCreate.getAWSAccessKeyId(); - - Cart cart = getCart(userId); - if (cart != null) { - System.out.println("User " + cartCreate.getAWSAccessKeyId() - + " has already created a cart with ID: " - + cart.getCartId()); - return null; - } - cart = new Cart(); - cart.setCartItems(new CartItems()); - addCart(userId, cart); - - CartCreateResponse response = AmazonFactory.INSTANCE.createCartCreateResponse(); - System.out.println("Exiting cartCreate..."); - return response; - - } - - public CartAddResponse CartAdd(CartAdd cartAdd) { - - String userId = cartAdd.getAWSAccessKeyId(); - - Cart cart = getCart(userId); - if (cart == null) { - System.out.println("User has not associated Cart yet..."); - return null; - } - - List cartAddRequestList = cartAdd.getRequest(); - CartAddRequest car = (CartAddRequest)cartAddRequestList.get(0); - Items1 carItems = car.getItems(); - List itemList = carItems.getItem(); - Item1 item = (Item1)itemList.get(0); //Take only the first one, no iteration for now - System.out.println("item.getASIN: " + item.getASIN()); - System.out.println("item.getQuantity(): " + item.getQuantity()); - CartItems cartItems = cart.getCartItems(); - List cartItemList = cartItems.getCartItem(); - cart.setCartItems(cartItems); - return null; - } - - public CartClearResponse CartClear(CartClear cartClear) { - String userId = cartClear.getAWSAccessKeyId(); - - Cart cart = getCart(userId); - if (cart == null) { - System.out.println("User has not associated Cart yet..."); - return null; - } - - cart.setCartItems(new CartItems()); - return null; - } - - public CartGetResponse CartGet(CartGet cartGet) { - return null; - } - - private Cart getCart(String userId) { - Cart cart = null; - cart = this.cartsHash.get(userId); - return cart; - } - - private void addCart(String userId, Cart cart) { - this.cartsHash.put(userId, cart); - } -} diff --git a/branches/sca-android/tutorials/store/www-services/cart-amazon/amazoncart.composite b/branches/sca-android/tutorials/store/www-services/cart-amazon/amazoncart.composite deleted file mode 100644 index 6f8cc7b878..0000000000 --- a/branches/sca-android/tutorials/store/www-services/cart-amazon/amazoncart.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/www-services/cart-amazon/launch/LaunchAmazonCart.java b/branches/sca-android/tutorials/store/www-services/cart-amazon/launch/LaunchAmazonCart.java deleted file mode 100644 index 69dd06c2ef..0000000000 --- a/branches/sca-android/tutorials/store/www-services/cart-amazon/launch/LaunchAmazonCart.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package launch; - -import java.net.URL; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.apache.tuscany.sca.node.util.SCAContributionUtil; - -public class LaunchAmazonCart { - - public static void main(String[] args) throws Exception { - - System.out.println("Starting ..."); - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); - SCANode node = nodeFactory.createSCANode(null, "http://localhost:9999"); - - URL contribution = SCAContributionUtil.findContributionFromClass(LaunchAmazonCart.class); - node.addContribution("http://amazonCart", contribution); - - node.addToDomainLevelComposite(new QName("http://amazonCart", "amazonCart")); - node.start(); - - System.out.println("amazoncart.composite ready for big business !!!"); - System.in.read(); - - System.out.println("Stopping ..."); - node.stop(); - node.destroy(); - System.out.println(); - } - -} diff --git a/branches/sca-android/tutorials/store/www-services/cart-amazon/pom.xml b/branches/sca-android/tutorials/store/www-services/cart-amazon/pom.xml deleted file mode 100644 index 9b4b725746..0000000000 --- a/branches/sca-android/tutorials/store/www-services/cart-amazon/pom.xml +++ /dev/null @@ -1,215 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-cart-amazon - Apache Tuscany SCA Store Tutorial Amazon Cart - - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-node-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sdo - tuscany-sdo-lib - 1.1-incubating - - - - org.apache.tuscany.sdo - tuscany-sdo-impl - 1.1-incubating - - - - org.apache.tuscany.sca - tuscany-databinding - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-databinding-sdo - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - compile - - - - - - ${artifactId} - ${basedir} - ${basedir}/test - - - ${basedir} - - **/*.java - pom.xml - build.xml - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.0 - - - add-test-source - generate-sources - - add-source - - - - target/sdo-source - target/wsdl2java-source - - - - - - - org.apache.tuscany.sdo - tuscany-sdo-plugin - 1.1-incubating - - - - ${basedir}/amazon/cart/AmazonCart.wsdl - true - true - true - true - - - generate - - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - generate - - - - - - org.apache.tuscany.sca - tuscany-maven-wsdl2java - 1.4-SNAPSHOT - - - - ${basedir}/amazon/cart/AmazonCart.wsdl - amazon.cart.api - - - generate - - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - launch.LaunchAmazonCart - - - generate - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - ant - ant-trax - 1.6.5 - - - - - - - - diff --git a/branches/sca-android/tutorials/store/www-services/cart-amazon/test/AmazonCartTestCase.java b/branches/sca-android/tutorials/store/www-services/cart-amazon/test/AmazonCartTestCase.java deleted file mode 100644 index ede97f7868..0000000000 --- a/branches/sca-android/tutorials/store/www-services/cart-amazon/test/AmazonCartTestCase.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package test; - -import java.net.URL; - -import javax.xml.namespace.QName; - -import launch.LaunchAmazonCart; - -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.apache.tuscany.sca.node.util.SCAContributionUtil; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import amazon.cart.AmazonCart; - -import com.cart.amazon.AmazonFactory; -import com.cart.amazon.CartCreate; -import commonj.sdo.DataObject; - -/** - * Test case for helloworld web service client - */ -public class AmazonCartTestCase { - - private SCANode node; - private AmazonCart amazonCart; - - @Before - public void startClient() throws Exception { - try { - - System.out.println("Starting ..."); - SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); - node = nodeFactory.createSCANode(null, null); - - URL contribution = SCAContributionUtil.findContributionFromClass(LaunchAmazonCart.class); - node.addContribution("http://amazonCart", contribution); - - node.addToDomainLevelComposite(new QName("http://amazonCart", "amazonCart")); - node.start(); - - System.out.println("amazoncart.composite ready for big business !!!"); - - amazonCart = node.getDomain().getService(AmazonCart.class, "AmazonCartServiceComponent"); - - } catch (Throwable e) { - e.printStackTrace(); - } - } - - @Test - public void testCartCreate() throws Exception { - System.out.println("Entering test..."); - CartCreate create = AmazonFactory.INSTANCE.createCartCreate(); - DataObject root = amazonCart.CartCreate(create); - // Assert.assertEquals("Hello Smith", msg); - System.out.println("Exiting test..."); - } - - /* - * @Test public void testEmbeddedReferenceClient() throws Exception { String - * msg = helloTuscanyService.getGreetings("Tuscany"); - * Assert.assertEquals("Hello Tuscany", msg); } - */ - - @After - public void stopClient() throws Exception { - System.out.println("Stopping ..."); - node.stop(); - node.destroy(); - System.out.println(); - } - - /* - * public void testCartCreate() throws Exception { DataObject root = - * amazonCart.cartCreate(null); //assertNotNull(root); - * //assertEquals("Luciano Resende", root.getString("CUSTOMER[1]/NAME")); } - */ -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/README b/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/README deleted file mode 100644 index b5322f82c2..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/README +++ /dev/null @@ -1,77 +0,0 @@ -Shopping Store Web Service Sample -================================= -This sample creates an shopping store application using Amazon's WS API interface. This sample intents to provide -the same services provided by Amazon but implementing them as SCA components. These services are provided through -a web service interface. - -If you just want to run it to see what happens you need to run the server first. So, open a command prompt, navigate -to the shoppingstore sample directory and do: - -1 - "ant" to compile it -2 - "ant run" to get the server up and running -3 - You should see the following output from the run target: - run: - [java] log4j:WARN No appenders could be found for logger (org.apache.axiom.om.util.StAXUtils). - [java] log4j:WARN Please initialize the log4j system properly. - [java] ToyApp server started (press enter to shutdown) - -Once the server is running, it will be expecting requests from a client through its Web Service interface. - -The WSDL describing the WS interface can be obtained opening a web broeser pointing to -http://localhost:8080/ShoppingStoreServiceComponent?wsdl - - -Sample Overview ---------------- -Currently, the sample provides two components: - 1 - ShoppingStoreService: that is wired to a reference with a web service binding and plays the role of a proxy service which offers all the operations exposed through the WSDL API and forwards every invocation to the actual service that in fact implements the service invoked. - 2 - CartService: currently, this is the only component offering an actual service through the Shopping Store. It provides the following operations: CartCreate, CartAdd, CartClear, CartGet. - -shoppingstore/ - lib/ - AWS2007_05_14.jar - The jar file containing all the classes generated out of Amazon's WSDL using - the Axis2's wsdl2java utility (the databinding used was jaxb) - src/ - main/ - java/ - shoppingstore/ - server/ - ShoppingStoreServer.java - starts the SCA Runtime and deploys - the shoppingstore.composite. - In doing this, the SCA WSDL binding - acts to expose the ShoppingStoreService - over WS - services/ - cart/ - CartService.java - Java interface description for - CartServiceComponent - CartServiceImpl.java - component implementation - proxy/ - ShoppingStoreService.java - Java interface description for - ShoppingStoreServiceComponent - ShoppingStoreServiceImpl.java - component implementation - resources/ - wsdl/ - shoppingstore.wsdl - the service description that the - SCA reference uses to bind to. This - wsdl file is very similar to Amazon's - WSDL released on May 14th, 2007. Only - two modifications were done: - 1 - Non-implemented services had to be - commented out from the WSDL - 2 - Its location was modified in order - for it to point to this sample's address - shoppingstore.composite - the SCA assembly for this sample - test/ - no test provided so far - shoppingstore.png - a pictorial representation of the - current status of the sample, plus future enhancements - build.xml - the Ant build file - - -Building And Running The Sample Using Ant ------------------------------------------ -Take a look at the beginning of this document. - -Building And Running The Sample Using Maven -------------------------------------------- -No maven support has been implemented yet. \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/build.xml b/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/build.xml deleted file mode 100644 index 0a455f52b7..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/build.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/lib/AWS2007_05_14.jar b/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/lib/AWS2007_05_14.jar deleted file mode 100644 index 4b5232fd3b..0000000000 Binary files a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/lib/AWS2007_05_14.jar and /dev/null differ diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/shoppingstore.png b/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/shoppingstore.png deleted file mode 100644 index e88abcbd58..0000000000 Binary files a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/shoppingstore.png and /dev/null differ diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/server/ShoppingStoreServer.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/server/ShoppingStoreServer.java deleted file mode 100644 index 486946b2fc..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/server/ShoppingStoreServer.java +++ /dev/null @@ -1,25 +0,0 @@ -package shoppingstore.server; - -import java.io.IOException; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class ShoppingStoreServer { - - public static void main(String[] args) { - - SCADomain scaDomain = SCADomain.newInstance("shoppingstore.composite"); - - try { - System.out.println("ToyApp server started (press enter to shutdown)"); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - - scaDomain.close(); - System.out.println("ToyApp server stopped"); - } - - -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/services/cart/CartService.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/services/cart/CartService.java deleted file mode 100644 index e8f383c3e1..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/services/cart/CartService.java +++ /dev/null @@ -1,35 +0,0 @@ -package shoppingstore.services.cart; - -import org.osoa.sca.annotations.Remotable; - -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartAdd; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartAddResponse; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartClear; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartClearResponse; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartCreate; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartCreateResponse; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartGet; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartGetResponse; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartModify; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartModifyResponse; - -@Remotable -public interface CartService { - - public CartCreateResponse CartCreate(CartCreate cartCreate); - - public CartAddResponse CartAdd(CartAdd cartAdd); - - public CartModifyResponse CartModify(CartModify cartModify); - - public CartClearResponse CartClear(CartClear cartClear); - - public CartGetResponse CartGet(CartGet cartGet); - - //@Init - //public void start(); - - //@Destroy - //public void stop(); - -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/services/cart/CartServiceImpl.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/services/cart/CartServiceImpl.java deleted file mode 100644 index 1579dbd60d..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/services/cart/CartServiceImpl.java +++ /dev/null @@ -1,144 +0,0 @@ -package shoppingstore.services.cart; - -import java.util.HashMap; - -import org.osoa.sca.annotations.Scope; - -import com.amazon.webservices.awsecommerceservice._2007_05_14.Cart; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartAdd; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartAddRequest; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartAddResponse; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartClear; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartClearResponse; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartCreate; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartCreateResponse; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartGet; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartGetResponse; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartItem; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartItems; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartModify; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartModifyResponse; - -@Scope("COMPOSITE") -public class CartServiceImpl implements CartService { - - private static long ID = 0; - - private HashMap cartsHash = new HashMap(); - - public CartAddResponse CartAdd(CartAdd cartAdd) { - System.out.println("Entering cartAdd..."); - System.out.println("CartServiceID: " + this.toString()); - CartAddResponse cartAddResponse = new CartAddResponse(); - - CartAddRequest cartAddRequest = cartAdd.getRequest().get(0); - - //Cart cart = getCart(cartAddRequest.getCartId()); - Cart cart = getCart(cartAdd.getAWSAccessKeyId()); - if(cart == null){ - cartAddResponse.getCart().add(new Cart()); - return cartAddResponse; - } - - CartItem cartItem = new CartItem(); - cartItem.setASIN(cartAddRequest.getItems().getItem().get(0).getASIN()); - cartItem.setQuantity(cartAddRequest.getItems().getItem().get(0).getQuantity().toString()); - cart.getCartItems().getCartItem().add(cartItem); - cartAddResponse.getCart().add(cart); - System.out.println("Exiting cartAdd..."); - return cartAddResponse; - } - - public CartClearResponse CartClear(CartClear cartClear) { - System.out.println("CartServiceID: " + this.toString()); - System.out.println("Entering cartClear..."); - CartClearResponse cartClearResponse = new CartClearResponse(); - - //CartClearRequest cartClearRequest = cartClear.getRequest().get(0); - - //Cart cart = getCart(cartClearRequest.getCartId()); - Cart cart = getCart(cartClear.getAWSAccessKeyId()); - if(cart == null) { - cartClearResponse.getCart().add(new Cart()); - return cartClearResponse; - } - - cart.getCartItems().getCartItem().clear(); - - cartClearResponse.getCart().add(cart); - System.out.println("Exiting cartClear..."); - return cartClearResponse; - } - - public CartCreateResponse CartCreate(CartCreate cartCreate) { - System.out.println("CartServiceID: " + this.toString()); - System.out.println("Entering cartCreate..."); - CartCreateResponse cartCreateResponse = new CartCreateResponse(); - - Cart cart = getCart(cartCreate.getAWSAccessKeyId()); - if(cart != null){ - cartCreateResponse.getCart().add(cart); - System.out.println("User " + cartCreate.getAWSAccessKeyId() + " has already created a cart with ID: " + cart.getCartId()); - return cartCreateResponse; - } - - cart = new Cart(); - cart.setCartId(this.generateID()); - cart.setCartItems(new CartItems()); - addCart(cartCreate.getAWSAccessKeyId(), cart); - - cartCreateResponse.getCart().add(cart); - System.out.println("Exiting cartCreate..."); - return cartCreateResponse; - } - - public CartGetResponse CartGet(CartGet cartGet) { - System.out.println("CartServiceID: " + this.toString()); - System.out.println("Entering cartGet..."); - CartGetResponse cartGetResponse = new CartGetResponse(); - - //CartGetRequest cartGetRequest = cartGet.getRequest().get(0); - - //Cart cart = getCart(cartGetRequest.getCartId()); - Cart cart = getCart(cartGet.getAWSAccessKeyId()); - if(cart == null){ - cartGetResponse.getCart().add(new Cart()); - return cartGetResponse; - } - - cartGetResponse.getCart().add(cart); - System.out.println("Exiting cartGet..."); - return cartGetResponse; - } - - public CartModifyResponse CartModify(CartModify cartModify) { - // TODO Auto-generated method stub - return null; - } - - private synchronized String generateID(){ - ID++; - return String.valueOf(ID); - } - - - private Cart getCart(String cartId){ - Cart cart = null; - System.out.println(this.cartsHash.toString()); - cart = this.cartsHash.get(cartId); - return cart; - } - - private void addCart(String cartId, Cart cart){ - this.cartsHash.put(cartId, cart); - } -/* - public void start() { - System.out.println("Start CartService..."); - } - - public void stop() { - System.out.println("Stop CartService..."); - } -*/ -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/services/proxy/ShoppingStoreService.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/services/proxy/ShoppingStoreService.java deleted file mode 100644 index 207125ac75..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/services/proxy/ShoppingStoreService.java +++ /dev/null @@ -1,30 +0,0 @@ -package shoppingstore.services.proxy; - -import org.osoa.sca.annotations.Remotable; - -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartAdd; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartAddResponse; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartClear; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartClearResponse; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartCreate; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartCreateResponse; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartGet; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartGetResponse; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartModify; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartModifyResponse; - - -@Remotable -public interface ShoppingStoreService{ - - public CartCreateResponse CartCreate(CartCreate cartCreate); - - public CartAddResponse CartAdd(CartAdd cartAdd); - - public CartModifyResponse CartModify(CartModify cartModify); - - public CartClearResponse CartClear(CartClear cartClear); - - public CartGetResponse CartGet(CartGet cartGet); - -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/services/proxy/ShoppingStoreServiceImpl.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/services/proxy/ShoppingStoreServiceImpl.java deleted file mode 100644 index 8a73631cbb..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/java/shoppingstore/services/proxy/ShoppingStoreServiceImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -package shoppingstore.services.proxy; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -import shoppingstore.services.cart.CartService; - -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartAddResponse; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartClearResponse; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartCreateResponse; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartGetResponse; -import com.amazon.webservices.awsecommerceservice._2007_05_14.CartModifyResponse; - -@Scope("COMPOSITE") -public class ShoppingStoreServiceImpl implements ShoppingStoreService { - - private CartService cartService; - - @Reference - public void setCartService(CartService cartService) { - this.cartService = cartService; - } - - public CartAddResponse CartAdd( - com.amazon.webservices.awsecommerceservice._2007_05_14.CartAdd cartAdd) { - return cartService.CartAdd(cartAdd); - } - - public CartClearResponse CartClear( - com.amazon.webservices.awsecommerceservice._2007_05_14.CartClear cartClear) { - return cartService.CartClear(cartClear); - } - - public CartCreateResponse CartCreate( - com.amazon.webservices.awsecommerceservice._2007_05_14.CartCreate cartCreate) { - return cartService.CartCreate(cartCreate); - } - - public CartGetResponse CartGet( - com.amazon.webservices.awsecommerceservice._2007_05_14.CartGet cartGet) { - return cartService.CartGet(cartGet); - } - - public CartModifyResponse CartModify( - com.amazon.webservices.awsecommerceservice._2007_05_14.CartModify cartModify) { - return cartService.CartModify(cartModify); - } - -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/resources/shoppingstore.composite b/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/resources/shoppingstore.composite deleted file mode 100644 index f03ce10d3b..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/resources/shoppingstore.composite +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/resources/wsdl/shoppingstore.wsdl b/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/resources/wsdl/shoppingstore.wsdl deleted file mode 100644 index 22eba787c6..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/cart-amazon/src/main/resources/wsdl/shoppingstore.wsdl +++ /dev/null @@ -1,3023 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/pom.xml b/branches/sca-android/tutorials/store/www-services/catalog-amazon/pom.xml deleted file mode 100644 index c333abafd3..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/pom.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-catalog-amazon - jar - Apache Tuscany SCA Store Tutorial Amazon Catalog - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-databinding-saxon - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-xquery - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - - diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/CatalogClient.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/CatalogClient.java deleted file mode 100644 index de67e597ac..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/CatalogClient.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package catalog; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program to invoke the Mortgage LoanApproval service - */ -public class CatalogClient { - - public static void main(String[] args) throws Exception { - System.err.println("Please make sure you have the ids configured in catalog.composite"); - SCADomain domain = SCADomain.newInstance("catalog.composite"); - CatalogService ebay = domain.getService(CatalogService.class, "EBayCatalogService"); - ebay.get(); - CatalogService amazon = domain.getService(CatalogService.class, "AmazonCatalogService"); - amazon.get(); - - } -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/CatalogService.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/CatalogService.java deleted file mode 100644 index c5db53621c..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/CatalogService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package catalog; - - -/** - * @version $Rev$ $Date$ - */ -public interface CatalogService { - String[] get(); -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/amazon/AmazonCatalogService.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/amazon/AmazonCatalogService.java deleted file mode 100644 index ce66396582..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/amazon/AmazonCatalogService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package catalog.amazon; - -import org.apache.tuscany.sca.databinding.annotation.DataBinding; -import org.osoa.sca.annotations.Remotable; -import org.w3c.dom.Node; - -@Remotable -@DataBinding(value="org.w3c.dom.Node", wrapped=true) -public interface AmazonCatalogService { - Node ItemSearch(Node requestWrapper); - -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/amazon/AmazonCatalogServiceImpl.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/amazon/AmazonCatalogServiceImpl.java deleted file mode 100644 index 2c56a37601..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/amazon/AmazonCatalogServiceImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package catalog.amazon; - -import java.util.HashMap; -import java.util.Map; - -import org.apache.tuscany.sca.databinding.impl.DOMHelper; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -import catalog.CatalogService; -import catalog.util.XPathHelper; - -/** - * @version $Rev$ $Date$ - */ -@Service(CatalogService.class) -public class AmazonCatalogServiceImpl implements CatalogService { - private static final String AMAZON_TNS = "http://webservices.amazon.com/AWSECommerceService/2007-09-21"; - - @Reference(name = "amazonFindItems") - protected AmazonCatalogService itemSearch; - - @Property(name="AWSAccessKeyId", required=true) - protected String accessKeyId; - - private Node amazonItemSearch(String keywords) throws Exception { - Document doc = DOMHelper.newDocument(); - Element wrapper = doc.createElementNS(AMAZON_TNS, "ItemSearch"); - doc.appendChild(wrapper); - Element key = doc.createElementNS(AMAZON_TNS, "AWSAccessKeyId"); - key.appendChild(doc.createTextNode(accessKeyId)); - wrapper.appendChild(key); - - Element request = doc.createElementNS(AMAZON_TNS, "Request"); - wrapper.appendChild(request); - - Element keywordsElement = doc.createElementNS(AMAZON_TNS, "Keywords"); - keywordsElement.appendChild(doc.createTextNode(keywords)); - request.appendChild(keywordsElement); - - Element searchIndex = doc.createElementNS(AMAZON_TNS, "SearchIndex"); - searchIndex.appendChild(doc.createTextNode("All")); - request.appendChild(searchIndex); - - // System.out.println(new Node2String().transform(doc, null)); - Node result = itemSearch.ItemSearch(doc); - return result; - } - - public String[] get() { - try { - Node list = amazonItemSearch("Fruit"); - Map map = new HashMap(); - map.put("a", AMAZON_TNS); - NodeList nodes = - XPathHelper.selectNodes("//a:Item/a:ItemAttributes[a:ProductGroup='Grocery']/a:Title", list, map); - String titles[] = new String[nodes.getLength()]; - System.out.println("Amazon catalog:"); - for (int i = 0; i < nodes.getLength(); i++) { - titles[i] = nodes.item(i).getTextContent(); - System.out.println("[" + i + "]" + titles[i]); - } - - return titles; - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/ebay/EBayCatalogService.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/ebay/EBayCatalogService.java deleted file mode 100644 index 5aeaabdbf3..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/ebay/EBayCatalogService.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package catalog.ebay; - -import org.osoa.sca.annotations.Remotable; -import org.w3c.dom.Node; - -/** - * @version $Rev$ $Date$ - */ -@Remotable -public interface EBayCatalogService { - Node FindItems(Node request); - Node GetUserProfile(Node request); -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/ebay/EBayCatalogServiceImpl.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/ebay/EBayCatalogServiceImpl.java deleted file mode 100644 index dc69816c27..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/ebay/EBayCatalogServiceImpl.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package catalog.ebay; - -import java.util.HashMap; -import java.util.Map; - -import org.apache.tuscany.sca.databinding.impl.DOMHelper; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -import catalog.CatalogService; -import catalog.util.XPathHelper; - -/** - * @version $Rev$ $Date$ - */ -@Service(CatalogService.class) -public class EBayCatalogServiceImpl implements CatalogService { - private static final String EBAY_TNS = "urn:ebay:apis:eBLBaseComponents"; - - @Reference(name = "eBayFindItems") - protected EBayCatalogService findItems; - - @Reference(name = "eBayGetUserProfile") - protected EBayCatalogService getUserProfile; - - private Node eBayFindItems(String keywords, int maxEntries) throws Exception { - Document doc = DOMHelper.newDocument(); - Element request = doc.createElementNS(EBAY_TNS, "FindItemsRequest"); - doc.appendChild(request); - Element keywordsElement = doc.createElementNS(EBAY_TNS, "QueryKeywords"); - keywordsElement.appendChild(doc.createTextNode(keywords)); - Element maxEntriesElement = doc.createElementNS(EBAY_TNS, "MaxEntries"); - maxEntriesElement.appendChild(doc.createTextNode(String.valueOf(maxEntries))); - Element messageIDElement = doc.createElementNS(EBAY_TNS, "MessageID"); - messageIDElement.appendChild(doc.createTextNode("001")); - request.appendChild(maxEntriesElement); - request.appendChild(keywordsElement); - request.appendChild(messageIDElement); - // System.out.println(new Node2String().transform(doc, null)); - Node result = findItems.FindItems(doc); - return result; - } - - private Node eBayGetUserProfile(String userID) throws Exception { - Document doc = DOMHelper.newDocument(); - Element req = doc.createElementNS(EBAY_TNS, "GetUserProfileRequest"); - doc.appendChild(req); - Element user = doc.createElementNS(EBAY_TNS, "UserID"); - user.appendChild(doc.createTextNode(userID)); - Element msgID = doc.createElementNS(EBAY_TNS, "MessageID"); - msgID.appendChild(doc.createTextNode("001")); - req.appendChild(user); - // System.out.println(new Node2String().transform(doc, null)); - Node result = getUserProfile.GetUserProfile(doc); - return result; - } - - public String[] get() { - try { - Node items = eBayFindItems("Fruit", 10); - Map map = new HashMap(); - map.put("e", EBAY_TNS); - NodeList nodes = XPathHelper.selectNodes("//e:Item/e:Title", items, map); - String[] titles = new String[nodes.getLength()]; - System.out.println("eBay catalog:"); - for (int i = 0; i < nodes.getLength(); i++) { - titles[i] = nodes.item(i).getTextContent(); - System.out.println("[" + i + "]" + titles[i]); - } - return titles; - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/util/NamespaceContextImpl.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/util/NamespaceContextImpl.java deleted file mode 100644 index dcd14f5530..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/util/NamespaceContextImpl.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package catalog.util; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import javax.xml.namespace.NamespaceContext; - -public class NamespaceContextImpl implements NamespaceContext { - private NamespaceContext parent; - private Map map = new HashMap(); - - /** - * @param parent - */ - public NamespaceContextImpl(NamespaceContext parent, Map map) { - super(); - this.parent = parent; - if (parent == null) { - this.map.put("xml", "http://www.w3.org/XML/1998/namespace"); - this.map.put("xmlns", "http://www.w3.org/2000/xmlns/"); - } - if (map != null) { - this.map.putAll(map); - } - } - - public String getNamespaceURI(String prefix) { - if (prefix == null) { - throw new IllegalArgumentException("Prefix is null"); - } - - String ns = (String)map.get(prefix); - if (ns != null) { - return ns; - } - if (parent != null) { - return parent.getNamespaceURI(prefix); - } - return null; - } - - public String getPrefix(String nsURI) { - if (nsURI == null) - throw new IllegalArgumentException("Namespace is null"); - for (Iterator> i = map.entrySet().iterator(); i.hasNext();) { - Map.Entry entry = i.next(); - if (entry.getValue().equals(nsURI)) { - return entry.getKey(); - } - } - if (parent != null) { - return parent.getPrefix(nsURI); - } - return null; - } - - public Iterator getPrefixes(String nsURI) { - List prefixList = new ArrayList(); - for (Iterator> i = map.entrySet().iterator(); i.hasNext();) { - Map.Entry entry = i.next(); - if (entry.getValue().equals(nsURI)) { - prefixList.add(entry.getKey()); - } - } - final Iterator currentIterator = prefixList.iterator(); - final Iterator parentIterator = parent != null ? null : parent.getPrefixes(nsURI); - return new Iterator() { - - public boolean hasNext() { - return currentIterator.hasNext() || (parentIterator != null && parentIterator.hasNext()); - } - - public Object next() { - if (!hasNext()) { - throw new IllegalStateException("End of iterator has reached"); - } - return currentIterator.hasNext() ? currentIterator.next() : parentIterator.next(); - } - - public void remove() { - throw new UnsupportedOperationException(); - } - - }; - - } - - public void register(String prefix, String ns) { - map.put(prefix, ns); - } - - public NamespaceContext getParent() { - return parent; - } - - public String toString() { - StringBuffer sb = new StringBuffer(map.toString()); - if (parent != null) { - sb.append("\nParent: "); - sb.append(parent); - } - return sb.toString(); - } -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/util/XPathHelper.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/util/XPathHelper.java deleted file mode 100644 index 850ba7d8ae..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/java/catalog/util/XPathHelper.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package catalog.util; - -import java.util.Map; - -import javax.xml.xpath.XPath; -import javax.xml.xpath.XPathConstants; -import javax.xml.xpath.XPathExpression; -import javax.xml.xpath.XPathExpressionException; -import javax.xml.xpath.XPathFactory; - -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -/** - * @version $Rev$ $Date$ - */ -public class XPathHelper { - - public static Node selectNode(String xpath, Node root, Map namespaces) - throws XPathExpressionException { - XPath path = XPathFactory.newInstance().newXPath(); - NamespaceContextImpl context = new NamespaceContextImpl(null, namespaces); - path.setNamespaceContext(context); - XPathExpression exp = path.compile(xpath); - return (Node)exp.evaluate(root, XPathConstants.NODE); - } - - public static NodeList selectNodes(String xpath, Node root, Map namespaces) - throws XPathExpressionException { - XPath path = XPathFactory.newInstance().newXPath(); - NamespaceContextImpl context = new NamespaceContextImpl(null, namespaces); - path.setNamespaceContext(context); - XPathExpression exp = path.compile(xpath); - return (NodeList)exp.evaluate(root, XPathConstants.NODESET); - } -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/resources/catalog.composite b/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/resources/catalog.composite deleted file mode 100644 index d8105b7465..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/resources/catalog.composite +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - [Your Amazon Web Service Access Key Id] - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/resources/wsdl/AWSECommerceService.wsdl b/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/resources/wsdl/AWSECommerceService.wsdl deleted file mode 100644 index 55514fff7a..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/resources/wsdl/AWSECommerceService.wsdl +++ /dev/null @@ -1,3244 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - public - partner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - public - partner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - public - partner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - public - partner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - public - partner - - - - - - - - - public - partner - - - - - - - - - - - - - - - - - - - - public - - - - - - - - - - - - - - public - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - public - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - public - partner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/resources/wsdl/ShoppingService.wsdl b/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/resources/wsdl/ShoppingService.wsdl deleted file mode 100644 index 0a4871ca88..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/src/main/resources/wsdl/ShoppingService.wsdl +++ /dev/null @@ -1,12607 +0,0 @@ - - - - - - - - - - - - - - Base type definition of the request payload, which can carry any type - of payload content plus optional versioning information and detail level requirements. - All concrete request types are derived from the abstract request type. - The naming convention we use for the concrete type names is the name of the service - (the verb or call name) followed by "RequestType": VerbNameRequestType - - - - - - - If you pass a value in MessageID in a request, - we'll return the same value in CorrelationID in the response. - If you're making a lot of calls, you can use this for tracking that a - response is returned for every request and to match - particular responses to particular requests. (In this case, specify - a different value for each request.) You can specify any value - that is useful to you. - - - - - - No - - - - - - - - - - - - Base type definition of a response payload that can carry any - type of payload content with following optional elements:<br> - - timestamp of response message<br> - - application-level acknowledgement<br> - - application-level (business-level) errors and warnings - - - - - - - This value represents the date and time when eBay processed the - request. The time zone of this value is <a href="types/simpleTypes.html#dateTime">GMT</a> - and the format is the - ISO 8601 date and time format (YYYY-MM-DDTHH:MM:SS.SSSZ). - See the "dateTime" type for information about this - time format and converting to and from the GMT time zone. - - - - - Always - - - - - - - - Indiates whether the call was successfully processed by eBay. - - - - - Always - PartialFailure - - - - - - - - A list of application-level errors or warnings (if any) that were raised - when eBay processed the request. <br> - <br> - Application-level errors occur due to - problems with business-level data on the client side or on the eBay - server side. For example, an error would occur if the request contains - an invalid combination of fields, or it is missing a required field, - or the value of the field is not recognized. An error could also occur - if eBay encountered a problem in our internal business logic while - processing the request.<br> - <br> - Only returned if there were warnings or errors. - - - - - Conditionally - - - - - - - - This refers to the particular software build that eBay used when - processing the request and generating the response. This includes the - version number plus additional information. eBay Developer Support may - request the build information when helping you resolve technical issues. - - - - - Always - - - - - - - - The release version that eBay used to process the request. - <br> - <br> - <span class="tablenote"><b>Note:</b> - This is usually the latest release version, as specified in the - release notes. (eBay releases the API to international sites - about a week after we release it to the US site.) </span><br> - <br> - If a field in the response returns the token "CustomCode", it usually - means that the field is a code type (a token or enumeration), - and that in your request URL (or HTTP header) you specified a - version that is older than the version in which the token was added - to the call. - - - - - Always - - - eBay Versioning Strategy - http://developer.ebay.com/DevZone/XML/docs/HowTo/eBayWS/eBaySchemaVersioning.html - - - - - - - - If you pass a value in MessageID in a request, we will return the same - value in CorrelationID in the response. You can use this for tracking - that a response is returned for every request and to match particular - responses to particular requests. Only returned if MessageID was used. - - - - - Conditionally - - - - - - - - - - - - AckCodeType - Type declaration to be used by other schema. This code identifies - the acknowledgement code types that eBay could use to communicate the status of - processing a (request) message to an application. This code would be used as part - of a response message that contains an application-level acknowledgement element. - - - - - - - (out) Request processing succeeded - - - - - - - (out) Request processing failed - - - - - - - (out) Request processing completed with warning information - being included in the response message - - - - - - - (out) Request processing completed with some failures. - See the Errors data to determine which portions of the request failed. - - - - - - - (out) Reserved for internal or future use. - - - - - - - - - - - - - - - - An error has occurred either as a result of a problem in the sending application or because - the application's end-user has attempted to submit invalid data (or missing data). - In these cases, do not retry the request. The problem must be corrected before the request - can be made again. If the problem is due to something in the application (such as a missing - required field), the application must be changed. If the problem is a result of end-user data, - the application must alert the end-user to the problem and provide the means for the end-user - to correct the data. Once the problem in the application or data is resolved, resend the request to eBay - with the corrected data. - - - - - - - Indicates that an error has occurred on the eBay system side, such as a database or server down. - An application can retry the request as-is a reasonable number of times (eBay recommends twice). - If the error persists, contact Developer Technical Support. Once the problem has been resolved, - the request may be resent in its original form. - - - - - - - (out) Reserved for internal or future use. - - - - - - - - - - A variable that contains specific information about the context of this error. - For example, if you pass in an attribute set ID that does not match - the specified category, the attribute set ID might be returned as an error parameter. - Use error parameters to flag fields that users need to correct. - Also use error parameters to distinguish between errors when multiple - errors are returned. - - - - - - - The value of the variable. - - - - - Conditionally - - - - - - - - - - The index of the parameter in the error. - - - - - Conditionally - - - - - - - - - - These are request errors (as opposed to system errors) that occur due to problems - with business-level data (e.g., an invalid combination of arguments) that - the application passed in. - - - - - - - A brief description of the condition that raised the error. - - - - - Conditionally - - - Errors by Number - Errors/ErrorMessages.html - - - - - - - - A more detailed description of the condition that raised the error. - - - - - Conditionally - - - Errors by Number - Errors/ErrorMessages.html - - - - - - - - A unique code that identifies the particular error condition that occurred. - Your application can use error codes as identifiers - in your customized error-handling algorithms. - - - - - Conditionally - - - Errors by Number - Errors/ErrorMessages.html - - - - - - - - This field is not currently in use for eBay Shopping Web Services. - Indicates whether the error message text is intended to be displayed to - an end user or intended only to be parsed by the application. - If true or not present (the default), the message text is intended for the end user. If false, the message text is intended for - the application, and the application should translate the error into a more appropriate message. - - - - - - - - - - - - Indicates whether the error caused the request to fail.<br> - <br> - If the request fails and the source of the problem is within the - application (such as a missing required element), please change the - application before you retry the request. If the problem is due to - end-user input data, please alert the end-user to the problem and - provide the means for them to correct the data. Once the problem in the - application or data is resolved, you can attempt to re-send the request - to eBay.<br> - <br> - If the source of the problem is on eBay's side, you can retry the - request as-is a reasonable number of times (eBay recommends twice). - If the error persists, contact Developer Technical Support. Once the - problem has been resolved, the request may be resent in its original - form.<br> - <br> - When a warning occurs, the error is returned in addition to the business - data. In this case, you do not need to retry the request (as the - original request was successful). However, depending on the cause or - nature of the warning, you might need to contact either the end user or - eBay to effect a long term solution to the problem to prevent it from - reoccurring in the future. - - - - - Conditionally - - - Errors by Number - Errors/ErrorMessages.html - - - Requirements for Error Handling - - http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=ErrorHandlingGuidelines - more information (in the eBay Trading Web Services guide) - - - - - - - - Some warning and error messages return one or more variables that - contain contextual information about the error. This is often the - field or value that triggered the error. - You can usually predict where these will - occur by looking at the "replaceable_value" indicators in our - Errors by Number page. - - - - - Conditionally - - - Errors by Number - Errors/ErrorMessages.html - - - - - - - - API errors are divided between two classes: system errors and request errors. - - - - - Conditionally - - - Errors by Number - Errors/ErrorMessages.html - - - - - - - - - - - - SeverityCodeType - Type declaration to be used by other schema. This code - identifies the severity of an API error. A code indicates whether there is an API- - level error or warning that needs to be communicated to the client. - - - - - - - (out) The request was processed successfully, but something occurred - that may affect your application or the user. For example, eBay may have - changed a value the user sent in. In this case, eBay returns a normal, - successful response and also returns the warning. - - - - - - - (out) The request that triggered the error was not processed - successfully. When a serious application-level error occurs, the error - is returned instead of the business data. - - - - - - - (out) Reserved for internal or future use - - - - - - - - - - - - - Basic type for specifying monetary amounts. A double value (e.g., - 1.00 or 1.0) is meaningful as a monetary amount when accompanied by a - specification of the currency, in which case the value specifies - the amount in that currency. An AmountType expresses both the value - (a double) and the currency. Details such as prices, fees, costs, - and payments are specified as amount types. - - - - - - - - Currency in which the monetary amount is specified. - See CurrencyCodeType for applicable values. - - - INR, CAD, HKD, AUD, CHF, MYR, EUR, PHP, PLN, USD, SGD, SEK, GBP - - GetShippingCosts - Conditionally - - - GetSingleItem - Conditionally - - - FindItems - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: Details
-
- - FindItemsAdvanced - No - -
-
-
-
-
-
- - - - - Applicable to sites that support the Detailed Seller Ratings feature. - The AverageRatingDetailsType contains the average detailed seller ratings in an area. When buyers leave an overall Feedback rating (positive, neutral, or negative) for a seller, they also can leave ratings in four areas: item as described, communication, shipping time, and charges for shipping and handling. Users retrieve detailed ratings as averages of the ratings left by buyers. - - - - - - - The area of a specific average detailed seller rating. - Users retrieve detailed ratings as averages of the ratings left by buyers. - When buyers leave an overall Feedback rating (positive, neutral, or negative) - for a seller, they also can leave ratings in four areas: - item as described, communication, shipping time, and charges for shipping and handling. - - - - GetUserProfile -
IncludeSelector: FeedbackHistory
- Always -
-
-
-
- - - - An average detailed seller rating applying to the area in the corresponding RatingDetail field. - - - - GetUserProfile -
IncludeSelector: FeedbackHistory
- Always -
-
-
-
- - - - The number of detailed seller ratings in the area - in the corresponding RatingDetail field. - - - - GetUserProfile -
IncludeSelector: FeedbackHistory
- Always -
-
-
-
- -
-
- - - - - Identifies payment methods used by a buyer to pay a - seller. On item listings, identifies one of the payment methods - seller will accept for the item. Available payment methods can - differ by site and item. Payment methods are not applicable to eBay - Real Estate ad format listings. - - - - - - - No payment method specified. - For example, no payment methods would be specified for Ad format listings. - - - - - - - Money order/cashiers check. - Not applicable to US/CA eBay Motors listings. - - - - - - - American Express. - Not applicable to US/CA eBay Motors listings. - - - - - - - Payment instructions are contained in the item's description. - - - - - - - Credit card. - Not applicable to Real Estate or US/CA eBay Motors listings. - - - - - - - Personal check. - - - - - - - Cash on delivery. - Only applicable to the following eBay sites: AT (16), BEFR (24), - BENL (123), CH (193), DE (77), ES (186), FR (71), HK (201), IN (203), - IT (101), PL (212), and SG (216). - Not applicable to Real Estate listings. - - - - - - - Visa/Mastercard. These qualify as safe payment methods. - Not applicable to US/CA eBay Motors listings. - - - - - - - PaisaPay (for India site only). This qualifies as a safe payment method. - - - - - - - Other forms of payment. - Not applicable to US/CA eBay Motors listings - (see PaymentSeeDescription instead). - - - - - - - PayPal is accepted as a payment method. This qualifies as a safe payment method. <br> - <br> - If PayPal is specified for US/CA eBay Motors vehicles, it is for - the vehicle deposit (not for purchasing the vehicle). - - - - - - - Discover card. - Not applicable to US/CA eBay Motors listings. - - - - - - - Payment on delivery. - Not applicable to Real Estate or US/CA eBay Motors listings. - - - - - - - Direct transfer of money. - Not applicable to US/CA eBay Motors listings. - - - - - - - If the seller has bank account information on file, and - MoneyXferAcceptedInCheckout = true, then the bank account - information will be displayed in Checkout. - - - - - - - All other online payments. - Not applicable to US/CA eBay Motors listings. - - - - - - - Deprecated. - - - - - - - Deprecated. - - - - - - - Deprecated. - - - - - - - Deprecated. - - - - - - - Placeholder value. See - <a href="types/simpleTypes.html#token">token</a>. - - - - - - - Loan check option (applicable only to the US eBay Motors site, - except in the Parts and Accessories category, and the eBay Canada site for motors). - - - - - - - Cash-in-person option. Applicable only to US and Canada eBay Motors vehicles, - (not the Parts and Accessories category). - - - - - - - Elektronisches Lastschriftverfahren (direct debit). - Only applicable to Express Germany. - - - - - - - - - - Information about zero or more buying guides and the site's buying guide hub. - Buying guides contain content about particular product areas, categories, or subjects - to help buyers decide which type of item to purchase based on their particular interests. - Multiple buying guides can be returned. See the eBay Web Services Guide for additional information. - - - - - - - Information that identifies a buying guide. A buying guide contains content about particular - product areas, categories, or subjects to help buyers decide which type of item - to purchase based on their particular interests. - Buying guides are useful to buyers who do not have a specific product in mind. - For example, a digital camera buying guide could help a buyer determine what kind of - digital camera is right for them. - - - - FindReviewsAndGuides - Conditionally - - - - - - - - URL of the buying guide home page for the site being searched. - Your application can present this URL as a link. Optionally, - you can use a value like "See all buying guides" as the link's - display name. - - - - FindReviewsAndGuides - Always - - - - - - - - - - - - Information that identifies a buying guide. A buying guide provides content about particular - product areas, categories, or subjects to help buyers decide which type of item - to purchase based on their particular interests. - Buying guides are useful to buyers who do not have a specific product in mind. - For example, a digital camera buying guide could help a buyer determine what kind of - digital camera is right for them. - - - - - - - Display name of the buying guide. <br> - <br> - FindReviewsAndGuides only returns 20 characters, followed by "..." if the name is - longer than 20 characters. For the full title, see BuyingGuide.Title - instead. - - - - FindReviewsAndGuides - Conditionally - - - - - - - - URL for the buying guide. Your application can - present this as a link. Use the value of Name or Title as the link's display name. - - - - FindReviewsAndGuides - Conditionally - - - - - - - - Identifies the category (if any) that is associated - with the buying guide. For FindReviewsAndGuides, this can be a category that is higher or lower in the hierarchy - than the category specified in the request. For a matching categories search, - you can use this information to determine the order that the buying guides are - returned in when multiple guides are found. - Optionally, you can use this information to determine where to present - the buying guide link in your application. - - - 10 - - FindReviewsAndGuides - Conditionally - - - - - - - - The title of the buying guide. - - - - 55 - FindReviewsAndGuides - Conditionally - - - - - - - - The text of the guide. If the guide is longer than - 2000 characters, the text is cut off and it ends with "...". - See BuyingGuide.URL for a link to the full text of the review. - - - - 2000 - FindReviewsAndGuides - Conditionally - - - - - - - - The time and date when the guide was posted. - - - - FindReviewsAndGuides - Conditionally - - - - - - - - The author's eBay user ID. - - - - FindReviewsAndGuides - Conditionally - - - - - - - - - - - - Information about an eBay catalog product. - - - - - - - The name of the domain in which the product was found. - If the product is mapped to multiple domains, eBay returns - the most applicable domain (as determined by eBay). - Always returned when Product is returned. - - - - FindProducts - Conditionally -
IncludeSelector: none, Items, DomainHistogram, Details
-
-
-
-
- - - - Fully qualified URL for optional information about the product, - such as a movie's description or film credits. This information - is hosted through the eBay Web site and it cannot be edited. - Portions of the content are protected by copyright. - Applications can include this URL as a link in product search results - so that end users can view additional descriptive details about - the product. This is usually always returned when Product is returned, - but it may be safest to check for the existence of this field. - - - - FindProducts - Conditionally -
IncludeSelector: none, Items, DomainHistogram, Details
-
-
-
-
- - - - If true, your application can attempt to display stock photos that - are returned. If false, your application should not attempt to display - any stock photos that are returned. This recommendation is useful for - catalog data related to products like coins, where stock photos are not - necessarily applicable or available. An application with a graphical - user interface can use this flag to determine - when to hide customized stock photo widgets. - Always returned when Product is returned. - - - - FindProducts - Conditionally -
IncludeSelector: none, Items, DomainHistogram, Details
-
-
-
-
- - - - The eBay or external IDs associated with the product. Use the Reference - value as input to search for the same product in the future, or - use the ISBN, EAN, or UPC value (if returned). - The ISBN, EAN, and UPC values can also be useful as keys - if your application is comparing products across different sites. - Always returned when Product is returned. - - - - FindProducts - Conditionally -
IncludeSelector: none, Items, DomainHistogram, Details
-
-
-
-
- - - - Total number of listings on the requested eBay site that use - stock information from this catalog product. This value can be greater - than the number of listings returned in ItemArray. To retrieve more - listings, use FindItemsAdvanced. - Only returned when you search by ProductID (and you pass - Items or Details in IncludeSelector). - - - 0 - - - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - A list of name/value pairs that are included in the product's - pre-filled Item Specifics. These indicate common aspects or - characteristics of the product, such as Publisher (for a book). - Also see ProductID for ISBN, UPC, or EAN values, if applicable. - This is usually returned. (We are not aware of any cases in which this - node is not be returned. However, it may be safest to check for the - existence of this node.) - - - - FindProducts - Conditionally -
IncludeSelector: none, Items, DomainHistogram, Details
-
-
-
-
- - - - The total number of reviews that are available for this product - on the eBay Web site. This can be greater than the number of - reviews returned by FindProducts. In a future release, we will provide - the capability to retrieve details about reviews. - Always returned when Product is returned. - - - - FindProducts - Conditionally -
IncludeSelector: none, Items, DomainHistogram, Details
- 0 - -
-
-
-
- - - - Fully qualified URL for a stock image (if any) that is associated - with the eBay catalog product. The URL is for the image eBay - usually displays in product search results (usually 70px tall). - It may be helpful to calculate the dimensions of the photo - programmatically before displaying it. - Only returned if a URL is available for the product. - - - - FindProducts - Conditionally -
IncludeSelector: none, Items, DomainHistogram, Details
-
-
-
-
- - - - The title of the product, as specified in the catalog. - Always returned when Product is returned. - - - - FindProducts - Conditionally -
IncludeSelector: none, Items, DomainHistogram, Details
-
-
-
-
- -
-
- - - - - Container for a list of categories. - - - - - - - Contains details about a category. - - - - FindItemsAdvanced -
IncludeSelector: CategoryHistogram
- Conditionally -
- - GetCategoryInfo -
IncludeSelector: ChildCategories
- Always -
-
-
-
-
-
- - - - - Contains details about a category. - - - - - - - The numeric ID of a category on eBay. - <br> - <br> - Use an ID of -1 to retrieve the root category and the top-level (level 1) meta categories. You can determine other CategoryIDs from the response from this call, or from a specific item (retrieved from another call like FindItemsAdvanced or GetSingleItem), or from the eBay website. - - - - FindItemsAdvanced -
IncludeSelector: CategoryHistogram
- Conditionally -
- - GetCategoryInfo -
IncludeSelector: None, ChildCategories
- Always -
-
-
-
- - - - The level where the category fits in the site's category hierarchy. - For example, if this field has a value of 2, then the category is 2 - levels below the root category. - <br> - <br> - Note that the value of CategoryLevel will always be 1 level below the level - of the requested category. To retrieve a category's children, pass its CategoryID back into the request. - <br> - <br> - In the FindItemsAdvanced response, ItemCount indicates the total - quantity of matching items in the category. - <br> - <br> - In the FindItemsAdvanced response, sibling categories - (i.e., matching categories at the same level) are sorted by ItemCount, - descending order. - - - - FindItemsAdvanced -
IncludeSelector: CategoryHistogram
- Conditionally -
- - GetCategoryInfo -
IncludeSelector: None, ChildCategories
- Always -
-
-
-
- - - - Display name of the category as it would appear on - the eBay Web site. - - - - FindItemsAdvanced -
IncludeSelector: CategoryHistogram
- Conditionally -
- - GetCategoryInfo -
IncludeSelector: None, ChildCategories
- Always -
-
-
-
- - - - Category ID identifying a category that is an ancestor of - the category indicated in CategoryID. - - - - FindItemsAdvanced -
IncludeSelector: CategoryHistogram
- Conditionally -
- - GetCategoryInfo -
IncludeSelector: None, ChildCategories
- Always -
-
-
-
- - - - Display name of the category indicated in CategoryParentID. - - - - FindItemsAdvanced -
IncludeSelector: CategoryHistogram
- Conditionally -
- - GetCategoryInfo -
IncludeSelector: None, ChildCategories
- Conditionally -
-
-
-
- - - - The total quantity of matching items in the category. - In the FindItemsAdvanced response, matching categories at the same level - (i.e., sibling categories) are sorted by ItemCount. That is, if the request - specifies that fewer categories or subcategories should be returned, - the ones with the most matching items are returned first. - - - - FindItemsAdvanced -
IncludeSelector: CategoryHistogram
- Conditionally -
-
-
-
- - - - The fully qualified category display name as it would appear on the - eBay site (e.g., Home & Garden:Kitchen:Tools & Gadgets). - - - - GetCategoryInfo -
IncludeSelector: None, ChildCategories
- Always -
-
-
-
- - - - The fully qualified category ID (e.g., 11700:20625:20635 for Home & Garden:Kitchen:Tools & Gadgets). - - - - GetCategoryInfo -
IncludeSelector: None, ChildCategories
- Always -
-
-
-
- - - - If true, indicates that the category indicated in CategoryID is a leaf category, in which items may be listed (if the category is not also - expired or virtual). - - - - GetCategoryInfo -
IncludeSelector: None, ChildCategories
- Always -
-
-
-
- -
-
- - - - - CharityStatusCodeType - Type declaration to be used by other schema. - Indicates the nonprofit status of the nonprofit charity organization registered with the dedicated eBay Giving Works provider. - - - - - - - (out) The specified nonprofit charity organization is a valid nonprofit charity organization according to the requirements of the dedicated eBay Giving Works provider. - - - - - - - (out) The specified nonprofit charity organization is no longer a valid nonprofit charity organization according to the requirements of the dedicated eBay Giving Works provider. - - - - - - - (out) Reserved for internal or future use. - - - - - - - - - - Identifies a Giving Works listing and benefiting nonprofit charity organization. - Currently supported through the US and eBay Motors sites only. The Ad Format and - Mature Audiences categories are not supported. - Not applicable for US eBay Motors, international, Real Estate, and Tickets. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
- - - - - A unique identification number assigned by eBay to - registered nonprofit charity organizations. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - The name of the benefiting nonprofit charity organization selected by the - charity seller. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - A unique identification number assigned to a nonprofit - charity organization by the dedicated provider of - eBay Giving Works. Being superseded by CharityID. Max 10 - digits. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - The percentage of the purchase price that the - seller chooses to donate to the selected nonprofit - organization. This percentage is displayed in the Giving - Works item listing. Possible values: 10.0 to 100.0. - Percentages must increment by 5.0. Minimum donation - percentages may be required for Giving Works listings, see - http://pages.ebay.com/help/sell/selling-nonprofit.html for - details. DonationPercent is required input when listing - Giving Works items. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - The stated mission of the nonprofit charity - organization. This mission is displayed in the Giving Works - item listing. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - The URL of the nonprofit charity organization. This - URL is displayed in the Giving Works item listing. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - If true, indicates that the seller has chosen to use - eBay Giving Works to donate a percentage of the item's - purchase price to a selected nonprofit organization. - - - - - - - - - - - The status of the nonprofit charity organization. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- -
-
- - - - - CommentTypeCodeType - Type declaration to be used by other schema. - These are the possible codes to specify the types of feedback/comment. - Additional information about feedback is available in the online Help of the eBay site. - - - - - - - (in/out) Positive feedback. Increases total feedback score. - - - - - - - (in/out) Neutral feedback. No effect on total feedback score. - - - - - - - (in/out) Negative feedback. Decreases total feedback score. - - - - - - - (out) Withdrawn feedback. Removes the effect of the original - feedback on total feedback score. Comments from withdrawn feedback - are still visible. - - - - - - - (out) Applies to the eBay Motors site only. Feedback is withdrawn based on - the decision of a third party. - - - - - - - (out) Reserved for internal or future use. - - - - - - - - - - Defines the standard 2-letter ISO 3166 country code set, plus - some additional country codes that eBay uses. - (The additional codes appear at the end of this code list and - are noted as non-ISO.) - For English names that correspond to each code (e.g., KY="Cayman Islands"), - see the ISO site: - http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - French Polynesia. Includes Tahiti. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NOTE: APO/FPO was defined in eBay list previously - but they are not defined in ISO 3166. This country - will remain on eBay country code list for backward - compatibility. - - - - - - - NOTE: Guernsey was defined in eBay list previously - but they are not defined in ISO 3166. This country - will remain on eBay country list for backward - compatibility. - - - - - - - NOTE: Jan Mayen was defined in eBay list previously - but they are not defined in ISO 3166. This country - will remain on eBay country list for backward - compatibility. - - - - - - - NOTE: Jersey was defined in eBay list previously - but they are not defined in ISO 3166. This country - will remain on eBay country list for backward - compatibility. - - - - - - - NOTE: Tahiti was defined in eBay list previously - but they are not defined in ISO 3166. This country - will remain on eBay country list for backward - compatibility. This Code is currently deprecated - - - - - - - Placeholder value. See - <a href="types/simpleTypes.html#token">token</a>. - - - - - - - - - - Defines the standard 3-letter ISO 4217 currency code set. - However, only certain currency codes are currently valid for use on eBay. - The valid codes are documented below with the notation "(in/out)". - Other codes in this list are for future use. - The documentation below specifies English names for each currency. - A reference: http://www.xe.com/iso4217.htm - - - - - - - - - - - - - - - - - - - - - - - - Indian Rupee. - Applicable to listings on the India site (site ID 203). - - - - - - - - - - - - - - - - - Canadian Dollar. - Applicable to listings on the Canada site (site ID 2) - (Items listed on the Canada site can also specify USD.) - - - - - - - - - - - - Chinese Yuan Renminbi. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Hong Kong Dollar. - Applicable to listings on the Hong Kong site (site ID 201). - - - - - - - - - - - - - - - - - - Australian Dollar. - Applicable to listings on the Australia site (site ID 15). - - - - - - - - - - - - - - - - - Swiss Franc. - Applicable to listings on the Switzerland site (site ID 193). - - - - - - - - - - - - Malaysian Ringgit. - Applicable to listings on the Malaysia site (site ID 207). - - - - - - - - - Euro. - Applicable to listings on these site: - Austria (site 16), Belgium_French (site 23), - France (site 71), Germany (site 77), Italy (site 101), Belgium_Dutch (site 123), - Netherlands (site 146), Spain (site 186), Ireland (site 205). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Philippines Peso. - Applicable to listings on the Philippines site (site ID 211). - - - - - - - Poland, Zloty. - Applicable to listings on the Poland site (site ID 212). - - - - - - - US Dollar. - Applicable to listings on the US (site ID 0), eBayMotors (site 100), and Canada (site 2) sites. - - - - - - - - - - - - - - - - - - Singapore Dollar. - Applicable to listings on the Singapore site (site 216). - - - - - - - - - - - - - - - Swedish Krona. - Applicable to listings on the Sweden site (site 218). - - - - - - - - New Taiwan Dollar. - - - - - - - - - - - - - - - - - - - Pound Sterling. - Applicable to listings on the UK site (site ID 3). - - - - - - - - - - - - - - - - - - - - Placeholder value. See - <a href="types/simpleTypes.html#token">token</a>. - - - - - - - - - - - - The item cannot be downloaded. - - - - - - - The item can be downloaded by using a URL. - - - - - - - The item can be downloaded according to instructions specified by the seller. - - - - - - - - - - - Distance, used for a proximity search. - - - - - - - - - - - - - A generic type used for histograms. - - - - - - - Each histogram entry shows how many matching products - were found in each matching domain. A domain is like a high-level - category, or a group of categories whose items share the same basic - product characteristics. - - - - FindHalfProducts - Conditionally -
IncludeSelector: DomainHistogram
-
- - FindProducts - Conditionally -
IncludeSelector: DomainHistogram
-
-
-
-
- -
-
- - - - - Indicates the type of external product ID being used to identify a - stock product. - - - - - - - (in/out) ExternalProductID.Value contains an ISBN value. - Required when you pass an ISBN as the external product ID. - (This value is also applicable to Half.com listings.) - - - - - - - (in/out) ExternalProductID.Value contains a UPC value. - Required when you pass a UPC as the external product ID. - (This value is also applicable to Half.com listings.) - - - - - - - (in) ExternalProductID.Value contains an eBay catalog product ID. - Required when you pass an eBay product ID - as the external product ID. - Not applicable with FindItemsAdvanced, FindItemsAdvancedExpress, or - FindProducts. - - - - - - - ExternalProductID.Value contains an EAN value. - Required when you pass an EAN as the external product ID. - Not applicable with FindItemsAdvancedExpress. - - - - - - - (in) ExternalProductID.Value contains a set of keywords that uniquely identify the product. - Only applicable when listing event ticket. - See the eBay Web Services guide for information about valid - ticket keywords for an external product ID. - Required when you pass a set of keywords as the external product ID. - Not applicable with FindItemsAdvanced, FindItemsAdvancedExpress, or - FindProducts. With FindItemsAdvanced, use TicketFinder instead. - - - - - - - Reserved for future use. - - - - - - - (out) Reserved for internal or future use - - - - - - - - - - Contains an ISBN value, EAN value, UPC value, ticket keywords, or eBay - catalog product ID, plus other meta-data. For event tickets, this type - can contain a set of keywords that uniquely identify the product. Only - applicable to certain categories that support Pre-filled Item - Information. - - - - - - - An industry-standard value that uniquely identifies the product. The - valid values are dictated by the Type property. - Required if Type is specified. - Max length 13 for ISBN (as of February 2007), 13 for EAN, - 12 for UPC, and 4000 for ProductID. No max length for ticket keywords - (but passing too much data can result in "no match found" - errors).<br> - <br> - <b>For AddItem and related calls:</b> - If the primary and secondary categories are both catalog-enabled, - the value must apply to the primary category. - Event tickets listings support a set of keywords - that uniquely identify the listing. The ticket keywords specify the - event name (the title shown on the ticket), venue name, and event - date and time. See the eBay Web Services guide for more information - and validation rules. For convenience, you can pass an eBay product ID - as input (not limited to media categories).<br> - <br> - Required for Half.com listing use cases, and this can only be an - ISBN, UPC, or EAN value.<br> - <br> - <b>For FindItemsAdvanced and FindProducts input only:</b> - Only ISBN, EAN, and UPC values are currently supported as - input.<br> - <br> - <b>For FindItemsAdvancedExpress input only:</b> - To pass an external product ID in the request, use - ExternalProductIDValue and ExternalProductIDType instead.<br> - <br> - <b>For FindItemsAdvancedExpress, FindProducts, and GetSellerPayments - output only:</b> Also see AlternateValue, which is - returned if the catalog defines multiple ISBN values (e.g., one for - ISBN-13 and one for ISBN-10). Please note that some catalogs return ISBN - values that are not 10 or 13 characters, and some values contain - non-alphanumeric symbols (e.g., $). - - - See description - - AddItem - GetItemRecommendations - VerifyAddItem - Item.ExternalProductID - Conditionally - - - - FindProducts - Conditionally - Conditionally - - - FindItemsAdvanced - Conditionally - - - GetSellerPayments - Conditionally - - - FindItemsAdvancedExpress - Conditionally - - - - - - - - Applicable for listing use cases only (not buy-side searching). - Indicates what eBay should do if more than one product matches - the value passed in Value. Only takes effect when more than one - match is found. If true, the response should include an error - and all matching product IDs. If false, the response should include - an error but should not return the matching product IDs. - This field is also applicable when listing Half.com items. - - - - AddItem - GetItemRecommendations - VerifyAddItem - No - Item.ExternalProductID - - - - - - - - - The kind of identifier being used. The choices are listed - For requests, required if Value is specified. - For Half.com listing use cases, only ISBN, UPC, and EAN are supported.<br> - <br> - FindItemsAdvancedExpress returns this value in ProductArray.Product.ExternalProductID.Type. - To pass an external product ID in the request, use ExternalProductIDType and ExternalProductIDValue instead. <br> - <br> - FindProducts supports ISBN, UPC, and EAN. - - - - AddItem - GetItemRecommendations - VerifyAddItem - Item.ExternalProductID - MPN - Conditionally - - - - FindProducts - ISBN, UPC, EAN - Conditionally - Conditionally - - - FindItemsAdvanced - ISBN, UPC, EAN - Conditionally - - - - GetSellerPayments - - ISBN, UPC, EAN - Conditionally - - - FindItemsAdvancedExpress - ISBN, UPC - Conditionally - - (FindItemsAdvancedExpress) ExternalProductIDType - io_FindItemsAdvancedExpress.html#Request.ExternalProductIDType - - - - - - - - - An industry-standard value that provides an alternate identification for - the product, if any. Currently, this only returns an alternate ISBN - value. If the catalog defines both an ISBN-13 and ISBN-10, - then the ISBN-13 is returned in Value and the ISBN-10 is returned in - AlternateValue. (That is, the ISBN-13 is considered to be the preferred - identifier.) If the catalog only defines one ISBN, it is returned in - Value (and AlternateValue is not returned). Please note that some - catalogs return ISBN values that are not 10 or 13 characters, - and some values contain non-alphanumeric symbols (e.g., $). - - - 4000 - - FindProducts - FindItemsAdvancedExpress - GetSellerPayments - Conditionally - - - - - - - - - - - - Detailed feedback information for a user. Conveys the score for the - feedback, the textual comment, and other information. - - - - - - - eBay user ID for the user who left the feedback. - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
- - - - Feedback score of the user in CommentingUser. - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
- - - - Text message left by the user in CommentingUser. Used to provide a more - in-depth description of the user's opinion of the transaction. - Returned as text in the language that the - comment was originally left in. - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
- - - - Date and time (in GMT) that the feedback was submitted to eBay. - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
- - - - Type of feedback. Can be Positive, Neutral, Negative, or Withdrawn (see the - CommentTypeCodeType code list). Positive feedbacks add to the user's total - feedback score, negative feedbacks lower the score, and neutral feedbacks do - not affect the score (but do affect the overall picture of the user's online - reputation). - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
- - - - Textual comment that the user targeted by feedback may leave - in response or rebuttal to the feedback. - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
- - - - Explanation a user can give to a response. - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
- - - - The ID that uniquely identifies the item listing. - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
- - - - Indicates whether the user who was the feedback recipient was a Buyer or the - Seller for that transaction. - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
- - - - Name of the listing for which feedback was provided. - Returned as CDATA. - Not returned if a listing ended more than 90 days ago. - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
- - - - The final price for the item, associated with - the currency identified by the currencyId attribute of the AmountType. - Not returned if a listing ended more than 90 days ago. - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
- - - - Unique identifier for the feedback entry. - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
- - - - Unique identifier for the transaction about which - this feedback entry was left. - This field is not returned in the case of TransactionIDs from Chinese auction listings, - because a value of zero is used for TransactionIDs in such cases. - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
- - - - Indicates whether eBay replaced the comment with a message - that the comment was removed. - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
- - - - Indicates whether eBay replaced the response with a message - that the response was removed. - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
- - - - Indicates whether eBay replaced the follow-up with a message - that the follow-up was removed. - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
- - - - Specifies if a user's feedback score is or is not countable. This field is - returned only when a user's feedback score is not countable (value is false). - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
- -
-
- - - - - Specifies all feedback summary information (except Score). Contains - objects that each convey feedback counts for - positive, negative, neutral, and total feedback counts - for various - time periods each. Also conveys counts of bid retractions for the - predefined time periods. - - - - - - - Bid retractions count, for multiple predefined time periods preceding - the call. - - - - GetUserProfile -
IncludeSelector: FeedbackHistory
- Always -
-
-
-
- - - - Negative feedback entries count, for multiple predefined time periods preceding - the call. - - - - GetUserProfile -
IncludeSelector: FeedbackHistory
- Always -
-
-
-
- - - - Neutral feedback entries count, for multiple predefined time periods preceding - the call. - - - - GetUserProfile -
IncludeSelector: FeedbackHistory
- Always -
-
-
-
- - - - Positive feedback entries count, for multiple predefined time periods - preceding the call. - - - - GetUserProfile -
IncludeSelector: FeedbackHistory
- Always -
-
-
-
- - - - Total feedback score, for multiple predefined time periods preceding the - call. - - - - GetUserProfile -
IncludeSelector: FeedbackHistory
- Always -
-
-
-
- - - - Number of unique negative comments. - - - - GetUserProfile -
IncludeSelector: FeedbackHistory
- Always -
-
-
-
- - - - Number of unique positive comments. - - - - GetUserProfile -
IncludeSelector: FeedbackHistory
- Always -
-
-
-
- - - - Container for information about detailed seller ratings (DSRs) - that buyers have left for a seller. - Sellers have access to the number of ratings they've received, as well as - to the averages of DSRs they've received in each - DSR area (i.e., to the average of ratings in the item-description area, etc.). - - - - GetUserProfile -
IncludeSelector: FeedbackHistory
- Always -
-
-
-
- - - - Number of neutral comments received from suspended users. - - - - GetUserProfile -
IncludeSelector: FeedbackHistory
- Always -
-
-
-
- -
-
- - - - - Contains the data for one type of feedback for one predefined time - period. Parent FeedbackPeriodArrayType object indicates the type of - feedback counted: positive, neutral, negative, or total. - - - - - - - Indicates the time period for the feedback count. Returns a value indicating - the number of days prior to the call for which feedbacks of the particular - type are counted. - - - - GetUserProfile -
IncludeSelector: FeedbackHistory
- Always -
-
-
-
- - - - Count of the feedbacks received by the user for the time period prior to the - call indicated in PeriodInDays. - - - - GetUserProfile -
IncludeSelector: FeedbackHistory
- Always -
-
-
-
- -
-
- - - - - Applicable to sites that support the Detailed Seller Ratings feature. - The FeedbackRatingDetailCodeType is the list of areas for detailed seller ratings. When buyers leave an overall Feedback rating (positive, neutral, or negative) for a seller, they also can leave ratings in four areas: item as described, communication, shipping time, and charges for shipping and handling. Users retrieve detailed ratings as averages of the ratings left by buyers. - - - - - - - Detailed seller rating in the area of "item as described." - - - - - - - Detailed seller rating in the area of "communication." - - - - - - - Detailed seller rating in the area of "shipping time." Inapplicable to - motor vehicle items. - - - - - - - Detailed seller rating in the area of "charges for shipping and handling." - Inapplicable to motor vehicle items. - - - - - - - (out) Reserved for internal or future use. - - - - - - - - - - FeedbackRatingStarCodeType - Type declaration to be used by other - schema. The color of a feedback score star visually denotes the - range in which the member's summary feedback score falls. The score - is the net positive feedback minus the net negative feedback left - for the member. - - - - - - - No graphic displayed, feedback score 0-9. - - - - - - - Yellow Star, feedback score 10-49. - - - - - - - Blue Star, feedback score 50-99. - - - - - - - Turquoise Star, feedback score 100-499. - - - - - - - Purple Star, feedback score 500-999. - - - - - - - Red Star, feedback score 1,000-4,999 - - - - - - - Green Star, feedback score 5,000-9,999. - - - - - - - Yellow Shooting Star, feedback score 10,000-24,999. - - - - - - - Turquoise Shooting Star, feedback score 25,000-49,999. - - - - - - - Purple Shooting Star, feedback score 50,000-99,999. - - - - - - - Red Shooting Star, feedback score 100,000 and above. - - - - - - - Placeholder value. See - <a href="types/simpleTypes.html#token">token</a>. - - - - - - - - - - - Searches Half.com for stock product information (stock description - and Item Specifics), such as information about a particular - kind of DVD or book. Also, retrieves up to 30 Half.com listings associated - with a product. - - - - Searches Half.com for stock product information (stock description - and Item Specifics), such as information about a particular - kind of DVD or book. Also, retrieves up to 30 Half.com listings associated - with a product. - - IncludeSelector - - - - - - - - - Defines standard subsets of fields to return within the - response.<br> - <br> - If you don't specify this field, the call returns a default - set of fields, focusing on product details only - (see the "Detail Controls" link below). If you specify this - field, the additional fields you retrieve can affect the call's - response time (performance).<br> - <br> - <b>Applicable values</b>: - <p class="ename">&bull;&nbsp;&nbsp; Items</p> - <p class="edef">Include a brief set of item fields - in the response. - Only applicable when you are searching by ProductID. - Not applicable with QueryKeywords.</p> - <p class="ename">&bull;&nbsp;&nbsp; DomainHistogram</p> - <p class="edef">Include the DomainHistogram in - the response. The histogram lists the number of matching - products found and the domains in which they were found. - (A domain is like a high-level category.) - When many matching products are found, you may see - significantly slower response times when you include - the histogram.</p> - <br> - <br> - Use a comma to specify multiple values. (In this case, - the results are cumulative.) See "FindHalfProducts Samples" - for an example of how to use this field.<br> - <br> - See "Detail Controls" for a complete list of - fields that can be returned for each selector. - - - - Yes - - FindHalfProducts - No - - - - - - - - If true, only retrieve data for products that have been used to - pre-fill active listings on the Half.com site. - If false, retrieve all products that match the query. - This is useful when you use QueryKeywords and you only want to - find products that have associated items (that is, where ItemArray - would not be empty).<br> - <br> - This does not retrieve ItemArray; this only controls which - products are returned (or counted). To retrieve ItemArray, - pass Items in IncludeSelector. - - - false - - FindHalfProducts - No - - - - - - - - A domain to search in. This is like searching a section of - a catalog. If not specified, the product search is conducted - across all domains. To determine valid domain names, - first use this call with QueryKeywords. Domain names are returned - for each product (and summarized in the domain histogram, if you - specify DomainHistogram in IncludeSelector).<br> - <br> - A domain is a named grouping of categories whose items share - common product characteristics. For example, all bound books - have a binding or format (e.g., Hardcover), but audiobooks don't. - So audiobooks would have their own domain. - To limit your search to audiobooks, you would specify Audiobooks - as the domain.<br> - <br> - Only useful when QueryKeywords is specified. If you use this with - ProductID, AND logic is applied. In this case, if you specify an - ID that doesn't match the domain (as Half.com has defined it), - no matching product will be found. Therefore, we recommend that you only use DomainName with QueryKeywords. - - - - FindHalfProducts - No - - - - - - - - Use this to retrieve product details for one specific product. - Specify the ID as a string, and use the type attribute to - indicate the nature of the ID you are specifying. - <br> - <br> - You can request up to 10 IDs of the same type by separating them with commas, such as - 014633155310,014633145496. - <br> - <br> - The request requires either QueryKeywords or - ProductID, but these fields cannot be used together. - - - 4000 - - FindHalfProducts - Conditionally - - - - - - - - One or more keywords to search for. When you use a keyword search, - Half.com searches the product catalogs for matching words in the - product title, description, and/or Item Specifics, and it returns - a list of matching products, with no items. To retrieve - items, use ProductID instead. (If you don't already have a - product ID, you can get product IDs from the - response after conducting a keyword search.)<br> - <br> - If specified, you must pass in at least 3 alphanumeric characters.<br> - <br> - The words "and" and "or" are treated like any other word. - Only use "and", "or", or "the" if you are searching for products - containing these words. - To use AND or OR logic, use Half.com's standard search string - modifiers. Wildcards (+, -, or *) are also supported. - Be careful when using spaces before or after modifiers and - wildcards.<br> - <br> - Some keyword queries can result in response times of 30 seconds or - longer. If more than 2000 matches are found, the call fails with - an error. If this kind of error occurs, refine the search by - passing in more keywords and/or by using DomainName to restrict - the search to certain domains (such as DVDs). - If you are searching for a particular book, DVD, CD, or video game - and you already know its ISBN or EAN (for a book) or UPC, - consider using ProductID instead to retrieve more - precise results. <br> - <br> - The request requires either QueryKeywords or - ProductID, but these fields cannot be used together. - - - 350 - - FindHalfProducts - Conditionally - - - - - - - - The ID of a specific seller. - Specify this value in combination with ProductID - if you want search results to be filtered so that the items returned - are only items in a specific product, sold by a specific seller. - To specify SellerID, use SellerID and ProductID together. - - - - FindHalfProducts - No - - - - - - - - Sorts the list of products returned. This is mostly only useful - with QueryKeywords. (When you use ExternalProductID or - ProductReferenceID, Half.com usually only returns one product.) - - - Popularity - - FindHalfProducts - No - - - - - - - - Sorts the list of products returned. - - - Descending - - FindHalfProducts - No - - - - - - - - Specifies the maximum number of products to return per page - in a single call. This is mostly only useful - with QueryKeywords. (When you use ProductID, Half.com usually only - returns one product, and up to 30 items for that product.) - - - 1 - 20 - 1 - - FindHalfProducts - No - - - - - - - - Specifies which page of data to return in the current call. - Specify a positive value equal to or lower than the number of - pages available (which you determine by examining the results of - your initial request). - - - 1 - 2000 - 1 - - FindHalfProducts - No - - - - - - - - - - - - - - Returns stock product information in Half.com catalogs, such as - information about a particular DVD or book. Optionally, - also returns items that match the product. - - - - - - - - - A histogram that lists the number of matching products found - and the domains in which they were found. - A <i>domain</i> is essentially - a set of categories that share certain common features - (as determined by Half.com). Each domain has its own name and ID. - - - - FindHalfProducts -
IncludeSelector: DomainHistogram
- Conditionally -
-
-
-
- - - - The number of the page of data returned. If many products - are found and multiple pages of results are available, use - this in combination with ApproximatePages and HasMore to decide - which page to retrieve next. As FindHalfProducts only returns - up to 2000 products, the maximum possible value is theoretically - 2000 (if you were to set EntriesPerPage to 1 in the request). - - - 1 - 2000 - - FindHalfProducts -
IncludeSelector: none, DomainHistogram, Items
- Always -
-
-
-
- - - - The total number of pages that can be returned, given the same - query and filters in the request. As FindHalfProducts only returns - up to 2000 products, the maximum possible value is theoretically - 2000 (if you were to set MaxEntries to 1 in the request). - - - 1 - 2000 - - FindHalfProducts -
IncludeSelector: none, DomainHistogram, Items
- Always -
-
-
-
- - - - If true, more pages of results are available. - That is, PageNumber is less than ApproximatePages. - - - - FindHalfProducts -
IncludeSelector: none, DomainHistogram, Items
- Always -
-
-
-
- - - - The total number of matching products found. - (If more than 2000 products are found, the call fails - with an error.) - - - 0 - 2000 - - FindHalfProducts -
IncludeSelector: none, DomainHistogram, Items
- Always -
-
-
-
- - - - An set of Half.com catalog products. This contains stock information about a - particular DVD, book, or other product. - When you use QueryKeywords in the request, FindHalfProducts returns a - maximum of 20 products per page. - When you use ProductID in the request, FindHalfProducts usually only - returns 1 product. - (If more than one product matches the same ProductID, - FindHalfProducts will return all of those products. As of the time - of this writing, we expect this to be a rare case.) - - - 20 - - FindHalfProducts -
IncludeSelector: none, DomainHistogram, Items
- Always -
-
-
-
-
-
-
-
- - - - - - Searches for items based on a variety of input fields. - Enables you to specify what item data is returned. - Returns detailed information about items. - - - - Searching for Items by Using a Query - - http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=SearchingItemsWithQuery - related information (applies primarily to the eBay Trading API) - - - Searching for Matching Categories - - http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=SearchingForMatchingCategories - information about finding listings in categories (applies primarily to the eBay Trading API) - - - Searches for items based on many possible input fields. Detailed information is returned about items. - - FindItems, GetSingleItem - IncludeSelector - - - - - - - - - Defines standard subsets of fields to return within the - response.<br> - <br> - If you don't specify this field, a default - set of fields is returned. Click "Detail Controls" below - and see "none" for the default fields. - If you specify this field, then the set of fields returned - includes the default fields. - If you specify this field, the additional - fields returned can affect the call's response time - (performance), including in the case of feedback data.<br> - <br> - <b>Applicable values</b>: - <p class="ename">&bull;&nbsp;&nbsp; Details</p> - <p class="edef">Include most available fields in the - response (except fields that significantly affect the call's - performance).</p> - <p class="ename">&bull;&nbsp;&nbsp; SearchDetails</p> - <p class="edef">Include additional item information in the - response. (This can affect the call's performance.)</p> - <p class="ename">&bull;&nbsp;&nbsp; SellerInfo</p> - <p class="edef">Include information about the seller in the - response. </p> - <p class="ename">&bull;&nbsp;&nbsp; ItemSpecifics</p> - <p class="edef">Include ItemSpecifics in the - response.</p> - <p class="ename">&bull;&nbsp;&nbsp; ExpansionItemCount</p> - <p class="edef">Include the counts of items that would be returned with expansions.</p> - <p class="ename">&bull;&nbsp;&nbsp; CategoryHistogram</p> - <p class="edef">Include a CategoryHistogram container with - information about categories that match your search (up to 2 levels).</p> - <br> - Use a comma to specify multiple values. (In this case, - the results are cumulative.) See "FindItemAdvanced Samples" - for an example of how to use this field.<br> - <br> - See "Detail Controls" for a complete list of - fields that can be returned for each selector. - - - Yes - - Detail Controls - #detailControls - - - FindItemsAdvanced Samples - #samples - - - FindItemsAdvanced - No - - - - - - - - Limits the results to items with a maximum number of bids. - - - - FindItemsAdvanced - No - - - - - - - - Limits the results to items with a minimum number of bids. - - - - FindItemsAdvanced - No - - - - - - - - Maximum number of matching categories to return at the - highest level (root level) of the category hierarchy (level 1). - If you specify this field along with a category ID, then the response - will contain child categories of the category ID you specify - and subcategories for each child category. - - - 10 - 3 - - FindItemsAdvanced - No - - - - - - - - Maximum number of matching subcategories to return at each - level of the category hierarchy below the root level. - If you specify this field along with a category ID, then the response - will contain child categories of the category ID you specify - and subcategories for each child category. - - - 10 - 3 - - FindItemsAdvanced - No - - - - - - - - A query that specifies a string for searching titles of items on eBay. - If you are using a URL, then to search for multiple words, - use "%20". For example, use Harry%20Potter to search for items - containing those words in any order. - You can incorporate wildcards into a multi-word search, as in the following: ap*%20ip*. - The words "and" and "or" are treated like any other word. Only use "and", - "or", or "the" if you are searching for listings containing these words. - FindItemsAdvanced requires that you specify - at least one of the following: - QueryKeywords, CategoryID, ProductID, or SellerID. - - - 3 - 350 (characters) - - FindItemsAdvanced - Conditionally - - - Searching by Keywords - - http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=SearchingByKeywords - related information (applies primarily to the eBay Trading API) - - - string - types/simpleTypes.html#string - - - - - - - - Specify CategoryID to restrict your query to a - specific category. CategoryID cannot be used with - the following input fields: EndTimeFrom, EndTimeTo, - PriceMin, or PriceMax. - <br> - <br> - If the specified category ID doesn't match an existing category - for the site, an invalid-category error message is returned. - To determine valid categories:<br> - Use the CategoryHistogram value in the IncludeSelector field - to retrieve matching categories. Then make another - FindItemsAdvanced call with the ID of a matching category. - <br> - <br> - FindItemsAdvanced requires that you specify - at least one of the following: - QueryKeywords, CategoryID, ProductID, or SellerID. - CategoryID can be used in combination with QueryKeywords. - If you pass CategoryID without QueryKeywords, CategoryID must be - a leaf category ID. That is, it cannot be a - root-level ID. - - - 10 - - FindItemsAdvanced - Conditionally - - - Searching by Category ID - - http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=SearchingByCategoryID - related information (applies primarily to the eBay Trading API) - - - - - - - - Sorts search results based on the value you specify. - See the SortOrder field for values for specifying - that results are returned in ascending or - descending order. (By default, results are returned in descending order.) - - - - EndTime - FindItemsAdvanced - No - - - - - - - - Sorts search results in ascending or descending order, in conjunction with the value you specify in ItemSort. The default is descending order. For example, if you specify an ItemSort value of BestMatch, - the most relevant items will be returned first, because the default SortOrder value is Descending. - If you specify an ItemSort value of EndTime (to sort items by end time), and - a SortOrder value of Ascending, then items ending in less time (from the time of the call) are returned before items ending in more time. - - - - Descending - FindItemsAdvanced - No - - - - - - - - GroupMaxEntries is used when you specify that BestMatch search results are - grouped by category (by using BestMatchCategoryGroup in the ItemSort - field.) In GroupMaxEntries, you specify the maximum number of entries per - group that you want in the search results. There is not a direct - correlation between the number of items returned in a regular sort (or in - a BestMatch sort) and the number of items that are returned when you - specify BestMatchCategoryGroup in the ItemSort field. When you specify - BestMatchCategoryGroup in the ItemSort field, not more than 2 pages of - results are returned. When you specify GroupMaxEntries, specify GroupsMax. - - - - FindItemsAdvanced - No - - - - - - - - GroupsMax is used when you specify that BestMatch search results are - grouped by category (by using BestMatchCategoryGroup in the ItemSort - field.) In GroupsMax, you specify the maximum number of groups that you - want in the search results. There is not a direct correlation between the - number of items returned in a regular sort (or in a BestMatch sort) and - the number of items that are returned when you specify - BestMatchCategoryGroup in the ItemSort field. When you specify - BestMatchCategoryGroup in the ItemSort field, not more than 2 pages of - results are returned. When you specify GroupsMax, specify GroupMaxEntries. - - - - FindItemsAdvanced - No - - - - - - - - Limits the results to items ending within a time range. EndTimeFrom - specifies the beginning of the time range. Specify a time in the future. - If you specify a time in the past, the current time is used. If specified, - EndTimeTo must also be specified (with a value equal to or later than - EndTimeFrom). Specify the time in GMT. Cannot be used with the ModTimeFrom - filter. - - - - FindItemsAdvanced - Conditionally - - - - - - - - Limits the results to items ending within a time range. EndTimeTo specifies - the end of the time range. If specified, EndTimeFrom must also be specified - (with a value equal to or earlier than EndTimeTo). Specify the time in GMT. - Cannot be used with the ModTimeFrom filter. - - - - FindItemsAdvanced - Conditionally - - - - - - - - Limits the results to active items whose status has changed - since the specified time. Specify a time in the past. - Time must be in GMT. Cannot be used with the EndTime filters. - - - - FindItemsAdvanced - No - - - - - - - - The ID of a specific seller. - Specify this value if you want search results to be filtered so that - the items returned are only items sold by a specific seller or by specific sellers. - SellerID is an unbounded field. - If you are using a URL, and you want to specify multiple values, - use a comma. - For example, to specify FavSellerBlue and FavSellerGreen, - specify SellerID=FavSellerBlue,FavSellerGreen. - FindItemsAdvanced requires that you specify - at least one of the following: QueryKeywords, CategoryID, ProductID, or SellerID. - If you want Store Inventory format (StoresFixedPrice) items to be returned, you must also specify the AllItemTypes value in the ItemType field. - The value you specify in SellerID is ignored if it is invalid. - You can specify a maximum of 100 sellers. - - - - FindItemsAdvanced - No - - - - - - - - Specify this value if you want search results to be filtered so that - the items returned do not include items sold by a specific seller or by specific sellers. - The SellerIDExclude input field need not be used if you specified the SellerID input field. - SellerIDExclude is an unbounded field. - If you are using a URL, and you want to specify multiple values, - use a comma. - For example, if you want to specify FavSellerBlue and FavSellerGreen, - specify SellerIDExclude=FavSellerBlue,FavSellerGreen. - You can specify a maximum of 100 sellers. - - - - FindItemsAdvanced - No - - - - - - - - Filters items based on criteria related to the listing type of items. - - - - FindItemsAdvanced - No - - - - - - - - The maximum distance from the item-location value you specify in PostalCode. - - - - FindItemsAdvanced - No - - - - - - - - The postal code where an item is located. - - - - FindItemsAdvanced - No - - - - - - - - You can use this input field to search by ISBN, UPC, - EAN, or eBay Product Reference ID, as in the following examples. - To search using an ISBN, specify - ProductID.Type=ISBN and set - ProductID.Value to an ISBN value. - To search using an eBay Product Reference ID, specify - ProductID.Type=Reference and set - ProductID.Value to an eBay Product Reference ID value. - If you do not know the eBay Product Reference ID - of a product, use FindProducts - to retrieve the desired eBay Product Reference ID. - FindItemsAdvanced requires that you specify - at least one of the following: - QueryKeywords, CategoryID, ProductID, or SellerID. - If you use the ProductID field, do not use - QueryKeywords, CategoryID, or SellerID. - - - - FindItemsAdvanced - No - - - - - - - - Specifies the maximum number of entries to return in a single call. If - the number of available items is less than the value you specify, the - lower number is returned. If you want the response to contain only the - total number of items matching the query, specify a MaxEntries value of - 0. - - - 20 - 100 - - FindItemsAdvanced - No - - - - - - - - Specifies the number of the page of data to return in the current call. - Specify a positive value equal to or lower than the number of pages available - (which you determine by examining the results of your initial request). - - - - 1 - FindItemsAdvanced - No - - - - - - - - Specifies the maximum current price an item can have to be included in - the response. - Specified as in the following URL snippet: PriceMax.Value=500. - Optionally, you can also specify a currency ID, e.g., as part of a URL, PriceMax.currencyID=EUR. - Use PriceMax to specify a maximum price or use - PriceMax with PriceMin to specify a price range. - - - - FindItemsAdvanced - No - - - - - - - - Specifies the minimum current price an item listing can have to be included in - the searches result set. Use alone to specify a minimum price or with MaxPrice - to define a range the items' prices must be. - Specified as in the following URL snippet: PriceMin.Value=400. - Optionally, you can also specify a currency ID, e.g., as part of a URL, PriceMin.currencyID=EUR. - - - - FindItemsAdvanced - No - - - - - - - - Limits the results to new or used items, plus items that have no - condition specified.<br> - <br> - Matches the new or used condition that the seller specified - in the Item Specifics section of the listing. - (That is, this won't specifically match on items where the seller - only put the word "New" in the listing's title.)<br> - <br> - Only applicable to the following sites: - United Kingdom (UK, site ID 3), Australia (AU, site ID 15), - Germany (DE, site ID 77), and India (IN, site ID 203). - - - - FindItemsAdvanced - No - - - - - - - - Limits results to items that support the specified - nonprofit charity organization. - - - - FindItemsAdvanced - No - - - - - - - - Search for charity listings, items with free shipping, and other features. - - - - FindItemsAdvanced - No - - - - - - - - Limits results to items that accept a specific payment method or methods. - - - - FindItemsAdvanced - No - - - - - - - - The name of the eBay Store in which the item is listed (case sensitive). - - - - FindItemsAdvanced - No - - - - - - - - Specifies the type of store search used for filtering results. - - - - FindItemsAdvanced - No - - - - - - - - Limits the results to those of a particular seller business type such as - commercial or private. - - - - FindItemsAdvanced - No - - - - - - - - Limits the results to listings that offer a certain number of items - matching the query. The Quantity field is used with QuantityOperator to - specify that you are seeking listings with quantities greater than, equal - to, or less than the value you specify in Quantity. - - - - FindItemsAdvanced - No - - - - - - - - Limits the results to listings with quantities greater than, equal to, or - less than the value you specify in Quantity. - - - - FindItemsAdvanced - No - - - - - - - - Limits the result set to just those items with a specified currency. - - - - FindItemsAdvanced - No - - - - - - - - Limits the result set to just those items available to the specified country. - - - - FindItemsAdvanced - No - - - - - - - - Limits the result set to just those items located in the specified country. - - - - FindItemsAdvanced - No - - - - - - - - Specifies the criteria for filtering search results by site, where site is - determined by the site ID in the request. - - - - FindItemsAdvanced - No - - - - - - - - - - - - - - Contains the item listings matching your search criteria. - - - - - - - - - Contains the returned item listings, if any. The data for each listing is - returned in an Item container. - - - - FindItemsAdvanced -
IncludeSelector: none, Details, SearchDetails, ItemSpecifics, SellerInfo, ExpansionItemCount, CategoryHistogram
- Conditionally -
-
-
-
- - - - Indicates the page of data returned by the current call. For instance, - for the first set of items can be returned, this field has a value of - 1. - - - - FindItemsAdvanced -
IncludeSelector: none, Details, SearchDetails, ItemSpecifics, SellerInfo, ExpansionItemCount, CategoryHistogram
- Always -
-
-
-
- - - - Indicates the total number of pages of data - that could be returned by repeated requests. Returned with a - value of 0 if no pages are available. - - - - FindItemsAdvanced -
IncludeSelector: none, Details, SearchDetails, ItemSpecifics, SellerInfo, ExpansionItemCount, CategoryHistogram
- Always -
-
-
-
- - - - Indicates the total number of items that - could be returned by repeated requests. Returned with a - value of 0 if no items match your search request. - - - - FindItemsAdvanced -
IncludeSelector: none, Details, SearchDetails, ItemSpecifics, SellerInfo, ExpansionItemCount, CategoryHistogram
- Always -
-
-
-
- - - - Statistical (histogram) information about categories that contain items that match - the query, if any. For categories - associated with specific items, see items returned in each search - result. Shows the distribution of items across each category. - Not returned if there is no match. - - - - FindItemsAdvanced -
IncludeSelector: CategoryHistogram
- Conditionally -
-
-
-
- - - - Total item count for a store expansion of the search. - - - - FindItemsAdvanced -
IncludeSelector: ExpansionItemCount
- Conditionally -
-
-
-
- - - - Total item count for an international expansion of the search. - - - - FindItemsAdvanced -
IncludeSelector: ExpansionItemCount
- Conditionally -
-
-
-
- - - - A URL for search results that corresponds to your search request. - - - - FindItemsAdvanced -
IncludeSelector: none, Details, SearchDetails, ItemSpecifics, SellerInfo, ExpansionItemCount, CategoryHistogram
- Conditionally -
-
-
-
-
-
-
-
- - - - - - Searches for items based a query or seller ID. - If you use keywords, this call returns items that contain the keywords in the title. - A maximum of 50 items is returned. - - - - Searches for items based a query or seller ID. - If you use keywords, this call returns items that contain the keywords in the title. - A maximum of 50 items is returned. - - FindItemsAdvanced, GetSingleItem, GetItemStatus, GetShippingCosts - - - - - - - - - A query that specifies a string for searching titles of items on eBay. - If you are using a URL, then to search for multiple words, - use "%20". For example, use Harry%20Potter to search for items - containing those words in any order. - You can incorporate wildcards into a multi-word search, as in the following: ap*%20ip*. - The words "and" and "or" are treated like any other word. Only use "and", - "or", or "the" if you are searching for listings containing these words. - FindItems requires that you specify either QueryKeywords, SellerID, or both. - - - 350 (characters) - - FindItems - Conditionally - - - string - types/simpleTypes.html#string - - - - - - - - Sorts search results based on the value you specify. - See the SortOrder field for values for specifying - that results are returned in ascending or - descending order. (By default, results are returned in descending order.) - - - - EndTime - FindItems - No - - - - - - - - Sorts search results in ascending or descending order, in conjunction with the value you specify in ItemSort. The default is descending order. For example, if you specify an ItemSort value of BestMatch, - the most relevant items will be returned first, because the default SortOrder value is Descending. - If you specify an ItemSort value of EndTime (to sort items by end time), and - a SortOrder value of Ascending, then items ending in less time (from the time of the call) are returned before items ending in more time. - - - - Descending - FindItems - No - - - - - - - - Specifies the maximum number of entries to return in a single call. If the number of entries that can be returned is less than the value you specify, the lower number is returned. - - - 50 - - 3 - FindItems - No - - - - - - - - Specifies the postal code where the buyer is located. - - - - FindItems - No - - - - - - - - The ID of a specific seller. - Specify this value if you want search results to be filtered so that - the items returned are only items sold by a specific seller or by specific sellers. - SellerID is an unbounded field. - If you are using a URL, and you want to specify multiple values, - use a comma. - For example, to specify FavSellerBlue and FavSellerGreen, - specify SellerID=FavSellerBlue,FavSellerGreen. - The value you specify in SellerID is ignored if it is invalid. - You can specify a maximum of 100 sellers. - - - - FindItems - Conditionally - - - - - - - - Specify this value if you want search results to be filtered so that - the items returned do not include items sold by a specific seller or by specific sellers. - The SellerIDExclude input field need not be used if you specified the SellerID input field. - SellerIDExclude is an unbounded field. - If you are using a URL, and you want to specify multiple values, - use a comma. - For example, if you want to specify FavSellerBlue and FavSellerGreen, - specify SellerIDExclude=FavSellerBlue,FavSellerGreen. - You can specify a maximum of 100 sellers. - - - - FindItems - No - - - - - - - - - - - - - - - - - - Contains summary data for an item listing. - - - - FindItems - Conditionally - - - - - - - - Indicates the total number of items on eBay that match the query. - - - - FindItems - Always - - - - - - - - A URL equivalent to your FindItems search query. - FindItems returns a maximum of 50 items, so you can use the value in ItemSearchURL - to provide users with a link for viewing more items. - - - - FindItems - Conditionally - - - - - - - - - - - - - - Find popular items - - - - Searches for popular items based on a category or keyword. - Returns WatchCount in addition to item information. - - - FindPopularSearches - - - - - - - - - - Specify CategoryID to restrict your query to a specific category. - Up to 10 categories may be specified. - If you are using a URL, and you want to specify - more than one CategoryID, separate the values with a comma. - For example, to specify Fiction Books and - Children's Books, specify CategoryID=377,279. - <br> - <br> - If the specified category ID doesn't match an existing category - for the site, an invalid-category error message is returned. - To determine valid categories:<br> - Use the FindItemsAdvanced CategoryHistogram value in the IncludeSelector field - to retrieve matching categories. Then make another - FindItemsAdvanced call with the ID of a matching category. - <br> - <br> - CategoryID can be used in combination with QueryKeywords and CategoryIDExclude. - To retrieve the most popular items across all categorys, do not submit a CategoryID. - - - 10 - - FindPopularItems - No - - - - - - - - A query that specifies a string for searching titles of items on eBay. - If you are using a URL, then to search for multiple words, - use "%20". For example, use Harry%20Potter to search for items - containing those words in any order. - You can incorporate wildcards into a multi-word search, as in the following: ap*%20ip*. - The words "and" and "or" are treated like any other word. Only use "and", - "or", or "the" if you are searching for listings containing these words. - QueryKeywords can be used in combination with CategoryID and CategoryIDExclude. - - - 3 - 350 (characters) - - FindPopularItems - No - - - Searching by Keywords - - http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=SearchingByKeywords - - - - - - - - Specify this value if you want search results to be filtered so that the popular - items returned do not include items that belong to a specific category. - <br> - <br> - CategoryIDExclude is an unbounded field. - If you are using a URL, you can separate multiple values with a comma. - For example, if you want to specify - Records and SuperAudio CDs, specify - CategoryIDExclude=306,46354. - <br> - <br> - CategoryIDExclude can be used in combination with QueryKeywords and CategoryID. - The CategoryIDExclude input field need not be used if you specified the - CategoryID input field. - - - - FindPopularItems - No - - - - - - - - - - - - - - Popular items, detail level is default for simple item type. addition with WatchCount. - - - - - - - - - A list of active items that were listed with the requested product. - - - - FindPopularItems - Always - - - - - - - - - - - - - - Retrieves the words more frequently used by eBay users when searching for listings. - These keywords are generated weekly by eBay. Thus, calls retrieve static data. - FindPopularSearches is not available for the following sites: FR, HK, MY, PH, PL, SG, SE. - - - - Finds the words more frequently used by eBay users when searching for listings. - If you use keywords, this call returns available alternative keywords in addition to - popular related keywords. - - - FindPopularItems - - - - - - - - - - Specify CategoryID to restrict your query to a specific category. - Up to 10 categories may be specified - If you are using a URL, and you want to specify - multiple values, use a comma. - For example, if you want to specify Fiction Books and - Children's Books, specify CategoryID=377,279. - <br> - <br> - If the specified category ID doesn't match an existing category - for the site, an invalid-category error message is returned. - To determine valid categories:<br> - Use the FindItemsAdvanced CategoryHistogram value in the IncludeSelector field - to retrieve matching categories. Then make another - FindItemsAdvanced call with the ID of a matching category. - <br> - <br> - CategoryID can be used in combination with QueryKeywords and IncludeChildCategories. - When IncludeChildCategories is true and used in conjunction with CategoryID, - one and only one CategoryID is allowed. Otherwise, up - to 10 CategoryIDs are allowed. - To retrieve the most popular keywords for a root category, set one of - the CategoryIDs to -1 or do not include CategoryID in the Request. - - - 10 - - FindPopularSearches - No - - - - - - - - A query that specifies a string for searching titles of items on eBay. - If you are using a URL, then to search for multiple words, - use "%20". For example, use Harry%20Potter to search for items - containing those words in any order. - You can incorporate wildcards into a multi-word search, as in the following: ap*%20ip*. - The words "and" and "or" are treated like any other word. Only use "and", - "or", or "the" if you are searching for listings containing these words. - <br> - <br> - QueryKeywords can be used in combination with CategoryID and IncludeChildCategories. - - - - FindPopularSearches - No - - - - - - - - The maximum number of keywords to be retrieved per category - for this call. - - - - FindPopularSearches - No - - 1 - 1000 - 20 - - - - - - - Specifies the maximum number of PopularSearchResults per page in - the returned list. If not specified, the default returns 20 results per page. - - - - FindPopularSearches - 20 - No - - - - - - - - Specifies the number of the page of data to return in the current call. - Specify a positive value equal to or lower than the number of pages - available (which you determine by examining the results of your initial request). - - - - FindPopularSearches - 1 - No - - - - - - - - If true, only one CategoryID can be specified, and keywords - are returned for that category and its subcategories. - When IncludeChildCategories is true and used in conjunction with - CategoryID, one and only one CategoryID is allowed. - <br> - <br> - If false, keywords are returned only for the categories - identified by CategoryID. The default is false. - - - - FindPopularSearches - false - No - - - - - - - - - - - - - - Contains the keyword data for the requested categories. A category's data are contained in a CategoryArrayType object if there is no error (one or more CategoryType objects). Each CategoryType contains its ID, parent ID and keyword list. - - - - - - - - - Organization of keywords by category. For each - category, its ID and its parent's ID and keywords - are listed. - - - - FindPopularSearches - Always - - - - - - - - Indicates the page of data returned by the current call. For instance, - for the first set of items can be returned, this field has a value of - one. - - - - FindPopularSearches - Conditionally - - - - - - - - Indicates the total number of pages of data - that could be returned by repeated requests. Returned with a - value of 0 if no pages are available. - - - - FindPopularSearches - Conditionally - - - - - - - - - - - - - - - - - - Searches for stock product information (stock description - and Item Specifics), such as information about a particular - kind of DVD or camera. Also, retrieves up to 200 eBay listings associated - with a product. - - - FindItemsAdvanced - - IncludeSelector - - - - - - - - - Defines standard subsets of fields to return within the - response.<br> - <br> - If you don't specify this field, the call returns a default - set of fields, focusing on product details only - (see the "Detail Controls" link below). If you specify this - field, the additional fields you retrieve can affect the call's - response time (performance).<br> - <br> - <b>Applicable values</b>: - <p class="ename">&bull;&nbsp;&nbsp; Details</p> - <p class="edef">Include all available item fields - in the response. Only applicable when you are searching by - ProductID. Not applicable with QueryKeywords.</p> - <p class="ename">&bull;&nbsp;&nbsp; DomainHistogram</p> - <p class="edef">Include the DomainHistogram in - the response. The histogram lists the number of matching - products found and the domains in which they were found. - (A domain is like a high-level category.) - When many matching products are found, you may see - significantly slower response times when you include - the histogram.</p> - <p class="ename">&bull;&nbsp;&nbsp; Items</p> - <p class="edef">Include a brief set of item fields - in the response. - Only applicable when you are searching by ProductID. - Not applicable with QueryKeywords.</p> - <br> - <br> - Use a comma to specify multiple values. (In this case, - the results are cumulative.) See "FindProducts Samples" - for an example of how to use this field.<br> - <br> - See "Detail Controls" for a complete list of - fields that can be returned for each selector. - - - - Yes - - FindProducts - No - - - - - - - - If true, only retrieve data for products that have been used to - pre-fill active listings on the specified eBay site. - If false, retrieve all products that match the query. - This is useful when you use QueryKeywords and you only want to - find products that have associated items (that is, where ItemArray - would not beempty).<br> - <br> - This does not retrieve ItemArray; this only controls which - products are returned (or counted). To retrieve ItemArray, - pass Items in IncludeSelector. - - - false - - FindProducts - No - - - - - - - - A domain to search in. This is like searching a section of - a catalog. If not specified, the product search is conducted - across all domains. To determine valid domain names, - first use this call with QueryKeywords. Domain names are returned - for each product (and summarized in the domain histogram, if you - specify DomainHistogram in IncludeSelector).<br> - <br> - A domain is a named grouping of categories whose items share - common product characteristics. For example, all bound books - have a binding or format (e.g., Hardcover), but audiobooks don't. - So audiobooks would have their own domain. - To limit your search to audiobooks, you would specify Audiobooks - as the domain.<br> - <br> - Only useful when QueryKeywords is specified. If you use this with - ProductID, AND logic is applied. In this case, if you specify an - ID that doesn't match the domain (as eBay has defined it), - no matching product will be found. Therefore, we recommend that you only use DomainName with QueryKeywords. - - - - FindProducts - No - - - - - - - - Use this to retrieve product details for one specific product. - Specify the ID as a string, and use the type attribute to - indicate the nature of the ID you are specifying. - <br> - <br> - The request requires either QueryKeywords or - ProductID, but these fields cannot be used together. - - - 4000 - - FindProducts - Conditionally - - - - - - - - One or more keywords to search for. When you use a keyword search, - eBay searches the product catalogs for matching words in the - product title, description, and/or Item Specifics, and it returns - a list of matching products, with no items. To retrieve - items, use ProductID instead. (If you don't already have a - product ID, you can get product IDs from the - response after conducting a keyword search.)<br> - <br> - If specified, you must pass in at least 3 alphanumeric characters.<br> - <br> - The words "and" and "or" are treated like any other word. - Only use "and", "or", or "the" if you are searching for products - containing these words. - To use AND or OR logic, use eBay's standard search string - modifiers. Wildcards (+, -, or *) are also supported. - Be careful when using spaces before or after modifiers and - wildcards.<br> - <br> - Some keyword queries can result in response times of 30 seconds or - longer. If more than 2000 matches are found, the call fails with - an error. If this kind of error occurs, refine the search by - passing in more keywords and/or by using DomainName to restrict - the search to certain domains (such as DVDs). - If you are searching for a particular book, DVD, CD, or video game - and you already know its ISBN or EAN (for a book) or UPC, - consider using ProductID instead to retrieve more - precise results. <br> - <br> - The request requires either QueryKeywords or - ProductID, but these fields cannot be used together. - - - 350 - - FindProducts - Conditionally - - - - - - - - Sorts the list of products returned. This is mostly only useful - with QueryKeywords. (When you use ProductID, eBay usually only - returns one product.) - Also see SortOrder. If PorductSort and SortOrder are not - specified, products are sorted by popularity in descending order. - - - Popularity - - FindProducts - No - - - - - - - - Sorts search results in ascending or descending order. - Only applicable with ProductSort. If you specify ProductSort - without SortOrder, the order defaults to Descending for - all criteria except Title (which defaults to Ascending). - - - Descending - - FindProducts - No - - - - - - - - Specifies the maximum number of products to return per page - in a single call. This is mostly only useful - with QueryKeywords. (When you use ProductID, eBay usually only - returns one product, and up to 200 items for that product.) - - - 1 - 20 - 1 - - FindProducts - No - - - - - - - - Specifies which page of data to return in the current call. - Specify a positive value equal to or lower than the number of - pages available (which you determine by examining the results of - your initial request). - - - 1 - 2000 - 1 - - FindProducts - No - - - - - - - - - - - - - - Returns stock product information in eBay catalogs, such as - information about a particular DVD or camera. Optionally, - also returns items that match the product. - - - - - - - - - The total number of pages that can be returned, given the same - query and filters in the request. As FindProducts only returns - up to 2000 products, the maximum possible value is theoretically - 2000 (if you were to set MaxEntries to 1 in the request). - - - 1 - 2000 - - FindProducts - Always -
IncludeSelector: none, DomainHistogram, Items, Details
-
-
-
-
- - - - If true, more pages of results are available. - That is, PageNumber is less than ApproximatePages. - - - - FindProducts - Always -
IncludeSelector: none, DomainHistogram, Items, Details
-
-
-
-
- - - - A histogram that lists the number of matching products found - and the domains in which they were found. - A <i>domain</i> describes a set of categories that - share certain common characteristics (as determined by eBay). - Each domain has its own name and ID. - Only returned when you specify DomainHistogram in IncludeSelector. - - - - FindProducts - Conditionally -
IncludeSelector: DomainHistogram
-
-
-
-
- - - - A list of active items that were listed with the requested - product. Only returned when you specify Items in IncludeSelector, - and the product has matching items that are currently active on - eBay. - - - - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - The number of the page of data returned. If many products - are found and multiple pages of results are available, use - this in combination with ApproximatePages and MoreResults - to decide which page to retrieve next. As FindProducts only - returns up to 2000 products, the maximum possible value is - theoretically 2000 (if you were to set MaxEntries to 1 in the - request). - - - 1 - 2000 - - FindProducts - Always -
IncludeSelector: none, DomainHistogram, Items, Details
-
-
-
-
- - - - An eBay catalog product. This contains stock information about a - particular DVD, camera, set of golf clubs, or other product. - When you use QueryKeywords in the request, FindProducts returns a - maximum of 20 products per page. - When you use ProductID in the request, FindProducts usually only - returns 1 product. - (If more than one product matches the same ProductID, - FindProducts will return all of those products. As of the time - of this writing, we expect this to be a rare case.) - - - 20 - - FindProducts - Always -
IncludeSelector: none, DomainHistogram, Items, Details
-
-
-
-
- - - - The total number of matching products found. - (If more than 2000 products are found, the call fails - with an error.) - - - 0 - 2000 - - FindProducts - Always -
IncludeSelector: none, DomainHistogram, Items, Details
-
-
-
-
-
-
-
-
- - - - - - Splitting include reviews and guides from GetProducts. - - - - Searches reviews and guides based on product, category, or user. The response provides information about - each user or product's reviews and guides. - - - FindItemsAdvanced, FindProducts, GetCategoryInfo - - - - - - - - - - Use this to retrieve reviews (not guides) for one specific product. - Specify the ID as a string, and use the type attribute - to indicate the nature of the ID you are specifying. - Same as FindProducts, supports Reference, ISBN, UPC, EAN. - <br> - <br> - ProductID can be used in combination with UserID to return Reviews and Guides. - ProductID and CategoryID cannot be used together. - - - - FindReviewsAndGuides - No - - - - - - - - Retrieves reviews and guides written by the specified user. - <br> - <br> - UserID can be combined with either ProductID or CategoryID but not both (as - ProductID and CategoryID cannot be used together). - - - - FindReviewsAndGuides - No - - - - - - - - Specify a single CategoryID to restrict your query to a specific Guide category. - <br> - <br> - If the specified category ID doesn't match an existing category - for the site, an invalid-category error message is returned. - To determine valid categories:<br> - Use the FindItemsAdvanced CategoryHistogram value in the IncludeSelector field - to retrieve matching categories. Then make another - FindReviewsAndGuides call with the ID of a matching category. - <br> - <br> - CategoryID can be used in combination with UserID to return Reviews and Guides. - ProductID and CategoryID cannot be used together. - - - - FindReviewsAndGuides - No - - - - - - - - Specifies the maximum number of reviews per page (not guides) in the returned list. If not - specified, the default returns 5 results per page. - - - - FindReviewsAndGuides - 5 - 20 - No - - - - - - - - Specifies the number of the page of data to return in the current call. - Specify a positive value equal to or lower than the number of pages - available (which you determine by examining the results of your initial request). - - - - FindReviewsAndGuides - No - - - - - - - - - - - - - - Find reviews and guides response type. - - - - - - - - - Number of returned reviews. - - - - FindReviewsAndGuides - Always - - - - - - - - Number of returned buying guides. - - - - FindReviewsAndGuides - Always - - - - - - - - Rank of reviewer if using user search. - - - - FindReviewsAndGuides - Conditionally - - - - - - - - Number of helpfulness votes if using user search. - - - - FindReviewsAndGuides - Conditionally - - - - - - - - The eBay or external IDs associated with the product. - Use the Reference value as input to search for the same product - in the future, or use the ISBN, EAN, or UPC value (if returned). - The ISBN, EAN, and UPC values can also be useful as keys if your - application is comparing products across different sites. Always - returned when Product is returned. - - - - FindReviewsAndGuides - Conditionally - - - - - - - - URL to the reviews and guides page. - - - - FindReviewsAndGuides - Always - - - - - - - - The number of the page of data returned. If many products - are found and multiple pages of results are available, use - this in combination with TotalPages to decide - which page to retrieve next. As FindProducts only returns - up to 2000 products, the maximum possible value is theoretically - 2000 (if you were to set MaxResultsPerPage to 1 in the request). - - - 1 - 2000 - - FindReviewsAndGuides - Always - - - - - - - - Indicates the total number of pages of data - that could be returned by repeated requests. Returned with a - value of 0 if no pages are available. - - - - FindReviewsAndGuides - Always - - - - - - - - Contains information for up to 5 buying guides that match the - query. Buying guides provide useful information about shopping - in a particular domain, like Digital Cameras. - For example, a digital camera buying guide - could help a buyer determine what kind of digital camera - is right for them. - If no buying guides are associated with the product, this only - returns a link to the buying guide hub (the main Guides page). - Count limited by MaxResultsPerPage in request. - - - - FindReviewsAndGuides - Always - - - - - - - - Contains information about review details. Count limited by MaxResultsPerPage in request. - - - - FindReviewsAndGuides - Conditionally - - - - - - - - Number of helpfulness votes if using user search. - - - - FindReviewsAndGuides - Conditionally - - - - - - - - - - - - - - This call will give you the ability to retrieve high level - Category information, relevant for a buy-side application. - - - - This call will give you the ability to retrieve high level - Category information, relevant for a buy-side application. - - FindItemsAdvanced - IncludeSelector - - - - - - - - - Use an ID of -1 to retrieve the root category and the top-level (level 1) meta categories. You can determine other CategoryIDs from the response from this call, or from a specific item (retrieved from another call like FindItemsAdvanced or GetSingleItem), or from the eBay website. - - - 19 (Note: The eBay database specifies 38. Currently, Category ID's are usually 9 to 12 digits) - - GetCategoryInfo - Yes - - - - - - - - Defines standard subsets of fields to return within the - response. If you don't specify this field, the call returns - a default set of fields. If you specify this field, the - additional fields (child categories) you retrieve can affect - the call's response time (decrease performance). - - - - Yes - - Detail Controls - #detailControls - - - GetCategoryInfo Samples - #samples - - - GetCategoryInfo - No - - - - - - - - - - - - - - Contains the category data for the eBay site specified as input. The category - data is returned as a CategoryArrayType object, that contains zero, one, or - multiple CategoryType objects. Each CategoryType object contains the detail data - for one category. Other fields indicate how many categories are returned in a call, when the category hierarchy was last updated, and the version of the category hierarchy (all three of which can differ from one eBay site to the next). - - - - - - - - - List of the returned categories. The category array contains one CategoryType - object for each returned category. Returns empty if no detail level is specified. - - - - GetCategoryInfo -
IncludeSelector: None, ChildCategories
- Always -
-
-
-
- - - - Indicates the number of categories returned (i.e., the number of CategoryType - objects in CategoryArray). - - - - GetCategoryInfo -
IncludeSelector: None, ChildCategories
- Always -
-
-
-
- - - - Indicates the last date and time that eBay modified the category hierarchy for the - specified eBay site. - - - - GetCategoryInfo -
IncludeSelector: None, ChildCategories
- Always -
-
-
-
- - - - Indicates the version of the category hierarchy on the - specified eBay site. - - - - GetCategoryInfo -
IncludeSelector: None, ChildCategories
- Always -
-
-
-
-
-
-
-
- - - - - - Contains a single ItemID or an array of ItemIDs. - - - - Allows you to get the status for a group of items. Returns status information such - as ListingStatus and End Time for all items that are listed in the request. - - - - - - - - - - Contains the item ID and description of a listing. - - - 19 (Note: The eBay database specifies 38. However, Item IDs are usually 9 to 12 digits) - - GetItemStatus - Yes - - - - - - - - - - - - - - Returns status information for all items in a list. Some of the Item information - is returned in an SimpleItemArrayType object, that can include zero, one, or multiple ItemType objects. - - - - - - - - - Collection of Item status objects in an SimpleItemArrayType object, that can include zero, one, or multiple ItemType objects. - - - - GetItemStatus - Always - - - - - - - - - - - - - - Retrieves publicly available data for one or more listings. Use this call to retrieve - much of the information that is visible on a listing's View Item page on the eBay Web - site, such as title, prices, and basic shipping costs. Provide ItemID for every item for - which you want information. This call returns the same minimal information that is - returned by GetSingleItem for each item with no IncludeSelector specified. (Use - GetShippingCosts to retrieve more detailed shipping cost information for a given item.) - - - - Retrieves publicly available data for one or more listings. - - GetSingleItem - - - - - - - - - The item ID that uniquely identifies the item listing - for which to retrieve the data. - You can provide a maximum of 10 ItemIDs. - <br> - <br> - You can determine an item's ID by calling FindItems or from the eBay Web - site. Provide ItemID for every item for which you want information. - - - 19 (Note: The eBay database specifies 38. Currently, Item IDs are usually 9 to 12 digits) - - (FindItems) Item.ItemID - FindItems.html#Response.Item.ItemID - - - GetMultipleItems - Yes - - - - - - - - - - - - - - Response to request of GetMultipleItems. - - - - - - - - - Contains details for a listing whose ID was specified in the request. - - - - GetMultipleItems - Always -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
-
-
-
-
-
-
-
-
- - - - - - Gets shipping costs for an item. This is one of the ways a buyer or seller - can obtain shipping cost information for an existing item (for which the caller is - either the buyer or seller) at any point in the life of of the listing, before or - after a buyer has committed to purchasing the item(s). This call works for - both flat rate shipping and calculated shipping. Flat rate shipping costs are - established by the seller before bidding occurs. Calculated shipping costs - are calculated by eBay with its shipping partners based on postal code, but note - that insurance cost can only be determined once the final item price is known - when the listing ends. To determine whether a listing has ended, use GetSingleItem. - It is best to call GetShippingCosts only after determining via GetSingleItem - or FindItems that the item actually has shipping cost information. - - - - Gets shipping costs for an item. - - GetSingleItem - - - - - - - - - The item ID that uniquely identifies the item listing for which to retrieve the data. - - - 19 (Note: The eBay database specifies 38. Currently, Item IDs are usually 9 to 12 digits) - - GetShippingCosts - Yes - - - - - - - - Number of items sold to a single buyer and to be shipped together. - - - 1 - - GetShippingCosts - No - - - - - - - - Destination country postal code (or zipcode, for US). Ignored if no - country code is provided. Optional tag for some countries. More likely to - be required for large countries. Ignored for flat rate shipping. - - - - GetShippingCosts - Conditionally - - - - - - - - Destination country code. If DestinationCountryCode is US, - postal code is required and represents US zip code. - - - US - - GetShippingCosts - Conditionally - - - - - - - - Indicates whether to return the ShippingDetails container in the response. - - - false - - GetShippingCosts - Conditionally - - - - - - - - - - - - - - Response to call of GetShippingCosts. - - - - - - - - - Shipping-related details for the specified item. This container is only - returned if IncludeDetails is true on input. Any error about shipping services - (returned by a vendor of eBay's who calculates shipping costs) is returned in - ShippingRateErrorMessage. Errors from a shipping service are likely to be related to - issues with shipping specifications, such as package size and the selected shipping - method not supported by a particular shipping service. - - - - GetShippingCosts - Conditionally - - - - - - - - Shipping-related details for the specified item. Any error about shipping services - (returned by a vendor of eBay's who calculates shipping costs) is returned in - ShippingRateErrorMessage. Errors from a shipping service are likely to be related to - issues with shipping specifications, such as package size and the selected shipping - method not supported by a particular shipping service. - - - - GetShippingCosts - Always - - - - - - - - - - - - - - Retrieves publicly available data for a single listing. - Use this call to retrieve most of the information that is visible - on a listing's View Item page on the eBay Web site, - such as title, description, prices, basic seller and bidder information, - and other details about the listing.Also returns basic - shipping costs. For more shipping details, use GetShippingCosts. - - - - Gets publicly visible details about one listing. This gives you most of the - data that eBay shows on the View Item page (title, description, - price, and other details). - - FindItems, GetItemStatus, GetShippingCosts, GetSingleItem - IncludeSelector - - - - - - - - - The item ID that uniquely identifies the item listing - for which to retrieve the data.<br> - <br> - You can determine an item's ID by calling FindItems or - from the eBay Web site. - - - 19 (Note: The eBay database specifies 38. Currently, Item IDs are usually 9 to 12 digits) - - (FindItems) Item.ItemID - FindItems.html#Response.Item.ItemID - - - GetSingleItem - Yes - - - - - - - - Defines standard subsets of fields to return within the - response.<br> - <br> - If you don't specify this field, the call returns a default - set of fields (see the "Detail Controls" link below). If you specify this field, the additional - fields you retrieve can affect the call's response time - (performance).<br> - <br> - <b>Applicable values</b>: - <p class="ename">&bull;&nbsp;&nbsp; Details</p> - <p class="edef">Include most available fields in the - response (except fields that significantly affect the call's - performance).</p> - <p class="ename">&bull;&nbsp;&nbsp; Description</p> - <p class="edef">Include the Description field in the response. (This can affect the call's performance.)</p> - <p class="ename">&bull;&nbsp;&nbsp; ShippingCosts</p> - <p class="edef">Include basic shipping costs in the - response. (Use GetShippingCosts to retrieve more - details.)</p> - <p class="ename">&bull;&nbsp;&nbsp; ItemSpecifics</p> - <p class="edef">Include ItemSpecifics in the response.</p> - <br> - <br> - Use a comma to specify multiple values. (In this case, - the results are cumulative.) See "GetSingleItem Samples" - for an example of how to use this field.<br> - <br> - See "Detail Controls" for a complete list of - fields that can be returned for each selector. - - - - Yes - - Detail Controls - #detailControls - - - GetSingleItem Samples - #samples - - - GetSingleItem - No - - - - - - - - - - - - - - - - - - Contains details about the listing whose ID was specified in - the request. - - - - GetSingleItem - Always -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
-
-
-
-
-
-
-
-
- - - - - - Retrieves user information based on the user ID you specify. The response contains detailed information about a user. You can specify the types of user information you want in the response. - - - - Retrieves user information based on the user ID you specify. The response contains detailed information about a user. You can specify the types of user information you want in the response. - - FindItems - IncludeSelector - - - - - - - - - Specifies the user whose data will returned by the call. - - - - GetUserProfile - Yes - - - - - - - - Defines standard subsets of fields to return within the - response.<br> - <br> - If you don't specify this field, a default - set of fields is returned. Click "Detail Controls" below - and see "none" for the default fields. - If you specify this field, then the set of fields returned - includes the default fields. - If you specify this field, the additional - fields returned can affect the call's response time - (performance), including in the case of feedback data.<br> - <br> - <b>Applicable values</b>: - <p class="ename">&bull;&nbsp;&nbsp; Details</p> - <p class="edef">Include most available fields (such as StoreURL) in the - response (except fields that can affect the call's response time).</p> - <p class="ename">&bull;&nbsp;&nbsp; FeedbackDetails</p> - <p class="edef">Include a container for information about one feedback entry. - </p> - <p class="ename">&bull;&nbsp;&nbsp; FeedbackHistory</p> - <p class="edef">Include a container for summary feedback data for a user. - </p> - <br> - Use a comma to specify multiple values. (In this case, - the results are cumulative.) See "GetUserProfile Samples" - for an example of how to use this field.<br> - <br> - See "Detail Controls" for a complete list of - fields that can be returned for each selector. - - - Yes - - Detail Controls - #detailControls - - - GetUserProfile Samples - #samples - - - GetUserProfile - No - - - - - - - - - - - - - - - - - - Contains the returned user data for the specified eBay user. - - - - GetUserProfile -
IncludeSelector: none, Details, FeedbackDetails, FeedbackHistory
- Always -
-
-
-
- - - - Summary feedback data for a user. Contains counts of positive, neutral, - and negative feedback for predefined time periods. - - - - GetUserProfile -
IncludeSelector: FeedbackHistory
- Always -
-
-
-
- - - - The FeedbackDetails container has fields (ItemID, etc.) with information about one feedback entry. - When you call GetUserProfile, the 5 (maximum) most recent feedback records are returned in - FeedbackDetails containers. - - - - GetUserProfile -
IncludeSelector: FeedbackDetails
- Always -
-
-
-
-
-
-
-
- - - - - - Gets the official eBay system time in GMT. - - - - Gets the official eBay system time in GMT. - - - - - - - - - - - - - - The Timestamp field indicates the official eBay system time in GMT. - The value returned represents the date and time when eBay processed the request. - The value is in the ISO 8601 date-time format (YYYY-MM-DDTHH:MM:SS.SSSZ). - - - - - - - - - - - - Information about an Half.com catalog product. - - - - - - - The title of the product, as specified in the catalog. - Always returned when Product is returned. - - - - FindHalfProducts -
IncludeSelector: none, DomainHistogram, Items
- Conditionally -
-
-
-
- - - - Fully qualified URL for optional information about the product, - such as a movie's description or film credits. This information - is hosted through the Half.com Web site and it cannot be edited. - Portions of the content are protected by copyright. - Applications can include this URL as a link in product search results - so that end users can view additional descriptive details about - the product. This is usually always returned when Product is returned, - but it may be safest to check for the existence of this field. - - - - FindHalfProducts -
IncludeSelector: none, DomainHistogram, Items
- Conditionally -
-
-
-
- - - - Fully qualified URL for a stock image (if any) that is associated - with the Half.com catalog product. The URL is for the image Half.com - usually displays in product search results (usually 70px tall). - It may be helpful to calculate the dimensions of the photo - programmatically before displaying it. - Only returned if a URL is available for the product. - - - - FindHalfProducts -
IncludeSelector: none, DomainHistogram, Items
- Conditionally -
-
-
-
- - - - Contains basic shipping-related costs for the item. If Item.Quantity is greater - than 1, this is the shipping cost for one item. If the seller offers a choice of - more than one shipping service (such as USPS Ground or Expediated), this is the - cost of the "first" shipping option (usually the lowest cost option). - - - - FindHalfProducts -
IncludeSelector: Items
- Conditionally -
-
-
-
- - - - If true, your application can attempt to display stock photos that - are returned. If false, your application should not attempt to display - any stock photos that are returned. This recommendation is useful for - catalog data related to products like coins, where stock photos are not - necessarily applicable or available. An application with a graphical - user interface can use this flag to determine - when to hide customized stock photo widgets. - Always returned when Product is returned. - - - - FindHalfProducts -
IncludeSelector: none, DomainHistogram, Items
- Conditionally -
-
-
-
- - - - Total number of listings on the Half.com site that use - stock information from this catalog product. This value can be greater - than the number of listings returned in ItemArray. - Only returned when you search by ProductID (and you pass - Items or Details in IncludeSelector). - - - 0 - - - FindHalfProducts -
IncludeSelector: Items
- Conditionally -
-
-
-
- - - - The Half.com or external IDs associated with the product. Use the Reference - value as input to search for the same product in the future, or - use the ISBN, EAN, or UPC value (if returned). - The ISBN, EAN, and UPC values can also be useful as keys - if your application is comparing products across different sites. - Always returned when Product is returned. - - - - - FindHalfProducts -
IncludeSelector: none, DomainHistogram, Items
- Conditionally -
-
-
-
- - - - The name of the domain in which the product was found. - If the product is mapped to multiple domains, Half.com returns - the most applicable domain (as determined by Half.com). - Always returned when Product is returned. - - - - FindHalfProducts -
IncludeSelector: none, DomainHistogram, Items
- Conditionally -
-
-
-
- - - - A list of name/value pairs that are included in the product's - pre-filled Item Specifics. These indicate common aspects or - characteristics of the product, such as Publisher (for a book). - Also see ProductID for ISBN, UPC, or EAN values, if applicable. - This is usually returned. (We are not aware of any cases in which this - node is not be returned. However, it may be safest to check for the - existence of this node.) - - - - FindHalfProducts -
IncludeSelector: none, DomainHistogram, Items
- Conditionally -
-
-
-
- - - - A list of active items that were listed with the requested product. - Results are sorted by current price (lowest first), - then by recent positive feedback (highest first). - <br> - <br> - Only returned when you specify Items in IncludeSelector, and the - product has matching items that are currently active on Half.com. - - - - FindHalfProducts -
IncludeSelector: Items
- Conditionally -
-
-
-
- - - - The total number of reviews that are available for this product - on the Half.com Web site. This can be greater than the number of - reviews returned by FindProducts. In a future release, we will provide - the capability to retrieve details about reviews. - Always returned when Product is returned. - - - - FindHalfProducts - 0 - -
IncludeSelector: none, DomainHistogram, Items
- Conditionally -
-
-
-
- -
-
- - - - - Controls values for item condition, especially for Books catalog. - - - - - - - New, unread, unused and in perfect condition. - - - - - - - Item still in original packaging, no wear and tear, all - facets of the product are intact. (Could easily be mistaken - for brand new.) - - - - - - - Doesn't look brand new but has no easily noticeable damage - and very minimal wear and tear. (You would give it to a - good friend as a gift) - - - - - - - Very minimal damage to the item and still includes all accessories - such as dust jackets, liner notes, and cases. - (You would use it yourself, but wouldn't necessarily give it as a gift) - - - - - - - Some damage to the item but integrity still intact. May be missing an - accessory. (Item beaten up a bit but it works) - - - - - - - Some damage to the item and visibly used. - - - - - - - (out) Reserved for internal or future use - - - - - - - - - - Information about an eBay catalog product. - - - - - - - An set of Half.com catalog products. This contains stock information about a - particular DVD, book, or other product. - When you use QueryKeywords in the request, FindHalfProducts returns a - maximum of 20 products per page. - When you use ProductID in the request, FindHalfProducts usually only - returns 1 product. - (If more than one product matches the same ProductID, - FindProducts will return all of those products. As of the time - of this writing, we expect this to be a rare case.) - - - - FindHalfProducts -
IncludeSelector: none, DomainHistogram, Items
- Always -
-
-
-
- -
-
- - - - - A generic histogram entry type. - - - - - - - This is the domain name.<br> - <br> - A product can be mapped to more than one domain. - This means that even if a name appears in this histogram and the - Count is greater than 1, you won't necessarily see the - same name returned for each returned product (in the Product node - of the response). That is, Product.DomainName only - returns the most applicable domain name (as determined by eBay). - - - - FindHalfProducts - Conditionally -
IncludeSelector: DomainHistogram
-
- - FindProducts - Conditionally -
IncludeSelector: DomainHistogram
-
-
-
-
- - - - This is the number of products found in the domain. - If a product is mapped to more than one domain, it is counted separately - for each domain. (For example, if the same product name appears in both - Children's Books and Fiction Books, the count for both of these - domains will include that product.) This means you cannot sum the - product counts to determine the total number of matching products - across all domains. The histogram is only intended to show the number - of matching products in each individual domain. - - - - FindHalfProducts - Conditionally -
IncludeSelector: DomainHistogram
-
- - FindProducts - Conditionally -
IncludeSelector: DomainHistogram
-
-
-
-
- -
-
- - - - - The seller's requirements regarding whether the buyer pays - for shipping insurance. - - - - - - - (in/out) The seller offers the buyer the choice of paying - for shipping insurance or not. - - - - - - - (in/out) The seller requires that the buyer pay for - shipping insurance. - - - - - - - (in/out) The seller does not offer shipping insurance to the buyer. - - - - - - - (in/out) The seller is not charging separately for shipping - insurance costs; any insurance is already included in the - base shipping cost. - - - - - - - (in/out) Shipping insurance is not offered as a separate option on the site - where the item is listed. (Some shipping services, such as - DE_InsuredExpressOrCourier, include insurance as part of the service.) If - another insurance option is specified in the listing request and the site does - not support shipping insurance as a separate option, eBay will reset the - insurance option to this value. At the time of this writing, this option is - only meaningful for the eBay Germany, Austria, and Switzerland sites. - - - - - - - Placeholder value. See - <a href="types/simpleTypes.html#token">token</a>. - - - - - - - - - - Shipping costs and options related to an international shipping service. When used - as input, if one is provided, at least one domestic ShippingService must be - provided. This type does not exist before compatibility level 383. - - - - - - - The insurance cost associated with shipping a single item with this shipping - service. If the buyer bought more than one of this item, this proportional to - QuantitySold. If the item has not yet been sold, insurance information cannot - be calculated and the value is 0.00. For calculated shipping only. - - - - GetShippingCosts - Conditionally - - - - - - - - An international shipping service offered for shipping the item (for - example, UPS Ground). For flat and calculated shipping. - - - - GetShippingCosts - Conditionally - - - - - - - - Cost of shipping each additional item beyond the first item. Zero for single- - item listings. For flat shipping only. - - - - GetShippingCosts - Conditionally - - - - - - - - The basic shipping cost of the item. If multiple items were purchased, this - includes the ShippingServiceAdditionalCost. - - - - GetShippingCosts - Conditionally - - - - - - - - Seller-preferred presentation order relative to other service options. Valid - values are: 1, 2 and 3 (first, second and third choices). For flat and - calculated shipping. - - - - GetShippingCosts - Conditionally - - - - - - - - An international location or region to which the item may be shipped via this - particular shipping service. Associated with the shipping service by the - seller. This is basically the same as SimpleItemType.ShipToLocations except - that this is spelled out and the other is abbreviated. - - - - GetShippingCosts - Conditionally - - - - - - - - - - - - Specifies a predefined subset of item conditions. The predefined set of fields - can vary for different calls. - - - - - - - The seller specified the Item Condition as New, or - did not specify a condition. - (Excludes items that the seller listed as Used.) - - - - - - - The seller specified the Item Condition as Used, or - did not specify a condition. - (Excludes items that the seller listed as New.) - - - - - - - (out) Reserved for internal or future use. - - - - - - - - - - Identifies listing-type-related filters. - - - - - - - (in) Only retrieve listings eligible for competitive bidding at auction. - That is, only retrieve listings for which ListingType is Chinese, Dutch, or Live - (regardless of the BuyItNowEnabled value). - If a listing has a listing type of any of the following, - it is not retrieved: StoresFixedPrice, FixedPriceItem, and AdType. - - - - - - - (in) Only retrieves listings that can be purchased at a fixed price. - That is, only retrieves listings for which listing type is StoresFixedPrice or FixedPriceItem. - Whether StoresFixedPrice items are retrieved depends on the site default. - If StoresFixedPrice items are retrieved, they are returned after the other retrieved items. - Also retrieves Chinese and Dutch auction listings for which BuyItNowEnabled is true. - Does not retrieve listings for which listing type is AdType or Live, - and does not retrieve auction listings for which BuyItNowEnabled is false. - - - - - - - (in) Returns all listing types (the default for FindItemsAdvanced). - It is recommended that you use AllItemTypes instead of AllItems. - Whether StoresFixedPrice items are retrieved depends on the site default. - - - - - - - (in) Only retrieves listings for which the listing type is StoresFixedPrice. - - - - - - - (in) Excludes listings that have listing type set to StoresFixedPrice. - Excludes listings that have listing type set to AdType or Live. - Excludes auction listings in which BuyItNowEnabled is false. - - - - - - - (in) Excludes listings that have listing type set to StoresFixedPrice. - - - - - - - (in) Retrieves listings whether or not listing type is set to StoresFixedPrice; include auction items. - In searches for items, you must specify the AllItemTypes value if you want Store Inventory format (StoresFixedPrice) items to be returned. - - - - - - - (in) Retrieves fixed-price items. - Whether StoresFixedPrice items are retrieved does not depend on the site default. - The StoresFixedPrice items are retrieved after the basic fixed price items. - Items are retrieved whether or not listing type is set to StoresFixedPrice. - Does not retrieve items for which listing type is AdType or Live. - Does not retrieve auction items for which BuyItNowEnabled is false. - - - - - - - (out) Reserved for internal or future use. - - - - - - - (in) Only retrieves Classified Ad format listings. - - - - - - - Restricts listings to return only items that have the Ad Format feature. - - - - - - - - - - Specifies an active or ended listing's status in eBay's processing - workflow. If a listing ends with a sale (or sales), eBay needs to - update the sale details (e.g., total price and buyer/high bidder) - and the final value fee. This processing can take several minutes. - If you retrieve a sold item and no details about the buyer/high - bidder are returned, use this - listing status information to determine whether eBay has finished - processing the listing. - - - - - - - (out) The listing is still live, or it has recently ended - but eBay has not completed processing - the listing (e.g., we're still determining the high bidder). - A multi-item listing is considered active until all items - have winning bids or purchases or the listing's end time - has passed. (That is, if the listing has a Quantity of 10, - the sale of 1 of those items doesn't end the listing.) - If the listing has ended but this Active - status is returned, please allow several minutes for eBay to - finish processing the listing. - - - - - - - (out) The listing has ended and eBay has completed processing - of the sale (if any), such as determining the high bidder. - - - - - - - (out) The listing has ended and eBay has completed processing - of the sale (if any), such as determining the high bidder. - You can think of Completed and Ended as essentially equivalent. - (The difference is only meaningful to the seller of the item, - as Completed indicates whether eBay has finished calculating - certain selling fees.) - - - - - - - (out) Placeholder value. See - <a href="types/simpleTypes.html#token">token</a>. - - - - - - - - - - Specifies the selling format used for a listing. - - - - - - - Unknown auction type. (This is not normally used.) - - - - - - - Single-quantity online auction format. - A Chinese auction has a Quantity of 1. Buyers engage in competitive bidding, - although Buy It Now may be offered as long as no bids have been placed. - Online auctions are listed on eBay.com, and they are also listed in - the seller's eBay Store if the seller is a Store owner. - - - - - - - Multiple-quantity online auction format. - A Dutch auction has a Quantity greater than 1. Buyers engage in - competitive bidding. Some sites also offer Buy It Now for Dutch auctions. - Online auctions are listed on eBay.com, and they are also listed in - the seller's eBay Store if the seller is a Store owner. - - - - - - - Live auction, on-site auction that can include non-eBay bidders. - Live auctions are listed on the eBay Live Auctions site, in live auction categories. - They can also appear on eBay if the seller lists the lot in a secondary category - that is an eBay category. - - - - - - - Reserved for future use. - - - - - - - Advertisement to solicit inquiries on listings such as real estate. - Permits no bidding on that item, service, or property. To express interest, - a buyer fills out a contact form that eBay forwards to the the seller as a lead. - This format does not enable buyers and sellers to transact online through eBay, - and eBay Feedback is not available for ad format listings. - - - - - - - A fixed-price format for eBay Store sellers. - Store Inventory listings appear after other listings in regular browse and search - item lists on eBay. They have a lower Insertion Fee and longer listing durations. - Only specified by sellers who have an eBay Store. - Store Inventory listings are listed on eBay.com, and they are also listed in - the seller's eBay Store. - - - - - - - Second chance offer made to a non-winning bidder on an ended listing. - A seller can make an offer to a non-winning bidder when either the winning bidder - has failed to pay for an item or the seller has a duplicate of the item. - Second-chance offer items are on eBay, but they do not appear when browsing or searching listings. You need to already know the item ID - in order to retrieve a second-chance offer. - - - - - - - A basic fixed-price listing with a Quantity of 1 or more. Allows no auction-style bidding. - Also known as Buy It Now Only on some sites (not to be confused with the BuyItNow option that - is available for Chinese auctions). - Fixed-price listings appear on eBay.com, and they are also listed in - the seller's eBay Store if the seller is a Store owner. - - - - - - - Half.com listing (item is listed on Half.com, not on eBay). - Reserved for future use. - - - - - - - Lead Generation format (advertisement-style listing to solicit - inquiries or offers, no bidding or fixed price, listed on eBay). - - - - - - - For Germany only: - eBay Express-only format (item is listed only on eBay Express - Germany, not on eBay). - - - - - - - Placeholder value. See - <a href="types/simpleTypes.html#token">token</a>. - - - - - - - - - - A list of one or more valid names and corresponding values. - - - - - - - One Item Specific that the seller has specified in the Item Specifics - section of the listing, if any.<br> - <br> - For FindProducts, this can also be an Item Specific that is defined for - a product. That is, Item Specifics can be returned both for - items and products in FindProducts. - - - - GetSingleItem - Conditionally -
IncludeSelector: ItemSpecifics
-
- - FindItemsAdvanced - Conditionally -
IncludeSelector: ItemSpecifics
-
- - FindHalfProducts - Conditionally -
IncludeSelector: none, Items, DomainHistogram
-
- - FindProducts - Conditionally -
IncludeSelector: none, Items, DomainHistogram, Details
-
-
-
-
-
-
- - - - - A name and corresponding value (a name/value pair). - - - - - - - The name of the item specific. This field is always returned for each - item specific that is returned (if any). However if the seller didn't select a value for the item specific, we suggest you don't - show the name (to avoid confusing users).<br> - <br> - For the item condition, this usually includes the - word "Condition" for eBay US, UK, Australia, and India listings; - and "Artikelzustand" for eBay Germany, Austria, and Switzerland - listings.<br> - <br> - The Name fields in return policy item specifics (if any) usually include - the word "return", "refund", and/or "warranty" for eBay US, Canada, - UK, Australia, and India listings; - and "Rucknahme", "return", and/or "refund" for eBay Germany, Austria, - and Switzerland listings.<br> - <br> - <span class="tablenote"><b>Note:</b> - Ignore item specifics with SIFFTAS in the name. These are for internal use by eBay and aren't meaningful to users.</span> - - - - GetSingleItem - Conditionally -
IncludeSelector: ItemSpecifics
-
- - FindItemsAdvanced - Conditionally -
IncludeSelector: ItemSpecifics
-
- - FindHalfProducts - Conditionally -
IncludeSelector: none, Items, DomainHistogram
-
- - FindProducts - Conditionally -
IncludeSelector: none, Items, DomainHistogram, Details
-
-
-
-
- - - - A value for the item specific. In GetSingleItem, this field is always - returned for each item specific that is returned (if any). However, - if the seller didn't select a value for the item specific, - this field may return empty, or it may return a value like "-", - "Not Selected", or "Unspecified" (or the equivalent in the language - of the site).<br> - <br> - For the item condition, this usually includes the - word "New" or "Used" for eBay US, UK, Australia, and India listings; - and "Neu" or "Gebraucht" for eBay Germany, Austria, and Switzerland - listings. - - - - GetSingleItem - Conditionally -
IncludeSelector: ItemSpecifics
-
- - FindItemsAdvanced - Conditionally -
IncludeSelector: ItemSpecifics
-
- - FindHalfProducts - Conditionally -
IncludeSelector: none, Items, DomainHistogram
-
- - FindProducts - Conditionally -
IncludeSelector: none, Items, DomainHistogram, Details
-
-
-
-
- -
-
- - - - - Used for specifying items for which a specific payment method or methods are accepted. - - - - - - - PayPal payment method. - - - - - - - PaisaPay payment method. The PaisaPay payment method is only for the India site (site ID 203). - - - - - - - Either the PayPal or the PaisaPay payment method. The PaisaPay payment method is only for the India site (site ID 203). - - - - - - - (out) Reserved for internal or future use. - - - - - - - - - - Contains CategoryID/QueryKeywords, AlternateKeywords, RelatedKeywords. - - - - - - - Numeric ID of a category on eBay. - - - - FindPopularSearches - Conditionally - - - - - - - - Category ID identifying a category that is an ancestor - of the category indicated in CategoryID. - - - - FindPopularSearches - Conditionally - - - - - - - - Specifies which query keywords corresponds to this PopularSearchResult. - Query Keywords are returned in the output to clarify which result set corresponds to which - Query Keyword inputs (as there can be more than one set of keywords in the input). - - - - FindPopularSearches - Conditionally - - - - - - - - Alternative search keywords for the query keywords, separated by semicolons. - You can use this to find other search terms buyers and sellers may be interested in. - For example, if a seller lists an item with "wedding" in the title, they may also be - interested in adding "bridal" to the title because bridal is an alternative search - keyword which buyers have used. - - - - FindPopularSearches - Conditionally - - - - - - - - Keywords related to the query keywords, separated by semicolons. - You can use this to find more detailed related keywords. For example, - the query keyword "wedding" is related to searches for - "wedding decorations;wedding favors;wedding supplies;wedding dresses..." which helps - the seller and buyer specify their query with more detail and precision. - - - - FindPopularSearches - Conditionally - - - - - - - - - - - - Specifies the criteria for filtering search results by site, where site is determined by the site ID in the request. - - - - - - - (in) Items listed in the currency implied by the site specified in the - request. - - - - - - - (in) Items located in the country implied by the site specified in the - request. - - - - - - - (in) Items available to the country implied by the site specified in the - request. For the US site, this implies listings from ALL English-language - countries that are available to the US. - - - - - - - (in) Items listed on the site specified in the request, regardless of listing - currency. - - - - - - - (in) Items located in Belgium or listed on one of the two Belgian sites. - - - - - - - (out) Reserved for internal or future use. - - - - - - - - - - ProductID type for product searches. - - - - - - - ISBN-10 or ISBN-13 value for books. (The string length of ProductID - indicates whether the ID is 10 or 13 characters.) - If you know a book's ISBN, you can use this instead of the - eBay CatalogItem or Reference ID to search for that book. - Max length of corresponding value: 13 - - - - - - - EAN value for books. (This is used more commonly in - European countries.) - If you know a book's EAN, you can use this instead of the - eBay CatalogItem or Reference ID to search for that book. - Max length of corresponding value: 13 - - - - - - - UPC value for products in Music (e.g., CDs), DVDs & Movies, - and Video Games categories (or domains). - If you know a product's UPC, you can use this instead of the - eBay CatalogItem or Reference ID to search for that product. - Max length of corresponding value: 12 - - - - - - - Reserved for future use. - - - - - - - Reserved for future use. - - - - - - - An eBay catalog product ID. This is an ID that was used to list - a particular item. The CatalogItem ID represents a particular version - of a catalog product. (A given version could have an older or newer - description, set of Item Specifics, or other details.) - So the same product could have different CatalogItem IDs at different - times. Use this for searching when you you have obtained the product ID - from a listed item (using the eBay Web site UI or another source), - and you don't know the reference ID yet. - Max length of corresponding value: 4000 - - - - - - - The global reference ID for an eBay catalog product. - A reference ID is a fixed reference to a product - (regardless of version). Use this instead of CatalogItem when you - know a product's reference ID (because older CatalogItem IDs are - more likely to become obsolete over time.) - One reference ID can be associated with multiple CatalogItem IDs. - To determine valid reference IDs for products, first call - FindProducts with QueryKeywords (or ProductID). - Each product in the response includes a reference ID. - - - - - - - (out) Reserved for internal or future use. - - - - - - - - - - Product ID has an attribute of ProductIDCodeType and a string value. - - - - - - - - The nature of identifier being used. For FindHalfProducts, FindProducts, - FindItemsAdvanced, and FindReviewsAndGuides, only Reference, ISBN, UPC, - and EAN are supported. - Required when ProductID is specified. - - - - FindReviewsAndGuides - FindHalfProducts - FindProducts - FindItemsAdvanced - CatalogItem,MPN, Keywords - Conditionally - - - FindReviewsAndGuides - Conditionally - - - - - - - - - - - - Controls the order of product (not item) searches. - - - - - - - Sort by product popularity (as determined by eBay). - (This is the default sort order.) - - - - - - - Sort by average rating. - - - - - - - Sort by the number of reviews on eBay. - - - - - - - Sort by the number of active items listed with this product. - - - - - - - Sort by the product title. - - - - - - - Reserved for values that are not available in the version of the schema - you are using. If eBay adds a new value to this code type as of a - newer version, we return CustomCode instead when you specify a - lower request version. - - - - - - - - - - - - Used by QuantityOperator to specify that you are seeking quantities less than Quantity. - - - - - - - Specifies quantities less than or equal to Quantity. - - - - - - - Specifies quantities equal to Quantity. - - - - - - - Specifies quantities greater than Quantity. - - - - - - - Specifies quantities greater than or equal to Quantity. - - - - - - - Reserved for internal or future use. - - - - - - - - - - Type for the return policy details of an item. - - - - - - - Specifies how a refund will be made, e.g. as an exchange. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - Specifies the length of time in which the item must be returned - under the return policy. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - Information about returns accepted. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - A description of the return policy for the item. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - Information about the warranty offered. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - The type of warranty offered. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - The length of the warranty offered. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - Contains the EAN. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - The party who pays the cost of shipping for a returned item. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- -
-
- - - - - Contains product reviews written by eBay members. - - - - - - - The product's average rating (out of 5) based on all reviews. - For example, a value like 4.5 would mean the average rating - is 4.5 out of 5. (See ReviewCount for the total number of reviews.) - - - 0 - 5 - - FindReviewsAndGuides - Conditionally - - - - - - - - An eBay member's review of the product. - - - 20 - - FindReviewsAndGuides - Conditionally - - - - - - - - - - - - A product review written by an eBay member. - - - - - - - A link to the full review on the eBay Web site. - This URL optimized for natural search: "_W0QQ" is like "?" - (question mark), "QQ" is like "&" (ampersand), - and "Z" is like "=" (equals sign).<br> - <br> - <span class="tablenote"><b>Note:</b> - For a link to all reviews for the product, remove the upvr parameter - from this URL. See the eBay Web Services guide for an example. - </span> - - - - FindReviewsAndGuides - Conditionally - - - - - - - - The title of the review. - - - 55 - - FindReviewsAndGuides - Conditionally - - - - - - - - The eBay member's rating of the product. - - - 0 - 5 - - FindReviewsAndGuides - Conditionally - - - - - - - - The text of the review. If the review is longer than - 2000 characters, the text is cut off and it ends with "...". - See Review.URL for a link to the full text of the review. - - - 2000 - - FindReviewsAndGuides - Conditionally - - - - - - - - The reviewer's eBay user ID. - - - - FindReviewsAndGuides - Conditionally - - - - - - - - The time and date when the reviewer posted the review. - - - - FindReviewsAndGuides - Conditionally - - - - - - - - - - - - Type for expressing sales tax data. - - - - - - - Percent of an item's price to be charged as the sales - tax for the transaction. The value passed in is stored with a - precision of 3 digits after the decimal point (##.###). - - - - GetShippingCosts - Conditionally - - - - - - - - State or jurisdiction for which the sales tax is being collected. - Only returned if the seller specified a value. - - - - GetShippingCosts - Conditionally - - - - - - - - (US only) Whether shipping costs were part of the base amount - that was taxed. Flat or calculated shipping. - - - - GetShippingCosts - Conditionally - - - - - - - - (US only) The amount of sales tax, calculated for a - transaction based on the SalesTaxPercent and pricing information. - - - - GetShippingCosts - Conditionally - - - - - - - - - - - - SearchFlagCodeType - Search flags for FindItemsAdvanced. - - - - - - - Return only charity item listings. - - - - - - - Return only gift items. - - - - - - - Return only items that have been listed with Now and New. Applicable for - certain sites only. - - - - - - - Perform a local search. - - - - - - - If specified, only items with free shipping for the user's location are - returned. The user's location is determined from the site ID specified - in the request. If false, no filtering is done via this attribute. A - listing is not considered a free shipping listing if it requires - insurance or requires pick up or requires a shipping surcharge. - - - - - - - Return Gallery items only. - - - - - - - Picture. - - - - - - - Limits the results to Get It Fast listings. - - - - - - - Limits the results to only those listings for which lot size is 2 or greater. - - - - - - - Limits the results based on each item's eligibility to appear on the - mobile.de site. If - specified, queries for eligible items only. If not specified, the search - results are not affected. Only applicable for items listed on the eBay - Germany site (site ID 77) in subcategories of mobile.de search-enabled - categories. - - - - - - - If specified, limits the results to digitally delivered good only. - - - - - - - (out) Reserved for internal or future use. - - - - - - - - - - Container for items. Can contain zero, one, or multiple - SimpleItemType objects, each of which has data for an item listing. - - - - - - - Category name breadcrumb. - Used in building a category-browsing path, i.e. a path of "breadcrumbs" (e.g., Computers & Networking > Technology Books > Certification). - - - - FindItemsAdvanced - Conditionally - - - - - - - - Category ID breadcrumb. - Used in building a category-browsing path, i.e. a path of "breadcrumbs" (e.g., Computers & Networking > Technology Books > Certification). - - - - FindItemsAdvanced - Conditionally - - - - - - - - Item count of the category. - - - - FindItemsAdvanced - Conditionally - - - - - - - - Array of simple items. - - - - FindItemsAdvanced - Conditionally - - - - - - - - - - - - Type of seller account. This value can be returned if the German site (site ID - 77) or eBay Motors site (site ID 100) is specified. - - - - - - - Type of seller account not defined. - - - - - - - Private seller account. - - - - - - - Commercial seller account. - - - - - - - (out) Reserved for internal or future use. - - - - - - - - - - Type for the shipping-related details for an item or transaction. - - - - - - - The name of a shipping service. - - - - GetShippingCosts - Always - - - - - - - - The basic shipping cost of the item. If multiple items were purchased, this - includes the ShippingServiceAdditionalCost. - - - - GetShippingCosts - Always - - - GetSingleItem - Conditionally -
IncludeSelector: ShippingCosts
-
- - FindItems - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: none, Details, SearchDetails, SellerInfo, ItemSpecifics, ExpansionItemCount, CategoryHistogram
-
- - FindHalfProducts - Conditionally -
IncludeSelector: Items
-
- - FindPopularItems - Conditionally - - - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - The cost of insurance. For flat rate shipping, this is the value set by the - seller, if any. For calculated shipping, this is the value calculated by eBay - with the shipping carrier for the particular item and can only be determined - once the final item price is known when the listing ends. To determine whether - a listing has ended, see EndTime or ListingStatus in GetSingleItem. - - - - GetShippingCosts - Conditionally - - - GetSingleItem - Conditionally -
IncludeSelector: ShippingCosts
-
-
-
-
- - - - How the seller stated that cost of shipping is to be determined, such as flat rate - or calculated or free.<br> - <br> - In GetSingleItem, this is always returned when ShippingCostSummary is - returned. - - - - GetShippingCosts - Freight, Free - Always - - - GetSingleItem - Freight, Free - Conditionally -
IncludeSelector: ShippingCosts
-
- - FindItems - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: none, Details, SearchDetails, SellerInfo, ItemSpecifics, ExpansionItemCount, CategoryHistogram
-
- - FindHalfProducts - Conditionally -
IncludeSelector: Items
-
- - FindPopularItems - Always - - - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - Whether the seller offers shipping insurance and, if - so, whether the insurance is optional or required. Flat and - calculated shipping. - This field is ignored when Item.ListingType equals Express. - - - - GetShippingCosts - Conditionally - - - - - -
-
- - - - - Type for the shipping-related details for an item or transaction. - - - - - - - Indicates whether the seller has opted the listing into the Get - It Fast feature. If GetItFast is true and if at least one of - the domestic shipping services offered by the seller is an - expedited shipping service, every shipping service offered by - the seller is considered a Get It Fast service, and the seller - commits to delivering the item to the buyer-selected shipping - service within one day. - - - - GetShippingCosts - Conditionally - - - Enabling Get It Fast - - http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=GetItFast - - - - - - - - The cost of insurance. For flat rate shipping, this is the value set by the - seller, if any. For calculated shipping, this is the value calculated by eBay - with the shipping carrier for the particular item and can only be determined - once the final item price is known when the listing ends. To determine whether - a listing has ended, use GetSingleItem. Not applicable to eBay Motors vehicle listings. - - - 0.00 - - - - GetShippingCosts - Conditionally - - - - - - - - Whether the seller offers shipping insurance and, if - so, whether the insurance is optional or required. Flat and - calculated shipping. - This field is ignored when Item.ListingType equals Express. - - - - GetShippingCosts - Conditionally - - - - - - - - Shipping costs and options related to an international shipping service. - <br> - Not applicable to Half.com or eBay Motors vehicle listings. - This field is ignored when Item.ListingType=Express. - - - - GetShippingCosts - Conditionally -
DetailLevel: none, ItemReturnDescription, - ItemReturnAttributes, ReturnAll
-
-
-
-
- - - - Sales tax details. US site only. Flat and calculated shipping. - If your application normally calculates sales tax without using eBay's tax - tables, you should understand how purchases via eBay Express will affect - the way you process payments. - For general information about listings on eBay Express, - see the eBay Web Services Guide links below. - Not applicable to eBay Motors vehicle listings. - - - - GetShippingCosts - Conditionally - - - Specify Sales Tax for Express and eBay - - http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=ExpressTax - - - - - - - - For most applicable calls, returns the words No Error or returns an error - message related to an attempt to calculate shipping rates. For calculated - shipping only. - Not applicable to Half.com or eBay Motors vehicle listings. - - - - GetShippingCosts - Conditionally - - - - - - - - Shipping costs and options related to domestic shipping services offered by - the seller. Flat and calculated shipping.<br> - Not applicable to Half.com or eBay Motors vehicle listings. - - - - GetShippingCosts - Conditionally - - - - - - - - Tax details for a jurisdiction such as a state or province. - Returned empty in if no tax table was used. - Not applicable to Half.com. - - - - GetShippingCosts - Conditionally - - - - - - - - The cost of insurance for items shipped internationally. For flat rate - shipping, this is the value set by the seller, if any. For calculated - shipping, this is the value calculated by eBay with the shipping carrier for - the particular item and can only be determined once the final item price is - known when the listing ends. To determine whether a listing has ended, use - GetSingleItem. Not applicable to eBay Motors vehicle listings. - - - 0.00 - - - - GetShippingCosts - Conditionally - - - - - - - - Whether the seller offers shipping insurance for items shipped internationally - and, if so, whether the insurance is optional or required. Flat and calculated - shipping. This field is ignored when Item.ListingType equals Express. - - - - GetShippingCosts - Conditionally - - - - - -
-
- - - - - Shipping costs and options related to a domestic shipping service. - - - - - - - The insurance cost associated with shipping a single item with this shipping - service. If the buyer bought more than one of this item, this proportional to - QuantitySold. If the item has not yet been sold, insurance information cannot - be calculated and the value is 0.00. For calculated shipping only. - - - - GetShippingCosts - Conditionally - - - - - - - - A domestic shipping service offered for shipping the item (for example, UPS - Ground). For flat and calculated shipping. - - - - GetShippingCosts - Conditionally - - - - - - - - The meaning of this element depends on the call and on whether flat or - calculated shipping has been selected. (For example, it could be the - cost to ship a single item, the cost to ship all items, or the cost to ship - just the first of many items, with ShippingServiceAdditionalCost accounting - for the rest.) For flat and calculated shipping. - - - - GetShippingCosts - Conditionally - - - - - - - - The cost of shipping each additional item beyond the first item. For input, - this is required if the listing is for multiple items and should be zero for - single-item listings. Default value is 0.00. For flat shipping only. - Not applicable to Half.com. - - - - GetShippingCosts - Conditionally - - - - - - - - Seller-preferred presentation order relative to other - service options. Valid values: 1 (1st choice), 2 (2nd choice), - 3 (3rd choice). For flat and calculated shipping. - Not applicable to Half.com. - - - - GetShippingCosts - Conditionally - - - - - - - - Indicates whether the service is an expedited shipping service. See Enabling Get It Fast. - Not applicable to Half.com. - - - - GetShippingCosts - Conditionally - - - - - - - - The minimum guaranteed number of days in which the shipping carrier - can ship an item (not including the time it takes the seller to - deliver the item to the shipping carrier). See Enabling Get It Fast. - Not applicable to Half.com. - - - - GetShippingCosts - Conditionally - - - - - - - - The maximum guaranteed number of days the shipping carrier will - take to ship an item (not including the time it takes the seller to - deliver the item to the shipping carrier). See Enabling Get It Fast. - Not applicable to Half.com. - - - - GetShippingCosts - Conditionally - - - - - - - - An additional fee to charge US buyers who ship via UPS to Alaska, Hawaii - or Puerto Rico. Can only be assigned a value for Parts and Accessories - items on the eBay US and Motors sites. Only returned if set. - If some transactions in an order have a surcharge, surcharge is added - only for those transactions. - Flat rate shipping only. - - - - GetShippingCosts - Conditionally - - - - - - - - An international location or region to which the item may be shipped via this - particular shipping service. Associated with the shipping service by the - seller. Use GeteBayDetails to determine which locations are valid per site. - These values are string equivalents of values found in ShippingRegionCodeType - and CountryCodeType. - - - - GetShippingCosts - Conditionally - - - ShipToLocation - - http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=ShipToLocation - - - - - - - - - - - - The shipping cost model offered by the seller. - - - - - - - The flat rate shipping model: the seller establishes the cost of shipping and cost of - shipping insurance, regardless of what any buyer-selected shipping service - might charge the seller. - - - - - - - The calculated shipping model: the posted cost of shipping is based on the - seller-offered and buyer-selected shipping service, where the shipping costs - are calculated by eBay and the shipping carrier based on the buyer's address, - and any packaging/handling costs established by the seller are automatically - rolled into the total. - - - - - - - The freight shipping model: the cost of shipping is determined by a third - party, FreightQuote.com, based on the item location (zip code). Currently, - Freight can only be specified on input via eBay Web site, not via API. - - - - - - - Free is used when the seller is declaring that shipping is free for the buyer. - Since Free cannot be selected via API, the seller has two options for - signifying that shipping is free when listing an item: - <br> - - omit shipping details, mention in the item description that shipping is - free, and set ShippingTermsInDescription to true - <br> - - select an arbitrary shipping service and set its shipping cost to 0, mention - in the item description that shipping is free, and set - ShippingTermsInDescription to true - <br> - The latter is a better way to communicate "free shipping" because eBay picks - up the "0" cost and can more accurately identify shipping costs in search - results. - - - - - - - The seller did not specify the shipping type. - - - - - - - The seller specified one or more flat domestic shipping services - and one or more calculated international shipping services. - - - - - - - The seller specified one or more calculated domestic shipping services - and one or more flat international shipping services. - - - - - - - Placeholder value. See - <a href="types/simpleTypes.html#token">token</a>. - - - - - - - - - - Container for a list of items. Can contain zero, one, or multiple - SimpleItemType objects, each of which conveys the data for one item listing. - - - - - - - Contains data for an item listing. - - - - FindItemsAdvanced - FindPopularItems - Always - - - FindHalfProducts - Conditionally -
IncludeSelector: Items
-
- - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
-
-
- - - - - - - Sorts items by Best Match, and no sort order applies. If specified, - then Best Match sort also applies to CategoryHistogram. - - - - - - - Placeholder value. See - <a href="types/simpleTypes.html#token">token</a>. - - - - - - - Sorts items by end time in ascending or descending order. - - - - - - - Sort by number of bids on the item in ascending or descending order. - - - - - - - Sort by country; no sort order can be specified. - - - - - - - Sort by current bid in ascending or descending order. - - - - - - - Sort by distance, ascending order only. - - - - - - - Sort by start date, recently-listed first. - - - - - - - (in) Sort by BestMatchCategoryGroup so results are grouped by Best Match within a category. - - - - - - - (in) This value is part of the Price Plus Shipping Sort feature, to be enabled - by the end of Sept. 2007 for the following sites: - US (site ID 0), Germany (77), Canada (2), and Australia (15). - The Price Plus Shipping Sort feature causes item sorting to consider shipping costs. - Specify PricePlusShippingAsc to sort items by lowest cost first, as follows: - Lowest-total-cost (for items where shipping was properly specified), - then freight-shipping items, then items for which shipping was not specified (sorted by price). - - - - - - - - - - - - Whether the seller will accept a best offer for this item. - This feature enables a buyer to make a lower-priced binding offer on a - fixed price item. Buyers can't see how many offers have been made - (only the seller can see this information). To make a best offer on a - listing, use the eBay Web site. - - - - (eBay Help) Making a Best Offer (for Buyers) - http://pages.ebay.com/help/buy/best-offer.html - - - (eBay DE Hilfe) Preis vorschlagen - http://pages.ebay.de/help/buy/best-offer.html - - - GetSingleItem - Always -
IncludeSelector: Details
-
- - FindItemsAdvanced - Conditionally -
IncludeSelector: Details
-
- - FindProducts - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - The Buy It Now Price of the item (if any), in the currency - of the site on which the item was listed.<br> - <br> - For Chinese auctions (Quantity=1, competitive bidding online auctions), - Buy It Now lets a user purchase the item at a fixed price and - end the auction immediately. On most sites, after a Chinese auction has - bids, the listing is no longer eligible for Buy It Now. - However, calls can still return the Buy It Now Price that - the seller set for the listing. Use the Item.BidCount field to - determine whether an auction with Buy It Now has bids or not.<br> - <br> - Some eBay sites also support Buy It Now for Dutch auctions - (multi-quantity, competitive bidding), where you can buy multiple - items from the same listing at a fixed price, instead of bidding. - On some sites, the Buy It Now option remains available for Dutch - auctions even after there are bids. See Item.BuyItNowAvailable.<br> - <br> - For fixed-price (FixedPriceItem) and Store Inventory listings - (StoresFixedPrice), see CurrentPrice or ConvertedCurrentPrice - instead.<br> - <br> - Only returned if an item was listed with Buy It Now. - - - - (GetSingleItem) Item.ListingType - GetSingleItem.html#Response.Item.ListingType - - - Item.BuyItNowAvailable - #Response.Item.BuyItNowAvailable - - - - Item.ConvertedBuyItNowPrice - #Response.Item.ConvertedBuyItNowPrice - - - - Item.ConvertedCurrentPrice - #Response.Item.ConvertedCurrentPrice - - - - (eBay Help) Buying with Buy It Now - http://pages.ebay.com/help/buy/how-buy-bin.html - - - (eBay DE Hilfe) Kaufen mit Sofort-Kaufen - http://pages.ebay.de/help/buy/how-buy-bin.html - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
- - FindItemsAdvanced - Conditionally -
IncludeSelector: Details
-
- - FindProducts - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - The seller's description of the item, if any. This can include - HTML markup and JavaScript. See - <a href="types/simpleTypes.html#string">string</a> - in Simple Schema Types. <br> - <br> - Some sellers don't specify their own listing description. - Instead, they use a stock description from a catalog available - through eBay. (GetSingleItem doesn't return this stock information.) - - - 500000 (some sites may allow more, but the exact number may vary) - - GetSingleItem - Conditionally -
IncludeSelector: Description
-
-
-
-
- - - - The ID that uniquely identifies the item listing. eBay generates this ID - when an item is listed. This ID is unique across all eBay sites. - - - 19 (Note: The eBay database specifies 38. Currently, Item IDs are usually 9 to 12 digits) - - FindItems - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: none, Details, SearchDetails, SellerInfo, ItemSpecifics, ExpansionItemCount, CategoryHistogram
-
- - GetItemStatus - Always - - - GetMultipleItems - Always - - - GetSingleItem - Always -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
-
- - FindHalfProducts - Conditionally -
IncludeSelector: Items
-
- - FindPopularItems - Always - - - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - For Dutch auctions (not Chinese auctions) this indicates whether there - is a Buy It Now option. (On some sites, the Buy It Now option remains - available for Dutch auctions even after there are bids.) - Applicable to the Germany site (site ID 77) only. - - - - FindItems - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: none, Details, SearchDetails, SellerInfo, ItemSpecifics, ExpansionItemCount, CategoryHistogram
-
- - GetItemStatus - Conditionally - - - GetMultipleItems - Conditionally - - - GetSingleItem - Conditionally -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
-
- - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - The listing's Buy It Now Price (if any), converted into the currency - of the site to which you sent this request. <br> - <br> - Price fields are returned as doubles, not necessarily in the traditional - monetary format of the site's country. - For example, a US Dollar value might be returned as - 3.880001 instead of 3.88.<br> - <br> - For Chinese auctions (Quantity=1, competitive bidding online auctions), - Buy It Now lets a user purchase the item at a fixed price and - end the auction immediately. On most sites, after a Chinese - auction has bids, the listing is no longer eligible for Buy It Now. - However, calls like FindItems still return the Buy It Now Price that - the seller set for the listing. Use the Item.BidCount field to - determine whether an auction with Buy It Now has bids or not - (and therefore whether it is still eligible to be purchased with - Buy It Now).<br> - <br> - Some eBay sites also support Buy It Now for Dutch auctions - (multi-quantity, competitive bidding), where you can buy multiple - items from the same listing at a fixed price, instead of bidding. - On some sites, the Buy It Now option remains available for Dutch - auctions even after there are bids. See Item.BuyItNowAvailable.<br> - <br> - For fixed-price (FixedPriceItem) and Store Inventory listings - (StoresFixedPrice), see CurrentPrice or ConvertedCurrentPrice - instead.<br> - <br> - Only returned if an item was listed with Buy It Now.<br> - <br> - For active items, refresh this value every 24 hours to - pick up the current conversion rates (if this value has been converted). - - - - (GetSingleItem) Item.ListingType - GetSingleItem.html#Response.Item.ListingType - - - Item.BuyItNowAvailable - #Response.Item.BuyItNowAvailable - - - - Item.BuyItNowPrice - #Response.Item.BuyItNowPrice - - - - Item.ConvertedCurrentPrice - #Response.Item.ConvertedCurrentPrice - - - - (eBay Help) Buying with Buy It Now - http://pages.ebay.com/help/buy/how-buy-bin.html - - - (eBay DE Hilfe) Kaufen mit Sofort-Kaufen - http://pages.ebay.de/help/buy/how-buy-bin.html - - - FindItems - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: none, Details, SearchDetails, SellerInfo, ItemSpecifics, ExpansionItemCount, CategoryHistogram
-
- - GetMultipleItems - Conditionally - - - GetSingleItem - Conditionally -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
-
- - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - Time stamp (in <a href="types/simpleTypes.html#dateTime">GMT</a>) when the listing is scheduled to end - or the actual end time if the item has ended. - - - - FindItems - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: none, Details, SearchDetails, SellerInfo, ItemSpecifics, ExpansionItemCount, CategoryHistogram
-
- - GetItemStatus - Always - - - GetMultipleItems - Always - - - GetSingleItem - Always -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
-
- - FindPopularItems - Always - - - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - Time stamp (in <a href="types/simpleTypes.html#dateTime">GMT</a>) that - eBay recorded as the moment that the listing was made available. - - - - GetSingleItem - Always -
IncludeSelector: Details
-
- - FindItemsAdvanced - Conditionally -
IncludeSelector: Details
-
- - FindProducts - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - The URL to view this listing on eBay. - This URL is optimized to support natural search. - That is, this URL is designed to make items on eBay easier to find via - popular Internet search engines. - For example, this URL specifies the item title, and it is - optimized for natural search: "_W0QQ" is like "?" (question mark), - "QQ" is like "&" (ampersand), - and "Z" is like "=" (equals sign). - You shouldn't modify the query syntax in your application. For example, - eBay won't recognize the URL if you change QQ to ?. - - - - FindItems - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: none, Details, SearchDetails, SellerInfo, ItemSpecifics, ExpansionItemCount, CategoryHistogram
-
- - GetMultipleItems - Always - - - GetSingleItem - Always -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
-
- - FindHalfProducts - Conditionally -
IncludeSelector: Items
-
- - FindPopularItems - Always - - - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - The format of the listing, such as online auction, fixed price, - or advertisement format. - - - - FindItems - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: none, Details, SearchDetails, SellerInfo, ItemSpecifics, ExpansionItemCount, CategoryHistogram
- Auction, Half -
- - GetMultipleItems - Always - - - GetSingleItem - Always -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
- Auction, Half -
- - FindPopularItems - Always - Auction, Half - - - FindProducts - Conditionally -
IncludeSelector: Items, Details
- Auction, Half -
-
-
-
- - - - Physical location of the item, as specified by the seller. - (This gives a general indication of where the item will be - shipped or delivered from.) - - - - GetMultipleItems - GetSingleItem - Conditionally -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
-
-
-
-
- - - - Identifies the payment method (such as PayPal) the seller - will accept when the buyer pays for the item. <br> - <br> - <span class="tablenote"><b>Note:</b> - If the seller only accepts PayPal, the buyer can still pay - with a credit card. PayPal supports major credit cards.</span> <br> - <br> - Payment methods are not applicable to eBay Real Estate advertisement - listings, or other Classified Ad format listings. - - - - GetSingleItem - Conditionally - Escrow, PrePayDelivery, CODPrePayDelivery, PostalTransfer -
IncludeSelector: Details
-
- - FindItemsAdvanced - Conditionally -
IncludeSelector: Details
-
- - FindProducts - Escrow, PrePayDelivery, CODPrePayDelivery, PostalTransfer - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - URL for a picture used as the Gallery thumbnail, if any. - The image uses one of the following graphics formats: - JPEG, BMP, TIF, or GIF. - Only returned if the seller chose to show a gallery image. - - - - FindItems - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: none, Details, SearchDetails, SellerInfo, ItemSpecifics, ExpansionItemCount, CategoryHistogram
-
- - GetMultipleItems - Conditionally - - - GetSingleItem - Conditionally -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
-
- - FindPopularItems - Conditionally - - - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - Contains the URL for an image associated with the item, if any. - Only returned if the seller chose to include at least one picture - in the listing. (This doesn't return URLs of pictures that the - seller specified via HTML IMG tags in Description.)<br> - <br> - Items listed the main eBay site can have a maximum of 12 picture URLs - hosted by eBay Picture Services or a maximum of 6 picture URLs hosted by - a third party (such as the seller or a photo site). - On the US eBay Motors site (for all vehicle listings), and on the - eBay Canada Motors site, a listing can have up to 24 picture URLs.<br> - <br> - eBay uses the seller's first picture at the top of the listing's - View Item page. - - - 150 - 24 - - GetMultipleItems - Conditionally - - - GetSingleItem - Conditionally -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
-
-
-
-
- - - - Postal code indicating the physical location of the item, - as specified by the seller. (This gives a general indication of where - the item will be shipped or delivered from.) - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
- - FindItemsAdvanced - Conditionally -
IncludeSelector: Details
-
- - FindProducts - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - Numeric ID of the first (or only) category in which the item is listed. - (Listings can appear in more than one category.)<br> - <br> - <span class="tablenote"><b>Note:</b> - Currently, GetSingleItem does not return a listing's - secondary category, if any.</span> - - - - GetMultipleItems - Always - - - GetSingleItem - Always -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
-
- - FindItems - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: none, Details, SearchDetails, SellerInfo, ItemSpecifics, ExpansionItemCount, CategoryHistogram
-
- - FindPopularItems - Always - - - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - Display name of the first (or only) category in which the item is - listed. This is a fully qualified category breadcrumb - (e.g., Computers & Networking:Laptops, Notebooks). - - - - GetMultipleItems - Always - - - GetSingleItem - Always -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
-
- - FindItems - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: none, Details, SearchDetails, SellerInfo, ItemSpecifics, ExpansionItemCount, CategoryHistogram
-
- - FindPopularItems - Always - - - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - The number of items the seller is offering in the listing. - (Subtract Item.QuantitySold from this value to calculate the number of - items currently available for sale.)<br> - <br> - If an online auction (with competitive bidding) has a Quantity of 1, - it's a <i>Chinese auction</i>. - If Quantity is greater than 1,it's a <i>Dutch auction</i>.<br> - <br> - Basic fixed-price and Store Inventory listings can have a - Quantity of 1 or more.<br> - <br> - The listing's current or Buy It Now price is the price of - 1 item in the listing.<br> - <br> - <span class="tablenote"><b>Note:</b> - A seller can also offer multiple items for sale with a single - price for all the items. For example, instead of listing 10 lightbulbs - for US 2.00 each, they might list 10 lightbulbs for USD 20.00 (where - you have to buy all 10). This is called a "lot". - If the listing includes a lot (or multiple lots), Quantity does not - specify the lot size; it only reflects how many lots are being sold. - For example, if the listing includes 5 lots of 10 lightbulbs each, - Quantity would be 5. (GetSingleItem does not return information about - lot sizes.)</span> - - - - Item.ListingType - #Response.Item.ListingType - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - Container for information about this listing's seller. - - - - GetSingleItem - Always -
IncludeSelector: Details
-
- - FindHalfProducts - Conditionally -
IncludeSelector: Items
-
- - FindItemsAdvanced - Conditionally -
IncludeSelector: SellerInfo
-
-
-
-
- - - - The number of bids that have been placed on the item.<br> - <br> - On most sites, once a Chinese auction has bids, the listing is no longer - eligible for Buy It Now. (This is not necessarily true - for Dutch auctions. See Item.BuyItNowAvailable for Dutch auctions.) - - - - FindItems - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: none, Details, SearchDetails, SellerInfo, ItemSpecifics, ExpansionItemCount, CategoryHistogram
-
- - GetMultipleItems - Conditionally - - - GetSingleItem - Conditionally -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
-
- - GetItemStatus - Always - - - FindPopularItems - Always - - - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - The listing's current price, converted to the currency - of the site specified in the request. - If the item is a multi-quantity listing, this is the price of one - item.<br> - <br> - Price fields are returned - as doubles, not necessarily in the usual monetary amount format of the - site. For example, a US Dollar value might be returned as - 3.879938 instead of 3.88.<br> - <br> - For competitive-bidding listings (Chinese and Dutch auctions), - this is the current minimum bid price (if the listing has no bids) or - the current high bid (if the listing has bids). - (Compare to BuyItNowPrice).<br> - <br> - For Basic Fixed-Price (FixedPriceItem), Store Inventory - (StoresFixedPrice), and Ad format (AdType) listings, this is the - current fixed price.<br> - <br> - For active items, refresh this value every 24 hours to - pick up the current conversion rates (if this value has been converted). - - - - FindItems - GetItemStatus - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: none, Details, SearchDetails, SellerInfo, ItemSpecifics, ExpansionItemCount, CategoryHistogram
-
- - GetMultipleItems - Conditionally - - (GetSingleItem) Item.CurrentPrice - GetSingleItem.html#Response.Item.CurrentPrice - - - - GetSingleItem - Conditionally -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
- - (GetSingleItem) Item.CurrentPrice - GetSingleItem.html#Response.Item.CurrentPrice - -
- - GetItemStatus - Always - - - FindPopularItems - Always - - - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - The current price of the item, in the currency of the site on which - the item was listed. That is, CurrentPrice is in the original listing - currency. If the item is a multi-quantity listing, - this is the price of one item.<br> - <br> - For competitive-bidding listings (Chinese and Dutch auctions), - this is the current minimum bid price (if the listing has no bids) or - the current high bid (if the listing has bids). - (Compare to BuyItNowPrice).<br> - <br> - For Basic Fixed-Price (FixedPriceItem), Store Inventory - (StoresFixedPrice), and Ad format (AdType) listings, this is the - current fixed price. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
- - (GetSingleItem) Item.ConvertedCurrentPrice - GetSingleItem.html#Response.Item.ConvertedCurrentPrice - -
- - FindItemsAdvanced - Conditionally -
IncludeSelector: Details
-
- - FindHalfProducts - Conditionally -
IncludeSelector: Items
-
- - FindProducts - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - For single-item (Quantity = 1) auction listings (Chinese type) that have - ended and have a winning bidder, indicates the user who is the current - high bidder.<br> - <br> - For single-item basic fixed price (FixedPriceItem) or Store Inventory - (StoresFixedPrice) listings that have ended, indicates the user who - purchased the item. <br> - <br> - Not returned for auctions that have received no bids; fixed price and - Store Inventory listings that are still active; or any multi-item - (Quantity > 1) listings (Dutch, FixedPriceItem, StoresFixedPrice). - - - - Item.Quantity - #Response.Item.Quantity - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
- - GetItemStatus - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - Specifies a listing's status in eBay's processing workflow. - If an item's EndTime is in the past, but no details about the - buyer or high bidder are shown (and the user is not anonymous), - use this listing status information to determine whether eBay has - finished processing the listing. - - - - FindItems - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: none, Details, SearchDetails, SellerInfo, ItemSpecifics, ExpansionItemCount, CategoryHistogram
-
- - GetItemStatus - Always - - - GetMultipleItems - Always - - - GetSingleItem - Always -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
-
- - FindPopularItems - Always - - - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - Number of items purchased so far from this listing. - (Subtract this value from Item.Quantity to calculate the number of - items currently available for sale.) - - - - GetSingleItem - Always -
IncludeSelector: Details
-
-
-
-
- - - - Indicates whether any bids on this item are greater than the seller's - reserve price for the listing (if any).<br> - <br> - A reserve is the lowest price at which the seller is willing to sell - the item. The reserve price is higher than the listing's opening bid - (minimum bid) and lower than the Buy It Now price, if any. - (The reserve price is only known to the seller.) - Some sellers don't set a reserve at all. If a listing does have - a reserve price, the highest bidder will only win - the item if their bid is also above that price.<br> - <br> - Only returned for online auctions that have - a reserve price. (Fixed price, Store Inventory, and classified ad - listings don't have reserve prices.) - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
- - GetItemStatus - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - An international location or region to which the seller is willing - to ship this item. <br> - <br> - <b>Applicable values</b>: - <p class="ename">&bull;&nbsp;&nbsp; Americas</p> - <p class="edef">(North, South, or Latin America)</p> - <p class="ename">&bull;&nbsp;&nbsp; Asia</p> - <p class="ename">&bull;&nbsp;&nbsp; Caribbean</p> - <p class="ename">&bull;&nbsp;&nbsp; Europe</p> - <p class="ename">&bull;&nbsp;&nbsp; EuropeanUnion</p> - <p class="ename">&bull;&nbsp;&nbsp; LatinAmerica</p> - <p class="ename">&bull;&nbsp;&nbsp; MiddleEast</p> - <p class="ename">&bull;&nbsp;&nbsp; NorthAmerica</p> - <p class="ename">&bull;&nbsp;&nbsp; Oceania</p> - <p class="edef">(Pacific region other than Asia)</p> - <p class="ename">&bull;&nbsp;&nbsp; SouthAmerica</p> - <p class="ename">&bull;&nbsp;&nbsp; WillNotShip</p> - <p class="edef">(No shipping, buyer must pick up the item)</p> - <p class="ename">&bull;&nbsp;&nbsp; Worldwide</p> - <p class="edef">(Seller will ship worldwide)</p> - <p class="ename">&bull;&nbsp;&nbsp; 2-letter country identifier</p> - <p class="edef">(See CountryCodeType for values)</p> - - - - CountryCodeType - types/CountryCodeType.html - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
- - FindItemsAdvanced - Conditionally -
IncludeSelector: Details
-
- - FindProducts - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - The name of the eBay site on which the item was originally listed. - For example, if the item is listed on the eBay US site, - the value would be US. If it's listed on the eBay Germany site, - the value would be Germany. <br> - <br> - The listing's original site can affect the values of converted - (localized) prices (when your request specifies a site - that is different from the listing's site). - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
- - FindItemsAdvanced - Conditionally -
IncludeSelector: Details
-
- - FindProducts - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - Time left before the listing ends. - The duration is represented in the ISO 8601 duration format (PnYnMnDTnHnMnS). - For ended listings, the time left is PT0S (zero seconds). - - - - FindItems - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: none, Details, SearchDetails, SellerInfo, ItemSpecifics, ExpansionItemCount, CategoryHistogram
-
- - GetItemStatus - Always - - - GetMultipleItems - Always - - - GetSingleItem - Always -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
-
- - FindPopularItems - Always - - - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - Name of the item as it appears in the listing or in search and - browse results.<br> - <br> - For US eBay Motors cars, trucks, and motorcycles, this value shows the - vehicle Make and Model instead of the seller's own title. - (For the seller's title, look for Subtitle in - Item.ItemSpecifics.NameValueList.Name in - GetSingleItem, and then use the corresponding value in - Item.ItemSpecifics.NameValueList.Value.) - - - - FindItems - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: none, Details, SearchDetails, SellerInfo, ItemSpecifics, ExpansionItemCount, CategoryHistogram
-
- - GetMultipleItems - Always - - - GetSingleItem - Always -
IncludeSelector: none, Description, ItemSpecifics, ShippingCosts, Details
-
- - FindPopularItems - Always - - - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - Contains basic shipping-related costs for the item. If Item.Quantity - is greater than 1, this is the shipping cost for one item. - If the seller offers a choice of more than one shipping service - (such as UPS Ground and USPS Media mail), this is the cost of the - "first" shipping option (usually the lowest cost option).<br> - <br> - If a listing has shipping costs, use GetShippingCosts if you want to get - more details about the services and costs that the seller is offering. - - - - GetShippingCosts - GetShippingCosts.html - - - GetSingleItem - Conditionally -
IncludeSelector: ShippingCosts
-
- - FindItems - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: none, Details, SearchDetails, SellerInfo, ItemSpecifics, ExpansionItemCount, CategoryHistogram
-
- - FindPopularItems - Always - - - FindProducts - Conditionally -
IncludeSelector: Items, Details
-
-
-
-
- - - - Category-specific fields that the seller added to describe - the listing. The names of these fields are different for items - in different categories, so they're returned in a generic - name/value structure. The field names are usually very well known - within the category.<br> - <br> - For example, a book's item specifics might include a field like - Publication Year=2007 (where Publication Year is returned in Name, - and 2007 is returned in Value), and a field like Format=Hardcover. - But a car's item specifics would be different from a book's, with - fields like Make=Toyota and Model=Prius. - And a ticket's item specifics would be different from those of - books and cars, with fields like EventType=Concerts and - Venue=The Fillmore. <br> - <br> - Some of the most common uses for item specifics are the item condition - and return policy. The return policy can include multiple - name/value fields (to explain how soon the item must be returned, how soon the refund will be given, and so forth).<br> - <br> - Only contains data if the listing includes Item Specifics. - - - - GetSingleItem - Conditionally -
IncludeSelector: ItemSpecifics
-
- - FindItemsAdvanced - Conditionally -
IncludeSelector: ItemSpecifics
-
-
-
-
- - - - The number of times the listing's View Item page has been viewed (as - determined by eBay). Only returned if the seller has chosen - to include a hit counter in the listing, and if the seller has - also chosen to make the listing's hit count publicly visible. - This field is retrieved asynchronously. If you believe the item has a - publicly visible hit count, but this field is not returned, - retry the call.<br> - <br> - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - Subtitle of the item. Only returned if the seller included a - subtitle for the listing.<br> - <br> - For US eBay Motors passenger vehicle, motorcycle, and "other vehicle" - categories or listings in CA eBay Motors passenger vehicle and - motorcycle categories, see the ItemSpecifics node for the subtitle - instead. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
- - FindItemsAdvanced - Conditionally -
IncludeSelector: Details
-
- - FindProducts - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - The fully qualified ID breadcrumb (path) of the first category. - For example, if the primary category ID is 45678, and its parent - category's ID is 123, the breadcrumb (path) would be 123:45678. - - - - GetSingleItem - Always -
IncludeSelector: Details
-
-
-
-
- - - - ID of the second category in which the item is listed. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
- - FindItemsAdvanced - Conditionally -
IncludeSelector: Details
-
- - FindProducts - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - Name of the second category in which the item is listed. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
- - FindItemsAdvanced - Conditionally -
IncludeSelector: Details
-
- - FindProducts - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - The fully qualified ID breadcrumb (path) of the second category. - For example, if the secondary category ID is 45678, and its parent - category's ID is 123, the breadcrumb (path) would be 123:45678. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - Identifier for a Giving Works listing and the benefiting nonprofit charity organization. - - - - GetSingleItem - Conditionally - - - FindItemsAdvanced - Conditionally -
IncludeSelector: SearchDetails
-
-
-
-
- - - - For a digitally delivered item, the requirements for using the item. - - - - FindItemsAdvanced - Conditionally -
IncludeSelector: SearchDetails
-
-
-
-
- - - - For a digitally delivered item, the digital-download method. - - - - FindItemsAdvanced - Conditionally -
IncludeSelector: SearchDetails
-
-
-
-
- - - - The item is featured in eBay search results on the mobile.de partner site. Applicable to eBay Germany. - - - - FindItemsAdvanced - Conditionally -
IncludeSelector: SearchDetails
-
-
-
-
- - - - A Get It Fast listing. - - - - FindItemsAdvanced - Conditionally -
IncludeSelector: SearchDetails
-
-
-
-
- - - - If true, a generic gift icon displays next the listing's title in search and browse pages. - - - - FindItemsAdvanced - Conditionally -
IncludeSelector: SearchDetails
-
-
-
-
- - - - Whether the item has a picture. - - - - FindItemsAdvanced - Conditionally -
IncludeSelector: SearchDetails
-
-
-
-
- - - - Whether the item is no more than one day old. - - - - FindItemsAdvanced - Conditionally -
IncludeSelector: SearchDetails
-
-
-
-
- - - - Whether the item is a storefront listing. - - - - FindItemsAdvanced - Conditionally -
IncludeSelector: SellerInfo
-
- - FindHalfProducts - Conditionally -
IncludeSelector: Items
-
-
-
-
- - - - The distance of the item from the buyer. - - - - FindItemsAdvanced - Conditionally -
IncludeSelector: SearchDetails
-
-
-
-
- - - - Two-letter ISO 3166 country code. Used with the Location field to indicate - the city and country where the item is located. - - - - FindItemsAdvanced - Conditionally -
IncludeSelector: Details
-
- - FindHalfProducts - Conditionally -
IncludeSelector: Items
-
- - FindProducts - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - Watch count for the item. - - - - FindPopularItems - Always - - - - - - - - Half condition codes like brand new etc - - - - FindHalfProducts - Conditionally -
IncludeSelector: Items
-
-
-
-
- - - - Seller notes while listing items. - - - - FindHalfProducts - Conditionally -
IncludeSelector: Items
-
-
-
-
- - - - If a seller specified return policy details, then this container has fields - with those details. - The fields that can be returned in this container vary by site. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - Smallest amount the next bid on the item can be. Returns same value as - Item.StartPrice (if no bids have yet been placed) or CurrentPrice plus - BidIncrement (if at least one bid has been placed). Only applicable to - Chinese and Dutch auction listings. Returns null for basic Fixed Price - (FixedPriceItem),Store Inventory (StoresFixedPrice), and Ad type listings. - - - 4000 - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - A prototype description of a well-known type of item, such as a popular book. - <br> - <br> - When returned for GetSingleItem, is always of type Reference, and serves as a global reference ID for an eBay catalog product. - <br> - <br> - When used as input, retrieves product details for one specific product. - Specify the ID as a string, and use the type attribute to - indicate the nature of the ID you are specifying. - <br> - <br> - The request requires either QueryKeywords or - ProductID, but these fields cannot be used together. - - - 4000 - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
-
-
-
- -
-
- - - - - Type to contain the data for one eBay user. Depending on the context, the user - might be the seller or the buyer in a transaction, or the bidder or winning bidder - in a listing. An object of this type is returned by a number of calls, including - the GetUser call. - - - - - - - The user's eBay user ID. A unique value. - If a bidder's user information is made - anonymous, the real ID value will be - replaced with the value "Bidder X" where X is a number - indicating the order of that user's first bid. For example, - if the user was the third bidder, UserID = Bidder 3. - <br><br> - Note that the anonymous bidder ID stays the same for a given - auction, but is different for different auctions. - For example, a bidder who is the third and then the seventh - bidder in an auction will be listed for both bids as "Bidder - 3". However, if that same bidder is the first bidder on a - different auction, the bidder will be listed for that - auction as "Bidder 1", not "Bidder 3". - - - - GetSingleItem - Always -
IncludeSelector: Details
-
- - GetUserProfile -
IncludeSelector: none, Details, FeedbackDetails, FeedbackHistory
- Always -
- - FindItemsAdvanced - Conditionally -
IncludeSelector: SellerInfo
-
-
-
-
- - - - Indicates whether the user has chosen to make their feedback score and - feedback details private (hidden from other users). Note that the percentage - of positive feedback can still be returned, even if other feedback details are - private. If a bidder's user information is made - anonymous, the value -99 is returned. - - - - GetSingleItem - Always -
IncludeSelector: Details
-
- - GetUserProfile -
IncludeSelector: none, Details, FeedbackDetails, FeedbackHistory
- Always -
-
-
-
- - - - Visual indicator of user's feedback score. - - - - GetSingleItem - Always -
IncludeSelector: Details
-
- - GetUserProfile -
IncludeSelector: none, Details, FeedbackDetails, FeedbackHistory
- Always -
- - FindItemsAdvanced - Conditionally -
IncludeSelector: SellerInfo
-
-
-
-
- - - - The aggregate feedback score of a user. A user's feedback score is the net - positive feedback minus the net negative feedback left for the user. Feedback - scores are a quantitative expression of the desirability of dealing with a - user as a buyer or a seller in transactions. Each transaction can result in - one feedback entry for a given user. (The buyer can leave feedback for the - seller, and the seller can leave feedback for the buyer.) That one feedback - can be positive, negative, or neutral. - The aggregate feedback score of a user represents that user's overall - feedback score (referred to as a - "feedback rating" on the eBay site). If the user has chosen to make their - feedback private, then FeedbackScore is not returned and FeedbackPrivate is - returned with a value of true.<br> - <br> - If a bidder's user information is made - anonymous, the value -99 is returned. - - - - GetSingleItem - Conditionally -
IncludeSelector: Details
-
- - GetUserProfile -
IncludeSelector: none, Details, FeedbackDetails, FeedbackHistory
- Always -
- - FindHalfProducts - Conditionally -
IncludeSelector: Items
-
- - FindItemsAdvanced - Conditionally -
IncludeSelector: Details
-
-
-
-
- - - - Indicates whether eBay has made this user's information anonymous. - This occurs when the listing prices (reserve, current, or Buy It Now) - reach or exceed a certain amount (such as $200 USD at the time of this - writing). - <br> - <br> - If true, certain other fields about this user are not returned, or their - values include no identifying characteristics. (The rules are explained - in the description of each field.) - If false, all user-specific fields contain the user's actual data. - - - - GetSingleItem - Conditionally - HighBidder -
IncludeSelector: Details
-
- - GetItemStatus - Conditionally - HighBidder -
IncludeSelector: Details
-
-
-
-
- - - - If true, identifies a new user who has been a registered eBay user for 30 days - or less. Always false after the user has been registered for more than 30 - days. Does not indicate an ID change. - - - - GetUserProfile -
IncludeSelector: none, Details, FeedbackDetails, FeedbackHistory
- Always -
-
-
-
- - - - The date the specified user originally registered with eBay. - If a bidder's user information is made - anonymous, the value -99 is returned. - - - - GetUserProfile -
IncludeSelector: none, Details, FeedbackDetails, FeedbackHistory
- Always -
-
-
-
- - - - The eBay site with which the user is registered. - If a bidder's user information is made - anonymous, the value -99 is returned. - - - - GetUserProfile -
IncludeSelector: none, Details, FeedbackDetails, FeedbackHistory
- Always -
-
-
-
- - - - The registration-related status of the user. - - - - GetUserProfile -
IncludeSelector: none, Details, FeedbackDetails, FeedbackHistory
- Always -
-
-
-
- - - - Type of seller account. - - - - GetUserProfile -
IncludeSelector: none, Details, FeedbackDetails, FeedbackHistory
- Always -
-
-
-
- - - - The URL of the seller's eBay Store page. - - - - GetUserProfile -
IncludeSelector: Details
- Always -
-
-
-
- - - - The name of the seller's eBay Store. - - - - GetUserProfile -
IncludeSelector: Details
- Always -
-
-
-
- - - - URL for seller's other items. - - - - GetUserProfile -
IncludeSelector: none, Details, FeedbackDetails, FeedbackHistory
- Always -
-
-
-
- - - - A link to the user's AboutMe page. - - - - GetUserProfile -
IncludeSelector: none, Details, FeedbackDetails, FeedbackHistory
- Always -
-
-
-
- - - - A link to the URL of the user's MyWorld page. - - - - GetUserProfile -
IncludeSelector: Details
- Always -
-
-
-
- - - - Location of a user's image on the MyWorld page (small version). - - - - GetUserProfile -
IncludeSelector: Details
- Always -
-
-
-
- - - - Location of a user's image on the MyWorld page (large version). - - - - GetUserProfile -
IncludeSelector: Details
- Always -
-
-
-
- - - - The URL of reviews and guides. - - - - GetUserProfile -
IncludeSelector: Details
- Always -
-
-
-
- - - - The URL of feedback details. - - - - GetUserProfile -
IncludeSelector: none, Details, FeedbackDetails, FeedbackHistory
- Always -
-
-
-
- - - - The percentage value of a user's positive feedback. - - - - GetSingleItem - Seller -
IncludeSelector: Details
- Always -
-
-
-
- -
-
- - - - - eBay sites (by the country in which each resides) on -which a user is registered and on which items can be listed. - - - - - - - USA, site ID 0, abbreviation US, currency USD. - - - - - - - Canada, site ID 2, abbreviation CA, currencies CAD and USD. - - - - - - - United Kingdom, site ID 3, abbreviation UK, currency GBP. - - - - - - - Australia, site ID 15, abbreviation AU, currency AUD. - - - - - - - Austria, site ID 16, abbreviation AT, currency EUR. - - - - - - - Belgium (French), site ID 23, abbreviation BEFR, currency EUR. - - - - - - - France, site ID 71, abbreviation FR, currency EUR. - - - - - - - Germany, site ID 77, abbreviation DE, currency EUR. - - - - - - - Italy, site ID 101, abbreviation IT, currency EUR. - - - - - - - Belgium (Dutch), site ID 123, abbreviation BENL, currency EUR. - - - - - - - Netherlands, site ID 146, abbreviation NL, currency EUR. - - - - - - - Spain, site ID 186, abbreviation ES, currency EUR. - - - - - - - Switzerland, site ID 193, abbreviation CH, currency CHF. - - - - - - - Taiwan, site ID 196, abbreviation TW, currency TWD. - - - - - - - eBay Motors, site ID 100, currency USD. - - - - - - - Hong Kong, site ID 201, abbreviation HK, currency HKD. - - - - - - - Singapore, site ID 216, abbreviation SG, currency SGD. - - - - - - - India, site ID 203, abbreviation IN, currency INR. - - - - - - - China, site ID 223, abbreviation CN, currency CNY. - - - - - - - Ireland, site ID 205, abbreviation IE, currency EUR. - - - - - - - Malaysia, site ID 207, abbreviation MY, currency MYR. - - - - - - - Philippines, site ID 211, abbreviation PH, currency PHP. - - - - - - - Poland, site ID 212, abbreviation PL, currency PLN. - - - - - - - Sweden, site ID 218, abbreviation SE, currency SEK. - - - - - - - Placeholder value. See - <a href="types/simpleTypes.html#token">token</a>. - - - - - - - CanadaFrench, site ID 210, abbreviation CAFR, currencies CAD and USD. - - - - - - - - - - Indicates the order of sorting. - - - - - - - Sorts results in ascending (low to high) order. - - - - - - - Sorts results in descending (high to low) order. - - - - - - - Placeholder value. See - <a href="types/simpleTypes.html#token">token</a>. - - - - - - - - - - Identifies the StoreSearch codes (e.g., for FindItemsAdvanced requests). - - - - - - - (in) Within a single store for all items (specify a store in - the appropriate input field). - - - - - - - (in) Within a single store for auction items (specify a store in - the appropriate input field). - - - - - - - (in) Within a single store for basic fixed price items, Store Inventory format items, - and auction items with Buy It Now (specify a store in the appropriate input field). - - - - - - - (in) Across all stores for basic fixed price items, Store Inventory format items, - and auction items with Buy It Now. - - - - - - - (out) Reserved for internal or future use. - - - - - - - - - - Contains information related to the item in the context of - a seller's eBay Store. Applicable for auction format, Basic Fixed Price, - and Store Inventory format items listed by eBay Stores sellers. - - - - - - - The URL of the seller's eBay Store page. FindProducts only returned - a default URL at the time of this writing. FindHalfProducts returns the URL - of the seller's Half.com Shop page. - - - - FindItemsAdvanced - Conditionally -
IncludeSelector: SellerInfo
-
- - FindHalfProducts - Conditionally -
IncludeSelector: Items
-
-
-
-
- - - - The name of the seller's eBay Store. FindProducts returns an empty - value for all items at the time of this writing. FindHalfProducts returns the - name of seller's Half.com Shop, which is the SellerID. - - - 200 - - FindItemsAdvanced - Conditionally -
IncludeSelector: SellerInfo
-
- - FindHalfProducts - Conditionally -
IncludeSelector: Items
-
-
-
-
- -
-
- - - - - Tax-related details for a region or jurisdiction. - - - - - - - Representative identifier for the jurisdiction. Typically an - abbreviation (e.g. CA for California). - - - - GetShippingCosts - Conditionally - - - - - - - - The tax percent to apply for a listing shipped to this - jurisdiction. The value passed in is stored with a precision of - 3 digits after the decimal point (##.###). - GetTaxTable: this tag has no value if the user's tax table has not been set. - - - - GetShippingCosts - Conditionally - - - - - - - - Whether shipping costs are to be part of the base amount that is taxed. - GetTaxTable: This tag is empty if the user did not previously provide information. - - - - GetShippingCosts - Conditionally - - - - - - - - - - - - Sales tax details for zero or more jurisdictions (states, - provinces, etc). - - - - - - - Sales tax details for zero or more jurisdictions (states, provinces, etc). - Information is only returned for the jurisdictions for which the user provided - tax information. ShippingIncludedInTax and SalesTaxPercent are returned but - are empty. - - - - GetShippingCosts - Conditionally - - - - - - - - - - - A means for identifying a person's role in doing business on eBay. - - - - - - - (in/out) Acting as buyer. - - - - - - - (in/out) Acting as seller. - - - - - - - (out) Reserved for future use - - - - - - - - - - An eBay ID that uniquely identifies a user. For GetAllBidders, - if the user chose to be anonymized, a generic ID is returned. - - - - - - - - - These codes indicate the current state or status of a an eBay - user account. - - - - - - - (out) User properties have never been set; this value should - seldom, if ever, be returned and typically represents a - problem - - - - - - - (out) User has been suspended from selling and buying, such as - for violations of eBay terms or agreement - - - - - - - (out) User has completed online registration and has properly - responded to confirmation email; most users should fall - in this category - - - - - - - (out) User has completed online registration, but has either - not responded to confirmation email or has not yet been - sent the confirmation email - - - - - - - (out) Registered users of AuctionWeb (pre-eBay) who never - re-registered on eBay - - - - - - - (out) Temporary user record state indicating the record is in - the process of being changed by eBay; query user - information again to get new status - - - - - - - (out) Records for the specified user have been deleted - - - - - - - (out) User has completed registration and confirmation, but is - pending a verification of credit card information - - - - - - - (out) User's account is on hold, such as for non-payment of - amounts due eBay; user cannot sell or buy items - - - - - - - (out) User record has been merged with another account record - for the same user - - - - - - - (out) User has completed online registration and has been sent - the confirmation email, but has not yet responded to the - confirmation email - - - - - - - (out) User has been scheduled for account closure (typically - when a user has requested to have their account closed) - A user in this state should not be considered an active - user - - - - - - - (out) User has completed the registration for Half.com and opted - to automatically also be registered with eBay, but the - registration confirmation is still pending - - - - - - - (out) User has completed the registration for Half.com and opted - to automatically also be registered with eBay, but the - verification of credit card information is still pending - - - - - - - (out) Half.com User; user has completed the registration for Half.com - and opted to automatically also be registered with eBay, but the - registration confirmation is still pending - - - - - - - (out) Reserved for internal or future use - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 535 - - - - - -
- \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/pom.xml b/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/pom.xml deleted file mode 100644 index a03234ec3f..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/pom.xml +++ /dev/null @@ -1,149 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-store-db - Apache Tuscany SCA Store Tutorial Catalog Database - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tutorial-assets - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-api - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-sca-axis2 - 1.4-SNAPSHOT - - - - org.apache.derby - derby - 10.3.1.4 - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.4-SNAPSHOT - - - - launch.LaunchCatalog - - - generate - - - - - - - org.codehaus.mojo - sql-maven-plugin - 1.0 - - - - org.apache.derby - derby - 10.1.2.1 - - - - - - create-db - generate-resources - - execute - - - org.apache.derby.jdbc.EmbeddedDriver - jdbc:derby:target/store_db;create=true - true - continue - ; - - ${pom.basedir}/store.sql - - - - - - - - - - diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/launch/LaunchCatalog.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/launch/LaunchCatalog.java deleted file mode 100644 index c46845722c..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/launch/LaunchCatalog.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package launch; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class LaunchCatalog { - public static void main(String[] args) throws Exception { - System.out.println("Starting ..."); - SCADomain scaDomain = SCADomain.newInstance("store-catalog-database.composite"); - System.out.println("store-catalog-database.composite ready for big business !!!"); - System.in.read(); - System.out.println("Stopping ..."); - scaDomain.close(); - System.out.println(); - } -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/services/Catalog.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/services/Catalog.java deleted file mode 100644 index 9f784b0848..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/services/Catalog.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Catalog { - String[] get(); -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/services/CatalogImpl.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/services/CatalogImpl.java deleted file mode 100644 index c8b3bbf621..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/services/CatalogImpl.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; - -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; - -public class CatalogImpl implements Catalog { - @Property - public String currencyCode = "USD"; - - @Reference - public CurrencyConverter currencyConverter; - - private String currencySymbol; - - public String[] get() { - - String[] catalogArray = null; - - String itemName; - float itemPrice; - String itemCurrencyCode; - - Connection conn = null; - PreparedStatement pstmt = null; - ResultSet rs = null; - - currencySymbol = currencyConverter.getCurrencySymbol(currencyCode); - - try { - //initialize driver and register it with DriverManager - Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); - - conn = DriverManager.getConnection( - "jdbc:derby:target/store_db", - "", - ""); - - pstmt = conn.prepareStatement("select * from \"Catalog\"", - ResultSet.TYPE_SCROLL_INSENSITIVE, - ResultSet.CONCUR_READ_ONLY); - - rs = pstmt.executeQuery(); - rs.last(); - - catalogArray = new String[rs.getRow()]; - - do { - itemName = rs.getString(2); - itemPrice = rs.getFloat(4); - itemCurrencyCode = rs.getString(3); - - catalogArray[rs.getRow()-1] = new String(itemName+" - "+ - currencySymbol+" "+ - currencyConverter.getConversion(itemCurrencyCode, currencyCode, itemPrice)); - - } while(rs.previous()); - - } catch (SQLException ex) { - ex.printStackTrace(); - }catch (ClassNotFoundException ex) { - ex.printStackTrace(); - } finally { - cleanup(conn,pstmt,rs); - } - - return catalogArray; - } - - private void cleanup(Connection conn, PreparedStatement pstmt, ResultSet rs) { - - if (rs!=null) { - try { - rs.close(); - } catch (SQLException ex) { - ex.printStackTrace(); - } - } - - if (pstmt!=null) { - try { - pstmt.close(); - } catch (SQLException ex) { - ex.printStackTrace(); - } - } - - if (conn!=null) { - try { - conn.close(); - } catch (SQLException ex) { - ex.printStackTrace(); - } - } - } -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/services/CurrencyConverter.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/services/CurrencyConverter.java deleted file mode 100644 index 8b0f70907d..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/services/CurrencyConverter.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package services; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface CurrencyConverter { - public float getConversion(String fromCurrenycCode, String toCurrencyCode, float amount); - - public String getCurrencySymbol(String currencyCode); -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/util/CreateDB.java b/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/util/CreateDB.java deleted file mode 100644 index a4dc2e67e6..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/java/util/CreateDB.java +++ /dev/null @@ -1,79 +0,0 @@ -package util; - - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.SQLException; - -public class CreateDB { - - public static void main(String[] args) { - System.out.println("Creating database ..."); - - Connection connection = null; - PreparedStatement preparedStatement = null; - - try { - //initialize driver and register it with DriverManager - Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); - - //connect and create the db if not present - connection = DriverManager.getConnection( - "jdbc:derby:target/store_db;create=true", - "", - ""); - - - try { - preparedStatement = connection.prepareStatement("DROP TABLE CATALOG"); - preparedStatement.execute(); - }catch(Exception e) { - //ignore to avoid erros when db is being created from scratch - } - - - preparedStatement = connection.prepareStatement("CREATE TABLE CATALOG(" - + "id NUMERIC(5 , 0) NOT NULL," - + "product_name VARCHAR(30)," - + "currency_code CHAR(3)," - + "price REAL," - + "primary key (id)" - + ")"); - preparedStatement.execute(); - - preparedStatement = connection.prepareStatement("INSERT INTO CATALOG VALUES(0,'Apple', 'USD', 2.99)"); - preparedStatement.execute(); - - preparedStatement = connection.prepareStatement("INSERT INTO CATALOG VALUES(1,'Orange', 'USD', 3.55)"); - preparedStatement.execute(); - - preparedStatement = connection.prepareStatement("INSERT INTO CATALOG VALUES(2,'Pear', 'USD', 1.55)"); - preparedStatement.execute(); - - System.out.println("Done !"); - - } catch (SQLException ex) { - ex.printStackTrace(); - }catch (ClassNotFoundException ex) { - ex.printStackTrace(); - } finally { - if (preparedStatement!=null) { - try { - preparedStatement.close(); - } catch (SQLException ex) { - ex.printStackTrace(); - } - } - - if (connection!=null) { - try { - connection.close(); - } catch (SQLException ex) { - ex.printStackTrace(); - } - } - } - } - -} diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/resources/store-catalog-database.composite b/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/resources/store-catalog-database.composite deleted file mode 100644 index aea8a6972c..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/src/main/resources/store-catalog-database.composite +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - USD - - - - diff --git a/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/store.sql b/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/store.sql deleted file mode 100644 index 4c3186abe9..0000000000 --- a/branches/sca-android/tutorials/store/www-services/catalog-amazon/store-db/store.sql +++ /dev/null @@ -1,37 +0,0 @@ --- --- Licensed to the Apache Software Foundation (ASF) under one --- or more contributor license agreements. See the NOTICE file --- distributed with this work for additional information --- regarding copyright ownership. The ASF licenses this file --- to you under the Apache License, Version 2.0 (the --- "License"); you may not use this file except in compliance --- with the License. You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, --- software distributed under the License is distributed on an --- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY --- KIND, either express or implied. See the License for the --- specific language governing permissions and limitations --- under the License. --- - -DROP TABLE CATALOG; - -CREATE TABLE CATALOG( - id NUMERIC(5 , 0) NOT NULL, - product_name VARCHAR(30), - currency_code CHAR(3), - price REAL, - primary key (id) -); - - - -INSERT INTO CATALOG - VALUES(0,'Apple', 'USD', 2.99); -INSERT INTO CATALOG - VALUES(1,'Orange', 'USD', 3.55); -INSERT INTO CATALOG - VALUES(2,'Pear', 'USD', 1.55); \ No newline at end of file diff --git a/branches/sca-android/tutorials/store/www-services/pom.xml b/branches/sca-android/tutorials/store/www-services/pom.xml deleted file mode 100644 index 967cf33a79..0000000000 --- a/branches/sca-android/tutorials/store/www-services/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-tutorial-store - 1.4-SNAPSHOT - ../pom.xml - - tutorial-www-services - pom - Apache Tuscany SCA Store Tutorial External Web Services - - - - default - - true - - - cart-amazon - catalog-amazon - - - - - - -- cgit v1.2.3