You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by na...@apache.org on 2010/03/29 09:33:23 UTC
svn commit: r928619 [1/3] - in
/tuscany/sca-java-1.x/trunk/tutorials/travelsample: contributions/
contributions/using/ contributions/using/src/main/java/com/tuscanyscahotels/
contributions/using/src/main/java/com/tuscanyscahotels/impl/
contributions/us...
Author: nash
Date: Mon Mar 29 07:33:21 2010
New Revision: 928619
URL: http://svn.apache.org/viewvc?rev=928619&view=rev
Log:
Add complete "using" contribution and "using" launcher
Added:
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscahotels/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscahotels/HotelOffers.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscahotels/impl/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscahotels/impl/HotelOffersImpl.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/Address.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/BillingAddress.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/CustomerInfo.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CustomerImpl.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/AirportCodesClientImpl.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/BookingsClientImpl.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/BookingsZeroClientImpl.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/CarBookingsClientImpl.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/ConverterClientImpl.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/HotelOffersClientImpl.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/Orders1ClientImpl.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/Orders2ClientImpl.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/address.xsd
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/airportcodes.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings1.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings2.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings3.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings4.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/carbookings1.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/carbookings2.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/carbookings3.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/converter.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/hotelsdomain.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/orders1.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/orders2.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/orders2.xsd
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/airportcodes-client.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings1-client.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings2-client.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings3-client.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings4-client.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/carbookings1-client.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/carbookings2-client.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/carbookings3-client.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/converter-client.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/hotelsdomain-client.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/orders1-client.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/orders2-client.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/toursdomain-client.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/toursdomain.composite
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/AirportCodesTestCase.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/BindingsTestCase.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CarAutowireTestCase.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CarPartnerTestCase.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CarWireElementTestCase.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/ComplexPropertyElementTestCase.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/ComplexPropertyTypeTestCase.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CurrencyConverterTestCase.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/MultiDomainTestCase.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/TripAutowireTestCase.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/TripBookingTestCase.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/TripWireElementTestCase.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/resources/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/resources/jndi.properties
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/build.xml
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/pom.xml
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/src/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/src/main/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/src/main/java/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/src/main/java/scatours/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/src/main/java/scatours/UsingLauncher.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/src/main/resources/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/src/main/resources/jndi.properties
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/src/test/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/src/test/java/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/src/test/java/scatours/
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/src/test/java/scatours/UsingTestCase.java
Modified:
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/build.xml
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/pom.xml
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/AirportCodes.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/CurrencyConverter.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarPartnerImpl.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarVendorImpl.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CurrencyConverterImpl.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/TripBookingImpl.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/distribution/bundle/pom.xml
tuscany/sca-java-1.x/trunk/tutorials/travelsample/distribution/src/main/resources/build-launchers.xml
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/build.xml
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/build.xml?rev=928619&r1=928618&r2=928619&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/build.xml (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/build.xml Mon Mar 29 07:33:21 2010
@@ -92,6 +92,7 @@
<ant dir="tripbooking" target="${target}"/> <!--needed by scatours-->
<ant dir="scatours" target="${target}"/>
<ant dir="trip" target="${target}"/>
+ <ant dir="using" target="${target}"/>
</target>
</project>
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/pom.xml?rev=928619&r1=928618&r2=928619&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/pom.xml (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/pom.xml Mon Mar 29 07:33:21 2010
@@ -43,6 +43,68 @@
</dependency>
<dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-axis2</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-jms-runtime</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ejb-runtime</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-api</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jms-asf</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-all</artifactId>
+ <version>5.2.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-web-demo</artifactId>
+ </exclusion>
+ </exclusions>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscahotels/HotelOffers.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscahotels/HotelOffers.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscahotels/HotelOffers.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscahotels/HotelOffers.java Mon Mar 29 07:33:21 2010
@@ -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 com.tuscanyscahotels;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface HotelOffers {
+ String bookTodaysSpecial();
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscahotels/impl/HotelOffersImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscahotels/impl/HotelOffersImpl.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscahotels/impl/HotelOffersImpl.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscahotels/impl/HotelOffersImpl.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES 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.tuscanyscahotels.impl;
+
+import java.util.Date;
+import org.osoa.sca.annotations.Reference;
+
+import com.tuscanyscahotels.HotelOffers;
+import com.tuscanyscatours.Hotels;
+
+public class HotelOffersImpl implements HotelOffers {
+
+ @Reference
+ protected Hotels hotels;
+
+ public String bookTodaysSpecial() {
+ return hotels.bookHotel("LBH", new Date(), 3, "STD");
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/Address.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/Address.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/Address.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/Address.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,172 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2010.03.27 at 05:55:25 AM GMT
+//
+
+
+package com.tuscanyscatours;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for Address complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Address">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="street" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="city" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="state" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="zip" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "Address", propOrder = {
+ "street",
+ "city",
+ "state",
+ "zip"
+})
+public class Address {
+
+ @XmlElement(required = true)
+ protected String street;
+ @XmlElement(required = true)
+ protected String city;
+ @XmlElement(required = true)
+ protected String state;
+ @XmlElement(required = true)
+ protected String zip;
+
+ /**
+ * Gets the value of the street property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getStreet() {
+ return street;
+ }
+
+ /**
+ * Sets the value of the street property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setStreet(String value) {
+ this.street = value;
+ }
+
+ /**
+ * Gets the value of the city property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCity() {
+ return city;
+ }
+
+ /**
+ * Sets the value of the city property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCity(String value) {
+ this.city = value;
+ }
+
+ /**
+ * Gets the value of the state property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getState() {
+ return state;
+ }
+
+ /**
+ * Sets the value of the state property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setState(String value) {
+ this.state = value;
+ }
+
+ /**
+ * Gets the value of the zip property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getZip() {
+ return zip;
+ }
+
+ /**
+ * Sets the value of the zip property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setZip(String value) {
+ this.zip = value;
+ }
+
+}
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/AirportCodes.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/AirportCodes.java?rev=928619&r1=928618&r2=928619&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/AirportCodes.java (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/AirportCodes.java Mon Mar 29 07:33:21 2010
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES 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;
public class AirportCodes {
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/BillingAddress.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/BillingAddress.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/BillingAddress.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/BillingAddress.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,174 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2010.03.27 at 05:55:25 AM GMT
+//
+
+
+package com.tuscanyscatours;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="street" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="city" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="state" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="zip" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "street",
+ "city",
+ "state",
+ "zip"
+})
+@XmlRootElement(name = "billingAddress")
+public class BillingAddress {
+
+ @XmlElement(required = true)
+ protected String street;
+ @XmlElement(required = true)
+ protected String city;
+ @XmlElement(required = true)
+ protected String state;
+ @XmlElement(required = true)
+ protected String zip;
+
+ /**
+ * Gets the value of the street property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getStreet() {
+ return street;
+ }
+
+ /**
+ * Sets the value of the street property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setStreet(String value) {
+ this.street = value;
+ }
+
+ /**
+ * Gets the value of the city property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCity() {
+ return city;
+ }
+
+ /**
+ * Sets the value of the city property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCity(String value) {
+ this.city = value;
+ }
+
+ /**
+ * Gets the value of the state property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getState() {
+ return state;
+ }
+
+ /**
+ * Sets the value of the state property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setState(String value) {
+ this.state = value;
+ }
+
+ /**
+ * Gets the value of the zip property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getZip() {
+ return zip;
+ }
+
+ /**
+ * Sets the value of the zip property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setZip(String value) {
+ this.zip = value;
+ }
+
+}
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/CurrencyConverter.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/CurrencyConverter.java?rev=928619&r1=928618&r2=928619&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/CurrencyConverter.java (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/CurrencyConverter.java Mon Mar 29 07:33:21 2010
@@ -1,4 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES 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;
+
import java.math.BigDecimal;
import org.osoa.sca.annotations.Remotable;
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/CustomerInfo.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/CustomerInfo.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/CustomerInfo.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/CustomerInfo.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES 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;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface CustomerInfo {
+ String getBillingAddress();
+ String getDeliveryAddress();
+}
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarPartnerImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarPartnerImpl.java?rev=928619&r1=928618&r2=928619&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarPartnerImpl.java (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarPartnerImpl.java Mon Mar 29 07:33:21 2010
@@ -29,7 +29,7 @@ public class CarPartnerImpl implements C
@Reference(required=false)
protected Cars[] luxuryCars;
-
+
public String bookCar(Date pickup, int days, String carClass) {
return cars[0].bookCar(pickup, days, carClass);
}
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarVendorImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarVendorImpl.java?rev=928619&r1=928618&r2=928619&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarVendorImpl.java (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CarVendorImpl.java Mon Mar 29 07:33:21 2010
@@ -23,6 +23,8 @@ import com.tuscanyscatours.Cars;
public class CarVendorImpl implements Cars {
+ protected int minAge; // implicitly defines an SCA property
+
public String bookCar(Date pickup, int days, String carClass) {
System.out.println("Booking confirmed for pickup date " + pickup +
" duration " + days + " days in a " + carClass +
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CurrencyConverterImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CurrencyConverterImpl.java?rev=928619&r1=928618&r2=928619&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CurrencyConverterImpl.java (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CurrencyConverterImpl.java Mon Mar 29 07:33:21 2010
@@ -1,4 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES 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.using.impl;
+
import java.math.BigDecimal;
import org.osoa.sca.annotations.Property;
import com.tuscanyscatours.CurrencyConverter;
@@ -13,22 +32,14 @@ public class CurrencyConverterImpl imple
public BigDecimal convert(BigDecimal amount) {
return amount.multiply(getRate(toCurrency))
- .divide(getRate(fromCurrency));
+ .divide(getRate(fromCurrency), 2, 0);
}
private BigDecimal getRate(String currency) {
- lastRate = lastRate.add(increment); // test code
- return lastRate; // test code A
- }
-
- private BigDecimal lastRate; // test code
- private BigDecimal increment; // test code
-
- CurrencyConverterImpl() { // test code
- try {
- lastRate = new BigDecimal("1.1");
- increment = new BigDecimal("0.2");
- } catch (Exception e) {
+ int rate = 0;
+ for (int i = 0; i < currency.length(); i++) {
+ rate += currency.codePointAt(i);
}
+ return new BigDecimal(rate).divide(new BigDecimal(100));
}
}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CustomerImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CustomerImpl.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CustomerImpl.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/CustomerImpl.java Mon Mar 29 07:33:21 2010
@@ -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 com.tuscanyscatours.using.impl;
+
+import org.osoa.sca.annotations.Property;
+import com.tuscanyscatours.Address;
+import com.tuscanyscatours.BillingAddress;
+import com.tuscanyscatours.CustomerInfo;
+
+public class CustomerImpl implements CustomerInfo {
+
+ @Property
+ protected BillingAddress billingAddress;
+
+ @Property
+ protected Address deliveryAddress;
+
+ public String getBillingAddress() {
+ return billingAddress.getStreet() + ", " +
+ billingAddress.getCity() + ", " +
+ billingAddress.getState() + " " +
+ billingAddress.getZip();
+ }
+
+ public String getDeliveryAddress() {
+ return deliveryAddress.getStreet() + ", " +
+ deliveryAddress.getCity() + ", " +
+ deliveryAddress.getState() + " " +
+ deliveryAddress.getZip();
+ }
+}
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/TripBookingImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/TripBookingImpl.java?rev=928619&r1=928618&r2=928619&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/TripBookingImpl.java (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/com/tuscanyscatours/using/impl/TripBookingImpl.java Mon Mar 29 07:33:21 2010
@@ -29,7 +29,7 @@ import com.tuscanyscatours.Hotels;
public class TripBookingImpl implements Bookings {
- TripBookingImpl(@Reference(name="cars") Cars cars) {
+ public TripBookingImpl(@Reference(name="cars") Cars cars) {
this.cars = cars;
}
@@ -46,16 +46,28 @@ public class TripBookingImpl implements
}
public String newBooking(String trip, int people) {
- Date startDate = null;
+ /* In a real implementation this method would look up the trip code
+ in the travel catalog to get details of the car, flight and hotel
+ bookings needed. Instead these details are hard-wired here for
+ test purposes. */
+ Date startDate = new Date(); //TEMP - need to fix
+ /*
try {
- startDate = DateFormat.getInstance().parse("07/07/2012");
+ startDate = DateFormat.getInstance().parse("7 Jul, 2012");
} catch (Exception e) {
+ e.printStackTrace();
}
+ */
- cars.bookCar(startDate, 7, "B");
- flights.bookFlight("AA123", startDate, people, "Y");
- hotels.bookHotel("DBH", startDate, 7, "SUP");
+ if (people > 0) {
+ cars.bookCar(startDate, 7, "B");
+ flights.bookFlight("AA123", startDate, people, "Y");
+ hotels.bookHotel("DBH", startDate, 7, "SUP");
- return "HW3546";
+ return "HW3546";
+
+ } else {
+ return "NONE";
+ }
}
}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/AirportCodesClientImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/AirportCodesClientImpl.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/AirportCodesClientImpl.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/AirportCodesClientImpl.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES 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.client.impl;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+import com.tuscanyscatours.AirportCodes;
+
+@Service(Runnable.class)
+public class AirportCodesClientImpl {
+
+ @Reference
+ protected AirportCodes airportcodes;
+
+ public void run() {
+ String airport = airportcodes.getAirport("AAB");
+ System.out.println("AAB is the airport code for " + airport);
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/BookingsClientImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/BookingsClientImpl.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/BookingsClientImpl.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/BookingsClientImpl.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES 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.client.impl;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+import com.tuscanyscatours.Bookings;
+
+@Service(Runnable.class)
+public class BookingsClientImpl {
+
+ @Reference
+ protected Bookings bookings;
+
+ public void run() {
+ String bookingCode = bookings.newBooking("VR3MAY9", 2);
+ System.out.println("Booking code is " + bookingCode);
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/BookingsZeroClientImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/BookingsZeroClientImpl.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/BookingsZeroClientImpl.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/BookingsZeroClientImpl.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES 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.client.impl;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+import com.tuscanyscatours.Bookings;
+
+@Service(Runnable.class)
+public class BookingsZeroClientImpl {
+
+ @Reference
+ protected Bookings bookings;
+
+ public void run() {
+ String bookingCode = bookings.newBooking("DUMMY", 0);
+ System.out.println("Booking code is " + bookingCode);
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/CarBookingsClientImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/CarBookingsClientImpl.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/CarBookingsClientImpl.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/CarBookingsClientImpl.java Mon Mar 29 07:33:21 2010
@@ -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.client.impl;
+
+import java.util.Date;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+import com.tuscanyscatours.Cars;
+
+@Service(Runnable.class)
+public class CarBookingsClientImpl {
+
+ @Reference
+ protected Cars cars;
+
+ public void run() {
+ String bookingCode = cars.bookCar(new Date(), 3, "K"); // need to FIX
+ System.out.println("Booking code is " + bookingCode);
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/ConverterClientImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/ConverterClientImpl.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/ConverterClientImpl.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/ConverterClientImpl.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES 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.client.impl;
+
+import java.math.BigDecimal;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+import com.tuscanyscatours.CurrencyConverter;
+
+@Service(Runnable.class)
+public class ConverterClientImpl {
+
+ @Reference
+ protected CurrencyConverter eur2jpy;
+
+ @Reference
+ protected CurrencyConverter usd2gbp;
+
+ public void run() {
+ BigDecimal jpy = eur2jpy.convert(new BigDecimal("1000.00"));
+ System.out.println("Converted EUR 1000.00 to JPY " + jpy);
+ BigDecimal gbp = usd2gbp.convert(new BigDecimal("1000.00"));
+ System.out.println("Converted USD 1000.00 to GBP " + gbp);
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/HotelOffersClientImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/HotelOffersClientImpl.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/HotelOffersClientImpl.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/HotelOffersClientImpl.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES 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.client.impl;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+import com.tuscanyscahotels.HotelOffers;
+
+@Service(Runnable.class)
+public class HotelOffersClientImpl {
+
+ @Reference
+ protected HotelOffers offers;
+
+ public void run() {
+ String bookingCode = offers.bookTodaysSpecial();
+ System.out.println("Hotel offers booking code is " + bookingCode);
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/Orders1ClientImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/Orders1ClientImpl.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/Orders1ClientImpl.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/Orders1ClientImpl.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES 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.client.impl;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+import com.tuscanyscatours.CustomerInfo;
+
+@Service(Runnable.class)
+public class Orders1ClientImpl {
+
+ @Reference
+ protected CustomerInfo customer;
+
+ public void run() {
+ String address = customer.getBillingAddress();
+ System.out.println("Customer billing address: " + address);
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/Orders2ClientImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/Orders2ClientImpl.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/Orders2ClientImpl.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/java/scatours/client/impl/Orders2ClientImpl.java Mon Mar 29 07:33:21 2010
@@ -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.client.impl;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+import com.tuscanyscatours.CustomerInfo;
+
+@Service(Runnable.class)
+public class Orders2ClientImpl {
+
+ @Reference
+ protected CustomerInfo customer;
+
+ public void run() {
+ String address = customer.getBillingAddress();
+ System.out.println("Customer billing address: " + address);
+ address = customer.getDeliveryAddress();
+ System.out.println("Customer delivery address: " + address);
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/address.xsd
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/address.xsd?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/address.xsd (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/address.xsd Mon Mar 29 07:33:21 2010
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:t="http://tuscanyscatours.com/"
+ targetNamespace="http://tuscanyscatours.com/">
+ <xs:element name="billingAddress">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="street" type="xs:string" />
+ <xs:element name="city" type="xs:string" />
+ <xs:element name="state" type="xs:string" />
+ <xs:element name="zip" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="Address">
+ <xs:sequence>
+ <xs:element name="street" type="xs:string" />
+ <xs:element name="city" type="xs:string" />
+ <xs:element name="state" type="xs:string" />
+ <xs:element name="zip" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/airportcodes.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/airportcodes.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/airportcodes.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/airportcodes.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ name="airportcodes">
+ <component name="AirportCodes">
+ <implementation.java class="com.tuscanyscatours.AirportCodes" />
+ </component>
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings1.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings1.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings1.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings1.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ name="bookings1">
+ <component name="TripBooking">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.TripBookingImpl" />
+ <reference name="cars" target="CarPartner/Cars" />
+ <reference name="flights" target="FlightPartner/Flights" />
+ <reference name="hotels" target="HotelPartner" />
+ </component>
+ <component name="CarPartner">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.CarVendorImpl" />
+ </component>
+ <component name="FlightPartner">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.FlightPartnerImpl" />
+ </component>
+ <component name="HotelPartner">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.HotelPartnerImpl" />
+ </component>
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings2.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings2.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings2.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings2.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ name="bookings2">
+ <component name="TripBooking">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.TripBookingImpl" />
+ <reference name="cars" target="CarPartner/Cars" />
+ <reference name="flights" target="FlightPartner/Flights" />
+ <reference name="hotels" />
+ </component>
+ <wire source="TripBooking/hotels" target="HotelPartner" />
+ <component name="CarPartner">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.CarVendorImpl" />
+ </component>
+ <component name="FlightPartner">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.FlightPartnerImpl" />
+ </component>
+ <component name="HotelPartner">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.HotelPartnerImpl" />
+ </component>
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings3.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings3.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings3.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings3.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ name="bookings3">
+ <component name="TripBooking" autowire="true">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.TripBookingImpl" />
+ <reference name="cars" />
+ <reference name="flights" />
+ <reference name="hotels" />
+ </component>
+ <component name="CarPartner">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.CarVendorImpl" />
+ </component>
+ <component name="FlightPartner">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.FlightPartnerImpl" />
+ </component>
+ <component name="HotelPartner">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.HotelPartnerImpl" />
+ </component>
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings4.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings4.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings4.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/bookings4.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ name="bookings4">
+ <component name="TripBooking">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.TripBookingImpl" />
+ <service name="Bookings">
+ <binding.ws uri="http://tuscanyscatours.com:8085/Bookings" />
+ <binding.jms uri="jms:Bookings" />
+ </service>
+ <reference name="cars">
+ <binding.ws uri="http://tuscanycars.com:8081/Cars" />
+ </reference>
+ <reference name="flights">
+ <binding.ejb uri="corbaname:rir:#flight/FlightPartnerHome" />
+ </reference>
+ <reference name="hotels" target="HotelPartner" />
+ </component>
+ <component name="HotelPartner">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.HotelPartnerImpl" />
+ </component>
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/carbookings1.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/carbookings1.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/carbookings1.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/carbookings1.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ name="carbookings1">
+ <component name="CarPartner">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.CarPartnerImpl" />
+ <reference name="cars" target="JoesCars KensCars" />
+ <reference name="luxuryCars" />
+ </component>
+ <component name="JoesCars">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.CarVendorImpl" />
+ </component>
+ <component name="KensCars">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.CarVendorImpl" />
+ </component>
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/carbookings2.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/carbookings2.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/carbookings2.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/carbookings2.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ name="carbookings2">
+ <component name="CarPartner">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.CarPartnerImpl" />
+ </component>
+ <wire source="CarPartner/cars" target="JoesCars" />
+ <wire source="CarPartner/cars" target="KensCars" />
+ <component name="JoesCars">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.CarVendorImpl" />
+ </component>
+ <component name="KensCars">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.CarVendorImpl" />
+ </component>
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/carbookings3.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/carbookings3.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/carbookings3.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/carbookings3.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ name="carbookings3">
+ <component name="CarPartner" autowire="true">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.CarPartnerImpl" />
+ <reference name="luxuryCars" autowire="false" />
+ </component>
+ <component name="JoesCars">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.CarVendorImpl" />
+ </component>
+ <component name="KensCars">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.CarVendorImpl" />
+ </component>
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/converter.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/converter.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/converter.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/converter.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ name="converter">
+ <component name="EURJPYConverter">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.CurrencyConverterImpl" />
+ <property name="fromCurrency">EUR</property>
+ <property name="toCurrency">JPY</property>
+ </component>
+ <component name="USDGBPConverter">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.CurrencyConverterImpl" />
+ <property name="fromCurrency">USD</property>
+ <property name="toCurrency">GBP</property>
+ </component>
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/hotelsdomain.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/hotelsdomain.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/hotelsdomain.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/hotelsdomain.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscahotels.com/"
+ name="hotelsdomain">
+ <component name="HotelPartner">
+ <implementation.java class=
+ "com.tuscanyscatours.using.impl.HotelPartnerImpl" />
+ <service name="Hotels">
+ <binding.ws uri=
+ "http://tuscanyscahotels.com:8083/Hotels" />
+ <binding.sca />
+ </service>
+ </component>
+ <component name="HotelOffers">
+ <implementation.java class=
+ "com.tuscanyscahotels.impl.HotelOffersImpl" />
+ <reference name="hotels"
+ target="HotelPartner/Hotels" />
+ </component>
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/orders1.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/orders1.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/orders1.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/orders1.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ xmlns:t="http://tuscanyscatours.com/"
+ name="orders1">
+
+ <component name="Customer">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.CustomerImpl" />
+ <property name="billingAddress" element="t:billingAddress">
+ <t:billingAddress xmlns="">
+ <street>123 Main Street</street>
+ <city>New York</city>
+ <state>NY</state>
+ <zip>01234</zip>
+ </t:billingAddress>
+ </property>
+ </component>
+</composite>