A bit of tidying in the full-app. Mainly renaming frontend to coordination and correcting the composite names in the full app contributions
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@884703 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ea16b5e9a2
commit
c0be84658a
17 changed files with 46 additions and 36 deletions
|
@ -48,7 +48,7 @@ public class CreditCardPaymentTestCase {
|
|||
public static void setUpBeforeClass() throws Exception {
|
||||
try {
|
||||
node =
|
||||
SCANodeFactory.newInstance().createSCANode(null, new SCAContribution("creditcard", "./target/classes"));
|
||||
SCANodeFactory.newInstance().createSCANode("creditcard.composite", new SCAContribution("creditcard", "./target/classes"));
|
||||
|
||||
node.start();
|
||||
} catch (Exception ex) {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
-->
|
||||
<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
|
||||
xmlns:scatours="http://tuscanyscatours.com/">
|
||||
<deployable composite="scatours:bespoketrip" />
|
||||
<deployable composite="scatours:fullapp-bespoketrip" />
|
||||
<import.java package="com.tuscanyscatours.common" />
|
||||
<import.java package="com.tuscanyscatours.hotel" />
|
||||
<import.java package="com.tuscanyscatours.hotel.impl" />
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
|
||||
targetNamespace="http://tuscanyscatours.com/"
|
||||
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
|
||||
name="bespoketrip">
|
||||
name="fullapp-bespoketrip">
|
||||
|
||||
<component name="Hotel">
|
||||
<component name="HotelPartner">
|
||||
<implementation.java class="com.tuscanyscatours.hotel.impl.HotelImpl"/>
|
||||
<service name="Search">
|
||||
<binding.ws name="searchws" uri="http://localhost:8086/Hotel/Search"/>
|
||||
|
@ -34,7 +34,7 @@
|
|||
<service name="Book"/>
|
||||
</component>
|
||||
|
||||
<component name="Flight">
|
||||
<component name="FlightPartner">
|
||||
<implementation.java class="com.tuscanyscatours.flight.impl.FlightImpl"/>
|
||||
<service name="Search">
|
||||
<interface.java interface="com.tuscanyscatours.common.Search"
|
||||
|
@ -48,7 +48,7 @@
|
|||
<service name="Book"/>
|
||||
</component>
|
||||
|
||||
<component name="Car">
|
||||
<component name="CarPartner">
|
||||
<implementation.java class="com.tuscanyscatours.car.impl.CarImpl"/>
|
||||
<service name="Search">
|
||||
<binding.ws name="searchws" uri="http://localhost:8086/Car/Search"/>
|
|
@ -25,8 +25,8 @@
|
|||
<version>1.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent><version>1.0-SNAPSHOT</version>
|
||||
<artifactId>scatours-contribution-fullapp-frontend</artifactId>
|
||||
<name>Apache Tuscany SCA Tours Full Application Front End Contribution</name>
|
||||
<artifactId>scatours-contribution-fullapp-coordination</artifactId>
|
||||
<name>Apache Tuscany SCA Tours Full Application Coordination Contribution</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
|
@ -19,7 +19,7 @@
|
|||
-->
|
||||
<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
|
||||
xmlns:scatours="http://tuscanyscatours.com/">
|
||||
<deployable composite="scatours:frontend" />
|
||||
<deployable composite="scatours:fullapp-coordination" />
|
||||
<import.java package="com.tuscanyscatours.common" />
|
||||
<import.java package="com.tuscanyscatours.currencyconverter" />
|
||||
<import.java package="com.tuscanyscatours.travelcatalog" />
|
|
@ -19,7 +19,7 @@
|
|||
-->
|
||||
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
|
||||
targetNamespace="http://tuscanyscatours.com/"
|
||||
name="frontend">
|
||||
name="fullapp-coordination">
|
||||
|
||||
<component name="TravelCatalog">
|
||||
<implementation.java class="com.tuscanyscatours.travelcatalog.impl.TravelCatalogImpl"/>
|
||||
|
@ -62,10 +62,10 @@
|
|||
<component name="TripBooking">
|
||||
<implementation.java class="com.tuscanyscatours.tripbooking.impl.TripBookingImpl"/>
|
||||
<service name="TripBooking"/>
|
||||
<reference name="hotelBook" target="Hotel/Book"/>
|
||||
<reference name="flightBook" target="Trip/Book"/>
|
||||
<reference name="carBook" target="Car/Book"/>
|
||||
<reference name="tripBook" target="Trip/Book"/>
|
||||
<reference name="hotelBook" target="HotelPartner/Book"/>
|
||||
<reference name="flightBook" target="TripPartner/Book"/>
|
||||
<reference name="carBook" target="CarPartner/Book"/>
|
||||
<reference name="tripBook" target="TripPartner/Book"/>
|
||||
<reference name="cartUpdates" target="ShoppingCart/CartUpdates"/>
|
||||
</component>
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
-->
|
||||
<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
|
||||
xmlns:scatours="http://tuscanyscatours.com/">
|
||||
<deployable composite="scatours:currency" />
|
||||
<deployable composite="scatours:fullapp-currency" />
|
||||
<import.java package="com.tuscanyscatours.currencyconverter" />
|
||||
<import.java package="com.tuscanyscatours.currencyconverter.impl" />
|
||||
</contribution>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
-->
|
||||
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
|
||||
targetNamespace="http://tuscanyscatours.com/"
|
||||
name="currency">
|
||||
name="fullapp-currency">
|
||||
|
||||
<component name="CurrencyConverter">
|
||||
<implementation.java class="com.tuscanyscatours.currencyconverter.impl.CurrencyConverterImpl"/>
|
|
@ -19,7 +19,7 @@
|
|||
-->
|
||||
<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
|
||||
xmlns:scatours="http://tuscanyscatours.com/">
|
||||
<deployable composite="scatours:packagedtrip" />
|
||||
<deployable composite="scatours:fullapp-packagedtrip" />
|
||||
<import.java package="com.tuscanyscatours.common" />
|
||||
<import.java package="com.tuscanyscatours.trip.impl" />
|
||||
</contribution>
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
|
||||
targetNamespace="http://tuscanyscatours.com/"
|
||||
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
|
||||
name="packagedtrip">
|
||||
name="fullapp-packagedtrip">
|
||||
|
||||
<component name="Trip">
|
||||
<component name="TripPartner">
|
||||
<implementation.java class="com.tuscanyscatours.trip.impl.TripImpl"/>
|
||||
<service name="Search">
|
||||
<binding.ws name="searchws" uri="http://localhost:8085/Trip/Search"/>
|
|
@ -19,7 +19,7 @@
|
|||
-->
|
||||
<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
|
||||
xmlns:scatours="http://tuscanyscatours.com/">
|
||||
<deployable composite="scatours:shoppingcart" />
|
||||
<deployable composite="scatours:fullapp-shoppingcart" />
|
||||
<import.java package="com.tuscanyscatours.payment" />
|
||||
<import.java package="com.tuscanyscatours.shoppingcart" />
|
||||
<import.java package="com.tuscanyscatours.shoppingcart.impl" />
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
-->
|
||||
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
|
||||
targetNamespace="http://tuscanyscatours.com/"
|
||||
name="shoppingcart">
|
||||
name="fullapp-shoppingcart">
|
||||
|
||||
<component name="ShoppingCart">
|
||||
<implementation.java class="com.tuscanyscatours.shoppingcart.impl.ShoppingCartImpl"/>
|
|
@ -19,7 +19,7 @@
|
|||
-->
|
||||
<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
|
||||
xmlns:scatours="http://tuscanyscatours.com/">
|
||||
<deployable composite="scatours:ui" />
|
||||
<deployable composite="scatours:fullapp-ui" />
|
||||
<import.java package="com.tuscanyscatours" />
|
||||
<import.java package="com.tuscanyscatours.impl" />
|
||||
<import.java package="com.tuscanyscatours.shoppingcart" />
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
|
||||
targetNamespace="http://tuscanyscatours.com/"
|
||||
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
|
||||
name="ui">
|
||||
name="fullapp-ui">
|
||||
|
||||
<component name="scatours">
|
||||
<component name="SCAToursUserInterface">
|
||||
<tuscany:implementation.widget location="scatours.html"/>
|
||||
<service name="Widget">
|
||||
<tuscany:binding.http uri="/scatours"/>
|
|
@ -31,22 +31,27 @@ import org.junit.Test;
|
|||
import com.tuscanyscatours.payment.Payment;
|
||||
|
||||
public class PaymentTestCase {
|
||||
private static SCANode node;
|
||||
private static SCANode node1;
|
||||
private static SCANode node2;
|
||||
|
||||
@BeforeClass
|
||||
public static void setUpBeforeClass() throws Exception {
|
||||
node =
|
||||
node1 =
|
||||
SCANodeFactory.newInstance()
|
||||
.createSCANode(null,
|
||||
new SCAContribution("payment", "./target/classes"),
|
||||
.createSCANode("payment.composite",
|
||||
new SCAContribution("payment", "./target/classes"));
|
||||
node2 =
|
||||
SCANodeFactory.newInstance()
|
||||
.createSCANode("creditcard.composite",
|
||||
new SCAContribution("creditcard",
|
||||
"../../contributions/creditcard-payment-jaxb/target/classes"));
|
||||
node.start();
|
||||
node1.start();
|
||||
node2.start();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPayment() {
|
||||
SCAClient client = (SCAClient)node;
|
||||
SCAClient client = (SCAClient)node1;
|
||||
Payment payment = client.getService(Payment.class, "Payment");
|
||||
|
||||
System.out.println("\n\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f));
|
||||
|
@ -66,10 +71,15 @@ public class PaymentTestCase {
|
|||
|
||||
@AfterClass
|
||||
public static void tearDownAfterClass() throws Exception {
|
||||
if (node != null) {
|
||||
node.stop();
|
||||
node = null;
|
||||
if (node1 != null) {
|
||||
node1.stop();
|
||||
node1 = null;
|
||||
}
|
||||
|
||||
if (node2 != null) {
|
||||
node2.stop();
|
||||
node2 = null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
<service name="Payment">
|
||||
<binding.ws uri="http://localhost:8081/Payment"/>
|
||||
</service>
|
||||
<reference name="creditCardPaymentReference" requires="authentication">
|
||||
<binding.ws uri="http://localhost:8083/CreditCardPayment"/>
|
||||
<reference name="creditCardPaymentReference" >
|
||||
<binding.ws uri="http://localhost:8083/CreditCardPayment" requires="authentication"/>
|
||||
</reference>
|
||||
<reference name="emailGateway" target="EmailGateway"/>
|
||||
<reference name="customerRegistry" target="CustomerRegistry"/>
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
<module>feed-logger</module>
|
||||
<module>flight</module>
|
||||
<module>fullapp-ui</module>
|
||||
<module>fullapp-frontend</module>
|
||||
<module>fullapp-coordination</module>
|
||||
<module>fullapp-currency</module>
|
||||
<module>fullapp-packagedtrip</module>
|
||||
<module>fullapp-bespoketrip</module>
|
||||
|
|
Loading…
Reference in a new issue