From 3d3670cdd4ee1aaf6d3e22fd7de7fb362c9eefba Mon Sep 17 00:00:00 2001 From: slaws Date: Sun, 24 Jan 2010 14:24:14 +0000 Subject: Copy into trunk from sandbox git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@902572 13f79535-47bb-0310-9956-ffa450edef68 --- .../travelsample/launchers/blog-feed/build.xml | 35 ++++ .../travelsample/launchers/blog-feed/pom.xml | 110 +++++++++++ .../src/main/java/scatours/BlogFeedLauncher.java | 50 +++++ .../tutorials/travelsample/launchers/build.xml | 69 +++++++ .../launchers/buildingblocks/build.xml | 35 ++++ .../travelsample/launchers/buildingblocks/pom.xml | 130 +++++++++++++ .../main/java/scatours/BuildingBlocksLauncher.java | 92 +++++++++ .../src/main/resources/jndi.properties | 39 ++++ .../test/java/scatours/BuildingBlocksTestCase.java | 42 ++++ .../launchers/currency-converter-corba/build.xml | 51 +++++ .../launchers/currency-converter-corba/pom.xml | 104 ++++++++++ .../scatours/CurrencyConverterCORBALauncher.java | 52 +++++ .../currencyconverter/CurrencyConverter.java | 33 ++++ .../launchers/currency-converter-jms/build.xml | 54 ++++++ .../launchers/currency-converter-jms/pom.xml | 115 +++++++++++ .../scatours/CurrencyConverterJMSLauncher.java | 45 +++++ .../src/main/java/scatours/JMSBrokerLauncher.java | 38 ++++ .../launchers/currency-converter-rmi/build.xml | 42 ++++ .../launchers/currency-converter-rmi/pom.xml | 111 +++++++++++ .../currencyconverter/CurrencyConverter.java | 33 ++++ .../scatours/CurrencyConverterRMILauncher.java | 52 +++++ .../launchers/currency-converter-ws/build.xml | 42 ++++ .../launchers/currency-converter-ws/pom.xml | 105 ++++++++++ .../java/scatours/CurrencyConverterWSLauncher.java | 53 ++++++ .../currencyconverter/CurrencyConverter.java | 33 ++++ .../launchers/currency-converter/build.xml | 35 ++++ .../launchers/currency-converter/pom.xml | 90 +++++++++ .../java/scatours/CurrencyConverterLauncher.java | 48 +++++ .../currencyconverter/CurrencyConverter.java | 33 ++++ .../travelsample/launchers/databinding/build.xml | 35 ++++ .../travelsample/launchers/databinding/pom.xml | 169 ++++++++++++++++ .../main/java/scatours/DatabindingLauncher.java | 45 +++++ .../travelsample/launchers/feed-logger/build.xml | 35 ++++ .../travelsample/launchers/feed-logger/pom.xml | 111 +++++++++++ .../src/main/java/scatours/FeedLoggerLauncher.java | 44 +++++ .../main/java/scatours/feedlogger/FeedLogger.java | 30 +++ .../launchers/fullapp-domain/build.xml | 54 ++++++ .../travelsample/launchers/fullapp-domain/pom.xml | 115 +++++++++++ .../java/scatours/FullAppDomainAPILauncher.java | 42 ++++ .../main/java/scatours/FullAppDomainLauncher.java | 30 +++ .../travelsample/launchers/fullapp-nodes/build.xml | 37 ++++ .../travelsample/launchers/fullapp-nodes/pom.xml | 212 +++++++++++++++++++++ .../main/java/scatours/FullAppNodesLauncher.java | 78 ++++++++ .../travelsample/launchers/fullapp/build.xml | 35 ++++ .../travelsample/launchers/fullapp/pom.xml | 208 ++++++++++++++++++++ .../src/main/java/scatours/FullAppLauncher.java | 67 +++++++ .../travelsample/launchers/help-pages/build.xml | 35 ++++ .../travelsample/launchers/help-pages/pom.xml | 104 ++++++++++ .../src/main/java/scatours/HelpPagesLauncher.java | 44 +++++ .../travelsample/launchers/interaction/build.xml | 35 ++++ .../travelsample/launchers/interaction/pom.xml | 104 ++++++++++ .../main/java/scatours/InteractionLauncher.java | 74 +++++++ .../test/java/scatours/InteractionTestCase.java | 42 ++++ .../launchers/introducing-client/build.xml | 44 +++++ .../launchers/introducing-client/pom.xml | 93 +++++++++ .../java/scatours/IntroducingClientLauncher.java | 38 ++++ .../launchers/introducing-domain/build.xml | 54 ++++++ .../launchers/introducing-domain/pom.xml | 80 ++++++++ .../scatours/IntroducingDomainAPILauncher.java | 42 ++++ .../java/scatours/IntroducingDomainLauncher.java | 30 +++ .../launchers/introducing-tours/build.xml | 33 ++++ .../launchers/introducing-tours/pom.xml | 58 ++++++ .../java/scatours/IntroducingToursLauncher.java | 30 +++ .../launchers/introducing-trips/build.xml | 33 ++++ .../launchers/introducing-trips/pom.xml | 58 ++++++ .../java/scatours/IntroducingTripsLauncher.java | 30 +++ .../travelsample/launchers/introducing/build.xml | 35 ++++ .../travelsample/launchers/introducing/pom.xml | 90 +++++++++ .../main/java/scatours/IntroducingLauncher.java | 44 +++++ .../test/java/scatours/IntroducingTestCase.java | 62 ++++++ .../travelsample/launchers/jumpstart/build.xml | 35 ++++ .../travelsample/launchers/jumpstart/pom.xml | 90 +++++++++ .../src/main/java/scatours/JumpstartLauncher.java | 44 +++++ .../jumpstart/src/main/java/scatours/Trips.java | 26 +++ .../src/test/java/scatours/JumpstartTestCase.java | 56 ++++++ .../launchers/notification-corba/build.xml | 53 ++++++ .../launchers/notification-corba/pom.xml | 104 ++++++++++ .../java/scatours/NotificationCORBALauncher.java | 54 ++++++ .../java/scatours/notification/Notification.java | 26 +++ .../launchers/notification-ejb/build.xml | 42 ++++ .../launchers/notification-ejb/pom.xml | 110 +++++++++++ .../java/scatours/NotificationEJBLauncher.java | 59 ++++++ .../java/scatours/notification/Notification.java | 26 +++ .../launchers/notification-jms/build.xml | 45 +++++ .../launchers/notification-jms/pom.xml | 148 ++++++++++++++ .../java/scatours/NotificationJMSLauncher.java | 56 ++++++ .../java/scatours/notification/Notification.java | 26 +++ .../launchers/notification-rmi/build.xml | 41 ++++ .../launchers/notification-rmi/pom.xml | 104 ++++++++++ .../com/tuscanyscatours/smsgateway/SMSGateway.java | 30 +++ .../java/scatours/NotificationRMILauncher.java | 54 ++++++ .../java/scatours/notification/Notification.java | 26 +++ .../launchers/notification-ws/build.xml | 41 ++++ .../travelsample/launchers/notification-ws/pom.xml | 104 ++++++++++ .../main/java/scatours/NotificationWSLauncher.java | 54 ++++++ .../java/scatours/notification/Notification.java | 26 +++ .../travelsample/launchers/payment-bpel/build.xml | 35 ++++ .../travelsample/launchers/payment-bpel/pom.xml | 136 +++++++++++++ .../payment/MakePaymentMemberResponseType.java | 62 ++++++ .../payment/MakePaymentMemberType.java | 82 ++++++++ .../com/tuscanyscatours/payment/ObjectFactory.java | 71 +++++++ .../java/com/tuscanyscatours/payment/Payment.java | 43 +++++ .../tuscanyscatours/payment/PaymentService.java | 71 +++++++ .../com/tuscanyscatours/payment/package-info.java | 2 + .../java/scatours/payment/PaymentLauncher.java | 48 +++++ .../launchers/payment-groovy/build.xml | 35 ++++ .../travelsample/launchers/payment-groovy/pom.xml | 111 +++++++++++ .../tuscanyscatours/emailgateway/EmailGateway.java | 40 ++++ .../emailgateway/EmailGatewayService.java | 71 +++++++ .../tuscanyscatours/emailgateway/EmailType.java | 118 ++++++++++++ .../emailgateway/ObjectFactory.java | 79 ++++++++ .../emailgateway/SendEmailResponseType.java | 62 ++++++ .../emailgateway/SendEmailType.java | 62 ++++++ .../tuscanyscatours/emailgateway/package-info.java | 2 + .../payment/MakePaymentMemberResponseType.java | 62 ++++++ .../payment/MakePaymentMemberType.java | 82 ++++++++ .../com/tuscanyscatours/payment/ObjectFactory.java | 71 +++++++ .../java/com/tuscanyscatours/payment/Payment.java | 43 +++++ .../tuscanyscatours/payment/PaymentService.java | 71 +++++++ .../com/tuscanyscatours/payment/package-info.java | 2 + .../java/scatours/payment/PaymentLauncher.java | 47 +++++ .../launchers/payment-java-policy/build.xml | 35 ++++ .../launchers/payment-java-policy/pom.xml | 104 ++++++++++ .../payment/MakePaymentMemberResponseType.java | 62 ++++++ .../payment/MakePaymentMemberType.java | 82 ++++++++ .../com/tuscanyscatours/payment/ObjectFactory.java | 71 +++++++ .../java/com/tuscanyscatours/payment/Payment.java | 43 +++++ .../tuscanyscatours/payment/PaymentService.java | 71 +++++++ .../com/tuscanyscatours/payment/package-info.java | 2 + .../java/scatours/payment/PaymentLauncher.java | 47 +++++ .../travelsample/launchers/payment-java/build.xml | 35 ++++ .../travelsample/launchers/payment-java/pom.xml | 104 ++++++++++ .../payment/MakePaymentMemberResponseType.java | 62 ++++++ .../payment/MakePaymentMemberType.java | 82 ++++++++ .../com/tuscanyscatours/payment/ObjectFactory.java | 71 +++++++ .../java/com/tuscanyscatours/payment/Payment.java | 43 +++++ .../tuscanyscatours/payment/PaymentService.java | 71 +++++++ .../com/tuscanyscatours/payment/package-info.java | 2 + .../java/scatours/payment/PaymentLauncher.java | 47 +++++ .../launchers/payment-spring-scatag/build.xml | 35 ++++ .../launchers/payment-spring-scatag/pom.xml | 118 ++++++++++++ .../payment/MakePaymentMemberResponseType.java | 62 ++++++ .../payment/MakePaymentMemberType.java | 82 ++++++++ .../com/tuscanyscatours/payment/ObjectFactory.java | 71 +++++++ .../java/com/tuscanyscatours/payment/Payment.java | 43 +++++ .../tuscanyscatours/payment/PaymentService.java | 71 +++++++ .../com/tuscanyscatours/payment/package-info.java | 2 + .../java/scatours/payment/PaymentLauncher.java | 47 +++++ .../launchers/payment-spring/build.xml | 35 ++++ .../travelsample/launchers/payment-spring/pom.xml | 118 ++++++++++++ .../payment/MakePaymentMemberResponseType.java | 62 ++++++ .../payment/MakePaymentMemberType.java | 82 ++++++++ .../com/tuscanyscatours/payment/ObjectFactory.java | 71 +++++++ .../java/com/tuscanyscatours/payment/Payment.java | 43 +++++ .../tuscanyscatours/payment/PaymentService.java | 71 +++++++ .../com/tuscanyscatours/payment/package-info.java | 2 + .../java/scatours/payment/PaymentLauncher.java | 47 +++++ .../travelsample/launchers/policy/build.xml | 35 ++++ .../launchers/policy/maven-eclipse.xml | 8 + .../travelsample/launchers/policy/pom.xml | 111 +++++++++++ .../src/main/java/scatours/PolicyLauncher.java | 49 +++++ .../trunk/tutorials/travelsample/launchers/pom.xml | 77 ++++++++ 162 files changed, 9774 insertions(+) create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/blog-feed/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/blog-feed/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/blog-feed/src/main/java/scatours/BlogFeedLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/src/main/java/scatours/BuildingBlocksLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/src/main/resources/jndi.properties create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/src/test/java/scatours/BuildingBlocksTestCase.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/src/main/java/scatours/CurrencyConverterCORBALauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/src/main/java/scatours/currencyconverter/CurrencyConverter.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-jms/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-jms/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-jms/src/main/java/scatours/CurrencyConverterJMSLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-jms/src/main/java/scatours/JMSBrokerLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-rmi/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-rmi/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-rmi/src/main/java/com/tuscanyscatours/currencyconverter/CurrencyConverter.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-rmi/src/main/java/scatours/CurrencyConverterRMILauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-ws/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-ws/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-ws/src/main/java/scatours/CurrencyConverterWSLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-ws/src/main/java/scatours/currencyconverter/CurrencyConverter.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter/src/main/java/scatours/CurrencyConverterLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter/src/main/java/scatours/currencyconverter/CurrencyConverter.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/databinding/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/databinding/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/databinding/src/main/java/scatours/DatabindingLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/feed-logger/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/feed-logger/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/feed-logger/src/main/java/scatours/FeedLoggerLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/feed-logger/src/main/java/scatours/feedlogger/FeedLogger.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainAPILauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-nodes/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-nodes/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-nodes/src/main/java/scatours/FullAppNodesLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp/src/main/java/scatours/FullAppLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/help-pages/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/help-pages/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/help-pages/src/main/java/scatours/HelpPagesLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/interaction/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/interaction/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/interaction/src/main/java/scatours/InteractionLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/interaction/src/test/java/scatours/InteractionTestCase.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-client/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-client/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-client/src/main/java/scatours/IntroducingClientLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainAPILauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/src/main/java/scatours/IntroducingToursLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/src/main/java/scatours/IntroducingTripsLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing/src/main/java/scatours/IntroducingLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing/src/test/java/scatours/IntroducingTestCase.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/src/main/java/scatours/JumpstartLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/src/main/java/scatours/Trips.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/src/test/java/scatours/JumpstartTestCase.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/src/main/java/scatours/NotificationCORBALauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/src/main/java/scatours/notification/Notification.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ejb/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ejb/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ejb/src/main/java/scatours/NotificationEJBLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ejb/src/main/java/scatours/notification/Notification.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-jms/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-jms/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-jms/src/main/java/scatours/NotificationJMSLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-jms/src/main/java/scatours/notification/Notification.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/src/main/java/scatours/NotificationRMILauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/src/main/java/scatours/notification/Notification.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/src/main/java/scatours/NotificationWSLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/src/main/java/scatours/notification/Notification.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/Payment.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/PaymentService.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/package-info.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/scatours/payment/PaymentLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/EmailGateway.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/EmailGatewayService.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/EmailType.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/ObjectFactory.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/SendEmailResponseType.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/SendEmailType.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/package-info.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/Payment.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/PaymentService.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/package-info.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/scatours/payment/PaymentLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/Payment.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/PaymentService.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/package-info.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/scatours/payment/PaymentLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/Payment.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/PaymentService.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/package-info.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/scatours/payment/PaymentLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/Payment.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/PaymentService.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/package-info.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/scatours/payment/PaymentLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/Payment.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/PaymentService.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/package-info.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/scatours/payment/PaymentLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/policy/build.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/policy/maven-eclipse.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/policy/pom.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/policy/src/main/java/scatours/PolicyLauncher.java create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/launchers/pom.xml (limited to 'sca-java-1.x/trunk/tutorials/travelsample/launchers') diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/blog-feed/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/blog-feed/build.xml new file mode 100644 index 0000000000..c708dabbe5 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/blog-feed/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/blog-feed/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/blog-feed/pom.xml new file mode 100644 index 0000000000..7df381d2e1 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/blog-feed/pom.xml @@ -0,0 +1,110 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-blog-feed + Apache Tuscany SCA Tours Blog Feed Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-tomcat + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-atom-abdera + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-rss-rome + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.BlogFeedLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/blog-feed/src/main/java/scatours/BlogFeedLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/blog-feed/src/main/java/scatours/BlogFeedLauncher.java new file mode 100644 index 0000000000..8dc6956986 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/blog-feed/src/main/java/scatours/BlogFeedLauncher.java @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +public class BlogFeedLauncher { + + public static void main(String[] args) throws Exception { + SCAContribution feedContribution = locate("blog-feed"); + + SCANode node = SCANodeFactory.newInstance().createSCANode("blog-feed.composite", feedContribution); + node.start(); + + System.out.println("Node started - Press enter to shutdown."); + System.out.println(); + System.out.println("To view the blog feed, use your Web browser to view:"); + System.out.println(" Feeds using Tuscany Data APIs"); + System.out.println(" http://localhost:8090/BlogAtom"); + System.out.println(" http://localhost:8090/BlogRSS"); + System.out.println(" Feeds using Atom APIs"); + System.out.println(" http://localhost:8090/BlogAtomAPIs"); + System.out.println(" Feeds using RSS APIs"); + System.out.println(" http://localhost:8090/BlogRSSAPIs"); + System.out.println(); + System.in.read(); + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/build.xml new file mode 100644 index 0000000000..fd11d4c28a --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/build.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/build.xml new file mode 100644 index 0000000000..127afa94d7 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/pom.xml new file mode 100644 index 0000000000..81c13098f4 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/pom.xml @@ -0,0 +1,130 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-buildingblocks + Apache Tuscany SCA Tours Building Blocks Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.activemq + activemq-all + 5.2.0 + + + org.apache.activemq + activemq-web-demo + + + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-jetty + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-jms-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-jms-asf + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.BuildingBlocksLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/src/main/java/scatours/BuildingBlocksLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/src/main/java/scatours/BuildingBlocksLauncher.java new file mode 100644 index 0000000000..aaca0f44fa --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/src/main/java/scatours/BuildingBlocksLauncher.java @@ -0,0 +1,92 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import org.apache.activemq.broker.BrokerService; +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import static scatours.launcher.LauncherUtil.locate; + +public class BuildingBlocksLauncher { + + public static void main(String[] args) throws Exception { + runImpl(); + runImplInclude(); + runAppl(); + } + + private static void runImpl() throws Exception { + SCANode node = + SCANodeFactory.newInstance().createSCANode("tours-impl-client.composite", + locate("buildingblocks"), + locate("buildingblocks-client")); + + node.start(); + + Runnable client = ((SCAClient)node).getService(Runnable.class, "ToursClient/Runnable"); + client.run(); + + node.stop(); + } + + private static void runImplInclude() throws Exception { + SCANode node = + SCANodeFactory.newInstance().createSCANode("tours-impl-include-client.composite", + locate("introducing-trips"), + locate("buildingblocks"), + locate("buildingblocks-client")); + + node.start(); + + Runnable client = ((SCAClient)node).getService(Runnable.class, "ToursClient/Runnable"); + client.run(); + + node.stop(); + } + + private static void runAppl() throws Exception { + final BrokerService jmsBroker = new BrokerService(); + jmsBroker.setPersistent(false); + jmsBroker.setUseJmx(false); + jmsBroker.addConnector("tcp://localhost:61619"); + + SCANode node1 = + SCANodeFactory.newInstance().createSCANode("tours-appl.composite", + locate("introducing-trips"), + locate("buildingblocks")); + + SCANode node2 = + SCANodeFactory.newInstance().createSCANode("tours-appl-client.composite", + locate("buildingblocks-client")); + + jmsBroker.start(); + node1.start(); + node2.start(); + + Runnable client = ((SCAClient)node2).getService(Runnable.class, "ApplClient/Runnable"); + client.run(); + + node2.stop(); + node1.stop(); + jmsBroker.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/src/main/resources/jndi.properties b/sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/src/main/resources/jndi.properties new file mode 100644 index 0000000000..88270fd1e0 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/src/main/resources/jndi.properties @@ -0,0 +1,39 @@ +## --------------------------------------------------------------------------- +## Licensed to the Apache Software Foundation (ASF) under one or more +## contributor license agreements. See the NOTICE file distributed with +## this work for additional information regarding copyright ownership. +## The ASF licenses this file to You under the Apache License, Version 2.0 +## (the "License"); you may not use this file except in compliance with +## the License. You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## --------------------------------------------------------------------------- + +# START SNIPPET: jndi + +java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory + +# use the following property to configure the default connector +java.naming.provider.url = vm://localhost?broker.persistent=false + +# use the following property to specify the JNDI name the connection factory +# should appear as. +#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry +connectionFactoryNames = ConnectionFactory + +# register some queues in JNDI using the form +# queue.[jndiName] = [physicalName] +queue.BookTrip = BookTripRequestQueue +queue.Checkout = CheckoutRequestQueue + +# register some topics in JNDI using the form +# topic.[jndiName] = [physicalName] +#topic.MyTopic = example.MyTopic + +# END SNIPPET: jndi diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/src/test/java/scatours/BuildingBlocksTestCase.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/src/test/java/scatours/BuildingBlocksTestCase.java new file mode 100644 index 0000000000..55943e2f45 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/buildingblocks/src/test/java/scatours/BuildingBlocksTestCase.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package scatours; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +/** + * Tests the launcher + */ +public class BuildingBlocksTestCase { + + @Before + public void startServer() throws Exception { + } + + @Test + public void testLauncher() throws Exception { + BuildingBlocksLauncher.main(null); + } + + @After + public void stopServer() throws Exception { + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/build.xml new file mode 100644 index 0000000000..20c4a3c11c --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/build.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/pom.xml new file mode 100644 index 0000000000..bf82181763 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/pom.xml @@ -0,0 +1,104 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-currency-converter-corba + Apache Tuscany SCA Tours Currency Converter CORBA Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-corba-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-corba-jse-tns + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.CurrencyConverterCORBALauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/src/main/java/scatours/CurrencyConverterCORBALauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/src/main/java/scatours/CurrencyConverterCORBALauncher.java new file mode 100644 index 0000000000..0f9d0eca80 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/src/main/java/scatours/CurrencyConverterCORBALauncher.java @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import scatours.currencyconverter.CurrencyConverter; + +public class CurrencyConverterCORBALauncher { + + public static void main(String[] args) throws Exception { + SCAContribution currencyCORBAContribution = locate("currency-corba"); + SCAContribution currencyContribution = locate("currency"); + + SCANode node = + SCANodeFactory.newInstance().createSCANode("currency-converter-corba.composite", + currencyContribution, + currencyCORBAContribution); + node.start(); + + System.out.println("Quick currency converter test"); + CurrencyConverter converter = ((SCAClient)node).getService(CurrencyConverter.class, "CurrencyConverter"); + System.out.println("USD -> GBP = " + converter.getExchangeRate("USD", "GBP")); + System.out.println("100 USD = " + converter.convert("USD", "GBP", 100) + "GBP"); + + System.out.println("Node started - Press enter to shutdown."); + System.in.read(); + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/src/main/java/scatours/currencyconverter/CurrencyConverter.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/src/main/java/scatours/currencyconverter/CurrencyConverter.java new file mode 100644 index 0000000000..fe5c98bf02 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/src/main/java/scatours/currencyconverter/CurrencyConverter.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package scatours.currencyconverter; + +import org.osoa.sca.annotations.Remotable; + +/** + * The CurrencyConverter service interface + */ +@Remotable +public interface CurrencyConverter { + + double getExchangeRate(String fromCurrencyCode, String toCurrencyCode); + + double convert(String fromCurrencyCode, String toCurrencyCode, double amount); + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-jms/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-jms/build.xml new file mode 100644 index 0000000000..470e28bbf9 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-jms/build.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-jms/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-jms/pom.xml new file mode 100644 index 0000000000..d69d8a5cb1 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-jms/pom.xml @@ -0,0 +1,115 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-currency-converter-jms + Apache Tuscany SCA Tours Currency Converter JMS Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-jms-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-jms-asf + ${tuscany.version} + + + + junit + junit + 4.5 + test + + + + org.apache.activemq + activemq-all + 5.2.0 + + + org.apache.activemq + activemq-web-demo + + + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.CurrencyConverterJMSLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-jms/src/main/java/scatours/CurrencyConverterJMSLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-jms/src/main/java/scatours/CurrencyConverterJMSLauncher.java new file mode 100644 index 0000000000..9de41eb478 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-jms/src/main/java/scatours/CurrencyConverterJMSLauncher.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +public class CurrencyConverterJMSLauncher { + + public static void main(String[] args) throws Exception { + SCAContribution currencyJMSContribution = locate("currency-jms"); + SCAContribution currencyContribution = locate("currency"); + + SCANode node = + SCANodeFactory.newInstance().createSCANode("currency-converter-jms.composite", + currencyContribution, + currencyJMSContribution); + node.start(); + + System.out.println("Node started - Press enter to shutdown."); + System.in.read(); + + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-jms/src/main/java/scatours/JMSBrokerLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-jms/src/main/java/scatours/JMSBrokerLauncher.java new file mode 100644 index 0000000000..929eb78431 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-jms/src/main/java/scatours/JMSBrokerLauncher.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package scatours; + +import org.apache.activemq.broker.BrokerService; + +public class JMSBrokerLauncher { + + public static void main(String[] args) throws Exception { + final BrokerService jmsBroker = new BrokerService(); + jmsBroker.setPersistent(false); + jmsBroker.setUseJmx(false); + jmsBroker.addConnector("tcp://localhost:61619"); + jmsBroker.start(); + + System.out.println("JMS Message Broker started"); + System.out.println("Press enter to shutdown."); + System.in.read(); + + jmsBroker.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-rmi/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-rmi/build.xml new file mode 100644 index 0000000000..e61222505e --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-rmi/build.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-rmi/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-rmi/pom.xml new file mode 100644 index 0000000000..2782f72a76 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-rmi/pom.xml @@ -0,0 +1,111 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-currency-converter-rmi + Apache Tuscany SCA Tours Currency Converter RMI Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-rmi + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-rmi-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-rmi + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.CurrencyConverterRMILauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-rmi/src/main/java/com/tuscanyscatours/currencyconverter/CurrencyConverter.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-rmi/src/main/java/com/tuscanyscatours/currencyconverter/CurrencyConverter.java new file mode 100644 index 0000000000..b1f783bfba --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-rmi/src/main/java/com/tuscanyscatours/currencyconverter/CurrencyConverter.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES 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.tuscanyscatours.currencyconverter; + +import org.osoa.sca.annotations.Remotable; + +/** + * The CurrencyConverter service interface + */ +@Remotable +public interface CurrencyConverter { + + double getExchangeRate(String fromCurrencyCode, String toCurrencyCode); + + double convert(String fromCurrencyCode, String toCurrencyCode, double amount); + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-rmi/src/main/java/scatours/CurrencyConverterRMILauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-rmi/src/main/java/scatours/CurrencyConverterRMILauncher.java new file mode 100644 index 0000000000..b509cfef5c --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-rmi/src/main/java/scatours/CurrencyConverterRMILauncher.java @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import com.tuscanyscatours.currencyconverter.CurrencyConverter; + +public class CurrencyConverterRMILauncher { + + public static void main(String[] args) throws Exception { + SCAContribution currencyRMIContribution = locate("currency-rmi"); + SCAContribution currencyContribution = locate("currency"); + + SCANode node = + SCANodeFactory.newInstance().createSCANode("currency-converter-rmi.composite", + currencyContribution, + currencyRMIContribution); + node.start(); + + System.out.println("Quick currency converter test"); + CurrencyConverter converter = ((SCAClient)node).getService(CurrencyConverter.class, "CurrencyConverter"); + System.out.println("USD -> GBP = " + converter.getExchangeRate("USD", "GBP")); + System.out.println("100 USD = " + converter.convert("USD", "GBP", 100) + "GBP"); + + System.out.println("Node started - Press enter to shutdown."); + System.in.read(); + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-ws/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-ws/build.xml new file mode 100644 index 0000000000..be278c5c24 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-ws/build.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-ws/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-ws/pom.xml new file mode 100644 index 0000000000..cc57ab3c9e --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-ws/pom.xml @@ -0,0 +1,105 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + + 1.0-SNAPSHOT + scatours-launcher-currency-converter-ws + Apache Tuscany SCA Tours Currency Converter Web Service Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-tomcat + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.CurrencyConverterWSLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-ws/src/main/java/scatours/CurrencyConverterWSLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-ws/src/main/java/scatours/CurrencyConverterWSLauncher.java new file mode 100644 index 0000000000..2425d3f483 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-ws/src/main/java/scatours/CurrencyConverterWSLauncher.java @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import scatours.currencyconverter.CurrencyConverter; + +public class CurrencyConverterWSLauncher { + + public static void main(String[] args) throws Exception { + SCAContribution currencyWSContribution = locate("currency-ws"); + SCAContribution currencyContribution = locate("currency"); + + SCANode node = + SCANodeFactory.newInstance().createSCANode("currency-converter-ws.composite", + currencyContribution, + currencyWSContribution); + node.start(); + + System.out.println("Quick currency converter test"); + CurrencyConverter converter = ((SCAClient)node).getService(CurrencyConverter.class, "CurrencyConverter"); + System.out.println("USD -> GBP = " + converter.getExchangeRate("USD", "GBP")); + System.out.println("100 USD = " + converter.convert("USD", "GBP", 100) + "GBP"); + + System.out.println("Node started - Press enter to shutdown."); + System.in.read(); + + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-ws/src/main/java/scatours/currencyconverter/CurrencyConverter.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-ws/src/main/java/scatours/currencyconverter/CurrencyConverter.java new file mode 100644 index 0000000000..fe5c98bf02 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-ws/src/main/java/scatours/currencyconverter/CurrencyConverter.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package scatours.currencyconverter; + +import org.osoa.sca.annotations.Remotable; + +/** + * The CurrencyConverter service interface + */ +@Remotable +public interface CurrencyConverter { + + double getExchangeRate(String fromCurrencyCode, String toCurrencyCode); + + double convert(String fromCurrencyCode, String toCurrencyCode, double amount); + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter/build.xml new file mode 100644 index 0000000000..2771b47262 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter/pom.xml new file mode 100644 index 0000000000..e2dd7cf85b --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter/pom.xml @@ -0,0 +1,90 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-currency-converter + Apache Tuscany SCA Tours Currency Converter Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.CurrencyConverterLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter/src/main/java/scatours/CurrencyConverterLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter/src/main/java/scatours/CurrencyConverterLauncher.java new file mode 100644 index 0000000000..cacd579b3b --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter/src/main/java/scatours/CurrencyConverterLauncher.java @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import scatours.currencyconverter.CurrencyConverter; + +public class CurrencyConverterLauncher { + + public static void main(String[] args) throws Exception { + SCAContribution currencyContribution = locate("currency"); + + SCANode node = SCANodeFactory.newInstance().createSCANode("currency-converter.composite", currencyContribution); + node.start(); + + System.out.println("Quick currency converter test"); + CurrencyConverter converter = ((SCAClient)node).getService(CurrencyConverter.class, "CurrencyConverter"); + System.out.println("USD -> GBP = " + converter.getExchangeRate("USD", "GBP")); + System.out.println("100 USD = " + converter.convert("USD", "GBP", 100) + "GBP"); + + System.out.println("Node started - Press enter to shutdown."); + System.in.read(); + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter/src/main/java/scatours/currencyconverter/CurrencyConverter.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter/src/main/java/scatours/currencyconverter/CurrencyConverter.java new file mode 100644 index 0000000000..fe5c98bf02 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter/src/main/java/scatours/currencyconverter/CurrencyConverter.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package scatours.currencyconverter; + +import org.osoa.sca.annotations.Remotable; + +/** + * The CurrencyConverter service interface + */ +@Remotable +public interface CurrencyConverter { + + double getExchangeRate(String fromCurrencyCode, String toCurrencyCode); + + double convert(String fromCurrencyCode, String toCurrencyCode, double amount); + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/databinding/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/databinding/build.xml new file mode 100644 index 0000000000..32756dad73 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/databinding/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/databinding/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/databinding/pom.xml new file mode 100644 index 0000000000..8ebfef67af --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/databinding/pom.xml @@ -0,0 +1,169 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + + 1.0-SNAPSHOT + scatours-launcher-databinding + Apache Tuscany SCA Tours Databinding Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-widget-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-resource-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-atom-abdera + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-jsonrpc-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-http-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-sca-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ejb-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-ejb + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-bpel-ode + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-jetty + ${tuscany.version} + runtime + + + + org.apache.derby + derby + 10.3.1.4 + runtime + + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.DatabindingLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/databinding/src/main/java/scatours/DatabindingLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/databinding/src/main/java/scatours/DatabindingLauncher.java new file mode 100644 index 0000000000..6271c60d53 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/databinding/src/main/java/scatours/DatabindingLauncher.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +public class DatabindingLauncher { + public static void main(String[] args) throws Exception { + SCANode node1 = SCANodeFactory.newInstance().createSCANode(null, + locate("payment-java"), + locate("databinding-client")); + + SCANode node2 = SCANodeFactory.newInstance().createSCANode(null, locate("creditcard-payment-sdo")); + + node1.start(); + node2.start(); + + Runnable runner = ((SCAClient)node1).getService(Runnable.class, "TestClient/Runnable"); + runner.run(); + + node1.stop(); + node2.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/feed-logger/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/feed-logger/build.xml new file mode 100644 index 0000000000..26031f3686 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/feed-logger/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/feed-logger/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/feed-logger/pom.xml new file mode 100644 index 0000000000..5b8a188592 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/feed-logger/pom.xml @@ -0,0 +1,111 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + + 1.0-SNAPSHOT + scatours-launcher-feed-logger + Apache Tuscany SCA Tours Feed Logger Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-tomcat + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-atom-abdera + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-rss-rome + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.FeedLoggerLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/feed-logger/src/main/java/scatours/FeedLoggerLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/feed-logger/src/main/java/scatours/FeedLoggerLauncher.java new file mode 100644 index 0000000000..4aea24dbfe --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/feed-logger/src/main/java/scatours/FeedLoggerLauncher.java @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import scatours.feedlogger.FeedLogger; + +public class FeedLoggerLauncher { + + public static void main(String[] args) throws Exception { + SCAContribution feedContribution = locate("feed-logger"); + + SCANode node = SCANodeFactory.newInstance().createSCANode("feed-logger.composite", feedContribution); + node.start(); + + FeedLogger logger = ((SCAClient)node).getService(FeedLogger.class, "FeedLogger"); + logger.logFeeds(5); + + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/feed-logger/src/main/java/scatours/feedlogger/FeedLogger.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/feed-logger/src/main/java/scatours/feedlogger/FeedLogger.java new file mode 100644 index 0000000000..8187e34d2c --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/feed-logger/src/main/java/scatours/feedlogger/FeedLogger.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours.feedlogger; + +public interface FeedLogger { + + /** + * Captures the configured feeds and logs the feed entries. + * + * @param maxEntriesPerFeed The maximum number of entries to log per feed + */ + public void logFeeds(int maxEntriesPerFeed); +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/build.xml new file mode 100644 index 0000000000..d294dc664a --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/build.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/pom.xml new file mode 100644 index 0000000000..ae69ddd348 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/pom.xml @@ -0,0 +1,115 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-fullapp-domain + Apache Tuscany SCA Tours Full App Domain Launcher + + + + org.apache.tuscany.sca + tuscany-node-launcher + ${tuscany.version} + + + + org.apache.tuscany.sca + scatours-contribution-fullapp-bespoketrip + ${pom.version} + provided + + + + org.apache.tuscany.sca + scatours-contribution-creditcard-payment-jaxb + ${pom.version} + provided + + + + org.apache.tuscany.sca + scatours-contribution-fullapp-currency + ${pom.version} + provided + + + + org.apache.tuscany.sca + scatours-contribution-fullapp-coordination + ${pom.version} + provided + + + + org.apache.tuscany.sca + scatours-contribution-fullapp-packagedtrip + ${pom.version} + provided + + + + org.apache.tuscany.sca + scatours-contribution-payment-java + ${pom.version} + provided + + + + org.apache.tuscany.sca + scatours-contribution-fullapp-shoppingcart + ${pom.version} + provided + + + + org.apache.tuscany.sca + scatours-contribution-fullapp-ui + ${pom.version} + provided + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + true + ../lib/ + scatours.FullAppDomainLauncher + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainAPILauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainAPILauncher.java new file mode 100644 index 0000000000..4f8d564eac --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainAPILauncher.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import java.io.IOException; +import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher; + +public class FullAppDomainAPILauncher { + + public static void main(String[] args) throws Exception { + DomainManagerLauncher dml = DomainManagerLauncher.newInstance(); + Object dm = dml.createDomainManager("../../domainconfig/fullapp/target/classes"); + dm.getClass().getMethod("start").invoke(dm); + + System.out.println("Point your browser at - http://localhost:9990/ui/home/ "); + System.out.println("Domain started - Press enter to shutdown."); + + try { + System.in.read(); + } catch (IOException e) { + } + + dm.getClass().getMethod("stop").invoke(dm); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.java new file mode 100644 index 0000000000..599ca75e24 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher; + +public class FullAppDomainLauncher { + + public static void main(String[] args) throws Exception { + String[] dmArgs = {"../domainconfig/fullapp"}; + DomainManagerLauncher.main(dmArgs); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-nodes/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-nodes/build.xml new file mode 100644 index 0000000000..00fef1d701 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-nodes/build.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-nodes/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-nodes/pom.xml new file mode 100644 index 0000000000..fc5f595bdd --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-nodes/pom.xml @@ -0,0 +1,212 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-fullapp-nodes + Apache Tuscany SCA Tours Full Application Nodes Launcher + + + + + org.apache.tuscany.sca + tuscany-assembly + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-core + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-assembly-xml + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-node-launcher + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-domain-manager + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-node-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-widget-runtime-tuscany + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-atom-abdera + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-jsonrpc-js + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-jsonrpc-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-http-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-sca-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ejb-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-ejb + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-bpel-ode + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-spring + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-spring-runtime + ${tuscany.version} + runtime + + + + + + org.apache.derby + derby + 10.3.1.4 + runtime + + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + true + ../lib/ + scatours.FullAppNodesLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-nodes/src/main/java/scatours/FullAppNodesLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-nodes/src/main/java/scatours/FullAppNodesLauncher.java new file mode 100644 index 0000000000..4d6459b749 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-nodes/src/main/java/scatours/FullAppNodesLauncher.java @@ -0,0 +1,78 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import java.io.IOException; + +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +public class FullAppNodesLauncher { + + public static void main(String[] args) throws Exception { + SCANode nodeCreditcard = + SCANodeFactory.newInstance().createSCANodeFromURL("http://localhost:9990/node-config/creditcard"); + nodeCreditcard.start(); + + SCANode nodePayment = + SCANodeFactory.newInstance().createSCANodeFromURL("http://localhost:9990/node-config/payment"); + nodePayment.start(); + + SCANode nodeShoppingcart = + SCANodeFactory.newInstance().createSCANodeFromURL("http://localhost:9990/node-config/shoppingcart"); + nodeShoppingcart.start(); + + SCANode nodeCurrency = + SCANodeFactory.newInstance().createSCANodeFromURL("http://localhost:9990/node-config/currency"); + nodeCurrency.start(); + + SCANode nodePackagedtrip = + SCANodeFactory.newInstance().createSCANodeFromURL("http://localhost:9990/node-config/packagedtrip"); + nodePackagedtrip.start(); + + SCANode nodeBespoketrip = + SCANodeFactory.newInstance().createSCANodeFromURL("http://localhost:9990/node-config/bespoketrip"); + nodeBespoketrip.start(); + + SCANode nodeFrontend = + SCANodeFactory.newInstance().createSCANodeFromURL("http://localhost:9990/node-config/coordination"); + nodeFrontend.start(); + + SCANode nodeUI = SCANodeFactory.newInstance().createSCANodeFromURL("http://localhost:9990/node-config/ui"); + nodeUI.start(); + + System.out.println("Point your browser at - http://localhost:8080/scatours/ "); + System.out.println("Nodes started - Press enter to shutdown."); + + try { + System.in.read(); + } catch (IOException e) { + } + + nodeCreditcard.stop(); + nodePayment.stop(); + nodeShoppingcart.stop(); + nodeCurrency.stop(); + nodePackagedtrip.stop(); + nodeBespoketrip.stop(); + nodeFrontend.stop(); + nodeUI.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp/build.xml new file mode 100644 index 0000000000..977dd2710c --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp/pom.xml new file mode 100644 index 0000000000..7ece4347be --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp/pom.xml @@ -0,0 +1,208 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + + 1.0-SNAPSHOT + scatours-launcher-fullapp + Apache Tuscany SCA Tours Full Application Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-assembly + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-core + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-assembly-xml + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-widget-runtime-tuscany + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-atom-abdera + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-jsonrpc-js + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-jsonrpc-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-http-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-jetty + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-sca-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ejb-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-ejb + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-bpel-ode + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-spring + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-spring-runtime + ${tuscany.version} + runtime + + + + org.apache.derby + derby + 10.3.1.4 + runtime + + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.FullAppLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp/src/main/java/scatours/FullAppLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp/src/main/java/scatours/FullAppLauncher.java new file mode 100644 index 0000000000..9c3bfa8209 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp/src/main/java/scatours/FullAppLauncher.java @@ -0,0 +1,67 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import java.io.IOException; + +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +public class FullAppLauncher { + + public static void main(String[] args) throws Exception { + SCANode node = + SCANodeFactory.newInstance().createSCANode(null, + locate("common"), + locate("currency"), + locate("hotel"), + locate("flight"), + locate("car"), + locate("trip"), + locate("tripbooking"), + locate("travelcatalog"), + locate("payment-java-policy"), + //locate("payment-spring"), + locate("creditcard-payment-jaxb-policy"), + //locate("creditcard-payment-jaxb-policy"), + locate("shoppingcart"), + locate("scatours"), + locate("fullapp-ui"), + locate("fullapp-coordination"), + locate("fullapp-currency"), + locate("fullapp-packagedtrip"), + locate("fullapp-bespoketrip"), + locate("fullapp-shoppingcart")); + + node.start(); + + System.out.println("Point your browser at - http://localhost:8080/scatours/ "); + System.out.println("Node started - Press enter to shutdown."); + + try { + System.in.read(); + } catch (IOException e) { + } + + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/help-pages/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/help-pages/build.xml new file mode 100644 index 0000000000..6488677cb9 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/help-pages/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/help-pages/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/help-pages/pom.xml new file mode 100644 index 0000000000..a501b7849c --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/help-pages/pom.xml @@ -0,0 +1,104 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-help-pages + Apache Tuscany SCA Tours Help Pages Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-resource-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-http-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-tomcat + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.HelpPagesLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/help-pages/src/main/java/scatours/HelpPagesLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/help-pages/src/main/java/scatours/HelpPagesLauncher.java new file mode 100644 index 0000000000..a72f5c4c54 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/help-pages/src/main/java/scatours/HelpPagesLauncher.java @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +public class HelpPagesLauncher { + + public static void main(String[] args) throws Exception { + SCAContribution helpContribution = locate("help-pages"); + + SCANode node = SCANodeFactory.newInstance().createSCANode("help-pages.composite", helpContribution); + node.start(); + + System.out.println("Node started - Press enter to shutdown."); + System.out.println(); + System.out.println("To view the help pages, use your Web browser to view:"); + System.out.println(" http://localhost:8085/help/index.html"); + System.out.println(); + System.in.read(); + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/interaction/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/interaction/build.xml new file mode 100644 index 0000000000..28d3c93d61 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/interaction/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/interaction/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/interaction/pom.xml new file mode 100644 index 0000000000..7cff4aaea7 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/interaction/pom.xml @@ -0,0 +1,104 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-interaction + Apache Tuscany SCA Tours Interaction Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-jetty + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.InteractionLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/interaction/src/main/java/scatours/InteractionLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/interaction/src/main/java/scatours/InteractionLauncher.java new file mode 100644 index 0000000000..292b10aaf0 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/interaction/src/main/java/scatours/InteractionLauncher.java @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +public class InteractionLauncher { + + public static void main(String[] args) throws Exception { + SCANode node1 = + SCANodeFactory.newInstance().createSCANode("client.composite", + locate("common"), + locate("currency"), + locate("calendar"), + locate("shoppingcart"), + locate("interaction-client")); + + SCANode node2 = + SCANodeFactory.newInstance().createSCANode("service.composite", + locate("common"), + locate("hotel"), + locate("flight"), + locate("interaction-service-remote")); + + node2.start(); + node1.start(); + + Runnable localInteraction = ((SCAClient)node1).getService(Runnable.class, "InteractionLocalClient/Runnable"); + localInteraction.run(); + + Runnable remoteInteraction = ((SCAClient)node1).getService(Runnable.class, "InteractionRemoteClient/Runnable"); + remoteInteraction.run(); + + Runnable requestResponseInteraction = + ((SCAClient)node1).getService(Runnable.class, "InteractionRequestResponseClient/Runnable"); + requestResponseInteraction.run(); + + Runnable onewayCallbackInteraction = + ((SCAClient)node1).getService(Runnable.class, "InteractionOneWayCallbackClient/Runnable"); + onewayCallbackInteraction.run(); + + Runnable conversationalInteraction = + ((SCAClient)node1).getService(Runnable.class, "InteractionConversationClient/Runnable"); + conversationalInteraction.run(); + + Runnable statefulCallbackInteraction = + ((SCAClient)node1).getService(Runnable.class, "InteractionStatefulCallbackClient/Runnable"); + statefulCallbackInteraction.run(); + + node1.stop(); + node2.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/interaction/src/test/java/scatours/InteractionTestCase.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/interaction/src/test/java/scatours/InteractionTestCase.java new file mode 100644 index 0000000000..c64e5d1e5b --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/interaction/src/test/java/scatours/InteractionTestCase.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package scatours; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +/** + * Tests the launcher + */ +public class InteractionTestCase { + + @Before + public void startServer() throws Exception { + } + + @Test + public void testLauncher() throws Exception { + InteractionLauncher.main(null); + } + + @After + public void stopServer() throws Exception { + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-client/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-client/build.xml new file mode 100644 index 0000000000..cfe3a6fd76 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-client/build.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-client/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-client/pom.xml new file mode 100644 index 0000000000..f348ea9456 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-client/pom.xml @@ -0,0 +1,93 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-introducing-client + Apache Tuscany SCA Tours Introducing Client Launcher + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-sca-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-jetty + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + true + ../lib/ + scatours.IntroducingClientLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-client/src/main/java/scatours/IntroducingClientLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-client/src/main/java/scatours/IntroducingClientLauncher.java new file mode 100644 index 0000000000..f261ef6e27 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-client/src/main/java/scatours/IntroducingClientLauncher.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +public class IntroducingClientLauncher { + + public static void main(String[] args) throws Exception { + SCANode node = + SCANodeFactory.newInstance().createSCANodeFromURL("http://localhost:9990/node-config/ClientNode"); + node.start(); + + Runnable client = ((SCAClient)node).getService(Runnable.class, "TestClient/Runnable"); + client.run(); + + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/build.xml new file mode 100644 index 0000000000..700515a791 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/build.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/pom.xml new file mode 100644 index 0000000000..2a9f3e53fb --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/pom.xml @@ -0,0 +1,80 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-introducing-domain + Apache Tuscany SCA Tours Introducing Domain Launcher + + + + org.apache.tuscany.sca + tuscany-node-launcher + ${tuscany.version} + + + + org.apache.tuscany.sca + scatours-contribution-introducing-tours + ${pom.version} + provided + + + + org.apache.tuscany.sca + scatours-contribution-introducing-trips + ${pom.version} + provided + + + + org.apache.tuscany.sca + scatours-contribution-introducing-client + ${pom.version} + provided + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + true + ../lib/ + scatours.IntroducingDomainLauncher + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainAPILauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainAPILauncher.java new file mode 100644 index 0000000000..06c5597327 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainAPILauncher.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import java.io.IOException; +import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher; + +public class IntroducingDomainAPILauncher { + + public static void main(String[] args) throws Exception { + DomainManagerLauncher dml = DomainManagerLauncher.newInstance(); + Object dm = dml.createDomainManager("../../domainconfig/introducing/target/classes"); + dm.getClass().getMethod("start").invoke(dm); + + System.out.println("Point your browser at - http://localhost:9990/ui/home/ "); + System.out.println("Domain started - Press enter to shutdown."); + + try { + System.in.read(); + } catch (IOException e) { + } + + dm.getClass().getMethod("stop").invoke(dm); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainLauncher.java new file mode 100644 index 0000000000..b9f7fe040f --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainLauncher.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher; + +public class IntroducingDomainLauncher { + + public static void main(String[] args) throws Exception { + String[] dmArgs = {"../domainconfig/introducing"}; + DomainManagerLauncher.main(dmArgs); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/build.xml new file mode 100644 index 0000000000..3df9db154f --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/build.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/pom.xml new file mode 100644 index 0000000000..0391994557 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/pom.xml @@ -0,0 +1,58 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-introducing-tours + Apache Tuscany SCA Tours Introducing Tours Launcher + + + + org.apache.tuscany.sca + tuscany-node-launcher + ${tuscany.version} + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + true + ../lib/ + scatours.IntroducingToursLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/src/main/java/scatours/IntroducingToursLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/src/main/java/scatours/IntroducingToursLauncher.java new file mode 100644 index 0000000000..7a1dd79890 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/src/main/java/scatours/IntroducingToursLauncher.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import org.apache.tuscany.sca.node.launcher.NodeLauncher; + +public class IntroducingToursLauncher { + + public static void main(String[] args) throws Exception { + String[] dmArgs = {"http://localhost:9990/node-config/ToursNode"}; + NodeLauncher.main(dmArgs); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/build.xml new file mode 100644 index 0000000000..ce9973e395 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/build.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/pom.xml new file mode 100644 index 0000000000..1ef9d06774 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/pom.xml @@ -0,0 +1,58 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-introducing-trips + Apache Tuscany SCA Tours Introducing Trips Launcher + + + + org.apache.tuscany.sca + tuscany-node-launcher + ${tuscany.version} + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + true + ../lib/ + scatours.IntroducingTripsLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/src/main/java/scatours/IntroducingTripsLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/src/main/java/scatours/IntroducingTripsLauncher.java new file mode 100644 index 0000000000..781949940c --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/src/main/java/scatours/IntroducingTripsLauncher.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import org.apache.tuscany.sca.node.launcher.NodeLauncher; + +public class IntroducingTripsLauncher { + + public static void main(String[] args) throws Exception { + String[] dmArgs = {"http://localhost:9990/node-config/TripsNode"}; + NodeLauncher.main(dmArgs); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing/build.xml new file mode 100644 index 0000000000..2da6f00d28 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing/pom.xml new file mode 100644 index 0000000000..5ded853c2a --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing/pom.xml @@ -0,0 +1,90 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-introducing + Apache Tuscany SCA Tours Introducing Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.IntroducingLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing/src/main/java/scatours/IntroducingLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing/src/main/java/scatours/IntroducingLauncher.java new file mode 100644 index 0000000000..4ad19762d9 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing/src/main/java/scatours/IntroducingLauncher.java @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +public class IntroducingLauncher { + + public static void main(String[] args) throws Exception { + SCANode node = + SCANodeFactory.newInstance().createSCANode(null, + locate("introducing-tours"), + locate("introducing-trips"), + locate("introducing-client")); + + node.start(); + + Runnable proxy = ((SCAClient)node).getService(Runnable.class, "TestClient/Runnable"); + proxy.run(); + + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing/src/test/java/scatours/IntroducingTestCase.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing/src/test/java/scatours/IntroducingTestCase.java new file mode 100644 index 0000000000..573d2e76bd --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing/src/test/java/scatours/IntroducingTestCase.java @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package scatours; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +/** + * Test case to run the test code in the introducing-client contribution + * that tests components and services in the introducing-tours contribution + * and the introducing-trips contribution. + */ +public class IntroducingTestCase { + + private SCANode node; + + @Before + public void startServer() throws Exception { + node = + SCANodeFactory.newInstance() + .createSCANode(null, + new SCAContribution("introducing-tours", + "../../contributions/introducing-tours/target/classes"), + new SCAContribution("introducing-trips", + "../../contributions/introducing-trips/target/classes"), + new SCAContribution("introducing-client", + "../../contributions/introducing-client/target/classes")); + node.start(); + } + + @Test + public void testClient() throws Exception { + Runnable proxy = ((SCAClient)node).getService(Runnable.class, "TestClient/Runnable"); + proxy.run(); + } + + @After + public void stopServer() throws Exception { + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/build.xml new file mode 100644 index 0000000000..1ae0e6133e --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/pom.xml new file mode 100644 index 0000000000..1f3722d993 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/pom.xml @@ -0,0 +1,90 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-jumpstart + Apache Tuscany SCA Tours Jump Start Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.JumpstartLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/src/main/java/scatours/JumpstartLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/src/main/java/scatours/JumpstartLauncher.java new file mode 100644 index 0000000000..1ded112193 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/src/main/java/scatours/JumpstartLauncher.java @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +public class JumpstartLauncher { + + public static void main(String[] args) throws Exception { + SCAContribution gvtContribution = locate("introducing-trips"); + + SCANode node = SCANodeFactory.newInstance().createSCANode("trips.composite", gvtContribution); + + node.start(); + + Trips tripProvider = ((SCAClient)node).getService(Trips.class, "TripProvider/Trips"); + + System.out.println("Trip boooking code = " + tripProvider.checkAvailability("FS1APR4", 1)); + + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/src/main/java/scatours/Trips.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/src/main/java/scatours/Trips.java new file mode 100644 index 0000000000..a7abf8e08d --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/src/main/java/scatours/Trips.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package scatours; + +import org.osoa.sca.annotations.Remotable; + +@Remotable +public interface Trips { + String checkAvailability(String trip, int people); +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/src/test/java/scatours/JumpstartTestCase.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/src/test/java/scatours/JumpstartTestCase.java new file mode 100644 index 0000000000..4da7c54917 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/jumpstart/src/test/java/scatours/JumpstartTestCase.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package scatours; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +/** + * Tests the Jump Start scenario + */ +public class JumpstartTestCase { + + private SCANode node; + + @Before + public void startServer() throws Exception { + node = + SCANodeFactory.newInstance() + .createSCANode("trips.composite", + new SCAContribution("introducing-trips", + "../../contributions/introducing-trips/target/classes")); + node.start(); + } + + @Test + public void testClient() throws Exception { + Trips tripProvider = ((SCAClient)node).getService(Trips.class, "TripProvider/Trips"); + System.out.println("Trip boooking code = " + tripProvider.checkAvailability("FS1APR4", 2)); + } + + @After + public void stopServer() throws Exception { + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/build.xml new file mode 100644 index 0000000000..10146b8500 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/build.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/pom.xml new file mode 100644 index 0000000000..b99b64b0cf --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/pom.xml @@ -0,0 +1,104 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-notification-corba + Apache Tuscany SCA Tours Notification CORBA Service Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + 1.6-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 1.6-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-corba-runtime + 1.6-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-host-corba-jse-tns + 1.6-SNAPSHOT + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.NotificationCORBALauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/src/main/java/scatours/NotificationCORBALauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/src/main/java/scatours/NotificationCORBALauncher.java new file mode 100644 index 0000000000..44b94b3a59 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/src/main/java/scatours/NotificationCORBALauncher.java @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import scatours.notification.Notification; + +public class NotificationCORBALauncher { + + public static void main(String[] args) throws Exception { + SCAContribution notificationContribution = locate("notification"); + SCAContribution notificationCORBAContribution = locate("notification-corba"); + + SCANode node = + SCANodeFactory.newInstance().createSCANode("notification-corba.composite", + notificationContribution, + notificationCORBAContribution); + node.start(); + + System.out.println("Quick notification test"); + Notification notification = ((SCAClient)node).getService(Notification.class, "Notification"); + String accountID = "1234"; + String subject = "Holiday payment taken"; + String message = "Payment of £102.37 accepted..."; + notification.notify(accountID, subject, message); + + System.out.println("Node started - Press enter to shutdown."); + System.in.read(); + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/src/main/java/scatours/notification/Notification.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/src/main/java/scatours/notification/Notification.java new file mode 100644 index 0000000000..020e1e40db --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/src/main/java/scatours/notification/Notification.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours.notification; + +public interface Notification { + + boolean notify(String accountID, String subject, String message); + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ejb/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ejb/build.xml new file mode 100644 index 0000000000..f9dbaeb246 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ejb/build.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ejb/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ejb/pom.xml new file mode 100644 index 0000000000..06cd88f2fd --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ejb/pom.xml @@ -0,0 +1,110 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-notification-ejb + Apache Tuscany SCA Tours Notification EJB Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ejb + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ejb-runtime + ${tuscany.version} + runtime + + + + org.apache.openejb + openejb-ejbd + 3.1.1 + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.NotificationEJBLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ejb/src/main/java/scatours/NotificationEJBLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ejb/src/main/java/scatours/NotificationEJBLauncher.java new file mode 100644 index 0000000000..2d843e9ff9 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ejb/src/main/java/scatours/NotificationEJBLauncher.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import javax.naming.Context; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import scatours.notification.Notification; + +public class NotificationEJBLauncher { + + public static void main(String[] args) throws Exception { + System.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory"); + System.setProperty(Context.PROVIDER_URL, "ejbd://localhost:4201"); + + SCAContribution notificationContribution = locate("notification"); + SCAContribution notificationEJBContribution = locate("notification-ejb"); + + SCANode node = + SCANodeFactory.newInstance().createSCANode("notification-ejb.composite", + notificationContribution, + notificationEJBContribution); + node.start(); + + System.out.println("Quick notification test"); + Notification notification = ((SCAClient)node).getService(Notification.class, "Notification"); + String accountID = "1234"; + String subject = "Holiday payment taken"; + String message = "Payment of £102.37 accepted..."; + notification.notify(accountID, subject, message); + + System.out.println("Node started - Press enter to shutdown."); + System.in.read(); + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ejb/src/main/java/scatours/notification/Notification.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ejb/src/main/java/scatours/notification/Notification.java new file mode 100644 index 0000000000..020e1e40db --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ejb/src/main/java/scatours/notification/Notification.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours.notification; + +public interface Notification { + + boolean notify(String accountID, String subject, String message); + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-jms/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-jms/build.xml new file mode 100644 index 0000000000..3d20022d2e --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-jms/build.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-jms/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-jms/pom.xml new file mode 100644 index 0000000000..0441ba9cff --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-jms/pom.xml @@ -0,0 +1,148 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-notification-jms + Apache Tuscany SCA Tours Notification JMS Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-jms-asf + ${tuscany.version} + + + + junit + junit + 4.5 + test + + + + org.apache.activemq + activemq-all + 5.2.0 + + + org.apache.activemq + activemq-web-demo + + + + + + org.apache.ws.commons.axiom + axiom-api + 1.2.7 + + + xerces + xercesImpl + + + stax + stax-api + + + xml-apis + xml-apis + + + + + + org.apache.ws.commons.axiom + axiom-impl + 1.2.7 + runtime + + + stax + stax-api + + + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.NotificationJMSLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-jms/src/main/java/scatours/NotificationJMSLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-jms/src/main/java/scatours/NotificationJMSLauncher.java new file mode 100644 index 0000000000..c2ffda0725 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-jms/src/main/java/scatours/NotificationJMSLauncher.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import scatours.notification.Notification; + +public class NotificationJMSLauncher { + + public static void main(String[] args) throws Exception { + SCAContribution notificationContribution = locate("notification"); + SCAContribution notificationJMSContribution = locate("notification-jms"); + + SCANode node = + SCANodeFactory.newInstance().createSCANode("notification-jms.composite", + notificationContribution, + notificationJMSContribution); + + try { + node.start(); + + System.out.println("Quick notification test"); + Notification notification = ((SCAClient)node).getService(Notification.class, "Notification"); + String accountID = "1234"; + String subject = "Holiday payment taken"; + String message = "Payment of £102.37 accepted..."; + notification.notify(accountID, subject, message); + System.out.println("Notification sent"); + } finally { + node.stop(); + } + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-jms/src/main/java/scatours/notification/Notification.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-jms/src/main/java/scatours/notification/Notification.java new file mode 100644 index 0000000000..020e1e40db --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-jms/src/main/java/scatours/notification/Notification.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours.notification; + +public interface Notification { + + boolean notify(String accountID, String subject, String message); + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/build.xml new file mode 100644 index 0000000000..c21d30071d --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/build.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/pom.xml new file mode 100644 index 0000000000..ecac2d2d18 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/pom.xml @@ -0,0 +1,104 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-notification-rmi + Apache Tuscany SCA Tours Notification RMI Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-rmi + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-rmi-runtime + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.NotificationRMILauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java new file mode 100644 index 0000000000..4ce528fd23 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES 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.tuscanyscatours.smsgateway; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +/** + * A gateway to send SMS messages. + */ +public interface SMSGateway extends Remote { + boolean sendSMS(String fromNumber, String toNumber, String text) throws RemoteException; +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/src/main/java/scatours/NotificationRMILauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/src/main/java/scatours/NotificationRMILauncher.java new file mode 100644 index 0000000000..2904349a49 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/src/main/java/scatours/NotificationRMILauncher.java @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import scatours.notification.Notification; + +public class NotificationRMILauncher { + + public static void main(String[] args) throws Exception { + SCAContribution notificationContribution = locate("notification"); + SCAContribution notificationRMIContribution = locate("notification-rmi"); + + SCANode node = + SCANodeFactory.newInstance().createSCANode("notification-rmi.composite", + notificationContribution, + notificationRMIContribution); + node.start(); + + System.out.println("Quick notification test"); + Notification notification = ((SCAClient)node).getService(Notification.class, "Notification"); + String accountID = "1234"; + String subject = "Holiday payment taken"; + String message = "Payment of £102.37 accepted..."; + notification.notify(accountID, subject, message); + + System.out.println("Node started - Press enter to shutdown."); + System.in.read(); + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/src/main/java/scatours/notification/Notification.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/src/main/java/scatours/notification/Notification.java new file mode 100644 index 0000000000..020e1e40db --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-rmi/src/main/java/scatours/notification/Notification.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours.notification; + +public interface Notification { + + boolean notify(String accountID, String subject, String message); + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/build.xml new file mode 100644 index 0000000000..7f8e3bc917 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/build.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/pom.xml new file mode 100644 index 0000000000..19669752cb --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/pom.xml @@ -0,0 +1,104 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-notification-ws + Apache Tuscany SCA Tours Notification Web Service Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-tomcat + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.NotificationWSLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/src/main/java/scatours/NotificationWSLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/src/main/java/scatours/NotificationWSLauncher.java new file mode 100644 index 0000000000..fbdb1500f5 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/src/main/java/scatours/NotificationWSLauncher.java @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import scatours.notification.Notification; + +public class NotificationWSLauncher { + + public static void main(String[] args) throws Exception { + SCAContribution notificationContribution = locate("notification"); + SCAContribution notificationWSContribution = locate("notification-ws"); + + SCANode node = + SCANodeFactory.newInstance().createSCANode("notification-ws.composite", + notificationContribution, + notificationWSContribution); + node.start(); + + System.out.println("Quick notification test"); + Notification notification = ((SCAClient)node).getService(Notification.class, "Notification"); + String accountID = "1234"; + String subject = "Holiday payment taken"; + String message = "Payment of £102.37 accepted..."; + notification.notify(accountID, subject, message); + + System.out.println("Node started - Press enter to shutdown."); + System.in.read(); + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/src/main/java/scatours/notification/Notification.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/src/main/java/scatours/notification/Notification.java new file mode 100644 index 0000000000..020e1e40db --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/src/main/java/scatours/notification/Notification.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours.notification; + +public interface Notification { + + boolean notify(String accountID, String subject, String message); + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/build.xml new file mode 100644 index 0000000000..f1811cd2f4 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/pom.xml new file mode 100644 index 0000000000..7c48fec51f --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/pom.xml @@ -0,0 +1,136 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-payment-bpel + Apache Tuscany SCA Tours Payment BPEL Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-bpel-ode + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-jetty + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.PaymentLauncher + + + + + + 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}/classes/ + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java new file mode 100644 index 0000000000..e5f3ef3cad --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java @@ -0,0 +1,62 @@ + +package com.tuscanyscatours.payment; + +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 MakePaymentMemberResponseType complex type. + * + *

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

+ * <complexType name="MakePaymentMemberResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Status" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MakePaymentMemberResponseType", propOrder = { + "status" +}) +public class MakePaymentMemberResponseType { + + @XmlElement(name = "Status", required = true) + protected String status; + + /** + * 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; + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java new file mode 100644 index 0000000000..ca94d86628 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java @@ -0,0 +1,82 @@ + +package com.tuscanyscatours.payment; + +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 MakePaymentMemberType complex type. + * + *

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

+ * <complexType name="MakePaymentMemberType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CustomerId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Amount" type="{http://www.w3.org/2001/XMLSchema}float"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MakePaymentMemberType", propOrder = { + "customerId", + "amount" +}) +public class MakePaymentMemberType { + + @XmlElement(name = "CustomerId", required = true) + protected String customerId; + @XmlElement(name = "Amount") + protected float amount; + + /** + * Gets the value of the customerId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCustomerId() { + return customerId; + } + + /** + * Sets the value of the customerId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCustomerId(String value) { + this.customerId = value; + } + + /** + * Gets the value of the amount property. + * + */ + public float getAmount() { + return amount; + } + + /** + * Sets the value of the amount property. + * + */ + public void setAmount(float value) { + this.amount = value; + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java new file mode 100644 index 0000000000..b069b2ba94 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java @@ -0,0 +1,71 @@ + +package com.tuscanyscatours.payment; + +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.tuscanyscatours.payment 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 _MakePaymentMember_QNAME = new QName("http://www.tuscanyscatours.com/Payment/", "makePaymentMember"); + private final static QName _MakePaymentMemberResponse_QNAME = new QName("http://www.tuscanyscatours.com/Payment/", "makePaymentMemberResponse"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.tuscanyscatours.payment + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link MakePaymentMemberResponseType } + * + */ + public MakePaymentMemberResponseType createMakePaymentMemberResponseType() { + return new MakePaymentMemberResponseType(); + } + + /** + * Create an instance of {@link MakePaymentMemberType } + * + */ + public MakePaymentMemberType createMakePaymentMemberType() { + return new MakePaymentMemberType(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link MakePaymentMemberType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.tuscanyscatours.com/Payment/", name = "makePaymentMember") + public JAXBElement createMakePaymentMember(MakePaymentMemberType value) { + return new JAXBElement(_MakePaymentMember_QNAME, MakePaymentMemberType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link MakePaymentMemberResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.tuscanyscatours.com/Payment/", name = "makePaymentMemberResponse") + public JAXBElement createMakePaymentMemberResponse(MakePaymentMemberResponseType value) { + return new JAXBElement(_MakePaymentMemberResponse_QNAME, MakePaymentMemberResponseType.class, null, value); + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/Payment.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/Payment.java new file mode 100644 index 0000000000..bbbd03d89a --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/Payment.java @@ -0,0 +1,43 @@ + +package com.tuscanyscatours.payment; + +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.7-b01- + * Generated source version: 2.1 + * + */ +@WebService(name = "Payment", targetNamespace = "http://www.tuscanyscatours.com/Payment/") +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface Payment { + + + /** + * + * @param amount + * @param customerId + * @return + * returns java.lang.String + */ + @WebMethod(action = "http://www.tuscanyscatours.com/Payment/makePayment") + @WebResult(name = "Status", targetNamespace = "") + @RequestWrapper(localName = "makePaymentMember", targetNamespace = "http://www.tuscanyscatours.com/Payment/", className = "com.tuscanyscatours.payment.MakePaymentMemberType") + @ResponseWrapper(localName = "makePaymentMemberResponse", targetNamespace = "http://www.tuscanyscatours.com/Payment/", className = "com.tuscanyscatours.payment.MakePaymentMemberResponseType") + public String makePaymentMember( + @WebParam(name = "CustomerId", targetNamespace = "") + String customerId, + @WebParam(name = "Amount", targetNamespace = "") + float amount); + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/PaymentService.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/PaymentService.java new file mode 100644 index 0000000000..a430175976 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/PaymentService.java @@ -0,0 +1,71 @@ + +package com.tuscanyscatours.payment; + +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.7-b01- + * Generated source version: 2.1 + * + */ +@WebServiceClient(name = "PaymentService", targetNamespace = "http://www.tuscanyscatours.com/Payment/", wsdlLocation = "file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl") +public class PaymentService + extends Service +{ + + private final static URL PAYMENTSERVICE_WSDL_LOCATION; + private final static Logger logger = Logger.getLogger(com.tuscanyscatours.payment.PaymentService.class.getName()); + + static { + URL url = null; + try { + URL baseUrl; + baseUrl = com.tuscanyscatours.payment.PaymentService.class.getResource("."); + url = new URL(baseUrl, "file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl"); + } catch (MalformedURLException e) { + logger.warning("Failed to create URL for the wsdl Location: 'file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl', retrying as a local file"); + logger.warning(e.getMessage()); + } + PAYMENTSERVICE_WSDL_LOCATION = url; + } + + public PaymentService(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public PaymentService() { + super(PAYMENTSERVICE_WSDL_LOCATION, new QName("http://www.tuscanyscatours.com/Payment/", "PaymentService")); + } + + /** + * + * @return + * returns Payment + */ + @WebEndpoint(name = "PaymentPort") + public Payment getPaymentPort() { + return super.getPort(new QName("http://www.tuscanyscatours.com/Payment/", "PaymentPort"), Payment.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 Payment + */ + @WebEndpoint(name = "PaymentPort") + public Payment getPaymentPort(WebServiceFeature... features) { + return super.getPort(new QName("http://www.tuscanyscatours.com/Payment/", "PaymentPort"), Payment.class, features); + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/package-info.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/package-info.java new file mode 100644 index 0000000000..acd208f5c9 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/com/tuscanyscatours/payment/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.tuscanyscatours.com/Payment/") +package com.tuscanyscatours.payment; diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/scatours/payment/PaymentLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/scatours/payment/PaymentLauncher.java new file mode 100644 index 0000000000..0208f058a6 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-bpel/src/main/java/scatours/payment/PaymentLauncher.java @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours.payment; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import com.tuscanyscatours.payment.Payment; + +public class PaymentLauncher { + + public static void main(String[] args) throws Exception { + SCANode node = SCANodeFactory.newInstance().createSCANode(null, + locate("payment-bpel"), + locate("creditcard-payment-jaxb"), + locate("emailgateway")); + node.start(); + + SCAClient client = (SCAClient)node; + Payment payment = client.getService(Payment.class, "Payment/paymentPartnerLink"); + + System.out.println("Payment BPEL test"); + System.out.println("\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f)); + System.out.println("\n\nFailed Payment - Status = \n\n" + payment.makePaymentMember("c-1", 100.00f)); + + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/build.xml new file mode 100644 index 0000000000..8889eb370c --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/pom.xml new file mode 100644 index 0000000000..a4c56c19a5 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/pom.xml @@ -0,0 +1,111 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-payment-groovy + Apache Tuscany SCA Tours Payment Groovy Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-script + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-jetty + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.PaymentLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/EmailGateway.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/EmailGateway.java new file mode 100644 index 0000000000..0e4e9726de --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/EmailGateway.java @@ -0,0 +1,40 @@ + +package com.tuscanyscatours.emailgateway; + +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.7-b01- + * Generated source version: 2.1 + * + */ +@WebService(name = "EmailGateway", targetNamespace = "http://www.tuscanyscatours.com/EmailGateway/") +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface EmailGateway { + + + /** + * + * @param email + * @return + * returns java.lang.String + */ + @WebMethod(action = "http://www.tuscanyscatours.com/EmailGateway/sendEmail") + @WebResult(name = "Status", targetNamespace = "") + @RequestWrapper(localName = "sendEmail", targetNamespace = "http://www.tuscanyscatours.com/EmailGateway/", className = "com.tuscanyscatours.emailgateway.SendEmailType") + @ResponseWrapper(localName = "sendEmailResponse", targetNamespace = "http://www.tuscanyscatours.com/EmailGateway/", className = "com.tuscanyscatours.emailgateway.SendEmailResponseType") + public String sendEmail( + @WebParam(name = "Email", targetNamespace = "") + EmailType email); + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/EmailGatewayService.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/EmailGatewayService.java new file mode 100644 index 0000000000..8f87855dd9 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/EmailGatewayService.java @@ -0,0 +1,71 @@ + +package com.tuscanyscatours.emailgateway; + +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.7-b01- + * Generated source version: 2.1 + * + */ +@WebServiceClient(name = "EmailGatewayService", targetNamespace = "http://www.tuscanyscatours.com/EmailGateway/", wsdlLocation = "file:/C:/simon/tuscany/travelsample/contributions/payment-groovy/src/main/resources/EmailGateway.wsdl") +public class EmailGatewayService + extends Service +{ + + private final static URL EMAILGATEWAYSERVICE_WSDL_LOCATION; + private final static Logger logger = Logger.getLogger(com.tuscanyscatours.emailgateway.EmailGatewayService.class.getName()); + + static { + URL url = null; + try { + URL baseUrl; + baseUrl = com.tuscanyscatours.emailgateway.EmailGatewayService.class.getResource("."); + url = new URL(baseUrl, "file:/C:/simon/tuscany/travelsample/contributions/payment-groovy/src/main/resources/EmailGateway.wsdl"); + } catch (MalformedURLException e) { + logger.warning("Failed to create URL for the wsdl Location: 'file:/C:/simon/tuscany/travelsample/contributions/payment-groovy/src/main/resources/EmailGateway.wsdl', retrying as a local file"); + logger.warning(e.getMessage()); + } + EMAILGATEWAYSERVICE_WSDL_LOCATION = url; + } + + public EmailGatewayService(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public EmailGatewayService() { + super(EMAILGATEWAYSERVICE_WSDL_LOCATION, new QName("http://www.tuscanyscatours.com/EmailGateway/", "EmailGatewayService")); + } + + /** + * + * @return + * returns EmailGateway + */ + @WebEndpoint(name = "EmailGatewayPort") + public EmailGateway getEmailGatewayPort() { + return super.getPort(new QName("http://www.tuscanyscatours.com/EmailGateway/", "EmailGatewayPort"), EmailGateway.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 EmailGateway + */ + @WebEndpoint(name = "EmailGatewayPort") + public EmailGateway getEmailGatewayPort(WebServiceFeature... features) { + return super.getPort(new QName("http://www.tuscanyscatours.com/EmailGateway/", "EmailGatewayPort"), EmailGateway.class, features); + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/EmailType.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/EmailType.java new file mode 100644 index 0000000000..25935d2303 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/EmailType.java @@ -0,0 +1,118 @@ + +package com.tuscanyscatours.emailgateway; + +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 EmailType complex type. + * + *

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

+ * <complexType name="EmailType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="To" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Title" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Body" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EmailType", propOrder = { + "to", + "title", + "body" +}) +public class EmailType { + + @XmlElement(name = "To", required = true) + protected String to; + @XmlElement(name = "Title", required = true) + protected String title; + @XmlElement(name = "Body", required = true) + protected String body; + + /** + * Gets the value of the to property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTo() { + return to; + } + + /** + * Sets the value of the to property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTo(String value) { + this.to = value; + } + + /** + * Gets the value of the title property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTitle() { + return title; + } + + /** + * Sets the value of the title property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTitle(String value) { + this.title = value; + } + + /** + * Gets the value of the body property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getBody() { + return body; + } + + /** + * Sets the value of the body property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setBody(String value) { + this.body = value; + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/ObjectFactory.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/ObjectFactory.java new file mode 100644 index 0000000000..f414bb3eb3 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/ObjectFactory.java @@ -0,0 +1,79 @@ + +package com.tuscanyscatours.emailgateway; + +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.tuscanyscatours.emailgateway 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 _SendEmailResponse_QNAME = new QName("http://www.tuscanyscatours.com/EmailGateway/", "sendEmailResponse"); + private final static QName _SendEmail_QNAME = new QName("http://www.tuscanyscatours.com/EmailGateway/", "sendEmail"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.tuscanyscatours.emailgateway + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link SendEmailType } + * + */ + public SendEmailType createSendEmailType() { + return new SendEmailType(); + } + + /** + * Create an instance of {@link EmailType } + * + */ + public EmailType createEmailType() { + return new EmailType(); + } + + /** + * Create an instance of {@link SendEmailResponseType } + * + */ + public SendEmailResponseType createSendEmailResponseType() { + return new SendEmailResponseType(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SendEmailResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.tuscanyscatours.com/EmailGateway/", name = "sendEmailResponse") + public JAXBElement createSendEmailResponse(SendEmailResponseType value) { + return new JAXBElement(_SendEmailResponse_QNAME, SendEmailResponseType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SendEmailType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.tuscanyscatours.com/EmailGateway/", name = "sendEmail") + public JAXBElement createSendEmail(SendEmailType value) { + return new JAXBElement(_SendEmail_QNAME, SendEmailType.class, null, value); + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/SendEmailResponseType.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/SendEmailResponseType.java new file mode 100644 index 0000000000..6d366b7554 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/SendEmailResponseType.java @@ -0,0 +1,62 @@ + +package com.tuscanyscatours.emailgateway; + +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 SendEmailResponseType complex type. + * + *

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

+ * <complexType name="SendEmailResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Status" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SendEmailResponseType", propOrder = { + "status" +}) +public class SendEmailResponseType { + + @XmlElement(name = "Status", required = true) + protected String status; + + /** + * 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; + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/SendEmailType.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/SendEmailType.java new file mode 100644 index 0000000000..cc8e15366c --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/SendEmailType.java @@ -0,0 +1,62 @@ + +package com.tuscanyscatours.emailgateway; + +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 SendEmailType complex type. + * + *

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

+ * <complexType name="SendEmailType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Email" type="{http://www.tuscanyscatours.com/EmailGateway/}EmailType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SendEmailType", propOrder = { + "email" +}) +public class SendEmailType { + + @XmlElement(name = "Email", required = true) + protected EmailType email; + + /** + * Gets the value of the email property. + * + * @return + * possible object is + * {@link EmailType } + * + */ + public EmailType getEmail() { + return email; + } + + /** + * Sets the value of the email property. + * + * @param value + * allowed object is + * {@link EmailType } + * + */ + public void setEmail(EmailType value) { + this.email = value; + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/package-info.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/package-info.java new file mode 100644 index 0000000000..2c2d603ada --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/emailgateway/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.tuscanyscatours.com/EmailGateway/") +package com.tuscanyscatours.emailgateway; diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java new file mode 100644 index 0000000000..e5f3ef3cad --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java @@ -0,0 +1,62 @@ + +package com.tuscanyscatours.payment; + +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 MakePaymentMemberResponseType complex type. + * + *

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

+ * <complexType name="MakePaymentMemberResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Status" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MakePaymentMemberResponseType", propOrder = { + "status" +}) +public class MakePaymentMemberResponseType { + + @XmlElement(name = "Status", required = true) + protected String status; + + /** + * 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; + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java new file mode 100644 index 0000000000..ca94d86628 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java @@ -0,0 +1,82 @@ + +package com.tuscanyscatours.payment; + +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 MakePaymentMemberType complex type. + * + *

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

+ * <complexType name="MakePaymentMemberType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CustomerId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Amount" type="{http://www.w3.org/2001/XMLSchema}float"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MakePaymentMemberType", propOrder = { + "customerId", + "amount" +}) +public class MakePaymentMemberType { + + @XmlElement(name = "CustomerId", required = true) + protected String customerId; + @XmlElement(name = "Amount") + protected float amount; + + /** + * Gets the value of the customerId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCustomerId() { + return customerId; + } + + /** + * Sets the value of the customerId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCustomerId(String value) { + this.customerId = value; + } + + /** + * Gets the value of the amount property. + * + */ + public float getAmount() { + return amount; + } + + /** + * Sets the value of the amount property. + * + */ + public void setAmount(float value) { + this.amount = value; + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java new file mode 100644 index 0000000000..b069b2ba94 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java @@ -0,0 +1,71 @@ + +package com.tuscanyscatours.payment; + +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.tuscanyscatours.payment 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 _MakePaymentMember_QNAME = new QName("http://www.tuscanyscatours.com/Payment/", "makePaymentMember"); + private final static QName _MakePaymentMemberResponse_QNAME = new QName("http://www.tuscanyscatours.com/Payment/", "makePaymentMemberResponse"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.tuscanyscatours.payment + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link MakePaymentMemberResponseType } + * + */ + public MakePaymentMemberResponseType createMakePaymentMemberResponseType() { + return new MakePaymentMemberResponseType(); + } + + /** + * Create an instance of {@link MakePaymentMemberType } + * + */ + public MakePaymentMemberType createMakePaymentMemberType() { + return new MakePaymentMemberType(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link MakePaymentMemberType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.tuscanyscatours.com/Payment/", name = "makePaymentMember") + public JAXBElement createMakePaymentMember(MakePaymentMemberType value) { + return new JAXBElement(_MakePaymentMember_QNAME, MakePaymentMemberType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link MakePaymentMemberResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.tuscanyscatours.com/Payment/", name = "makePaymentMemberResponse") + public JAXBElement createMakePaymentMemberResponse(MakePaymentMemberResponseType value) { + return new JAXBElement(_MakePaymentMemberResponse_QNAME, MakePaymentMemberResponseType.class, null, value); + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/Payment.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/Payment.java new file mode 100644 index 0000000000..bbbd03d89a --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/Payment.java @@ -0,0 +1,43 @@ + +package com.tuscanyscatours.payment; + +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.7-b01- + * Generated source version: 2.1 + * + */ +@WebService(name = "Payment", targetNamespace = "http://www.tuscanyscatours.com/Payment/") +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface Payment { + + + /** + * + * @param amount + * @param customerId + * @return + * returns java.lang.String + */ + @WebMethod(action = "http://www.tuscanyscatours.com/Payment/makePayment") + @WebResult(name = "Status", targetNamespace = "") + @RequestWrapper(localName = "makePaymentMember", targetNamespace = "http://www.tuscanyscatours.com/Payment/", className = "com.tuscanyscatours.payment.MakePaymentMemberType") + @ResponseWrapper(localName = "makePaymentMemberResponse", targetNamespace = "http://www.tuscanyscatours.com/Payment/", className = "com.tuscanyscatours.payment.MakePaymentMemberResponseType") + public String makePaymentMember( + @WebParam(name = "CustomerId", targetNamespace = "") + String customerId, + @WebParam(name = "Amount", targetNamespace = "") + float amount); + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/PaymentService.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/PaymentService.java new file mode 100644 index 0000000000..a430175976 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/PaymentService.java @@ -0,0 +1,71 @@ + +package com.tuscanyscatours.payment; + +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.7-b01- + * Generated source version: 2.1 + * + */ +@WebServiceClient(name = "PaymentService", targetNamespace = "http://www.tuscanyscatours.com/Payment/", wsdlLocation = "file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl") +public class PaymentService + extends Service +{ + + private final static URL PAYMENTSERVICE_WSDL_LOCATION; + private final static Logger logger = Logger.getLogger(com.tuscanyscatours.payment.PaymentService.class.getName()); + + static { + URL url = null; + try { + URL baseUrl; + baseUrl = com.tuscanyscatours.payment.PaymentService.class.getResource("."); + url = new URL(baseUrl, "file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl"); + } catch (MalformedURLException e) { + logger.warning("Failed to create URL for the wsdl Location: 'file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl', retrying as a local file"); + logger.warning(e.getMessage()); + } + PAYMENTSERVICE_WSDL_LOCATION = url; + } + + public PaymentService(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public PaymentService() { + super(PAYMENTSERVICE_WSDL_LOCATION, new QName("http://www.tuscanyscatours.com/Payment/", "PaymentService")); + } + + /** + * + * @return + * returns Payment + */ + @WebEndpoint(name = "PaymentPort") + public Payment getPaymentPort() { + return super.getPort(new QName("http://www.tuscanyscatours.com/Payment/", "PaymentPort"), Payment.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 Payment + */ + @WebEndpoint(name = "PaymentPort") + public Payment getPaymentPort(WebServiceFeature... features) { + return super.getPort(new QName("http://www.tuscanyscatours.com/Payment/", "PaymentPort"), Payment.class, features); + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/package-info.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/package-info.java new file mode 100644 index 0000000000..acd208f5c9 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/com/tuscanyscatours/payment/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.tuscanyscatours.com/Payment/") +package com.tuscanyscatours.payment; diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/scatours/payment/PaymentLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/scatours/payment/PaymentLauncher.java new file mode 100644 index 0000000000..8dbf39b514 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-groovy/src/main/java/scatours/payment/PaymentLauncher.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours.payment; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import com.tuscanyscatours.payment.Payment; + +public class PaymentLauncher { + + public static void main(String[] args) throws Exception { + SCANode node = SCANodeFactory.newInstance().createSCANode(null, + locate("payment-groovy"), + locate("creditcard-payment-jaxb"), + locate("emailgateway")); + node.start(); + + SCAClient client = (SCAClient)node; + Payment payment = client.getService(Payment.class, "Payment"); + + System.out.println("Payment Groovy test"); + System.out.println("\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f)); + + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/build.xml new file mode 100644 index 0000000000..0252f8cf15 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/pom.xml new file mode 100644 index 0000000000..adcce461e9 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/pom.xml @@ -0,0 +1,104 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-payment-java-policy + Apache Tuscany SCA Tours Payment Java Policy Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-jetty + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.PaymentLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java new file mode 100644 index 0000000000..e5f3ef3cad --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java @@ -0,0 +1,62 @@ + +package com.tuscanyscatours.payment; + +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 MakePaymentMemberResponseType complex type. + * + *

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

+ * <complexType name="MakePaymentMemberResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Status" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MakePaymentMemberResponseType", propOrder = { + "status" +}) +public class MakePaymentMemberResponseType { + + @XmlElement(name = "Status", required = true) + protected String status; + + /** + * 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; + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java new file mode 100644 index 0000000000..ca94d86628 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java @@ -0,0 +1,82 @@ + +package com.tuscanyscatours.payment; + +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 MakePaymentMemberType complex type. + * + *

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

+ * <complexType name="MakePaymentMemberType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CustomerId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Amount" type="{http://www.w3.org/2001/XMLSchema}float"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MakePaymentMemberType", propOrder = { + "customerId", + "amount" +}) +public class MakePaymentMemberType { + + @XmlElement(name = "CustomerId", required = true) + protected String customerId; + @XmlElement(name = "Amount") + protected float amount; + + /** + * Gets the value of the customerId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCustomerId() { + return customerId; + } + + /** + * Sets the value of the customerId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCustomerId(String value) { + this.customerId = value; + } + + /** + * Gets the value of the amount property. + * + */ + public float getAmount() { + return amount; + } + + /** + * Sets the value of the amount property. + * + */ + public void setAmount(float value) { + this.amount = value; + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java new file mode 100644 index 0000000000..b069b2ba94 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java @@ -0,0 +1,71 @@ + +package com.tuscanyscatours.payment; + +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.tuscanyscatours.payment 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 _MakePaymentMember_QNAME = new QName("http://www.tuscanyscatours.com/Payment/", "makePaymentMember"); + private final static QName _MakePaymentMemberResponse_QNAME = new QName("http://www.tuscanyscatours.com/Payment/", "makePaymentMemberResponse"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.tuscanyscatours.payment + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link MakePaymentMemberResponseType } + * + */ + public MakePaymentMemberResponseType createMakePaymentMemberResponseType() { + return new MakePaymentMemberResponseType(); + } + + /** + * Create an instance of {@link MakePaymentMemberType } + * + */ + public MakePaymentMemberType createMakePaymentMemberType() { + return new MakePaymentMemberType(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link MakePaymentMemberType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.tuscanyscatours.com/Payment/", name = "makePaymentMember") + public JAXBElement createMakePaymentMember(MakePaymentMemberType value) { + return new JAXBElement(_MakePaymentMember_QNAME, MakePaymentMemberType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link MakePaymentMemberResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.tuscanyscatours.com/Payment/", name = "makePaymentMemberResponse") + public JAXBElement createMakePaymentMemberResponse(MakePaymentMemberResponseType value) { + return new JAXBElement(_MakePaymentMemberResponse_QNAME, MakePaymentMemberResponseType.class, null, value); + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/Payment.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/Payment.java new file mode 100644 index 0000000000..bbbd03d89a --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/Payment.java @@ -0,0 +1,43 @@ + +package com.tuscanyscatours.payment; + +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.7-b01- + * Generated source version: 2.1 + * + */ +@WebService(name = "Payment", targetNamespace = "http://www.tuscanyscatours.com/Payment/") +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface Payment { + + + /** + * + * @param amount + * @param customerId + * @return + * returns java.lang.String + */ + @WebMethod(action = "http://www.tuscanyscatours.com/Payment/makePayment") + @WebResult(name = "Status", targetNamespace = "") + @RequestWrapper(localName = "makePaymentMember", targetNamespace = "http://www.tuscanyscatours.com/Payment/", className = "com.tuscanyscatours.payment.MakePaymentMemberType") + @ResponseWrapper(localName = "makePaymentMemberResponse", targetNamespace = "http://www.tuscanyscatours.com/Payment/", className = "com.tuscanyscatours.payment.MakePaymentMemberResponseType") + public String makePaymentMember( + @WebParam(name = "CustomerId", targetNamespace = "") + String customerId, + @WebParam(name = "Amount", targetNamespace = "") + float amount); + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/PaymentService.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/PaymentService.java new file mode 100644 index 0000000000..a430175976 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/PaymentService.java @@ -0,0 +1,71 @@ + +package com.tuscanyscatours.payment; + +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.7-b01- + * Generated source version: 2.1 + * + */ +@WebServiceClient(name = "PaymentService", targetNamespace = "http://www.tuscanyscatours.com/Payment/", wsdlLocation = "file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl") +public class PaymentService + extends Service +{ + + private final static URL PAYMENTSERVICE_WSDL_LOCATION; + private final static Logger logger = Logger.getLogger(com.tuscanyscatours.payment.PaymentService.class.getName()); + + static { + URL url = null; + try { + URL baseUrl; + baseUrl = com.tuscanyscatours.payment.PaymentService.class.getResource("."); + url = new URL(baseUrl, "file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl"); + } catch (MalformedURLException e) { + logger.warning("Failed to create URL for the wsdl Location: 'file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl', retrying as a local file"); + logger.warning(e.getMessage()); + } + PAYMENTSERVICE_WSDL_LOCATION = url; + } + + public PaymentService(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public PaymentService() { + super(PAYMENTSERVICE_WSDL_LOCATION, new QName("http://www.tuscanyscatours.com/Payment/", "PaymentService")); + } + + /** + * + * @return + * returns Payment + */ + @WebEndpoint(name = "PaymentPort") + public Payment getPaymentPort() { + return super.getPort(new QName("http://www.tuscanyscatours.com/Payment/", "PaymentPort"), Payment.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 Payment + */ + @WebEndpoint(name = "PaymentPort") + public Payment getPaymentPort(WebServiceFeature... features) { + return super.getPort(new QName("http://www.tuscanyscatours.com/Payment/", "PaymentPort"), Payment.class, features); + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/package-info.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/package-info.java new file mode 100644 index 0000000000..acd208f5c9 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/com/tuscanyscatours/payment/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.tuscanyscatours.com/Payment/") +package com.tuscanyscatours.payment; diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/scatours/payment/PaymentLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/scatours/payment/PaymentLauncher.java new file mode 100644 index 0000000000..e5bd98ff2b --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java-policy/src/main/java/scatours/payment/PaymentLauncher.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours.payment; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import com.tuscanyscatours.payment.Payment; + +public class PaymentLauncher { + + public static void main(String[] args) throws Exception { + SCANode node = SCANodeFactory.newInstance().createSCANode(null, + locate("payment-java-policy"), + locate("creditcard-payment-jaxb-policy")); + node.start(); + + SCAClient client = (SCAClient)node; + Payment payment = client.getService(Payment.class, "Payment"); + + System.out.println("Payment Java Policy test"); + System.out.println("\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f)); + System.out.println("\n\nFailed Payment - Status = \n\n" + payment.makePaymentMember("c-1", 100.00f)); + + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/build.xml new file mode 100644 index 0000000000..27d6c9a84c --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/pom.xml new file mode 100644 index 0000000000..d77dfdd484 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/pom.xml @@ -0,0 +1,104 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-payment-java + Apache Tuscany SCA Tours Payment Java Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-jetty + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.PaymentLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java new file mode 100644 index 0000000000..e5f3ef3cad --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java @@ -0,0 +1,62 @@ + +package com.tuscanyscatours.payment; + +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 MakePaymentMemberResponseType complex type. + * + *

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

+ * <complexType name="MakePaymentMemberResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Status" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MakePaymentMemberResponseType", propOrder = { + "status" +}) +public class MakePaymentMemberResponseType { + + @XmlElement(name = "Status", required = true) + protected String status; + + /** + * 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; + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java new file mode 100644 index 0000000000..ca94d86628 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java @@ -0,0 +1,82 @@ + +package com.tuscanyscatours.payment; + +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 MakePaymentMemberType complex type. + * + *

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

+ * <complexType name="MakePaymentMemberType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CustomerId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Amount" type="{http://www.w3.org/2001/XMLSchema}float"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MakePaymentMemberType", propOrder = { + "customerId", + "amount" +}) +public class MakePaymentMemberType { + + @XmlElement(name = "CustomerId", required = true) + protected String customerId; + @XmlElement(name = "Amount") + protected float amount; + + /** + * Gets the value of the customerId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCustomerId() { + return customerId; + } + + /** + * Sets the value of the customerId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCustomerId(String value) { + this.customerId = value; + } + + /** + * Gets the value of the amount property. + * + */ + public float getAmount() { + return amount; + } + + /** + * Sets the value of the amount property. + * + */ + public void setAmount(float value) { + this.amount = value; + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java new file mode 100644 index 0000000000..b069b2ba94 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java @@ -0,0 +1,71 @@ + +package com.tuscanyscatours.payment; + +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.tuscanyscatours.payment 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 _MakePaymentMember_QNAME = new QName("http://www.tuscanyscatours.com/Payment/", "makePaymentMember"); + private final static QName _MakePaymentMemberResponse_QNAME = new QName("http://www.tuscanyscatours.com/Payment/", "makePaymentMemberResponse"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.tuscanyscatours.payment + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link MakePaymentMemberResponseType } + * + */ + public MakePaymentMemberResponseType createMakePaymentMemberResponseType() { + return new MakePaymentMemberResponseType(); + } + + /** + * Create an instance of {@link MakePaymentMemberType } + * + */ + public MakePaymentMemberType createMakePaymentMemberType() { + return new MakePaymentMemberType(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link MakePaymentMemberType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.tuscanyscatours.com/Payment/", name = "makePaymentMember") + public JAXBElement createMakePaymentMember(MakePaymentMemberType value) { + return new JAXBElement(_MakePaymentMember_QNAME, MakePaymentMemberType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link MakePaymentMemberResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.tuscanyscatours.com/Payment/", name = "makePaymentMemberResponse") + public JAXBElement createMakePaymentMemberResponse(MakePaymentMemberResponseType value) { + return new JAXBElement(_MakePaymentMemberResponse_QNAME, MakePaymentMemberResponseType.class, null, value); + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/Payment.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/Payment.java new file mode 100644 index 0000000000..bbbd03d89a --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/Payment.java @@ -0,0 +1,43 @@ + +package com.tuscanyscatours.payment; + +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.7-b01- + * Generated source version: 2.1 + * + */ +@WebService(name = "Payment", targetNamespace = "http://www.tuscanyscatours.com/Payment/") +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface Payment { + + + /** + * + * @param amount + * @param customerId + * @return + * returns java.lang.String + */ + @WebMethod(action = "http://www.tuscanyscatours.com/Payment/makePayment") + @WebResult(name = "Status", targetNamespace = "") + @RequestWrapper(localName = "makePaymentMember", targetNamespace = "http://www.tuscanyscatours.com/Payment/", className = "com.tuscanyscatours.payment.MakePaymentMemberType") + @ResponseWrapper(localName = "makePaymentMemberResponse", targetNamespace = "http://www.tuscanyscatours.com/Payment/", className = "com.tuscanyscatours.payment.MakePaymentMemberResponseType") + public String makePaymentMember( + @WebParam(name = "CustomerId", targetNamespace = "") + String customerId, + @WebParam(name = "Amount", targetNamespace = "") + float amount); + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/PaymentService.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/PaymentService.java new file mode 100644 index 0000000000..a430175976 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/PaymentService.java @@ -0,0 +1,71 @@ + +package com.tuscanyscatours.payment; + +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.7-b01- + * Generated source version: 2.1 + * + */ +@WebServiceClient(name = "PaymentService", targetNamespace = "http://www.tuscanyscatours.com/Payment/", wsdlLocation = "file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl") +public class PaymentService + extends Service +{ + + private final static URL PAYMENTSERVICE_WSDL_LOCATION; + private final static Logger logger = Logger.getLogger(com.tuscanyscatours.payment.PaymentService.class.getName()); + + static { + URL url = null; + try { + URL baseUrl; + baseUrl = com.tuscanyscatours.payment.PaymentService.class.getResource("."); + url = new URL(baseUrl, "file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl"); + } catch (MalformedURLException e) { + logger.warning("Failed to create URL for the wsdl Location: 'file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl', retrying as a local file"); + logger.warning(e.getMessage()); + } + PAYMENTSERVICE_WSDL_LOCATION = url; + } + + public PaymentService(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public PaymentService() { + super(PAYMENTSERVICE_WSDL_LOCATION, new QName("http://www.tuscanyscatours.com/Payment/", "PaymentService")); + } + + /** + * + * @return + * returns Payment + */ + @WebEndpoint(name = "PaymentPort") + public Payment getPaymentPort() { + return super.getPort(new QName("http://www.tuscanyscatours.com/Payment/", "PaymentPort"), Payment.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 Payment + */ + @WebEndpoint(name = "PaymentPort") + public Payment getPaymentPort(WebServiceFeature... features) { + return super.getPort(new QName("http://www.tuscanyscatours.com/Payment/", "PaymentPort"), Payment.class, features); + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/package-info.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/package-info.java new file mode 100644 index 0000000000..acd208f5c9 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/com/tuscanyscatours/payment/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.tuscanyscatours.com/Payment/") +package com.tuscanyscatours.payment; diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/scatours/payment/PaymentLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/scatours/payment/PaymentLauncher.java new file mode 100644 index 0000000000..8d5cc8765d --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-java/src/main/java/scatours/payment/PaymentLauncher.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours.payment; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import com.tuscanyscatours.payment.Payment; + +public class PaymentLauncher { + + public static void main(String[] args) throws Exception { + SCANode node = SCANodeFactory.newInstance().createSCANode(null, + locate("payment-java"), + locate("creditcard-payment-jaxb")); + node.start(); + + SCAClient client = (SCAClient)node; + Payment payment = client.getService(Payment.class, "Payment"); + + System.out.println("Payment Java test"); + System.out.println("\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f)); + System.out.println("\n\nFailed Payment - Status = \n\n" + payment.makePaymentMember("c-1", 100.00f)); + + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/build.xml new file mode 100644 index 0000000000..7834eaca78 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/pom.xml new file mode 100644 index 0000000000..87cd7324ec --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/pom.xml @@ -0,0 +1,118 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-payment-spring-scatag + Apache Tuscany SCA Tours Payment Spring SCATag Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-spring + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-spring-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-jetty + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.PaymentLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java new file mode 100644 index 0000000000..e5f3ef3cad --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java @@ -0,0 +1,62 @@ + +package com.tuscanyscatours.payment; + +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 MakePaymentMemberResponseType complex type. + * + *

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

+ * <complexType name="MakePaymentMemberResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Status" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MakePaymentMemberResponseType", propOrder = { + "status" +}) +public class MakePaymentMemberResponseType { + + @XmlElement(name = "Status", required = true) + protected String status; + + /** + * 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; + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java new file mode 100644 index 0000000000..ca94d86628 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java @@ -0,0 +1,82 @@ + +package com.tuscanyscatours.payment; + +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 MakePaymentMemberType complex type. + * + *

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

+ * <complexType name="MakePaymentMemberType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CustomerId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Amount" type="{http://www.w3.org/2001/XMLSchema}float"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MakePaymentMemberType", propOrder = { + "customerId", + "amount" +}) +public class MakePaymentMemberType { + + @XmlElement(name = "CustomerId", required = true) + protected String customerId; + @XmlElement(name = "Amount") + protected float amount; + + /** + * Gets the value of the customerId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCustomerId() { + return customerId; + } + + /** + * Sets the value of the customerId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCustomerId(String value) { + this.customerId = value; + } + + /** + * Gets the value of the amount property. + * + */ + public float getAmount() { + return amount; + } + + /** + * Sets the value of the amount property. + * + */ + public void setAmount(float value) { + this.amount = value; + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java new file mode 100644 index 0000000000..b069b2ba94 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java @@ -0,0 +1,71 @@ + +package com.tuscanyscatours.payment; + +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.tuscanyscatours.payment 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 _MakePaymentMember_QNAME = new QName("http://www.tuscanyscatours.com/Payment/", "makePaymentMember"); + private final static QName _MakePaymentMemberResponse_QNAME = new QName("http://www.tuscanyscatours.com/Payment/", "makePaymentMemberResponse"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.tuscanyscatours.payment + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link MakePaymentMemberResponseType } + * + */ + public MakePaymentMemberResponseType createMakePaymentMemberResponseType() { + return new MakePaymentMemberResponseType(); + } + + /** + * Create an instance of {@link MakePaymentMemberType } + * + */ + public MakePaymentMemberType createMakePaymentMemberType() { + return new MakePaymentMemberType(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link MakePaymentMemberType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.tuscanyscatours.com/Payment/", name = "makePaymentMember") + public JAXBElement createMakePaymentMember(MakePaymentMemberType value) { + return new JAXBElement(_MakePaymentMember_QNAME, MakePaymentMemberType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link MakePaymentMemberResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.tuscanyscatours.com/Payment/", name = "makePaymentMemberResponse") + public JAXBElement createMakePaymentMemberResponse(MakePaymentMemberResponseType value) { + return new JAXBElement(_MakePaymentMemberResponse_QNAME, MakePaymentMemberResponseType.class, null, value); + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/Payment.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/Payment.java new file mode 100644 index 0000000000..bbbd03d89a --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/Payment.java @@ -0,0 +1,43 @@ + +package com.tuscanyscatours.payment; + +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.7-b01- + * Generated source version: 2.1 + * + */ +@WebService(name = "Payment", targetNamespace = "http://www.tuscanyscatours.com/Payment/") +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface Payment { + + + /** + * + * @param amount + * @param customerId + * @return + * returns java.lang.String + */ + @WebMethod(action = "http://www.tuscanyscatours.com/Payment/makePayment") + @WebResult(name = "Status", targetNamespace = "") + @RequestWrapper(localName = "makePaymentMember", targetNamespace = "http://www.tuscanyscatours.com/Payment/", className = "com.tuscanyscatours.payment.MakePaymentMemberType") + @ResponseWrapper(localName = "makePaymentMemberResponse", targetNamespace = "http://www.tuscanyscatours.com/Payment/", className = "com.tuscanyscatours.payment.MakePaymentMemberResponseType") + public String makePaymentMember( + @WebParam(name = "CustomerId", targetNamespace = "") + String customerId, + @WebParam(name = "Amount", targetNamespace = "") + float amount); + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/PaymentService.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/PaymentService.java new file mode 100644 index 0000000000..a430175976 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/PaymentService.java @@ -0,0 +1,71 @@ + +package com.tuscanyscatours.payment; + +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.7-b01- + * Generated source version: 2.1 + * + */ +@WebServiceClient(name = "PaymentService", targetNamespace = "http://www.tuscanyscatours.com/Payment/", wsdlLocation = "file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl") +public class PaymentService + extends Service +{ + + private final static URL PAYMENTSERVICE_WSDL_LOCATION; + private final static Logger logger = Logger.getLogger(com.tuscanyscatours.payment.PaymentService.class.getName()); + + static { + URL url = null; + try { + URL baseUrl; + baseUrl = com.tuscanyscatours.payment.PaymentService.class.getResource("."); + url = new URL(baseUrl, "file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl"); + } catch (MalformedURLException e) { + logger.warning("Failed to create URL for the wsdl Location: 'file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl', retrying as a local file"); + logger.warning(e.getMessage()); + } + PAYMENTSERVICE_WSDL_LOCATION = url; + } + + public PaymentService(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public PaymentService() { + super(PAYMENTSERVICE_WSDL_LOCATION, new QName("http://www.tuscanyscatours.com/Payment/", "PaymentService")); + } + + /** + * + * @return + * returns Payment + */ + @WebEndpoint(name = "PaymentPort") + public Payment getPaymentPort() { + return super.getPort(new QName("http://www.tuscanyscatours.com/Payment/", "PaymentPort"), Payment.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 Payment + */ + @WebEndpoint(name = "PaymentPort") + public Payment getPaymentPort(WebServiceFeature... features) { + return super.getPort(new QName("http://www.tuscanyscatours.com/Payment/", "PaymentPort"), Payment.class, features); + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/package-info.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/package-info.java new file mode 100644 index 0000000000..acd208f5c9 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/com/tuscanyscatours/payment/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.tuscanyscatours.com/Payment/") +package com.tuscanyscatours.payment; diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/scatours/payment/PaymentLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/scatours/payment/PaymentLauncher.java new file mode 100644 index 0000000000..f8dea99f34 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring-scatag/src/main/java/scatours/payment/PaymentLauncher.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours.payment; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import com.tuscanyscatours.payment.Payment; + +public class PaymentLauncher { + + public static void main(String[] args) throws Exception { + SCANode node = SCANodeFactory.newInstance().createSCANode(null, + locate("payment-script"), + locate("creditcard-payment-jaxb")); + node.start(); + + SCAClient client = (SCAClient)node; + Payment payment = client.getService(Payment.class, "Payment/Payment"); + + System.out.println("Payment Spring SCATag test"); + System.out.println("\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f)); + System.out.println("\n\nFailed Payment - Status = \n\n" + payment.makePaymentMember("c-1", 100.00f)); + + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/build.xml new file mode 100644 index 0000000000..2ca285a03b --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/pom.xml new file mode 100644 index 0000000000..a7c3a7a3e5 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/pom.xml @@ -0,0 +1,118 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-payment-spring + Apache Tuscany SCA Tours Payment Spring Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-spring + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-spring-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-jetty + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.PaymentLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java new file mode 100644 index 0000000000..e5f3ef3cad --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberResponseType.java @@ -0,0 +1,62 @@ + +package com.tuscanyscatours.payment; + +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 MakePaymentMemberResponseType complex type. + * + *

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

+ * <complexType name="MakePaymentMemberResponseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Status" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MakePaymentMemberResponseType", propOrder = { + "status" +}) +public class MakePaymentMemberResponseType { + + @XmlElement(name = "Status", required = true) + protected String status; + + /** + * 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; + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java new file mode 100644 index 0000000000..ca94d86628 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/MakePaymentMemberType.java @@ -0,0 +1,82 @@ + +package com.tuscanyscatours.payment; + +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 MakePaymentMemberType complex type. + * + *

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

+ * <complexType name="MakePaymentMemberType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CustomerId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Amount" type="{http://www.w3.org/2001/XMLSchema}float"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MakePaymentMemberType", propOrder = { + "customerId", + "amount" +}) +public class MakePaymentMemberType { + + @XmlElement(name = "CustomerId", required = true) + protected String customerId; + @XmlElement(name = "Amount") + protected float amount; + + /** + * Gets the value of the customerId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCustomerId() { + return customerId; + } + + /** + * Sets the value of the customerId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCustomerId(String value) { + this.customerId = value; + } + + /** + * Gets the value of the amount property. + * + */ + public float getAmount() { + return amount; + } + + /** + * Sets the value of the amount property. + * + */ + public void setAmount(float value) { + this.amount = value; + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java new file mode 100644 index 0000000000..b069b2ba94 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/ObjectFactory.java @@ -0,0 +1,71 @@ + +package com.tuscanyscatours.payment; + +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.tuscanyscatours.payment 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 _MakePaymentMember_QNAME = new QName("http://www.tuscanyscatours.com/Payment/", "makePaymentMember"); + private final static QName _MakePaymentMemberResponse_QNAME = new QName("http://www.tuscanyscatours.com/Payment/", "makePaymentMemberResponse"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.tuscanyscatours.payment + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link MakePaymentMemberResponseType } + * + */ + public MakePaymentMemberResponseType createMakePaymentMemberResponseType() { + return new MakePaymentMemberResponseType(); + } + + /** + * Create an instance of {@link MakePaymentMemberType } + * + */ + public MakePaymentMemberType createMakePaymentMemberType() { + return new MakePaymentMemberType(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link MakePaymentMemberType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.tuscanyscatours.com/Payment/", name = "makePaymentMember") + public JAXBElement createMakePaymentMember(MakePaymentMemberType value) { + return new JAXBElement(_MakePaymentMember_QNAME, MakePaymentMemberType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link MakePaymentMemberResponseType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.tuscanyscatours.com/Payment/", name = "makePaymentMemberResponse") + public JAXBElement createMakePaymentMemberResponse(MakePaymentMemberResponseType value) { + return new JAXBElement(_MakePaymentMemberResponse_QNAME, MakePaymentMemberResponseType.class, null, value); + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/Payment.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/Payment.java new file mode 100644 index 0000000000..bbbd03d89a --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/Payment.java @@ -0,0 +1,43 @@ + +package com.tuscanyscatours.payment; + +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.7-b01- + * Generated source version: 2.1 + * + */ +@WebService(name = "Payment", targetNamespace = "http://www.tuscanyscatours.com/Payment/") +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface Payment { + + + /** + * + * @param amount + * @param customerId + * @return + * returns java.lang.String + */ + @WebMethod(action = "http://www.tuscanyscatours.com/Payment/makePayment") + @WebResult(name = "Status", targetNamespace = "") + @RequestWrapper(localName = "makePaymentMember", targetNamespace = "http://www.tuscanyscatours.com/Payment/", className = "com.tuscanyscatours.payment.MakePaymentMemberType") + @ResponseWrapper(localName = "makePaymentMemberResponse", targetNamespace = "http://www.tuscanyscatours.com/Payment/", className = "com.tuscanyscatours.payment.MakePaymentMemberResponseType") + public String makePaymentMember( + @WebParam(name = "CustomerId", targetNamespace = "") + String customerId, + @WebParam(name = "Amount", targetNamespace = "") + float amount); + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/PaymentService.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/PaymentService.java new file mode 100644 index 0000000000..a430175976 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/PaymentService.java @@ -0,0 +1,71 @@ + +package com.tuscanyscatours.payment; + +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.7-b01- + * Generated source version: 2.1 + * + */ +@WebServiceClient(name = "PaymentService", targetNamespace = "http://www.tuscanyscatours.com/Payment/", wsdlLocation = "file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl") +public class PaymentService + extends Service +{ + + private final static URL PAYMENTSERVICE_WSDL_LOCATION; + private final static Logger logger = Logger.getLogger(com.tuscanyscatours.payment.PaymentService.class.getName()); + + static { + URL url = null; + try { + URL baseUrl; + baseUrl = com.tuscanyscatours.payment.PaymentService.class.getResource("."); + url = new URL(baseUrl, "file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl"); + } catch (MalformedURLException e) { + logger.warning("Failed to create URL for the wsdl Location: 'file:/C:/simon/tuscany/travelsample/contributions/payment-java/src/main/resources/Payment.wsdl', retrying as a local file"); + logger.warning(e.getMessage()); + } + PAYMENTSERVICE_WSDL_LOCATION = url; + } + + public PaymentService(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public PaymentService() { + super(PAYMENTSERVICE_WSDL_LOCATION, new QName("http://www.tuscanyscatours.com/Payment/", "PaymentService")); + } + + /** + * + * @return + * returns Payment + */ + @WebEndpoint(name = "PaymentPort") + public Payment getPaymentPort() { + return super.getPort(new QName("http://www.tuscanyscatours.com/Payment/", "PaymentPort"), Payment.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 Payment + */ + @WebEndpoint(name = "PaymentPort") + public Payment getPaymentPort(WebServiceFeature... features) { + return super.getPort(new QName("http://www.tuscanyscatours.com/Payment/", "PaymentPort"), Payment.class, features); + } + +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/package-info.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/package-info.java new file mode 100644 index 0000000000..acd208f5c9 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/com/tuscanyscatours/payment/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.tuscanyscatours.com/Payment/") +package com.tuscanyscatours.payment; diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/scatours/payment/PaymentLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/scatours/payment/PaymentLauncher.java new file mode 100644 index 0000000000..6917b9c57b --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/payment-spring/src/main/java/scatours/payment/PaymentLauncher.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours.payment; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import com.tuscanyscatours.payment.Payment; + +public class PaymentLauncher { + + public static void main(String[] args) throws Exception { + SCANode node = SCANodeFactory.newInstance().createSCANode(null, + locate("payment-spring"), + locate("creditcard-payment-jaxb")); + node.start(); + + SCAClient client = (SCAClient)node; + Payment payment = client.getService(Payment.class, "Payment/Payment"); + + System.out.println("Payment Spring test"); + System.out.println("\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f)); + System.out.println("\n\nFailed Payment - Status = \n\n" + payment.makePaymentMember("c-1", 100.00f)); + + node.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/policy/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/policy/build.xml new file mode 100644 index 0000000000..57001f70e3 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/policy/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/policy/maven-eclipse.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/policy/maven-eclipse.xml new file mode 100644 index 0000000000..4ceebd71f7 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/policy/maven-eclipse.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/policy/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/policy/pom.xml new file mode 100644 index 0000000000..bb2c34a4fb --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/policy/pom.xml @@ -0,0 +1,111 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../../pom.xml + 1.0-SNAPSHOT + scatours-launcher-policy + Apache Tuscany SCA Tours Policy Launcher + + + + + org.apache.tuscany.sca + scatours-util-launcher-common + ${pom.version} + provided + + + + org.apache.tuscany.sca + tuscany-node-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-host-jetty + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-node-impl + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-policy-security + ${tuscany.version} + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + ../util/scatours-util-launcher-common.jar + + + true + ../lib/ + scatours.PolicyLauncher + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/policy/src/main/java/scatours/PolicyLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/policy/src/main/java/scatours/PolicyLauncher.java new file mode 100644 index 0000000000..b48c4e88ec --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/policy/src/main/java/scatours/PolicyLauncher.java @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package scatours; + +import static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +public class PolicyLauncher { + + public static void main(String[] args) throws Exception { + SCANode node1 = + SCANodeFactory.newInstance().createSCANode(null, + locate("policy-client"), + locate("payment-java-policy")); + + node1.start(); + + SCANode node2 = SCANodeFactory.newInstance().createSCANode(null, + locate("creditcard-payment-jaxb-policy")); + + node2.start(); + + Runnable client = ((SCAClient)node1).getService(Runnable.class, "TestClient/Runnable"); + client.run(); + + node1.stop(); + node2.stop(); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/pom.xml new file mode 100644 index 0000000000..3d8738dc86 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/pom.xml @@ -0,0 +1,77 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + scatours + 1.0-SNAPSHOT + ../pom.xml + + 1.0-SNAPSHOT + scatours-launchers + pom + Apache Tuscany SCA Tours Launchers + + + + default + + true + + + blog-feed + buildingblocks + currency-converter + currency-converter-corba + currency-converter-jms + currency-converter-rmi + currency-converter-ws + databinding + feed-logger + interaction + introducing + introducing-client + introducing-domain + introducing-tours + introducing-trips + jumpstart + fullapp + fullapp-domain + fullapp-nodes + help-pages + notification-ws + notification-corba + notification-ejb + notification-jms + notification-rmi + payment-java + payment-java-policy + payment-spring + payment-spring-scatag + payment-bpel + payment-groovy + policy + + + + + + -- cgit v1.2.3