From 0cc8ed2208c9d04057bcb00859490290e3aa948c Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:08:11 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835129 13f79535-47bb-0310-9956-ffa450edef68 --- branches/sca-java-1.3.2/samples/README | 306 ---------- .../samples/binding-echo-extension/README | 74 --- .../samples/binding-echo-extension/build.xml | 51 -- .../samples/binding-echo-extension/pom.xml | 78 --- .../src/main/java/echo/EchoBinding.java | 29 - .../src/main/java/echo/EchoBindingFactory.java | 33 -- .../java/echo/impl/EchoBindingFactoryImpl.java | 34 -- .../src/main/java/echo/impl/EchoBindingImpl.java | 104 ---- .../main/java/echo/impl/EchoBindingProcessor.java | 128 ---- .../java/echo/provider/EchoBindingInvoker.java | 48 -- .../echo/provider/EchoBindingPoliciedInvoker.java | 71 --- .../echo/provider/EchoBindingProviderFactory.java | 58 -- .../provider/EchoReferenceBindingProvider.java | 71 --- .../echo/provider/EchoServiceBindingProvider.java | 78 --- .../policy/EchoBindingEncryptionPolicy.java | 41 -- .../EchoBindingEncryptionPolicyProcessor.java | 37 -- .../echo/provider/policy/EchoBindingPolicy.java | 43 -- .../policy/EchoBindingPolicyProcessor.java | 78 --- .../provider/policy/EncryptionPolicyHandler.java | 48 -- .../echo/provider/policy/EncryptionStrategy.java | 26 - .../java/echo/provider/policy/PolicyHandler.java | 29 - .../provider/policy/ReverseEncryptionStrategy.java | 33 -- .../main/java/echo/provider/policy/WSPolicy.java | 43 -- .../echo/provider/policy/WSPolicyProcessor.java | 54 -- .../src/main/java/echo/server/EchoServer.java | 78 --- .../main/java/echo/server/EchoServiceListener.java | 52 -- .../META-INF/services/echo.EchoBindingFactory | 19 - ...ca.contribution.processor.StAXArtifactProcessor | 21 - ...any.sca.contribution.processor.ValidationSchema | 19 - ...che.tuscany.sca.provider.BindingProviderFactory | 19 - .../src/main/resources/sample-binding-echo.xsd | 36 -- .../src/test/java/echo/Echo.java | 29 - .../src/test/java/echo/EchoComponentImpl.java | 44 -- .../src/test/java/echo/EchoReferenceTestCase.java | 50 -- .../src/test/java/echo/EchoServiceTestCase.java | 50 -- .../src/test/resources/EchoBinding.composite | 43 -- .../src/test/resources/definitions.xml | 32 - .../sca-java-1.3.2/samples/binding-echo/README | 104 ---- .../samples/binding-echo/binding-echo.png | Bin 7846 -> 0 bytes .../samples/binding-echo/binding-echo.svg | 174 ------ .../sca-java-1.3.2/samples/binding-echo/build.xml | 75 --- .../sca-java-1.3.2/samples/binding-echo/pom.xml | 71 --- .../binding-echo/src/main/java/echo/Echo.java | 29 - .../src/main/java/echo/EchoBindingClient.java | 51 -- .../src/main/java/echo/EchoComponentImpl.java | 44 -- .../src/main/resources/EchoBinding.composite | 40 -- .../src/test/java/echo/EchoBindingTestCase.java | 57 -- .../samples/binding-notification-broker/README | 110 ---- .../binding-notification-broker.png | Bin 36945 -> 0 bytes .../samples/binding-notification-broker/build.xml | 75 --- .../samples/binding-notification-broker/pom.xml | 97 --- .../java/notification/broker/TestCaseProducer.java | 24 - .../java/notification/broker/TrafficAdvisory.java | 30 - .../broker/TrafficAdvisoryConsumer.java | 41 -- .../broker/TrafficAdvisoryProducer.java | 36 -- .../notification/broker/TrafficAdvisoryServer.java | 72 --- .../TrafficAdvisoryNotification.componentType | 34 -- .../TrafficAdvisoryNotification.composite | 61 -- .../src/main/resources/wsdl/TrafficAdvisory.wsdl | 50 -- .../samples/binding-notification-consumer/README | 102 ---- .../binding-notification-consumer.png | Bin 27279 -> 0 bytes .../binding-notification-consumer/build.xml | 75 --- .../samples/binding-notification-consumer/pom.xml | 115 ---- .../notification/consumer/TrafficAdvisory.java | 30 - .../consumer/TrafficAdvisoryConsumer.java | 41 -- .../consumer/TrafficAdvisoryServer.java | 48 -- .../TrafficAdvisoryNotification.componentType | 34 -- .../TrafficAdvisoryNotification.composite | 53 -- .../src/main/resources/wsdl/TrafficAdvisory.wsdl | 50 -- .../consumer/TrafficAdvisoryTestCase.java | 61 -- .../samples/binding-notification-producer/README | 131 ---- .../binding-notification-producer.png | Bin 21631 -> 0 bytes .../binding-notification-producer/build.xml | 75 --- .../samples/binding-notification-producer/pom.xml | 126 ---- .../notification/producer/TestCaseProducer.java | 24 - .../notification/producer/TrafficAdvisory.java | 30 - .../producer/TrafficAdvisoryProducer.java | 36 -- .../producer/TrafficAdvisoryServer.java | 57 -- .../TrafficAdvisoryNotification.componentType | 34 -- .../TrafficAdvisoryNotification.composite | 44 -- .../src/main/resources/wsdl/TrafficAdvisory.wsdl | 50 -- .../producer/TrafficAdvisoryTestCase.java | 78 --- .../samples/calculator-distributed/README | 438 -------------- .../samples/calculator-distributed/build.xml | 114 ---- .../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 --- .../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 -- .../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 ----------- .../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 -- .../samples/calculator-webapp/README | 118 ---- .../samples/calculator-webapp/calculator-web.png | Bin 22916 -> 0 bytes .../samples/calculator-webapp/calculator-web.svg | 358 ----------- .../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 | 116 ---- .../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 | 20 - .../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-java-1.3.2/samples/calculator/README | 97 --- .../sca-java-1.3.2/samples/calculator/build.xml | 72 --- .../samples/calculator/calculator.png | Bin 20552 -> 0 bytes .../samples/calculator/calculator.svg | 329 ----------- branches/sca-java-1.3.2/samples/calculator/pom.xml | 64 -- .../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 -- .../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 ------- .../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 -- .../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-java-1.3.2/samples/chat-webapp/README | 61 -- .../samples/chat-webapp/chat-webapp.png | Bin 6552 -> 0 bytes .../samples/chat-webapp/chat-webapp.svg | 187 ------ .../sca-java-1.3.2/samples/chat-webapp/pom.xml | 97 --- .../src/main/java/sample/ChatService.java | 26 - .../src/main/java/sample/ChatServiceImpl.java | 36 -- .../chat-webapp/src/main/resources/chat.composite | 40 -- .../src/main/webapp/META-INF/sca-contribution.xml | 24 - .../chat-webapp/src/main/webapp/WEB-INF/web.xml | 37 -- .../samples/chat-webapp/src/main/webapp/chat.html | 70 --- .../sca-java-1.3.2/samples/databinding-echo/README | 143 ----- .../samples/databinding-echo/build.xml | 75 --- .../samples/databinding-echo/databinding-echo.png | Bin 23907 -> 0 bytes .../samples/databinding-echo/databinding-echo.svg | 408 ------------- .../samples/databinding-echo/pom.xml | 82 --- .../src/main/java/dbecho/ComponentAImpl.java | 74 --- .../src/main/java/dbecho/ComponentBImpl.java | 59 -- .../src/main/java/dbecho/Echo.java | 32 - .../main/java/dbecho/EchoDataBindingClient.java | 45 -- .../src/main/java/dbecho/Interface1.java | 32 - .../src/main/java/dbecho/Interface2.java | 36 -- .../src/main/resources/EchoDataBinding.composite | 58 -- .../src/main/resources/wsdl/echo.wsdl | 63 -- .../test/java/dbecho/EchoDataBindingTestCase.java | 49 -- .../samples/domain-management/README | 8 - .../samples/domain-management/pom.xml | 247 -------- .../java/manager/DistributeAndRunComponents.java | 321 ---------- .../main/java/manager/DistributeComponents.java | 281 --------- .../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 | 212 ------- .../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 - .../sca-java-1.3.2/samples/domain-webapp/README | 310 ---------- .../sca-java-1.3.2/samples/domain-webapp/build.xml | 296 --------- .../sca-java-1.3.2/samples/domain-webapp/pom.xml | 101 ---- .../src/main/java/node/DomainServer.java | 54 -- .../main/resources/META-INF/sca-contribution.xml | 24 - .../src/main/resources/domain.composite | 54 -- .../src/main/resources/webroot/index.html | 354 ----------- .../src/main/resources/webroot/node.png | Bin 689 -> 0 bytes .../src/main/resources/webroot/style.css | 176 ------ .../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-java-1.3.2/samples/feed-aggregator/README | 97 --- .../samples/feed-aggregator/build.xml | 72 --- .../samples/feed-aggregator/feed-aggregator.png | Bin 17429 -> 0 bytes .../samples/feed-aggregator/feed-aggregator.svg | 364 ------------ .../sca-java-1.3.2/samples/feed-aggregator/pom.xml | 84 --- .../src/main/java/feed/AggregatorImpl.java | 176 ------ .../src/main/java/feed/SampleServer.java | 52 -- .../feed-aggregator/src/main/java/feed/Sort.java | 38 -- .../src/main/java/feed/SortImpl.java | 57 -- .../src/main/resources/FeedAggregator.composite | 60 -- .../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 ------ .../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-java-1.3.2/samples/helloworld-bpel/README | 151 ----- .../samples/helloworld-bpel/build.xml | 95 --- .../samples/helloworld-bpel/helloworld-bpel.png | Bin 8897 -> 0 bytes .../samples/helloworld-bpel/helloworld-bpel.svg | 179 ------ .../sca-java-1.3.2/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 | 69 --- .../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-deep-webapp/README | 1 - .../samples/helloworld-ws-deep-webapp/build.xml | 158 ----- .../samples/helloworld-ws-deep-webapp/pom.xml | 45 -- .../src/main/java/helloworld/HelloWorldImpl.java | 33 -- .../main/java/helloworld/HelloWorldService.java | 30 - .../sca-deployables/helloworldws.composite | 32 - .../src/main/resources/wsdl/helloworld.wsdl | 79 --- .../src/main/webapp/WEB-INF/web.xml | 27 - .../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-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 -- .../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 ----- .../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 -- .../samples/implementation-composite/README | 116 ---- .../samples/implementation-composite/build.xml | 72 --- .../implementation-composite.png | Bin 47415 -> 0 bytes .../implementation-composite.svg | 658 --------------------- .../samples/implementation-composite/pom.xml | 72 --- .../src/main/java/composite/CompositeClient.java | 41 -- .../src/main/java/composite/Source.java | 24 - .../src/main/java/composite/SourceCallback.java | 24 - .../src/main/java/composite/SourceImpl.java | 55 -- .../src/main/java/composite/Target.java | 30 - .../src/main/java/composite/TargetImpl.java | 41 -- .../src/main/resources/InnerComposite.composite | 41 -- .../src/main/resources/InnerComposite2.composite | 33 -- .../main/resources/META-INF/sca-contribution.xml | 25 - .../src/main/resources/OuterComposite.composite | 39 -- .../src/test/java/composite/CompositeTestCase.java | 51 -- .../samples/implementation-crud-extension/README | 83 --- .../implementation-crud-extension/build.xml | 51 -- .../samples/implementation-crud-extension/pom.xml | 77 --- .../src/main/java/crud/CRUD.java | 54 -- .../src/main/java/crud/CRUDImplementation.java | 50 -- .../main/java/crud/CRUDImplementationFactory.java | 37 -- .../main/java/crud/backend/ResourceManager.java | 90 --- .../crud/impl/CRUDImplementationFactoryImpl.java | 47 -- .../java/crud/impl/CRUDImplementationImpl.java | 117 ---- .../crud/provider/CRUDImplementationInvoker.java | 79 --- .../crud/provider/CRUDImplementationProvider.java | 75 --- .../CRUDImplementationProviderFactory.java | 51 -- .../services/crud.CRUDImplementationFactory | 19 - ...ca.contribution.processor.StAXArtifactProcessor | 19 - ...any.sca.contribution.processor.ValidationSchema | 19 - ...cany.sca.provider.ImplementationProviderFactory | 19 - .../main/resources/sample-implementation-crud.xsd | 38 -- .../src/test/java/crud/CRUDTestCase.java | 60 -- .../src/test/resources/crud.composite | 30 - .../samples/implementation-crud/README | 113 ---- .../samples/implementation-crud/build.xml | 75 --- .../implementation-crud/implementation-crud.png | Bin 4227 -> 0 bytes .../implementation-crud/implementation-crud.svg | 135 ----- .../samples/implementation-crud/pom.xml | 64 -- .../src/main/java/crud/client/CRUDClient.java | 59 -- .../src/main/resources/crud.composite | 30 - .../src/test/java/crud/client/CRUDTestCase.java | 61 -- .../samples/implementation-notification/README | 93 --- .../samples/implementation-notification/build.xml | 72 --- .../implementation-notification.png | Bin 21543 -> 0 bytes .../samples/implementation-notification/pom.xml | 75 --- .../main/java/notification/TestCaseProducer.java | 24 - .../main/java/notification/TrafficAdvisory.java | 24 - .../java/notification/TrafficAdvisoryClient.java | 45 -- .../java/notification/TrafficAdvisoryConsumer.java | 39 -- .../java/notification/TrafficAdvisoryProducer.java | 36 -- .../TrafficAdvisoryNotification.componentType | 30 - .../TrafficAdvisoryNotification.composite | 50 -- .../java/notification/TrafficAdvisoryTestCase.java | 60 -- .../TrafficAdvisoryNotification.componentType | 30 - .../TrafficAdvisoryNotification.composite | 50 -- .../samples/implementation-pojo-extension/README | 70 --- .../implementation-pojo-extension/build.xml | 51 -- .../samples/implementation-pojo-extension/pom.xml | 77 --- .../src/main/java/pojo/POJOImplementation.java | 65 -- .../main/java/pojo/POJOImplementationFactory.java | 36 -- .../pojo/impl/POJOImplementationFactoryImpl.java | 36 -- .../java/pojo/impl/POJOImplementationImpl.java | 155 ----- .../pojo/impl/POJOImplementationProcessor.java | 174 ------ .../pojo/provider/POJOImplementationInvoker.java | 68 --- .../pojo/provider/POJOImplementationProvider.java | 106 ---- .../POJOImplementationProviderFactory.java | 45 -- ...ca.contribution.processor.StAXArtifactProcessor | 19 - ...any.sca.contribution.processor.ValidationSchema | 19 - ...cany.sca.provider.ImplementationProviderFactory | 19 - .../services/pojo.POJOImplementationFactory | 19 - .../main/resources/sample-implementation-pojo.xsd | 38 -- .../src/test/java/helloworld/HelloWorld.java | 26 - .../src/test/java/helloworld/HelloWorldImpl.java | 37 -- .../src/test/java/helloworld/HelloWorldImpl2.java | 37 -- .../test/java/helloworld/HelloWorldTestCase.java | 51 -- .../helloworld/HelloWorldImpl2.componentType | 26 - .../test/resources/helloworld/helloworld.composite | 33 -- .../sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/README | 161 ----- .../samples/osgi-supplychain/build-bundles.xml | 32 - .../samples/osgi-supplychain/build.xml | 128 ---- .../samples/osgi-supplychain/osgi-supplychain.png | Bin 13558 -> 0 bytes .../samples/osgi-supplychain/osgi-supplychain.svg | 272 --------- .../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-java-1.3.2/samples/pom.xml | 102 ---- .../sca-java-1.3.2/samples/quote-xquery/README | 450 -------------- .../sca-java-1.3.2/samples/quote-xquery/build.xml | 120 ---- .../sca-java-1.3.2/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 | 99 ---- .../samples/simple-bigbank-spring/build.xml | 72 --- .../samples/simple-bigbank-spring/pom.xml | 72 --- .../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 | 85 --- .../src/main/java/bigbank/accountdata/Account.java | 26 - .../bigbank/accountdata/AccountDataService.java | 28 - .../accountdata/AccountDataServiceImpl.java | 54 -- .../java/bigbank/accountdata/CheckingAccount.java | 35 -- .../java/bigbank/accountdata/SavingsAccount.java | 35 -- .../java/bigbank/accountdata/StockAccount.java | 43 -- .../main/java/bigbank/client/BigBankClient.java | 43 -- .../java/bigbank/stockquote/StockQuoteImpl.java | 36 -- .../java/bigbank/stockquote/StockQuoteService.java | 31 - .../src/main/resources/Account-spring-context.xml | 42 -- .../src/main/resources/BigBank.composite | 35 -- .../src/main/resources/StockQuote.composite | 30 - .../src/test/java/bigbank/BigBankTestCase.java | 50 -- .../sca-java-1.3.2/samples/simple-bigbank/README | 101 ---- .../samples/simple-bigbank/build.xml | 72 --- .../sca-java-1.3.2/samples/simple-bigbank/pom.xml | 65 -- .../samples/simple-bigbank/simple-bigbank.png | Bin 10202 -> 0 bytes .../samples/simple-bigbank/simple-bigbank.svg | 200 ------- .../main/java/bigbank/account/AccountReport.java | 43 -- .../main/java/bigbank/account/AccountService.java | 26 - .../java/bigbank/account/AccountServiceImpl.java | 68 --- .../src/main/java/bigbank/accountdata/Account.java | 26 - .../bigbank/accountdata/AccountDataService.java | 28 - .../accountdata/AccountDataServiceImpl.java | 54 -- .../java/bigbank/accountdata/CheckingAccount.java | 35 -- .../java/bigbank/accountdata/SavingsAccount.java | 35 -- .../java/bigbank/accountdata/StockAccount.java | 43 -- .../main/java/bigbank/client/BigBankClient.java | 43 -- .../java/bigbank/stockquote/StockQuoteImpl.java | 36 -- .../java/bigbank/stockquote/StockQuoteService.java | 32 - .../src/main/resources/Account.composite | 38 -- .../src/main/resources/BigBank.composite | 35 -- .../src/main/resources/StockQuote.composite | 31 - .../src/test/java/bigbank/BigBankTestCase.java | 50 -- .../samples/simple-callback-ws/README | 144 ----- .../samples/simple-callback-ws/build.xml | 72 --- .../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 -- .../sca-java-1.3.2/samples/simple-callback/README | 97 --- .../samples/simple-callback/build.xml | 72 --- .../sca-java-1.3.2/samples/simple-callback/pom.xml | 65 -- .../samples/simple-callback/simple-callback.png | Bin 137 -> 0 bytes .../samples/simple-callback/simple-callback.svg | 150 ----- .../src/main/java/simplecallback/MyClient.java | 27 - .../src/main/java/simplecallback/MyClientImpl.java | 49 -- .../src/main/java/simplecallback/MyService.java | 32 - .../java/simplecallback/MyServiceCallback.java | 27 - .../main/java/simplecallback/MyServiceImpl.java | 51 -- .../java/simplecallback/SimpleCallbackClient.java | 38 -- .../src/main/resources/simplecallback.composite | 34 -- .../simplecallback/SimpleCallbackTestCase.java | 51 -- .../samples/spi-implementation-pojo/pom.xml | 59 -- .../src/main/java/sample/JavaImplementation.java | 35 -- .../java/sample/JavaImplementationActivator.java | 37 -- .../src/main/java/sample/JavaInvoker.java | 59 -- .../src/main/java/sample/JavaInvokerFactory.java | 47 -- ....apache.tuscany.sca.spi.ImplementationActivator | 18 - .../src/test/java/helloworld/HelloWorld.java | 26 - .../src/test/java/helloworld/HelloWorldImpl.java | 28 - .../test/java/helloworld/HelloWorldTestCase.java | 35 -- .../test/resources/helloworld/helloworld.composite | 28 - branches/sca-java-1.3.2/samples/store/README | 28 - branches/sca-java-1.3.2/samples/store/build.xml | 79 --- branches/sca-java-1.3.2/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 | 141 ----- branches/sca-java-1.3.2/samples/store/store.png | Bin 15670 -> 0 bytes branches/sca-java-1.3.2/samples/store/store.svg | 304 ---------- branches/sca-java-1.3.2/samples/supplychain/README | 101 ---- .../sca-java-1.3.2/samples/supplychain/build.xml | 72 --- .../sca-java-1.3.2/samples/supplychain/pom.xml | 65 -- .../src/main/java/supplychain/Customer.java | 33 -- .../java/supplychain/CustomerComponentImpl.java | 44 -- .../src/main/java/supplychain/Retailer.java | 28 - .../java/supplychain/RetailerComponentImpl.java | 39 -- .../src/main/java/supplychain/Shipper.java | 28 - .../java/supplychain/ShipperComponentImpl.java | 39 -- .../main/java/supplychain/SupplyChainClient.java | 40 -- .../src/main/java/supplychain/Warehouse.java | 28 - .../java/supplychain/WarehouseComponentImpl.java | 39 -- .../src/main/resources/supplychain.composite | 45 -- .../supplychain/SupplyChainClientTestCase.java | 52 -- .../samples/supplychain/supplychain.png | Bin 3898 -> 0 bytes .../samples/supplychain/supplychain.svg | 228 ------- .../sca-java-1.3.2/samples/web-resource/README | 76 --- .../sca-java-1.3.2/samples/web-resource/build.xml | 72 --- .../sca-java-1.3.2/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 ------ .../sca-java-1.3.2/samples/zipcode-jaxws/LICENSE | 205 ------- .../sca-java-1.3.2/samples/zipcode-jaxws/NOTICE | 6 - .../sca-java-1.3.2/samples/zipcode-jaxws/README | 72 --- .../sca-java-1.3.2/samples/zipcode-jaxws/build.xml | 62 -- .../sca-java-1.3.2/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 -- 911 files changed, 59761 deletions(-) delete mode 100644 branches/sca-java-1.3.2/samples/README delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/README delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/EchoBinding.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/EchoBindingFactory.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingFactoryImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingProcessor.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingInvoker.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingPoliciedInvoker.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingProviderFactory.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoReferenceBindingProvider.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoServiceBindingProvider.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingEncryptionPolicy.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingEncryptionPolicyProcessor.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingPolicy.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingPolicyProcessor.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EncryptionPolicyHandler.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EncryptionStrategy.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/PolicyHandler.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/ReverseEncryptionStrategy.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/WSPolicy.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/WSPolicyProcessor.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/server/EchoServer.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/server/EchoServiceListener.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/META-INF/services/echo.EchoBindingFactory delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/sample-binding-echo.xsd delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/java/echo/Echo.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/java/echo/EchoComponentImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/java/echo/EchoReferenceTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/java/echo/EchoServiceTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/resources/EchoBinding.composite delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/resources/definitions.xml delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo/README delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo/binding-echo.png delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo/binding-echo.svg delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo/src/main/java/echo/Echo.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo/src/main/java/echo/EchoBindingClient.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo/src/main/java/echo/EchoComponentImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo/src/main/resources/EchoBinding.composite delete mode 100644 branches/sca-java-1.3.2/samples/binding-echo/src/test/java/echo/EchoBindingTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-broker/README delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-broker/binding-notification-broker.png delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-broker/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-broker/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TestCaseProducer.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TrafficAdvisory.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TrafficAdvisoryConsumer.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TrafficAdvisoryProducer.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TrafficAdvisoryServer.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/resources/TrafficAdvisoryNotification.componentType delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/resources/TrafficAdvisoryNotification.composite delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/resources/wsdl/TrafficAdvisory.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-consumer/README delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-consumer/binding-notification-consumer.png delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-consumer/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-consumer/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/java/notification/consumer/TrafficAdvisory.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/java/notification/consumer/TrafficAdvisoryConsumer.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/java/notification/consumer/TrafficAdvisoryServer.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/resources/TrafficAdvisoryNotification.componentType delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/resources/TrafficAdvisoryNotification.composite delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/resources/wsdl/TrafficAdvisory.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-consumer/src/test/java/notification/consumer/TrafficAdvisoryTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-producer/README delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-producer/binding-notification-producer.png delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-producer/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-producer/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/java/notification/producer/TestCaseProducer.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/java/notification/producer/TrafficAdvisory.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/java/notification/producer/TrafficAdvisoryProducer.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/java/notification/producer/TrafficAdvisoryServer.java delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/resources/TrafficAdvisoryNotification.componentType delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/resources/TrafficAdvisoryNotification.composite delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/resources/wsdl/TrafficAdvisory.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/binding-notification-producer/src/test/java/notification/producer/TrafficAdvisoryTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/README delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/calculator-distributed.png delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/calculator-distributed.svg delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/cloud.composite delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/domain.composite delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeA.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeB.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeC.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/node/LaunchDomain.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/cloud/NodeA.composite delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/cloud/NodeB.composite delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/cloud/NodeC.composite delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeA/Calculator.composite delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeB/Calculator.composite delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeC/Calculator.composite delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/src/test/java/calculator/CalculatorDistributedTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-distributed/workspace.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/README delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/calculator.png delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/calculator.svg delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/security/CalculatorCallbackHandler.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/security/JaasLoginModule.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/security/UserPrincipal.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/resources/Calculator.composite delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/resources/CalculatorJass.config delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/resources/CalculatorLogMessages.properties delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/resources/definitions.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/test/java/calculator/CalculatorTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-reference/README delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-reference/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-reference/calculator-rmi-reference.png delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-reference/calculator-rmi-reference.svg delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-reference/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/resources/CalculatorRMIReference.composite delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIReferenceTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/README delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/calculator-rmi-service.png delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/calculator-rmi-service.svg delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServer.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/resources/CalculatorRMIServer.composite delete mode 100644 branches/sca-java-1.3.2/samples/calculator-rmi-service/src/test/java/calculator/CalculatorRMIServerTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/README delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/calculator-script.png delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/calculator-script.svg delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/src/main/resources/Calculator.composite delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/src/main/resources/calculator/AddServiceImpl.js delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/src/main/resources/calculator/DivideServiceImpl.groovy delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/src/main/resources/calculator/MultiplyServiceImpl.py delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/src/main/resources/calculator/SubtractServiceImpl.rb delete mode 100644 branches/sca-java-1.3.2/samples/calculator-script/src/test/java/calculator/CalculatorTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/README delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/calculator-web.png delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/calculator-web.svg delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/src/main/resources/Calculator.composite delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-webapp/src/main/webapp/calc.jsp delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/README delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/calculator-web.png delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/calculator-web.svg delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ClientPWCBHandler.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ServerPWCBHandler.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/resources/Calculator.composite delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/resources/calculatorKeys.jks delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/resources/definitions.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/resources/security.properties delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/geronimo-web.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/webapp/calc.jsp delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/README delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/calculator-web.png delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/calculator-web.svg delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/resources/Calculator.composite delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/webapp/WEB-INF/geronimo-web.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/webapp/calc.jsp delete mode 100644 branches/sca-java-1.3.2/samples/calculator/README delete mode 100644 branches/sca-java-1.3.2/samples/calculator/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator/calculator.png delete mode 100644 branches/sca-java-1.3.2/samples/calculator/calculator.svg delete mode 100644 branches/sca-java-1.3.2/samples/calculator/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/calculator/src/main/resources/Calculator.composite delete mode 100644 branches/sca-java-1.3.2/samples/calculator/src/test/java/calculator/CalculatorTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-client/README delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-client/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-client/callback-ws-client.png delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-client/callback-ws-client.svg delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-client/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-client/src/main/java/myapp/MyClient.java delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-client/src/main/java/myapp/MyClientImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-client/src/main/java/myserver/MyService.java delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-client/src/main/java/myserver/MyServiceCallback.java delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-client/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-client/src/main/resources/myapp.composite delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-client/src/test/java/myapp/CallbackClientTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-service/README delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-service/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-service/callback-ws-service.png delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-service/callback-ws-service.svg delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-service/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-service/src/main/java/myserver/CallbackServer.java delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-service/src/main/java/myserver/MyService.java delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-service/src/main/java/myserver/MyServiceCallback.java delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-service/src/main/java/myserver/MyServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-service/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-service/src/main/resources/callbackws.composite delete mode 100644 branches/sca-java-1.3.2/samples/callback-ws-service/src/test/java/myserver/CallbackServerTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/chat-webapp/README delete mode 100644 branches/sca-java-1.3.2/samples/chat-webapp/chat-webapp.png delete mode 100644 branches/sca-java-1.3.2/samples/chat-webapp/chat-webapp.svg delete mode 100644 branches/sca-java-1.3.2/samples/chat-webapp/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/chat-webapp/src/main/java/sample/ChatService.java delete mode 100644 branches/sca-java-1.3.2/samples/chat-webapp/src/main/java/sample/ChatServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/chat-webapp/src/main/resources/chat.composite delete mode 100644 branches/sca-java-1.3.2/samples/chat-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/chat-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.3.2/samples/chat-webapp/src/main/webapp/chat.html delete mode 100644 branches/sca-java-1.3.2/samples/databinding-echo/README delete mode 100644 branches/sca-java-1.3.2/samples/databinding-echo/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/databinding-echo/databinding-echo.png delete mode 100644 branches/sca-java-1.3.2/samples/databinding-echo/databinding-echo.svg delete mode 100644 branches/sca-java-1.3.2/samples/databinding-echo/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/ComponentAImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/ComponentBImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/Echo.java delete mode 100644 branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/EchoDataBindingClient.java delete mode 100644 branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/Interface1.java delete mode 100644 branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/Interface2.java delete mode 100644 branches/sca-java-1.3.2/samples/databinding-echo/src/main/resources/EchoDataBinding.composite delete mode 100644 branches/sca-java-1.3.2/samples/databinding-echo/src/main/resources/wsdl/echo.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/databinding-echo/src/test/java/dbecho/EchoDataBindingTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/README delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/main/java/manager/DistributeComponents.java delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/main/java/manager/ListComponents.java delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/main/java/manager/ListDependencies.java delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/main/java/manager/ListDeployables.java delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/main/java/manager/WireComponents.java delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/test/java/services/Cart.java delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/test/java/services/Item.java delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/test/java/services/ShoppingCartClientImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/test/java/services/ShoppingCartImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/test/resources/assembly/assets.xml delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/test/resources/assembly/client.xml delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/test/resources/assembly/store.xml delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/test/resources/assets/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/test/resources/client/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/test/resources/client/client.composite delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/test/resources/store/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/domain-management/src/test/resources/store/store.composite delete mode 100644 branches/sca-java-1.3.2/samples/domain-webapp/README delete mode 100644 branches/sca-java-1.3.2/samples/domain-webapp/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/domain-webapp/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/domain-webapp/src/main/java/node/DomainServer.java delete mode 100755 branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/domain.composite delete mode 100644 branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/webroot/index.html delete mode 100644 branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/webroot/node.png delete mode 100644 branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/webroot/style.css delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator-webapp/README delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator-webapp/feed-aggregator-webapp.png delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator-webapp/feed-aggregator-webapp.svg delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator-webapp/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator-webapp/src/main/java/feed/AggregatorImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator-webapp/src/main/java/feed/Sort.java delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator-webapp/src/main/java/feed/SortImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator-webapp/src/main/resources/FeedAggregator.composite delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator-webapp/src/main/webapp/index.html delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator/README delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator/feed-aggregator.png delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator/feed-aggregator.svg delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator/src/main/java/feed/AggregatorImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator/src/main/java/feed/SampleServer.java delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator/src/main/java/feed/Sort.java delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator/src/main/java/feed/SortImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/feed-aggregator/src/main/resources/FeedAggregator.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel-ws/README delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel-ws/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel-ws/helloworld-bpel.png delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel-ws/helloworld-bpel.svg delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel-ws/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/java/helloworld/BPELClient.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/deploy.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/helloworld.bpel delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/helloworld.componentType delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/helloworld.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/helloworld.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/log4j.properties delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/test/java/helloworld/BPELHelloWorldTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel/README delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel/helloworld-bpel.png delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel/helloworld-bpel.svg delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/java/helloworld/BPELClient.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/deploy.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/helloworld.bpel delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/helloworld.componentType delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/helloworld.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/helloworld.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/log4j.properties delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/README delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/build-dojo.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/helloworld-jsonrpc.png delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/helloworld-jsonrpc.svg delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/resources/jsonrpc.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/webapp/HelloWorldJSONRPC.html delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/webapp/style.css delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jms-webapp/README delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jms-webapp/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldClient.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jms-webapp/src/main/webapp/META-INF/context.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jms-webapp/src/main/webapp/META-INF/sca-deployables/HelloWorld.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jms-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jms-webapp/src/main/webapp/hello.jsp delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/README delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/helloworld-jsonrpc.png delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/helloworld-jsonrpc.svg delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/resources/jsonrpc.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/webapp/HelloWorldJSONRPC.html delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/webapp/style.css delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-reference-jms/README delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-reference-jms/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-reference-jms/helloworld-reference.png delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-reference-jms/helloworld-reference.svg delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-reference-jms/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldServiceComponent.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/resources/helloworldjmsreference.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/resources/logging.properties delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-service-jms/README delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-service-jms/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-service-jms/helloworld-service.png delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-service-jms/helloworld-service.svg delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-service-jms/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-service-jms/src/main/resources/definitions.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-service-jms/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-service-jms/src/test/java/helloworld/HelloWorldJmsServerTestCaseOff.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/README delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/resources/META-INF/sca-deployables/helloworldws.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/README delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/helloworld-ws-reference.png delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/helloworld-ws-reference.svg delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldServiceComponent.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/resources/helloworldwsjms.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/resources/helloworldwsjmsclient.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/resources/logging.properties delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/README delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/helloworld-ws-reference-secure.png delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/helloworld-ws-reference-secure.svg delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/java/helloworld/ClientPWCBHandler.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldClient.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldServiceComponent.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/definitions.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/helloworldKeys.jks delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/helloworldwsclient.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/logging.properties delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/test/java/helloworld/HelloWorldClientTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/test/java/helloworld/HelloWorldTestServer.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference/README delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference/helloworld-ws-reference.png delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference/helloworld-ws-reference.svg delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldClient.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldServiceComponent.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/main/resources/helloworldwsclient.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/main/resources/logging.properties delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldClientTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldTestServer.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/README delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/helloworld-ws-sdo-webapp.png delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/helloworld-ws-sdo-webapp.svg delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorld.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldComponent.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/resources/helloworldws.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.xsd delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/webapp/HelloWorld.jsp delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/geronimo-web.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo/README delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo/helloworld-ws-sdo.png delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo/helloworld-ws-sdo.svg delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldClient.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldServer.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldServiceComponent.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/resources/helloworldws.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/resources/helloworldwsclient.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/resources/logging.properties delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/test/java/helloworld/HelloWorldClientTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/test/java/helloworld/HelloWorldTestServer.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/README delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/helloworld-ws-service.png delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/helloworld-ws-service.svg delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldServer.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/resources/definitions.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/resources/helloworldwsjms.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/resources/helloworldwsjmspolicy.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/test/java/helloworld/HelloWorldJmsPolicyServerTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/test/java/helloworld/HelloWorldJmsServerTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/README delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/helloworld-ws-service-secure.png delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/helloworld-ws-service-secure.svg delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldServer.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/java/helloworld/ServerPWCBHandler.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/resources/definitions.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/resources/helloworldKeys.jks delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/resources/helloworldws.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/test/java/helloworld/HelloWorldServerTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/README delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/webapp/META-INF/sca-deployables/helloworldws.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/webapp/WEB-INF/geronimo-web.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service/README delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service/helloworld-ws-service.png delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service/helloworld-ws-service.svg delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldServer.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/resources/META-INF/sca-deployables/helloworldws.composite delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldServerTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-composite/README delete mode 100644 branches/sca-java-1.3.2/samples/implementation-composite/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/implementation-composite/implementation-composite.png delete mode 100644 branches/sca-java-1.3.2/samples/implementation-composite/implementation-composite.svg delete mode 100644 branches/sca-java-1.3.2/samples/implementation-composite/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/CompositeClient.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/Source.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/SourceCallback.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/SourceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/Target.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/TargetImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-composite/src/main/resources/InnerComposite.composite delete mode 100644 branches/sca-java-1.3.2/samples/implementation-composite/src/main/resources/InnerComposite2.composite delete mode 100644 branches/sca-java-1.3.2/samples/implementation-composite/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.2/samples/implementation-composite/src/main/resources/OuterComposite.composite delete mode 100644 branches/sca-java-1.3.2/samples/implementation-composite/src/test/java/composite/CompositeTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/README delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/CRUD.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/CRUDImplementation.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/CRUDImplementationFactory.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/backend/ResourceManager.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/impl/CRUDImplementationFactoryImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/impl/CRUDImplementationImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationInvoker.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationProvider.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationProviderFactory.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/META-INF/services/crud.CRUDImplementationFactory delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/sample-implementation-crud.xsd delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/src/test/java/crud/CRUDTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud-extension/src/test/resources/crud.composite delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud/README delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud/implementation-crud.png delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud/implementation-crud.svg delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud/src/main/java/crud/client/CRUDClient.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud/src/main/resources/crud.composite delete mode 100644 branches/sca-java-1.3.2/samples/implementation-crud/src/test/java/crud/client/CRUDTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-notification/README delete mode 100644 branches/sca-java-1.3.2/samples/implementation-notification/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/implementation-notification/implementation-notification.png delete mode 100644 branches/sca-java-1.3.2/samples/implementation-notification/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TestCaseProducer.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TrafficAdvisory.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TrafficAdvisoryClient.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TrafficAdvisoryConsumer.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TrafficAdvisoryProducer.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-notification/src/main/resources/TrafficAdvisoryNotification.componentType delete mode 100644 branches/sca-java-1.3.2/samples/implementation-notification/src/main/resources/TrafficAdvisoryNotification.composite delete mode 100644 branches/sca-java-1.3.2/samples/implementation-notification/src/test/java/notification/TrafficAdvisoryTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-notification/src/test/resources/TrafficAdvisoryNotification.componentType delete mode 100644 branches/sca-java-1.3.2/samples/implementation-notification/src/test/resources/TrafficAdvisoryNotification.composite delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/README delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/POJOImplementation.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/POJOImplementationFactory.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationFactoryImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationProcessor.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationInvoker.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationProvider.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationProviderFactory.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/META-INF/services/pojo.POJOImplementationFactory delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/sample-implementation-pojo.xsd delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorld.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldImpl2.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/resources/helloworld/HelloWorldImpl2.componentType delete mode 100644 branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/resources/helloworld/helloworld.composite delete mode 100644 branches/sca-java-1.3.2/samples/loanapplication/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanApplication.java delete mode 100644 branches/sca-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanApplicationClient.java delete mode 100644 branches/sca-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanClient.java delete mode 100644 branches/sca-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanClientImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanService.java delete mode 100644 branches/sca-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/loanapplication/src/main/resources/loanapplication.composite delete mode 100644 branches/sca-java-1.3.2/samples/loanapplication/src/test/java/loanapplication/LoanApplicationTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/README delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/build-bundles.xml delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/osgi-supplychain.png delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/osgi-supplychain.svg delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/OSGiBundleImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/SupplyChainClient.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/customer/Customer.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/retailer/Retailer.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/shipper/Shipper.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/warehouse/Warehouse.java delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/Customer.componentType delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/DSCustomer.componentType delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/DSRetailer.componentType delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/DSShipper.componentType delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/DSWarehouse.componentType delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/Retailer.componentType delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/Shipper.componentType delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/Warehouse.componentType delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/Customer.mf delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/Retailer.mf delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/Shipper.mf delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/Warehouse.mf delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Customer.mf delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Customer.xml delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Retailer.mf delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Retailer.xml delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Shipper.mf delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Shipper.xml delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Warehouse.mf delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Warehouse.xml delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/supplychain.composite delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/supplychain.ds.composite delete mode 100644 branches/sca-java-1.3.2/samples/osgi-supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/README delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderNodeInfo.java delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderService.java delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/ExternalReferencesQuoteJoin.java delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProvider.java delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProviderImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProviderNodeInfo.java delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/PropertiesQuoteJoin.java delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteCalculator.java delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteCalculatorImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteDataUtil.java delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoin.java delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoinLocal.java delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoinLocalImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/XQueryQuoteClient.java delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/XQueryQuoteServer.java delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join.xq delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_external_references.xq delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_properties.xq delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/wsdl/AvailQuote.xsd delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/wsdl/PriceQuote.xsd delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/wsdl/Quote.xsd delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/wsdl/quotejoin.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/xqueryquotews.composite delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/xqueryquotewsclient.composite delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/test/java/xquery/quote/XQueryQuoteClientTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/quote-xquery/src/test/java/xquery/quote/XQueryQuoteTestServer.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/README delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/simple-bigbank-spring.png delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/simple-bigbank-spring.svg delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountReport.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountService.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/Account.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/AccountDataService.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/CheckingAccount.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/SavingsAccount.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/StockAccount.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/client/BigBankClient.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/stockquote/StockQuoteService.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/resources/Account-spring-context.xml delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/resources/BigBank.composite delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/resources/StockQuote.composite delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/test/java/bigbank/BigBankTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/README delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/simple-bigbank.png delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/simple-bigbank.svg delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/account/AccountReport.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/account/AccountService.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/Account.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataService.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/CheckingAccount.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/SavingsAccount.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/StockAccount.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/client/BigBankClient.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/src/main/resources/Account.composite delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/src/main/resources/BigBank.composite delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/src/main/resources/StockQuote.composite delete mode 100644 branches/sca-java-1.3.2/samples/simple-bigbank/src/test/java/bigbank/BigBankTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback-ws/README delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback-ws/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback-ws/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback-ws/simple-callback-ws.png delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback-ws/simple-callback-ws.svg delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/MyClient.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/MyClientImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/MyService.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceCallback.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/SimpleCallbackClient.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/resources/simplecallback.composite delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/resources/wsdl/simplecallback.wsdl delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback-ws/src/test/java/simplecallback/SimpleCallbackTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback/README delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback/simple-callback.png delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback/simple-callback.svg delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyClient.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyClientImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyService.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyServiceCallback.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/SimpleCallbackClient.java delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback/src/main/resources/simplecallback.composite delete mode 100644 branches/sca-java-1.3.2/samples/simple-callback/src/test/java/simplecallback/SimpleCallbackTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/spi-implementation-pojo/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementation.java delete mode 100644 branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementationActivator.java delete mode 100644 branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/java/sample/JavaInvoker.java delete mode 100644 branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/java/sample/JavaInvokerFactory.java delete mode 100644 branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.spi.ImplementationActivator delete mode 100644 branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorld.java delete mode 100644 branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorldTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/test/resources/helloworld/helloworld.composite delete mode 100644 branches/sca-java-1.3.2/samples/store/README delete mode 100644 branches/sca-java-1.3.2/samples/store/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/store/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/store/src/main/java/launch/Launch.java delete mode 100644 branches/sca-java-1.3.2/samples/store/src/main/java/services/Cart.java delete mode 100644 branches/sca-java-1.3.2/samples/store/src/main/java/services/Catalog.java delete mode 100644 branches/sca-java-1.3.2/samples/store/src/main/java/services/CurrencyConverter.java delete mode 100644 branches/sca-java-1.3.2/samples/store/src/main/java/services/CurrencyConverterImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/store/src/main/java/services/FruitsCatalogImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/store/src/main/java/services/Item.java delete mode 100644 branches/sca-java-1.3.2/samples/store/src/main/java/services/ShoppingCartImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/store/src/main/java/services/Total.java delete mode 100644 branches/sca-java-1.3.2/samples/store/src/main/resources/store.composite delete mode 100644 branches/sca-java-1.3.2/samples/store/src/main/resources/uiservices/store.html delete mode 100644 branches/sca-java-1.3.2/samples/store/store.png delete mode 100644 branches/sca-java-1.3.2/samples/store/store.svg delete mode 100644 branches/sca-java-1.3.2/samples/supplychain/README delete mode 100644 branches/sca-java-1.3.2/samples/supplychain/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/supplychain/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/Customer.java delete mode 100644 branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/CustomerComponentImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/Retailer.java delete mode 100644 branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/RetailerComponentImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/Shipper.java delete mode 100644 branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/ShipperComponentImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/SupplyChainClient.java delete mode 100644 branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/Warehouse.java delete mode 100644 branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/WarehouseComponentImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/supplychain/src/main/resources/supplychain.composite delete mode 100644 branches/sca-java-1.3.2/samples/supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java delete mode 100644 branches/sca-java-1.3.2/samples/supplychain/supplychain.png delete mode 100644 branches/sca-java-1.3.2/samples/supplychain/supplychain.svg delete mode 100644 branches/sca-java-1.3.2/samples/web-resource/README delete mode 100644 branches/sca-java-1.3.2/samples/web-resource/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/web-resource/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/web-resource/src/main/java/web/resource/SampleServer.java delete mode 100644 branches/sca-java-1.3.2/samples/web-resource/src/main/resources/WebResource.composite delete mode 100644 branches/sca-java-1.3.2/samples/web-resource/src/main/resources/myContent/index.html delete mode 100644 branches/sca-java-1.3.2/samples/web-resource/web-resource.png delete mode 100644 branches/sca-java-1.3.2/samples/web-resource/web-resource.svg delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/LICENSE delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/NOTICE delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/README delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/build.xml delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/pom.xml delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCode.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCodeResponse.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCity.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCityResponse.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByState.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByStateResponse.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIP.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIPResponse.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/ObjectFactory.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZip.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZipSoap.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/package-info.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/ArrayOfWeatherData.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceName.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceNameResponse.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCode.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCodeResponse.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/ObjectFactory.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherData.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecast.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecastSoap.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecasts.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/package-info.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/location/LocationClient.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/location/USLocationImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastClient.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeClient.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeService.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeServiceImpl.java delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/resources/USLocation.composite delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/resources/WeatherForecast.composite delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/resources/ZipCode.composite delete mode 100644 branches/sca-java-1.3.2/samples/zipcode-jaxws/src/test/java/zipcode/ZipCodeClientTestCase.java (limited to 'branches/sca-java-1.3.2/samples') diff --git a/branches/sca-java-1.3.2/samples/README b/branches/sca-java-1.3.2/samples/README deleted file mode 100644 index 2646fbb73a..0000000000 --- a/branches/sca-java-1.3.2/samples/README +++ /dev/null @@ -1,306 +0,0 @@ -The Apache Tuscany SCA Samples -============================== -The Apache Tuscany SCA samples are built as part of the main Maven build and -run, using the provided JUnit test cases, as tests in the Maven build. - -In the binary distribution of Apache Tuscany most samples can also -be run using the provided Ant build.xml files. These show the samples running -from a simple main() method without the need for a JUnit test case. - -In these notes text that appears in angled brackets like this means -that you need to make a choice and provide your own text at that point. - -These simple samples have been created with the intention of illustrating the -usage of the SCA API and annotations and certainly not to levels of SCA component -abstraction. In real life situations you should use SCA to assemble real and -usually bigger components, and when you do that you'll get all the benefits of -SCA, bindings, policies, integration in an SOA environment etc.. - -Sample Overview ---------------- -The samples generally show off different features of the SCA runtime -and the extensions that come packaged with it. - -binding-notification-broker - A broker for notificatione -binding-notification-consumer - A consumer of notifications -binding-notification-producer - A producer of notifications - -calculator - Calculator built with java components and - local wires. -calculator-distributed - A calculator built using SCA nodes running - on multiple JVMs -calculator-implementation-policies - Shows logging policites associated with - SCA implementations -calculator-rmi-reference - The calculator configured to talk RMI to - the calculator-rmi-service sample -calculator-rmi-service - The calculator configured to accept RMI - requests from calculator-rmi-reference -calculator-script - Calculator built using various script languages -calculator-webapp - Calculator running inside a web app -calculator-ws-webapp - Calculator running inside a web app also - showing webservices binding - -callbck-ws-client - The client for showing callbacks across web services -callback-ws-service - The server for showing callbacks across web serviced - -chat-webapp - A simple chat style web app demonstrating - use of AJAX binding - -databinding-echo - An SCA application that shows how databindings - transform data - -feed-aggregator - Demonstrates using the ATOM binding -feed-aggregator-webapp - feed-aggregator running in webapp - -helloworld-bpel - Demonstrates an SCA component invoking a BPEL - process in a composition - -helloworld-dojo-webapp - An SCA application that exposes a service using - JSONRPC and a client using the Dojo toolkit -helloworld-jsonrpc-webapp - helloworld using jsonrpc binding -helloworld-ws-reference - The client side of a hello world sample that uses a - web service binding (requires helloworld-ws-service) -helloworld-ws-service - The server side of a hello world sample that uses a - web service binding -helloworld-ws-reference-jms - The client side of a hello world sample that uses a - web service binding with SOAP/JMS (requires - helloworld-ws-service) -helloworld-ws-service-jms - The server side of a hello world sample that - uses a web service binding with SOAP/JMS -helloworld-ws-reference-secure - The client side of a hello world sample that - shows how policy intent can be used. -helloworld-ws-service-secure - The client side of a hello world sample that - shows how policy intent can be used. -helloworld-ws-sdo - helloworld using ws binding and SDO -helloworld-ws-sdo-webapp - helloworld using ws binding and SDO within a webapp - -implementation-composite - Shows how SCA composites are used - -osgi-supplychain - SCA asynchronous API with OSGi and Java - implementation types - -simple-bigbank - A banking application built with java components - and local wire -simple-bigbank-spring - A banking application showing how SCA works with Spring - -simple-callback - demonstrates the callback interface -simple-callback-ws - demonstrates use of callback interface across WS binding - -store - Step by step guide for creating an online store - -supplychain - shows how asynchronous callbacks can be used - -web-resource - Demonstrates using an SCA Web resource component - -quote-xquery - Demonstrate SCA components using XQuery - -Samples for building extensions -------------------------------- -There are samples that demonstrate how to build extensions for the -Tuscany SCA runtime. These samples are slightly different from the samples -above in that the provided code is concerned with building the extension -and not with building an application that uses it. The application -that shows how the new extension can be used is provided in an associated -sample. - -implementation-crud-extension - Shows how to build new implementation type - extensions -implementation-crud - A sample application that exercises the new - implementation extensions -binding-echo-extension - Shows how to build new binding extensions -binding-echo - A sample application that exercises the new - binding extension -implementation-notifiaction- Illustrates the use of -implementation-pojo-extension - shows how new implementation types are constructed - -Sample Layout -------------- -All sample directories are organized in the same way based on the default -project template provided by Maven. For example, take a look at the calculator -sample; - -calculator/ - src/ - Holds all of the source files for the sample - main/ - Groups together the files that implement the sample - java/ - Java source files - resources/ - Non java resource files such as composte files - test/ - Groups together files that provide sample tests - java - Java test sources files. Usually JUnit test cases - target/ - Holds the files generated when the sample is built - classes/ - For example, Java class files - test-classes/ - classes from src/test and other test files - -Getting Ready To Build ----------------------- -You will need to install the following software before you start. - -J2SE Development Kit (JDK) 5.0 -Apache Ant 1.7.0 - if you are going to use Ant -Apache Maven 2.0.6 - if you are going to use Maven - -Java and Ant and/or Maven binary directories must be present in your PATH so -that their executable programs are available in your environment. You may -find it useful to use a script to set up your environment, for example; - -For UNIX: - JAVA_HOME=/ - ANT_HOME=//apache-ant-1.7.0 - MAVEN_HOME=//maven-2.0.6 - export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$MAVEN_HOME/bin:$PATH - -For Windows: - set JAVA_HOME=C:\ - set ANT_HOME=C:\\apache-ant-1.7.0 - set MAVEN_HOME=C:\\maven-2.0.6 - set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%MAVEN_HOME%\bin;%PATH% - - -Building And Running The SCA Samples Using Ant ----------------------------------------------- -The build.xml files provided with the Apache Tuscany SCA samples are designed -to work with the binary distribution. They rely on the tuscany-sca-manifest.jar -to describe the class path and this jar is only provided as part of the -binary distribution. - -The binary distribution of SCA also includes precompiled versions of each sample. -If you look in the target directory of each sample you will see this jar file. To -run a sample based on all of the precompiled artifacts all you have to do is: - -cd -ant run - -Check each /README file as some samples require that two progams are -run to get the desired result, for example, the two samples that show how -to build extensions are run from their associated application samples. - -If you want to rebuild a sample, for example, if you have changed it, do the -following: - -cd -ant compile - -Once the sample is built you have the option of running the sample in whatever -way best suits you. Two alternatives are provided in the ant build files. - -The compile target builds the class files and then builds the jar so you can use -the same command as before: - -ant run - -This will use the generated jar to run the samples. The command line version of -this is: - -on Windows - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\ - -for example : java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator.jar calculator.CalculatorClient - -on *nix - -java -cp ../../lib/tuscany-sca-manifest.jar:target/ - -for example : java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator.jar calculator.CalculatorClient - - -You can use the compiled classes directly using - -ant run-classes - -The command line version of this is: - -on Windows - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\classes - -for example : java -cp ..\..\lib\tuscany-sca-manifest.jar;target\classes calculator.CalculatorClient - -on *nix - -java -cp ../../lib/tuscany-sca-manifest.jar:target/classes - -for example : java -cp ../../lib/tuscany-sca-manifest.jar:target/classes calculator.CalculatorClient - -The class specified on the command of course depends on which sample you want to -run. In the examples we have used we are running the CalculatorClient from the calculator sample. - - -Building And Running The SCA Samples Using Maven ------------------------------------------------- - -The Maven build process will work from both source and binary distributions. -To build and test all of the Apache Tuscany SCA sources, including the samples, -do the following. - -cd sca -mvn - -This will take a little while to complete. Experience with Maven tells us that -sometimes there are problems downloading the dependencies that Apache Tuscany -SCA requires. If Maven reports that it cannot download required dependencies -try running the Maven build again. - -Once you have all of the source built you can build and run each sample -independently if required. - -cd -mvn - -When using Maven the samples are run within JUnit test cases and so you will -sometimes not see any test output. You will always see an indication of test -success or failure. - -Using The Samples In An IDE ---------------------------------------------- -The easiest way to use the samples in an IDE is to use Maven to generate all -of the IDE project files for you automatically. This works best if you -generate IDE projects for all of the Apache Tuscany modules. You can then -include the ones you are interested in working with in you IDE. - -To build IDE project files for all of the modules in Apache Tuscany SCA; - -cd sca - -If you are an Eclipse user do the following - -mvn -Peclipse eclipse:eclipse - -If you are an IDEA user do the following - -mvn idea:idea - -These commands generate project files for each module in Apache Tuscany SCA. -The modules you are interested in can now be included in your IDE, for example, -in Eclipse, if you create a new Java project and use the option to "create a -new project from existing source" you can specify an SCA module directory, -which includes the generated project files, and Eclipse will treat it like any -other Java project. - -Using The Samples In An IDE Without Maven ------------------------------------------ -We don't provide any IDE project files with our distributions so you will have to -import the sample files into your IDE manually. Here's an example of how it can be -done using Eclipse. - -In a new or existing workspace - Create a new java project to represent the sample you want to work on, e.g. - calculator - Import all of the sample code and resources into this project, e.g. - File, Import and then select tuscany-sca-1.0-incubating\samples\calculator from the filesystem - Configure the source path to include - src/main/java - src/main/resources - Configure the output folder to be - calculator/target - Configure the build path to include all of the jars provided in - lib - If you select calculator.CalculatorClient.java and run as "Java Application" you should see - 3 + 2=5.0 - 3 - 2=1.0 - 3 * 2=6.0 - 3 / 2=1.5 - -The details of how to do this for other development environments will -vary but the process will be similar. - - diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/README b/branches/sca-java-1.3.2/samples/binding-echo-extension/README deleted file mode 100644 index 94716b151f..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/README +++ /dev/null @@ -1,74 +0,0 @@ -Binding Echo Sample -=================== -This sample demonstrates how new bindings are constructed for Apache Tuscany -SCA. - -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 want to try out the echo binding that this sample provides -please see the binding-echo sample that provides the necessary client and -application code to bring up an application that uses this binding - -Sample Overview ---------------- -This sample contains a implementation of an SCA binding that simply echoes back -any messages that are sent to it. - -binding-echo-extension/ - src/ - main/ - java/ - echo/ - The binding interfaces - impl/ - The bindings model classes - provider/ - The bindings runtime classes - server/ - A dummy server that the binding is plugged into - resources/ - META-INF/ - services/ - The extension declaration - test/ - java/ - echo/ - test code - resources/ - EchoBinding.composite - the SCA assembly used by the unit test - 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 binding-echo-extension -ant compile - -See the binding-echo sample to run a sample that uses this binding. - -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 binding-echo-extension -mvn - -Maven will also test that the sample extension built properly. You should see -the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running echo.EchoServiceTestCase -Returned message: oof -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.011 sec -Running echo.EchoReferenceTestCase -Returned message: oof -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.06 sec - -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-java-1.3.2/samples/binding-echo-extension/build.xml b/branches/sca-java-1.3.2/samples/binding-echo-extension/build.xml deleted file mode 100644 index 5df5981bea..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/build.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/pom.xml b/branches/sca-java-1.3.2/samples/binding-echo-extension/pom.xml deleted file mode 100644 index 44e3e9b814..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../../pom.xml - - sample-binding-echo-extension - Apache Tuscany SCA Echo Binding Extension Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-assembly-xml - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-core-spi - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - test - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/EchoBinding.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/EchoBinding.java deleted file mode 100644 index 3fe1598e0d..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/EchoBinding.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 echo; - -import org.apache.tuscany.sca.assembly.Binding; - -/** - * A model for the sample Echo binding. - */ -public interface EchoBinding extends Binding { - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/EchoBindingFactory.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/EchoBindingFactory.java deleted file mode 100644 index 0f6fee82be..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/EchoBindingFactory.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 echo; - -/** - * A factory for the sample Echo binding model. - */ -public interface EchoBindingFactory { - - /** - * Creates a new Echo binding. - * - * @return a new Echo binding - */ - EchoBinding createEchoBinding(); -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingFactoryImpl.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingFactoryImpl.java deleted file mode 100644 index af759dbf93..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingFactoryImpl.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 echo.impl; - -import echo.EchoBinding; -import echo.EchoBindingFactory; - -/** - * A factory for the sample Echo binding model. - */ -public class EchoBindingFactoryImpl implements EchoBindingFactory { - - public EchoBinding createEchoBinding() { - return new EchoBindingImpl(); - } - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingImpl.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingImpl.java deleted file mode 100644 index 19c9271bb8..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingImpl.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package echo.impl; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.tuscany.sca.policy.Intent; -import org.apache.tuscany.sca.policy.IntentAttachPointType; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.policy.PolicySetAttachPoint; - -import echo.EchoBinding; - -/** - * Implementation of the Echo binding model. - */ -public class EchoBindingImpl implements EchoBinding, PolicySetAttachPoint { - - private String name; - private String uri; - private List requiredIntents = new ArrayList(); - private List policySets = new ArrayList(); - private List applicablePolicySets = new ArrayList(); - private IntentAttachPointType bindingType = null; - - public IntentAttachPointType getType() { - return bindingType; - } - - public void setType(IntentAttachPointType type) { - this.bindingType = type; - } - - public String getName() { - return name; - } - - public String getURI() { - return uri; - } - - public void setName(String name) { - this.name = name; - } - - public void setURI(String uri) { - this.uri = uri; - } - - public List getPolicySets() { - return policySets; - } - - public List getRequiredIntents() { - return requiredIntents; - } - - public boolean isUnresolved() { - // The sample binding is always resolved - return false; - } - - public void setUnresolved(boolean unresolved) { - // The sample binding is always resolved - } - - public void setPolicySets(List policySets) { - this.policySets = policySets; - - } - - public void setRequiredIntents(List intents) { - this.requiredIntents = intents; - - } - - @Override - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - public List getApplicablePolicySets() { - return this.applicablePolicySets; - } - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingProcessor.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingProcessor.java deleted file mode 100644 index 45fdb73f67..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/impl/EchoBindingProcessor.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package echo.impl; - -import java.util.ArrayList; -import java.util.List; - -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.assembly.xml.PolicyAttachPointProcessor; -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; -import org.apache.tuscany.sca.policy.Intent; -import org.apache.tuscany.sca.policy.PolicyFactory; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.policy.PolicySetAttachPoint; -import org.apache.tuscany.sca.policy.IntentAttachPointType; -import org.apache.tuscany.sca.policy.impl.IntentAttachPointTypeFactoryImpl; - -import echo.EchoBinding; -import echo.EchoBindingFactory; - -/** - * A processor for elements. - */ -public class EchoBindingProcessor implements StAXArtifactProcessor { - - private QName BINDING_ECHO = new QName("http://echo", "binding.echo"); - - private final EchoBindingFactory factory; - private PolicyAttachPointProcessor policyProcessor; - - public EchoBindingProcessor(EchoBindingFactory factory, PolicyFactory policyFactory) { - this.factory = factory; - this.policyProcessor = new PolicyAttachPointProcessor(policyFactory); - } - - public QName getArtifactType() { - return BINDING_ECHO; - } - - public Class getModelType() { - return EchoBinding.class; - } - - public EchoBinding read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException { - EchoBinding echoBinding = factory.createEchoBinding(); - IntentAttachPointType bindingType = new IntentAttachPointTypeFactoryImpl().createBindingType(); - bindingType.setName(getArtifactType()); - bindingType.setUnresolved(true); - ((PolicySetAttachPoint)echoBinding).setType(bindingType); - - String name = reader.getAttributeValue(null, "name"); - if (name != null) { - echoBinding.setName(name); - } - - String uri = reader.getAttributeValue(null, "uri"); - if (uri != null) { - echoBinding.setURI(uri); - } - - policyProcessor.readPolicies(echoBinding, reader); - - return echoBinding; - } - - public void write(EchoBinding echoBinding, XMLStreamWriter writer) throws ContributionWriteException, XMLStreamException { - - policyProcessor.writePolicyPrefixes(echoBinding, writer); - writer.writeStartElement(BINDING_ECHO.getNamespaceURI(), BINDING_ECHO.getLocalPart()); - policyProcessor.writePolicyAttributes(echoBinding, writer); - - if (echoBinding.getName() != null) { - writer.writeAttribute("name", echoBinding.getName()); - } - - if (echoBinding.getURI() != null) { - writer.writeAttribute("uri", echoBinding.getURI()); - } - - writer.writeEndElement(); - } - - public void resolve(EchoBinding echoBinding, ModelResolver resolver) throws ContributionResolveException { - PolicySetAttachPoint policySetAttachPoint = (PolicySetAttachPoint)echoBinding; - List requiredIntents = new ArrayList(); - Intent resolvedIntent = null; - for ( Intent intent : policySetAttachPoint.getRequiredIntents() ) { - resolvedIntent = resolver.resolveModel(Intent.class, intent); - requiredIntents.add(resolvedIntent); - } - policySetAttachPoint.getRequiredIntents().clear(); - policySetAttachPoint.getRequiredIntents().addAll(requiredIntents); - - List resolvedPolicySets = new ArrayList(); - PolicySet resolvedPolicySet = null; - for ( PolicySet policySet : policySetAttachPoint.getPolicySets() ) { - resolvedPolicySet = resolver.resolveModel(PolicySet.class, policySet); - resolvedPolicySets.add(resolvedPolicySet); - } - policySetAttachPoint.getPolicySets().clear(); - policySetAttachPoint.getPolicySets().addAll(resolvedPolicySets); - } -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingInvoker.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingInvoker.java deleted file mode 100644 index 91697fcd9a..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingInvoker.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 echo.provider; - -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.invocation.Message; - -/** - * Invoker for the sample echo binding. - */ -class EchoBindingInvoker implements Invoker { - - EchoBindingInvoker() { - } - - public Message invoke(Message msg) { - try { - System.out.println("Passing thro invoker..."); - Object[] args = msg.getBody(); - - // echo back the first parameter, a real binding would invoke some API for flowing the request - Object result = args[0]; - - msg.setBody(result); - - } catch (Exception e) { - msg.setFaultBody(e); - } - return msg; - } - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingPoliciedInvoker.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingPoliciedInvoker.java deleted file mode 100644 index 4877bade7f..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingPoliciedInvoker.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 echo.provider; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.invocation.Message; -import org.apache.tuscany.sca.policy.PolicySet; - -import echo.provider.policy.PolicyHandler; -import echo.provider.policy.EncryptionPolicyHandler; - -/** - * Invoker that applies policies before invocation for the sample echo binding. - */ -public class EchoBindingPoliciedInvoker implements Invoker { - List policies = null; - Map policyHandlers = new HashMap(); - - public EchoBindingPoliciedInvoker(List policies) { - this.policies = policies; - policyHandlers.put(new QName("http://test","EncryptionPolicy"), - new EncryptionPolicyHandler()); - } - - public Message invoke(Message msg) { - try { - Object[] args = msg.getBody(); - - applyPolicies(args); - - // echo back the first parameter, a real binding would invoke some API for flowing the request - Object result = args[0]; - - msg.setBody(result); - - } catch (Exception e) { - msg.setFaultBody(e); - } - return msg; - } - - private void applyPolicies(Object[] args) throws Exception { - for ( PolicySet policySet : policies ) { - PolicyHandler policyHandler = policyHandlers.get(policySet.getName()); - policyHandler.applyPolicy(args, policySet); - } - } - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingProviderFactory.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingProviderFactory.java deleted file mode 100644 index ba74d8f99a..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoBindingProviderFactory.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 echo.provider; - -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.invocation.MessageFactory; -import org.apache.tuscany.sca.provider.BindingProviderFactory; -import org.apache.tuscany.sca.provider.ReferenceBindingProvider; -import org.apache.tuscany.sca.provider.ServiceBindingProvider; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentReference; -import org.apache.tuscany.sca.runtime.RuntimeComponentService; - -import echo.EchoBinding; - - -/** - * Implementation of the Echo binding model. - */ -public class EchoBindingProviderFactory implements BindingProviderFactory { - - private MessageFactory messageFactory; - - public EchoBindingProviderFactory(ExtensionPointRegistry extensionPoints) { - ModelFactoryExtensionPoint factories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class); - this.messageFactory = factories.getFactory(MessageFactory.class); - } - - public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, EchoBinding binding) { - return new EchoReferenceBindingProvider(component, reference, binding); - } - - public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, EchoBinding binding) { - return new EchoServiceBindingProvider(component, service, binding, messageFactory); - } - - public Class getModelType() { - return EchoBinding.class; - } -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoReferenceBindingProvider.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoReferenceBindingProvider.java deleted file mode 100644 index 0efc319af9..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoReferenceBindingProvider.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 echo.provider; - -import org.apache.tuscany.sca.interfacedef.InterfaceContract; -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.policy.PolicySetAttachPoint; -import org.apache.tuscany.sca.provider.ReferenceBindingProvider; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentReference; - -import echo.EchoBinding; - -/** - * Implementation of the Echo binding provider. - */ -class EchoReferenceBindingProvider implements ReferenceBindingProvider { - - private RuntimeComponentReference reference; - private EchoBinding binding; - - EchoReferenceBindingProvider(RuntimeComponent component, - RuntimeComponentReference reference, - EchoBinding binding) { - this.reference = reference; - this.binding = binding; - } - - public Invoker createInvoker(Operation operation) { - if (binding instanceof PolicySetAttachPoint) { - PolicySetAttachPoint policySetAttachPoint = (PolicySetAttachPoint)binding; - if ( !policySetAttachPoint.getPolicySets().isEmpty() ){ - return new EchoBindingPoliciedInvoker(policySetAttachPoint.getPolicySets()); - } - } - return new EchoBindingInvoker(); - } - - public boolean supportsOneWayInvocation() { - return false; - } - - public InterfaceContract getBindingInterfaceContract() { - return reference.getInterfaceContract(); - } - - public void start() { - } - - public void stop() { - } - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoServiceBindingProvider.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoServiceBindingProvider.java deleted file mode 100644 index 1cd1e5af4e..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/EchoServiceBindingProvider.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package echo.provider; - -import org.apache.tuscany.sca.interfacedef.InterfaceContract; -import org.apache.tuscany.sca.invocation.InvocationChain; -import org.apache.tuscany.sca.invocation.MessageFactory; -import org.apache.tuscany.sca.provider.ServiceBindingProvider; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentService; -import org.apache.tuscany.sca.runtime.RuntimeWire; - -import echo.EchoBinding; -import echo.server.EchoServer; -import echo.server.EchoServiceListener; - -/** - * Implementation of the Echo binding provider. - */ -class EchoServiceBindingProvider implements ServiceBindingProvider { - - private RuntimeComponent component; - private RuntimeComponentService service; - private EchoBinding binding; - private MessageFactory messageFactory; - - EchoServiceBindingProvider(RuntimeComponent component, - RuntimeComponentService service, EchoBinding binding, MessageFactory messageFactory) { - this.component = component; - this.service = service; - this.binding = binding; - this.messageFactory = messageFactory; - } - - public InterfaceContract getBindingInterfaceContract() { - return service.getInterfaceContract(); - } - - public boolean supportsOneWayInvocation() { - return false; - } - - public void start() { - - RuntimeComponentService componentService = (RuntimeComponentService) service; - RuntimeWire wire = componentService.getRuntimeWire(binding); - InvocationChain chain = wire.getInvocationChains().get(0); - - // Register with the hosting server - String uri = binding.getURI(); - EchoServer.getServer().register(uri, new EchoServiceListener(chain.getHeadInvoker(), messageFactory)); - } - - public void stop() { - - // Unregister from the hosting server - String uri = component.getURI() + "/" + binding.getName(); - EchoServer.getServer().unregister(uri); - } - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingEncryptionPolicy.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingEncryptionPolicy.java deleted file mode 100644 index 33dc761aa4..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingEncryptionPolicy.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 echo.provider.policy; - -/** - */ -public class EchoBindingEncryptionPolicy extends EchoBindingPolicy { - - private String encryptionStrategyClassName; - private Class strategyClass; - - public String getEncryptionStrategyClassName() { - return encryptionStrategyClassName; - } - public void setEncryptionStrategyClassName(String encryptionStrategyClassName) { - this.encryptionStrategyClassName = encryptionStrategyClassName; - } - public Class getStrategyClass() { - return strategyClass; - } - public void setStrategyClass(Class strategy) { - this.strategyClass = strategy; - } - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingEncryptionPolicyProcessor.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingEncryptionPolicyProcessor.java deleted file mode 100644 index c847d088a6..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingEncryptionPolicyProcessor.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 echo.provider.policy; - -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.monitor.Monitor; - - -/** - * - */ -public class EchoBindingEncryptionPolicyProcessor extends EchoBindingPolicyProcessor { - - public EchoBindingEncryptionPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) { - } - - public Class getModelType() { - return EchoBindingEncryptionPolicy.class; - } - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingPolicy.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingPolicy.java deleted file mode 100644 index 7d38e3b7a8..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingPolicy.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 echo.provider.policy; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.policy.Policy; - -/** - - */ -public class EchoBindingPolicy implements Policy { - private boolean unresolved = true; - - public QName getSchemaName() { - return new QName("http://sample/policy","echoBindingPolicy"); - } - - public boolean isUnresolved() { - return unresolved; - } - - public void setUnresolved(boolean unresolved) { - this.unresolved = unresolved; - } - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingPolicyProcessor.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingPolicyProcessor.java deleted file mode 100644 index 72b8002238..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingPolicyProcessor.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package echo.provider.policy; - -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.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.resolver.ClassReference; -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; - -/** - * - */ -public abstract class EchoBindingPolicyProcessor implements StAXArtifactProcessor { - public static final String ENCRYPTION = "Encryption"; - - public QName getArtifactType() { - return new QName("http://sample/policy", "echoBindingPolicy"); - } - - public T read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException { - String name = reader.getAttributeValue(null, "name"); - if (name != null && name.equals(ENCRYPTION)) { - EchoBindingEncryptionPolicy policy = new EchoBindingEncryptionPolicy(); - policy.setEncryptionStrategyClassName(reader.getAttributeValue(null, "strategy")); - return (T)policy; - } - return null; - } - - public void write(T arg0, XMLStreamWriter arg1) throws ContributionWriteException, XMLStreamException { - } - - public void resolve(T policy, ModelResolver resolver) throws ContributionResolveException { - if (policy instanceof EchoBindingEncryptionPolicy) { - EchoBindingEncryptionPolicy ePolicy = (EchoBindingEncryptionPolicy)policy; - - ClassReference classReference = new ClassReference(ePolicy.getEncryptionStrategyClassName()); - classReference = resolver.resolveModel(ClassReference.class, classReference); - Class javaClass = classReference != null ? classReference.getJavaClass() : null; - if (javaClass == null) { - //throw new ContributionResolveException(new ClassNotFoundException(ePolicy.getEncryptionStrategyClass())); - } - //ePolicy.setStrategyClass(javaClass); - //FIXME: need to resolve this thro resolver - try { - ePolicy.setStrategyClass((Class)Class.forName(ePolicy - .getEncryptionStrategyClassName())); - } catch (Exception e) { - throw new ContributionResolveException(e); - } - ePolicy.setStrategyClass(ePolicy.getStrategyClass()); - ePolicy.setUnresolved(false); - } - } -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EncryptionPolicyHandler.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EncryptionPolicyHandler.java deleted file mode 100644 index deda8d9744..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EncryptionPolicyHandler.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 echo.provider.policy; - -import org.apache.tuscany.sca.policy.Policy; -import org.apache.tuscany.sca.policy.PolicySet; - -/** - * Sample policy handler - */ -public class EncryptionPolicyHandler implements PolicyHandler { - - public void applyPolicy(Object msg, PolicySet policySet) throws Exception { - for ( Object aPolicy : policySet.getPolicies() ) { - if ( aPolicy instanceof EchoBindingEncryptionPolicy ) { - encrypt(msg, (EchoBindingEncryptionPolicy)aPolicy); - } - } - } - - private void encrypt(Object msg, EchoBindingEncryptionPolicy policy) throws Exception { - if ( !policy.isUnresolved() && msg instanceof Object[] ) { - EncryptionStrategy strategy = policy.getStrategyClass().newInstance(); - Object[] msgArgs = (Object[])msg; - for ( int count = 0 ; count < msgArgs.length ; ++count ) { - msgArgs[count] = strategy.encryptMessage(msgArgs[count]); - } - } - - } - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EncryptionStrategy.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EncryptionStrategy.java deleted file mode 100644 index ffadfc7fff..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/EncryptionStrategy.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 echo.provider.policy; - -/** - - */ -public interface EncryptionStrategy { - Object encryptMessage(Object msg); -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/PolicyHandler.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/PolicyHandler.java deleted file mode 100644 index 6fa5f26977..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/PolicyHandler.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 echo.provider.policy; - -import org.apache.tuscany.sca.policy.PolicySet; - -/** - * Sample Policy Handler Interface - * - */ -public interface PolicyHandler { - void applyPolicy(Object msg, PolicySet policySet) throws Exception; -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/ReverseEncryptionStrategy.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/ReverseEncryptionStrategy.java deleted file mode 100644 index cf55b36fc2..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/ReverseEncryptionStrategy.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 echo.provider.policy; - -/** - */ -public class ReverseEncryptionStrategy implements EncryptionStrategy { - - public Object encryptMessage(Object msg) { - if ( msg instanceof String ) { - StringBuffer sb = new StringBuffer((String)msg); - msg = sb.reverse().toString(); - } - return msg; - } - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/WSPolicy.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/WSPolicy.java deleted file mode 100644 index ac610cfb51..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/WSPolicy.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 echo.provider.policy; - -import javax.xml.namespace.QName; - -import org.apache.tuscany.sca.policy.Policy; - -/** - - */ -public class WSPolicy implements Policy { - private boolean unresolved = true; - - public QName getSchemaName() { - return new QName("http://schemas.xmlsoap.org/ws/2004/09/policy", "PolicyAttachment"); - } - - public boolean isUnresolved() { - return unresolved; - } - - public void setUnresolved(boolean unresolved) { - this.unresolved = unresolved; - } - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/WSPolicyProcessor.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/WSPolicyProcessor.java deleted file mode 100644 index fcb250b444..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/provider/policy/WSPolicyProcessor.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 echo.provider.policy; - -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.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; - -public class WSPolicyProcessor implements StAXArtifactProcessor { - - public QName getArtifactType() { - return new QName("http://schemas.xmlsoap.org/ws/2004/09/policy", "PolicyAttachment"); - } - - public WSPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException { - //FIXME Implement this method - return new WSPolicy(); - } - - public void write(WSPolicy wsPolicy, XMLStreamWriter writer) throws ContributionWriteException, XMLStreamException { - //FIXME Implement this method - } - - public Class getModelType() { - return WSPolicy.class; - } - - public void resolve(WSPolicy wsPolicy, ModelResolver modelResolver) throws ContributionResolveException { - - } -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/server/EchoServer.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/server/EchoServer.java deleted file mode 100644 index 8ea2395d04..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/server/EchoServer.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package echo.server; - -import java.lang.reflect.InvocationTargetException; -import java.util.HashMap; -import java.util.Map; - -/** - * A sample Echo server, showing how to integrate service bindings. - */ -public class EchoServer { - - public static EchoServer server; - - private Map services = new HashMap(); - - public static void start() { - } - - public static void stop() { - } - - public static EchoServer getServer() { - if (server == null) - server = new EchoServer(); - return server; - } - - /** - * Register a service under the given name. - * - * @param service - * @param name - */ - public void register(String uri, EchoServiceListener service) { - if (services.isEmpty()) { - start(); - } - services.put(uri, service); - } - - public void unregister(String uri) { - services.remove(uri); - if (services.isEmpty()) { - stop(); - } - } - - /** - * Dispatch an incoming interaction to the corresponding service. - * - * @param uri - * @param input - * @return - */ - public String sendReceive(String uri, String input) throws InvocationTargetException { - return services.get(uri).sendReceive(input); - } - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/server/EchoServiceListener.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/server/EchoServiceListener.java deleted file mode 100644 index 32336dd94f..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/java/echo/server/EchoServiceListener.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 echo.server; - -import java.lang.reflect.InvocationTargetException; - -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.invocation.Message; -import org.apache.tuscany.sca.invocation.MessageFactory; - -public class EchoServiceListener { - private Invoker invoker; - private MessageFactory messageFactory; - - public EchoServiceListener(Invoker invoker, MessageFactory messageFactory) { - super(); - this.invoker = invoker; - this.messageFactory = messageFactory; - } - - public String sendReceive(String input) throws InvocationTargetException { - - // Create a request message - Message request = messageFactory.createMessage(); - request.setBody(new Object[] {input}); - - // Dispatch and get the response - Message response = invoker.invoke(request); - Object body = response.getBody(); - if (response.isFault()) { - throw new InvocationTargetException((Throwable)body); - } - return (String)body; - } - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/META-INF/services/echo.EchoBindingFactory b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/META-INF/services/echo.EchoBindingFactory deleted file mode 100644 index 55be293862..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/META-INF/services/echo.EchoBindingFactory +++ /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 binding model factory -echo.impl.EchoBindingFactoryImpl diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor deleted file mode 100644 index 06d53250c1..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor +++ /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. - -# Implementation class for the artifact processor extension -org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://echo#binding.echo,model=echo.EchoBinding,factory=echo.EchoBindingFactory -echo.provider.policy.EchoBindingEncryptionPolicyProcessor;qname=http://sample/policy#echoBindingPolicy,model=echo.provider.policy.EchoBindingEncryptionPolicy -org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://schemas.xmlsoap.org/ws/2004/09/policy#PolicyAttachment,model=echo.provider.policy.WSPolicy diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema deleted file mode 100644 index 4ad61f573d..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema +++ /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. - -# URI of the XML schema to be used for validation -sample-binding-echo.xsd diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory deleted file mode 100644 index efa475ef92..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory +++ /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 binding provider extension -echo.provider.EchoBindingProviderFactory;model=echo.EchoBinding diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/sample-binding-echo.xsd b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/sample-binding-echo.xsd deleted file mode 100644 index 9b64df4871..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/main/resources/sample-binding-echo.xsd +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/java/echo/Echo.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/java/echo/Echo.java deleted file mode 100644 index 1d5e973f33..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/java/echo/Echo.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 echo; - -/** - * Interface of our sample Echo service. - * - * @version $Rev$ $Date$ - */ -public interface Echo { - - String echo(String msg); -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/java/echo/EchoComponentImpl.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/java/echo/EchoComponentImpl.java deleted file mode 100644 index ba68dfe908..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/java/echo/EchoComponentImpl.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 echo; - -import org.osoa.sca.annotations.Constructor; -import org.osoa.sca.annotations.Reference; - - -/** - * A simple client component that uses a reference with an Echo binding. - * - * @version $Rev$ $Date$ - */ -public class EchoComponentImpl implements Echo { - - private Echo echoReference; - - @Constructor - public EchoComponentImpl(@Reference(name = "echoReference", required = true) Echo echoReference) { - this.echoReference = echoReference; - } - - public String echo(String msg) { - String result = echoReference.echo(msg); - System.out.println("Returned message: "+ result); - return result; - } -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/java/echo/EchoReferenceTestCase.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/java/echo/EchoReferenceTestCase.java deleted file mode 100644 index 7383077f18..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/java/echo/EchoReferenceTestCase.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 echo; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * @version $Rev$ $Date$ - */ -public class EchoReferenceTestCase extends TestCase { - - private SCADomain scaDomain; - private Echo service; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("EchoBinding.composite"); - service = scaDomain.getService(Echo.class, "EchoComponent"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testEchoBinding() { - String result = service.echo("foo"); - assertEquals(result, "oof"); - } - - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/java/echo/EchoServiceTestCase.java b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/java/echo/EchoServiceTestCase.java deleted file mode 100644 index ab05516622..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/java/echo/EchoServiceTestCase.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 echo; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import echo.server.EchoServer; - -/** - * @version $Rev$ $Date$ - */ -public class EchoServiceTestCase extends TestCase { - - private SCADomain scaDomain; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("EchoBinding.composite"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testEchoBinding() throws Exception { - String result = EchoServer.getServer().sendReceive("http://tempuri.org", "foo"); - assertEquals(result, "oof"); - } - - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/resources/EchoBinding.composite b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/resources/EchoBinding.composite deleted file mode 100644 index 176d67cc4b..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/resources/EchoBinding.composite +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/resources/definitions.xml b/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/resources/definitions.xml deleted file mode 100644 index 155e175a31..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo-extension/src/test/resources/definitions.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.3.2/samples/binding-echo/README b/branches/sca-java-1.3.2/samples/binding-echo/README deleted file mode 100644 index 2772460cc6..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo/README +++ /dev/null @@ -1,104 +0,0 @@ -Binding Echo Sample Application -=============================== -This sample demonstrates how to use the new binding extension -binding-echo-extension. - -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;..\binding-echo-extension\target\sample-binding-echo-extension.jar;target\sample-binding-echo.jar echo.EchoBindingClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:../binding-echo-extension/target/sample-binding-echo-extension.jar:target/sample-binding-echo.jar echo.EchoBindingClient - -This looks like a long command. The three things we add to the classpath are - -tuscany-sca-manifest.jar - all of the standard Tuscany SCA runtime and - extension classes -sample-binding-echo-extension.jar - the new echo binding extension implementation -sample-binding-echo - the application that uses the echo binding - -Note: this sample currently is not working on Linux - -Sample Overview ---------------- -This sample contains an application (client and server code) that uses -an SCA binding that simply echoes back any messages that are sent to it. - -binding-echo/ - src/ - main/ - java/ - echo/ - Echo.java - interface definition for the sample - reference and service - EchoComponentImpl.java - sample component implementation with - echo binding reference - EchoBindingClient.java - sample client - resources/ - EchoBinding.composite - the SCA assembly for this sample - test/ - java/ - echo - EchoBindingTestCase.java - sample JUnit test case for the sample - client - binding-echo.png - 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 binding-echo -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] Passing thro invoker... - [java] Returned message: foo - [java] Echo reference = foo - [java] Passing thro invoker... - [java] Returned message: bar - [java] Echo service = bar - - -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 binding-echo -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running echo.EchoBindingTestCase -Passing thro invoker... -Returned message: foo -Passing thro invoker... -Returned message: bar -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.811 sec - -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-java-1.3.2/samples/binding-echo/binding-echo.png b/branches/sca-java-1.3.2/samples/binding-echo/binding-echo.png deleted file mode 100644 index a38d985363..0000000000 Binary files a/branches/sca-java-1.3.2/samples/binding-echo/binding-echo.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/binding-echo/binding-echo.svg b/branches/sca-java-1.3.2/samples/binding-echo/binding-echo.svg deleted file mode 100644 index 5b5051bef5..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo/binding-echo.svg +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - EchoBinding - - - EchoComponent - - - - EchoSerivce EchoReference - - - diff --git a/branches/sca-java-1.3.2/samples/binding-echo/build.xml b/branches/sca-java-1.3.2/samples/binding-echo/build.xml deleted file mode 100644 index 7689ef3a54..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo/build.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/binding-echo/pom.xml b/branches/sca-java-1.3.2/samples/binding-echo/pom.xml deleted file mode 100644 index 1de3bba3d1..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../../pom.xml - - sample-binding-echo - Apache Tuscany SCA Echo Binding Sample Application - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - sample-binding-echo-extension - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/binding-echo/src/main/java/echo/Echo.java b/branches/sca-java-1.3.2/samples/binding-echo/src/main/java/echo/Echo.java deleted file mode 100644 index 1d5e973f33..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo/src/main/java/echo/Echo.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 echo; - -/** - * Interface of our sample Echo service. - * - * @version $Rev$ $Date$ - */ -public interface Echo { - - String echo(String msg); -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo/src/main/java/echo/EchoBindingClient.java b/branches/sca-java-1.3.2/samples/binding-echo/src/main/java/echo/EchoBindingClient.java deleted file mode 100644 index 21bdff4011..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo/src/main/java/echo/EchoBindingClient.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 echo; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import echo.server.EchoServer; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - * @version $Rev$ $Date$ - */ -public class EchoBindingClient { - - public static void main(String[] args) throws Exception { - - SCADomain scaDomain = SCADomain.newInstance("EchoBinding.composite"); - - // Call the echo service component which will, in turn, call a reference - // with an echo binding. The echo binding will echo the given string. - Echo service = scaDomain.getService(Echo.class, "EchoComponent"); - String echoString = service.echo("foo"); - System.out.println("Echo reference = " + echoString ); - - // Call the echo server. This will dispatch the call to a service with an - // echo binding. The echo binding will pass the call to the echo component. - echoString = EchoServer.getServer().sendReceive("http://tempuri.org", "bar"); - System.out.println("Echo service = " + echoString ); - - scaDomain.close(); - - } - -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo/src/main/java/echo/EchoComponentImpl.java b/branches/sca-java-1.3.2/samples/binding-echo/src/main/java/echo/EchoComponentImpl.java deleted file mode 100644 index ba68dfe908..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo/src/main/java/echo/EchoComponentImpl.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 echo; - -import org.osoa.sca.annotations.Constructor; -import org.osoa.sca.annotations.Reference; - - -/** - * A simple client component that uses a reference with an Echo binding. - * - * @version $Rev$ $Date$ - */ -public class EchoComponentImpl implements Echo { - - private Echo echoReference; - - @Constructor - public EchoComponentImpl(@Reference(name = "echoReference", required = true) Echo echoReference) { - this.echoReference = echoReference; - } - - public String echo(String msg) { - String result = echoReference.echo(msg); - System.out.println("Returned message: "+ result); - return result; - } -} diff --git a/branches/sca-java-1.3.2/samples/binding-echo/src/main/resources/EchoBinding.composite b/branches/sca-java-1.3.2/samples/binding-echo/src/main/resources/EchoBinding.composite deleted file mode 100644 index 94612fb325..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo/src/main/resources/EchoBinding.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/binding-echo/src/test/java/echo/EchoBindingTestCase.java b/branches/sca-java-1.3.2/samples/binding-echo/src/test/java/echo/EchoBindingTestCase.java deleted file mode 100644 index 1a597fc80f..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-echo/src/test/java/echo/EchoBindingTestCase.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 echo; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import echo.Echo; -import echo.server.EchoServer; - -public class EchoBindingTestCase extends TestCase { - - private SCADomain scaDomain; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("EchoBinding.composite"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testReference() throws Exception { - // Call the echo service component which will, in turn, call a reference - // with an echo binding. The echo binding will echo the given string. - Echo service = scaDomain.getService(Echo.class, "EchoComponent"); - String echoString = service.echo("foo"); - assertEquals(echoString, "foo"); - } - - public void testService() throws Exception { - // Call the echo server. This will dispatch the call to a service with an - // echo binding. The echo binding will pass the call to the echo component. - String echoString = EchoServer.getServer().sendReceive("http://tempuri.org", "bar"); - assertEquals(echoString, "bar"); - } -} diff --git a/branches/sca-java-1.3.2/samples/binding-notification-broker/README b/branches/sca-java-1.3.2/samples/binding-notification-broker/README deleted file mode 100644 index e47f12cb20..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-broker/README +++ /dev/null @@ -1,110 +0,0 @@ -Notification Broker Binding Sample -================================== - -This sample illustrates the use of with a -broker. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -Sample Overview ---------------- - -This sample illustrates the use of a notification broker that is located in a -separate (and remote) composite with respect to any producers or consumers. As -such, this sample is run in conjunction with the binding-notification-producer -sample, the binding-notification-consumer sample, or both. Take a look at the -composite file or the .svg file which shows the composite file in pictorial form. -The composite service and composite reference each have a -that handles the remote communication. This binding includes an 'ntm' attribute -that refers to the notification type manager, which manages the connectivity of -producers, consumers and brokers, and which (for this sample) is assumed to be -running on http://localhost:8083. The ntm is a system component that is included in -and runs as part of the binding-notification module. -This sample also illustrates the use of a wsdl interface in the notification -component's . This allows messages sent and received -via to be transported as literal xml over http. - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd binding-notification-broker -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] Sep 14, 2007 11:14:24 AM org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping - [java] INFO: Added Servlet mapping: http://localhost:8083/ntm/trafficAdvisory - [java] Sep 14, 2007 11:14:24 AM org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping - [java] INFO: Added Servlet mapping: http://localhost:8083/consumer/trafficAdvisory - [java] Sep 14, 2007 11:14:24 AM org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping - [java] INFO: Added Servlet mapping: http://localhost:8083/producer/trafficAdvisory - -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 binding-notification-broker -mvn - -Sample Usage ------------- - -This sample is run using the tuscany binary distribution. To run it, first set the -following environment variables: - -set TUSCANY_BIN_DISTRO= -set TUSCANY_SCA_MANIFEST_JAR=%TUSCANY_BIN_DISTRO%\lib\tuscany-sca-manifest.jar - -Then navigate to this sample directory and do: - -java -Dnotification.httpPort=8080 -cp "target\sample-binding-notification-broker.jar;%TUSCANY_SCA_MANIFEST_JAR%" notification.broker.TrafficAdvisoryServer - -this should bring up the following prompt: - -Send a report value, ^C or to end - -at this point you should be able to type a message to send, for instance: - -Traffic congestion - -Notice that before you try to receive any message, you should bring up the -consumer sample or another broker sample. When you have finished using this -sample, type 'end' or ^C to end. - -Also notice that '-Dnotification.httpPort=8080' is used in the java command. -This indicates the port the sample should use. This also says that this server -is not going to play the role of ntm, given our previous assumption. It is important -that the first one of the producer, consumer or broker sample that is run be the -one that uses '-Dnotification.httpPort=8083', otherwise there is no ntm to talk -to and an exception will be thrown. - -Sample directory structure: ---------------------------- - -binding-notification-broker/ - src/ - main/ - java/ - notification.broker/ - TestCaseProducer.java - interface for the producer component - TrafficAdvisory.java - remote interface referred to by the producer component - and for the consumer component - TrafficAdvisoryConsumer.java - implementation for the consumer components - TrafficAdvisoryProducer.java - implementation for the producer component - TrafficAdvisoryServer.java - server class including main entry point - resources/ - wsdl/ - TrafficAdvisory.wsdl - remote interface for the notification component - TrafficAdvisoryNotification.componentType - the component type referred to by - - TrafficAdvisoryNotification.composite - the main composite including producer, consumer and - notification components, and composite service and reference - pom.xml - the Maven build file diff --git a/branches/sca-java-1.3.2/samples/binding-notification-broker/binding-notification-broker.png b/branches/sca-java-1.3.2/samples/binding-notification-broker/binding-notification-broker.png deleted file mode 100644 index 49030650f2..0000000000 Binary files a/branches/sca-java-1.3.2/samples/binding-notification-broker/binding-notification-broker.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/binding-notification-broker/build.xml b/branches/sca-java-1.3.2/samples/binding-notification-broker/build.xml deleted file mode 100644 index a042b9036a..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-broker/build.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/binding-notification-broker/pom.xml b/branches/sca-java-1.3.2/samples/binding-notification-broker/pom.xml deleted file mode 100644 index e81f2f8bb8..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-broker/pom.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../../pom.xml - - sample-binding-notification-broker - Apache Tuscany SCA Notification Binding Broker Sample - 1.3.2-SNAPSHOT - A sample illustrating use of binding.notification - - - - org.apache.tuscany.sca - tuscany-implementation-notification - 1.3.2-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-binding-notification - 1.3.2-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-databinding - 1.3.2-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-interface-wsdl - 1.3.2-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-interface-wsdl-xml - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - - - - install - - diff --git a/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TestCaseProducer.java b/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TestCaseProducer.java deleted file mode 100644 index 35fa1a9ee9..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TestCaseProducer.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 notification.broker; - -public interface TestCaseProducer { - - public void produceTrafficNotification(String report); -} diff --git a/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TrafficAdvisory.java b/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TrafficAdvisory.java deleted file mode 100644 index d5bc8fbb50..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TrafficAdvisory.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 notification.broker; - -import org.osoa.sca.annotations.Remotable; - -/** - * @version $Rev$ $Date$ - */ -@Remotable -public interface TrafficAdvisory { - - void trafficNotification(String report); -} diff --git a/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TrafficAdvisoryConsumer.java b/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TrafficAdvisoryConsumer.java deleted file mode 100644 index cd3befe076..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TrafficAdvisoryConsumer.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 notification.broker; - -import org.osoa.sca.annotations.AllowsPassByReference; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -/** - * @version $Rev$ $Date$ - */ -@Service(TrafficAdvisory.class) -@Scope("COMPOSITE") -@AllowsPassByReference -public class TrafficAdvisoryConsumer implements TrafficAdvisory { - - @Property - protected String name; - - public void trafficNotification(String report) { - - System.out.println("Consumer [" + name + "] received report: " + report); - } -} diff --git a/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TrafficAdvisoryProducer.java b/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TrafficAdvisoryProducer.java deleted file mode 100644 index 8caefaf1d2..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TrafficAdvisoryProducer.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 notification.broker; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(TestCaseProducer.class) -@Scope("COMPOSITE") -public class TrafficAdvisoryProducer implements TestCaseProducer { - - @Reference - protected TrafficAdvisory destination; - - public void produceTrafficNotification(String report) { - - destination.trafficNotification(report); - } -} diff --git a/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TrafficAdvisoryServer.java b/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TrafficAdvisoryServer.java deleted file mode 100644 index b0f0d2a800..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/java/notification/broker/TrafficAdvisoryServer.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 notification.broker; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.URI; - -import org.apache.tuscany.sca.binding.notification.NotificationBindingProviderFactory; -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * @version $Rev$ $Date$ - */ -public class TrafficAdvisoryServer { - - private static URI notificationType; - - public static void main(String[] args) { - try { - notificationType = new URI("trafficAdvisory"); - String compositeName = "TrafficAdvisoryNotification.composite"; - SCADomain domain = SCADomain.newInstance(compositeName); - TestCaseProducer testCaseProducer = domain.getService(TestCaseProducer.class, "TrafficAdvisoryProducer"); - - BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); - String value = ""; - if (args.length == 1) { - value = args[0]; - } - do { - if(value == null || value.equals("end")) { - break; - } - try { - System.out.println("Send a report value, ^C or to end"); - value = reader.readLine(); - } catch (IOException e) { - e.printStackTrace(); - } - if (value.equals("rb")) { - NotificationBindingProviderFactory.removeBroker(notificationType); - } - else { - testCaseProducer.produceTrafficNotification("Report value [" + value + "]"); - } - } - while(true); - - domain.close(); - } catch(Throwable e) { - e.printStackTrace(); - } - } -} diff --git a/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/resources/TrafficAdvisoryNotification.componentType b/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/resources/TrafficAdvisoryNotification.componentType deleted file mode 100644 index 2dc70f8ed1..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/resources/TrafficAdvisoryNotification.componentType +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/resources/TrafficAdvisoryNotification.composite b/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/resources/TrafficAdvisoryNotification.composite deleted file mode 100644 index f490c34ea6..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/resources/TrafficAdvisoryNotification.composite +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - Consumer1 - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/resources/wsdl/TrafficAdvisory.wsdl b/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/resources/wsdl/TrafficAdvisory.wsdl deleted file mode 100644 index b823bbebcc..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-broker/src/main/resources/wsdl/TrafficAdvisory.wsdl +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/binding-notification-consumer/README b/branches/sca-java-1.3.2/samples/binding-notification-consumer/README deleted file mode 100644 index 0fdfa8461a..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-consumer/README +++ /dev/null @@ -1,102 +0,0 @@ -Notification Consumer Binding Sample -=============================== - -This sample illustrates the use of with a -remote consumer. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -Sample Overview ---------------- - -This sample illustrates the use of a notification consumer that is located in a -separate (and remote) composite with respect to any producers. As such, this sample -is run in conjunction with the binding-notification-producer sample, the -binding-notification-broker sample, or both. Take a look at the composite file -or the .svg file which shows the composite file in pictorial form. The composite -service, wired to the notification component, has a -that handles the remote communication. This binding includes an 'ntm' attribute -that refers to the notification type manager, which manages the connectivity of -producers, consumers and brokers, and which (for this sample) is assumed to be -running on http://localhost:8083. The ntm is a system component that is included in -and runs as part of the binding-notification module. -This sample also illustrates the use of a wsdl interface in the notification -component's . This allows messages sent and received -via to be transported as literal xml over http. - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd binding-notification-consumer -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] Sep 14, 2007 10:56:29 AM org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping - [java] INFO: Added Servlet mapping: http://localhost:8083/ntm/trafficAdvisory - [java] Sep 14, 2007 10:56:29 AM org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping - [java] INFO: Added Servlet mapping: http://localhost:8083/consumer/trafficAdvisory - -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 binding-notification-consumer -mvn - -Sample Usage ------------- - -This sample is run using the tuscany binary distribution. To run it, first set the -following environment variables: - -set TUSCANY_BIN_DISTRO= -set TUSCANY_SCA_MANIFEST_JAR=%TUSCANY_BIN_DISTRO%\lib\tuscany-sca-manifest.jar - -Then navigate to this sample directory and do: - -java -Dnotification.httpPort=8082 -cp "target\sample-binding-notification-consumer.jar;%TUSCANY_SCA_MANIFEST_JAR%" notification.consumer.TrafficAdvisoryServer - -this should bring up the following prompt: - -TrafficAdvisoryServer, hit return to end - -at this point you should be able to receive messages. - -Notice that before you try to receive any message, you should bring up the -producer sample or the broker sample. When you have finished using this -sample, hit return to end. - -Also notice that '-Dnotification.httpPort=8082' is used in the java command. -This indicates the port the sample should use. This also says that this server -is not going to play the role of ntm, given our previous assumption. It is important -that the first one of the producer, consumer or broker sample that is run be the -one that uses '-Dnotification.httpPort=8083', otherwise there is no ntm to talk -to and an exception will be thrown. - -Sample directory structure: ---------------------------- - -binding-notification-consumer/ - src/ - main/ - java/ - notification.consumer/ - TrafficAdvisory.java - remote interface referred to by the producer component - TrafficAdvisoryConsumer.java - implementation for the consumer components - TrafficAdvisoryServer.java - server class including main entry point - resources/ - wsdl/ - TrafficAdvisory.wsdl - remote interface for the notification component - TrafficAdvisoryNotification.componentType - the component type referred to by - - TrafficAdvisoryNotification.composite - the main composite including producer and - notification components, and composite reference - pom.xml - the Maven build file diff --git a/branches/sca-java-1.3.2/samples/binding-notification-consumer/binding-notification-consumer.png b/branches/sca-java-1.3.2/samples/binding-notification-consumer/binding-notification-consumer.png deleted file mode 100644 index 33e1966c3e..0000000000 Binary files a/branches/sca-java-1.3.2/samples/binding-notification-consumer/binding-notification-consumer.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/binding-notification-consumer/build.xml b/branches/sca-java-1.3.2/samples/binding-notification-consumer/build.xml deleted file mode 100644 index f57fe1bb26..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-consumer/build.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/binding-notification-consumer/pom.xml b/branches/sca-java-1.3.2/samples/binding-notification-consumer/pom.xml deleted file mode 100644 index b109f27c28..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-consumer/pom.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../../pom.xml - - sample-binding-notification-consumer - Apache Tuscany SCA Notification Binding Consumer Sample - 1.3.2-SNAPSHOT - A sample illustrating use of binding.notification - - - - org.apache.tuscany.sca - tuscany-implementation-notification - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-notification - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-interface-java-xml - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-interface-wsdl-xml - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - notification.httpPort - 8083 - - - - - - install - - diff --git a/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/java/notification/consumer/TrafficAdvisory.java b/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/java/notification/consumer/TrafficAdvisory.java deleted file mode 100644 index 0efd1195bc..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/java/notification/consumer/TrafficAdvisory.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 notification.consumer; - -import org.osoa.sca.annotations.Remotable; - -/** - * @version $Rev$ $Date$ - */ -@Remotable -public interface TrafficAdvisory { - - void trafficNotification(String report); -} diff --git a/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/java/notification/consumer/TrafficAdvisoryConsumer.java b/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/java/notification/consumer/TrafficAdvisoryConsumer.java deleted file mode 100644 index f6c27a2f55..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/java/notification/consumer/TrafficAdvisoryConsumer.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 notification.consumer; - -import org.osoa.sca.annotations.AllowsPassByReference; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -/** - * @version $Rev$ $Date$ - */ -@Service(TrafficAdvisory.class) -@Scope("COMPOSITE") -@AllowsPassByReference -public class TrafficAdvisoryConsumer implements TrafficAdvisory { - - @Property - protected String name; - - public void trafficNotification(String report) { - - System.out.println("Consumer [" + name + "] received report: " + report); - } -} diff --git a/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/java/notification/consumer/TrafficAdvisoryServer.java b/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/java/notification/consumer/TrafficAdvisoryServer.java deleted file mode 100644 index c53adb1944..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/java/notification/consumer/TrafficAdvisoryServer.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 notification.consumer; - -import java.io.IOException; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * @version $Rev$ $Date$ - */ -public class TrafficAdvisoryServer { - - public static void main(String[] args) { - try { - SCADomain domain = SCADomain.newInstance("TrafficAdvisoryNotification.composite"); - - try { - if (args.length != 1 || !args[0].equals("end")) { - System.out.println("TrafficAdvisoryServer, hit return to end"); - System.in.read(); - } - } catch (IOException e) { - e.printStackTrace(); - } - - domain.close(); - } catch(Throwable e) { - e.printStackTrace(); - } - } -} diff --git a/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/resources/TrafficAdvisoryNotification.componentType b/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/resources/TrafficAdvisoryNotification.componentType deleted file mode 100644 index 2dc70f8ed1..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/resources/TrafficAdvisoryNotification.componentType +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/resources/TrafficAdvisoryNotification.composite b/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/resources/TrafficAdvisoryNotification.composite deleted file mode 100644 index 8f9bcc4438..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/resources/TrafficAdvisoryNotification.composite +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - Consumer1 - - - - - Consumer2 - - - diff --git a/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/resources/wsdl/TrafficAdvisory.wsdl b/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/resources/wsdl/TrafficAdvisory.wsdl deleted file mode 100644 index b823bbebcc..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/main/resources/wsdl/TrafficAdvisory.wsdl +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/test/java/notification/consumer/TrafficAdvisoryTestCase.java b/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/test/java/notification/consumer/TrafficAdvisoryTestCase.java deleted file mode 100644 index c5318f405c..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-consumer/src/test/java/notification/consumer/TrafficAdvisoryTestCase.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 notification.consumer; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import junit.framework.TestCase; - -public class TrafficAdvisoryTestCase extends TestCase { - - private SCADomain domain; - - public void testTrafficAdvisoryNotification() throws Exception { - System.out.println("Only instantiating and closing domain ..."); - - /* Uncomment to test with producer - try { - System.out.println("TrafficAdvisoryServer, hit return to end"); - System.in.read(); - } catch (Exception e) { - e.printStackTrace(); - } - */ - } - - @Override - protected void setUp() throws Exception { - try { - domain = SCADomain.newInstance("TrafficAdvisoryNotification.composite"); - } catch(Throwable e) { - e.printStackTrace(); - if (e instanceof Exception) { - throw (Exception)e; - } - else { - throw new Exception(e); - } - } - } - - @Override - protected void tearDown() throws Exception { - domain.close(); - } -} diff --git a/branches/sca-java-1.3.2/samples/binding-notification-producer/README b/branches/sca-java-1.3.2/samples/binding-notification-producer/README deleted file mode 100644 index 58611f64bd..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-producer/README +++ /dev/null @@ -1,131 +0,0 @@ -Notification Producer Binding Sample -=============================== - -This sample illustrates the use of with a -remote producer. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -Sample Overview ---------------- - -This sample illustrates the use of a notification producer that is located in a -separate (and remote) composite with respect to any consumers. As such, this sample -is run in conjunction with the binding-notification-consumer sample, the -binding-notification-broker sample, or both. Take a look at the composite file -or the .svg file which shows the composite file in pictorial form. The composite -reference, referred to by the notification component, has a -that handles the remote communication. This binding includes an 'ntm' attribute -that refers to the notification type manager, which manages the connectivity of -producers, consumers and brokers, and which (for this sample) is assumed to be -running on http://localhost:8083. The ntm is a system component that is included in -and runs as part of the binding-notification module. -This sample also illustrates the use of a wsdl interface in the notification -component's . This allows messages sent and received -via to be transported as literal xml over http. - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd binding-notification-producer -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] Sep 14, 2007 10:31:45 AM org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping - [java] INFO: Added Servlet mapping: http://localhost:8083/ntm/trafficAdvisory - [java] Sep 14, 2007 10:31:45 AM org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping - [java] INFO: Added Servlet mapping: http://localhost:8083/producer/trafficAdvisory - -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 binding-notification-producer -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running notification.producer.TrafficAdvisoryTestCase -Only instantiating and closing domain ... -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.252 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. - -Sample Usage ------------- - -This sample is run using the tuscany binary distribution. To run it, first set the -following environment variables: - -set TUSCANY_BIN_DISTRO= -set TUSCANY_SCA_MANIFEST_JAR=%TUSCANY_BIN_DISTRO%\lib\tuscany-sca-manifest.jar - -Then navigate to this sample directory and do: - -java -Dnotification.httpPort=8083 -cp "target\sample-binding-notification-producer.jar;%TUSCANY_SCA_MANIFEST_JAR%" notification.producer.TrafficAdvisoryServer - -this should bring up the following prompt: - -Send a report value, ^C or to end - -at this point you should be able to type a message to send, for instance: - -Traffic congestion - -Notice that before you try to send any message, you should bring up the -consumer sample or the broker sample. When you have finished using this -sample, type 'end' or ^C to end. - -Also notice that '-Dnotification.httpPort=8083' is used in the java command. -This indicates the port the sample should use. This also says that this server -is going to play the role of ntm, given our previous assumption. It is important -that the first one of the producer, consumer or broker sample that is run be the -one that uses '-Dnotification.httpPort=8083', otherwise there is no ntm to talk -to and an exception will be thrown. - -Sample directory structure: ---------------------------- - -binding-notification-producer/ - src/ - main/ - java/ - notification.producer/ - TestCaseProducer.java - interface for the producer component - TrafficAdvisory.java - remote interface referred to by the producer component - TrafficAdvisoryProducer.java - implementation for the producer component - TrafficAdvisoryServer.java - server class including main entry point - resources/ - wsdl/ - TrafficAdvisory.wsdl - remote interface for the notification component - TrafficAdvisoryNotification.componentType - the component type referred to by - - TrafficAdvisoryNotification.composite - the main composite including producer and - notification components, and composite reference - test/ - java/ - notification.producer/ - TrafficAdvisoryTestCase.java - JUnit test case - resources/ - wsdl/ - TrafficAdvisory.wsdl - remote interface for the notification component - TrafficAdvisoryNotification.componentType - the component type referred to by - - TrafficAdvisoryNotification.composite - the main composite including producer and - notification components, and composite reference - pom.xml - the Maven build file diff --git a/branches/sca-java-1.3.2/samples/binding-notification-producer/binding-notification-producer.png b/branches/sca-java-1.3.2/samples/binding-notification-producer/binding-notification-producer.png deleted file mode 100644 index 34c347c893..0000000000 Binary files a/branches/sca-java-1.3.2/samples/binding-notification-producer/binding-notification-producer.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/binding-notification-producer/build.xml b/branches/sca-java-1.3.2/samples/binding-notification-producer/build.xml deleted file mode 100644 index d13e4c8a6c..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-producer/build.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/binding-notification-producer/pom.xml b/branches/sca-java-1.3.2/samples/binding-notification-producer/pom.xml deleted file mode 100644 index 6cb6c62d17..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-producer/pom.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../../pom.xml - - sample-binding-notification-producer - Apache Tuscany SCA Notification Binding Producer Sample - 1.3.2-SNAPSHOT - A sample illustrating use of binding.notification - - - - org.apache.tuscany.sca - tuscany-implementation-notification - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-notification - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-interface-wsdl-xml - 1.3.2-SNAPSHOT - runtime - - - - javax.servlet - servlet-api - 2.5 - provided - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - - - - org.apache.maven.plugins - maven-jar-plugin - - - - org.apache.tuscany.notification.remoteProducer.TrafficAdvisoryServer - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - notification.httpPort - 8083 - - - - - - install - - diff --git a/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/java/notification/producer/TestCaseProducer.java b/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/java/notification/producer/TestCaseProducer.java deleted file mode 100644 index be80e71249..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/java/notification/producer/TestCaseProducer.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 notification.producer; - -public interface TestCaseProducer { - - public void produceTrafficNotification(String report); -} diff --git a/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/java/notification/producer/TrafficAdvisory.java b/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/java/notification/producer/TrafficAdvisory.java deleted file mode 100644 index 39f06d5dde..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/java/notification/producer/TrafficAdvisory.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 notification.producer; - -import org.osoa.sca.annotations.Remotable; - -/** - * @version $Rev$ $Date$ - */ -@Remotable -public interface TrafficAdvisory { - - void trafficNotification(String report); -} diff --git a/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/java/notification/producer/TrafficAdvisoryProducer.java b/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/java/notification/producer/TrafficAdvisoryProducer.java deleted file mode 100644 index 7d49b00607..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/java/notification/producer/TrafficAdvisoryProducer.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 notification.producer; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(TestCaseProducer.class) -@Scope("COMPOSITE") -public class TrafficAdvisoryProducer implements TestCaseProducer { - - @Reference - protected TrafficAdvisory destination; - - public void produceTrafficNotification(String report) { - - destination.trafficNotification(report); - } -} diff --git a/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/java/notification/producer/TrafficAdvisoryServer.java b/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/java/notification/producer/TrafficAdvisoryServer.java deleted file mode 100644 index efd3657dc3..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/java/notification/producer/TrafficAdvisoryServer.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 notification.producer; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class TrafficAdvisoryServer { - - public static void main(String[] args) { - try { - SCADomain domain = SCADomain.newInstance("TrafficAdvisoryNotification.composite"); - TestCaseProducer testCaseProducer = domain.getService(TestCaseProducer.class, "TrafficAdvisoryProducer"); - BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); - String value = ""; - if (args.length == 1) { - value = args[0]; - } - do { - if(value == null || value.equals("end")) { - break; - } - try { - System.out.println("Send a report value, ^C or to end"); - value = reader.readLine(); - } catch (IOException e) { - e.printStackTrace(); - } - testCaseProducer.produceTrafficNotification("Report value [" + value + "]"); - } - while(true); - - domain.close(); - } catch(Throwable e) { - e.printStackTrace(); - } - } -} diff --git a/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/resources/TrafficAdvisoryNotification.componentType b/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/resources/TrafficAdvisoryNotification.componentType deleted file mode 100644 index 2dc70f8ed1..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/resources/TrafficAdvisoryNotification.componentType +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/resources/TrafficAdvisoryNotification.composite b/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/resources/TrafficAdvisoryNotification.composite deleted file mode 100644 index 2db6ea655b..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/resources/TrafficAdvisoryNotification.composite +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/resources/wsdl/TrafficAdvisory.wsdl b/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/resources/wsdl/TrafficAdvisory.wsdl deleted file mode 100644 index b823bbebcc..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-producer/src/main/resources/wsdl/TrafficAdvisory.wsdl +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/binding-notification-producer/src/test/java/notification/producer/TrafficAdvisoryTestCase.java b/branches/sca-java-1.3.2/samples/binding-notification-producer/src/test/java/notification/producer/TrafficAdvisoryTestCase.java deleted file mode 100644 index d3901ee407..0000000000 --- a/branches/sca-java-1.3.2/samples/binding-notification-producer/src/test/java/notification/producer/TrafficAdvisoryTestCase.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package notification.producer; - -import java.io.BufferedReader; -import java.io.InputStreamReader; - -import notification.producer.TestCaseProducer; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -//import org.apache.tuscany.sca.notification.remoteProducer.TestCaseProducer; - -import junit.framework.TestCase; - -public class TrafficAdvisoryTestCase extends TestCase { - - private SCADomain domain; - - public void testTrafficAdvisoryNotification() throws Exception { - System.out.println("Only instantiating and closing domain ..."); - TestCaseProducer testCaseProducer = domain.getService(TestCaseProducer.class, "TrafficAdvisoryProducer"); - - /* Uncomment to test with consumer - BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); - String value = "foo"; - do { - try { - System.out.println("Send a report value, ^C or to end"); - value = reader.readLine(); - } catch (Exception e) { - e.printStackTrace(); - } - if(value == null || value.equals("end")) { - break; - } - testCaseProducer.produceTrafficNotification("Report value [" + value + "]"); - value = "end"; - } - while(true); - */ - } - - @Override - protected void setUp() throws Exception { - try { - domain = SCADomain.newInstance("TrafficAdvisoryNotification.composite"); - } catch(Throwable e) { - e.printStackTrace(); - if (e instanceof Exception) { - throw (Exception)e; - } - else { - throw new Exception(e); - } - } - } - - @Override - protected void tearDown() throws Exception { - domain.close(); - } -} diff --git a/branches/sca-java-1.3.2/samples/calculator-distributed/README b/branches/sca-java-1.3.2/samples/calculator-distributed/README deleted file mode 100644 index 51f4b07e81..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/build.xml b/branches/sca-java-1.3.2/samples/calculator-distributed/build.xml deleted file mode 100644 index f7a23e4b81..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-distributed/build.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-distributed/calculator-distributed.png b/branches/sca-java-1.3.2/samples/calculator-distributed/calculator-distributed.png deleted file mode 100644 index 7c0e175664..0000000000 Binary files a/branches/sca-java-1.3.2/samples/calculator-distributed/calculator-distributed.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/calculator-distributed/calculator-distributed.svg b/branches/sca-java-1.3.2/samples/calculator-distributed/calculator-distributed.svg deleted file mode 100644 index be5a4b8185..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/cloud.composite b/branches/sca-java-1.3.2/samples/calculator-distributed/cloud.composite deleted file mode 100644 index 85e2f9c7f3..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-distributed/cloud.composite +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-distributed/domain.composite b/branches/sca-java-1.3.2/samples/calculator-distributed/domain.composite deleted file mode 100644 index 643e22d0cf..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-distributed/domain.composite +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-distributed/pom.xml b/branches/sca-java-1.3.2/samples/calculator-distributed/pom.xml deleted file mode 100644 index de13d23e24..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-distributed/pom.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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-node2-api - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node2-launcher - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-domain-manager - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-node-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-sca - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-sca-axis2 - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-resource-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.codehaus.woodstox - wstx-asl - 3.2.1 - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.3.2-SNAPSHOT - test - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/AddService.java b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/AddService.java deleted file mode 100644 index d7dc4473ad..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/AddServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index e9b7e254e5..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/CalculatorService.java b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 031fa8b912..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index da869e00fd..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/DivideService.java b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index f7ac0b7287..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/MultiplyService.java b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index b7dca792b2..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/SubtractService.java b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 78ab9c6ee0..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 1010207154..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeA.java b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeA.java deleted file mode 100644 index b61d1da85d..0000000000 --- a/branches/sca-java-1.3.2/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.SCANode2; -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 { - - SCANode2 node = null; - try { - - NodeLauncher nodeLauncher = NodeLauncher.newInstance(); - node = nodeLauncher.createNode("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-java-1.3.2/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeB.java b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeB.java deleted file mode 100644 index 50600eaedc..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeC.java b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeC.java deleted file mode 100644 index 95d8934665..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/src/main/java/node/LaunchDomain.java b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/java/node/LaunchDomain.java deleted file mode 100644 index 8b4fe566a1..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/src/main/resources/cloud/NodeA.composite b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/cloud/NodeA.composite deleted file mode 100644 index ed7fe55abc..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/cloud/NodeA.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/cloud/NodeB.composite b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/cloud/NodeB.composite deleted file mode 100644 index 8f29cc17aa..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/cloud/NodeB.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/cloud/NodeC.composite b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/cloud/NodeC.composite deleted file mode 100644 index 9ad132b0d4..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/cloud/NodeC.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeA/Calculator.composite b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeA/Calculator.composite deleted file mode 100644 index 172676a3c7..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeA/Calculator.composite +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeA/META-INF/sca-contribution.xml deleted file mode 100644 index 1b1c0291e2..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeB/Calculator.composite b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeB/Calculator.composite deleted file mode 100644 index b770dbe8d4..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeB/Calculator.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeB/META-INF/sca-contribution.xml deleted file mode 100644 index 6c0ffe4ac0..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeC/Calculator.composite b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeC/Calculator.composite deleted file mode 100644 index 66caf0d17b..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeC/Calculator.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/calculator-distributed/src/main/resources/nodeC/META-INF/sca-contribution.xml deleted file mode 100644 index 8c311553c3..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-distributed/src/test/java/calculator/CalculatorDistributedTestCase.java b/branches/sca-java-1.3.2/samples/calculator-distributed/src/test/java/calculator/CalculatorDistributedTestCase.java deleted file mode 100644 index 9c3f06ee53..0000000000 --- a/branches/sca-java-1.3.2/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.SCANode2; -import org.apache.tuscany.sca.node.SCANode2Factory; -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 SCANode2 manager; - private static SCANode2 nodeA; - private static SCANode2 nodeB; - private static SCANode2 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(); - - SCANode2Factory nodeFactory = SCANode2Factory.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-java-1.3.2/samples/calculator-distributed/workspace.xml b/branches/sca-java-1.3.2/samples/calculator-distributed/workspace.xml deleted file mode 100644 index 7d6d3dbdbd..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-distributed/workspace.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-implementation-policies/README b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/README deleted file mode 100644 index bd66eee1c9..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/build.xml b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/build.xml deleted file mode 100644 index 7afa23a07f..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-implementation-policies/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-implementation-policies/calculator.png b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/calculator.png deleted file mode 100644 index 995a57b1fd..0000000000 Binary files a/branches/sca-java-1.3.2/samples/calculator-implementation-policies/calculator.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/calculator-implementation-policies/calculator.svg b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/calculator.svg deleted file mode 100644 index af34f07e04..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/pom.xml b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/pom.xml deleted file mode 100644 index dd74c1a9f8..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-implementation-policies/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - org.apache.tuscany.sca - tuscany-policy-logging - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-policy-security - 1.3.2-SNAPSHOT - runtime - - - - - - ${artifactId} - - diff --git a/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/AddService.java b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/AddService.java deleted file mode 100644 index 5a1e7a638a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/AddServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index caf4d358df..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorClient.java b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 2bce187049..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorService.java b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index ad87375529..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index ae4ed12b7b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/DivideService.java b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/DivideService.java deleted file mode 100644 index ef6a8b375b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index cd91935f08..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/MultiplyService.java b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index db568cc762..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index c85357fcd8..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/SubtractService.java b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 56ee372fc4..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 1b669084d9..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/security/CalculatorCallbackHandler.java b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/security/CalculatorCallbackHandler.java deleted file mode 100644 index b48fb90148..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/security/JaasLoginModule.java b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/security/JaasLoginModule.java deleted file mode 100644 index fe4097640b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/security/UserPrincipal.java b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/java/calculator/security/UserPrincipal.java deleted file mode 100644 index 595626e672..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/src/main/resources/Calculator.composite b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/resources/Calculator.composite deleted file mode 100644 index d91bf88d96..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/resources/Calculator.composite +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/resources/CalculatorJass.config b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/resources/CalculatorJass.config deleted file mode 100644 index 0e7cb86633..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/src/main/resources/CalculatorLogMessages.properties b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/resources/CalculatorLogMessages.properties deleted file mode 100644 index f62125eaa9..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/src/main/resources/definitions.xml b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/main/resources/definitions.xml deleted file mode 100644 index 6cccde0d13..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-implementation-policies/src/test/java/calculator/CalculatorTestCase.java b/branches/sca-java-1.3.2/samples/calculator-implementation-policies/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index 157570c3df..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-reference/README b/branches/sca-java-1.3.2/samples/calculator-rmi-reference/README deleted file mode 100644 index 837b5ce75f..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-reference/build.xml b/branches/sca-java-1.3.2/samples/calculator-rmi-reference/build.xml deleted file mode 100644 index ca75625b42..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-rmi-reference/build.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-rmi-reference/calculator-rmi-reference.png b/branches/sca-java-1.3.2/samples/calculator-rmi-reference/calculator-rmi-reference.png deleted file mode 100644 index 8c76b77a9f..0000000000 Binary files a/branches/sca-java-1.3.2/samples/calculator-rmi-reference/calculator-rmi-reference.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/calculator-rmi-reference/calculator-rmi-reference.svg b/branches/sca-java-1.3.2/samples/calculator-rmi-reference/calculator-rmi-reference.svg deleted file mode 100644 index ba802e6717..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-reference/pom.xml b/branches/sca-java-1.3.2/samples/calculator-rmi-reference/pom.xml deleted file mode 100644 index 3dbeebd348..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-rmi-reference/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-binding-rmi - 1.3.2-SNAPSHOT - runtime - - - junit - junit - 4.2 - test - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/AddService.java b/branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/AddService.java deleted file mode 100644 index ec57a6a533..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorClient.java b/branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index cd1076c3f1..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorService.java b/branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index d310dad4b1..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index f28f0ca179..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/DivideService.java b/branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/DivideService.java deleted file mode 100644 index 835e4fda6d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/MultiplyService.java b/branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index db568cc762..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/SubtractService.java b/branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 30e4e6a56a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-reference/src/main/resources/CalculatorRMIReference.composite b/branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/resources/CalculatorRMIReference.composite deleted file mode 100644 index a5a6e1cd29..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/main/resources/CalculatorRMIReference.composite +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIReferenceTestCase.java b/branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIReferenceTestCase.java deleted file mode 100644 index 15e00f5946..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIServiceImpl.java deleted file mode 100644 index d8ded42cb2..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-service/README b/branches/sca-java-1.3.2/samples/calculator-rmi-service/README deleted file mode 100644 index 454cdc0d37..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-service/build.xml b/branches/sca-java-1.3.2/samples/calculator-rmi-service/build.xml deleted file mode 100644 index f98f35e4b0..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-rmi-service/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-rmi-service/calculator-rmi-service.png b/branches/sca-java-1.3.2/samples/calculator-rmi-service/calculator-rmi-service.png deleted file mode 100644 index 574f5eb14b..0000000000 Binary files a/branches/sca-java-1.3.2/samples/calculator-rmi-service/calculator-rmi-service.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/calculator-rmi-service/calculator-rmi-service.svg b/branches/sca-java-1.3.2/samples/calculator-rmi-service/calculator-rmi-service.svg deleted file mode 100644 index 9253110f98..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-service/pom.xml b/branches/sca-java-1.3.2/samples/calculator-rmi-service/pom.xml deleted file mode 100644 index c243b957b1..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-rmi-service/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-binding-rmi - 1.3.2-SNAPSHOT - runtime - - - junit - junit - 4.2 - test - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/AddService.java b/branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/AddService.java deleted file mode 100644 index ec57a6a533..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/AddServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index e9c635e3c8..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorClient.java b/branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 2b99485b68..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServer.java b/branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServer.java deleted file mode 100644 index b698163c1b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorService.java b/branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 3ddcef61df..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index f28f0ca179..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/DivideService.java b/branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/DivideService.java deleted file mode 100644 index 835e4fda6d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 8c33862f6d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/MultiplyService.java b/branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index db568cc762..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index c7fbc73c00..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/SubtractService.java b/branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 30e4e6a56a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 1a7f145ad8..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-rmi-service/src/main/resources/CalculatorRMIServer.composite b/branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/resources/CalculatorRMIServer.composite deleted file mode 100644 index 34d90ab451..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-rmi-service/src/main/resources/CalculatorRMIServer.composite +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-rmi-service/src/test/java/calculator/CalculatorRMIServerTestCase.java b/branches/sca-java-1.3.2/samples/calculator-rmi-service/src/test/java/calculator/CalculatorRMIServerTestCase.java deleted file mode 100644 index 8943dd24f6..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-script/README b/branches/sca-java-1.3.2/samples/calculator-script/README deleted file mode 100644 index ab1dda13df..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-script/build.xml b/branches/sca-java-1.3.2/samples/calculator-script/build.xml deleted file mode 100644 index 429d638ca5..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-script/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-script/calculator-script.png b/branches/sca-java-1.3.2/samples/calculator-script/calculator-script.png deleted file mode 100644 index d3f8c491c3..0000000000 Binary files a/branches/sca-java-1.3.2/samples/calculator-script/calculator-script.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/calculator-script/calculator-script.svg b/branches/sca-java-1.3.2/samples/calculator-script/calculator-script.svg deleted file mode 100644 index 16939f9310..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-script/pom.xml b/branches/sca-java-1.3.2/samples/calculator-script/pom.xml deleted file mode 100644 index 6967b33a68..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-script/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-script - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-interface-wsdl-xml - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-java-1.3.2/samples/calculator-script/src/main/java/calculator/AddService.java b/branches/sca-java-1.3.2/samples/calculator-script/src/main/java/calculator/AddService.java deleted file mode 100644 index a235e648c7..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-script/src/main/java/calculator/CalculatorClient.java b/branches/sca-java-1.3.2/samples/calculator-script/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 243d1562dc..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-script/src/main/java/calculator/CalculatorService.java b/branches/sca-java-1.3.2/samples/calculator-script/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index c89043276e..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-script/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-script/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index ba897fa301..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-script/src/main/java/calculator/DivideService.java b/branches/sca-java-1.3.2/samples/calculator-script/src/main/java/calculator/DivideService.java deleted file mode 100644 index 497dafd4fd..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-script/src/main/java/calculator/MultiplyService.java b/branches/sca-java-1.3.2/samples/calculator-script/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-script/src/main/java/calculator/SubtractService.java b/branches/sca-java-1.3.2/samples/calculator-script/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 376b3e5bb9..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-script/src/main/resources/Calculator.composite b/branches/sca-java-1.3.2/samples/calculator-script/src/main/resources/Calculator.composite deleted file mode 100644 index 8a765e6153..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-script/src/main/resources/Calculator.composite +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-script/src/main/resources/calculator/AddServiceImpl.js b/branches/sca-java-1.3.2/samples/calculator-script/src/main/resources/calculator/AddServiceImpl.js deleted file mode 100644 index 1d4d221364..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-script/src/main/resources/calculator/DivideServiceImpl.groovy b/branches/sca-java-1.3.2/samples/calculator-script/src/main/resources/calculator/DivideServiceImpl.groovy deleted file mode 100644 index c31c1e8fd6..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-script/src/main/resources/calculator/MultiplyServiceImpl.py b/branches/sca-java-1.3.2/samples/calculator-script/src/main/resources/calculator/MultiplyServiceImpl.py deleted file mode 100644 index d6f27ca7f5..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-script/src/main/resources/calculator/SubtractServiceImpl.rb b/branches/sca-java-1.3.2/samples/calculator-script/src/main/resources/calculator/SubtractServiceImpl.rb deleted file mode 100644 index 132a1d13b0..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-script/src/test/java/calculator/CalculatorTestCase.java b/branches/sca-java-1.3.2/samples/calculator-script/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index fea8f62110..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-webapp/README b/branches/sca-java-1.3.2/samples/calculator-webapp/README deleted file mode 100644 index c88b92b206..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-webapp/calculator-web.png b/branches/sca-java-1.3.2/samples/calculator-webapp/calculator-web.png deleted file mode 100644 index 896ddc4093..0000000000 Binary files a/branches/sca-java-1.3.2/samples/calculator-webapp/calculator-web.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/calculator-webapp/calculator-web.svg b/branches/sca-java-1.3.2/samples/calculator-webapp/calculator-web.svg deleted file mode 100644 index 00ed27556f..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-webapp/pom.xml b/branches/sca-java-1.3.2/samples/calculator-webapp/pom.xml deleted file mode 100644 index 4b0c0b5793..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-webapp/pom.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-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.3.2-SNAPSHOT - - - - generate - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/AddService.java b/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/AddService.java deleted file mode 100644 index ec57a6a533..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/AddServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index e9c635e3c8..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/CalculatorClient.java b/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 4787b728f4..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/CalculatorService.java b/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index ad87375529..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index bf3b0303ec..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/DivideService.java b/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/DivideService.java deleted file mode 100644 index 835e4fda6d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 8c33862f6d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/MultiplyService.java b/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index db568cc762..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index c7fbc73c00..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/SubtractService.java b/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 30e4e6a56a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 1a7f145ad8..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-webapp/src/main/resources/Calculator.composite b/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/resources/Calculator.composite deleted file mode 100644 index 50c23af0b2..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/resources/Calculator.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index fe09ab2e1b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index b5a828d55b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-webapp/src/main/webapp/calc.jsp b/branches/sca-java-1.3.2/samples/calculator-webapp/src/main/webapp/calc.jsp deleted file mode 100644 index 4bc5c984dd..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/README b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/README deleted file mode 100644 index d0d3307b3a..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/README +++ /dev/null @@ -1,116 +0,0 @@ -Calculator Sample Exposing Secure 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 autentication intent is applied to communications with the add -component. The integrity intent is applied to communication with the -subtract component. - -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-secure-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-secure-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 - definitions.xml - intent and polci set specification - security.properties - security configuration for the - rampart security engine that runs - inside of Axis - calculatorKeys.jks - keystore - 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-secure-webapp -ant package - -This should result in a war file (sample-calculator-ws-secure-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-secure-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-secure-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-java-1.3.2/samples/calculator-ws-secure-webapp/calculator-web.png b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/calculator-web.png deleted file mode 100644 index f482b8d1c8..0000000000 Binary files a/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/calculator-web.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/calculator-web.svg b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/calculator-web.svg deleted file mode 100644 index 1b7015b156..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/pom.xml b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/pom.xml deleted file mode 100644 index a698aab6f4..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/pom.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-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.3.2-SNAPSHOT - - - - generate - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddService.java b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddService.java deleted file mode 100644 index c3c789e745..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 46ec182124..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorClient.java b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 4787b728f4..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorService.java b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index ad87375529..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index bf3b0303ec..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideService.java b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideService.java deleted file mode 100644 index 835e4fda6d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 8c33862f6d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyService.java b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index db568cc762..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index c7fbc73c00..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractService.java b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractService.java deleted file mode 100644 index c8653806aa..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 1a7f145ad8..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ClientPWCBHandler.java b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ClientPWCBHandler.java deleted file mode 100644 index 9625c0d692..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ServerPWCBHandler.java b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/java/calculator/security/ServerPWCBHandler.java deleted file mode 100644 index 23a62680c5..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/resources/Calculator.composite b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/resources/Calculator.composite deleted file mode 100644 index 4d511f887e..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/resources/Calculator.composite +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler b/branches/sca-java-1.3.2/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-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/resources/calculatorKeys.jks b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/resources/calculatorKeys.jks deleted file mode 100644 index b6b244244b..0000000000 Binary files a/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/resources/calculatorKeys.jks and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/resources/definitions.xml b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/resources/definitions.xml deleted file mode 100644 index 4611669bbd..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/resources/security.properties b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/resources/security.properties deleted file mode 100644 index 8ef9928018..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/resources/security.properties +++ /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. -## --------------------------------------------------------------------------- -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 diff --git a/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index fe09ab2e1b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/geronimo-web.xml b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/geronimo-web.xml deleted file mode 100644 index a281e913f0..0000000000 --- a/branches/sca-java-1.3.2/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.3.2-SNAPSHOT - war - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d3a62d39f4..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/webapp/calc.jsp b/branches/sca-java-1.3.2/samples/calculator-ws-secure-webapp/src/main/webapp/calc.jsp deleted file mode 100644 index 4c4366747d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-webapp/README b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/README deleted file mode 100644 index a6e6c897e4..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-webapp/calculator-web.png b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/calculator-web.png deleted file mode 100644 index f482b8d1c8..0000000000 Binary files a/branches/sca-java-1.3.2/samples/calculator-ws-webapp/calculator-web.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/calculator-ws-webapp/calculator-web.svg b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/calculator-web.svg deleted file mode 100644 index 1b7015b156..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-webapp/pom.xml b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/pom.xml deleted file mode 100644 index 15177ddb35..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-ws-webapp/pom.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-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.3.2-SNAPSHOT - - - - generate - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/AddService.java b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/AddService.java deleted file mode 100644 index c3c789e745..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/AddServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index a7049729f7..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorClient.java b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 4787b728f4..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorService.java b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index ad87375529..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index bf3b0303ec..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/DivideService.java b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/DivideService.java deleted file mode 100644 index 835e4fda6d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 8c33862f6d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/MultiplyService.java b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index db568cc762..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index c7fbc73c00..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/SubtractService.java b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 30e4e6a56a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 1a7f145ad8..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-webapp/src/main/resources/Calculator.composite b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/resources/Calculator.composite deleted file mode 100644 index 6415d5a896..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/resources/Calculator.composite +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index fe09ab2e1b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-webapp/src/main/webapp/WEB-INF/geronimo-web.xml b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/webapp/WEB-INF/geronimo-web.xml deleted file mode 100644 index 845a634530..0000000000 --- a/branches/sca-java-1.3.2/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.3.2-SNAPSHOT - war - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d3a62d39f4..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator-ws-webapp/src/main/webapp/calc.jsp b/branches/sca-java-1.3.2/samples/calculator-ws-webapp/src/main/webapp/calc.jsp deleted file mode 100644 index 4c4366747d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/calculator/README b/branches/sca-java-1.3.2/samples/calculator/README deleted file mode 100644 index ceb532faed..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator/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-java-1.3.2/samples/calculator/build.xml b/branches/sca-java-1.3.2/samples/calculator/build.xml deleted file mode 100644 index c4b755ef94..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator/calculator.png b/branches/sca-java-1.3.2/samples/calculator/calculator.png deleted file mode 100644 index 995a57b1fd..0000000000 Binary files a/branches/sca-java-1.3.2/samples/calculator/calculator.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/calculator/calculator.svg b/branches/sca-java-1.3.2/samples/calculator/calculator.svg deleted file mode 100644 index 0615925c50..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator/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-java-1.3.2/samples/calculator/pom.xml b/branches/sca-java-1.3.2/samples/calculator/pom.xml deleted file mode 100644 index 180374e1b5..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../../pom.xml - - sample-calculator - Apache Tuscany SCA Calculator Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/AddService.java b/branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/AddService.java deleted file mode 100644 index 188451ebac..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator/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-java-1.3.2/samples/calculator/src/main/java/calculator/AddServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 7ca8fb04b5..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator/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-java-1.3.2/samples/calculator/src/main/java/calculator/CalculatorClient.java b/branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 9d180bf52e..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator/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-java-1.3.2/samples/calculator/src/main/java/calculator/CalculatorService.java b/branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 031fa8b912..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator/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-java-1.3.2/samples/calculator/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 3d861f2018..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator/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-java-1.3.2/samples/calculator/src/main/java/calculator/DivideService.java b/branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator/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-java-1.3.2/samples/calculator/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 1323edf55a..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator/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-java-1.3.2/samples/calculator/src/main/java/calculator/MultiplyService.java b/branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator/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-java-1.3.2/samples/calculator/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index 91b803bc9e..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator/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-java-1.3.2/samples/calculator/src/main/java/calculator/SubtractService.java b/branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator/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-java-1.3.2/samples/calculator/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-java-1.3.2/samples/calculator/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 58cc4a3547..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator/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-java-1.3.2/samples/calculator/src/main/resources/Calculator.composite b/branches/sca-java-1.3.2/samples/calculator/src/main/resources/Calculator.composite deleted file mode 100644 index 90872041b0..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator/src/main/resources/Calculator.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/calculator/src/test/java/calculator/CalculatorTestCase.java b/branches/sca-java-1.3.2/samples/calculator/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index 775ad15537..0000000000 --- a/branches/sca-java-1.3.2/samples/calculator/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-java-1.3.2/samples/callback-ws-client/README b/branches/sca-java-1.3.2/samples/callback-ws-client/README deleted file mode 100644 index 66121362c9..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/callback-ws-client/build.xml b/branches/sca-java-1.3.2/samples/callback-ws-client/build.xml deleted file mode 100644 index 8698c6018d..0000000000 --- a/branches/sca-java-1.3.2/samples/callback-ws-client/build.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/callback-ws-client/callback-ws-client.png b/branches/sca-java-1.3.2/samples/callback-ws-client/callback-ws-client.png deleted file mode 100644 index 802ef604a7..0000000000 Binary files a/branches/sca-java-1.3.2/samples/callback-ws-client/callback-ws-client.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/callback-ws-client/callback-ws-client.svg b/branches/sca-java-1.3.2/samples/callback-ws-client/callback-ws-client.svg deleted file mode 100644 index f49aeadbbf..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/callback-ws-client/pom.xml b/branches/sca-java-1.3.2/samples/callback-ws-client/pom.xml deleted file mode 100644 index 64c69990ae..0000000000 --- a/branches/sca-java-1.3.2/samples/callback-ws-client/pom.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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-node2-impl - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - org.apache.tuscany.sca - sample-callback-ws-service - 1.3.2-SNAPSHOT - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/callback-ws-client/src/main/java/myapp/MyClient.java b/branches/sca-java-1.3.2/samples/callback-ws-client/src/main/java/myapp/MyClient.java deleted file mode 100644 index e515b55788..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/callback-ws-client/src/main/java/myapp/MyClientImpl.java b/branches/sca-java-1.3.2/samples/callback-ws-client/src/main/java/myapp/MyClientImpl.java deleted file mode 100644 index 3d94973880..0000000000 --- a/branches/sca-java-1.3.2/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.SCANode2; -import org.apache.tuscany.sca.node.SCANode2Factory; -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 { - SCANode2 node = SCANode2Factory.newInstance().createSCANodeFromClassLoader("myapp.composite", MyClientImpl.class.getClassLoader()); - node.start(); - run(node); - System.out.println("Closing the domain"); - node.stop(); - } - - public static void run(SCANode2 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-java-1.3.2/samples/callback-ws-client/src/main/java/myserver/MyService.java b/branches/sca-java-1.3.2/samples/callback-ws-client/src/main/java/myserver/MyService.java deleted file mode 100644 index 1850eae1bc..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/callback-ws-client/src/main/java/myserver/MyServiceCallback.java b/branches/sca-java-1.3.2/samples/callback-ws-client/src/main/java/myserver/MyServiceCallback.java deleted file mode 100644 index bf5f87a4f9..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/callback-ws-client/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/callback-ws-client/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 314747d548..0000000000 --- a/branches/sca-java-1.3.2/samples/callback-ws-client/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - diff --git a/branches/sca-java-1.3.2/samples/callback-ws-client/src/main/resources/myapp.composite b/branches/sca-java-1.3.2/samples/callback-ws-client/src/main/resources/myapp.composite deleted file mode 100644 index 5b776d6df8..0000000000 --- a/branches/sca-java-1.3.2/samples/callback-ws-client/src/main/resources/myapp.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/callback-ws-client/src/test/java/myapp/CallbackClientTestCase.java b/branches/sca-java-1.3.2/samples/callback-ws-client/src/test/java/myapp/CallbackClientTestCase.java deleted file mode 100644 index f11b0adfe4..0000000000 --- a/branches/sca-java-1.3.2/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.SCANode2; -import org.apache.tuscany.sca.node.SCANode2Factory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Tests that the callback server is available - */ -public class CallbackClientTestCase { - - private SCANode2 node; - - @Before - public void startServer() throws Exception { - try { - node = SCANode2Factory.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-java-1.3.2/samples/callback-ws-service/README b/branches/sca-java-1.3.2/samples/callback-ws-service/README deleted file mode 100644 index 2c65f745a6..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/callback-ws-service/build.xml b/branches/sca-java-1.3.2/samples/callback-ws-service/build.xml deleted file mode 100644 index c91dd88a8c..0000000000 --- a/branches/sca-java-1.3.2/samples/callback-ws-service/build.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/callback-ws-service/callback-ws-service.png b/branches/sca-java-1.3.2/samples/callback-ws-service/callback-ws-service.png deleted file mode 100644 index 772ac38431..0000000000 Binary files a/branches/sca-java-1.3.2/samples/callback-ws-service/callback-ws-service.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/callback-ws-service/callback-ws-service.svg b/branches/sca-java-1.3.2/samples/callback-ws-service/callback-ws-service.svg deleted file mode 100644 index ff0a1d307b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/callback-ws-service/pom.xml b/branches/sca-java-1.3.2/samples/callback-ws-service/pom.xml deleted file mode 100644 index afa00c7b40..0000000000 --- a/branches/sca-java-1.3.2/samples/callback-ws-service/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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-node2-impl - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/callback-ws-service/src/main/java/myserver/CallbackServer.java b/branches/sca-java-1.3.2/samples/callback-ws-service/src/main/java/myserver/CallbackServer.java deleted file mode 100644 index 9dfead61db..0000000000 --- a/branches/sca-java-1.3.2/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.SCANode2; -import org.apache.tuscany.sca.node.SCANode2Factory; - -/** - * 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 { - - SCANode2 node = SCANode2Factory.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-java-1.3.2/samples/callback-ws-service/src/main/java/myserver/MyService.java b/branches/sca-java-1.3.2/samples/callback-ws-service/src/main/java/myserver/MyService.java deleted file mode 100644 index 1850eae1bc..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/callback-ws-service/src/main/java/myserver/MyServiceCallback.java b/branches/sca-java-1.3.2/samples/callback-ws-service/src/main/java/myserver/MyServiceCallback.java deleted file mode 100644 index bf5f87a4f9..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/callback-ws-service/src/main/java/myserver/MyServiceImpl.java b/branches/sca-java-1.3.2/samples/callback-ws-service/src/main/java/myserver/MyServiceImpl.java deleted file mode 100644 index 25469def5c..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/callback-ws-service/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/callback-ws-service/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 35f7f60c2e..0000000000 --- a/branches/sca-java-1.3.2/samples/callback-ws-service/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-java-1.3.2/samples/callback-ws-service/src/main/resources/callbackws.composite b/branches/sca-java-1.3.2/samples/callback-ws-service/src/main/resources/callbackws.composite deleted file mode 100644 index a09e638896..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/callback-ws-service/src/test/java/myserver/CallbackServerTestCase.java b/branches/sca-java-1.3.2/samples/callback-ws-service/src/test/java/myserver/CallbackServerTestCase.java deleted file mode 100644 index 4208f7f6b5..0000000000 --- a/branches/sca-java-1.3.2/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.SCANode2; -import org.apache.tuscany.sca.node.SCANode2Factory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Tests that the callback server is available - */ -public class CallbackServerTestCase { - - private SCANode2 node; - - @Before - public void startServer() throws Exception { - node = SCANode2Factory.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-java-1.3.2/samples/chat-webapp/README b/branches/sca-java-1.3.2/samples/chat-webapp/README deleted file mode 100644 index dddd7e3f94..0000000000 --- a/branches/sca-java-1.3.2/samples/chat-webapp/README +++ /dev/null @@ -1,61 +0,0 @@ -Chat WebApp Sample -================== -This sample demonstrates the SCA DWR binding to implement the classic Ajax sample -of a chat application which allows multiple users to chat from their browsers. - -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-chat-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-chat-webapp - -The port and hostname will of course vary depending on your local installation. - -Sample Overview ---------------- -The sample provides an SCA component which has an SCA service using the SCA DWR -binding and an SCA reference also using the DWR binding. The component implementation -simply forwards every invocation of the service as an invocation on the reference. The -component reference is scoped by the composite so every active client of the composite -will receive every message sent to the component service, thus implementing the chat -application with very little code. - -chat-webapp/ - src/ - main/ - java/ - sample/ - ChatService.java - service interface - ChatServiceImpl.java - service implementation - resources/ - chat.composite - the SCA assembly for this sample - webapp - chat.html - the html UserInterface for this application - 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 - - pom.xml - the Maven build file - -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 chat-webapp -mvn - -Again this should result in a war file (sample-chat-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-java-1.3.2/samples/chat-webapp/chat-webapp.png b/branches/sca-java-1.3.2/samples/chat-webapp/chat-webapp.png deleted file mode 100644 index fdf540d243..0000000000 Binary files a/branches/sca-java-1.3.2/samples/chat-webapp/chat-webapp.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/chat-webapp/chat-webapp.svg b/branches/sca-java-1.3.2/samples/chat-webapp/chat-webapp.svg deleted file mode 100644 index b37c1dc590..0000000000 --- a/branches/sca-java-1.3.2/samples/chat-webapp/chat-webapp.svg +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - store - - - DWR - - - DWR - - Catalog - - - diff --git a/branches/sca-java-1.3.2/samples/chat-webapp/pom.xml b/branches/sca-java-1.3.2/samples/chat-webapp/pom.xml deleted file mode 100644 index 2ede6cd5ce..0000000000 --- a/branches/sca-java-1.3.2/samples/chat-webapp/pom.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../../pom.xml - - sample-chat-webapp - war - Apache Tuscany SCA Chat Sample WebApp - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-dwr - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - - stax - stax-api - 1.0.1 - provided - - - - - javax.servlet - servlet-api - 2.3 - provided - - - - - - ${artifactId} - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.3.2-SNAPSHOT - - - - generate - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/chat-webapp/src/main/java/sample/ChatService.java b/branches/sca-java-1.3.2/samples/chat-webapp/src/main/java/sample/ChatService.java deleted file mode 100644 index ca90b8f579..0000000000 --- a/branches/sca-java-1.3.2/samples/chat-webapp/src/main/java/sample/ChatService.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package sample; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface ChatService { - - public void chat(String msg); - -} diff --git a/branches/sca-java-1.3.2/samples/chat-webapp/src/main/java/sample/ChatServiceImpl.java b/branches/sca-java-1.3.2/samples/chat-webapp/src/main/java/sample/ChatServiceImpl.java deleted file mode 100644 index 7d0bfb3307..0000000000 --- a/branches/sca-java-1.3.2/samples/chat-webapp/src/main/java/sample/ChatServiceImpl.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 sample; - -import org.osoa.sca.annotations.Scope; - -@Scope("COMPOSITE") -public class ChatServiceImpl implements ChatService { - - ChatService chatters; - - public void chat(String msg) { - chatters.chat(msg); - } - - public void setChatters(ChatService chatters) { - this.chatters = chatters; - } -} diff --git a/branches/sca-java-1.3.2/samples/chat-webapp/src/main/resources/chat.composite b/branches/sca-java-1.3.2/samples/chat-webapp/src/main/resources/chat.composite deleted file mode 100644 index c9ce95e2dc..0000000000 --- a/branches/sca-java-1.3.2/samples/chat-webapp/src/main/resources/chat.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/chat-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/chat-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index 897849ff8d..0000000000 --- a/branches/sca-java-1.3.2/samples/chat-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-java-1.3.2/samples/chat-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.3.2/samples/chat-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 97d91fec56..0000000000 --- a/branches/sca-java-1.3.2/samples/chat-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - Apache Tuscany AJAX/DWR Chat Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - chat.html - - - diff --git a/branches/sca-java-1.3.2/samples/chat-webapp/src/main/webapp/chat.html b/branches/sca-java-1.3.2/samples/chat-webapp/src/main/webapp/chat.html deleted file mode 100644 index 7a449a906a..0000000000 --- a/branches/sca-java-1.3.2/samples/chat-webapp/src/main/webapp/chat.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - Apache Tuscany Ajax/DWR Chat Sample - - - - - - - - -

Apache Tuscany Ajax/DWR Chat Sample

- - A simple client to chat between multiple web browsers:

- - Nickname: -

- - Enter text: - - -

-
- - - diff --git a/branches/sca-java-1.3.2/samples/databinding-echo/README b/branches/sca-java-1.3.2/samples/databinding-echo/README deleted file mode 100644 index 67c1aa32d5..0000000000 --- a/branches/sca-java-1.3.2/samples/databinding-echo/README +++ /dev/null @@ -1,143 +0,0 @@ -DataBinding Echo Sample -======================= - -This sample demonstrates how databindings are used to convert data formats as -the data flows between 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;..\binding-echo-extension\target\sample-binding-echo-extension.jar;target\sample-databinding-echo.jar dbecho.EchoDataBindingClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:../binding-echo-extension/target/sample-binding-echo-extension.jar:target/sample-databinding-echo.jar dbecho.EchoDataBindingClient - - -Sample Overview ---------------- -If reference and service interfaces are the same in all but the formats of -data being passed to and returned from the operations of the interfaces, -then SCA will try to apply appropriate transformations to the data formats -to allow messages to pass. - -This sample shows this happening. ComponentA implements Interface1 which -defines; - - String call(String msg) - String call1(String msg) - -ComponentA defines a reference to ComponentB with Interface1. ComponentB -however implements Interface2 which defines; - - Node call(Node msg); - XMLStreamReader call1(XMLStreamReader msg); - -You can see from the test output below that SCA converts the call() msg from a -String to a DOM object (org.apache.xerces.dom.DeferredDocumentImpl). It -converts the call1() msg from a String to a XML stream reader -(com.ctc.wstx.sr.ValidatingStreamReader). - -databinding-echo/ - src/ - main/ - java/ - dbecho/ - ComponentAImpl.java - component implementation - ComponentBImpl.java - component implementation - Echo.java - service interface with data binding - EchoDataBindingClient.java - sample client code - Interface1.java - service interface with data binding - Interface2.java - service interface with data bindings - resources/ - META-INF/ - services/ - org.apache.tuscany.sca.core.ModuleActivator - specifies the module activation class to call - EchoDataBinding.composite - composite definition - wsdl/ - echo.wsdl - WSDL deinitions - test/ - java/ - dbecho/ - EchoDataBindingTestCase.java - junit test case - databinding-echo.png - pictorial representation of the sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -TODO - Needs more description of what else is going on in this test - properties, wsdl? - - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows. - -cd databinding-echo -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] [Property] prefix: ABC - [java] [Property] prefix1: ABC - [java] [Property] bar: BAR - [java] ComponentA --> Received message: 123 [java.lang.String] - [java] ComponentB --> Received message: [#document: null] [org.apache.xerces.dom.DeferredDocumentImpl] - [java] ComponentB --> Returned message: [#document: null] [org.apache.xerces.dom.DeferredDocumentImpl] - [java] ComponentA --> Returned message: 123 [java.lang.String] - [java] [Property] prefix: ABC - [java] [Property] prefix1: ABC - [java] [Property] bar: BAR - [java] ComponentA --> Received message: 123 [java.lang.String] - [java] ComponentB --> Received message: com.ctc.wstx.sr.ValidatingStreamReader@4c444c44 [com.ctc.wstx.sr.ValidatingStreamReader] - [java] ComponentB --> Returned message: com.ctc.wstx.sr.ValidatingStreamReader@4c444c44 [com.ctc.wstx.sr.ValidatingStreamReader] - [java] ComponentA --> Returned message: 123 [java.lang.String] - [java] call response = 123 - [java] call1 response = 123 - - -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 databinding-echo -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running dbecho.EchoDataBindingTestCase -[Property] prefix: ABC -[Property] prefix1: ABC -[Property] bar: BAR -ComponentA --> Received message: 123 [java.lang.String] -ComponentB --> Received message: [#document: null] [org.apache.xerces.dom.DeferredDocumentImpl] -ComponentB --> Returned message: [#document: null] [org.apache.xerces.dom.DeferredDocumentImpl] -ComponentA --> Returned message: 123 [java.lang.String] -[Property] prefix: ABC -[Property] prefix1: ABC -[Property] bar: BAR -ComponentA --> Received message: 123 [java.lang.String] -ComponentB --> Received message: com.ctc.wstx.sr.ValidatingStreamReader@74e274e2 [com.ctc.wstx.sr.ValidatingStreamReader] -ComponentB --> Returned message: com.ctc.wstx.sr.ValidatingStreamReader@74e274e2 [com.ctc.wstx.sr.ValidatingStreamReader] -ComponentA --> Returned message: 123 [java.lang.String] -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.653 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-java-1.3.2/samples/databinding-echo/build.xml b/branches/sca-java-1.3.2/samples/databinding-echo/build.xml deleted file mode 100644 index 7f2483f6fb..0000000000 --- a/branches/sca-java-1.3.2/samples/databinding-echo/build.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/databinding-echo/databinding-echo.png b/branches/sca-java-1.3.2/samples/databinding-echo/databinding-echo.png deleted file mode 100644 index afbbfff285..0000000000 Binary files a/branches/sca-java-1.3.2/samples/databinding-echo/databinding-echo.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/databinding-echo/databinding-echo.svg b/branches/sca-java-1.3.2/samples/databinding-echo/databinding-echo.svg deleted file mode 100644 index 87964abf86..0000000000 --- a/branches/sca-java-1.3.2/samples/databinding-echo/databinding-echo.svg +++ /dev/null @@ -1,408 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - EchoDataBinding - ComponentB - - - - - - ComponentA - - - prefixprefix1bar Interface1 Interface2 EchoReferencebinding.echo - - - messagePrefix complexProperty - @DataBinding("org.w3c.dom.Node")&@DataBinding("javax.xml.stream.XMLStreamReader") @DataBinding("java.lang.String") - - <db:databinding name="org.apache.axiom.om.OMElement" /> - Interface1 - Echo @DataBinding("org.w3c.dom.Node") - @DataBinding("java.lang.String") - - diff --git a/branches/sca-java-1.3.2/samples/databinding-echo/pom.xml b/branches/sca-java-1.3.2/samples/databinding-echo/pom.xml deleted file mode 100644 index 8eef9ef29a..0000000000 --- a/branches/sca-java-1.3.2/samples/databinding-echo/pom.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../../pom.xml - - - sample-databinding-echo - Apache Tuscany SCA Echo Data Binding Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-core-databinding - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - sample-binding-echo - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-interface-wsdl-xml - 1.3.2-SNAPSHOT - - - - junit - junit - 4.2 - test - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/ComponentAImpl.java b/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/ComponentAImpl.java deleted file mode 100644 index 5679614164..0000000000 --- a/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/ComponentAImpl.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 dbecho; - -import org.osoa.sca.annotations.Constructor; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; - -/** - * @version $Rev$ $Date$ - */ -public class ComponentAImpl implements Interface1 { - - private Interface1 componentBReference; - - @Constructor - public ComponentAImpl(@Reference(name = "componentBReference", required = true) - Interface1 componentBReference) { - this.componentBReference = componentBReference; - } - - public String call(String msg) { - String request = msg + " [" + msg.getClass().getName() + "]"; - System.out.println("ComponentA --> Received message: " + request); - Object ret = componentBReference.call(msg); - String response = ret + " [" + ret.getClass().getName() + "]"; - System.out.println("ComponentA --> Returned message: " + response); - return (String) ret; - } - - public String call1(String msg) { - String request = msg + " [" + msg.getClass().getName() + "]"; - System.out.println("ComponentA --> Received message: " + request); - Object ret = componentBReference.call1(msg); - String response = ret + " [" + ret.getClass().getName() + "]"; - System.out.println("ComponentA --> Returned message: " + response); - return (String) ret; - } - - @Property(name="prefix") - public void setPrefix(String prefix) { - System.out.println("[Property] prefix: " + prefix); - } - - @Property(name="prefix1") - public void setPrefix1(String prefix1) { - System.out.println("[Property] prefix1: " + prefix1); - } - - /** - * @param bar the bar to set - */ - @Property(name="bar") - public void setBar(String bar) { - System.out.println("[Property] bar: " + bar); - } - -} diff --git a/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/ComponentBImpl.java b/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/ComponentBImpl.java deleted file mode 100644 index ff8968837d..0000000000 --- a/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/ComponentBImpl.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 dbecho; - -import javax.xml.stream.XMLStreamReader; - -import org.osoa.sca.annotations.AllowsPassByReference; -import org.osoa.sca.annotations.Constructor; -import org.osoa.sca.annotations.Reference; -import org.w3c.dom.Node; - -/** - * @version $Rev$ $Date$ - */ -@AllowsPassByReference -public class ComponentBImpl implements Interface2 { - - private Echo echoReference; - - @Constructor - public ComponentBImpl(@Reference(name = "echoReference", required = true) - Echo echoReference) { - this.echoReference = echoReference; - } - - public Node call(Node msg) { - String request = msg + " [" + msg.getClass().getName() + "]"; - System.out.println("ComponentB --> Received message: " + request); - Node ret = (Node) echoReference.echo(msg); - String response = ret + " [" + ret.getClass().getName() + "]"; - System.out.println("ComponentB --> Returned message: " + response); - return ret; - } - - public XMLStreamReader call1(XMLStreamReader msg) { - String request = msg + " [" + msg.getClass().getName() + "]"; - System.out.println("ComponentB --> Received message: " + request); -// XMLStreamReader ret = (XMLStreamReader) echoReference.echo(msg); - String response = request; - System.out.println("ComponentB --> Returned message: " + response); - return msg; - } -} diff --git a/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/Echo.java b/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/Echo.java deleted file mode 100644 index 25ecc90454..0000000000 --- a/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/Echo.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 dbecho; - -import org.apache.tuscany.sca.databinding.annotation.DataBinding; -import org.osoa.sca.annotations.Remotable; - -/** - * @version $Rev$ $Date$ - */ - -@DataBinding("org.w3c.dom.Node") -@Remotable -public interface Echo { - Object echo(Object msg); -} diff --git a/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/EchoDataBindingClient.java b/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/EchoDataBindingClient.java deleted file mode 100644 index 9ec3819899..0000000000 --- a/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/EchoDataBindingClient.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 dbecho; - -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 - * @version $Rev$ $Date$ - */ -public class EchoDataBindingClient { - public static void main(String[] args) throws Exception { - - SCADomain scaDomain = SCADomain.newInstance("EchoDataBinding.composite"); - - Interface1 componentA = scaDomain.getService(Interface1.class, "ComponentA"); - String response = componentA.call("123"); - String response1= componentA.call1("123"); - - - System.out.println("call response = " + response ); - System.out.println("call1 response = " + response1 ); - - scaDomain.close(); - - } - -} diff --git a/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/Interface1.java b/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/Interface1.java deleted file mode 100644 index 70b450e358..0000000000 --- a/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/Interface1.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 dbecho; - -import org.apache.tuscany.sca.databinding.annotation.DataBinding; -import org.osoa.sca.annotations.Remotable; - -/** - * @version $Rev$ $Date$ - */ -@DataBinding("java.lang.String") -@Remotable -public interface Interface1 { - String call(String msg); - String call1(String msg); -} diff --git a/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/Interface2.java b/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/Interface2.java deleted file mode 100644 index b62f1f425d..0000000000 --- a/branches/sca-java-1.3.2/samples/databinding-echo/src/main/java/dbecho/Interface2.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 dbecho; - -import javax.xml.stream.XMLStreamReader; - -import org.apache.tuscany.sca.databinding.annotation.DataBinding; -import org.osoa.sca.annotations.Remotable; -import org.w3c.dom.Node; - -/** - * @version $Rev$ $Date$ - */ -@DataBinding("org.w3c.dom.Node") -@Remotable -public interface Interface2 { - Node call(Node msg); - @DataBinding("javax.xml.stream.XMLStreamReader") - XMLStreamReader call1(XMLStreamReader msg); -} diff --git a/branches/sca-java-1.3.2/samples/databinding-echo/src/main/resources/EchoDataBinding.composite b/branches/sca-java-1.3.2/samples/databinding-echo/src/main/resources/EchoDataBinding.composite deleted file mode 100644 index 56857fc4d5..0000000000 --- a/branches/sca-java-1.3.2/samples/databinding-echo/src/main/resources/EchoDataBinding.composite +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - ABC - - - - - - - - - - - - - - - ABC - - - BAR - - - - \ No newline at end of file diff --git a/branches/sca-java-1.3.2/samples/databinding-echo/src/main/resources/wsdl/echo.wsdl b/branches/sca-java-1.3.2/samples/databinding-echo/src/main/resources/wsdl/echo.wsdl deleted file mode 100644 index ef2308aa73..0000000000 --- a/branches/sca-java-1.3.2/samples/databinding-echo/src/main/resources/wsdl/echo.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.3.2/samples/databinding-echo/src/test/java/dbecho/EchoDataBindingTestCase.java b/branches/sca-java-1.3.2/samples/databinding-echo/src/test/java/dbecho/EchoDataBindingTestCase.java deleted file mode 100644 index 43434d8cee..0000000000 --- a/branches/sca-java-1.3.2/samples/databinding-echo/src/test/java/dbecho/EchoDataBindingTestCase.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 dbecho; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * @version $Rev$ $Date$ - */ -public class EchoDataBindingTestCase extends TestCase { - - private SCADomain scaDomain; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("EchoDataBinding.composite"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - protected Interface1 componentA; - - public void testTransform() { - componentA = scaDomain.getService(Interface1.class, "ComponentA"); - componentA.call("123"); - componentA.call1("123"); - } -} diff --git a/branches/sca-java-1.3.2/samples/domain-management/README b/branches/sca-java-1.3.2/samples/domain-management/README deleted file mode 100644 index 6280a28028..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/domain-management/pom.xml b/branches/sca-java-1.3.2/samples/domain-management/pom.xml deleted file mode 100644 index 8f26d25d60..0000000000 --- a/branches/sca-java-1.3.2/samples/domain-management/pom.xml +++ /dev/null @@ -1,247 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-assembly-xml - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-contribution - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-contribution-xml - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-workspace - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-workspace-xml - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-workspace-impl - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-node - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node2-launcher - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node2-api - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-extensibility - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-monitor - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-monitor-logging - 1.3.2-SNAPSHOT - runtime - - - - xerces - xercesImpl - 2.8.1 - - - - org.apache.tuscany.sca - tuscany-binding-atom - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-contribution-java - 1.3.2-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-contribution-namespace - 1.3.2-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-contribution-resource - 1.3.2-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-xml - 1.3.2-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-interface-java-xml - 1.3.2-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-data-api - 1.3.2-SNAPSHOT - test - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.3.2-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-java-1.3.2/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java b/branches/sca-java-1.3.2/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java deleted file mode 100644 index cb61540ab1..0000000000 --- a/branches/sca-java-1.3.2/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES 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 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.SCANode2; -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 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); - - // 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, contractMapper, monitor); - - // Create a node composite builder - nodeCompositeBuilder = new NodeCompositeBuilderImpl(assemblyFactory, scaBindingFactory, 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.NodeLauncher.Contribution[] contributions = new org.apache.tuscany.sca.node.launcher.NodeLauncher.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.NodeLauncher.Contribution(dependency.getURI(), dependency.getLocation()); - } - SCANode2 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 (SCANode2 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-java-1.3.2/samples/domain-management/src/main/java/manager/DistributeComponents.java b/branches/sca-java-1.3.2/samples/domain-management/src/main/java/manager/DistributeComponents.java deleted file mode 100644 index 4af2547a81..0000000000 --- a/branches/sca-java-1.3.2/samples/domain-management/src/main/java/manager/DistributeComponents.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 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 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 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); - - // 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, contractMapper, monitor); - - // Create a node composite builder - nodeCompositeBuilder = new NodeCompositeBuilderImpl(assemblyFactory, scaBindingFactory, 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-java-1.3.2/samples/domain-management/src/main/java/manager/ListComponents.java b/branches/sca-java-1.3.2/samples/domain-management/src/main/java/manager/ListComponents.java deleted file mode 100644 index 27cb31d57f..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/domain-management/src/main/java/manager/ListDependencies.java b/branches/sca-java-1.3.2/samples/domain-management/src/main/java/manager/ListDependencies.java deleted file mode 100644 index 1bf8124682..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/domain-management/src/main/java/manager/ListDeployables.java b/branches/sca-java-1.3.2/samples/domain-management/src/main/java/manager/ListDeployables.java deleted file mode 100644 index f5f0b9c655..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/domain-management/src/main/java/manager/WireComponents.java b/branches/sca-java-1.3.2/samples/domain-management/src/main/java/manager/WireComponents.java deleted file mode 100644 index 899a6fd412..0000000000 --- a/branches/sca-java-1.3.2/samples/domain-management/src/main/java/manager/WireComponents.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES 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 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 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); - - // 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, 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-java-1.3.2/samples/domain-management/src/test/java/services/Cart.java b/branches/sca-java-1.3.2/samples/domain-management/src/test/java/services/Cart.java deleted file mode 100644 index 9e6226d963..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/domain-management/src/test/java/services/Item.java b/branches/sca-java-1.3.2/samples/domain-management/src/test/java/services/Item.java deleted file mode 100644 index 81cefcdbef..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/domain-management/src/test/java/services/ShoppingCartClientImpl.java b/branches/sca-java-1.3.2/samples/domain-management/src/test/java/services/ShoppingCartClientImpl.java deleted file mode 100644 index c32853b3a9..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/domain-management/src/test/java/services/ShoppingCartImpl.java b/branches/sca-java-1.3.2/samples/domain-management/src/test/java/services/ShoppingCartImpl.java deleted file mode 100644 index ef63dfdfa1..0000000000 --- a/branches/sca-java-1.3.2/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 - protected 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-java-1.3.2/samples/domain-management/src/test/resources/assembly/assets.xml b/branches/sca-java-1.3.2/samples/domain-management/src/test/resources/assembly/assets.xml deleted file mode 100644 index 10693a89e6..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/domain-management/src/test/resources/assembly/client.xml b/branches/sca-java-1.3.2/samples/domain-management/src/test/resources/assembly/client.xml deleted file mode 100644 index 5b34693bee..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/domain-management/src/test/resources/assembly/store.xml b/branches/sca-java-1.3.2/samples/domain-management/src/test/resources/assembly/store.xml deleted file mode 100644 index d19b7eb161..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/domain-management/src/test/resources/assets/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/domain-management/src/test/resources/assets/META-INF/sca-contribution.xml deleted file mode 100644 index 33fe814c3a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/domain-management/src/test/resources/client/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/domain-management/src/test/resources/client/META-INF/sca-contribution.xml deleted file mode 100644 index 14e1cdb672..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/domain-management/src/test/resources/client/client.composite b/branches/sca-java-1.3.2/samples/domain-management/src/test/resources/client/client.composite deleted file mode 100644 index 1279b319c4..0000000000 --- a/branches/sca-java-1.3.2/samples/domain-management/src/test/resources/client/client.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/domain-management/src/test/resources/store/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/domain-management/src/test/resources/store/META-INF/sca-contribution.xml deleted file mode 100644 index 52348106f2..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/domain-management/src/test/resources/store/store.composite b/branches/sca-java-1.3.2/samples/domain-management/src/test/resources/store/store.composite deleted file mode 100644 index d4f18771d8..0000000000 --- a/branches/sca-java-1.3.2/samples/domain-management/src/test/resources/store/store.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/domain-webapp/README b/branches/sca-java-1.3.2/samples/domain-webapp/README deleted file mode 100644 index c01a0dd39a..0000000000 --- a/branches/sca-java-1.3.2/samples/domain-webapp/README +++ /dev/null @@ -1,310 +0,0 @@ -Domain Webapp Sample -==================== - -Not actually a webapp just yet as webapp host need to use the new domain for it to work. -If you run the DomainServer in a debugger you will get a server that provides a registry -for servide URLs, listens for Nodes starting and stopping and provides a web page where -you can see what nodes are registered and pull up their web pages. - -Use the nodes from the calculator-distributed to register with this domain - - -========================================== -Below copied from calculator sample as a template for when this gets done - - -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 runDomainNode -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.DomainNode -java -cp src\main\resources;..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.CalculatorNode mydomain nodeB -java -cp src\main\resources;..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.CalculatorNode mydomain nodeC -java -cp src\main\resources;..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-distributed.jar node.CalculatorNode mydomain nodeA - -and on *nix do - -java -cp src/main/resources:../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.DomainNode -java -cp src/main/resources:../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.CalculatorNode mydomain nodeB -java -cp src/main/resources:../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.CalculatorNode mydomain nodeC -java -cp src/main/resources:../../lib/tuscany-sca-manifest.jar:target/sample-calculator-distributed.jar node.CalculatorNode mydomain nodeA - - -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 would see output of invoking the -calculator functions distributed over NodeB and and NodeC. On the command prompts -where you have started NodeB and NodeC, you would see log messages that indicate that -the add and substract 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. - - -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/ - CalculatorNode.java - runs up an sca application based on - configuration given on the command - line in the form - - CalculatorNode - - it looks for a directory name the same - as and loads the composites - there - - if = nodeA it calls the - +-/* operations otherwise it behaves - like a server and waits for service - requests - DomainNode.java - the node that provides the service - discovery mechanism to the distributed - domain - resources/ - domain - the SCA assembly for the service discovery - function - management/ - the SCA assembly for each nodes management - function - 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 nodeB's part of the - calculator application - test/ - java/ - calculator/ - DomainInMemoryTestCase.java - JUnit test case which runs all of the - separate ndes 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 runDomainNode -ant runNodeB -ant runNodeC -ant runNodeA - -You should see the following output from the four separate command prompt: - -runDomainNode: - [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] 23-Aug-2007 17:40:40 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://localhost:8080/ServiceDiscoveryC -omponent/ServiceDiscovery - [java] Domain node started (press enter to shutdown) - [java] Registering service: [mydomain nodeB AddServiceComponent org.apache. -tuscany.sca.assembly.SCABinding http://localhost:8085/AddServiceComponent] - [java] Registering service: [mydomain nodeC SubtractServiceComponent org.ap -ache.tuscany.sca.assembly.SCABinding http://localhost:8086/SubtractServiceCompon -ent] - [java] Finding service: [mydomain SubtractServiceComponent org.apache.tusca -ny.sca.assembly.SCABinding] - [java] Matching service url: http://localhost:8086/SubtractServiceComponent - - [java] Finding service: [mydomain AddServiceComponent org.apache.tuscany.sc -a.assembly.SCABinding] - [java] Matching service url: http://localhost:8085/AddServiceComponent - [java] Java Result: 1 -Terminate batch job (Y/N)? y - - - -runNodeB: - [java] file:/C:/simon/tuscany/java-head/sca/samples/calculator-distributed/ -target/classes/management/ - [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] Registering service: [mydomain nodeB AddServiceComponent/ org.apache -.tuscany.sca.assembly.SCABinding http://localhost:8085/AddServiceComponent] - [java] 23-Aug-2007 17:41:25 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://localhost:8085/AddServiceCompone -nt - [java] Node started (press enter to shutdown) - [java] AddService - add 3.0 and 2.0 - - -runNodeC: - [java] file:/C:/simon/tuscany/java-head/sca/samples/calculator-distributed/ -target/classes/management/ - [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] Registering service: [mydomain nodeC SubtractServiceComponent org.ap -ache.tuscany.sca.assembly.SCABinding http://localhost:8086/SubtractServiceCompon -ent] - [java] 23-Aug-2007 17:41:51 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] Node started (press enter to shutdown) - [java] INFO: Added Servlet mapping: http://localhost:8086/SubtractServiceCo -mponent - [java] SubtractService - subtract 3.0 and 2.0 -Terminate batch job (Y/N)? y - - -runNodeA: - [java] file:/C:/simon/tuscany/java-head/sca/samples/calculator-distributed/ -target/classes/management/ - [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] 23-Aug-2007 17:42:12 org.apache.tuscany.sca.assembly.builder.impl.Co -mpositeBuilderImpl$1 problem - [java] WARNING: [WARNING] Component reference target not found, it might be - a remote service: AddServiceComponent null - [java] - [java] 23-Aug-2007 17:42:12 org.apache.tuscany.sca.assembly.builder.impl.Co -mpositeBuilderImpl$1 problem - [java] WARNING: [WARNING] Component reference target not found, it might be - a remote service: SubtractServiceComponent null - [java] - [java] Finding service: [mydomain SubtractServiceComponent org.apache.tusca -ny.sca.assembly.SCABinding] - [java] Finding service: [mydomain AddServiceComponent org.apache.tuscany.sc -a.assembly.SCABinding] - [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 - - -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 from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.DomainInMemoryTestCase -Setting up distributed nodes -file:/C:/simon/tuscany/java-head/sca/samples/calculator-distributed/target/class -es/management/ -log4j:WARN No appenders could be found for logger (org.apache.axiom.om.util.StAX -Utils). -log4j:WARN Please initialize the log4j system properly. -23-Aug-2007 18:18:41 org.apache.tuscany.sca.assembly.builder.impl.CompositeBuild -erImpl$1 problem -WARNING: [WARNING] Component reference target not found, it might be a remote se -rvice: AddServiceComponent null - -23-Aug-2007 18:18:41 org.apache.tuscany.sca.assembly.builder.impl.CompositeBuild -erImpl$1 problem -WARNING: [WARNING] Component reference target not found, it might be a remote se -rvice: SubtractServiceComponent null - -file:/C:/simon/tuscany/java-head/sca/samples/calculator-distributed/target/class -es/management/ -Registering service: [mydomain nodeB AddServiceComponent org.apache.tuscany.sca. -assembly.SCABinding http://localhost:8085/AddServiceComponent] -file:/C:/simon/tuscany/java-head/sca/samples/calculator-distributed/target/class -es/management/ -Registering service: [mydomain nodeC SubtractServiceComponent org.apache.tuscany -.sca.assembly.SCABinding http://localhost:8086/SubtractServiceComponent] -Finding service: [mydomain SubtractServiceComponent org.apache.tuscany.sca.assem -bly.SCABinding] -Matching service url: http://localhost:8086/SubtractServiceComponent -Finding service: [mydomain AddServiceComponent org.apache.tuscany.sca.assembly.S -CABinding] -Matching service url: http://localhost:8085/AddServiceComponent -23-Aug-2007 18:18:45 org.apache.tuscany.sca.http.jetty.JettyServer addServletMap -ping -INFO: Added Servlet mapping: http://localhost:8085/AddServiceComponent -23-Aug-2007 18:18:47 org.apache.tuscany.sca.http.jetty.JettyServer addServletMap -ping -INFO: Added Servlet mapping: http://localhost:8086/SubtractServiceComponent -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 -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.14 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - - -This shows that the Junit test cases have run successfully. - -Known Bug : ---------- -The processes that are running NodeB and NodeC do not seem to end on pressing the -. This will be fixed for the next release. For this release you should use -^C (Control C) to exit these processes. - - diff --git a/branches/sca-java-1.3.2/samples/domain-webapp/build.xml b/branches/sca-java-1.3.2/samples/domain-webapp/build.xml deleted file mode 100644 index 253534ac89..0000000000 --- a/branches/sca-java-1.3.2/samples/domain-webapp/build.xml +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/domain-webapp/pom.xml b/branches/sca-java-1.3.2/samples/domain-webapp/pom.xml deleted file mode 100644 index a03101d135..0000000000 --- a/branches/sca-java-1.3.2/samples/domain-webapp/pom.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-samples - 1.3.2-SNAPSHOT - ../pom.xml - - sample-domain-webapp - Apache Tuscany SCA Domain Webapp Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-domain-impl - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-sca-axis2 - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-http - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-resource - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-java-1.3.2/samples/domain-webapp/src/main/java/node/DomainServer.java b/branches/sca-java-1.3.2/samples/domain-webapp/src/main/java/node/DomainServer.java deleted file mode 100644 index ea3cddc01b..0000000000 --- a/branches/sca-java-1.3.2/samples/domain-webapp/src/main/java/node/DomainServer.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 node; - -import java.io.IOException; - - -/** - * 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 DomainServer { - - public static void main(String[] args) { - try { -/* - NodeImpl node = new NodeImpl(); - node.start(); - node.getContributionManager().startContribution(DomainServer.class.getClassLoader().getResource(".")); - - try { - System.out.println("Domain server started (press enter to shutdown)"); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - - node.stop(); - System.out.println("Domain server stopped"); -*/ - } catch (Exception ex) { - System.out.println("Exception in domain server " + - ex.toString()); - } - } - -} diff --git a/branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100755 index fbe5880db6..0000000000 --- a/branches/sca-java-1.3.2/samples/domain-webapp/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-java-1.3.2/samples/domain-webapp/src/main/resources/domain.composite b/branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/domain.composite deleted file mode 100644 index dbaaebd3c7..0000000000 --- a/branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/domain.composite +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/webroot/index.html b/branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/webroot/index.html deleted file mode 100644 index 425bd73734..0000000000 --- a/branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/webroot/index.html +++ /dev/null @@ -1,354 +0,0 @@ - - - -Apache Tuscany Domain - - - - - - - - - - - - -

Apache Tuscany Domain

-
- -

Domain Name:

- -
- -

- -

- - - diff --git a/branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/webroot/node.png b/branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/webroot/node.png deleted file mode 100644 index b3c949d224..0000000000 Binary files a/branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/webroot/node.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/webroot/style.css b/branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/webroot/style.css deleted file mode 100644 index f5bbf23379..0000000000 --- a/branches/sca-java-1.3.2/samples/domain-webapp/src/main/resources/webroot/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-java-1.3.2/samples/feed-aggregator-webapp/README b/branches/sca-java-1.3.2/samples/feed-aggregator-webapp/README deleted file mode 100644 index 3668a7705e..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/feed-aggregator-webapp/feed-aggregator-webapp.png b/branches/sca-java-1.3.2/samples/feed-aggregator-webapp/feed-aggregator-webapp.png deleted file mode 100644 index 1af95a5eff..0000000000 Binary files a/branches/sca-java-1.3.2/samples/feed-aggregator-webapp/feed-aggregator-webapp.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/feed-aggregator-webapp/feed-aggregator-webapp.svg b/branches/sca-java-1.3.2/samples/feed-aggregator-webapp/feed-aggregator-webapp.svg deleted file mode 100644 index a861a5c50f..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/feed-aggregator-webapp/pom.xml b/branches/sca-java-1.3.2/samples/feed-aggregator-webapp/pom.xml deleted file mode 100644 index 22e28f23b9..0000000000 --- a/branches/sca-java-1.3.2/samples/feed-aggregator-webapp/pom.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-rss-rome - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-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.3.2-SNAPSHOT - - - - generate - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/feed-aggregator-webapp/src/main/java/feed/AggregatorImpl.java b/branches/sca-java-1.3.2/samples/feed-aggregator-webapp/src/main/java/feed/AggregatorImpl.java deleted file mode 100644 index 3d259e66b1..0000000000 --- a/branches/sca-java-1.3.2/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://incubator.apache.org/tuscany", "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://incubator.apache.org/tuscany", "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-java-1.3.2/samples/feed-aggregator-webapp/src/main/java/feed/Sort.java b/branches/sca-java-1.3.2/samples/feed-aggregator-webapp/src/main/java/feed/Sort.java deleted file mode 100644 index dec073c36b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/feed-aggregator-webapp/src/main/java/feed/SortImpl.java b/branches/sca-java-1.3.2/samples/feed-aggregator-webapp/src/main/java/feed/SortImpl.java deleted file mode 100644 index ea7d252ed4..0000000000 --- a/branches/sca-java-1.3.2/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).getPublished(); - Date yDate = ((Entry)yObj).getPublished(); - 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-java-1.3.2/samples/feed-aggregator-webapp/src/main/resources/FeedAggregator.composite b/branches/sca-java-1.3.2/samples/feed-aggregator-webapp/src/main/resources/FeedAggregator.composite deleted file mode 100644 index d41fe3e4a0..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/feed-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/feed-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index b67fe843ca..0000000000 --- a/branches/sca-java-1.3.2/samples/feed-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/feed-aggregator-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.3.2/samples/feed-aggregator-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index dea3980e4d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/feed-aggregator-webapp/src/main/webapp/index.html b/branches/sca-java-1.3.2/samples/feed-aggregator-webapp/src/main/webapp/index.html deleted file mode 100644 index e20f2fdf81..0000000000 --- a/branches/sca-java-1.3.2/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:8080/sample-feed-aggregator-webapp/atomAggregator -
http://localhost:8080/sample-feed-aggregator-webapp/atomAggregator/atomsvc (for the Atom service document) -
http://localhost:8080/sample-feed-aggregator-webapp/rssAggregator - - - diff --git a/branches/sca-java-1.3.2/samples/feed-aggregator/README b/branches/sca-java-1.3.2/samples/feed-aggregator/README deleted file mode 100644 index 5dfe430b83..0000000000 --- a/branches/sca-java-1.3.2/samples/feed-aggregator/README +++ /dev/null @@ -1,97 +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 feed.SampleServer - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-feed-aggregator.jar feed.SampleServer - -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/ - FeedAggregatorImpl.java - implementation of the Feed - aggregator component - SampleServer.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 - -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-java-1.3.2/samples/feed-aggregator/build.xml b/branches/sca-java-1.3.2/samples/feed-aggregator/build.xml deleted file mode 100644 index 2118e13db7..0000000000 --- a/branches/sca-java-1.3.2/samples/feed-aggregator/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/feed-aggregator/feed-aggregator.png b/branches/sca-java-1.3.2/samples/feed-aggregator/feed-aggregator.png deleted file mode 100644 index c8fea8a7b8..0000000000 Binary files a/branches/sca-java-1.3.2/samples/feed-aggregator/feed-aggregator.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/feed-aggregator/feed-aggregator.svg b/branches/sca-java-1.3.2/samples/feed-aggregator/feed-aggregator.svg deleted file mode 100644 index 72fe6a00ac..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/feed-aggregator/pom.xml b/branches/sca-java-1.3.2/samples/feed-aggregator/pom.xml deleted file mode 100644 index 14aaa1c833..0000000000 --- a/branches/sca-java-1.3.2/samples/feed-aggregator/pom.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-rss-rome - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/feed-aggregator/src/main/java/feed/AggregatorImpl.java b/branches/sca-java-1.3.2/samples/feed-aggregator/src/main/java/feed/AggregatorImpl.java deleted file mode 100644 index 5c713f9ca4..0000000000 --- a/branches/sca-java-1.3.2/samples/feed-aggregator/src/main/java/feed/AggregatorImpl.java +++ /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. - */ -package feed; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.OutputStreamWriter; -import java.util.ArrayList; -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://incubator.apache.org/tuscany", "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://incubator.apache.org/tuscany", "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-java-1.3.2/samples/feed-aggregator/src/main/java/feed/SampleServer.java b/branches/sca-java-1.3.2/samples/feed-aggregator/src/main/java/feed/SampleServer.java deleted file mode 100644 index 2aace3daf7..0000000000 --- a/branches/sca-java-1.3.2/samples/feed-aggregator/src/main/java/feed/SampleServer.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 feed; - -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("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(); - } - - // RssFeed feedService = scaDomain.getService(RssFeed.class, - // "RssAggregatorComponent"); - // SyndFeed syndFeed = feedService.get(); - // SyndFeedOutput output = new SyndFeedOutput(); - // output.output(syndFeed,new PrintWriter(System.out)); - - scaDomain.close(); - System.out.println("Sample Feed server stopped"); - } -} diff --git a/branches/sca-java-1.3.2/samples/feed-aggregator/src/main/java/feed/Sort.java b/branches/sca-java-1.3.2/samples/feed-aggregator/src/main/java/feed/Sort.java deleted file mode 100644 index dec073c36b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/feed-aggregator/src/main/java/feed/SortImpl.java b/branches/sca-java-1.3.2/samples/feed-aggregator/src/main/java/feed/SortImpl.java deleted file mode 100644 index ea7d252ed4..0000000000 --- a/branches/sca-java-1.3.2/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).getPublished(); - Date yDate = ((Entry)yObj).getPublished(); - 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-java-1.3.2/samples/feed-aggregator/src/main/resources/FeedAggregator.composite b/branches/sca-java-1.3.2/samples/feed-aggregator/src/main/resources/FeedAggregator.composite deleted file mode 100644 index 34f313672e..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-bpel-ws/README b/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/README deleted file mode 100644 index 5c669f5da5..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-bpel-ws/build.xml b/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/build.xml deleted file mode 100644 index c8917007f1..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/build.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/helloworld-bpel.png b/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/helloworld-bpel.png deleted file mode 100644 index 5f53a3c5d1..0000000000 Binary files a/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/helloworld-bpel.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/helloworld-bpel.svg b/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/helloworld-bpel.svg deleted file mode 100644 index 5a98f1a07c..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-bpel-ws/pom.xml b/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/pom.xml deleted file mode 100644 index be832ad341..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/pom.xml +++ /dev/null @@ -1,205 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-bpel-ode - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.3.2-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.3.2-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.3.2-SNAPSHOT - - - - ${basedir}/src/main/resources/helloworld.wsdl - - - generate - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/java/helloworld/BPELClient.java b/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/java/helloworld/BPELClient.java deleted file mode 100644 index 971a5373e9..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/deploy.xml b/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/deploy.xml deleted file mode 100644 index d9d4363832..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/deploy.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - true - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/helloworld.bpel b/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/helloworld.bpel deleted file mode 100644 index a88aa7960c..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/helloworld.bpel +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - concat($tmpVar,' World') - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/helloworld.componentType b/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/helloworld.componentType deleted file mode 100644 index 70273245d7..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/helloworld.composite b/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/helloworld.composite deleted file mode 100644 index 97262109e6..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/helloworld.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/helloworld.wsdl b/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/helloworld.wsdl deleted file mode 100644 index 1cb338b283..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/log4j.properties b/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/main/resources/log4j.properties deleted file mode 100644 index c1bc0a0b81..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-bpel-ws/src/test/java/helloworld/BPELHelloWorldTestCase.java b/branches/sca-java-1.3.2/samples/helloworld-bpel-ws/src/test/java/helloworld/BPELHelloWorldTestCase.java deleted file mode 100644 index 6ad63f87d9..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-bpel/README b/branches/sca-java-1.3.2/samples/helloworld-bpel/README deleted file mode 100644 index bf5f500ef3..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-bpel/build.xml b/branches/sca-java-1.3.2/samples/helloworld-bpel/build.xml deleted file mode 100644 index 890a6427b8..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-bpel/build.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-bpel/helloworld-bpel.png b/branches/sca-java-1.3.2/samples/helloworld-bpel/helloworld-bpel.png deleted file mode 100644 index 5f53a3c5d1..0000000000 Binary files a/branches/sca-java-1.3.2/samples/helloworld-bpel/helloworld-bpel.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/helloworld-bpel/helloworld-bpel.svg b/branches/sca-java-1.3.2/samples/helloworld-bpel/helloworld-bpel.svg deleted file mode 100644 index 5a98f1a07c..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-bpel/pom.xml b/branches/sca-java-1.3.2/samples/helloworld-bpel/pom.xml deleted file mode 100644 index cbcf5e8a3f..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-bpel/pom.xml +++ /dev/null @@ -1,198 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-bpel-ode - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sdo - tuscany-sdo-tools - 1.1-incubating - - - - 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-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.3.2-SNAPSHOT - - - - ${basedir}/src/main/resources/helloworld.wsdl - - - generate - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/java/helloworld/BPELClient.java b/branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/java/helloworld/BPELClient.java deleted file mode 100644 index 1826c885c4..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-bpel/src/main/resources/deploy.xml b/branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/deploy.xml deleted file mode 100644 index 9bd95b2c58..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/deploy.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - true - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/helloworld.bpel b/branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/helloworld.bpel deleted file mode 100644 index a88aa7960c..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/helloworld.bpel +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - concat($tmpVar,' World') - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/helloworld.componentType b/branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/helloworld.componentType deleted file mode 100644 index 2b360111cb..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-bpel/src/main/resources/helloworld.composite b/branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/helloworld.composite deleted file mode 100644 index b4623b5c2d..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/helloworld.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/helloworld.wsdl b/branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/helloworld.wsdl deleted file mode 100644 index 46cf381577..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-bpel/src/main/resources/log4j.properties b/branches/sca-java-1.3.2/samples/helloworld-bpel/src/main/resources/log4j.properties deleted file mode 100644 index 8649a71550..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java b/branches/sca-java-1.3.2/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java deleted file mode 100644 index 1caaa78878..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-dojo-webapp/README b/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/README deleted file mode 100644 index 38392a13b6..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-dojo-webapp/build-dojo.xml b/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/build-dojo.xml deleted file mode 100644 index 534a1dacd9..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/build-dojo.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/build.xml b/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/build.xml deleted file mode 100644 index 95813af65a..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/build.xml +++ /dev/null @@ -1,70 +0,0 @@ - - -]> - - - - &buildDependency; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/helloworld-jsonrpc.png b/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/helloworld-jsonrpc.png deleted file mode 100644 index 57f90aed01..0000000000 Binary files a/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/helloworld-jsonrpc.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/helloworld-jsonrpc.svg b/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/helloworld-jsonrpc.svg deleted file mode 100644 index d5c3bc5d3e..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-dojo-webapp/pom.xml b/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/pom.xml deleted file mode 100644 index c0e62d60cf..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/pom.xml +++ /dev/null @@ -1,163 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.3.2-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.3.2-SNAPSHOT - - - - true - - - generate - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java b/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java deleted file mode 100644 index 3d8ea24f04..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java b/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java deleted file mode 100644 index e205f4da9b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-dojo-webapp/src/main/resources/jsonrpc.composite b/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/resources/jsonrpc.composite deleted file mode 100644 index e895ab455d..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/resources/jsonrpc.composite +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/webapp/HelloWorldJSONRPC.html b/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/webapp/HelloWorldJSONRPC.html deleted file mode 100644 index 4195f3288c..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-dojo-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index 2c178c1ddc..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 70cd67890a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-dojo-webapp/src/main/webapp/style.css b/branches/sca-java-1.3.2/samples/helloworld-dojo-webapp/src/main/webapp/style.css deleted file mode 100644 index 1071583264..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-jms-webapp/README b/branches/sca-java-1.3.2/samples/helloworld-jms-webapp/README deleted file mode 100644 index 9be2e0b0f6..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-jms-webapp/pom.xml b/branches/sca-java-1.3.2/samples/helloworld-jms-webapp/pom.xml deleted file mode 100644 index 00c8d00589..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-jms-webapp/pom.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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} - - - - - stax - stax-api - 1.0.1 - provided - - - - - javax.servlet - servlet-api - 2.3 - provided - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldClient.java b/branches/sca-java-1.3.2/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldClient.java deleted file mode 100644 index c24a741ee2..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-1.3.2/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 2af978b9ce..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-1.3.2/samples/helloworld-jms-webapp/src/main/java/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index 280388f443..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-jms-webapp/src/main/webapp/META-INF/context.xml b/branches/sca-java-1.3.2/samples/helloworld-jms-webapp/src/main/webapp/META-INF/context.xml deleted file mode 100644 index 2419887413..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-jms-webapp/src/main/webapp/META-INF/sca-deployables/HelloWorld.composite b/branches/sca-java-1.3.2/samples/helloworld-jms-webapp/src/main/webapp/META-INF/sca-deployables/HelloWorld.composite deleted file mode 100644 index f6328d156c..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-jms-webapp/src/main/webapp/META-INF/sca-deployables/HelloWorld.composite +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-jms-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.3.2/samples/helloworld-jms-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 86710435ae..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-jms-webapp/src/main/webapp/hello.jsp b/branches/sca-java-1.3.2/samples/helloworld-jms-webapp/src/main/webapp/hello.jsp deleted file mode 100644 index bc6ef59a9b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-jsonrpc-webapp/README b/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/README deleted file mode 100644 index 07253d039b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-jsonrpc-webapp/helloworld-jsonrpc.png b/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/helloworld-jsonrpc.png deleted file mode 100644 index 57f90aed01..0000000000 Binary files a/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/helloworld-jsonrpc.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/helloworld-jsonrpc.svg b/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/helloworld-jsonrpc.svg deleted file mode 100644 index 6ef1f438fb..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-jsonrpc-webapp/pom.xml b/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/pom.xml deleted file mode 100644 index 9ce7dbea80..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.3.2-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.3.2-SNAPSHOT - - - - generate - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java b/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java deleted file mode 100644 index 3d8ea24f04..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java b/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java deleted file mode 100644 index 35fd00fabd..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/resources/jsonrpc.composite b/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/resources/jsonrpc.composite deleted file mode 100644 index e895ab455d..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/resources/jsonrpc.composite +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/webapp/HelloWorldJSONRPC.html b/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/webapp/HelloWorldJSONRPC.html deleted file mode 100644 index 75dd9050fa..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index c8246e15a7..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 267bed176c..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/webapp/style.css b/branches/sca-java-1.3.2/samples/helloworld-jsonrpc-webapp/src/main/webapp/style.css deleted file mode 100644 index 1071583264..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-reference-jms/README b/branches/sca-java-1.3.2/samples/helloworld-reference-jms/README deleted file mode 100644 index 184e67a239..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-reference-jms/build.xml b/branches/sca-java-1.3.2/samples/helloworld-reference-jms/build.xml deleted file mode 100644 index 4702beed0d..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-reference-jms/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-reference-jms/helloworld-reference.png b/branches/sca-java-1.3.2/samples/helloworld-reference-jms/helloworld-reference.png deleted file mode 100644 index ab80b1f91c..0000000000 Binary files a/branches/sca-java-1.3.2/samples/helloworld-reference-jms/helloworld-reference.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/helloworld-reference-jms/helloworld-reference.svg b/branches/sca-java-1.3.2/samples/helloworld-reference-jms/helloworld-reference.svg deleted file mode 100644 index 40f4e8f271..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-reference-jms/pom.xml b/branches/sca-java-1.3.2/samples/helloworld-reference-jms/pom.xml deleted file mode 100644 index f28078fcce..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-reference-jms/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - sample-helloworld-service-jms - 1.3.2-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-java-1.3.2/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 4cdcc1fd0b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java b/branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java deleted file mode 100644 index 5bec27a137..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index c0259c6e07..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldServiceComponent.java b/branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldServiceComponent.java deleted file mode 100644 index 27cef47677..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-reference-jms/src/main/resources/helloworldjmsreference.composite b/branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/resources/helloworldjmsreference.composite deleted file mode 100644 index 3cf1104562..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/resources/helloworldjmsreference.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite b/branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite deleted file mode 100644 index e692ef8e4c..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/resources/helloworldjmsservice.composite +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/resources/logging.properties b/branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/resources/logging.properties deleted file mode 100644 index a2a4067921..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-reference-jms/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index e0ea596dd3..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java b/branches/sca-java-1.3.2/samples/helloworld-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java deleted file mode 100644 index f5380d9ccd..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-service-jms/README b/branches/sca-java-1.3.2/samples/helloworld-service-jms/README deleted file mode 100644 index 49feabaa07..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-service-jms/build.xml b/branches/sca-java-1.3.2/samples/helloworld-service-jms/build.xml deleted file mode 100644 index 330de7f7e5..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-service-jms/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-service-jms/helloworld-service.png b/branches/sca-java-1.3.2/samples/helloworld-service-jms/helloworld-service.png deleted file mode 100644 index ef27c71f54..0000000000 Binary files a/branches/sca-java-1.3.2/samples/helloworld-service-jms/helloworld-service.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/helloworld-service-jms/helloworld-service.svg b/branches/sca-java-1.3.2/samples/helloworld-service-jms/helloworld-service.svg deleted file mode 100644 index dd7a9dd87d..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-service-jms/helloworld-service.svg +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworld - - HelloWorldServiceComponent - HelloWorldServiceJMS - diff --git a/branches/sca-java-1.3.2/samples/helloworld-service-jms/pom.xml b/branches/sca-java-1.3.2/samples/helloworld-service-jms/pom.xml deleted file mode 100644 index 6d8bcbb57f..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-service-jms/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms - 1.3.2-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-java-1.3.2/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-1.3.2/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 4cdcc1fd0b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java b/branches/sca-java-1.3.2/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java deleted file mode 100644 index d4ea391a00..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-1.3.2/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 4b019b21bf..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-service-jms/src/main/resources/definitions.xml b/branches/sca-java-1.3.2/samples/helloworld-service-jms/src/main/resources/definitions.xml deleted file mode 100644 index 8c881ab0bb..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite b/branches/sca-java-1.3.2/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite deleted file mode 100644 index 3135cdc320..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-service-jms/src/main/resources/helloworldjmsservice.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-service-jms/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-java-1.3.2/samples/helloworld-service-jms/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 3f9e00689e..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-service-jms/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-service-jms/src/test/java/helloworld/HelloWorldJmsServerTestCaseOff.java b/branches/sca-java-1.3.2/samples/helloworld-service-jms/src/test/java/helloworld/HelloWorldJmsServerTestCaseOff.java deleted file mode 100644 index 7930f98716..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-deep-webapp/README b/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/README deleted file mode 100644 index 66040004f8..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/README +++ /dev/null @@ -1 +0,0 @@ -http://localhost:8080/sample-helloworld-ws-service-webapp/SCA/HelloWorldService?wsdl diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/build.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/build.xml deleted file mode 100644 index 46fc19f0d5..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/build.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/pom.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/pom.xml deleted file mode 100644 index 3253bf1422..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - - - sample-helloworld-ws-service-webapp - Apache Tuscany SCA HelloWorld Web Service Sample Webapp - war - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.3.2-SNAPSHOT - provided - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 0de3c70303..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-deep-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-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 268d90e910..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-deep-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-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/resources/META-INF/sca-deployables/helloworldws.composite b/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/resources/META-INF/sca-deployables/helloworldws.composite deleted file mode 100644 index 114608e4d8..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/resources/META-INF/sca-deployables/helloworldws.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 0b95fbd14f..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 182fd38fd9..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-deep-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - Apache Tuscany HelloWorld Web Service Sample - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/README b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/README deleted file mode 100644 index abf10ef1f2..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-jms/build.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/build.xml deleted file mode 100644 index 4f83c8ae9d..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/helloworld-ws-reference.png b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/helloworld-ws-reference.png deleted file mode 100644 index bd2bba41db..0000000000 Binary files a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/helloworld-ws-reference.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/helloworld-ws-reference.svg b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/helloworld-ws-reference.svg deleted file mode 100644 index 333ad53e0a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-jms/pom.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/pom.xml deleted file mode 100644 index 48e3d084dc..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - sample-helloworld-ws-service-jms - 1.3.2-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-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 4cdcc1fd0b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java deleted file mode 100644 index b3db243a1f..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index db0c947cf7..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldServiceComponent.java b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/java/helloworld/HelloWorldServiceComponent.java deleted file mode 100644 index 0dee19550b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/resources/helloworldwsjms.composite b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/resources/helloworldwsjms.composite deleted file mode 100644 index d029ba3e1c..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/resources/helloworldwsjms.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/resources/helloworldwsjmsclient.composite b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/resources/helloworldwsjmsclient.composite deleted file mode 100644 index a4eb217310..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/resources/helloworldwsjmsclient.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/resources/logging.properties b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/resources/logging.properties deleted file mode 100644 index 3dca310cdb..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 013a55b61e..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java deleted file mode 100644 index 12b0716b5d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-secure/README b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/README deleted file mode 100644 index 167991c8f7..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-secure/build.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/build.xml deleted file mode 100644 index 38f1b7549d..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/helloworld-ws-reference-secure.png b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/helloworld-ws-reference-secure.png deleted file mode 100644 index bd2bba41db..0000000000 Binary files a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/helloworld-ws-reference-secure.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/helloworld-ws-reference-secure.svg b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/helloworld-ws-reference-secure.svg deleted file mode 100644 index 333ad53e0a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-secure/pom.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/pom.xml deleted file mode 100644 index cb6ce353c7..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.ws.security - wss4j - 1.5.3 - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - sample-helloworld-ws-service-secure - 1.3.2-SNAPSHOT - test - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/java/helloworld/ClientPWCBHandler.java b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/java/helloworld/ClientPWCBHandler.java deleted file mode 100644 index 0f1ebf46d6..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldClient.java b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldClient.java deleted file mode 100644 index a21619fc8a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index c0259c6e07..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldServiceComponent.java b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldServiceComponent.java deleted file mode 100644 index 27cef47677..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler b/branches/sca-java-1.3.2/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-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/definitions.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/definitions.xml deleted file mode 100644 index 0ab3a5a9f1..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/helloworldKeys.jks b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/helloworldKeys.jks deleted file mode 100644 index 0b4f2399f0..0000000000 Binary files a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/helloworldKeys.jks and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/helloworldwsclient.composite b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/helloworldwsclient.composite deleted file mode 100644 index 904befaf60..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/helloworldwsclient.composite +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/logging.properties b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/logging.properties deleted file mode 100644 index 3a4b43222d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index e6fcc6f4a6..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/test/java/helloworld/HelloWorldClientTestCase.java b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/test/java/helloworld/HelloWorldClientTestCase.java deleted file mode 100644 index 848c41d1c7..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference-secure/src/test/java/helloworld/HelloWorldTestServer.java b/branches/sca-java-1.3.2/samples/helloworld-ws-reference-secure/src/test/java/helloworld/HelloWorldTestServer.java deleted file mode 100644 index 21f2166560..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference/README b/branches/sca-java-1.3.2/samples/helloworld-ws-reference/README deleted file mode 100644 index 13c89ab2f6..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference/build.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-reference/build.xml deleted file mode 100644 index 71ee66b31e..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-reference/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-reference/helloworld-ws-reference.png b/branches/sca-java-1.3.2/samples/helloworld-ws-reference/helloworld-ws-reference.png deleted file mode 100644 index bd2bba41db..0000000000 Binary files a/branches/sca-java-1.3.2/samples/helloworld-ws-reference/helloworld-ws-reference.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-reference/helloworld-ws-reference.svg b/branches/sca-java-1.3.2/samples/helloworld-ws-reference/helloworld-ws-reference.svg deleted file mode 100644 index 354ffbae8f..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference/pom.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-reference/pom.xml deleted file mode 100644 index 907a5d340c..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-reference/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - sample-helloworld-ws-service - 1.3.2-SNAPSHOT - test - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldClient.java b/branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldClient.java deleted file mode 100644 index 4559b282fe..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index db0c947cf7..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldServiceComponent.java b/branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/main/java/helloworld/HelloWorldServiceComponent.java deleted file mode 100644 index 0dee19550b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference/src/main/resources/helloworldwsclient.composite b/branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/main/resources/helloworldwsclient.composite deleted file mode 100644 index 899ad5ce35..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/main/resources/helloworldwsclient.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/main/resources/logging.properties b/branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/main/resources/logging.properties deleted file mode 100644 index 3dca310cdb..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 662c9affac..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldClientTestCase.java b/branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldClientTestCase.java deleted file mode 100644 index 7ce89179c2..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldTestServer.java b/branches/sca-java-1.3.2/samples/helloworld-ws-reference/src/test/java/helloworld/HelloWorldTestServer.java deleted file mode 100644 index 8226ec884e..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo-webapp/README b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/README deleted file mode 100644 index aa4819927a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo-webapp/build.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/build.xml deleted file mode 100644 index 386008e707..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/build.xml +++ /dev/null @@ -1,99 +0,0 @@ - - -]> - - - &buildDependency; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/helloworld-ws-sdo-webapp.png b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/helloworld-ws-sdo-webapp.png deleted file mode 100644 index 2590f02a45..0000000000 Binary files a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/helloworld-ws-sdo-webapp.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/helloworld-ws-sdo-webapp.svg b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/helloworld-ws-sdo-webapp.svg deleted file mode 100644 index 56a29db23c..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo-webapp/pom.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/pom.xml deleted file mode 100644 index 575f224f18..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/pom.xml +++ /dev/null @@ -1,200 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sdo - tuscany-sdo-api-r2.1 - 1.1-incubating - - - 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-sdo - 1.3.2-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-incubating - - - 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.3.2-SNAPSHOT - - - - true - - - generate - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorld.java b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorld.java deleted file mode 100644 index eb82418516..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldComponent.java b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldComponent.java deleted file mode 100644 index fea4e2a16c..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 3d6576aca0..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/resources/helloworldws.composite b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/resources/helloworldws.composite deleted file mode 100644 index 34396b1b02..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/resources/helloworldws.composite +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index fe79094b94..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.xsd b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/resources/wsdl/helloworld.xsd deleted file mode 100644 index a0b7c37cd9..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/webapp/HelloWorld.jsp b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/webapp/HelloWorld.jsp deleted file mode 100644 index 4657c6cdc1..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index 6f241cc90c..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/geronimo-web.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/geronimo-web.xml deleted file mode 100644 index de2400f03d..0000000000 --- a/branches/sca-java-1.3.2/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.3.2-SNAPSHOT - war - - - - - org.apache.geronimo.configs - sharedlib - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 257e65aad4..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo/README b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/README deleted file mode 100644 index be947b1923..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo/build.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/build.xml deleted file mode 100644 index 401315d424..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/build.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/helloworld-ws-sdo.png b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/helloworld-ws-sdo.png deleted file mode 100644 index bd2bba41db..0000000000 Binary files a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/helloworld-ws-sdo.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/helloworld-ws-sdo.svg b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/helloworld-ws-sdo.svg deleted file mode 100644 index 333ad53e0a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo/pom.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/pom.xml deleted file mode 100644 index 4ef24f88c9..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/pom.xml +++ /dev/null @@ -1,139 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.2-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-sdo - 1.3.2-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.3.2-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-incubating - - - generate-helloworld-sdo - generate-sources - - ${basedir}/src/main/resources/wsdl/helloworld.wsdl - helloworld - Helloworld - true - true - true - - - generate - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldClient.java b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldClient.java deleted file mode 100644 index de4795ceaf..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index c950f7df04..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldServer.java b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldServer.java deleted file mode 100644 index e03ed4dc25..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 367c5b4a12..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldServiceComponent.java b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/java/helloworld/HelloWorldServiceComponent.java deleted file mode 100644 index 711eef63b5..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo/src/main/resources/helloworldws.composite b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/resources/helloworldws.composite deleted file mode 100644 index c255df2897..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/resources/helloworldws.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/resources/helloworldwsclient.composite b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/resources/helloworldwsclient.composite deleted file mode 100644 index d4fba548d5..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/resources/helloworldwsclient.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/resources/logging.properties b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/resources/logging.properties deleted file mode 100644 index 3dca310cdb..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 2ecc0bea43..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/test/java/helloworld/HelloWorldClientTestCase.java b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/test/java/helloworld/HelloWorldClientTestCase.java deleted file mode 100644 index 11564c370f..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-sdo/src/test/java/helloworld/HelloWorldTestServer.java b/branches/sca-java-1.3.2/samples/helloworld-ws-sdo/src/test/java/helloworld/HelloWorldTestServer.java deleted file mode 100644 index 4b0c40dafd..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-jms/README b/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/README deleted file mode 100644 index 26272b1d91..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-jms/build.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/build.xml deleted file mode 100644 index 330de7f7e5..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/helloworld-ws-service.png b/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/helloworld-ws-service.png deleted file mode 100644 index eab29d0bcd..0000000000 Binary files a/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/helloworld-ws-service.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/helloworld-ws-service.svg b/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/helloworld-ws-service.svg deleted file mode 100644 index 8d2ae98c82..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-jms/pom.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/pom.xml deleted file mode 100644 index f8b271d9e8..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/pom.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - compile - - - - org.apache.activemq - activemq-core - 4.1.1 - compile - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 4cdcc1fd0b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldServer.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldServer.java deleted file mode 100644 index 5454487ff6..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 4b019b21bf..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-jms/src/main/resources/definitions.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/resources/definitions.xml deleted file mode 100644 index 8c881ab0bb..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-jms/src/main/resources/helloworldwsjms.composite b/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/resources/helloworldwsjms.composite deleted file mode 100644 index 67079f738e..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/resources/helloworldwsjms.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/resources/helloworldwsjmspolicy.composite b/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/resources/helloworldwsjmspolicy.composite deleted file mode 100644 index 10faf374f3..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/resources/helloworldwsjmspolicy.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 3f9e00689e..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/test/java/helloworld/HelloWorldJmsPolicyServerTestCase.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/test/java/helloworld/HelloWorldJmsPolicyServerTestCase.java deleted file mode 100644 index 34f8605d5d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-jms/src/test/java/helloworld/HelloWorldJmsServerTestCase.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service-jms/src/test/java/helloworld/HelloWorldJmsServerTestCase.java deleted file mode 100644 index 03d566cc17..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-secure/README b/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/README deleted file mode 100644 index f32eb08b05..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-secure/build.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/build.xml deleted file mode 100644 index 29bbae0173..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/helloworld-ws-service-secure.png b/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/helloworld-ws-service-secure.png deleted file mode 100644 index 6f7d9dd450..0000000000 Binary files a/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/helloworld-ws-service-secure.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/helloworld-ws-service-secure.svg b/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/helloworld-ws-service-secure.svg deleted file mode 100644 index 53eb552923..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-secure/pom.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/pom.xml deleted file mode 100644 index 234e36f23c..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.ws.security - wss4j - 1.5.3 - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 4cdcc1fd0b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldServer.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldServer.java deleted file mode 100644 index 3d43290380..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 4b019b21bf..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-secure/src/main/java/helloworld/ServerPWCBHandler.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/java/helloworld/ServerPWCBHandler.java deleted file mode 100644 index ded02f09d6..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-secure/src/main/resources/definitions.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/resources/definitions.xml deleted file mode 100644 index 10fa7b8652..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-secure/src/main/resources/helloworldKeys.jks b/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/resources/helloworldKeys.jks deleted file mode 100644 index 0b4f2399f0..0000000000 Binary files a/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/resources/helloworldKeys.jks and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/resources/helloworldws.composite b/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/resources/helloworldws.composite deleted file mode 100644 index d1e18d7929..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/resources/helloworldws.composite +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 068229be6f..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/test/java/helloworld/HelloWorldServerTestCase.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service-secure/src/test/java/helloworld/HelloWorldServerTestCase.java deleted file mode 100644 index 4a14afcd9d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-webapp/README b/branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/README deleted file mode 100644 index 66040004f8..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-webapp/build.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/build.xml deleted file mode 100644 index 120cf72005..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/build.xml +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/pom.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/pom.xml deleted file mode 100644 index 8c4f84bf14..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - - stax - stax-api - 1.0.1 - provided - - - - - javax.servlet - servlet-api - 2.3 - provided - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 0de3c70303..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 268d90e910..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 0b95fbd14f..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/webapp/META-INF/sca-deployables/helloworldws.composite b/branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/webapp/META-INF/sca-deployables/helloworldws.composite deleted file mode 100644 index 114608e4d8..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/webapp/WEB-INF/geronimo-web.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/webapp/WEB-INF/geronimo-web.xml deleted file mode 100644 index c9f4381e22..0000000000 --- a/branches/sca-java-1.3.2/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.3.2-SNAPSHOT - war - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-service-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 3f3c92fa78..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service/README b/branches/sca-java-1.3.2/samples/helloworld-ws-service/README deleted file mode 100644 index 44dc7ab4e8..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service/build.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-service/build.xml deleted file mode 100644 index 46678febc3..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service/helloworld-ws-service.png b/branches/sca-java-1.3.2/samples/helloworld-ws-service/helloworld-ws-service.png deleted file mode 100644 index eab29d0bcd..0000000000 Binary files a/branches/sca-java-1.3.2/samples/helloworld-ws-service/helloworld-ws-service.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service/helloworld-ws-service.svg b/branches/sca-java-1.3.2/samples/helloworld-ws-service/helloworld-ws-service.svg deleted file mode 100644 index 61cd93ead9..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service/pom.xml b/branches/sca-java-1.3.2/samples/helloworld-ws-service/pom.xml deleted file mode 100644 index 1565cbe500..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 0de3c70303..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldServer.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldServer.java deleted file mode 100644 index c37bfcda65..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 7245513b2a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/helloworld-ws-service/src/main/resources/META-INF/sca-deployables/helloworldws.composite b/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/resources/META-INF/sca-deployables/helloworldws.composite deleted file mode 100644 index d767625ae7..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/resources/META-INF/sca-deployables/helloworldws.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 454763410c..0000000000 --- a/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldServerTestCase.java b/branches/sca-java-1.3.2/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldServerTestCase.java deleted file mode 100644 index 189332be91..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/implementation-composite/README b/branches/sca-java-1.3.2/samples/implementation-composite/README deleted file mode 100644 index 27de00e8ef..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-composite/README +++ /dev/null @@ -1,116 +0,0 @@ -Composite Implementation Sample -=============================== - -This sample shows how composites can be used to implement 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-implementation-composite.jar composite.CompositeClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-implementation-composite.jar composite.CompositeClient - - -Sample Overview ---------------- - -The sample is comprised of three composites. Take a look at the composite file -or the .svg/.png file which shows the composite file in pictorial form. The -OuterComposite defines three components two of which are implemented using -composites. The SourceComponent calls each TargetComponent in turn. There is a -callback which returns from each TargetComponent to the SourceComponent. - -implementation-composite/ - src/ - main/ - java/ - composite/ - Source.java - interface for the source component - SourceImpl.java - implementation for the source component - SourceCallback.java - source component callback interface - Target.java - interface for the target component - TargetImpl.java - implementation for the target component - CompositeClient.java - starts the SCA Runtime and - deploys the OuterComposite.composite. - This in turn pulls in the two inner - composites - resources/ - META-INF/ - sca-contribution.xml - specifies the composite to be deployed - OuterComposite.composite - the top level SCA assembly for this sample - InnerComposite.composite - included by OuterComposite.composite - InnerComposite2.composite - included by OuterComposite.composite - test/ - java/ - composite/ - CompositeTestCase.java - JUnit test case - implementation-composite.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 implementation-composite -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] Main thread Thread[main,5,main] - [java] Source: Client.main -> Source.clientMethod - [java] Source: Client.main => Source.clientMethod2 - [java] Sleeping ... - [java] Target: Client.main -> Source.clientMethod - [java] Work thread Thread[pool-1-thread-1,5,main] - [java] Result: Client.main -> Source.clientMethod -> Target.someMethod - [java] Target: Client.main => Source.clientMethod2 - [java] Work thread Thread[pool-1-thread-2,5,main] - [java] Result: Client.main => Source.clientMethod2 -> Target.someMethod - - -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 implementation-composite -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running composite.CompositeTestCase -Main thread Thread[main,5,main] -Source: Client.main -> Source.clientMethod -Source: Client.main => Source.clientMethod2 -Sleeping ... -Target: Client.main => Source.clientMethod2 -Work thread Thread[pool-1-thread-2,5,main] -Result: Client.main => Source.clientMethod2 -> Target.someMethod -Target: Client.main -> Source.clientMethod -Work thread Thread[pool-1-thread-1,5,main] -Result: Client.main -> Source.clientMethod -> Target.someMethod -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.973 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-java-1.3.2/samples/implementation-composite/build.xml b/branches/sca-java-1.3.2/samples/implementation-composite/build.xml deleted file mode 100644 index 7aa31aab8b..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-composite/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-composite/implementation-composite.png b/branches/sca-java-1.3.2/samples/implementation-composite/implementation-composite.png deleted file mode 100644 index 4c6d71bc03..0000000000 Binary files a/branches/sca-java-1.3.2/samples/implementation-composite/implementation-composite.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/implementation-composite/implementation-composite.svg b/branches/sca-java-1.3.2/samples/implementation-composite/implementation-composite.svg deleted file mode 100644 index 0e60354aab..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-composite/implementation-composite.svg +++ /dev/null @@ -1,658 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - OuterComposite - InnerComposite - - OuterComposite.composite - InnerComposite.composite - InnerComposite2.composite - SourceComponent - - TargetComponentRef TargetComponentRef2 - - TargetComponent - - TargetComponent2 - - - InnerSourceService - InnerSourceComponent - - - - - - TargetComponentRef TargetComponentRef2 - - promote promote - InnerTargetService - InnerTargetComponent - - TargetImpl Target - - Target - - SourceImpl - Source - SourceCallback - - - - - Target Source - InnerComposite2 promote promote - diff --git a/branches/sca-java-1.3.2/samples/implementation-composite/pom.xml b/branches/sca-java-1.3.2/samples/implementation-composite/pom.xml deleted file mode 100644 index b8b969e478..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-composite/pom.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../../pom.xml - - sample-implementation-composite - Apache Tuscany SCA Composite Sample - A sample showing local wiring of a component implemented by a nested composite - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/CompositeClient.java b/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/CompositeClient.java deleted file mode 100644 index bf743e1797..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/CompositeClient.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 composite; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Simple client program that invokes the components that we wired together. - */ -public class CompositeClient { - - public static void main(String[] args) throws Exception { - SCADomain scaDomain = SCADomain.newInstance(); - - Source source = scaDomain.getService(Source.class, "SourceComponent"); - - System.out.println("Main thread " + Thread.currentThread()); - source.clientMethod("Client.main"); - System.out.println("Sleeping ..."); - Thread.sleep(1000); - - scaDomain.close(); - } -} diff --git a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/Source.java b/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/Source.java deleted file mode 100644 index d0efcc1df1..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/Source.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 composite; - -public interface Source { - - void clientMethod(String arg); -} diff --git a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/SourceCallback.java b/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/SourceCallback.java deleted file mode 100644 index baa95a8e39..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/SourceCallback.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 composite; - -public interface SourceCallback { - - void receiveResult(String result); -} diff --git a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/SourceImpl.java b/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/SourceImpl.java deleted file mode 100644 index b9a0c7ff74..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/SourceImpl.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 composite; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - - -@Service(Source.class) -@Scope("COMPOSITE") -public class SourceImpl implements Source, SourceCallback { - - private Target targetReference; - private Target targetReference2; - - @Reference - public void setTargetReference(Target target) { - this.targetReference = target; - } - - @Reference - public void setTargetReference2(Target target) { - this.targetReference2 = target; - } - - public void clientMethod(String arg) { - System.out.println("Source: " + arg + " -> Source.clientMethod"); - targetReference.someMethod(arg + " -> Source.clientMethod"); - - System.out.println("Source: " + arg + " => Source.clientMethod2"); - targetReference2.someMethod(arg + " => Source.clientMethod2"); - } - - public void receiveResult(String result) { - System.out.println("Work thread " + Thread.currentThread()); - System.out.println("Result: " + result); - } -} diff --git a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/Target.java b/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/Target.java deleted file mode 100644 index 9a8f68a7fa..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/Target.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 composite; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.OneWay; - - -@Callback(SourceCallback.class) -public interface Target { - - @OneWay - void someMethod(String arg); -} diff --git a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/TargetImpl.java b/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/TargetImpl.java deleted file mode 100644 index 86686e9233..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/java/composite/TargetImpl.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 composite; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - - -@Service(Target.class) -@Scope("COMPOSITE") -public class TargetImpl implements Target { - - private SourceCallback sourceCallback; - - @Callback - public void setSourceCallback(SourceCallback sourceCallback) { - this.sourceCallback = sourceCallback; - } - - public void someMethod(String arg) { - System.out.println("Target: " + arg); - sourceCallback.receiveResult(arg + " -> Target.someMethod"); - } -} diff --git a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/resources/InnerComposite.composite b/branches/sca-java-1.3.2/samples/implementation-composite/src/main/resources/InnerComposite.composite deleted file mode 100644 index 3376ac8ff5..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/resources/InnerComposite.composite +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/resources/InnerComposite2.composite b/branches/sca-java-1.3.2/samples/implementation-composite/src/main/resources/InnerComposite2.composite deleted file mode 100644 index c9eff4fa9d..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/resources/InnerComposite2.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-1.3.2/samples/implementation-composite/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index e675fd3624..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/resources/OuterComposite.composite b/branches/sca-java-1.3.2/samples/implementation-composite/src/main/resources/OuterComposite.composite deleted file mode 100644 index cb1c1e13d4..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-composite/src/main/resources/OuterComposite.composite +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-composite/src/test/java/composite/CompositeTestCase.java b/branches/sca-java-1.3.2/samples/implementation-composite/src/test/java/composite/CompositeTestCase.java deleted file mode 100644 index 9e9a4b44a4..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-composite/src/test/java/composite/CompositeTestCase.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 composite; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class CompositeTestCase extends TestCase { - - private SCADomain scaDomain; - private Source source; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance(); - source = scaDomain.getService(Source.class, "SourceComponent"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void test() throws Exception { - try { - System.out.println("Main thread " + Thread.currentThread()); - source.clientMethod("Client.main"); - System.out.println("Sleeping ..."); - Thread.sleep(1000); - } catch (Throwable t) { - t.printStackTrace(); - } - } -} diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/README b/branches/sca-java-1.3.2/samples/implementation-crud-extension/README deleted file mode 100644 index 5e8190648f..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/README +++ /dev/null @@ -1,83 +0,0 @@ -Implementation CRUD Sample -========================== -This sample demonstrates how new implementation types are constructed for -Apache Tuscany SCA. - -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 want to try out the CRUD implementation type that this sample provides -please see the implementation-crud sample that provides the necessary client -code to bring up an application that uses this implementation extension. - -Sample Overview ---------------- -This sample contains a CRUD implementation type as an example of how to create -new implementation types. Components using this implementation type always -expose the same Create, Retrieve, Update and Delete interface. This sample -uses a singleton ResourceManager to perform the CRUD operations but of course -a real component would provide a real implementation. - -implementation-crud-extension/ - src/ - main/ - java/ - crud/ - implementation model interfaces - backend/ - fake component implementation - impl/ - implementations of the model interfaces - provider/ - runtime implementation - resources/ - META-INF/ - services/ - declares the extension - test/ - java/ - crud/ - CRUDTestCase.java - JUnit test case - resources/ - crud.composite - the SCA assembly used during unit testing - - build.xml - the Ant build file - pom.xml - the Maven build file - -Building The Sample Extension Using Ant ------------------------------------------ -With the binary distribution the sample extension can be built using Ant as -follows - -cd implementation-crud-extension -ant compile - -See the implementation-crud sample to run a sample that uses this -implementation extension. - -Building The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built -using Maven as follows. - -cd implementation-crud-extension -mvn - -Maven will also test that the sample extension built properly. You should see -the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running crud.CRUDTestCase -Starting CRUDServiceComponent -create(ABC) in tmp -retrieve(0) -update(0) -retrieve(0) -delete(0) -retrieve(0) -Stopping CRUDServiceComponent -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.212 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-java-1.3.2/samples/implementation-crud-extension/build.xml b/branches/sca-java-1.3.2/samples/implementation-crud-extension/build.xml deleted file mode 100644 index 88d308e6fc..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/build.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/pom.xml b/branches/sca-java-1.3.2/samples/implementation-crud-extension/pom.xml deleted file mode 100644 index 1f05d5e5db..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../../pom.xml - - sample-implementation-crud-extension - Apache Tuscany SCA CRUD Implementation Extension Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-assembly - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-interface-java-xml - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-core-spi - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - test - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/CRUD.java b/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/CRUD.java deleted file mode 100644 index b23d85887b..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/CRUD.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 crud; - -/** - * The service interface of the single CRUD service provided by CRUD components. - */ -public interface CRUD { - - /** - * Create a new resource. - * @param resource - * @return - */ - String create(Object resource); - - /** - * Retrieve a resource. - * @param id - * @return - */ - Object retrieve(String id); - - /** - * Update a resource. - * @param id - * @param resource - * @return - */ - Object update(String id, Object resource); - - /** - * Delete a resource. - * @param id - */ - void delete(String id); - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/CRUDImplementation.java b/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/CRUDImplementation.java deleted file mode 100644 index 49be844f93..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/CRUDImplementation.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 crud; - -import org.apache.tuscany.sca.assembly.Implementation; - -/** - * The model representing a sample CRUD implementation in an SCA assembly model. - * - * The sample CRUD implementation is not a full blown implementation, it only - * supports a subset of what a component implementation can support: - * - a single fixed service (as opposed to a list of services typed by different interfaces - * - a directory attribute used to specify where a CRUD component is going to persist - * resources - * - no references or properties - * - no policy intents or policy sets - */ -public interface CRUDImplementation extends Implementation { - - /** - * Returns the directory used by CRUD implementations to persist resources. - * - * @return the directory used to persist resources - */ - public String getDirectory(); - - /** - * Sets the directory used by CRUD implementations to persist resources. - * - * @param directory the directory used to persist resources - */ - public void setDirectory(String directory); - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/CRUDImplementationFactory.java b/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/CRUDImplementationFactory.java deleted file mode 100644 index fa83c63c1b..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/CRUDImplementationFactory.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 crud; - -import crud.CRUDImplementation; - - -/** - * A factory for the sample CRUD implementation model. - */ -public interface CRUDImplementationFactory { - - /** - * Creates a new CRUD implementation. - * - * @return - */ - CRUDImplementation createCRUDImplementation(); - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/backend/ResourceManager.java b/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/backend/ResourceManager.java deleted file mode 100644 index cc0795a735..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/backend/ResourceManager.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 crud.backend; - -import java.util.HashMap; -import java.util.Map; - -/** - * A fake resource manager implementation used as a backend by the sample - * CRUD component implementation. - */ -public class ResourceManager { - private static int counter; - private static final Map store = new HashMap(); - private String directory; - - /** - * Constructs a new resource manager. - * - * @param directory the directory where to persist resources - */ - public ResourceManager(String directory) { - super(); - this.directory = directory; - } - - /** - * Creates a new resource. - * - * @param resource - * @return - */ - public String createResource(Object resource) { - System.out.println("create(" + resource + ") in " + directory); - String key = String.valueOf(counter++); - store.put(key, resource); - return key; - } - - /** - * Deletes a resource. - * - * @param id - */ - public void deleteResource(String id) { - System.out.println("delete(" + id + ")"); - store.remove(id); - } - - /** - * Retrieves a resource. - * - * @param id - * @return - */ - public Object retrieveResource(String id) { - System.out.println("retrieve(" + id + ")"); - return store.get(id); - } - - /** - * Updates a resource. - * - * @param id - * @param resource - * @return - */ - public Object updateResource(String id, Object resource) { - System.out.println("update(" + id + ")"); - return store.put(id, resource); - } - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/impl/CRUDImplementationFactoryImpl.java b/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/impl/CRUDImplementationFactoryImpl.java deleted file mode 100644 index 2f1e5fcba8..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/impl/CRUDImplementationFactoryImpl.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 crud.impl; - -import org.apache.tuscany.sca.assembly.AssemblyFactory; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; - -import crud.CRUDImplementation; -import crud.CRUDImplementationFactory; - - -/** - * A factory for the CRUD implementation model. - */ -public class CRUDImplementationFactoryImpl implements CRUDImplementationFactory { - - private AssemblyFactory assemblyFactory; - private JavaInterfaceFactory javaFactory; - - public CRUDImplementationFactoryImpl(ModelFactoryExtensionPoint modelFactories) { - this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class); - this.javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class); - } - - public CRUDImplementation createCRUDImplementation() { - return new CRUDImplementationImpl(assemblyFactory, javaFactory); - } - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/impl/CRUDImplementationImpl.java b/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/impl/CRUDImplementationImpl.java deleted file mode 100644 index 383a035e69..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/impl/CRUDImplementationImpl.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 crud.impl; - -import java.util.Collections; -import java.util.List; - -import org.apache.tuscany.sca.assembly.AssemblyFactory; -import org.apache.tuscany.sca.assembly.ConstrainingType; -import org.apache.tuscany.sca.assembly.Property; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; -import org.apache.tuscany.sca.interfacedef.java.JavaInterface; -import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract; -import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; - -import crud.CRUD; -import crud.CRUDImplementation; - - -/** - * The model representing a sample CRUD implementation in an SCA assembly model. - */ -class CRUDImplementationImpl implements CRUDImplementation { - - private Service crudService; - private String directory; - - /** - * Constructs a new CRUD implementation. - */ - CRUDImplementationImpl(AssemblyFactory assemblyFactory, - JavaInterfaceFactory javaFactory) { - - // CRUD implementation always provide a single service exposing - // the CRUD interface, and have no references and properties - crudService = assemblyFactory.createService(); - crudService.setName("CRUD"); - JavaInterface javaInterface; - try { - javaInterface = javaFactory.createJavaInterface(CRUD.class); - } catch (InvalidInterfaceException e) { - throw new IllegalArgumentException(e); - } - JavaInterfaceContract interfaceContract = javaFactory.createJavaInterfaceContract(); - interfaceContract.setInterface(javaInterface); - crudService.setInterfaceContract(interfaceContract); - } - - public String getDirectory() { - return directory; - } - - public void setDirectory(String directory) { - this.directory = directory; - } - - public ConstrainingType getConstrainingType() { - // The sample CRUD implementation does not support constrainingTypes - return null; - } - - public List getProperties() { - // The sample CRUD implementation does not support properties - return Collections.emptyList(); - } - - public List getServices() { - // The sample CRUD implementation provides a single fixed CRUD service - return Collections.singletonList(crudService); - } - - public List getReferences() { - // The sample CRUD implementation does not support properties - return Collections.emptyList(); - } - - public String getURI() { - // The sample CRUD implementation does not have a URI - return null; - } - - public void setConstrainingType(ConstrainingType constrainingType) { - // The sample CRUD implementation does not support constrainingTypes - } - - public void setURI(String uri) { - // The sample CRUD implementation does not have a URI - } - - public boolean isUnresolved() { - // The sample CRUD implementation is always resolved - return false; - } - - public void setUnresolved(boolean unresolved) { - // The sample CRUD implementation is always resolved - } - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationInvoker.java b/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationInvoker.java deleted file mode 100644 index b212ee3c9b..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationInvoker.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 crud.provider; - -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.invocation.Message; - -import crud.backend.ResourceManager; - - -/** - * Implements an invoker for CRUD component implementations. - * - * The invoker is responsible for handling invocations of a business operation. - * Input business data is passed to the invoke method in a Message object. - * The invoke method is responsible for handling the invocation and returning a Message with - * the output business data. - * - * In this example we are simply delegating the CRUD operation invocations to the - * corresponding methods on our fake resource manager class. - * - * More sophisticated invokers can delegate the invocation to an implementation artifact directly - * (for example a Java class using reflection as in the implementation-pojo sample) or call a runtime - * engine like a BPEL engine or an XQuery engine for example (this is what the Tuscany - * implementation-bpel and implementation-xquery extensions do). - */ -class CRUDImplementationInvoker implements Invoker { - private Operation operation; - private ResourceManager resourceManager; - - CRUDImplementationInvoker(Operation operation, ResourceManager resourceManager) { - this.operation = operation; - this.resourceManager = resourceManager; - } - - public Message invoke(Message msg) { - try { - Object[] args = msg.getBody(); - Object resp = null; - - if (operation.getName().equals("create")) { - resp = resourceManager.createResource(args[0]); - - } else if (operation.getName().equals("retrieve")) { - resp = resourceManager.retrieveResource((String)args[0]); - - } else if (operation.getName().equals("update")) { - resp = resourceManager.updateResource((String)args[0], args[1]); - - } else if (operation.getName().equals("delete")) { - resourceManager.deleteResource((String)args[0]); - } - - msg.setBody(resp); - } catch (Exception e) { - msg.setFaultBody(e.getCause()); - } - return msg; - } - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationProvider.java b/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationProvider.java deleted file mode 100644 index 8f11f9d910..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationProvider.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 crud.provider; - -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.provider.ImplementationProvider; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentService; - -import crud.CRUDImplementation; -import crud.backend.ResourceManager; - - -/** - * An implementation provider for sample CRUD implementations. - * - * The implementation provider is responsible for handling the lifecycle of a component - * implementation and creating operation invokers for the service operations provided - * by the implementation. - * - * The start() and stop() methods are called when a component is started - * and stopped. - * - * The createInvoker method is called for each operation provided by the component - * implementation. The implementation provider can create an invoker and initialize it - * at that time to minimize the amount of work to be performed on each invocation. - */ -class CRUDImplementationProvider implements ImplementationProvider { - - private RuntimeComponent component; - private CRUDImplementation implementation; - - /** - * Constructs a new CRUD implementation. - */ - CRUDImplementationProvider(RuntimeComponent component, CRUDImplementation implementation) { - this.component = component; - this.implementation = implementation; - } - - public Invoker createInvoker(RuntimeComponentService service, Operation operation) { - CRUDImplementationInvoker invoker = new CRUDImplementationInvoker(operation, new ResourceManager(implementation.getDirectory())); - return invoker; - } - - public boolean supportsOneWayInvocation() { - return false; - } - - public void start() { - System.out.println("Starting " + component.getName()); - } - - public void stop() { - System.out.println("Stopping " + component.getName()); - } - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationProviderFactory.java b/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationProviderFactory.java deleted file mode 100644 index 4566cb7155..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/java/crud/provider/CRUDImplementationProviderFactory.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 crud.provider; - -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.provider.ImplementationProvider; -import org.apache.tuscany.sca.provider.ImplementationProviderFactory; -import org.apache.tuscany.sca.runtime.RuntimeComponent; - -import crud.CRUDImplementation; -import crud.provider.CRUDImplementationProvider; - - -/** - * A factory for CRUD implementation providers. - * - * The factory is called to create an implementation provider for each component using - * the CRUD implementation. - */ -public class CRUDImplementationProviderFactory implements ImplementationProviderFactory { - - /** - * Constructs a new CRUD implementation. - */ - public CRUDImplementationProviderFactory(ExtensionPointRegistry extensionPoints) { - } - - public ImplementationProvider createImplementationProvider(RuntimeComponent component, CRUDImplementation implementation) { - return new CRUDImplementationProvider(component, implementation); - } - - public Class getModelType() { - return CRUDImplementation.class; - } -} diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/META-INF/services/crud.CRUDImplementationFactory b/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/META-INF/services/crud.CRUDImplementationFactory deleted file mode 100644 index 3cf5de5fa1..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/META-INF/services/crud.CRUDImplementationFactory +++ /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 implementation model factory -crud.impl.CRUDImplementationFactoryImpl diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor deleted file mode 100644 index 17c98cf706..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/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 -org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://crud#implementation.crud,model=crud.CRUDImplementation,factory=crud.CRUDImplementationFactory diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema b/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema deleted file mode 100644 index 527c626418..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema +++ /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. - -# URI of the XML schema to be used for validation -sample-implementation-crud.xsd diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory b/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory deleted file mode 100644 index 6ce605197a..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory +++ /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 implementation extension -crud.provider.CRUDImplementationProviderFactory;model=crud.CRUDImplementation diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/sample-implementation-crud.xsd b/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/sample-implementation-crud.xsd deleted file mode 100644 index 447e31bf93..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/main/resources/sample-implementation-crud.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/test/java/crud/CRUDTestCase.java b/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/test/java/crud/CRUDTestCase.java deleted file mode 100644 index 0bb5cfc361..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/test/java/crud/CRUDTestCase.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 crud; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import crud.CRUD; - -/** - * Tests the CRUD implementation extension. - */ -public class CRUDTestCase extends TestCase { - - private SCADomain scaDomain; - private CRUD crudService; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("crud.composite"); - crudService = scaDomain.getService(CRUD.class, "CRUDServiceComponent"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testCRUD() throws Exception { - String id = crudService.create("ABC"); - Object result = crudService.retrieve(id); - assertEquals("ABC", result); - - crudService.update(id, "EFG"); - result = crudService.retrieve(id); - assertEquals("EFG", result); - - crudService.delete(id); - result = crudService.retrieve(id); - assertNull(result); - } -} diff --git a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/test/resources/crud.composite b/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/test/resources/crud.composite deleted file mode 100644 index 18745033bb..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud-extension/src/test/resources/crud.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-crud/README b/branches/sca-java-1.3.2/samples/implementation-crud/README deleted file mode 100644 index 50da631c04..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud/README +++ /dev/null @@ -1,113 +0,0 @@ -Implementation CRUD Sample Client -================================= -This sample demonstrates how to use the new implementation extension, -implementation-crud-extension. - -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;..\implementation-crud-extension\target\sample-implementation-crud-extension.jar;target\sample-implementation-crud.jar crud.client.CRUDClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:../implementation-crud-extension/target/sample-implementation-crud-extension.jar:target/sample-implementation-crud.jar crud.client.CRUDClient - -This looks like a long command. The three things we add to the classpath are - -tuscany-sca-manifest.jar - all of the standard Tuscany SCA - runtime and extension classes -sample-implementation-crud-extension.jar - the new crud implementation - extension -sample-implementation-crud.jar - the application that uses the crud - implementation - -Sample Overview ---------------- -This sample contains a client application for a CRUD implementation type that -shows how to create new implementation types. See the README for the -mplementation-crud-extension sample for details of this implementation type. - -implementation-crud/ - src/ - main/ - java/ - crud/ - client/ - CRUDClient.java - sample client - resources/ - crud.composite - the SCA assembly used by this sample - - test/ - java/ - crud/ - client/ - CRUDTestCase.java - sample JUnit test case for the sample client - - implementation-crud.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 implementation-crud -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] Starting CRUDServiceComponent - [java] create(ABC) in tmp - [java] retrieve(0) - [java] Result from create: ABC - [java] update(0) - [java] retrieve(0) - [java] Result from update: EFG - [java] delete(0) - [java] retrieve(0) - [java] Result from delete: null - [java] Stopping CRUDServiceComponent - - -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 implementation-crud -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running crud.client.CRUDTestCase -Starting CRUDServiceComponent -create(ABC) in tmp -retrieve(0) -update(0) -retrieve(0) -delete(0) -retrieve(0) -Stopping CRUDServiceComponent -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.641 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-java-1.3.2/samples/implementation-crud/build.xml b/branches/sca-java-1.3.2/samples/implementation-crud/build.xml deleted file mode 100644 index 10b26b5a94..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud/build.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-crud/implementation-crud.png b/branches/sca-java-1.3.2/samples/implementation-crud/implementation-crud.png deleted file mode 100644 index a292037e7a..0000000000 Binary files a/branches/sca-java-1.3.2/samples/implementation-crud/implementation-crud.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/implementation-crud/implementation-crud.svg b/branches/sca-java-1.3.2/samples/implementation-crud/implementation-crud.svg deleted file mode 100644 index dbb37be208..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud/implementation-crud.svg +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - crud - - CRUDServiceComponent - CRUD - diff --git a/branches/sca-java-1.3.2/samples/implementation-crud/pom.xml b/branches/sca-java-1.3.2/samples/implementation-crud/pom.xml deleted file mode 100644 index c2212501a2..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../../pom.xml - - sample-implementation-crud - Apache Tuscany SCA CRUD Implementation Extension Sample Client - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - sample-implementation-crud-extension - 1.3.2-SNAPSHOT - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-crud/src/main/java/crud/client/CRUDClient.java b/branches/sca-java-1.3.2/samples/implementation-crud/src/main/java/crud/client/CRUDClient.java deleted file mode 100644 index ea87cb3001..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud/src/main/java/crud/client/CRUDClient.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 crud.client; - - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import crud.CRUD; - -/** - * A sample client that shows how to create an SCA domain, get a service, and - * invoke service methods of a CRUD component. - * - * The CRUD component uses an implementation extension - * from module implementation-crud-extension. - * - * @version $Rev$ $Date$ - */ -public class CRUDClient { - - public static void main(String[] args) throws Exception { - - SCADomain scaDomain = SCADomain.newInstance("crud.composite"); - CRUD crudService = scaDomain.getService(CRUD.class, "CRUDServiceComponent"); - - String id = crudService.create("ABC"); - - Object result = crudService.retrieve(id); - System.out.println("Result from create: " + result); - - crudService.update(id, "EFG"); - result = crudService.retrieve(id); - System.out.println("Result from update: " + result); - - crudService.delete(id); - result = crudService.retrieve(id); - System.out.println("Result from delete: " + result); - - scaDomain.close(); - } - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-crud/src/main/resources/crud.composite b/branches/sca-java-1.3.2/samples/implementation-crud/src/main/resources/crud.composite deleted file mode 100644 index 18745033bb..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud/src/main/resources/crud.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-crud/src/test/java/crud/client/CRUDTestCase.java b/branches/sca-java-1.3.2/samples/implementation-crud/src/test/java/crud/client/CRUDTestCase.java deleted file mode 100644 index 7e0476a8b1..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-crud/src/test/java/crud/client/CRUDTestCase.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 crud.client; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import crud.CRUD; - - -/** - * Tests the sample crud composite. - */ -public class CRUDTestCase extends TestCase { - - private SCADomain scaDomain; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("crud.composite"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void test() throws Exception { - CRUD crudService = scaDomain.getService(CRUD.class, "CRUDServiceComponent"); - - String id = crudService.create("ABC"); - Object result = crudService.retrieve(id); - assertEquals(result, "ABC"); - - crudService.update(id, "EFG"); - result = crudService.retrieve(id); - assertEquals(result, "EFG"); - - crudService.delete(id); - result = crudService.retrieve(id); - assertNull(result); - } -} diff --git a/branches/sca-java-1.3.2/samples/implementation-notification/README b/branches/sca-java-1.3.2/samples/implementation-notification/README deleted file mode 100644 index 5b59358080..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-notification/README +++ /dev/null @@ -1,93 +0,0 @@ -Notification Implementation Sample -=============================== - -This sample illustrates the use of - -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-implementation-notification.jar notification.TrafficAdvisoryClient - -OR you can also use Maven to test: - -mvn test - -Sample Overview ---------------- - -This sample consists of a single composite that contains a notification component, -a producer component and two consumer components. Take a look at the composite file -or the .svg file which shows the composite file in pictorial form. The notification -component has an that refers to the component type -that defines the TrafficAdvisory java interface. This interface indicates the -makeup of the messages being sent and received and is also implemented by the -consumer components. - -Sample directory structure: - -implementation-notification/ - src/ - main/ - java/ - notification/ - TestCaseProducer.java - interface for the producer component - TrafficAdvisory.java - interface for the notification and consumer components - TrafficAdvisoryConsumer.java - implementation for the consumer components - TrafficAdvisoryProducer.java - implementation for the producer component - test/ - java/ - notification/ - TrafficAdvisoryTestCase.java - JUnit test case - resources/ - TrafficAdvisoryNotification.componentType - the component type referred to by - - TrafficAdvisoryNotification.composite - the main composite including producer, - notification component, and consumers - 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 implementation-notification -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] Consumer [Consumer1] received report: Nothing to report today - [java] Consumer [Consumer2] received report: Nothing to report today - -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 implementation-notification -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running notification.TrafficAdvisoryTestCase -Consumer [Consumer1] received report: Nothing to report today -Consumer [Consumer2] received report: Nothing to report today -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.742 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-java-1.3.2/samples/implementation-notification/build.xml b/branches/sca-java-1.3.2/samples/implementation-notification/build.xml deleted file mode 100644 index 110c7b84c1..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-notification/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-notification/implementation-notification.png b/branches/sca-java-1.3.2/samples/implementation-notification/implementation-notification.png deleted file mode 100644 index 0b7ee34bf7..0000000000 Binary files a/branches/sca-java-1.3.2/samples/implementation-notification/implementation-notification.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/implementation-notification/pom.xml b/branches/sca-java-1.3.2/samples/implementation-notification/pom.xml deleted file mode 100644 index 1c6f8db8ab..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-notification/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../../pom.xml - - sample-implementation-notification - Apache Tuscany SCA Notification Implementation Sample - 1.3.2-SNAPSHOT - A sample illustrating use of implementation.notification - - - - org.apache.tuscany.sca - tuscany-implementation-notification - 1.3.2-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - test - - - - - - junit - junit - 4.2 - test - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - - - - install - - diff --git a/branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TestCaseProducer.java b/branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TestCaseProducer.java deleted file mode 100644 index bf8c72e0ce..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TestCaseProducer.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 notification; - -public interface TestCaseProducer { - - public void produceTrafficNotification(String report); -} diff --git a/branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TrafficAdvisory.java b/branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TrafficAdvisory.java deleted file mode 100644 index 7bbfda2122..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TrafficAdvisory.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 notification; - -public interface TrafficAdvisory { - - void trafficNotification(String report); -} diff --git a/branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TrafficAdvisoryClient.java b/branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TrafficAdvisoryClient.java deleted file mode 100644 index da32bab58d..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TrafficAdvisoryClient.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 notification; - -import notification.TestCaseProducer; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class TrafficAdvisoryClient { - - public static void main(String[] args) throws Exception { - try { - SCADomain domain = SCADomain.newInstance("TrafficAdvisoryNotification.composite"); - TestCaseProducer testCaseProducer = domain.getService(TestCaseProducer.class, "TrafficAdvisoryProducer"); - - testCaseProducer.produceTrafficNotification("Nothing to report today"); - - domain.close(); - } catch(Throwable e) { - e.printStackTrace(); - if (e instanceof Exception) { - throw (Exception)e; - } - else { - throw new Exception(e); - } - } - } -} diff --git a/branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TrafficAdvisoryConsumer.java b/branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TrafficAdvisoryConsumer.java deleted file mode 100644 index 2aaae596be..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TrafficAdvisoryConsumer.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 notification; - -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -/** - * @version $Rev$ $Date$ - */ -@Service(TrafficAdvisory.class) -@Scope("COMPOSITE") -public class TrafficAdvisoryConsumer implements TrafficAdvisory { - - @Property - protected String name; - - public void trafficNotification(String report) { - - System.out.println("Consumer [" + name + "] received report: " + report); - } -} diff --git a/branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TrafficAdvisoryProducer.java b/branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TrafficAdvisoryProducer.java deleted file mode 100644 index a0bb02e846..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-notification/src/main/java/notification/TrafficAdvisoryProducer.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 notification; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -@Service(TestCaseProducer.class) -@Scope("COMPOSITE") -public class TrafficAdvisoryProducer implements TestCaseProducer { - - @Reference - protected TrafficAdvisory destination; - - public void produceTrafficNotification(String report) { - - destination.trafficNotification(report); - } -} diff --git a/branches/sca-java-1.3.2/samples/implementation-notification/src/main/resources/TrafficAdvisoryNotification.componentType b/branches/sca-java-1.3.2/samples/implementation-notification/src/main/resources/TrafficAdvisoryNotification.componentType deleted file mode 100644 index 873e200613..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-notification/src/main/resources/TrafficAdvisoryNotification.componentType +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-notification/src/main/resources/TrafficAdvisoryNotification.composite b/branches/sca-java-1.3.2/samples/implementation-notification/src/main/resources/TrafficAdvisoryNotification.composite deleted file mode 100644 index bbf2281352..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-notification/src/main/resources/TrafficAdvisoryNotification.composite +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - Consumer1 - - - - - Consumer2 - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-notification/src/test/java/notification/TrafficAdvisoryTestCase.java b/branches/sca-java-1.3.2/samples/implementation-notification/src/test/java/notification/TrafficAdvisoryTestCase.java deleted file mode 100644 index 719141c94b..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-notification/src/test/java/notification/TrafficAdvisoryTestCase.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 notification; - -import junit.framework.TestCase; - -import notification.TestCaseProducer; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class TrafficAdvisoryTestCase extends TestCase { - - private SCADomain domain; - private TestCaseProducer testCaseProducer; - - public void testTrafficAdvisoryNotification() throws Exception { - try { - testCaseProducer.produceTrafficNotification("Nothing to report today"); - } catch(Throwable e) { - e.printStackTrace(); - } - } - - @Override - protected void setUp() throws Exception { - try { - domain = SCADomain.newInstance("TrafficAdvisoryNotification.composite"); - testCaseProducer = domain.getService(TestCaseProducer.class, "TrafficAdvisoryProducer"); - } catch(Throwable e) { - e.printStackTrace(); - if (e instanceof Exception) { - throw (Exception)e; - } - else { - throw new Exception(e); - } - } - } - - @Override - protected void tearDown() throws Exception { - domain.close(); - } -} diff --git a/branches/sca-java-1.3.2/samples/implementation-notification/src/test/resources/TrafficAdvisoryNotification.componentType b/branches/sca-java-1.3.2/samples/implementation-notification/src/test/resources/TrafficAdvisoryNotification.componentType deleted file mode 100644 index 873e200613..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-notification/src/test/resources/TrafficAdvisoryNotification.componentType +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-notification/src/test/resources/TrafficAdvisoryNotification.composite b/branches/sca-java-1.3.2/samples/implementation-notification/src/test/resources/TrafficAdvisoryNotification.composite deleted file mode 100644 index bbf2281352..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-notification/src/test/resources/TrafficAdvisoryNotification.composite +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - Consumer1 - - - - - Consumer2 - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/README b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/README deleted file mode 100644 index 3b201779e1..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/README +++ /dev/null @@ -1,70 +0,0 @@ -Implementation POJO Sample -========================== -This sample demonstrates how new implementation types are constructed for -Apache Tuscany SCA. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -Sample Overview ---------------- -This sample contains a POJO implementation type as an example of how to create -new implementation types. - -implementation-pojo-extension/ - src/ - main/ - java/ - pojo/ - implementation model interfaces - impl/ - implementations of the model interfaces - provider/ - runtime implementation - resources/ - META-INF/ - services/ - declares the extension - test/ - java/ - helloworld/ - HelloWorldTestCase.java - JUnit test case - resources/ - helloworld.composite - the SCA assembly used during unit testing - - build.xml - the Ant build file - pom.xml - the Maven build file - -Building The Sample Extension Using Ant ------------------------------------------ -With the binary distribution the sample extension can be built using Ant as -follows - -cd implementation-pojo-extension -ant compile - -Building The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built -using Maven as follows. - -cd implementation-pojo-extension -mvn - -Maven will also test that the sample extension built properly. You should see -the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running helloworld.HelloWorldTestCase -Initializing POJO -Initializing POJO -Executing POJO sayHello -Initializing POJO -Initializing POJO -Executing POJO sayHello -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.616 sec - -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-java-1.3.2/samples/implementation-pojo-extension/build.xml b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/build.xml deleted file mode 100644 index 78bae79859..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/build.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/pom.xml b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/pom.xml deleted file mode 100644 index 48775f67e9..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../../pom.xml - - sample-implementation-pojo-extension - Apache Tuscany SCA POJO Implementation Extension Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-assembly-xml - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-interface-java-xml - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-core-spi - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - test - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/POJOImplementation.java b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/POJOImplementation.java deleted file mode 100644 index 7c2f5d236f..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/POJOImplementation.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 pojo; - -import java.lang.reflect.Method; -import java.util.Map; - -import org.apache.tuscany.sca.assembly.Implementation; - - -/** - * Represents a POJO implementation in an SCA assembly. - * - * @version $Rev$ $Date$ - */ -public interface POJOImplementation extends Implementation { - - /** - * Returns the POJO class name - * @return - */ - public String getPOJOName(); - - /** - * Sets the POJO class name - * @param pojoName - */ - public void setPOJOName(String pojoName); - - /** - * Returns the POJO class. - * @return - */ - public Class getPOJOClass(); - - /** - * Sets the POJO class. - * @param pojoClass - */ - public void setPOJOClass(Class pojoClass); - - /** - * Returns the POJO's methods. - * @return - */ - public Map getMethods(); - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/POJOImplementationFactory.java b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/POJOImplementationFactory.java deleted file mode 100644 index bbcfb3d0dc..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/POJOImplementationFactory.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 pojo; - - -/** - * Factory for the POJO implementation model. - * - * @version $Rev$ $Date$ - */ -public interface POJOImplementationFactory { - - /** - * Creates a new POJO implementation model object. - * @return a new POJO implementation model object - */ - POJOImplementation createPOJOImplementation(); - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationFactoryImpl.java b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationFactoryImpl.java deleted file mode 100644 index 0dad270a6c..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationFactoryImpl.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 pojo.impl; - -import pojo.POJOImplementation; -import pojo.POJOImplementationFactory; - -/** - * A factory for the POJO implementation model. - * - * @version $Rev$ $Date$ - */ -public class POJOImplementationFactoryImpl implements POJOImplementationFactory { - - public POJOImplementation createPOJOImplementation() { - return new POJOImplementationImpl(); - } - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationImpl.java b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationImpl.java deleted file mode 100644 index f2d6871039..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationImpl.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package pojo.impl; - -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.apache.tuscany.sca.assembly.ConstrainingType; -import org.apache.tuscany.sca.assembly.Property; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.assembly.Service; - -import pojo.POJOImplementation; - - -/** - * Represents a POJO implementation in an SCA assembly. - * - * @version $Rev$ $Date$ - */ -class POJOImplementationImpl implements POJOImplementation { - - private String pojoName; - private Class pojoClass; - private String uri; - private Map methods; - private List services = new ArrayList(); - private List references = new ArrayList(); - private List properties = new ArrayList(); - private boolean unresolved; - - POJOImplementationImpl() { - } - - /** - * Returns the POJO class name - * @return - */ - public String getPOJOName() { - return pojoName; - } - - /** - * Sets the POJO class name - * @param pojoName - */ - public void setPOJOName(String pojoName) { - this.pojoName = pojoName; - setURI(pojoName.replace('.', '/')); - } - - /** - * Returns the POJO class. - * @return - */ - public Class getPOJOClass() { - return pojoClass; - } - - /** - * Sets the POJO class. - * @param pojoClass - */ - public void setPOJOClass(Class pojoClass) { - this.pojoClass = pojoClass; - setPOJOName(pojoClass.getName()); - - // Index the POJO's methods - methods = new HashMap(); - Method[] m = pojoClass.getMethods(); - for (int i = 0; i < m.length; i++) { - methods.put(m[i].getName(), m[i]); - } - } - - /** - * Returns the POJO's methods. - * @return - */ - public Map getMethods() { - return methods; - } - - public ConstrainingType getConstrainingType() { - // The sample POJO implementation does not support constrainingTypes - return null; - } - - public List getProperties() { - return properties; - } - - public List getServices() { - return services; - } - - public List getReferences() { - return references; - } - - public String getURI() { - return uri; - } - - public void setConstrainingType(ConstrainingType constrainingType) { - // The sample POJO implementation does not support constrainingTypes - } - - public void setURI(String uri) { - this.uri = uri; - } - - public boolean isUnresolved() { - return unresolved; - } - - public void setUnresolved(boolean unresolved) { - this.unresolved = unresolved; - } - - @Override - public int hashCode() { - return uri.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof POJOImplementationImpl) { - return ((POJOImplementationImpl)obj).getURI().equals(uri); - } else { - return false; - } - } - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationProcessor.java b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationProcessor.java deleted file mode 100644 index 44a2cc0aa8..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationProcessor.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package pojo.impl; - -import static javax.xml.stream.XMLStreamConstants.END_ELEMENT; - -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.assembly.AssemblyFactory; -import org.apache.tuscany.sca.assembly.ComponentType; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.assembly.xml.PolicyAttachPointProcessor; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.resolver.ClassReference; -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; -import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; -import org.apache.tuscany.sca.interfacedef.java.JavaInterface; -import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract; -import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.policy.PolicyFactory; - -import pojo.POJOImplementation; -import pojo.POJOImplementationFactory; - -/** - * Implements a STAX based artifact processor for POJO implementations. - * - * The artifact processor is responsible for processing - * elements in SCA assembly XML composite files and populating the POJO - * implementation model, resolving its references to other artifacts in the SCA - * contribution, and optionally write the model back to SCA assembly XML. - */ -public class POJOImplementationProcessor implements StAXArtifactProcessor { - private static final QName IMPLEMENTATION_POJO = new QName("http://pojo", "implementation.pojo"); - - private AssemblyFactory assemblyFactory; - private JavaInterfaceFactory javaFactory; - private POJOImplementationFactory pojoImplementationFactory; - private PolicyFactory policyFactory; - private PolicyAttachPointProcessor policyProcessor; - - public POJOImplementationProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) { - - // Get the assembly and Java interface factories as we'll need them to - // create model objects - assemblyFactory = modelFactories.getFactory(AssemblyFactory.class); - javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class); - policyFactory = modelFactories.getFactory(PolicyFactory.class); - pojoImplementationFactory = modelFactories.getFactory(POJOImplementationFactory.class); - policyProcessor = new PolicyAttachPointProcessor(policyFactory); - } - - public QName getArtifactType() { - // Returns the qname of the XML element processed by this processor - return IMPLEMENTATION_POJO; - } - - public Class getModelType() { - // Returns the type of model processed by this processor - return POJOImplementation.class; - } - - public POJOImplementation read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException { - - // Read an element - POJOImplementation implementation = pojoImplementationFactory.createPOJOImplementation(); - - // Read policies - policyProcessor.readPolicies(implementation, reader); - - // Read the POJO class attribute. - String className = reader.getAttributeValue(null, "class"); - implementation.setPOJOName(className); - - // Mark the POJO model unresolved to track the fact that it's not - // completely initialized, its class is not loaded yet and services - // and references not initialized either - implementation.setUnresolved(true); - - // Skip to end element - while (reader.hasNext()) { - if (reader.next() == END_ELEMENT && IMPLEMENTATION_POJO.equals(reader.getName())) { - break; - } - } - - return implementation; - } - - public void resolve(POJOImplementation implementation, ModelResolver resolver) throws ContributionResolveException { - - // Resolve the POJO implementation - - // First resolve its class - ClassReference classReference = new ClassReference(implementation.getPOJOName()); - classReference = resolver.resolveModel(ClassReference.class, classReference); - Class pojoClass = classReference.getJavaClass(); - if (pojoClass == null) { - throw new ContributionResolveException("Class could not be resolved: " + implementation.getPOJOName()); - } - implementation.setPOJOClass(pojoClass); - - // Check to see if we have a .componentType file describing the POJO class - ComponentType componentType = assemblyFactory.createComponentType(); - componentType.setUnresolved(true); - componentType.setURI(implementation.getURI() + ".componentType"); - componentType = resolver.resolveModel(ComponentType.class, componentType); - if (!componentType.isUnresolved()) { - - // We have a component type description, merge it into the POJO model - implementation.getServices().addAll(componentType.getServices()); - implementation.getReferences().addAll(componentType.getReferences()); - implementation.getProperties().addAll(componentType.getProperties()); - - } else { - - // We have no component type description, simply introspect the POJO and - // create a single Service for it - Service service = assemblyFactory.createService(); - service.setName(pojoClass.getSimpleName()); - JavaInterface javaInterface; - try { - javaInterface = javaFactory.createJavaInterface(pojoClass); - } catch (InvalidInterfaceException e) { - throw new ContributionResolveException(e); - } - JavaInterfaceContract interfaceContract = javaFactory.createJavaInterfaceContract(); - interfaceContract.setInterface(javaInterface); - service.setInterfaceContract(interfaceContract); - implementation.getServices().add(service); - } - - // Mark the implementation resolved now - implementation.setUnresolved(false); - } - - public void write(POJOImplementation implementation, XMLStreamWriter writer) throws ContributionWriteException, XMLStreamException { - - // Write element - policyProcessor.writePolicyPrefixes(implementation, writer); - writer.writeStartElement(IMPLEMENTATION_POJO.getNamespaceURI(), IMPLEMENTATION_POJO.getLocalPart()); - policyProcessor.writePolicyAttributes(implementation, writer); - - if (implementation.getPOJOName() != null) { - writer.writeAttribute("class", implementation.getPOJOName()); - } - - writer.writeEndElement(); - } -} diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationInvoker.java b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationInvoker.java deleted file mode 100644 index 87333c61f6..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationInvoker.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 pojo.provider; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.invocation.Message; -import org.osoa.sca.ServiceRuntimeException; - -/** - * Implements an invoker for POJO component implementations. - * - * The invoker is responsible for handling invocations of a business operation. - * Input business data is passed to the invoke method in a Message object. - * The invoke method is responsible for handling the invocation and returning a Message with - * the output business data. - * - * In this example we are simply delegating the operation invocations to the - * corresponding methods on the POJO implementation class using Java reflection. - * - * Depending on the type of implementation being handled, more sophisticated invokers can - * use other techniques to delegate the invocation to the implementation artifact directly, call a - * runtime engine like a BPEL engine or an XQuery engine (this is what the Tuscany - * implementation-bpel and implementation-xquery extensions do) or just completely handle the - * invocation in the invoker itself if the implementation has a fixed behavior for example. - */ -class POJOImplementationInvoker implements Invoker { - - private Object pojoInstance; - private Method method; - - POJOImplementationInvoker(Object pojoInstance, Operation operation, Method method) { - this.pojoInstance = pojoInstance; - this.method = method; - } - - public Message invoke(Message msg) { - try { - msg.setBody(method.invoke(pojoInstance, (Object[])msg.getBody())); - } catch (InvocationTargetException e) { - msg.setFaultBody(e); - } catch (Exception e) { - throw new ServiceRuntimeException(e); - } - return msg; - } - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationProvider.java b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationProvider.java deleted file mode 100644 index 73a0d22493..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationProvider.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 pojo.provider; - -import java.lang.reflect.Method; - -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.provider.ImplementationProvider; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.runtime.RuntimeComponentService; -import org.osoa.sca.ServiceRuntimeException; - -import pojo.POJOImplementation; - -/** - * An implementation provider for sample CRUD implementations. - * - * The implementation provider is responsible for handling the lifecycle of a component - * implementation and creating operation invokers for the service operations provided - * by the implementation. - * - * The start() and stop() methods are called when a component is started - * and stopped. In this example we are using that opportunity to call init and destroy methods - * on the POJO instance if these methods exist. - * - * The createInvoker method is called for each operation provided by the component - * implementation. The implementation provider can create an invoker and initialize it - * at that time to minimize the amount of work to be performed on each invocation. - * - * For example here we are looking up the Java method corresponding to the service operation - * at passing it to the invoker constructor. This way the invoker won't have to lookup the Java - * method on each invocation. - */ -class POJOImplementationProvider implements ImplementationProvider { - - private POJOImplementation implementation; - private Object pojoInstance; - - /** - * Constructs a new CRUD implementation. - */ - POJOImplementationProvider(RuntimeComponent component, POJOImplementation implementation) { - this.implementation = implementation; - - // Create a new instance of the POJO - try { - pojoInstance = implementation.getPOJOClass().newInstance(); - } catch (Exception e) { - throw new ServiceRuntimeException(e); - } - } - - public void start() { - try { - // Invoke the POJO's init method - Method initMethod = implementation.getMethods().get("init"); - if (initMethod != null) { - initMethod.invoke(pojoInstance); - } - } catch (Exception e) { - throw new ServiceRuntimeException(e); - } - } - - public void stop() { - try { - // Invoke the POJO's destroy method - Method destroyMethod = implementation.getMethods().get("destroy"); - if (destroyMethod != null) { - destroyMethod.invoke(pojoInstance); - } - } catch (Exception e) { - throw new ServiceRuntimeException(e); - } finally { - pojoInstance = null; - } - } - - public Invoker createInvoker(RuntimeComponentService service, Operation operation) { - Method method = implementation.getMethods().get(operation.getName()); - POJOImplementationInvoker invoker = new POJOImplementationInvoker(pojoInstance, operation, method); - return invoker; - } - - public boolean supportsOneWayInvocation() { - return false; - } - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationProviderFactory.java b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationProviderFactory.java deleted file mode 100644 index 22f2be09e9..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/java/pojo/provider/POJOImplementationProviderFactory.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 pojo.provider; - -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.provider.ImplementationProvider; -import org.apache.tuscany.sca.provider.ImplementationProviderFactory; -import org.apache.tuscany.sca.runtime.RuntimeComponent; - -import pojo.POJOImplementation; - -/** - * A factory for POJO implementation providers. - */ -public class POJOImplementationProviderFactory implements ImplementationProviderFactory { - - public POJOImplementationProviderFactory(ExtensionPointRegistry registry) { - } - - public Class getModelType() { - // Returns the type of model processed by this processor - return POJOImplementation.class; - } - - public ImplementationProvider createImplementationProvider(RuntimeComponent component, POJOImplementation implementation) { - return new POJOImplementationProvider(component, implementation); - } - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor deleted file mode 100644 index 8337e81c5f..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/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 -pojo.impl.POJOImplementationProcessor;qname=http://pojo#implementation.pojo,model=pojo.POJOImplementation,factory=pojo.POJOImplementationFactory diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema deleted file mode 100644 index 64dd230a15..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema +++ /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. - -# URI of the XML schema to be used for validation -sample-implementation-pojo.xsd diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory deleted file mode 100644 index b30ea3b9cf..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory +++ /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 implementation extension -pojo.provider.POJOImplementationProviderFactory;model=pojo.POJOImplementation diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/META-INF/services/pojo.POJOImplementationFactory b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/META-INF/services/pojo.POJOImplementationFactory deleted file mode 100644 index 075af98240..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/META-INF/services/pojo.POJOImplementationFactory +++ /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 implementation model factory -pojo.impl.POJOImplementationFactoryImpl diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/sample-implementation-pojo.xsd b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/sample-implementation-pojo.xsd deleted file mode 100644 index c9d170770b..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/main/resources/sample-implementation-pojo.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorld.java b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorld.java deleted file mode 100644 index cc32929f09..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorld.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 helloworld; - -public interface HelloWorld { - - String sayHello(String name); - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldImpl.java b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 0580e30aba..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldImpl.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; - -public class HelloWorldImpl { - - public void init() { - System.out.println("Initializing POJO"); - } - - public void destroy() { - System.out.println("Destroying POJO"); - } - - public String sayHello(String name) { - System.out.println("Executing POJO sayHello"); - return "Hello " + name; - } - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldImpl2.java b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldImpl2.java deleted file mode 100644 index 69ab1f567e..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldImpl2.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; - -public class HelloWorldImpl2 { - - public void init() { - System.out.println("Initializing POJO"); - } - - public void destroy() { - System.out.println("Destroying POJO"); - } - - public String sayHello(String name) { - System.out.println("Executing POJO sayHello"); - return "Hello " + name; - } - -} diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldTestCase.java b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldTestCase.java deleted file mode 100644 index d8b5f41adc..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/java/helloworld/HelloWorldTestCase.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 helloworld; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Tests the POJO implementation extension. - */ -public class HelloWorldTestCase extends TestCase { - - private SCADomain scaDomain; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("helloworld/helloworld.composite"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testHello() throws Exception { - HelloWorld helloworld = scaDomain.getService(HelloWorld.class, "HelloWorldComponent"); - assertEquals("Hello petra", helloworld.sayHello("petra")); - } - - public void testHello2() throws Exception { - HelloWorld helloworld = scaDomain.getService(HelloWorld.class, "HelloWorldComponent2/HelloWorld2"); - assertEquals("Hello petra", helloworld.sayHello("petra")); - } -} diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/resources/helloworld/HelloWorldImpl2.componentType b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/resources/helloworld/HelloWorldImpl2.componentType deleted file mode 100644 index a92c5ab8db..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/resources/helloworld/HelloWorldImpl2.componentType +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/resources/helloworld/helloworld.composite b/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/resources/helloworld/helloworld.composite deleted file mode 100644 index c38094dfc9..0000000000 --- a/branches/sca-java-1.3.2/samples/implementation-pojo-extension/src/test/resources/helloworld/helloworld.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/loanapplication/pom.xml b/branches/sca-java-1.3.2/samples/loanapplication/pom.xml deleted file mode 100644 index 1c1cdc07e4..0000000000 --- a/branches/sca-java-1.3.2/samples/loanapplication/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanApplication.java b/branches/sca-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanApplication.java deleted file mode 100644 index 4fedb70782..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanApplicationClient.java b/branches/sca-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanApplicationClient.java deleted file mode 100644 index 5183ece867..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanClient.java b/branches/sca-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanClient.java deleted file mode 100644 index 7e4438bbff..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanClientImpl.java b/branches/sca-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanClientImpl.java deleted file mode 100644 index b06d9465a2..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanService.java b/branches/sca-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanService.java deleted file mode 100644 index 9dfd8b42fe..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanServiceImpl.java b/branches/sca-java-1.3.2/samples/loanapplication/src/main/java/loanapplication/LoanServiceImpl.java deleted file mode 100644 index 76a53323bd..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/loanapplication/src/main/resources/loanapplication.composite b/branches/sca-java-1.3.2/samples/loanapplication/src/main/resources/loanapplication.composite deleted file mode 100644 index 3aa8d030b7..0000000000 --- a/branches/sca-java-1.3.2/samples/loanapplication/src/main/resources/loanapplication.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/loanapplication/src/test/java/loanapplication/LoanApplicationTestCase.java b/branches/sca-java-1.3.2/samples/loanapplication/src/test/java/loanapplication/LoanApplicationTestCase.java deleted file mode 100644 index e88e48a53a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/README b/branches/sca-java-1.3.2/samples/osgi-supplychain/README deleted file mode 100644 index 11fecf2ae8..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/build-bundles.xml b/branches/sca-java-1.3.2/samples/osgi-supplychain/build-bundles.xml deleted file mode 100644 index 7a31e6016b..0000000000 --- a/branches/sca-java-1.3.2/samples/osgi-supplychain/build-bundles.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/osgi-supplychain/build.xml b/branches/sca-java-1.3.2/samples/osgi-supplychain/build.xml deleted file mode 100644 index 2e103e5a15..0000000000 --- a/branches/sca-java-1.3.2/samples/osgi-supplychain/build.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/osgi-supplychain/osgi-supplychain.png b/branches/sca-java-1.3.2/samples/osgi-supplychain/osgi-supplychain.png deleted file mode 100644 index 2bec57ac8a..0000000000 Binary files a/branches/sca-java-1.3.2/samples/osgi-supplychain/osgi-supplychain.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/osgi-supplychain/osgi-supplychain.svg b/branches/sca-java-1.3.2/samples/osgi-supplychain/osgi-supplychain.svg deleted file mode 100644 index 43cb427944..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/pom.xml b/branches/sca-java-1.3.2/samples/osgi-supplychain/pom.xml deleted file mode 100644 index 973559ebf4..0000000000 --- a/branches/sca-java-1.3.2/samples/osgi-supplychain/pom.xml +++ /dev/null @@ -1,187 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-osgi - 1.3.2-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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/OSGiBundleImpl.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/OSGiBundleImpl.java deleted file mode 100644 index 5f40054ada..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/SupplyChainClient.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/SupplyChainClient.java deleted file mode 100644 index 64814487cb..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/customer/Customer.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/customer/Customer.java deleted file mode 100644 index 225dce0236..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java deleted file mode 100644 index 023d716651..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java deleted file mode 100644 index a1c7fce60a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerImpl.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/customer/OSGiCustomerImpl.java deleted file mode 100644 index 4647a716c7..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java deleted file mode 100644 index d0d29f94f8..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java deleted file mode 100644 index 1b7fb15bf1..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerImpl.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/retailer/OSGiRetailerImpl.java deleted file mode 100644 index e97331c06c..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/retailer/Retailer.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/retailer/Retailer.java deleted file mode 100644 index 1e87d59af1..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java deleted file mode 100644 index 4206ce7dc8..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java deleted file mode 100644 index 0f88cca213..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperImpl.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/shipper/OSGiShipperImpl.java deleted file mode 100644 index f55a068ede..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/shipper/Shipper.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/shipper/Shipper.java deleted file mode 100644 index 2514928c10..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java deleted file mode 100644 index 72eec76cc2..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java deleted file mode 100644 index 600f3f0c74..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java deleted file mode 100644 index b8bca97bd0..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/warehouse/Warehouse.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/java/supplychain/warehouse/Warehouse.java deleted file mode 100644 index 6f1f6b8730..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/resources/Customer.componentType b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/Customer.componentType deleted file mode 100644 index 5c61a0961c..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/resources/DSCustomer.componentType b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/DSCustomer.componentType deleted file mode 100644 index 87a184d968..0000000000 --- a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/DSCustomer.componentType +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/DSRetailer.componentType b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/DSRetailer.componentType deleted file mode 100644 index 872ab6601a..0000000000 --- a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/DSRetailer.componentType +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/DSShipper.componentType b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/DSShipper.componentType deleted file mode 100644 index 57fcbbc5d1..0000000000 --- a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/DSShipper.componentType +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/DSWarehouse.componentType b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/DSWarehouse.componentType deleted file mode 100644 index 75fa8029f7..0000000000 --- a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/DSWarehouse.componentType +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/Retailer.componentType b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/Retailer.componentType deleted file mode 100644 index 15185f2bf9..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/resources/Shipper.componentType b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/Shipper.componentType deleted file mode 100644 index 675597d80b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/resources/Warehouse.componentType b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/Warehouse.componentType deleted file mode 100644 index 6e1ac3e5a9..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/Customer.mf b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/Customer.mf deleted file mode 100644 index 88d79e5219..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/Retailer.mf b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/Retailer.mf deleted file mode 100644 index d95ef5d582..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/Shipper.mf b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/Shipper.mf deleted file mode 100644 index de7ac7ec7a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/Warehouse.mf b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/Warehouse.mf deleted file mode 100644 index 21241a6899..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Customer.mf b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Customer.mf deleted file mode 100644 index b5c5a862be..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Customer.xml b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Customer.xml deleted file mode 100644 index 5b368afd5b..0000000000 --- a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Customer.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Retailer.mf b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Retailer.mf deleted file mode 100644 index 47897d16ca..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Retailer.xml b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Retailer.xml deleted file mode 100644 index cae7fdfde2..0000000000 --- a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Retailer.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Shipper.mf b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Shipper.mf deleted file mode 100644 index f5333c7caa..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Shipper.xml b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Shipper.xml deleted file mode 100644 index d894309b71..0000000000 --- a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Shipper.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Warehouse.mf b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Warehouse.mf deleted file mode 100644 index 6166549e5a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Warehouse.xml b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Warehouse.xml deleted file mode 100644 index fc86a76784..0000000000 --- a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/osgi/ds/Warehouse.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/supplychain.composite b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/supplychain.composite deleted file mode 100644 index 0bbfed9176..0000000000 --- a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/supplychain.composite +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/supplychain.ds.composite b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/supplychain.ds.composite deleted file mode 100644 index d1e11168e2..0000000000 --- a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/main/resources/supplychain.ds.composite +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/osgi-supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java b/branches/sca-java-1.3.2/samples/osgi-supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java deleted file mode 100644 index ff15c0d9a2..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/pom.xml b/branches/sca-java-1.3.2/samples/pom.xml deleted file mode 100644 index eac11ab310..0000000000 --- a/branches/sca-java-1.3.2/samples/pom.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../pom.xml - - tuscany-samples - pom - Apache Tuscany SCA Samples - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - default - - true - - - binding-echo - binding-echo-extension - binding-notification-broker - binding-notification-consumer - binding-notification-producer - calculator - calculator-distributed - calculator-implementation-policies - calculator-rmi-reference - calculator-rmi-service - calculator-script - calculator-webapp - calculator-ws-secure-webapp - calculator-ws-webapp - callback-ws-client - callback-ws-service - chat-webapp - databinding-echo - - domain-management - feed-aggregator - feed-aggregator-webapp - helloworld-bpel - helloworld-dojo-webapp - helloworld-jms-webapp - helloworld-jsonrpc-webapp - helloworld-reference-jms - helloworld-service-jms - helloworld-ws-service - helloworld-ws-service-jms - helloworld-ws-service-secure - helloworld-ws-reference - helloworld-ws-reference-jms - helloworld-ws-reference-secure - helloworld-ws-sdo - helloworld-ws-sdo-webapp - implementation-composite - implementation-crud - implementation-crud-extension - implementation-notification - implementation-pojo-extension - loanapplication - osgi-supplychain - quote-xquery - simple-bigbank - simple-bigbank-spring - simple-callback - simple-callback-ws - store - supplychain - web-resource - zipcode-jaxws - - - - - diff --git a/branches/sca-java-1.3.2/samples/quote-xquery/README b/branches/sca-java-1.3.2/samples/quote-xquery/README deleted file mode 100644 index cf8a4609a6..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/build.xml b/branches/sca-java-1.3.2/samples/quote-xquery/build.xml deleted file mode 100644 index a3a5acf102..0000000000 --- a/branches/sca-java-1.3.2/samples/quote-xquery/build.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/quote-xquery/pom.xml b/branches/sca-java-1.3.2/samples/quote-xquery/pom.xml deleted file mode 100644 index 0c667a6d5b..0000000000 --- a/branches/sca-java-1.3.2/samples/quote-xquery/pom.xml +++ /dev/null @@ -1,184 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-xquery - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sdo - tuscany-sdo-lib - 1.1-incubating - - - - org.apache.tuscany.sdo - tuscany-sdo-impl - 1.1-incubating - - - - - - net.sf.saxon - saxon - 8.7 - - - - org.apache.tuscany.sca - tuscany-databinding-sdo - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.3.2-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-incubating - - - 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-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderImpl.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderImpl.java deleted file mode 100644 index 8a42136b5d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderNodeInfo.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderNodeInfo.java deleted file mode 100644 index 41d78683cc..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderService.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/AvailQuoteProviderService.java deleted file mode 100644 index f744a59744..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/ExternalReferencesQuoteJoin.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/ExternalReferencesQuoteJoin.java deleted file mode 100644 index 374c0825e9..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProvider.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProvider.java deleted file mode 100644 index fbe38b8269..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProviderImpl.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProviderImpl.java deleted file mode 100644 index d2d175430b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProviderNodeInfo.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/PriceQuoteProviderNodeInfo.java deleted file mode 100644 index 06c3945a6e..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/PropertiesQuoteJoin.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/PropertiesQuoteJoin.java deleted file mode 100644 index 1ecdf120c2..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteCalculator.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteCalculator.java deleted file mode 100644 index 85508eaa46..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteCalculatorImpl.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteCalculatorImpl.java deleted file mode 100644 index 26331381a8..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteDataUtil.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteDataUtil.java deleted file mode 100644 index 8ed02dc1ef..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoin.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoin.java deleted file mode 100644 index 425867055b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoinLocal.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoinLocal.java deleted file mode 100644 index cfd201f883..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoinLocalImpl.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/QuoteJoinLocalImpl.java deleted file mode 100644 index 20fe73fd92..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/XQueryQuoteClient.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/XQueryQuoteClient.java deleted file mode 100644 index adc852acd4..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/XQueryQuoteServer.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/java/xquery/quote/XQueryQuoteServer.java deleted file mode 100644 index 3fa3cdb637..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join.xq b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join.xq deleted file mode 100644 index d504f40f04..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_external_references.xq b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_external_references.xq deleted file mode 100644 index cc50da164a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_properties.xq b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_properties.xq deleted file mode 100644 index cf41ab528d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/main/resources/wsdl/AvailQuote.xsd b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/wsdl/AvailQuote.xsd deleted file mode 100644 index e7f3e67068..0000000000 --- a/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/wsdl/AvailQuote.xsd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/wsdl/PriceQuote.xsd b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/wsdl/PriceQuote.xsd deleted file mode 100644 index 4c437586ef..0000000000 --- a/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/wsdl/PriceQuote.xsd +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/wsdl/Quote.xsd b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/wsdl/Quote.xsd deleted file mode 100644 index 4f64850056..0000000000 --- a/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/wsdl/Quote.xsd +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/wsdl/quotejoin.wsdl b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/wsdl/quotejoin.wsdl deleted file mode 100644 index 96c2af138a..0000000000 --- a/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/wsdl/quotejoin.wsdl +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/xqueryquotews.composite b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/xqueryquotews.composite deleted file mode 100644 index 9e35e2ecb2..0000000000 --- a/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/xqueryquotews.composite +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/xqueryquotewsclient.composite b/branches/sca-java-1.3.2/samples/quote-xquery/src/main/resources/xqueryquotewsclient.composite deleted file mode 100644 index 35306b9f89..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/test/java/xquery/quote/XQueryQuoteClientTestCase.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/test/java/xquery/quote/XQueryQuoteClientTestCase.java deleted file mode 100644 index 9555532b3e..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/quote-xquery/src/test/java/xquery/quote/XQueryQuoteTestServer.java b/branches/sca-java-1.3.2/samples/quote-xquery/src/test/java/xquery/quote/XQueryQuoteTestServer.java deleted file mode 100644 index 9a4be5bda6..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/simple-bigbank-spring/README b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/README deleted file mode 100644 index 900a006141..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/README +++ /dev/null @@ -1,99 +0,0 @@ -Spring Bigbank Sample -================= -This sample implements a simple a version of the BigBank scenrio used in -various places in the SCA specification documents. - -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-bigbank-spring.jar bigbank.client.BigBankClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-simple-bigbank-spring.jar bigbank.client.BigBankClient - - -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-java-1.3.2/samples/simple-bigbank-spring/build.xml b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/build.xml deleted file mode 100644 index ecc2596d71..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/pom.xml b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/pom.xml deleted file mode 100644 index 03e8c5b74e..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/pom.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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-host-embedded - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-spring - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/simple-bigbank-spring.png b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/simple-bigbank-spring.png deleted file mode 100644 index 593c047f6a..0000000000 Binary files a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/simple-bigbank-spring.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/simple-bigbank-spring.svg b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/simple-bigbank-spring.svg deleted file mode 100644 index c64f6de6b9..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountReport.java b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountReport.java deleted file mode 100644 index 1625ff5b65..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountService.java b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountService.java deleted file mode 100644 index 7c9082b944..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountServiceImpl.java b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountServiceImpl.java deleted file mode 100644 index ae9071445d..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/account/AccountServiceImpl.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 bigbank.account; - -import java.util.ArrayList; -import java.util.List; - -import bigbank.accountdata.AccountDataService; -import bigbank.accountdata.CheckingAccount; -import bigbank.accountdata.SavingsAccount; -import bigbank.accountdata.StockAccount; -import bigbank.stockquote.StockQuoteService; - -/** - * Account service implementation - */ -public class AccountServiceImpl implements AccountService { - - private AccountDataService accountDataService; - - private StockQuoteService stockQuoteService; - - private String currency; - - public AccountReport getAccountReport(String s) { - List summaries = new ArrayList(); - - CheckingAccount ca = accountDataService.getCheckingAccount(s); - summaries.add(ca.getSummary()); - - SavingsAccount sa = accountDataService.getSavingsAccount(s); - summaries.add(sa.getSummary()); - - StockAccount sk = accountDataService.getStockAccount(s); - - double price = stockQuoteService.getQuote(sk.getSymbol()); - sk.setBalance(sk.getQuantity() * price); - - summaries.add(sk.getSummary()); - - AccountReport report = new AccountReport(currency, summaries); - - return report; - } - - public AccountDataService getAccountDataService() { - return accountDataService; - } - - public void setAccountDataService(AccountDataService accountDataService) { - this.accountDataService = accountDataService; - } - - public String getCurrency() { - return currency; - } - - public void setCurrency(String currency) { - this.currency = currency; - } - - public StockQuoteService getStockQuoteService() { - return stockQuoteService; - } - - public void setStockQuoteService(StockQuoteService stockQuoteService) { - this.stockQuoteService = stockQuoteService; - } -} diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/Account.java b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/Account.java deleted file mode 100644 index a5ae7b3955..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/Account.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.accountdata; - -/** - * Interface for a account service - */ -public interface Account { - String getSummary(); -} diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/AccountDataService.java b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/AccountDataService.java deleted file mode 100644 index c354de387b..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/AccountDataService.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 bigbank.accountdata; - -/** - * Interface for a account data service - */ -public interface AccountDataService { - public CheckingAccount getCheckingAccount(String customerID); - public SavingsAccount getSavingsAccount(String customerID); - public StockAccount getStockAccount(String customerID); -} diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java deleted file mode 100644 index 000acb935c..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/AccountDataServiceImpl.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.accountdata; - - -/** - * Account data service implementation - */ -public class AccountDataServiceImpl implements AccountDataService { - - public CheckingAccount getCheckingAccount(String customerID) { - - CheckingAccount checkingAccount = new CheckingAccount(); - checkingAccount.setAccountNumber(customerID+"_"+"CHA12345"); - checkingAccount.setBalance(1500.0f); - - return checkingAccount; - } - - public SavingsAccount getSavingsAccount(String customerID) { - - SavingsAccount savingsAccount = new SavingsAccount(); - savingsAccount.setAccountNumber(customerID+"_"+"SAA12345"); - savingsAccount.setBalance(1500.0f); - - return savingsAccount; - } - - public StockAccount getStockAccount(String customerID) { - - StockAccount stockAccount = new StockAccount(); - stockAccount.setAccountNumber(customerID+"_"+"STA12345"); - stockAccount.setSymbol("IBM"); - stockAccount.setQuantity(100); - - return stockAccount; - } -} diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/CheckingAccount.java b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/CheckingAccount.java deleted file mode 100644 index 11bdff757e..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/CheckingAccount.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.accountdata; - -/** - * An account service implementation for a checking account - */ -public class CheckingAccount implements Account { - 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; } - - public String getSummary() { return "ID:" + accountNumber + ", balance:" + balance; } -} diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/SavingsAccount.java b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/SavingsAccount.java deleted file mode 100644 index b791024076..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/SavingsAccount.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.accountdata; - -/** - * An account service implementation for a savings account - */ -public class SavingsAccount implements Account { - 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; } - - public String getSummary() { return "ID:" + accountNumber + ", balance:" + balance; } -} diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/StockAccount.java b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/StockAccount.java deleted file mode 100644 index 86246a3f84..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/accountdata/StockAccount.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.accountdata; - -/** - * An account service implementation for a stock account - */ -public class StockAccount implements Account { - private String accountNumber; - private String symbol; - private int quantity; - private double balance; - - public String getAccountNumber() { return accountNumber; } - public void setAccountNumber(String n) { this.accountNumber = n; } - - public double getQuantity() { return quantity; } - public void setQuantity(int a) { this.quantity = a; } - - public String getSymbol() { return symbol; } - public void setSymbol(String s) { this.symbol = s; } - - public double getBalance() { return balance; } - public void setBalance(double balance) { this.balance = balance; } - - public String getSummary() { return "ID:" + accountNumber + ", symbol:" + symbol + ", quantity:" + quantity + ", balance:" + balance; } -} diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/client/BigBankClient.java b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/client/BigBankClient.java deleted file mode 100644 index edbf910d37..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/client/BigBankClient.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.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 scaDomain = SCADomain.newInstance("BigBank.composite"); - - AccountService accountService = scaDomain.getService(AccountService.class, - "AccountServiceComponent"); - - System.out.println("Account summary: " + accountService.getAccountReport("Foo") ); - - scaDomain.close(); - } - -} diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java deleted file mode 100644 index 0512d40b0b..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.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.stockquote; - - -/** - * This class implements the StockQuote service. - */ -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-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/stockquote/StockQuoteService.java b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/java/bigbank/stockquote/StockQuoteService.java deleted file mode 100644 index 2d97b57066..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/simple-bigbank-spring/src/main/resources/Account-spring-context.xml b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/resources/Account-spring-context.xml deleted file mode 100644 index 2d882472fb..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/resources/Account-spring-context.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/resources/BigBank.composite b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/resources/BigBank.composite deleted file mode 100644 index 29d4a2d5a3..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/resources/BigBank.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/resources/StockQuote.composite b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/resources/StockQuote.composite deleted file mode 100644 index 26bdc59075..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/main/resources/StockQuote.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/test/java/bigbank/BigBankTestCase.java b/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/test/java/bigbank/BigBankTestCase.java deleted file mode 100644 index ba6c1dd797..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank-spring/src/test/java/bigbank/BigBankTestCase.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; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import bigbank.account.AccountService; - -/** - * Tests out the big bank service - * - */ -public class BigBankTestCase extends TestCase { - - private SCADomain scaDomain; - AccountService accountService; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("BigBank.composite"); - accountService = scaDomain.getService(AccountService.class, "AccountServiceComponent"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void test() throws Exception { - System.out.println("Account summary: " + accountService.getAccountReport("Foo") ); - } -} diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank/README b/branches/sca-java-1.3.2/samples/simple-bigbank/README deleted file mode 100644 index acbe93a4d3..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/README +++ /dev/null @@ -1,101 +0,0 @@ -Calculator Sample -================= -This sample implements a simple a version of the BigBank scenrio used in -various places in the SCA specification documents. - -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-bigbank.jar bigbank.client.BigBankClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-simple-bigbank.jar bigbank.client.BigBankClient - - -Sample Overview ---------------- -This sample demonstrates a simple bank summary transaction while using Java components wired together. -SCA default binding is used. - -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. - -calculator/ - src/ - main/ - java/ - bigbank/ - account/ - AccountComponent implementation - accountdata/ - AccountDataComponent implementation - stockquote/ - generates random stock prices - 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.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 -ant compile -ant run - -You should see the following output from the run target. -** Please note that the balance amount is dependent on the random sotck quote price and the -numbers may vary on each run. - -run: - [java] Getting stock quote for: IBM, value: 104.06 - [java] Account summary: currency: USD, [ID:Foo_CHA12345, balance:1500.0, ID -:Foo_SAA12345, balance:1500.0, ID:Foo_STA12345, symbol:IBM, quantity:100, balanc -e:10406.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 -mvn - -You should see the following output from the test phase. -** Please note that the balance amount is dependent on the random sotck quote price and the numbers may vary on each run. - - -------------------------------------------------------- - 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-java-1.3.2/samples/simple-bigbank/build.xml b/branches/sca-java-1.3.2/samples/simple-bigbank/build.xml deleted file mode 100644 index a814014eae..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank/pom.xml b/branches/sca-java-1.3.2/samples/simple-bigbank/pom.xml deleted file mode 100644 index e0da75b790..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../../pom.xml - - sample-simple-bigbank - Apache Tuscany SCA Simplified BigBank Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank/simple-bigbank.png b/branches/sca-java-1.3.2/samples/simple-bigbank/simple-bigbank.png deleted file mode 100644 index 593c047f6a..0000000000 Binary files a/branches/sca-java-1.3.2/samples/simple-bigbank/simple-bigbank.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank/simple-bigbank.svg b/branches/sca-java-1.3.2/samples/simple-bigbank/simple-bigbank.svg deleted file mode 100644 index c64f6de6b9..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/simple-bigbank.svg +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - BigBank - - AccountServiceComponent - - - - - AccountDataServiceComponent - - - currency AccountService - diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/account/AccountReport.java b/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/account/AccountReport.java deleted file mode 100644 index 1625ff5b65..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/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-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/account/AccountService.java b/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/account/AccountService.java deleted file mode 100644 index 7c9082b944..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/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-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java b/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/account/AccountServiceImpl.java deleted file mode 100644 index fa85f309c0..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/account/AccountServiceImpl.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; - -import java.util.ArrayList; -import java.util.List; - -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; - -import bigbank.accountdata.AccountDataService; -import bigbank.accountdata.CheckingAccount; -import bigbank.accountdata.SavingsAccount; -import bigbank.accountdata.StockAccount; -import bigbank.stockquote.StockQuoteService; - -/** - * Account service implementation - */ -public class AccountServiceImpl implements AccountService { - - @Reference - public AccountDataService accountDataService; - - @Reference - public StockQuoteService stockQuoteService; - - @Property - public String currency; - - public AccountReport getAccountReport(String s) { - List summaries = new ArrayList(); - - CheckingAccount ca = accountDataService.getCheckingAccount(s); - summaries.add(ca.getSummary()); - - SavingsAccount sa = accountDataService.getSavingsAccount(s); - summaries.add(sa.getSummary()); - - StockAccount sk = accountDataService.getStockAccount(s); - - double price = stockQuoteService.getQuote(sk.getSymbol()); - sk.setBalance(sk.getQuantity() * price); - - summaries.add(sk.getSummary()); - - AccountReport report = new AccountReport(currency, summaries); - - return report; - } - -} diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/Account.java b/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/Account.java deleted file mode 100644 index a5ae7b3955..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/Account.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.accountdata; - -/** - * Interface for a account service - */ -public interface Account { - String getSummary(); -} diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataService.java b/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataService.java deleted file mode 100644 index c354de387b..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataService.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 bigbank.accountdata; - -/** - * Interface for a account data service - */ -public interface AccountDataService { - public CheckingAccount getCheckingAccount(String customerID); - public SavingsAccount getSavingsAccount(String customerID); - public StockAccount getStockAccount(String customerID); -} diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java b/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java deleted file mode 100644 index 000acb935c..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/AccountDataServiceImpl.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.accountdata; - - -/** - * Account data service implementation - */ -public class AccountDataServiceImpl implements AccountDataService { - - public CheckingAccount getCheckingAccount(String customerID) { - - CheckingAccount checkingAccount = new CheckingAccount(); - checkingAccount.setAccountNumber(customerID+"_"+"CHA12345"); - checkingAccount.setBalance(1500.0f); - - return checkingAccount; - } - - public SavingsAccount getSavingsAccount(String customerID) { - - SavingsAccount savingsAccount = new SavingsAccount(); - savingsAccount.setAccountNumber(customerID+"_"+"SAA12345"); - savingsAccount.setBalance(1500.0f); - - return savingsAccount; - } - - public StockAccount getStockAccount(String customerID) { - - StockAccount stockAccount = new StockAccount(); - stockAccount.setAccountNumber(customerID+"_"+"STA12345"); - stockAccount.setSymbol("IBM"); - stockAccount.setQuantity(100); - - return stockAccount; - } -} diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/CheckingAccount.java b/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/CheckingAccount.java deleted file mode 100644 index 11bdff757e..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/CheckingAccount.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.accountdata; - -/** - * An account service implementation for a checking account - */ -public class CheckingAccount implements Account { - 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; } - - public String getSummary() { return "ID:" + accountNumber + ", balance:" + balance; } -} diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/SavingsAccount.java b/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/SavingsAccount.java deleted file mode 100644 index b791024076..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/SavingsAccount.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.accountdata; - -/** - * An account service implementation for a savings account - */ -public class SavingsAccount implements Account { - 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; } - - public String getSummary() { return "ID:" + accountNumber + ", balance:" + balance; } -} diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/StockAccount.java b/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/StockAccount.java deleted file mode 100644 index 86246a3f84..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/accountdata/StockAccount.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.accountdata; - -/** - * An account service implementation for a stock account - */ -public class StockAccount implements Account { - private String accountNumber; - private String symbol; - private int quantity; - private double balance; - - public String getAccountNumber() { return accountNumber; } - public void setAccountNumber(String n) { this.accountNumber = n; } - - public double getQuantity() { return quantity; } - public void setQuantity(int a) { this.quantity = a; } - - public String getSymbol() { return symbol; } - public void setSymbol(String s) { this.symbol = s; } - - public double getBalance() { return balance; } - public void setBalance(double balance) { this.balance = balance; } - - public String getSummary() { return "ID:" + accountNumber + ", symbol:" + symbol + ", quantity:" + quantity + ", balance:" + balance; } -} diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/client/BigBankClient.java b/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/client/BigBankClient.java deleted file mode 100644 index edbf910d37..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/client/BigBankClient.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.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 scaDomain = SCADomain.newInstance("BigBank.composite"); - - AccountService accountService = scaDomain.getService(AccountService.class, - "AccountServiceComponent"); - - System.out.println("Account summary: " + accountService.getAccountReport("Foo") ); - - scaDomain.close(); - } - -} diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java b/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.java deleted file mode 100644 index 0512d40b0b..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteImpl.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.stockquote; - - -/** - * This class implements the StockQuote service. - */ -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-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java b/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.java deleted file mode 100644 index 7961279352..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/java/bigbank/stockquote/StockQuoteService.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.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-java-1.3.2/samples/simple-bigbank/src/main/resources/Account.composite b/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/resources/Account.composite deleted file mode 100644 index e71615e27e..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/resources/Account.composite +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - USD - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/resources/BigBank.composite b/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/resources/BigBank.composite deleted file mode 100644 index c870f39cab..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/resources/BigBank.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/resources/StockQuote.composite b/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/resources/StockQuote.composite deleted file mode 100644 index 4f29c14851..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/src/main/resources/StockQuote.composite +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/simple-bigbank/src/test/java/bigbank/BigBankTestCase.java b/branches/sca-java-1.3.2/samples/simple-bigbank/src/test/java/bigbank/BigBankTestCase.java deleted file mode 100644 index ba6c1dd797..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-bigbank/src/test/java/bigbank/BigBankTestCase.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; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -import bigbank.account.AccountService; - -/** - * Tests out the big bank service - * - */ -public class BigBankTestCase extends TestCase { - - private SCADomain scaDomain; - AccountService accountService; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("BigBank.composite"); - accountService = scaDomain.getService(AccountService.class, "AccountServiceComponent"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void test() throws Exception { - System.out.println("Account summary: " + accountService.getAccountReport("Foo") ); - } -} diff --git a/branches/sca-java-1.3.2/samples/simple-callback-ws/README b/branches/sca-java-1.3.2/samples/simple-callback-ws/README deleted file mode 100644 index 6b27718f74..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/simple-callback-ws/build.xml b/branches/sca-java-1.3.2/samples/simple-callback-ws/build.xml deleted file mode 100644 index 10b69bd395..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-callback-ws/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/simple-callback-ws/pom.xml b/branches/sca-java-1.3.2/samples/simple-callback-ws/pom.xml deleted file mode 100644 index 8cdb04a129..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-callback-ws/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/simple-callback-ws/simple-callback-ws.png b/branches/sca-java-1.3.2/samples/simple-callback-ws/simple-callback-ws.png deleted file mode 100644 index 1b6353f5cf..0000000000 Binary files a/branches/sca-java-1.3.2/samples/simple-callback-ws/simple-callback-ws.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/simple-callback-ws/simple-callback-ws.svg b/branches/sca-java-1.3.2/samples/simple-callback-ws/simple-callback-ws.svg deleted file mode 100644 index 7d9e3de510..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/MyClient.java b/branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/MyClient.java deleted file mode 100644 index 4cc00d6d0f..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/MyClientImpl.java b/branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/MyClientImpl.java deleted file mode 100644 index ad7c6d8fef..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/MyService.java b/branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/MyService.java deleted file mode 100644 index 48acc0e94f..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceCallback.java b/branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceCallback.java deleted file mode 100644 index 66cfb2bc8a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceImpl.java b/branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/MyServiceImpl.java deleted file mode 100644 index 08057d2fcc..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/SimpleCallbackClient.java b/branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/java/simplecallback/SimpleCallbackClient.java deleted file mode 100644 index eeb0e52163..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/simple-callback-ws/src/main/resources/simplecallback.composite b/branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/resources/simplecallback.composite deleted file mode 100644 index 53e7fe66af..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/resources/simplecallback.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/resources/wsdl/simplecallback.wsdl b/branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/resources/wsdl/simplecallback.wsdl deleted file mode 100644 index 8a6465de3a..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-callback-ws/src/main/resources/wsdl/simplecallback.wsdl +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/simple-callback-ws/src/test/java/simplecallback/SimpleCallbackTestCase.java b/branches/sca-java-1.3.2/samples/simple-callback-ws/src/test/java/simplecallback/SimpleCallbackTestCase.java deleted file mode 100644 index 580a7f6b0c..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/simple-callback/README b/branches/sca-java-1.3.2/samples/simple-callback/README deleted file mode 100644 index 719376f254..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-callback/README +++ /dev/null @@ -1,97 +0,0 @@ -Simple Callback Sample -====================== -This sample demonstrates asynchronous messaging using a 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-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 - 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 -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] Main thread Thread[main,5,main] - [java] Work thread Thread[pool-1-thread-1,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 -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running simplecallback.SimpleCallbackTestCase -Main thread Thread[main,5,main] -Sleeping ... -Work thread Thread[pool-1-thread-1,5,main] -Result: -> someMethod -> receiveResult -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.692 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-java-1.3.2/samples/simple-callback/build.xml b/branches/sca-java-1.3.2/samples/simple-callback/build.xml deleted file mode 100644 index 47d1ea4bc1..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-callback/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/simple-callback/pom.xml b/branches/sca-java-1.3.2/samples/simple-callback/pom.xml deleted file mode 100644 index 98f6942f43..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-callback/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../../pom.xml - - sample-simple-callback - Apache Tuscany SCA Simple Callback Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/simple-callback/simple-callback.png b/branches/sca-java-1.3.2/samples/simple-callback/simple-callback.png deleted file mode 100644 index 1b6353f5cf..0000000000 Binary files a/branches/sca-java-1.3.2/samples/simple-callback/simple-callback.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/simple-callback/simple-callback.svg b/branches/sca-java-1.3.2/samples/simple-callback/simple-callback.svg deleted file mode 100644 index 484b65df9d..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-callback/simple-callback.svg +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - simplecallback - MyServiceComponent - - - MyClientComponent - - - diff --git a/branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyClient.java b/branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyClient.java deleted file mode 100644 index 4cc00d6d0f..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-callback/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-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyClientImpl.java b/branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyClientImpl.java deleted file mode 100644 index 3e2a1df5a5..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyClientImpl.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 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() { - myService.someMethod("-> someMethod"); - } - - public void receiveResult(String result) { - System.out.println("Work thread " + Thread.currentThread()); - System.out.println("Result: " + result); - MyClientImpl.result = result; - } -} diff --git a/branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyService.java b/branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyService.java deleted file mode 100644 index e78ad6f68f..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyService.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 simplecallback; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.OneWay; - -/** - * This service that will be invoked in a non-blocking fashion - */ -@Callback(MyServiceCallback.class) -public interface MyService { - - @OneWay - void someMethod(String arg); -} diff --git a/branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyServiceCallback.java b/branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyServiceCallback.java deleted file mode 100644 index b27eea44f5..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyServiceCallback.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 callback interface for {@link MyService}. - */ -public interface MyServiceCallback { - - void receiveResult(String result); -} diff --git a/branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyServiceImpl.java b/branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyServiceImpl.java deleted file mode 100644 index fc5e31d14e..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/MyServiceImpl.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.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) { - this.myServiceCallback = myServiceCallback; - } - - public void someMethod(String arg) { - // invoke the callback - try { - myServiceCallback.receiveResult(arg + " -> receiveResult"); - } catch(RuntimeException e) { - System.out.println("RuntimeException invoking receiveResult: " + e.toString()); - } - } -} diff --git a/branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/SimpleCallbackClient.java b/branches/sca-java-1.3.2/samples/simple-callback/src/main/java/simplecallback/SimpleCallbackClient.java deleted file mode 100644 index b8987fcd07..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-callback/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(500); - - scaDomain.close(); - } -} diff --git a/branches/sca-java-1.3.2/samples/simple-callback/src/main/resources/simplecallback.composite b/branches/sca-java-1.3.2/samples/simple-callback/src/main/resources/simplecallback.composite deleted file mode 100644 index 33e6f60601..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-callback/src/main/resources/simplecallback.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/simple-callback/src/test/java/simplecallback/SimpleCallbackTestCase.java b/branches/sca-java-1.3.2/samples/simple-callback/src/test/java/simplecallback/SimpleCallbackTestCase.java deleted file mode 100644 index cbaab8af83..0000000000 --- a/branches/sca-java-1.3.2/samples/simple-callback/src/test/java/simplecallback/SimpleCallbackTestCase.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 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(300); - assertEquals("-> someMethod -> receiveResult", MyClientImpl.result); - } -} diff --git a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/pom.xml b/branches/sca-java-1.3.2/samples/spi-implementation-pojo/pom.xml deleted file mode 100644 index 4d1749a3e8..0000000000 --- a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/pom.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../../pom.xml - - sample-spi-implementation-java - Apache Tuscany Java Implementation SPI Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - - org.apache.tuscany.sca - tuscany-extension-helper - 1.3.2-SNAPSHOT - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementation.java b/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementation.java deleted file mode 100644 index 73104c3166..0000000000 --- a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementation.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 sample; - - -public class JavaImplementation { - - private String className; - - public String getClass_() { - return className; - } - - public void setClass_(String className) { - this.className = className; - } - -} diff --git a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementationActivator.java b/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementationActivator.java deleted file mode 100644 index 43efae32ca..0000000000 --- a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementationActivator.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 sample; - -import org.apache.tuscany.sca.assembly.ComponentType; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.spi.ImplementationActivator; -import org.apache.tuscany.sca.spi.InvokerFactory; - -public class JavaImplementationActivator implements ImplementationActivator { - - public Class getImplementationClass() { - return JavaImplementation.class; - } - - public InvokerFactory createInvokerFactory(RuntimeComponent rc, ComponentType ct, JavaImplementation implementation) { - return new JavaInvokerFactory(rc, ct, implementation); - } - -} diff --git a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/java/sample/JavaInvoker.java b/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/java/sample/JavaInvoker.java deleted file mode 100644 index d65d4c8e4a..0000000000 --- a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/java/sample/JavaInvoker.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 sample; - -import java.lang.reflect.Method; - -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.invocation.Message; -import org.osoa.sca.ServiceRuntimeException; - -public class JavaInvoker implements Invoker { - - protected Class clazz; - protected Object instance; - protected Operation operation; - - public JavaInvoker(Class clazz, Object instance, Operation operation) { - this.clazz = clazz; - this.instance = instance; - this.operation = operation; - } - - public Message invoke(Message msg) { - try { - msg.setBody(getMethod().invoke(instance, (Object[])msg.getBody())); - } catch (Exception e) { - throw new ServiceRuntimeException(e); - } - return msg; - } - - protected Method getMethod() { - for (Method method : clazz.getMethods()) { - if (method.getName().equals(operation.getName())) { - return method; - } - } - throw new ServiceRuntimeException("no method found for operation: " + operation.getName()); - } - -} diff --git a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/java/sample/JavaInvokerFactory.java b/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/java/sample/JavaInvokerFactory.java deleted file mode 100644 index 198befa928..0000000000 --- a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/java/sample/JavaInvokerFactory.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 sample; - -import org.apache.tuscany.sca.assembly.ComponentType; -import org.apache.tuscany.sca.interfacedef.Operation; -import org.apache.tuscany.sca.invocation.Invoker; -import org.apache.tuscany.sca.runtime.RuntimeComponent; -import org.apache.tuscany.sca.spi.InvokerFactory; -import org.osoa.sca.ServiceRuntimeException; - -public class JavaInvokerFactory implements InvokerFactory { - - protected Object instance; - protected Class clazz; - - public JavaInvokerFactory(RuntimeComponent rc, ComponentType ct, JavaImplementation implementation) { - try { - this.clazz = Class.forName(implementation.getClass_()); - this.instance = clazz.newInstance(); - } catch (Exception e) { - throw new ServiceRuntimeException(e); - } - } - - public Invoker createInvoker(Operation operation) { - return new JavaInvoker(clazz, instance, operation); - } - -} diff --git a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.spi.ImplementationActivator b/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.spi.ImplementationActivator deleted file mode 100644 index 95ee37c1aa..0000000000 --- a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.spi.ImplementationActivator +++ /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. -# Implementation class for the ExtensionActivator -sample.JavaImplementationActivator diff --git a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorld.java b/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorld.java deleted file mode 100644 index cc32929f09..0000000000 --- a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorld.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 helloworld; - -public interface HelloWorld { - - String sayHello(String name); - -} diff --git a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorldImpl.java b/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 02af1ccf22..0000000000 --- a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorldImpl.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 helloworld; - -public class HelloWorldImpl implements HelloWorld { - - public String sayHello(String name) { - return "Hello " + name; - } - -} diff --git a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorldTestCase.java b/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorldTestCase.java deleted file mode 100644 index 5813fda330..0000000000 --- a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorldTestCase.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 junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - */ -public class HelloWorldTestCase extends TestCase { - - public void testHello() throws Exception { - SCADomain scaDomain = SCADomain.newInstance("helloworld/helloworld.composite"); - HelloWorld helloworld = scaDomain.getService(HelloWorld.class, "HelloWorldComponent"); - assertEquals("Hello petra", helloworld.sayHello("petra")); - scaDomain.close(); - } -} diff --git a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/test/resources/helloworld/helloworld.composite b/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/test/resources/helloworld/helloworld.composite deleted file mode 100644 index fa9cecc160..0000000000 --- a/branches/sca-java-1.3.2/samples/spi-implementation-pojo/src/test/resources/helloworld/helloworld.composite +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/store/README b/branches/sca-java-1.3.2/samples/store/README deleted file mode 100644 index d4797618ff..0000000000 --- a/branches/sca-java-1.3.2/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://incubator.apache.org/tuscany/getting-started-with-tuscany.html - -or - -http://incubator.apache.org/tuscany/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-java-1.3.2/samples/store/build.xml b/branches/sca-java-1.3.2/samples/store/build.xml deleted file mode 100644 index 652afc3570..0000000000 --- a/branches/sca-java-1.3.2/samples/store/build.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/store/pom.xml b/branches/sca-java-1.3.2/samples/store/pom.xml deleted file mode 100644 index 4e24ebdc47..0000000000 --- a/branches/sca-java-1.3.2/samples/store/pom.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-data-api - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-widget-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-atom-abdera - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/store/src/main/java/launch/Launch.java b/branches/sca-java-1.3.2/samples/store/src/main/java/launch/Launch.java deleted file mode 100644 index 801697abea..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/store/src/main/java/services/Cart.java b/branches/sca-java-1.3.2/samples/store/src/main/java/services/Cart.java deleted file mode 100644 index 9e6226d963..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/store/src/main/java/services/Catalog.java b/branches/sca-java-1.3.2/samples/store/src/main/java/services/Catalog.java deleted file mode 100644 index 2c3b19f579..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/store/src/main/java/services/CurrencyConverter.java b/branches/sca-java-1.3.2/samples/store/src/main/java/services/CurrencyConverter.java deleted file mode 100644 index e104a0423a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/store/src/main/java/services/CurrencyConverterImpl.java b/branches/sca-java-1.3.2/samples/store/src/main/java/services/CurrencyConverterImpl.java deleted file mode 100644 index c354aed447..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/store/src/main/java/services/FruitsCatalogImpl.java b/branches/sca-java-1.3.2/samples/store/src/main/java/services/FruitsCatalogImpl.java deleted file mode 100644 index 377b3d7e59..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/store/src/main/java/services/Item.java b/branches/sca-java-1.3.2/samples/store/src/main/java/services/Item.java deleted file mode 100644 index 27abd4f016..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/store/src/main/java/services/ShoppingCartImpl.java b/branches/sca-java-1.3.2/samples/store/src/main/java/services/ShoppingCartImpl.java deleted file mode 100644 index 9889921a96..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/store/src/main/java/services/Total.java b/branches/sca-java-1.3.2/samples/store/src/main/java/services/Total.java deleted file mode 100644 index 8f464e526f..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/store/src/main/resources/store.composite b/branches/sca-java-1.3.2/samples/store/src/main/resources/store.composite deleted file mode 100644 index 571678839d..0000000000 --- a/branches/sca-java-1.3.2/samples/store/src/main/resources/store.composite +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - USD - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/store/src/main/resources/uiservices/store.html b/branches/sca-java-1.3.2/samples/store/src/main/resources/uiservices/store.html deleted file mode 100644 index 095570f949..0000000000 --- a/branches/sca-java-1.3.2/samples/store/src/main/resources/uiservices/store.html +++ /dev/null @@ -1,141 +0,0 @@ - - - -Store - - - - - - - - -

Store

-
-

Catalog

-
-
-
- -
- -
- -

Your Shopping Cart

-
-
-
-
-
- - - (feed) -
-
- - diff --git a/branches/sca-java-1.3.2/samples/store/store.png b/branches/sca-java-1.3.2/samples/store/store.png deleted file mode 100644 index da413edeee..0000000000 Binary files a/branches/sca-java-1.3.2/samples/store/store.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/store/store.svg b/branches/sca-java-1.3.2/samples/store/store.svg deleted file mode 100644 index 74f8ecd36d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/supplychain/README b/branches/sca-java-1.3.2/samples/supplychain/README deleted file mode 100644 index ea4493fdd4..0000000000 --- a/branches/sca-java-1.3.2/samples/supplychain/README +++ /dev/null @@ -1,101 +0,0 @@ -SupplyChain Sample -================== - -This sample demonstrates SCA components using the asynchronous API. - -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-supplychain.jar supplychain.SupplyChainClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-supplychain.jar supplychain.SupplyChainClient - - -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. - -supplychain/ - src/ - main/ - java/ - supplychain/ - Customer.java - Defines the Java interface implemented - by the Customer component - CustomerComponentImpl.java - Implements the SCA Customer component - Retailer.java - Defines the Java interface implemented - by the Retailer component - RetailerComponentImpl.java - Implements the SCA RetailerComponent component - Shipper.java - Defines the Java interface implemented - by the Shipper component - ShipperComponentImpl.java - Implements the SCA ShipperComponent component - SupplyChainClient.java - SupplyChainClient.java loads SCA runtime - Warehouse.java - Defines the Java interface implemented - by the Warehouse component - WarehouseComponentImpl.java - Implements the SCA WarehouseComponent component - - resources/ - supplychain.composite - the SCA assembly for this sample - test/ - java/ - supplychain/ - SupplyChainClientTestCase.java - JUnit test case - 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 supplychain -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] Main thread Thread[main,5,main] - [java] Main thread sleeping ... - [java] Work thread Thread[pool-1-thread-1,5,main] - Order, submitted, fulfilled, shipped - -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 supplychain -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running supplychain.SupplyChainClientTestCase -Main thread Thread[main,5,main] -Sleeping ... -Work thread Thread[pool-1-thread-1,5,main] - Order, submitted, fulfilled, shipped -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.625 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. \ No newline at end of file diff --git a/branches/sca-java-1.3.2/samples/supplychain/build.xml b/branches/sca-java-1.3.2/samples/supplychain/build.xml deleted file mode 100644 index 506180b8b1..0000000000 --- a/branches/sca-java-1.3.2/samples/supplychain/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/supplychain/pom.xml b/branches/sca-java-1.3.2/samples/supplychain/pom.xml deleted file mode 100644 index 01bbcd513a..0000000000 --- a/branches/sca-java-1.3.2/samples/supplychain/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-SNAPSHOT - ../../pom.xml - - sample-supplychain - Apache Tuscany SCA Supply Chain Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/Customer.java b/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/Customer.java deleted file mode 100644 index 8088001898..0000000000 --- a/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/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; - -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-java-1.3.2/samples/supplychain/src/main/java/supplychain/CustomerComponentImpl.java b/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/CustomerComponentImpl.java deleted file mode 100644 index 7a1e8553ec..0000000000 --- a/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/CustomerComponentImpl.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; - -import org.osoa.sca.annotations.Reference; - -/** - * This class implements the Customer service component. - */ -public class CustomerComponentImpl 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-java-1.3.2/samples/supplychain/src/main/java/supplychain/Retailer.java b/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/Retailer.java deleted file mode 100644 index 1add63fb4e..0000000000 --- a/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/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; - -/** - * This is the business interface of the Retailer service component. - */ -public interface Retailer { - - public void submitOrder(String order); - -} diff --git a/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/RetailerComponentImpl.java b/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/RetailerComponentImpl.java deleted file mode 100644 index f622052cf8..0000000000 --- a/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/RetailerComponentImpl.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 supplychain; - -import org.osoa.sca.annotations.Reference; - -/** - * This class implements the Customer service component. - */ -public class RetailerComponentImpl 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-java-1.3.2/samples/supplychain/src/main/java/supplychain/Shipper.java b/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/Shipper.java deleted file mode 100644 index d4d49a922b..0000000000 --- a/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/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; - -/** - * This is the business interface of the Shipper service component. - */ -public interface Shipper { - - public void processShipment(String order); - -} diff --git a/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/ShipperComponentImpl.java b/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/ShipperComponentImpl.java deleted file mode 100644 index 4ae52a12a2..0000000000 --- a/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/ShipperComponentImpl.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 supplychain; - -import org.osoa.sca.annotations.Reference; - -/** - * This class implements the Warehouse service component. - */ -public class ShipperComponentImpl 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-java-1.3.2/samples/supplychain/src/main/java/supplychain/SupplyChainClient.java b/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/SupplyChainClient.java deleted file mode 100644 index 7072f582d1..0000000000 --- a/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/SupplyChainClient.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 supplychain; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * 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-java-1.3.2/samples/supplychain/src/main/java/supplychain/Warehouse.java b/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/Warehouse.java deleted file mode 100644 index 0be499f569..0000000000 --- a/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/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; - -/** - * This is the business interface of the Warehouse service component. - */ -public interface Warehouse { - - public void fulfillOrder(String order); - -} diff --git a/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/WarehouseComponentImpl.java b/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/WarehouseComponentImpl.java deleted file mode 100644 index b5e256a1e0..0000000000 --- a/branches/sca-java-1.3.2/samples/supplychain/src/main/java/supplychain/WarehouseComponentImpl.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 supplychain; - -import org.osoa.sca.annotations.Reference; - -/** - * This class implements the Warehouse service component. - */ -public class WarehouseComponentImpl 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-java-1.3.2/samples/supplychain/src/main/resources/supplychain.composite b/branches/sca-java-1.3.2/samples/supplychain/src/main/resources/supplychain.composite deleted file mode 100644 index 301efcaf1f..0000000000 --- a/branches/sca-java-1.3.2/samples/supplychain/src/main/resources/supplychain.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java b/branches/sca-java-1.3.2/samples/supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java deleted file mode 100644 index 88e0eb7ab8..0000000000 --- a/branches/sca-java-1.3.2/samples/supplychain/src/test/java/supplychain/SupplyChainClientTestCase.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 supplychain; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program shows how to create an SCA runtime, start it, - * locate a the Customer 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 { - - System.out.println("Main thread " + Thread.currentThread()); - customer.purchaseGoods(); - System.out.println("Sleeping ..."); - Thread.sleep(1000); - } -} diff --git a/branches/sca-java-1.3.2/samples/supplychain/supplychain.png b/branches/sca-java-1.3.2/samples/supplychain/supplychain.png deleted file mode 100644 index 51a384e827..0000000000 Binary files a/branches/sca-java-1.3.2/samples/supplychain/supplychain.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/supplychain/supplychain.svg b/branches/sca-java-1.3.2/samples/supplychain/supplychain.svg deleted file mode 100644 index f72e77acab..0000000000 --- a/branches/sca-java-1.3.2/samples/supplychain/supplychain.svg +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - supplychain - - CustomerComponent - - - RetailerComponent - - - WharehouseComponent - - - ShipperComponent - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/web-resource/README b/branches/sca-java-1.3.2/samples/web-resource/README deleted file mode 100644 index 56bffba6a3..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/web-resource/build.xml b/branches/sca-java-1.3.2/samples/web-resource/build.xml deleted file mode 100644 index 5f6b6091e7..0000000000 --- a/branches/sca-java-1.3.2/samples/web-resource/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/web-resource/pom.xml b/branches/sca-java-1.3.2/samples/web-resource/pom.xml deleted file mode 100644 index 34f96fc12c..0000000000 --- a/branches/sca-java-1.3.2/samples/web-resource/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-resource-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.3.2-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.3.2/samples/web-resource/src/main/java/web/resource/SampleServer.java b/branches/sca-java-1.3.2/samples/web-resource/src/main/java/web/resource/SampleServer.java deleted file mode 100644 index 9410de08c4..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/web-resource/src/main/resources/WebResource.composite b/branches/sca-java-1.3.2/samples/web-resource/src/main/resources/WebResource.composite deleted file mode 100644 index 4536136a8b..0000000000 --- a/branches/sca-java-1.3.2/samples/web-resource/src/main/resources/WebResource.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/web-resource/src/main/resources/myContent/index.html b/branches/sca-java-1.3.2/samples/web-resource/src/main/resources/myContent/index.html deleted file mode 100644 index 55de048373..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/web-resource/web-resource.png b/branches/sca-java-1.3.2/samples/web-resource/web-resource.png deleted file mode 100644 index 7259447b65..0000000000 Binary files a/branches/sca-java-1.3.2/samples/web-resource/web-resource.png and /dev/null differ diff --git a/branches/sca-java-1.3.2/samples/web-resource/web-resource.svg b/branches/sca-java-1.3.2/samples/web-resource/web-resource.svg deleted file mode 100644 index 0d1257316c..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/LICENSE b/branches/sca-java-1.3.2/samples/zipcode-jaxws/LICENSE deleted file mode 100644 index 6e529a25c4..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/NOTICE b/branches/sca-java-1.3.2/samples/zipcode-jaxws/NOTICE deleted file mode 100644 index 1325efd8bf..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/README b/branches/sca-java-1.3.2/samples/zipcode-jaxws/README deleted file mode 100644 index 12f81543f0..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/build.xml b/branches/sca-java-1.3.2/samples/zipcode-jaxws/build.xml deleted file mode 100644 index ab8d704352..0000000000 --- a/branches/sca-java-1.3.2/samples/zipcode-jaxws/build.xml +++ /dev/null @@ -1,62 +0,0 @@ - - -]> - - - &buildDependency; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/zipcode-jaxws/pom.xml b/branches/sca-java-1.3.2/samples/zipcode-jaxws/pom.xml deleted file mode 100644 index f49254c49d..0000000000 --- a/branches/sca-java-1.3.2/samples/zipcode-jaxws/pom.xml +++ /dev/null @@ -1,245 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.2-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.3.2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.3.2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.3.2-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.3.2-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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCode.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCode.java deleted file mode 100644 index 8c9a48bf40..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCodeResponse.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCodeResponse.java deleted file mode 100644 index 93847c8809..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCity.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCity.java deleted file mode 100644 index cf9276d417..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCityResponse.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCityResponse.java deleted file mode 100644 index 9dc0e41b2b..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByState.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByState.java deleted file mode 100644 index 48be94b14a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByStateResponse.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByStateResponse.java deleted file mode 100644 index 1645e11ca2..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIP.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIP.java deleted file mode 100644 index 45c948b4b4..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIPResponse.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIPResponse.java deleted file mode 100644 index 9e78dc6d0a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/ObjectFactory.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/ObjectFactory.java deleted file mode 100644 index ced83ff09a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZip.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZip.java deleted file mode 100644 index 22493ba9b8..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZipSoap.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZipSoap.java deleted file mode 100644 index 5ac370005f..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/package-info.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/uszip/package-info.java deleted file mode 100644 index d120f34ee5..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/ArrayOfWeatherData.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/ArrayOfWeatherData.java deleted file mode 100644 index 5385fb57be..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceName.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceName.java deleted file mode 100644 index 9eb205e75d..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceNameResponse.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceNameResponse.java deleted file mode 100644 index e281509623..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCode.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCode.java deleted file mode 100644 index 08d4a70364..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCodeResponse.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCodeResponse.java deleted file mode 100644 index 9288f5332e..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/ObjectFactory.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/ObjectFactory.java deleted file mode 100644 index 0c4fdbcde1..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherData.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherData.java deleted file mode 100644 index a4ca6190b5..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecast.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecast.java deleted file mode 100644 index 0902ce67fe..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecastSoap.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecastSoap.java deleted file mode 100644 index aa000a44d2..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecasts.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecasts.java deleted file mode 100644 index 8ded0946d9..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/package-info.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/com/example/weather/package-info.java deleted file mode 100644 index 6543ed7abf..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/location/LocationClient.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/location/LocationClient.java deleted file mode 100644 index 35c114093a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/location/USLocationImpl.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/location/USLocationImpl.java deleted file mode 100644 index cf27332e60..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastClient.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastClient.java deleted file mode 100644 index c03cf2955f..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastImpl.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastImpl.java deleted file mode 100644 index cf50a6cd9e..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeClient.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeClient.java deleted file mode 100644 index c470230b7a..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeService.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeService.java deleted file mode 100644 index ec0f05dd6c..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeServiceImpl.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeServiceImpl.java deleted file mode 100644 index 284e5a3aa3..0000000000 --- a/branches/sca-java-1.3.2/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-java-1.3.2/samples/zipcode-jaxws/src/main/resources/USLocation.composite b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/resources/USLocation.composite deleted file mode 100644 index a171fe62c9..0000000000 --- a/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/resources/USLocation.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/resources/WeatherForecast.composite b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/resources/WeatherForecast.composite deleted file mode 100644 index 0e1b118e44..0000000000 --- a/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/resources/WeatherForecast.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/resources/ZipCode.composite b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/resources/ZipCode.composite deleted file mode 100644 index 28d674c29b..0000000000 --- a/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/main/resources/ZipCode.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/test/java/zipcode/ZipCodeClientTestCase.java b/branches/sca-java-1.3.2/samples/zipcode-jaxws/src/test/java/zipcode/ZipCodeClientTestCase.java deleted file mode 100644 index 019fce26d6..0000000000 --- a/branches/sca-java-1.3.2/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 { - } -} -- cgit v1.2.3