From 0daf5fae551097b7ab396b3b1c739986eda1208c Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 18 May 2009 05:20:42 +0000 Subject: Remove samples not in build git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@775813 13f79535-47bb-0310-9956-ffa450edef68 --- .../samples/calculator-android/.classpath | 26 -- .../samples/calculator-android/.project | 39 --- .../.settings/org.eclipse.jdt.core.prefs | 5 - .../samples/calculator-android/AndroidManifest.xml | 15 - .../calculator-android/META-INF/MANIFEST.MF | 2 - .../calculator-android/res/drawable/icon.png | Bin 3180 -> 0 bytes .../samples/calculator-android/res/layout/main.xml | 12 - .../calculator-android/res/values/strings.xml | 5 - .../src/calculator/AddService.class | Bin 134 -> 0 bytes .../src/calculator/AddService.java | 11 - .../src/calculator/AddServiceImpl.class | Bin 1019 -> 0 bytes .../src/calculator/AddServiceImpl.java | 18 -- .../src/calculator/CalculatorBuilder.class | Bin 2314 -> 0 bytes .../src/calculator/CalculatorClient.class | Bin 461 -> 0 bytes .../src/calculator/CalculatorClient.java | 30 -- .../src/calculator/CalculatorService.class | Bin 203 -> 0 bytes .../src/calculator/CalculatorService.java | 18 -- .../src/calculator/CalculatorServiceImpl.class | Bin 1682 -> 0 bytes .../src/calculator/CalculatorServiceImpl.java | 54 ---- .../src/calculator/DivideService.class | Bin 143 -> 0 bytes .../src/calculator/DivideService.java | 11 - .../src/calculator/DivideServiceImpl.class | Bin 1037 -> 0 bytes .../src/calculator/DivideServiceImpl.java | 18 -- .../src/calculator/MultiplyService.class | Bin 149 -> 0 bytes .../src/calculator/MultiplyService.java | 11 - .../src/calculator/MultiplyServiceImpl.class | Bin 1050 -> 0 bytes .../src/calculator/MultiplyServiceImpl.java | 18 -- .../src/calculator/SubtractService.class | Bin 149 -> 0 bytes .../src/calculator/SubtractService.java | 11 - .../src/calculator/SubtractServiceImpl.class | Bin 1050 -> 0 bytes .../src/calculator/SubtractServiceImpl.java | 18 -- .../src/calculator/android/CalculatorClient.class | Bin 920 -> 0 bytes .../src/calculator/android/CalculatorClient.java | 233 -------------- .../src/calculator/android/R$attr.class | Bin 340 -> 0 bytes .../src/calculator/android/R$drawable.class | Bin 400 -> 0 bytes .../src/calculator/android/R$layout.class | Bin 394 -> 0 bytes .../src/calculator/android/R$string.class | Bin 427 -> 0 bytes .../src/calculator/android/R.class | Bin 489 -> 0 bytes .../src/calculator/android/R.java | 23 -- .../sca-java-1.5/samples/calculator-osgi/README | 97 ------ .../sca-java-1.5/samples/calculator-osgi/build.xml | 72 ----- .../samples/calculator-osgi/calculator.png | Bin 20552 -> 0 bytes .../samples/calculator-osgi/calculator.svg | 329 ------------------- .../sca-java-1.5/samples/calculator-osgi/pom.xml | 99 ------ .../src/main/java/calculator/AddService.java | 28 -- .../src/main/java/calculator/AddServiceImpl.java | 35 -- .../src/main/java/calculator/CalculatorClient.java | 62 ---- .../main/java/calculator/CalculatorService.java | 35 -- .../java/calculator/CalculatorServiceImpl.java | 70 ---- .../src/main/java/calculator/DivideService.java | 28 -- .../main/java/calculator/DivideServiceImpl.java | 35 -- .../src/main/java/calculator/MultiplyService.java | 28 -- .../main/java/calculator/MultiplyServiceImpl.java | 35 -- .../src/main/java/calculator/SubtractService.java | 28 -- .../main/java/calculator/SubtractServiceImpl.java | 35 -- .../src/main/resources/Calculator.composite | 54 ---- .../test/java/calculator/CalculatorTestCase.java | 57 ---- .../samples/calculator-rcp/build.properties | 5 - .../samples/calculator-rcp/icons/alt_window_16.gif | Bin 637 -> 0 bytes .../samples/calculator-rcp/icons/alt_window_32.gif | Bin 1192 -> 0 bytes .../sca-java-1.5/samples/calculator-rcp/plugin.xml | 31 -- .../sca-java-1.5/samples/calculator-rcp/pom.xml | 126 -------- .../src/main/java/Calculator.composite | 54 ---- .../src/main/java/calculator/AddService.java | 28 -- .../src/main/java/calculator/AddServiceImpl.java | 35 -- .../src/main/java/calculator/CalculatorClient.java | 52 --- .../main/java/calculator/CalculatorService.java | 34 -- .../java/calculator/CalculatorServiceImpl.java | 69 ---- .../src/main/java/calculator/DivideService.java | 28 -- .../main/java/calculator/DivideServiceImpl.java | 35 -- .../src/main/java/calculator/MultiplyService.java | 28 -- .../main/java/calculator/MultiplyServiceImpl.java | 35 -- .../src/main/java/calculator/SubtractService.java | 28 -- .../main/java/calculator/SubtractServiceImpl.java | 35 -- .../src/main/java/calculator/rcp/Activator.java | 94 ------ .../src/main/java/calculator/rcp/Application.java | 63 ---- .../rcp/ApplicationActionBarAdvisor.java | 65 ---- .../rcp/ApplicationWorkbenchAdvisor.java | 37 --- .../rcp/ApplicationWorkbenchWindowAdvisor.java | 44 --- .../src/main/java/calculator/rcp/Perspective.java | 34 -- .../src/main/java/calculator/rcp/View.java | 88 ----- branches/sca-java-1.5/samples/calculator2/README | 97 ------ .../sca-java-1.5/samples/calculator2/build.xml | 72 ----- .../samples/calculator2/calculator.png | Bin 20552 -> 0 bytes .../samples/calculator2/calculator.svg | 329 ------------------- branches/sca-java-1.5/samples/calculator2/pom.xml | 65 ---- .../src/main/java/calculator/AddService.java | 28 -- .../src/main/java/calculator/AddServiceImpl.java | 35 -- .../src/main/java/calculator/CalculatorClient.java | 45 --- .../main/java/calculator/CalculatorService.java | 35 -- .../java/calculator/CalculatorServiceImpl.java | 70 ---- .../src/main/java/calculator/DivideService.java | 28 -- .../main/java/calculator/DivideServiceImpl.java | 35 -- .../src/main/java/calculator/MultiplyService.java | 28 -- .../main/java/calculator/MultiplyServiceImpl.java | 35 -- .../src/main/java/calculator/SubtractService.java | 28 -- .../main/java/calculator/SubtractServiceImpl.java | 35 -- .../src/main/resources/Calculator.composite | 49 --- .../test/java/calculator/CalculatorTestCase.java | 51 --- branches/sca-java-1.5/samples/chat2-webapp/README | 61 ---- .../sca-java-1.5/samples/chat2-webapp/build.xml | 117 ------- branches/sca-java-1.5/samples/chat2-webapp/pom.xml | 104 ------ .../src/main/java/sample/ChatCallback.java | 27 -- .../src/main/java/sample/ChatService.java | 32 -- .../src/main/java/sample/ChatServiceImpl.java | 36 --- .../chat2-webapp/src/main/resources/chat.composite | 40 --- .../src/main/webapp/META-INF/sca-contribution.xml | 24 -- .../chat2-webapp/src/main/webapp/WEB-INF/web.xml | 37 --- .../samples/chat2-webapp/src/main/webapp/chat.html | 73 ----- branches/sca-java-1.5/samples/domain-webapp/README | 310 ------------------ .../sca-java-1.5/samples/domain-webapp/build.xml | 296 ----------------- .../sca-java-1.5/samples/domain-webapp/pom.xml | 101 ------ .../src/main/java/node/DomainServer.java | 54 ---- .../main/resources/META-INF/sca-contribution.xml | 23 -- .../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 ---------- .../sca-java-1.5/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/helloworld.bpel | 66 ---- .../src/main/resources/helloworld.composite | 33 -- .../src/main/resources/helloworld.wsdl | 82 ----- .../src/main/resources/log4j.properties | 35 -- .../java/helloworld/BPELHelloWorldTestCase.java | 59 ---- .../samples/helloworld-distributed/README | 29 -- .../helloworld-distributed/helloworld-node/README | 29 -- .../helloworld-distributed/helloworld-node/pom.xml | 57 ---- .../src/main/java/sample/Helloworld.java | 29 -- .../src/main/java/sample/HelloworldImpl.java | 29 -- .../META-INF/sca-deployables/Helloworld.composite | 28 -- .../helloworld-webapp/README | 29 -- .../helloworld-webapp/build.xml | 127 -------- .../helloworld-webapp/pom.xml | 78 ----- .../src/main/java/sample/Helloworld.java | 27 -- .../src/main/webapp/WEB-INF/web.composite | 29 -- .../src/main/webapp/WEB-INF/web.xml | 41 --- .../helloworld-webapp/src/main/webapp/hello.jsp | 36 --- .../sca-java-1.5/samples/helloworld-jsp/pom.xml | 54 ---- .../src/main/java/sample/HelloworldService.java | 7 - .../main/java/sample/HelloworldServiceImpl.java | 12 - .../webapp/META-INF/sca-deployables/web.composite | 34 -- .../helloworld-jsp/src/main/webapp/WEB-INF/web.xml | 42 --- .../helloworld-jsp/src/main/webapp/hello.jsp | 36 --- .../sca-java-1.5/samples/helloworld-script/README | 97 ------ .../sca-java-1.5/samples/helloworld-script/pom.xml | 50 --- .../src/main/java/sample/Helloworld.java | 25 -- .../src/main/java/sample/HelloworldClient.java | 44 --- .../src/main/resources/helloworld.composite | 30 -- .../src/main/resources/helloworld.js | 4 - .../src/test/java/sample/HelloworldTestCase.java | 51 --- .../samples/helloworld-servlet/pom.xml | 61 ---- .../src/main/java/sample/HelloworldService.java | 7 - .../main/java/sample/HelloworldServiceImpl.java | 12 - .../src/main/java/sample/HelloworldServlet.java | 65 ---- .../webapp/META-INF/sca-deployables/web.composite | 33 -- .../src/main/webapp/WEB-INF/web.xml | 52 --- .../helloworld-servlet/src/main/webapp/hello.html | 46 --- .../sca-java-1.5/samples/helloworld-spring/README | 97 ------ .../sca-java-1.5/samples/helloworld-spring/pom.xml | 56 ---- .../src/main/java/sample/Helloworld.java | 25 -- .../src/main/java/sample/HelloworldClient.java | 44 --- .../src/main/java/sample/HelloworldImpl.java | 27 -- .../main/resources/helloworld-spring-context.xml | 29 -- .../src/main/resources/helloworld.composite | 29 -- .../src/test/java/sample/HelloworldTestCase.java | 51 --- .../samples/helloworld-web-callback/pom.xml | 68 ---- .../src/main/java/sample/HelloworldCallback.java | 30 -- .../src/main/java/sample/HelloworldService.java | 14 - .../main/java/sample/HelloworldServiceImpl.java | 27 -- .../webapp/META-INF/sca-deployables/web.composite | 45 --- .../src/main/webapp/WEB-INF/web.xml | 42 --- .../src/main/webapp/hello.html | 63 ---- .../sca-java-1.5/samples/helloworld-web/pom.xml | 68 ---- .../src/main/java/sample/HelloworldService.java | 7 - .../main/java/sample/HelloworldServiceImpl.java | 12 - .../webapp/META-INF/sca-deployables/web.composite | 39 --- .../helloworld-web/src/main/webapp/WEB-INF/web.xml | 42 --- .../helloworld-web/src/main/webapp/hello.html | 62 ---- .../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/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 -- .../sca-java-1.5/samples/store-android/.classpath | 6 - .../sca-java-1.5/samples/store-android/.project | 33 -- .../samples/store-android/AndroidManifest.xml | 18 -- .../samples/store-android/res/drawable/icon.png | Bin 3180 -> 0 bytes .../samples/store-android/res/layout/main.xml | 47 --- .../samples/store-android/res/values/strings.xml | 5 - .../store-android/src/services/Catalog.java | 24 -- .../store-android/src/services/CatalogProxy.java | 71 ----- .../samples/store-android/src/services/Item.java | 51 --- .../src/services/ShoppingCartProxy.java | 68 ---- .../src/services/json/rpc/JSONRpc.java | 63 ---- .../samples/store-android/src/store/android/R.java | 29 -- .../store-android/src/store/android/catalog.java | 101 ------ .../sca-java-1.5/samples/zipcode-jaxws/LICENSE | 205 ------------ branches/sca-java-1.5/samples/zipcode-jaxws/NOTICE | 6 - branches/sca-java-1.5/samples/zipcode-jaxws/README | 77 ----- .../sca-java-1.5/samples/zipcode-jaxws/build.xml | 72 ----- .../sca-java-1.5/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 | 38 --- .../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 --- 253 files changed, 13794 deletions(-) delete mode 100644 branches/sca-java-1.5/samples/calculator-android/.classpath delete mode 100644 branches/sca-java-1.5/samples/calculator-android/.project delete mode 100644 branches/sca-java-1.5/samples/calculator-android/.settings/org.eclipse.jdt.core.prefs delete mode 100644 branches/sca-java-1.5/samples/calculator-android/AndroidManifest.xml delete mode 100644 branches/sca-java-1.5/samples/calculator-android/META-INF/MANIFEST.MF delete mode 100644 branches/sca-java-1.5/samples/calculator-android/res/drawable/icon.png delete mode 100644 branches/sca-java-1.5/samples/calculator-android/res/layout/main.xml delete mode 100644 branches/sca-java-1.5/samples/calculator-android/res/values/strings.xml delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/AddService.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/AddService.java delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/AddServiceImpl.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/AddServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorBuilder.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorClient.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorClient.java delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorService.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorService.java delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorServiceImpl.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/DivideService.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/DivideService.java delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/DivideServiceImpl.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/MultiplyService.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/MultiplyService.java delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/MultiplyServiceImpl.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/SubtractService.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/SubtractService.java delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/SubtractServiceImpl.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/android/CalculatorClient.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/android/CalculatorClient.java delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R$attr.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R$drawable.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R$layout.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R$string.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R.class delete mode 100644 branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R.java delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/README delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/build.xml delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/calculator.png delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/calculator.svg delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/pom.xml delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/src/main/resources/Calculator.composite delete mode 100644 branches/sca-java-1.5/samples/calculator-osgi/src/test/java/calculator/CalculatorTestCase.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/build.properties delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/icons/alt_window_16.gif delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/icons/alt_window_32.gif delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/plugin.xml delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/pom.xml delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/Calculator.composite delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/Application.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationActionBarAdvisor.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationWorkbenchAdvisor.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationWorkbenchWindowAdvisor.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/Perspective.java delete mode 100644 branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/View.java delete mode 100644 branches/sca-java-1.5/samples/calculator2/README delete mode 100644 branches/sca-java-1.5/samples/calculator2/build.xml delete mode 100644 branches/sca-java-1.5/samples/calculator2/calculator.png delete mode 100644 branches/sca-java-1.5/samples/calculator2/calculator.svg delete mode 100644 branches/sca-java-1.5/samples/calculator2/pom.xml delete mode 100644 branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/calculator2/src/main/resources/Calculator.composite delete mode 100644 branches/sca-java-1.5/samples/calculator2/src/test/java/calculator/CalculatorTestCase.java delete mode 100644 branches/sca-java-1.5/samples/chat2-webapp/README delete mode 100644 branches/sca-java-1.5/samples/chat2-webapp/build.xml delete mode 100644 branches/sca-java-1.5/samples/chat2-webapp/pom.xml delete mode 100644 branches/sca-java-1.5/samples/chat2-webapp/src/main/java/sample/ChatCallback.java delete mode 100644 branches/sca-java-1.5/samples/chat2-webapp/src/main/java/sample/ChatService.java delete mode 100644 branches/sca-java-1.5/samples/chat2-webapp/src/main/java/sample/ChatServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/chat2-webapp/src/main/resources/chat.composite delete mode 100644 branches/sca-java-1.5/samples/chat2-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.5/samples/chat2-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.5/samples/chat2-webapp/src/main/webapp/chat.html delete mode 100644 branches/sca-java-1.5/samples/domain-webapp/README delete mode 100644 branches/sca-java-1.5/samples/domain-webapp/build.xml delete mode 100644 branches/sca-java-1.5/samples/domain-webapp/pom.xml delete mode 100644 branches/sca-java-1.5/samples/domain-webapp/src/main/java/node/DomainServer.java delete mode 100755 branches/sca-java-1.5/samples/domain-webapp/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.5/samples/domain-webapp/src/main/resources/domain.composite delete mode 100644 branches/sca-java-1.5/samples/domain-webapp/src/main/resources/webroot/index.html delete mode 100644 branches/sca-java-1.5/samples/domain-webapp/src/main/resources/webroot/node.png delete mode 100644 branches/sca-java-1.5/samples/domain-webapp/src/main/resources/webroot/style.css delete mode 100644 branches/sca-java-1.5/samples/helloworld-bpel-ws/README delete mode 100644 branches/sca-java-1.5/samples/helloworld-bpel-ws/build.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-bpel-ws/helloworld-bpel.png delete mode 100644 branches/sca-java-1.5/samples/helloworld-bpel-ws/helloworld-bpel.svg delete mode 100644 branches/sca-java-1.5/samples/helloworld-bpel-ws/pom.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-bpel-ws/src/main/java/helloworld/BPELClient.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-bpel-ws/src/main/resources/helloworld.bpel delete mode 100644 branches/sca-java-1.5/samples/helloworld-bpel-ws/src/main/resources/helloworld.composite delete mode 100644 branches/sca-java-1.5/samples/helloworld-bpel-ws/src/main/resources/helloworld.wsdl delete mode 100644 branches/sca-java-1.5/samples/helloworld-bpel-ws/src/main/resources/log4j.properties delete mode 100644 branches/sca-java-1.5/samples/helloworld-bpel-ws/src/test/java/helloworld/BPELHelloWorldTestCase.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-distributed/README delete mode 100644 branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/README delete mode 100644 branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/pom.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/src/main/java/sample/Helloworld.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/src/main/java/sample/HelloworldImpl.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/src/main/resources/META-INF/sca-deployables/Helloworld.composite delete mode 100644 branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/README delete mode 100644 branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/build.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/pom.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/src/main/java/sample/Helloworld.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/src/main/webapp/WEB-INF/web.composite delete mode 100644 branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/src/main/webapp/hello.jsp delete mode 100644 branches/sca-java-1.5/samples/helloworld-jsp/pom.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-jsp/src/main/java/sample/HelloworldService.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-jsp/src/main/java/sample/HelloworldServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-jsp/src/main/webapp/META-INF/sca-deployables/web.composite delete mode 100644 branches/sca-java-1.5/samples/helloworld-jsp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-jsp/src/main/webapp/hello.jsp delete mode 100644 branches/sca-java-1.5/samples/helloworld-script/README delete mode 100644 branches/sca-java-1.5/samples/helloworld-script/pom.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-script/src/main/java/sample/Helloworld.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-script/src/main/java/sample/HelloworldClient.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-script/src/main/resources/helloworld.composite delete mode 100644 branches/sca-java-1.5/samples/helloworld-script/src/main/resources/helloworld.js delete mode 100644 branches/sca-java-1.5/samples/helloworld-script/src/test/java/sample/HelloworldTestCase.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-servlet/pom.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-servlet/src/main/java/sample/HelloworldService.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-servlet/src/main/java/sample/HelloworldServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-servlet/src/main/webapp/META-INF/sca-deployables/web.composite delete mode 100644 branches/sca-java-1.5/samples/helloworld-servlet/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-servlet/src/main/webapp/hello.html delete mode 100644 branches/sca-java-1.5/samples/helloworld-spring/README delete mode 100644 branches/sca-java-1.5/samples/helloworld-spring/pom.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-spring/src/main/java/sample/Helloworld.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-spring/src/main/java/sample/HelloworldClient.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-spring/src/main/java/sample/HelloworldImpl.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-spring/src/main/resources/helloworld-spring-context.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-spring/src/main/resources/helloworld.composite delete mode 100644 branches/sca-java-1.5/samples/helloworld-spring/src/test/java/sample/HelloworldTestCase.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-web-callback/pom.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-web-callback/src/main/java/sample/HelloworldCallback.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-web-callback/src/main/java/sample/HelloworldService.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-web-callback/src/main/java/sample/HelloworldServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-web-callback/src/main/webapp/META-INF/sca-deployables/web.composite delete mode 100644 branches/sca-java-1.5/samples/helloworld-web-callback/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-web-callback/src/main/webapp/hello.html delete mode 100644 branches/sca-java-1.5/samples/helloworld-web/pom.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-web/src/main/java/sample/HelloworldService.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-web/src/main/java/sample/HelloworldServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-web/src/main/webapp/META-INF/sca-deployables/web.composite delete mode 100644 branches/sca-java-1.5/samples/helloworld-web/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-web/src/main/webapp/hello.html delete mode 100644 branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/README delete mode 100644 branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/build.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/pom.xml delete mode 100644 branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/src/main/resources/META-INF/sca-deployables/helloworldws.composite delete mode 100644 branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/src/main/resources/wsdl/helloworld.wsdl delete mode 100644 branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.5/samples/spi-implementation-pojo/pom.xml delete mode 100644 branches/sca-java-1.5/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementation.java delete mode 100644 branches/sca-java-1.5/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementationActivator.java delete mode 100644 branches/sca-java-1.5/samples/spi-implementation-pojo/src/main/java/sample/JavaInvoker.java delete mode 100644 branches/sca-java-1.5/samples/spi-implementation-pojo/src/main/java/sample/JavaInvokerFactory.java delete mode 100644 branches/sca-java-1.5/samples/spi-implementation-pojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.spi.ImplementationActivator delete mode 100644 branches/sca-java-1.5/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorld.java delete mode 100644 branches/sca-java-1.5/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-1.5/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorldTestCase.java delete mode 100644 branches/sca-java-1.5/samples/spi-implementation-pojo/src/test/resources/helloworld/helloworld.composite delete mode 100644 branches/sca-java-1.5/samples/store-android/.classpath delete mode 100644 branches/sca-java-1.5/samples/store-android/.project delete mode 100644 branches/sca-java-1.5/samples/store-android/AndroidManifest.xml delete mode 100644 branches/sca-java-1.5/samples/store-android/res/drawable/icon.png delete mode 100644 branches/sca-java-1.5/samples/store-android/res/layout/main.xml delete mode 100644 branches/sca-java-1.5/samples/store-android/res/values/strings.xml delete mode 100644 branches/sca-java-1.5/samples/store-android/src/services/Catalog.java delete mode 100644 branches/sca-java-1.5/samples/store-android/src/services/CatalogProxy.java delete mode 100644 branches/sca-java-1.5/samples/store-android/src/services/Item.java delete mode 100644 branches/sca-java-1.5/samples/store-android/src/services/ShoppingCartProxy.java delete mode 100644 branches/sca-java-1.5/samples/store-android/src/services/json/rpc/JSONRpc.java delete mode 100644 branches/sca-java-1.5/samples/store-android/src/store/android/R.java delete mode 100644 branches/sca-java-1.5/samples/store-android/src/store/android/catalog.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/LICENSE delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/NOTICE delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/README delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/build.xml delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/pom.xml delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCode.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCodeResponse.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCity.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCityResponse.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByState.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByStateResponse.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIP.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIPResponse.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/ObjectFactory.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZip.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZipSoap.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/package-info.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/ArrayOfWeatherData.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceName.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceNameResponse.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCode.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCodeResponse.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/ObjectFactory.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherData.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecast.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecastSoap.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecasts.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/package-info.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/location/LocationClient.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/location/USLocationImpl.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastClient.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastImpl.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeClient.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeService.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeServiceImpl.java delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/resources/USLocation.composite delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/resources/WeatherForecast.composite delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/main/resources/ZipCode.composite delete mode 100644 branches/sca-java-1.5/samples/zipcode-jaxws/src/test/java/zipcode/ZipCodeClientTestCase.java diff --git a/branches/sca-java-1.5/samples/calculator-android/.classpath b/branches/sca-java-1.5/samples/calculator-android/.classpath deleted file mode 100644 index 73c77ee74d..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/.classpath +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/calculator-android/.project b/branches/sca-java-1.5/samples/calculator-android/.project deleted file mode 100644 index b0a16117c8..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/.project +++ /dev/null @@ -1,39 +0,0 @@ - - - calculator-android - - - tuscany-assembly - tuscany-definitions - tuscany-extensibility - tuscany-interface - tuscany-monitor - tuscany-policy - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - diff --git a/branches/sca-java-1.5/samples/calculator-android/.settings/org.eclipse.jdt.core.prefs b/branches/sca-java-1.5/samples/calculator-android/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 4077c7b7f0..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -#Mon Nov 24 19:53:10 PST 2008 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/branches/sca-java-1.5/samples/calculator-android/AndroidManifest.xml b/branches/sca-java-1.5/samples/calculator-android/AndroidManifest.xml deleted file mode 100644 index ad6daf347e..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/AndroidManifest.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.5/samples/calculator-android/META-INF/MANIFEST.MF b/branches/sca-java-1.5/samples/calculator-android/META-INF/MANIFEST.MF deleted file mode 100644 index 58630c02ef..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/branches/sca-java-1.5/samples/calculator-android/res/drawable/icon.png b/branches/sca-java-1.5/samples/calculator-android/res/drawable/icon.png deleted file mode 100644 index 75024841d3..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/res/drawable/icon.png and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/res/layout/main.xml b/branches/sca-java-1.5/samples/calculator-android/res/layout/main.xml deleted file mode 100644 index 3a5f117d3c..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/res/layout/main.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/branches/sca-java-1.5/samples/calculator-android/res/values/strings.xml b/branches/sca-java-1.5/samples/calculator-android/res/values/strings.xml deleted file mode 100644 index 71052e74b8..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/res/values/strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - Hello World, CalculatorClient - Calculator - diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/AddService.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/AddService.class deleted file mode 100644 index 8a5ed25f9f..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/AddService.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/AddService.java b/branches/sca-java-1.5/samples/calculator-android/src/calculator/AddService.java deleted file mode 100644 index 21c6789632..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/src/calculator/AddService.java +++ /dev/null @@ -1,11 +0,0 @@ -package calculator; - - -/** - * The Add service interface - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/AddServiceImpl.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/AddServiceImpl.class deleted file mode 100644 index c6fd83f6a1..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/AddServiceImpl.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/AddServiceImpl.java b/branches/sca-java-1.5/samples/calculator-android/src/calculator/AddServiceImpl.java deleted file mode 100644 index 6181a1c651..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/src/calculator/AddServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -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.5/samples/calculator-android/src/calculator/CalculatorBuilder.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorBuilder.class deleted file mode 100644 index b4466a3017..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorBuilder.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorClient.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorClient.class deleted file mode 100644 index aaf9e9710f..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorClient.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorClient.java b/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorClient.java deleted file mode 100644 index 3b977259e8..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorClient.java +++ /dev/null @@ -1,30 +0,0 @@ -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.5/samples/calculator-android/src/calculator/CalculatorService.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorService.class deleted file mode 100644 index c3cc2911e9..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorService.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorService.java b/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorService.java deleted file mode 100644 index 862d7b892d..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorService.java +++ /dev/null @@ -1,18 +0,0 @@ -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.5/samples/calculator-android/src/calculator/CalculatorServiceImpl.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorServiceImpl.class deleted file mode 100644 index 8e0f206119..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorServiceImpl.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorServiceImpl.java b/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 2c88b5319e..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/src/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -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.5/samples/calculator-android/src/calculator/DivideService.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/DivideService.class deleted file mode 100644 index 8f056b16b6..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/DivideService.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/DivideService.java b/branches/sca-java-1.5/samples/calculator-android/src/calculator/DivideService.java deleted file mode 100644 index 8f544632dc..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/src/calculator/DivideService.java +++ /dev/null @@ -1,11 +0,0 @@ -package calculator; - - -/** - * The divide service interface - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/DivideServiceImpl.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/DivideServiceImpl.class deleted file mode 100644 index 09cae06d9c..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/DivideServiceImpl.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/DivideServiceImpl.java b/branches/sca-java-1.5/samples/calculator-android/src/calculator/DivideServiceImpl.java deleted file mode 100644 index 5dfae77222..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/src/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -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.5/samples/calculator-android/src/calculator/MultiplyService.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/MultiplyService.class deleted file mode 100644 index 6542db7083..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/MultiplyService.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/MultiplyService.java b/branches/sca-java-1.5/samples/calculator-android/src/calculator/MultiplyService.java deleted file mode 100644 index f7f4ee77b5..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/src/calculator/MultiplyService.java +++ /dev/null @@ -1,11 +0,0 @@ -package calculator; - - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/MultiplyServiceImpl.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/MultiplyServiceImpl.class deleted file mode 100644 index 0e69e7ad2d..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/MultiplyServiceImpl.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/MultiplyServiceImpl.java b/branches/sca-java-1.5/samples/calculator-android/src/calculator/MultiplyServiceImpl.java deleted file mode 100644 index 3142f86a58..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/src/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -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.5/samples/calculator-android/src/calculator/SubtractService.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/SubtractService.class deleted file mode 100644 index 84c741e301..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/SubtractService.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/SubtractService.java b/branches/sca-java-1.5/samples/calculator-android/src/calculator/SubtractService.java deleted file mode 100644 index 2349febb0f..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/src/calculator/SubtractService.java +++ /dev/null @@ -1,11 +0,0 @@ -package calculator; - - -/** - * The interface for the multiply service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/SubtractServiceImpl.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/SubtractServiceImpl.class deleted file mode 100644 index 7b1aeab811..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/SubtractServiceImpl.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/SubtractServiceImpl.java b/branches/sca-java-1.5/samples/calculator-android/src/calculator/SubtractServiceImpl.java deleted file mode 100644 index ec55f4f07d..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/src/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -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.5/samples/calculator-android/src/calculator/android/CalculatorClient.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/CalculatorClient.class deleted file mode 100644 index 20b588f972..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/CalculatorClient.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/CalculatorClient.java b/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/CalculatorClient.java deleted file mode 100644 index 9e5c782447..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/CalculatorClient.java +++ /dev/null @@ -1,233 +0,0 @@ -package calculator.android; - -import java.io.FileDescriptor; -import java.net.InetAddress; -import java.net.URL; -import java.security.Permission; - -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -import android.app.Activity; -import android.os.Bundle; -import android.widget.TextView; -import calculator.CalculatorService; - -public class CalculatorClient extends Activity { - private EmbeddedSCADomain domain; - private CalculatorService calculatorService; - - /** Called when the activity is first created. */ - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - String calculationResult = "Error !"; - try { - System.setSecurityManager(new SecurityManager() { - @Override - public void checkPermission(Permission permission) { - - } - - @Override - public void checkAccept(String host, int port) { - - } - - @Override - public void checkAccess(Thread thread) { - // TODO Auto-generated method stub - - } - @Override - public void checkAccess(ThreadGroup group) { - - } - - @Override - public void checkAwtEventQueueAccess() { - // TODO Auto-generated method stub - - } - @Override - public void checkConnect(String host, int port) { - - } - @Override - public void checkConnect(String host, int port, Object context) { - - } - @Override - public void checkCreateClassLoader() { - // TODO Auto-generated method stub - - } - @Override - public void checkDelete(String file) { - - } - @Override - public void checkExec(String cmd) { - // TODO Auto-generated method stub - - } - @Override - public void checkExit(int status) { - - } - @Override - public void checkLink(String libName) { - // TODO Auto-generated method stub - - } - @Override - public void checkListen(int port) { - // TODO Auto-generated method stub - - } - @Override - public void checkMemberAccess(Class cls, int type) { - // TODO Auto-generated method stub - - } - @Override - public void checkMulticast(InetAddress maddr) { - // TODO Auto-generated method stub - - } - @Override - public void checkMulticast(InetAddress maddr, byte ttl) { - // TODO Auto-generated method stub - - } - @Override - public void checkPackageAccess(String packageName) { - // TODO Auto-generated method stub - - } - @Override - public void checkPackageDefinition(String packageName) { - // TODO Auto-generated method stub - - } - @Override - public void checkPermission(Permission permission, - Object context) { - // TODO Auto-generated method stub - - } - @Override - public void checkPrintJobAccess() { - // TODO Auto-generated method stub - - } - @Override - public void checkPropertiesAccess() { - // TODO Auto-generated method stub - - } - @Override - public void checkPropertyAccess(String key) { - // TODO Auto-generated method stub - - } - @Override - public void checkRead(FileDescriptor fd) { - // TODO Auto-generated method stub - - } - @Override - public void checkRead(String file) { - // TODO Auto-generated method stub - - } - @Override - public void checkRead(String file, Object context) { - // TODO Auto-generated method stub - - } - @Override - public void checkSecurityAccess(String target) { - // TODO Auto-generated method stub - - } - @Override - public void checkSetFactory() { - // TODO Auto-generated method stub - - } - @Override - public void checkSystemClipboardAccess() { - // TODO Auto-generated method stub - - } - - @Override - public void checkWrite(FileDescriptor fd) { - // TODO Auto-generated method stub - - } - @Override - public void checkWrite(String file) { - // TODO Auto-generated method stub - - } - - }); - - Thread.currentThread().setContextClassLoader(getClassLoader()); - - 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(); - - } catch(Exception e) { - e.printStackTrace(); - } - - - - TextView tv = new TextView(this); - tv.setText("3 + 2 =" + calculationResult); - setContentView(tv); - - } - - @Override - protected void onDestroy() { - super.onDestroy(); - - try { - //scaDomain.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Override - public void onContentChanged() { - super.onContentChanged(); - /* - // 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)); - */ - - } - - -} \ No newline at end of file diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R$attr.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R$attr.class deleted file mode 100644 index 4d7e121ddc..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R$attr.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R$drawable.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R$drawable.class deleted file mode 100644 index 842aa47958..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R$drawable.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R$layout.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R$layout.class deleted file mode 100644 index 2b7eadeac8..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R$layout.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R$string.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R$string.class deleted file mode 100644 index fd104e6c86..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R$string.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R.class b/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R.class deleted file mode 100644 index 7bca04a8a4..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R.class and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R.java b/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R.java deleted file mode 100644 index a338c98c3a..0000000000 --- a/branches/sca-java-1.5/samples/calculator-android/src/calculator/android/R.java +++ /dev/null @@ -1,23 +0,0 @@ -/* AUTO-GENERATED FILE. DO NOT MODIFY. - * - * This class was automatically generated by the - * aapt tool from the resource data it found. It - * should not be modified by hand. - */ - -package calculator.android; - -public final class R { - public static final class attr { - } - public static final class drawable { - public static final int icon=0x7f020000; - } - public static final class layout { - public static final int main=0x7f030000; - } - public static final class string { - public static final int app_name=0x7f040001; - public static final int hello=0x7f040000; - } -} diff --git a/branches/sca-java-1.5/samples/calculator-osgi/README b/branches/sca-java-1.5/samples/calculator-osgi/README deleted file mode 100644 index cde5fe981f..0000000000 --- a/branches/sca-java-1.5/samples/calculator-osgi/README +++ /dev/null @@ -1,97 +0,0 @@ -Calculator Sample -================= -This sample implements a simple calculator using SCA components. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator.jar calculator.CalculatorClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator.jar calculator.CalculatorClient - -Sample Overview ---------------- -The sample provides a single calculator service with a default SCA (java) -binding. The CalculatorClient exercises this interface by calling add, -subtract, multiply and divide operations. This results in messages passing to -the appropriate components in the composite across the local wires. - -calculator/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - the first component, calls +-/* as - appropriate - CalculatorServiceImpl.java - AddService.java - adds two numbers - AddServiceImpl.java - SubtractService.java - subtracts one number from another - SubtractServiceImpl.java - MultiplyService.java - multiplies two numbers - MultiplyServiceImpl.java - DivideService.java - divides one number by another - DivideServiceImpl.java - CalculatorClient.java - starts the SCA Runtime and - deploys the Calculator.composite. - It then calls the deployed Calculator - Components services - resources/ - Calculator.composite - the SCA assembly for this sample - test/ - java/ - calculator/ - CalculatorTestCase.java - JUnit test case - calculator.png - a pictorial representation of the sample - .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd calculator -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 3 + 2=5.0 - [java] 3 - 2=1.0 - [java] 3 * 2=6.0 - [java] 3 / 2=1.5 - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.CalculatorTestCase -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.272 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-java-1.5/samples/calculator-osgi/build.xml b/branches/sca-java-1.5/samples/calculator-osgi/build.xml deleted file mode 100644 index c4b755ef94..0000000000 --- a/branches/sca-java-1.5/samples/calculator-osgi/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/calculator-osgi/calculator.png b/branches/sca-java-1.5/samples/calculator-osgi/calculator.png deleted file mode 100644 index 995a57b1fd..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-osgi/calculator.png and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-osgi/calculator.svg b/branches/sca-java-1.5/samples/calculator-osgi/calculator.svg deleted file mode 100644 index af34f07e04..0000000000 --- a/branches/sca-java-1.5/samples/calculator-osgi/calculator.svg +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - - - diff --git a/branches/sca-java-1.5/samples/calculator-osgi/pom.xml b/branches/sca-java-1.5/samples/calculator-osgi/pom.xml deleted file mode 100644 index 0bcbf62149..0000000000 --- a/branches/sca-java-1.5/samples/calculator-osgi/pom.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.5-SNAPSHOT - ../../pom.xml - - sample-calculator-osgi - Apache Tuscany SCA Calculator OSGi Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-node-api - 1.5-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-node-runtime - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-extensibility-equinox - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-node-launcher-equinox - 1.5-SNAPSHOT - compile - - - - javax.servlet - servlet-api - 2.5 - provided - - - - junit - junit - 4.5 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/AddService.java b/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/AddService.java deleted file mode 100644 index 188451ebac..0000000000 --- a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The Add service interface - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/AddServiceImpl.java b/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 7ca8fb04b5..0000000000 --- a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Add service - */ -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Adding " + n1 + " and " + n2); - return n1 + n2; - } - -} diff --git a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/CalculatorClient.java b/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index c193b2ce66..0000000000 --- a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator; - -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -@Scope("COMPOSITE") @EagerInit -public class CalculatorClient { - - private CalculatorService calculatorService; - - @Reference - public void setCalculatorService(CalculatorService calculatorService) { - this.calculatorService = calculatorService; - } - - @Init - public void calculate() { - - // Calculate - System.out.println("SCA API ClassLoader: " + print(Reference.class.getClassLoader())); - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - } - - private static String print(ClassLoader cl) { - StringBuffer buf = new StringBuffer(); - for (; cl != null;) { - buf.append(cl.toString()); - buf.append(' '); - cl = cl.getParent(); - } - return buf.toString(); - } - -} diff --git a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/CalculatorService.java b/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 031fa8b912..0000000000 --- a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 3d861f2018..0000000000 --- a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Reference; - - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/DivideService.java b/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The divide service interface - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 1323edf55a..0000000000 --- a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Dividing " + n1 + " with " + n2); - return n1 / n2; - } - -} diff --git a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/MultiplyService.java b/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index 91b803bc9e..0000000000 --- a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Multiplying " + n1 + " with " + n2); - return n1 * n2; - } - -} diff --git a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/SubtractService.java b/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 58cc4a3547..0000000000 --- a/branches/sca-java-1.5/samples/calculator-osgi/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Subtracting " + n1 + " from " + n2); - return n1 - n2; - } - -} diff --git a/branches/sca-java-1.5/samples/calculator-osgi/src/main/resources/Calculator.composite b/branches/sca-java-1.5/samples/calculator-osgi/src/main/resources/Calculator.composite deleted file mode 100644 index 913081b9be..0000000000 --- a/branches/sca-java-1.5/samples/calculator-osgi/src/main/resources/Calculator.composite +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/calculator-osgi/src/test/java/calculator/CalculatorTestCase.java b/branches/sca-java-1.5/samples/calculator-osgi/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index dc0da7d20d..0000000000 --- a/branches/sca-java-1.5/samples/calculator-osgi/src/test/java/calculator/CalculatorTestCase.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Scope; - -/** - * This shows how to test the Calculator composition. - */ -@Scope("COMPOSITE") -@EagerInit -public class CalculatorTestCase extends TestCase { - - private NodeLauncher launcher; - private SCANode node; - - @Override - protected void setUp() throws Exception { - launcher = NodeLauncher.newInstance(); - node = launcher.createNodeFromClassLoader("Calculator.composite", getClass().getClassLoader()); - System.out.println("SCA Node API ClassLoader: " + node.getClass().getClassLoader()); - node.start(); - } - - @Override - protected void tearDown() throws Exception { - if (launcher != null) { - node.stop(); - launcher.destroy(); - } - } - - public void testDummy() { - } - -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/build.properties b/branches/sca-java-1.5/samples/calculator-rcp/build.properties deleted file mode 100644 index 0530eb648b..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -source.. = src/main/java/ -output.. = target/classes/ -bin.includes = plugin.xml,\ - META-INF/,\ - . diff --git a/branches/sca-java-1.5/samples/calculator-rcp/icons/alt_window_16.gif b/branches/sca-java-1.5/samples/calculator-rcp/icons/alt_window_16.gif deleted file mode 100644 index 05626b17d8..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-rcp/icons/alt_window_16.gif and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-rcp/icons/alt_window_32.gif b/branches/sca-java-1.5/samples/calculator-rcp/icons/alt_window_32.gif deleted file mode 100644 index b432f88339..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator-rcp/icons/alt_window_32.gif and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator-rcp/plugin.xml b/branches/sca-java-1.5/samples/calculator-rcp/plugin.xml deleted file mode 100644 index 1fb5acd9b5..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/plugin.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/calculator-rcp/pom.xml b/branches/sca-java-1.5/samples/calculator-rcp/pom.xml deleted file mode 100644 index 3dd10517c3..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/pom.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.5-SNAPSHOT - ../../pom.xml - - sample.calculator.rcp - Apache Tuscany SCA Calculator RCP Sample - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-node-api - 1.5-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-node-impl - 1.5-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.5-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-implementation-node-runtime - 1.5-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-extensibility-equinox - 1.5-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-node-launcher-equinox - 1.5-SNAPSHOT - compile - - - - javax.servlet - servlet-api - 2.5 - provided - - - junit - junit - 4.5 - test - - - - ${artifactId} - - - maven-eclipse-plugin - 2.5.1 - - - org.eclipse.pde.ManifestBuilder - org.eclipse.jdt.core.javabuilder - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - - - org.eclipse.jdt.launching.JRE_CONTAINER - - org.eclipse.pde.core.requiredPlugins - - - - - - maven-jar-plugin - - - ${basedir}/META-INF/MANIFEST.MF - - - - - - diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/Calculator.composite b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/Calculator.composite deleted file mode 100644 index 913081b9be..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/Calculator.composite +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/AddService.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/AddService.java deleted file mode 100644 index 188451ebac..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The Add service interface - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/AddServiceImpl.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 7ca8fb04b5..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Add service - */ -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Adding " + n1 + " and " + n2); - return n1 + n2; - } - -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/CalculatorClient.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index adbd18a9e4..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator; - -import org.osoa.sca.annotations.EagerInit; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -@Scope("COMPOSITE") -@EagerInit -public class CalculatorClient { - - private CalculatorService calculatorService; - - @Reference - public void setCalculatorService(CalculatorService calculatorService) { - this.calculatorService = calculatorService; - } - - @Init - public void calculate() { - // Calculate - System.out.println("SCA API ClassLoader: " + Reference.class.getClassLoader()); - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - } - -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/CalculatorService.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index c89043276e..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index ba897fa301..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Reference; - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/DivideService.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The divide service interface - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 1323edf55a..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Dividing " + n1 + " with " + n2); - return n1 / n2; - } - -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/MultiplyService.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index 91b803bc9e..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Multiplying " + n1 + " with " + n2); - return n1 * n2; - } - -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/SubtractService.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 58cc4a3547..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Subtracting " + n1 + " from " + n2); - return n1 - n2; - } - -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java deleted file mode 100644 index 50f68dcb01..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator.rcp; - -import java.io.File; - -import org.apache.tuscany.sca.extensibility.equinox.EquinoxServiceDiscoverer; -import org.apache.tuscany.sca.node.SCAContribution; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.apache.tuscany.sca.sample.calculator.rcp"; - - // The shared instance - private static Activator plugin; - - private SCANode node; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - Class cls = EquinoxServiceDiscoverer.class; - SCANodeFactory factory = SCANodeFactory.newInstance(); - node = factory.createSCANode("Calculator.composite", new SCAContribution("c1", new File("target/classes").toURI().toString())); - node.start(); - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - if (node != null) { - node.stop(); - } - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given - * plug-in relative path - * - * @param path the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/Application.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/Application.java deleted file mode 100644 index 5ce6522fed..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/Application.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator.rcp; - -import org.eclipse.equinox.app.IApplication; -import org.eclipse.equinox.app.IApplicationContext; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.PlatformUI; - -/** - * This class controls all aspects of the application's execution - */ -public class Application implements IApplication { - - /* (non-Javadoc) - * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext) - */ - public Object start(IApplicationContext context) { - Display display = PlatformUI.createDisplay(); - try { - int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor()); - if (returnCode == PlatformUI.RETURN_RESTART) { - return IApplication.EXIT_RESTART; - } - return IApplication.EXIT_OK; - } finally { - display.dispose(); - } - } - - /* (non-Javadoc) - * @see org.eclipse.equinox.app.IApplication#stop() - */ - public void stop() { - final IWorkbench workbench = PlatformUI.getWorkbench(); - if (workbench == null) - return; - final Display display = workbench.getDisplay(); - display.syncExec(new Runnable() { - public void run() { - if (!display.isDisposed()) - workbench.close(); - } - }); - } -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationActionBarAdvisor.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationActionBarAdvisor.java deleted file mode 100644 index 2fccfb2d77..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationActionBarAdvisor.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator.rcp; - -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.action.MenuManager; -import org.eclipse.ui.IWorkbenchActionConstants; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.actions.ActionFactory; -import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction; -import org.eclipse.ui.application.ActionBarAdvisor; -import org.eclipse.ui.application.IActionBarConfigurer; - -/** - * An action bar advisor is responsible for creating, adding, and disposing of - * the actions added to a workbench window. Each window will be populated with - * new actions. - */ -public class ApplicationActionBarAdvisor extends ActionBarAdvisor { - - // Actions - important to allocate these only in makeActions, and then use - // them - // in the fill methods. This ensures that the actions aren't recreated - // when fillActionBars is called with FILL_PROXY. - private IWorkbenchAction exitAction; - - public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) { - super(configurer); - } - - protected void makeActions(final IWorkbenchWindow window) { - // Creates the actions and registers them. - // Registering is needed to ensure that key bindings work. - // The corresponding commands keybindings are defined in the plugin.xml - // file. - // Registering also provides automatic disposal of the actions when - // the window is closed. - - exitAction = ActionFactory.QUIT.create(window); - register(exitAction); - } - - protected void fillMenuBar(IMenuManager menuBar) { - MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE); - menuBar.add(fileMenu); - fileMenu.add(exitAction); - } - -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationWorkbenchAdvisor.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationWorkbenchAdvisor.java deleted file mode 100644 index ac1893509c..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationWorkbenchAdvisor.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator.rcp; - -import org.eclipse.ui.application.IWorkbenchWindowConfigurer; -import org.eclipse.ui.application.WorkbenchAdvisor; -import org.eclipse.ui.application.WorkbenchWindowAdvisor; - -public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor { - - private static final String PERSPECTIVE_ID = "org.apache.tuscany.sca.sample.calculator.rcp.perspective"; - - public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) { - return new ApplicationWorkbenchWindowAdvisor(configurer); - } - - public String getInitialWindowPerspectiveId() { - return PERSPECTIVE_ID; - } - -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationWorkbenchWindowAdvisor.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationWorkbenchWindowAdvisor.java deleted file mode 100644 index 6378decf20..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/ApplicationWorkbenchWindowAdvisor.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator.rcp; - -import org.eclipse.swt.graphics.Point; -import org.eclipse.ui.application.ActionBarAdvisor; -import org.eclipse.ui.application.IActionBarConfigurer; -import org.eclipse.ui.application.IWorkbenchWindowConfigurer; -import org.eclipse.ui.application.WorkbenchWindowAdvisor; - -public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor { - - public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) { - super(configurer); - } - - public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) { - return new ApplicationActionBarAdvisor(configurer); - } - - public void preWindowOpen() { - IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); - configurer.setInitialSize(new Point(400, 300)); - configurer.setShowCoolBar(false); - configurer.setShowStatusLine(false); - configurer.setTitle("Tuscany SCA Calculator RCP Application"); - } -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/Perspective.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/Perspective.java deleted file mode 100644 index 445b4b65b2..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/Perspective.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator.rcp; - -import org.eclipse.ui.IPageLayout; -import org.eclipse.ui.IPerspectiveFactory; - -public class Perspective implements IPerspectiveFactory { - - public void createInitialLayout(IPageLayout layout) { - String editorArea = layout.getEditorArea(); - layout.setEditorAreaVisible(false); - layout.setFixed(true); - - layout.addStandaloneView(View.ID, false, IPageLayout.LEFT, 1.0f, editorArea); - } - -} diff --git a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/View.java b/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/View.java deleted file mode 100644 index f95c1e029c..0000000000 --- a/branches/sca-java-1.5/samples/calculator-rcp/src/main/java/calculator/rcp/View.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator.rcp; - -import org.eclipse.jface.viewers.IStructuredContentProvider; -import org.eclipse.jface.viewers.ITableLabelProvider; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.jface.viewers.TableViewer; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.ISharedImages; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.part.ViewPart; - -public class View extends ViewPart { - public static final String ID = "org.apache.tuscany.sca.sample.calculator.rcp.view"; - - private TableViewer viewer; - - /** - * The content provider class is responsible for providing objects to the - * view. It can wrap existing objects in adapters or simply return objects - * as-is. These objects may be sensitive to the current input of the view, - * or ignore it and always show the same content (like Task List, for - * example). - */ - class ViewContentProvider implements IStructuredContentProvider { - public void inputChanged(Viewer v, Object oldInput, Object newInput) { - } - - public void dispose() { - } - - public Object[] getElements(Object parent) { - return new String[] {"One", "Two", "Three"}; - } - } - - class ViewLabelProvider extends LabelProvider implements ITableLabelProvider { - public String getColumnText(Object obj, int index) { - return getText(obj); - } - - public Image getColumnImage(Object obj, int index) { - return getImage(obj); - } - - public Image getImage(Object obj) { - return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT); - } - } - - /** - * This is a callback that will allow us to create the viewer and initialize - * it. - */ - public void createPartControl(Composite parent) { - viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); - viewer.setContentProvider(new ViewContentProvider()); - viewer.setLabelProvider(new ViewLabelProvider()); - viewer.setInput(getViewSite()); - } - - /** - * Passing the focus request to the viewer's control. - */ - public void setFocus() { - viewer.getControl().setFocus(); - } -} diff --git a/branches/sca-java-1.5/samples/calculator2/README b/branches/sca-java-1.5/samples/calculator2/README deleted file mode 100644 index ceb532faed..0000000000 --- a/branches/sca-java-1.5/samples/calculator2/README +++ /dev/null @@ -1,97 +0,0 @@ -Calculator Sample -================= -This sample implements a simple calculator using SCA components. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator.jar calculator.CalculatorClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator.jar calculator.CalculatorClient - -Sample Overview ---------------- -The sample provides a single calculator service with a default SCA (java) -binding. The CalculatorClient exercises this interface by calling add, -subtract, multiply and divide operations. This results in messages passing to -the appropriate components in the composite across the local wires. - -calculator/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - the first component, calls +-/* as - appropriate - CalculatorServiceImpl.java - AddService.java - adds two numbers - AddServiceImpl.java - SubtractService.java - subtracts one number from another - SubtractServiceImpl.java - MultiplyService.java - multiplies two numbers - MultiplyServiceImpl.java - DivideService.java - divides one number by another - DivideServiceImpl.java - CalculatorClient.java - starts the SCA Runtime and - deploys the Calculator.composite. - It then calls the deployed Calculator - Components services - resources/ - Calculator.composite - the SCA assembly for this sample - test/ - java/ - calculator/ - CalculatorTestCase.java - JUnit test case - calculator.png - a pictorial representation of the sample - .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd calculator -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 3 + 2=5.0 - [java] 3 - 2=1.0 - [java] 3 * 2=6.0 - [java] 3 / 2=1.5 - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.CalculatorTestCase -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.272 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. diff --git a/branches/sca-java-1.5/samples/calculator2/build.xml b/branches/sca-java-1.5/samples/calculator2/build.xml deleted file mode 100644 index c4b755ef94..0000000000 --- a/branches/sca-java-1.5/samples/calculator2/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/calculator2/calculator.png b/branches/sca-java-1.5/samples/calculator2/calculator.png deleted file mode 100644 index 995a57b1fd..0000000000 Binary files a/branches/sca-java-1.5/samples/calculator2/calculator.png and /dev/null differ diff --git a/branches/sca-java-1.5/samples/calculator2/calculator.svg b/branches/sca-java-1.5/samples/calculator2/calculator.svg deleted file mode 100644 index 0615925c50..0000000000 --- a/branches/sca-java-1.5/samples/calculator2/calculator.svg +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - - - diff --git a/branches/sca-java-1.5/samples/calculator2/pom.xml b/branches/sca-java-1.5/samples/calculator2/pom.xml deleted file mode 100644 index 701d602e12..0000000000 --- a/branches/sca-java-1.5/samples/calculator2/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.5-SNAPSHOT - ../../pom.xml - - sample-calculator2 - Apache Tuscany SCA Calculator Sample - - - - - org.apache.tuscany.sca - tuscany-api - 1.5-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-scdl4j - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-runtime2 - 1.5-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/AddService.java b/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/AddService.java deleted file mode 100644 index 188451ebac..0000000000 --- a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The Add service interface - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/AddServiceImpl.java b/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 7ca8fb04b5..0000000000 --- a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Add service - */ -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Adding " + n1 + " and " + n2); - return n1 + n2; - } - -} diff --git a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/CalculatorClient.java b/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 9d180bf52e..0000000000 --- a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - - SCADomain scaDomain = SCADomain.newInstance("Calculator.composite"); - - CalculatorService calculatorService = - scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); - - // Calculate - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - scaDomain.close(); - } - -} diff --git a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/CalculatorService.java b/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 031fa8b912..0000000000 --- a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 3d861f2018..0000000000 --- a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.osoa.sca.annotations.Reference; - - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/DivideService.java b/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The divide service interface - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 1323edf55a..0000000000 --- a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Dividing " + n1 + " with " + n2); - return n1 / n2; - } - -} diff --git a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/MultiplyService.java b/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index 91b803bc9e..0000000000 --- a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Multiplying " + n1 + " with " + n2); - return n1 * n2; - } - -} diff --git a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/SubtractService.java b/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -/** - * The interface for the multiply service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 58cc4a3547..0000000000 --- a/branches/sca-java-1.5/samples/calculator2/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Subtracting " + n1 + " from " + n2); - return n1 - n2; - } - -} diff --git a/branches/sca-java-1.5/samples/calculator2/src/main/resources/Calculator.composite b/branches/sca-java-1.5/samples/calculator2/src/main/resources/Calculator.composite deleted file mode 100644 index 90872041b0..0000000000 --- a/branches/sca-java-1.5/samples/calculator2/src/main/resources/Calculator.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/calculator2/src/test/java/calculator/CalculatorTestCase.java b/branches/sca-java-1.5/samples/calculator2/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index 775ad15537..0000000000 --- a/branches/sca-java-1.5/samples/calculator2/src/test/java/calculator/CalculatorTestCase.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This shows how to test the Calculator service component. - */ -public class CalculatorTestCase extends TestCase { - - private CalculatorService calculatorService; - private SCADomain scaDomain; - - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("Calculator.composite"); - calculatorService = scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); - } - - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testCalculator() throws Exception { - // Calculate - assertEquals(calculatorService.add(3, 2), 5.0); - assertEquals(calculatorService.subtract(3, 2), 1.0); - assertEquals(calculatorService.multiply(3, 2), 6.0); - assertEquals(calculatorService.divide(3, 2), 1.5); - } -} diff --git a/branches/sca-java-1.5/samples/chat2-webapp/README b/branches/sca-java-1.5/samples/chat2-webapp/README deleted file mode 100644 index 0186006211..0000000000 --- a/branches/sca-java-1.5/samples/chat2-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.5/samples/chat2-webapp/build.xml b/branches/sca-java-1.5/samples/chat2-webapp/build.xml deleted file mode 100644 index 448fa93909..0000000000 --- a/branches/sca-java-1.5/samples/chat2-webapp/build.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/chat2-webapp/pom.xml b/branches/sca-java-1.5/samples/chat2-webapp/pom.xml deleted file mode 100644 index 9376a9694d..0000000000 --- a/branches/sca-java-1.5/samples/chat2-webapp/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.5-SNAPSHOT - ../../pom.xml - - sample-chat2-webapp - war - Apache Tuscany SCA Chat Sample WebApp using callbacks - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.5-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-dwr - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-web - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.5-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.5-SNAPSHOT - - - - generate - - - - - - - - diff --git a/branches/sca-java-1.5/samples/chat2-webapp/src/main/java/sample/ChatCallback.java b/branches/sca-java-1.5/samples/chat2-webapp/src/main/java/sample/ChatCallback.java deleted file mode 100644 index 7d668052b2..0000000000 --- a/branches/sca-java-1.5/samples/chat2-webapp/src/main/java/sample/ChatCallback.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 sample; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface ChatCallback { - void newMsg(String msg); -} diff --git a/branches/sca-java-1.5/samples/chat2-webapp/src/main/java/sample/ChatService.java b/branches/sca-java-1.5/samples/chat2-webapp/src/main/java/sample/ChatService.java deleted file mode 100644 index cc9d00ca4a..0000000000 --- a/branches/sca-java-1.5/samples/chat2-webapp/src/main/java/sample/ChatService.java +++ /dev/null @@ -1,32 +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 javax.jws.Oneway; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Remotable; -import org.osoa.sca.annotations.Scope; - -@Remotable -@Scope("COMPOSITE") -@Callback(ChatCallback.class) -public interface ChatService { - - @Oneway - public void addMsg(String msg); -} diff --git a/branches/sca-java-1.5/samples/chat2-webapp/src/main/java/sample/ChatServiceImpl.java b/branches/sca-java-1.5/samples/chat2-webapp/src/main/java/sample/ChatServiceImpl.java deleted file mode 100644 index d714ff82ed..0000000000 --- a/branches/sca-java-1.5/samples/chat2-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.Callback; - -public class ChatServiceImpl implements ChatService { - - ChatCallback chatCallback; - - @Callback - public void setCallback(ChatCallback chatCallback) { - this.chatCallback = chatCallback; - } - - public void addMsg(String msg) { - chatCallback.newMsg(msg); - } -} diff --git a/branches/sca-java-1.5/samples/chat2-webapp/src/main/resources/chat.composite b/branches/sca-java-1.5/samples/chat2-webapp/src/main/resources/chat.composite deleted file mode 100644 index 93a10d0fdf..0000000000 --- a/branches/sca-java-1.5/samples/chat2-webapp/src/main/resources/chat.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/chat2-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-java-1.5/samples/chat2-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index 897849ff8d..0000000000 --- a/branches/sca-java-1.5/samples/chat2-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.5/samples/chat2-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.5/samples/chat2-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 6919372e87..0000000000 --- a/branches/sca-java-1.5/samples/chat2-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.jsp - - - diff --git a/branches/sca-java-1.5/samples/chat2-webapp/src/main/webapp/chat.html b/branches/sca-java-1.5/samples/chat2-webapp/src/main/webapp/chat.html deleted file mode 100644 index a063e27f8e..0000000000 --- a/branches/sca-java-1.5/samples/chat2-webapp/src/main/webapp/chat.html +++ /dev/null @@ -1,73 +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.5/samples/domain-webapp/README b/branches/sca-java-1.5/samples/domain-webapp/README deleted file mode 100644 index c01a0dd39a..0000000000 --- a/branches/sca-java-1.5/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.5/samples/domain-webapp/build.xml b/branches/sca-java-1.5/samples/domain-webapp/build.xml deleted file mode 100644 index 31d0b56b0c..0000000000 --- a/branches/sca-java-1.5/samples/domain-webapp/build.xml +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/domain-webapp/pom.xml b/branches/sca-java-1.5/samples/domain-webapp/pom.xml deleted file mode 100644 index cc147e79e1..0000000000 --- a/branches/sca-java-1.5/samples/domain-webapp/pom.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-samples - 1.5-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.5-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.5-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 1.5-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-domain-impl - 1.5-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc - 1.5-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-sca-axis2 - 1.5-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-http - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-resource - 1.5-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-java-1.5/samples/domain-webapp/src/main/java/node/DomainServer.java b/branches/sca-java-1.5/samples/domain-webapp/src/main/java/node/DomainServer.java deleted file mode 100644 index ea3cddc01b..0000000000 --- a/branches/sca-java-1.5/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.5/samples/domain-webapp/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-1.5/samples/domain-webapp/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100755 index 95e10e43cd..0000000000 --- a/branches/sca-java-1.5/samples/domain-webapp/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.5/samples/domain-webapp/src/main/resources/domain.composite b/branches/sca-java-1.5/samples/domain-webapp/src/main/resources/domain.composite deleted file mode 100644 index dbaaebd3c7..0000000000 --- a/branches/sca-java-1.5/samples/domain-webapp/src/main/resources/domain.composite +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/domain-webapp/src/main/resources/webroot/index.html b/branches/sca-java-1.5/samples/domain-webapp/src/main/resources/webroot/index.html deleted file mode 100644 index 425bd73734..0000000000 --- a/branches/sca-java-1.5/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.5/samples/domain-webapp/src/main/resources/webroot/node.png b/branches/sca-java-1.5/samples/domain-webapp/src/main/resources/webroot/node.png deleted file mode 100644 index b3c949d224..0000000000 Binary files a/branches/sca-java-1.5/samples/domain-webapp/src/main/resources/webroot/node.png and /dev/null differ diff --git a/branches/sca-java-1.5/samples/domain-webapp/src/main/resources/webroot/style.css b/branches/sca-java-1.5/samples/domain-webapp/src/main/resources/webroot/style.css deleted file mode 100644 index f5bbf23379..0000000000 --- a/branches/sca-java-1.5/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.5/samples/helloworld-bpel-ws/README b/branches/sca-java-1.5/samples/helloworld-bpel-ws/README deleted file mode 100644 index 5c669f5da5..0000000000 --- a/branches/sca-java-1.5/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.5/samples/helloworld-bpel-ws/build.xml b/branches/sca-java-1.5/samples/helloworld-bpel-ws/build.xml deleted file mode 100644 index 3ad74393c9..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-bpel-ws/build.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-bpel-ws/helloworld-bpel.png b/branches/sca-java-1.5/samples/helloworld-bpel-ws/helloworld-bpel.png deleted file mode 100644 index 5f53a3c5d1..0000000000 Binary files a/branches/sca-java-1.5/samples/helloworld-bpel-ws/helloworld-bpel.png and /dev/null differ diff --git a/branches/sca-java-1.5/samples/helloworld-bpel-ws/helloworld-bpel.svg b/branches/sca-java-1.5/samples/helloworld-bpel-ws/helloworld-bpel.svg deleted file mode 100644 index 5a98f1a07c..0000000000 --- a/branches/sca-java-1.5/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.5/samples/helloworld-bpel-ws/pom.xml b/branches/sca-java-1.5/samples/helloworld-bpel-ws/pom.xml deleted file mode 100644 index 5465f173e3..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-bpel-ws/pom.xml +++ /dev/null @@ -1,205 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.5-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.5-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-bpel-ode - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.5-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.5-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.5-SNAPSHOT - - - - ${basedir}/src/main/resources/helloworld.wsdl - - - generate - - - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-bpel-ws/src/main/java/helloworld/BPELClient.java b/branches/sca-java-1.5/samples/helloworld-bpel-ws/src/main/java/helloworld/BPELClient.java deleted file mode 100644 index 971a5373e9..0000000000 --- a/branches/sca-java-1.5/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.5/samples/helloworld-bpel-ws/src/main/resources/helloworld.bpel b/branches/sca-java-1.5/samples/helloworld-bpel-ws/src/main/resources/helloworld.bpel deleted file mode 100644 index a88aa7960c..0000000000 --- a/branches/sca-java-1.5/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.5/samples/helloworld-bpel-ws/src/main/resources/helloworld.composite b/branches/sca-java-1.5/samples/helloworld-bpel-ws/src/main/resources/helloworld.composite deleted file mode 100644 index 97262109e6..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-bpel-ws/src/main/resources/helloworld.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-bpel-ws/src/main/resources/helloworld.wsdl b/branches/sca-java-1.5/samples/helloworld-bpel-ws/src/main/resources/helloworld.wsdl deleted file mode 100644 index 1cb338b283..0000000000 --- a/branches/sca-java-1.5/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.5/samples/helloworld-bpel-ws/src/main/resources/log4j.properties b/branches/sca-java-1.5/samples/helloworld-bpel-ws/src/main/resources/log4j.properties deleted file mode 100644 index c1bc0a0b81..0000000000 --- a/branches/sca-java-1.5/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.5/samples/helloworld-bpel-ws/src/test/java/helloworld/BPELHelloWorldTestCase.java b/branches/sca-java-1.5/samples/helloworld-bpel-ws/src/test/java/helloworld/BPELHelloWorldTestCase.java deleted file mode 100644 index 6ad63f87d9..0000000000 --- a/branches/sca-java-1.5/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.5/samples/helloworld-distributed/README b/branches/sca-java-1.5/samples/helloworld-distributed/README deleted file mode 100644 index 9462ae4218..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-distributed/README +++ /dev/null @@ -1,29 +0,0 @@ -Distributed Helloworld Sample -============================= - -This sample demonstrates a distributed SCA domain using the JMS implementation of binding.sca which -automatically discovers available nodes and the services they contain. - -In this sample there are two nodes in the domain, a standalone node containing a Helloworld component, -and a webapp using a JSP with which invokes the Helloworld service in the domain. - -To run the sample: - -- Build the two sample modules with mvn or Ant. -- Deploy the helloworld-webapp war to Tomcat. -- Start the standalone node by: - in the helloworld-node folder do "mvn dependency:copy-dependencies" then: - java -Djava.ext.dirs=target\dependency -jar target\dependency\tuscany-node-dynamic-1.4-SNAPSHOT.jar target\sample-helloworld-node.jar - -- On a web browser go to: - http://localhost:8080/sample-helloworld-webapp - -You should see "Hello world" returned on the web page and the node console should show "HelloworldImpl.sayHello: world" - -How it works: - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/README b/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/README deleted file mode 100644 index 9462ae4218..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/README +++ /dev/null @@ -1,29 +0,0 @@ -Distributed Helloworld Sample -============================= - -This sample demonstrates a distributed SCA domain using the JMS implementation of binding.sca which -automatically discovers available nodes and the services they contain. - -In this sample there are two nodes in the domain, a standalone node containing a Helloworld component, -and a webapp using a JSP with which invokes the Helloworld service in the domain. - -To run the sample: - -- Build the two sample modules with mvn or Ant. -- Deploy the helloworld-webapp war to Tomcat. -- Start the standalone node by: - in the helloworld-node folder do "mvn dependency:copy-dependencies" then: - java -Djava.ext.dirs=target\dependency -jar target\dependency\tuscany-node-dynamic-1.4-SNAPSHOT.jar target\sample-helloworld-node.jar - -- On a web browser go to: - http://localhost:8080/sample-helloworld-webapp - -You should see "Hello world" returned on the web page and the node console should show "HelloworldImpl.sayHello: world" - -How it works: - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/pom.xml b/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/pom.xml deleted file mode 100644 index 2d5ba0df87..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.5-SNAPSHOT - ../../pom.xml - - sample-helloworld-node - Apache Tuscany SCA Helloworld Node Sample - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.5-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-dynamic - 1.5-SNAPSHOT - test - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/src/main/java/sample/Helloworld.java b/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/src/main/java/sample/Helloworld.java deleted file mode 100644 index 386426df73..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/src/main/java/sample/Helloworld.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 sample; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Helloworld { - - String sayHello(String name); - -} diff --git a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/src/main/java/sample/HelloworldImpl.java b/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/src/main/java/sample/HelloworldImpl.java deleted file mode 100644 index 033b4088c8..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/src/main/java/sample/HelloworldImpl.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 sample; - -public class HelloworldImpl implements Helloworld { - - public String sayHello(String name) { - System.out.println("HelloworldImpl.sayHello: " + name); - return "Hello " + name; - } - -} diff --git a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/src/main/resources/META-INF/sca-deployables/Helloworld.composite b/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/src/main/resources/META-INF/sca-deployables/Helloworld.composite deleted file mode 100644 index 0f827390c8..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-node/src/main/resources/META-INF/sca-deployables/Helloworld.composite +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/README b/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/README deleted file mode 100644 index 9462ae4218..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/README +++ /dev/null @@ -1,29 +0,0 @@ -Distributed Helloworld Sample -============================= - -This sample demonstrates a distributed SCA domain using the JMS implementation of binding.sca which -automatically discovers available nodes and the services they contain. - -In this sample there are two nodes in the domain, a standalone node containing a Helloworld component, -and a webapp using a JSP with which invokes the Helloworld service in the domain. - -To run the sample: - -- Build the two sample modules with mvn or Ant. -- Deploy the helloworld-webapp war to Tomcat. -- Start the standalone node by: - in the helloworld-node folder do "mvn dependency:copy-dependencies" then: - java -Djava.ext.dirs=target\dependency -jar target\dependency\tuscany-node-dynamic-1.4-SNAPSHOT.jar target\sample-helloworld-node.jar - -- On a web browser go to: - http://localhost:8080/sample-helloworld-webapp - -You should see "Hello world" returned on the web page and the node console should show "HelloworldImpl.sayHello: world" - -How it works: - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/build.xml b/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/build.xml deleted file mode 100644 index 2f2ef184c9..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/build.xml +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/pom.xml b/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/pom.xml deleted file mode 100644 index 1d6d8e4de4..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.5-SNAPSHOT - ../../pom.xml - - sample-helloworld-webapp - war - Apache Tuscany SCA Distributed Helloworld WebApp Sample - - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.5-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.5-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-web-runtime - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-sca-jms - 1.5-SNAPSHOT - runtime - - - - - - ${artifactId} - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.5-SNAPSHOT - - - - generate - - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/src/main/java/sample/Helloworld.java b/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/src/main/java/sample/Helloworld.java deleted file mode 100644 index 7dd39b82a4..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/src/main/java/sample/Helloworld.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 sample; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface Helloworld { - - String sayHello(String name); -} diff --git a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/src/main/webapp/WEB-INF/web.composite b/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/src/main/webapp/WEB-INF/web.composite deleted file mode 100644 index 0e8de1be42..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/src/main/webapp/WEB-INF/web.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 1eefec1c48..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - Apache Tuscany Distributed Helloworld Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - hello.jsp - - - diff --git a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/src/main/webapp/hello.jsp b/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/src/main/webapp/hello.jsp deleted file mode 100644 index 873329cf7c..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-distributed/helloworld-webapp/src/main/webapp/hello.jsp +++ /dev/null @@ -1,36 +0,0 @@ - -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %> - - - - - - -

Apache Tuscany Distributed Helloworld Sample

- - Calling service.sayHello("world") returns: - -

- - <%= service.sayHello("world") %> - - - diff --git a/branches/sca-java-1.5/samples/helloworld-jsp/pom.xml b/branches/sca-java-1.5/samples/helloworld-jsp/pom.xml deleted file mode 100644 index 1ffee01b83..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-jsp/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.5-SNAPSHOT - ../../pom.xml - - sample-helloworld-jsp - war - Apache Tuscany SCA Helloworld JSP Sample - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.5-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-implementation-web-runtime - 1.5-SNAPSHOT - runtime - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.5/samples/helloworld-jsp/src/main/java/sample/HelloworldService.java b/branches/sca-java-1.5/samples/helloworld-jsp/src/main/java/sample/HelloworldService.java deleted file mode 100644 index 2b92fd4661..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-jsp/src/main/java/sample/HelloworldService.java +++ /dev/null @@ -1,7 +0,0 @@ -package sample; - -public interface HelloworldService { - - String sayHello(String name); - -} diff --git a/branches/sca-java-1.5/samples/helloworld-jsp/src/main/java/sample/HelloworldServiceImpl.java b/branches/sca-java-1.5/samples/helloworld-jsp/src/main/java/sample/HelloworldServiceImpl.java deleted file mode 100644 index be83d3b407..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-jsp/src/main/java/sample/HelloworldServiceImpl.java +++ /dev/null @@ -1,12 +0,0 @@ -package sample; - -import org.osoa.sca.annotations.Service; - -@Service(HelloworldService.class) -public class HelloworldServiceImpl implements HelloworldService { - - public String sayHello(String name) { - return "Hello " + name; - } - -} diff --git a/branches/sca-java-1.5/samples/helloworld-jsp/src/main/webapp/META-INF/sca-deployables/web.composite b/branches/sca-java-1.5/samples/helloworld-jsp/src/main/webapp/META-INF/sca-deployables/web.composite deleted file mode 100644 index 16bc08fc10..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-jsp/src/main/webapp/META-INF/sca-deployables/web.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-jsp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.5/samples/helloworld-jsp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 46285614da..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-jsp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - Apache Tuscany Helloworld JSP Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - hello.jsp - - - diff --git a/branches/sca-java-1.5/samples/helloworld-jsp/src/main/webapp/hello.jsp b/branches/sca-java-1.5/samples/helloworld-jsp/src/main/webapp/hello.jsp deleted file mode 100644 index beac8e457f..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-jsp/src/main/webapp/hello.jsp +++ /dev/null @@ -1,36 +0,0 @@ - -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %> - - - - - - -

Apache Tuscany Helloworld JSP Sample

- - Calling HelloworldService sayHello("world") returns: - -

- - <%= service.sayHello("world") %> - - - diff --git a/branches/sca-java-1.5/samples/helloworld-script/README b/branches/sca-java-1.5/samples/helloworld-script/README deleted file mode 100644 index cde5fe981f..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-script/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.5/samples/helloworld-script/pom.xml b/branches/sca-java-1.5/samples/helloworld-script/pom.xml deleted file mode 100644 index 2bdc9e81e3..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-script/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.5-SNAPSHOT - ../../pom.xml - - sample-helloworld-spring - Apache Tuscany SCA Sample Helloworld Spring - - - - org.apache.tuscany.sca - tuscany-base - 1.5-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-java-1.5/samples/helloworld-script/src/main/java/sample/Helloworld.java b/branches/sca-java-1.5/samples/helloworld-script/src/main/java/sample/Helloworld.java deleted file mode 100644 index cd8ceef66b..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-script/src/main/java/sample/Helloworld.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package sample; - -public interface Helloworld { - - String sayHello(String name); - -} diff --git a/branches/sca-java-1.5/samples/helloworld-script/src/main/java/sample/HelloworldClient.java b/branches/sca-java-1.5/samples/helloworld-script/src/main/java/sample/HelloworldClient.java deleted file mode 100644 index dec7da2bb5..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-script/src/main/java/sample/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 sample; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class HelloworldClient { - - public static void main(String[] args) throws Exception { - - SCANode node = SCANodeFactory.newInstance().createSCANodeFromClassLoader("helloworld.composite", Helloworld.class.getClassLoader()); - node.start(); - - Helloworld service = ((SCAClient)node).getService(Helloworld.class, "HelloworldComponent"); - - System.out.println(service.sayHello("world")); - - node.stop(); - } - -} diff --git a/branches/sca-java-1.5/samples/helloworld-script/src/main/resources/helloworld.composite b/branches/sca-java-1.5/samples/helloworld-script/src/main/resources/helloworld.composite deleted file mode 100644 index e69405ef0c..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-script/src/main/resources/helloworld.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-script/src/main/resources/helloworld.js b/branches/sca-java-1.5/samples/helloworld-script/src/main/resources/helloworld.js deleted file mode 100644 index 8a336ab1e7..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-script/src/main/resources/helloworld.js +++ /dev/null @@ -1,4 +0,0 @@ - -function sayHello(name) { - return "Hello " + name; -} \ No newline at end of file diff --git a/branches/sca-java-1.5/samples/helloworld-script/src/test/java/sample/HelloworldTestCase.java b/branches/sca-java-1.5/samples/helloworld-script/src/test/java/sample/HelloworldTestCase.java deleted file mode 100644 index 0eb135bdb7..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-script/src/test/java/sample/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 sample; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -/** - * This shows how to test the Helloworld component. - */ -public class HelloworldTestCase extends TestCase { - - private Helloworld service; - private SCANode node; - - @Override - protected void setUp() throws Exception { - node = SCANodeFactory.newInstance().createSCANodeFromClassLoader("helloworld.composite", getClass().getClassLoader()); - node.start(); - - service = ((SCAClient)node).getService(Helloworld.class, "HelloworldComponent"); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - } - - public void testHelloworld() throws Exception { - assertEquals("Hello petra", service.sayHello("petra")); - } -} diff --git a/branches/sca-java-1.5/samples/helloworld-servlet/pom.xml b/branches/sca-java-1.5/samples/helloworld-servlet/pom.xml deleted file mode 100644 index 3e0fd7e4d9..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-servlet/pom.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.5-SNAPSHOT - ../../pom.xml - - sample-helloworld-servlet - war - Apache Tuscany SCA Helloworld Sample using a servlet - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.5-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-implementation-web-runtime - 1.5-SNAPSHOT - runtime - - - - javax.servlet - servlet-api - 2.3 - provided - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.5/samples/helloworld-servlet/src/main/java/sample/HelloworldService.java b/branches/sca-java-1.5/samples/helloworld-servlet/src/main/java/sample/HelloworldService.java deleted file mode 100644 index 2b92fd4661..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-servlet/src/main/java/sample/HelloworldService.java +++ /dev/null @@ -1,7 +0,0 @@ -package sample; - -public interface HelloworldService { - - String sayHello(String name); - -} diff --git a/branches/sca-java-1.5/samples/helloworld-servlet/src/main/java/sample/HelloworldServiceImpl.java b/branches/sca-java-1.5/samples/helloworld-servlet/src/main/java/sample/HelloworldServiceImpl.java deleted file mode 100644 index be83d3b407..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-servlet/src/main/java/sample/HelloworldServiceImpl.java +++ /dev/null @@ -1,12 +0,0 @@ -package sample; - -import org.osoa.sca.annotations.Service; - -@Service(HelloworldService.class) -public class HelloworldServiceImpl implements HelloworldService { - - public String sayHello(String name) { - return "Hello " + name; - } - -} diff --git a/branches/sca-java-1.5/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java b/branches/sca-java-1.5/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java deleted file mode 100644 index 0cdcc32e70..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.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 sample; - -import java.io.IOException; -import java.io.Writer; - -import javax.servlet.ServletConfig; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.osoa.sca.ComponentContext; -import org.osoa.sca.annotations.Reference; - -/** - */ -public class HelloworldServlet extends HttpServlet { - private static final long serialVersionUID = 1L; - - @Reference - protected HelloworldService service; - - @Override - public void init(ServletConfig config) { - if (service == null) { - // The helloworldService reference will only be injected from the @Reference - // annotation in containers supporting SCA "deep" integration. In other - // environments in can be looked up from the ComponentContext. - ComponentContext cc = (ComponentContext)config.getServletContext().getAttribute("org.osoa.sca.ComponentContext"); - service = cc.getService(HelloworldService.class, "service"); - } - } - - @Override - protected void service(HttpServletRequest request, HttpServletResponse response) throws IOException { - - String name = request.getParameter("name"); - String greeting = service.sayHello(name); - - Writer out = response.getWriter(); - out.write("Apache Tuscany Helloworld Servlet Sample"); - out.write("

Apache Tuscany Helloworld Servlet Sample

"); - out.write("
Result: " + greeting); - out.write(""); - out.flush(); - out.close(); - } -} diff --git a/branches/sca-java-1.5/samples/helloworld-servlet/src/main/webapp/META-INF/sca-deployables/web.composite b/branches/sca-java-1.5/samples/helloworld-servlet/src/main/webapp/META-INF/sca-deployables/web.composite deleted file mode 100644 index 23fd33a408..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-servlet/src/main/webapp/META-INF/sca-deployables/web.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-servlet/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.5/samples/helloworld-servlet/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 28cfdd3f6c..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-servlet/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - Apache Tuscany Helloworld Servlet Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - HelloworldServlet - sample.HelloworldServlet - - - - HelloworldServlet - /HelloworldServlet - - - - hello.html - - - diff --git a/branches/sca-java-1.5/samples/helloworld-servlet/src/main/webapp/hello.html b/branches/sca-java-1.5/samples/helloworld-servlet/src/main/webapp/hello.html deleted file mode 100644 index c4484916aa..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-servlet/src/main/webapp/hello.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - -Apache Tuscany Helloworld Servlet Sample - - - - -

Apache Tuscany Helloworld Servlet Sample

- -
- - - - - - - - -
Enter your name: - -
- -
-
- - - \ No newline at end of file diff --git a/branches/sca-java-1.5/samples/helloworld-spring/README b/branches/sca-java-1.5/samples/helloworld-spring/README deleted file mode 100644 index cde5fe981f..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-spring/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.5/samples/helloworld-spring/pom.xml b/branches/sca-java-1.5/samples/helloworld-spring/pom.xml deleted file mode 100644 index 4e918a7c5a..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-spring/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.5-SNAPSHOT - ../../pom.xml - - sample-helloworld-spring - Apache Tuscany SCA Sample Helloworld Spring - - - - org.apache.tuscany.sca - tuscany-base - 1.5-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-spring - 1.5-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-java-1.5/samples/helloworld-spring/src/main/java/sample/Helloworld.java b/branches/sca-java-1.5/samples/helloworld-spring/src/main/java/sample/Helloworld.java deleted file mode 100644 index cd8ceef66b..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-spring/src/main/java/sample/Helloworld.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package sample; - -public interface Helloworld { - - String sayHello(String name); - -} diff --git a/branches/sca-java-1.5/samples/helloworld-spring/src/main/java/sample/HelloworldClient.java b/branches/sca-java-1.5/samples/helloworld-spring/src/main/java/sample/HelloworldClient.java deleted file mode 100644 index dec7da2bb5..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-spring/src/main/java/sample/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 sample; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class HelloworldClient { - - public static void main(String[] args) throws Exception { - - SCANode node = SCANodeFactory.newInstance().createSCANodeFromClassLoader("helloworld.composite", Helloworld.class.getClassLoader()); - node.start(); - - Helloworld service = ((SCAClient)node).getService(Helloworld.class, "HelloworldComponent"); - - System.out.println(service.sayHello("world")); - - node.stop(); - } - -} diff --git a/branches/sca-java-1.5/samples/helloworld-spring/src/main/java/sample/HelloworldImpl.java b/branches/sca-java-1.5/samples/helloworld-spring/src/main/java/sample/HelloworldImpl.java deleted file mode 100644 index 089b1a4290..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-spring/src/main/java/sample/HelloworldImpl.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 sample; - -public class HelloworldImpl implements Helloworld { - - public String sayHello(String name) { - return "Hello " + name; - } - -} diff --git a/branches/sca-java-1.5/samples/helloworld-spring/src/main/resources/helloworld-spring-context.xml b/branches/sca-java-1.5/samples/helloworld-spring/src/main/resources/helloworld-spring-context.xml deleted file mode 100644 index 6aea68b084..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-spring/src/main/resources/helloworld-spring-context.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-spring/src/main/resources/helloworld.composite b/branches/sca-java-1.5/samples/helloworld-spring/src/main/resources/helloworld.composite deleted file mode 100644 index 4d73f398d9..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-spring/src/main/resources/helloworld.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-spring/src/test/java/sample/HelloworldTestCase.java b/branches/sca-java-1.5/samples/helloworld-spring/src/test/java/sample/HelloworldTestCase.java deleted file mode 100644 index 0eb135bdb7..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-spring/src/test/java/sample/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 sample; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -/** - * This shows how to test the Helloworld component. - */ -public class HelloworldTestCase extends TestCase { - - private Helloworld service; - private SCANode node; - - @Override - protected void setUp() throws Exception { - node = SCANodeFactory.newInstance().createSCANodeFromClassLoader("helloworld.composite", getClass().getClassLoader()); - node.start(); - - service = ((SCAClient)node).getService(Helloworld.class, "HelloworldComponent"); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - } - - public void testHelloworld() throws Exception { - assertEquals("Hello petra", service.sayHello("petra")); - } -} diff --git a/branches/sca-java-1.5/samples/helloworld-web-callback/pom.xml b/branches/sca-java-1.5/samples/helloworld-web-callback/pom.xml deleted file mode 100644 index 3ac5509e4f..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-web-callback/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.5-SNAPSHOT - ../../pom.xml - - sample-helloworld-web-callback - war - Apache Tuscany SCA Web 2.0 Callbacks Sample - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.5-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-implementation-web-runtime - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-dwr - 1.5-SNAPSHOT - runtime - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/java/sample/HelloworldCallback.java b/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/java/sample/HelloworldCallback.java deleted file mode 100644 index 661f703dc8..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/java/sample/HelloworldCallback.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 sample; - -import org.osoa.sca.annotations.OneWay; -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface HelloworldCallback { - - @OneWay - void sayHelloCallback(String reply); -} diff --git a/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/java/sample/HelloworldService.java b/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/java/sample/HelloworldService.java deleted file mode 100644 index d2c1fc2def..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/java/sample/HelloworldService.java +++ /dev/null @@ -1,14 +0,0 @@ -package sample; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.OneWay; -import org.osoa.sca.annotations.Remotable; - -@Remotable -@Callback(HelloworldCallback.class) -public interface HelloworldService { - - @OneWay - void sayHello(String name); - -} diff --git a/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/java/sample/HelloworldServiceImpl.java b/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/java/sample/HelloworldServiceImpl.java deleted file mode 100644 index 8b52e42754..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/java/sample/HelloworldServiceImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package sample; - -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Service; - -@Service(HelloworldService.class) -public class HelloworldServiceImpl implements HelloworldService { - - @Callback - public HelloworldCallback callback; - - public void sayHello(final String name) { - Thread t = new Thread(new Runnable() { - public void run() { - for (int i=0; i<5; i++) { - callback.sayHelloCallback(i + "Hello " + name); - try { - Thread.sleep(5000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - }}); - t.start(); - } - -} diff --git a/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/webapp/META-INF/sca-deployables/web.composite b/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/webapp/META-INF/sca-deployables/web.composite deleted file mode 100644 index fdd5a95f58..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/webapp/META-INF/sca-deployables/web.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index f29262a147..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - Apache Tuscany Helloworld Servlet Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - hello.html - - - diff --git a/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/webapp/hello.html b/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/webapp/hello.html deleted file mode 100644 index 6d4c17626b..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-web-callback/src/main/webapp/hello.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - Apache Tuscany Helloworld Web2.0 Callbacks Sample - - - - - - - -

Apache Tuscany Helloworld Web2.0 Callbacks Sample

- - - - - - - - - - - - -
Enter your name: - -
- -
-
-
- - - diff --git a/branches/sca-java-1.5/samples/helloworld-web/pom.xml b/branches/sca-java-1.5/samples/helloworld-web/pom.xml deleted file mode 100644 index 100ce3144e..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-web/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.5-SNAPSHOT - ../../pom.xml - - sample-helloworld-web - war - Apache Tuscany SCA Helloworld Web Sample - - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.5-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-implementation-web-runtime - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.5-SNAPSHOT - runtime - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.5/samples/helloworld-web/src/main/java/sample/HelloworldService.java b/branches/sca-java-1.5/samples/helloworld-web/src/main/java/sample/HelloworldService.java deleted file mode 100644 index 2b92fd4661..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-web/src/main/java/sample/HelloworldService.java +++ /dev/null @@ -1,7 +0,0 @@ -package sample; - -public interface HelloworldService { - - String sayHello(String name); - -} diff --git a/branches/sca-java-1.5/samples/helloworld-web/src/main/java/sample/HelloworldServiceImpl.java b/branches/sca-java-1.5/samples/helloworld-web/src/main/java/sample/HelloworldServiceImpl.java deleted file mode 100644 index be83d3b407..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-web/src/main/java/sample/HelloworldServiceImpl.java +++ /dev/null @@ -1,12 +0,0 @@ -package sample; - -import org.osoa.sca.annotations.Service; - -@Service(HelloworldService.class) -public class HelloworldServiceImpl implements HelloworldService { - - public String sayHello(String name) { - return "Hello " + name; - } - -} diff --git a/branches/sca-java-1.5/samples/helloworld-web/src/main/webapp/META-INF/sca-deployables/web.composite b/branches/sca-java-1.5/samples/helloworld-web/src/main/webapp/META-INF/sca-deployables/web.composite deleted file mode 100644 index 20cebc2d53..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-web/src/main/webapp/META-INF/sca-deployables/web.composite +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-web/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.5/samples/helloworld-web/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index f29262a147..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-web/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - Apache Tuscany Helloworld Servlet Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - hello.html - - - diff --git a/branches/sca-java-1.5/samples/helloworld-web/src/main/webapp/hello.html b/branches/sca-java-1.5/samples/helloworld-web/src/main/webapp/hello.html deleted file mode 100644 index 83ac0ae576..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-web/src/main/webapp/hello.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - Apache Tuscany Helloworld Web Sample - - - - - - - -

Apache Tuscany Helloworld Web Sample

- - - - - - - - - - - - -
Enter your name: - -
- -
-
-
- - - diff --git a/branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/README b/branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/README deleted file mode 100644 index 66040004f8..0000000000 --- a/branches/sca-java-1.5/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.5/samples/helloworld-ws-deep-webapp/build.xml b/branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/build.xml deleted file mode 100644 index a92793064d..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/build.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/pom.xml b/branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/pom.xml deleted file mode 100644 index c8737e54c1..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.5-SNAPSHOT - - - sample-helloworld-ws-service-webapp - Apache Tuscany SCA HelloWorld Web Service Sample Webapp - war - - - - org.apache.tuscany.sca - tuscany-sca-api - 1.5-SNAPSHOT - provided - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 0de3c70303..0000000000 --- a/branches/sca-java-1.5/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.5/samples/helloworld-ws-deep-webapp/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 268d90e910..0000000000 --- a/branches/sca-java-1.5/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.5/samples/helloworld-ws-deep-webapp/src/main/resources/META-INF/sca-deployables/helloworldws.composite b/branches/sca-java-1.5/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.5/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.5/samples/helloworld-ws-deep-webapp/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/src/main/resources/wsdl/helloworld.wsdl deleted file mode 100644 index 0b95fbd14f..0000000000 --- a/branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/src/main/resources/wsdl/helloworld.wsdl +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.5/samples/helloworld-ws-deep-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 182fd38fd9..0000000000 --- a/branches/sca-java-1.5/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.5/samples/spi-implementation-pojo/pom.xml b/branches/sca-java-1.5/samples/spi-implementation-pojo/pom.xml deleted file mode 100644 index 589bc77bca..0000000000 --- a/branches/sca-java-1.5/samples/spi-implementation-pojo/pom.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.5-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.5-SNAPSHOT - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-java-1.5/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementation.java b/branches/sca-java-1.5/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementation.java deleted file mode 100644 index 73104c3166..0000000000 --- a/branches/sca-java-1.5/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.5/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementationActivator.java b/branches/sca-java-1.5/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementationActivator.java deleted file mode 100644 index 43efae32ca..0000000000 --- a/branches/sca-java-1.5/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.5/samples/spi-implementation-pojo/src/main/java/sample/JavaInvoker.java b/branches/sca-java-1.5/samples/spi-implementation-pojo/src/main/java/sample/JavaInvoker.java deleted file mode 100644 index d65d4c8e4a..0000000000 --- a/branches/sca-java-1.5/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.5/samples/spi-implementation-pojo/src/main/java/sample/JavaInvokerFactory.java b/branches/sca-java-1.5/samples/spi-implementation-pojo/src/main/java/sample/JavaInvokerFactory.java deleted file mode 100644 index 198befa928..0000000000 --- a/branches/sca-java-1.5/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.5/samples/spi-implementation-pojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.spi.ImplementationActivator b/branches/sca-java-1.5/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.5/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.5/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorld.java b/branches/sca-java-1.5/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorld.java deleted file mode 100644 index cc32929f09..0000000000 --- a/branches/sca-java-1.5/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.5/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorldImpl.java b/branches/sca-java-1.5/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 02af1ccf22..0000000000 --- a/branches/sca-java-1.5/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.5/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorldTestCase.java b/branches/sca-java-1.5/samples/spi-implementation-pojo/src/test/java/helloworld/HelloWorldTestCase.java deleted file mode 100644 index 5813fda330..0000000000 --- a/branches/sca-java-1.5/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.5/samples/spi-implementation-pojo/src/test/resources/helloworld/helloworld.composite b/branches/sca-java-1.5/samples/spi-implementation-pojo/src/test/resources/helloworld/helloworld.composite deleted file mode 100644 index fa9cecc160..0000000000 --- a/branches/sca-java-1.5/samples/spi-implementation-pojo/src/test/resources/helloworld/helloworld.composite +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/store-android/.classpath b/branches/sca-java-1.5/samples/store-android/.classpath deleted file mode 100644 index ef7c361cff..0000000000 --- a/branches/sca-java-1.5/samples/store-android/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/branches/sca-java-1.5/samples/store-android/.project b/branches/sca-java-1.5/samples/store-android/.project deleted file mode 100644 index 616abf1df0..0000000000 --- a/branches/sca-java-1.5/samples/store-android/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - store-android - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - diff --git a/branches/sca-java-1.5/samples/store-android/AndroidManifest.xml b/branches/sca-java-1.5/samples/store-android/AndroidManifest.xml deleted file mode 100644 index b89d86270a..0000000000 --- a/branches/sca-java-1.5/samples/store-android/AndroidManifest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.5/samples/store-android/res/drawable/icon.png b/branches/sca-java-1.5/samples/store-android/res/drawable/icon.png deleted file mode 100644 index 75024841d3..0000000000 Binary files a/branches/sca-java-1.5/samples/store-android/res/drawable/icon.png and /dev/null differ diff --git a/branches/sca-java-1.5/samples/store-android/res/layout/main.xml b/branches/sca-java-1.5/samples/store-android/res/layout/main.xml deleted file mode 100644 index f7494f5a3a..0000000000 --- a/branches/sca-java-1.5/samples/store-android/res/layout/main.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/store-android/res/values/strings.xml b/branches/sca-java-1.5/samples/store-android/res/values/strings.xml deleted file mode 100644 index 02b55ae85a..0000000000 --- a/branches/sca-java-1.5/samples/store-android/res/values/strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - Hello World, catalog - store - diff --git a/branches/sca-java-1.5/samples/store-android/src/services/Catalog.java b/branches/sca-java-1.5/samples/store-android/src/services/Catalog.java deleted file mode 100644 index 9105f1047c..0000000000 --- a/branches/sca-java-1.5/samples/store-android/src/services/Catalog.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 services; - -public interface Catalog { - Item[] get(); -} diff --git a/branches/sca-java-1.5/samples/store-android/src/services/CatalogProxy.java b/branches/sca-java-1.5/samples/store-android/src/services/CatalogProxy.java deleted file mode 100644 index 40aeb6f0ae..0000000000 --- a/branches/sca-java-1.5/samples/store-android/src/services/CatalogProxy.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 services; - -import java.util.ArrayList; -import java.util.List; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -import services.json.rpc.JSONRpc; - -public class CatalogProxy implements Catalog { - private static final String jsonRPCServiceURI = "http://192.168.1.102:8080/Catalog"; - private static final String jsonRPCRequest = "{\"id\": 3, \"method\": \"Service.get\", \"params\": []}"; - - private List catalog = new ArrayList(); - - public CatalogProxy() { - initialize(); - } - - public void initialize() { - JSONObject json = null; - - try { - json = JSONRpc.invoke(jsonRPCServiceURI, jsonRPCRequest); - - if(json == null) { - return; - } - - JSONArray result = json.getJSONArray("result"); - for(int i = 0; i < result.length(); i++) { - Item item = new Item(); - item.setName(result.getJSONObject(i).getString("name")); - item.setPrice(result.getJSONObject(i).getString("price")); - - catalog.add(item); - } - - } catch (JSONException e) { - e.printStackTrace(); - } - } - - public Item[] get() { - Item[] catalogArray = new Item[catalog.size()]; - catalog.toArray(catalogArray); - return catalogArray; - } - -} diff --git a/branches/sca-java-1.5/samples/store-android/src/services/Item.java b/branches/sca-java-1.5/samples/store-android/src/services/Item.java deleted file mode 100644 index 27abd4f016..0000000000 --- a/branches/sca-java-1.5/samples/store-android/src/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.5/samples/store-android/src/services/ShoppingCartProxy.java b/branches/sca-java-1.5/samples/store-android/src/services/ShoppingCartProxy.java deleted file mode 100644 index 6a3addc55d..0000000000 --- a/branches/sca-java-1.5/samples/store-android/src/services/ShoppingCartProxy.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 services; - -import org.json.JSONException; -import org.json.JSONObject; - -import android.util.Log; - -import services.json.rpc.JSONRpc; - -public class ShoppingCartProxy { - private static final String jsonRPCTotalServiceURI = "http://192.168.1.102:8080/ShoppingCart/Total"; - private static final String jsonRPCTotalRequest = "{\"id\": 4, \"method\": \"Service.getTotal\", \"params\": []}"; - - public Item[] getItems() { - return null; - } - - public void addItem(Item item) { - - } - - public void removeItem(Item item) { - - } - - public void checkOut() { - - } - - public String getTotal() { - String total = ""; - JSONObject json = null; - Log.e("TUSC", "getting total"); - - try { - json = JSONRpc.invoke(jsonRPCTotalServiceURI, jsonRPCTotalRequest); - Log.e("TUSC", "Request OK"); - - if(json != null) { - total = json.getString("result"); - Log.e("TUSC", "Total: "+total); - } - } catch (JSONException e) { - Log.e("TUSC",e.getMessage()); - } - - return total; - } -} diff --git a/branches/sca-java-1.5/samples/store-android/src/services/json/rpc/JSONRpc.java b/branches/sca-java-1.5/samples/store-android/src/services/json/rpc/JSONRpc.java deleted file mode 100644 index b5bd1fc905..0000000000 --- a/branches/sca-java-1.5/samples/store-android/src/services/json/rpc/JSONRpc.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 services.json.rpc; - -import java.io.IOException; - -import org.apache.http.HttpResponse; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.DefaultHttpClient; -import org.apache.http.util.EntityUtils; -import org.json.JSONException; -import org.json.JSONObject; - -public class JSONRpc { - - protected JSONRpc() { - - } - - public static JSONObject invoke(String serviceURI, String rpcRequest) throws JSONException{ - HttpClient httpClient = new DefaultHttpClient(); - HttpPost httpPost = new HttpPost(serviceURI); - - JSONObject result = null; - try { - httpPost.setHeader("Content-Type", "text/xml"); - httpPost.setEntity(new StringEntity(rpcRequest)); - - HttpResponse httpResponse = httpClient.execute(httpPost); - if (httpResponse.getStatusLine().getStatusCode() == 200) { - String jsonResult = EntityUtils.toString(httpResponse.getEntity()); - result = new JSONObject(jsonResult); - } else { - String errorMessage = httpResponse.getStatusLine() - .getReasonPhrase(); - System.out.println(errorMessage); - } - } catch (IOException e) { - e.printStackTrace(); - } - - return result; - } -} diff --git a/branches/sca-java-1.5/samples/store-android/src/store/android/R.java b/branches/sca-java-1.5/samples/store-android/src/store/android/R.java deleted file mode 100644 index cb6917a2c4..0000000000 --- a/branches/sca-java-1.5/samples/store-android/src/store/android/R.java +++ /dev/null @@ -1,29 +0,0 @@ -/* AUTO-GENERATED FILE. DO NOT MODIFY. - * - * This class was automatically generated by the - * aapt tool from the resource data it found. It - * should not be modified by hand. - */ - -package store.android; - -public final class R { - public static final class attr { - } - public static final class drawable { - public static final int icon=0x7f020000; - } - public static final class id { - public static final int ListView01=0x7f050000; - public static final int ListView02=0x7f050002; - public static final int tab02=0x7f050001; - public static final int txtTotal=0x7f050003; - } - public static final class layout { - public static final int main=0x7f030000; - } - public static final class string { - public static final int app_name=0x7f040001; - public static final int hello=0x7f040000; - } -} diff --git a/branches/sca-java-1.5/samples/store-android/src/store/android/catalog.java b/branches/sca-java-1.5/samples/store-android/src/store/android/catalog.java deleted file mode 100644 index d2d5ddb97a..0000000000 --- a/branches/sca-java-1.5/samples/store-android/src/store/android/catalog.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package store.android; - -import java.util.ArrayList; -import java.util.List; - -import services.Catalog; -import services.CatalogProxy; -import services.Item; -import services.ShoppingCartProxy; -import android.app.ListActivity; -import android.os.Bundle; -import android.util.SparseBooleanArray; -import android.view.View; -import android.widget.ArrayAdapter; -import android.widget.Button; -import android.widget.ListView; - -public class catalog extends ListActivity { - private Catalog catalogProxy = new CatalogProxy(); - private ShoppingCartProxy shoppingCartProxy = new ShoppingCartProxy(); - - private String[] getCatalogItems() { - List catalog = new ArrayList(); - - for(Item item : catalogProxy.get()) { - catalog.add(item.getName() + " - " + item.getPrice()); - } - - String[] catalogArray = new String[catalog.size()]; - catalog.toArray(catalogArray); - - return catalogArray; - } - - /** Called when the activity is first created. */ - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - - setListAdapter(new ArrayAdapter(this, - android.R.layout.simple_list_item_multiple_choice, this.getCatalogItems())); - - Button addToCart = (Button) findViewById(1); - /* - addToCart.setOnClickListener(new View.OnClickListener() { - public void onCLick(View v) { - this. - } - }); - */ - - - final ListView listView = getListView(); - - listView.setItemsCanFocus(false); - listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); - } - - @Override - protected void onListItemClick(ListView l, View v, int position, long id) { - super.onListItemClick(l, v, position, id); - - String item = this.getCatalogItems()[position]; - System.out.println("Item clicked : " + item); - - System.out.println("Selected items:"); - SparseBooleanArray checkedItems = l.getCheckedItemPositions(); - for(int i = 0; i < checkedItems.size(); i++) { - if(checkedItems.valueAt(i) == true) { - System.out.println(">>>" + this.getCatalogItems()[checkedItems.keyAt(i)]); - } - } - System.out.println("Total: " + shoppingCartProxy.getTotal()); - - //l.getCheckedItemPosition(); - //Intent webIntent = new Intent("android.intent.action.VIEW", Uri.parse("http://192.168.1.104:8080/ShoppingCart/Cart")); - //startActivity(webIntent); - } - - -} \ No newline at end of file diff --git a/branches/sca-java-1.5/samples/zipcode-jaxws/LICENSE b/branches/sca-java-1.5/samples/zipcode-jaxws/LICENSE deleted file mode 100644 index 6e529a25c4..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/NOTICE b/branches/sca-java-1.5/samples/zipcode-jaxws/NOTICE deleted file mode 100644 index 1325efd8bf..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/README b/branches/sca-java-1.5/samples/zipcode-jaxws/README deleted file mode 100644 index 03f97f0ceb..0000000000 --- a/branches/sca-java-1.5/samples/zipcode-jaxws/README +++ /dev/null @@ -1,77 +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. - -*** Note: This sample uses external services hosted at www.webservicex.net, these - services are occasionally not available which causes this sample to hang. - If that happens please try again later. - - -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.5/samples/zipcode-jaxws/build.xml b/branches/sca-java-1.5/samples/zipcode-jaxws/build.xml deleted file mode 100644 index 20f2cd8f67..0000000000 --- a/branches/sca-java-1.5/samples/zipcode-jaxws/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - -]> - - - &buildDependency; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/zipcode-jaxws/pom.xml b/branches/sca-java-1.5/samples/zipcode-jaxws/pom.xml deleted file mode 100644 index 3221c4c30f..0000000000 --- a/branches/sca-java-1.5/samples/zipcode-jaxws/pom.xml +++ /dev/null @@ -1,245 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.5-SNAPSHOT - ../../pom.xml - - sample-zipcode-jaxws - jar - Apache Tuscany SCA Sample US Zip Code JAX-WS - Apache Tuscany SCA Sample US Zip Code JAX-WS - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.5-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.5-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.5-SNAPSHOT - runtime - - - - junit - junit - 4.5 - 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.5-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.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCode.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCode.java deleted file mode 100644 index 8c9a48bf40..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCodeResponse.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByAreaCodeResponse.java deleted file mode 100644 index 93847c8809..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCity.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCity.java deleted file mode 100644 index cf9276d417..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCityResponse.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByCityResponse.java deleted file mode 100644 index 9dc0e41b2b..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByState.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByState.java deleted file mode 100644 index 48be94b14a..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByStateResponse.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByStateResponse.java deleted file mode 100644 index 1645e11ca2..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIP.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIP.java deleted file mode 100644 index 45c948b4b4..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIPResponse.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/GetInfoByZIPResponse.java deleted file mode 100644 index 9e78dc6d0a..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/ObjectFactory.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/ObjectFactory.java deleted file mode 100644 index ced83ff09a..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZip.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZip.java deleted file mode 100644 index 22493ba9b8..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZipSoap.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/USZipSoap.java deleted file mode 100644 index 5ac370005f..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/package-info.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/uszip/package-info.java deleted file mode 100644 index d120f34ee5..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/weather/ArrayOfWeatherData.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/ArrayOfWeatherData.java deleted file mode 100644 index 5385fb57be..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceName.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceName.java deleted file mode 100644 index 9eb205e75d..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceNameResponse.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByPlaceNameResponse.java deleted file mode 100644 index e281509623..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCode.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCode.java deleted file mode 100644 index 08d4a70364..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCodeResponse.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/GetWeatherByZipCodeResponse.java deleted file mode 100644 index 9288f5332e..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/weather/ObjectFactory.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/ObjectFactory.java deleted file mode 100644 index 0c4fdbcde1..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherData.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherData.java deleted file mode 100644 index a4ca6190b5..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecast.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecast.java deleted file mode 100644 index 0902ce67fe..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecastSoap.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecastSoap.java deleted file mode 100644 index aa000a44d2..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecasts.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/WeatherForecasts.java deleted file mode 100644 index 8ded0946d9..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/com/example/weather/package-info.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/com/example/weather/package-info.java deleted file mode 100644 index 6543ed7abf..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/location/LocationClient.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/location/LocationClient.java deleted file mode 100644 index 35c114093a..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/location/USLocationImpl.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/location/USLocationImpl.java deleted file mode 100644 index cf27332e60..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastClient.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastClient.java deleted file mode 100644 index c03cf2955f..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastImpl.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/weather/WeatherForecastImpl.java deleted file mode 100644 index cf50a6cd9e..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeClient.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeClient.java deleted file mode 100644 index f181d9bd0e..0000000000 --- a/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeClient.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 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 { - - System.out.println("Please wait..."); - - 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.5/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeService.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeService.java deleted file mode 100644 index ec0f05dd6c..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeServiceImpl.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/java/zipcode/ZipCodeServiceImpl.java deleted file mode 100644 index 284e5a3aa3..0000000000 --- a/branches/sca-java-1.5/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.5/samples/zipcode-jaxws/src/main/resources/USLocation.composite b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/resources/USLocation.composite deleted file mode 100644 index a171fe62c9..0000000000 --- a/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/resources/USLocation.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/resources/WeatherForecast.composite b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/resources/WeatherForecast.composite deleted file mode 100644 index 0e1b118e44..0000000000 --- a/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/resources/WeatherForecast.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/resources/ZipCode.composite b/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/resources/ZipCode.composite deleted file mode 100644 index 28d674c29b..0000000000 --- a/branches/sca-java-1.5/samples/zipcode-jaxws/src/main/resources/ZipCode.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.5/samples/zipcode-jaxws/src/test/java/zipcode/ZipCodeClientTestCase.java b/branches/sca-java-1.5/samples/zipcode-jaxws/src/test/java/zipcode/ZipCodeClientTestCase.java deleted file mode 100644 index 019fce26d6..0000000000 --- a/branches/sca-java-1.5/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