Added: tuscany/sandbox/travelsample/trip-contribution/pom.xml
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/trip-contribution/pom.xml?rev=680283&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/trip-contribution/pom.xml (added)
+++ tuscany/sandbox/travelsample/trip-contribution/pom.xml Mon Jul 28 01:10:57 
2008
@@ -0,0 +1,82 @@
+<?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.    
+-->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>tuscany-sca</artifactId>
+        <version>1.4-SNAPSHOT</version>
+        <!--relativePath>../../pom.xml</relativePath-->
+    </parent>
+    <artifactId>scatours-trip-contribution</artifactId>
+    <name>Apache Tuscany SCA Tours Trip Contribution</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-sca-api</artifactId>
+            <version>1.4-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-data-api</artifactId>
+            <version>1.4-SNAPSHOT</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>scatours-common-contribution</artifactId>
+            <version>1.4-SNAPSHOT</version>
+        </dependency>   
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>scatours-currency-contribution</artifactId>
+            <version>1.4-SNAPSHOT</version>
+        </dependency> 
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.2</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+       <finalName>${artifactId}</finalName>
+       <sourceDirectory>${basedir}/src</sourceDirectory>
+       <resources>
+          <resource>
+              <directory>${basedir}</directory>
+              <excludes>
+                  <exclude>**/*.java</exclude>
+                  <exclude>**/.*/**</exclude>
+                  <exclude>pom.xml</exclude>
+                  <exclude>build.xml</exclude>
+                  <exclude>target/**</exclude>
+                  <exclude>src/**</exclude>
+              </excludes>
+          </resource>
+       </resources>
+    </build>
+</project>

Propchange: tuscany/sandbox/travelsample/trip-contribution/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sandbox/travelsample/trip-contribution/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/sandbox/travelsample/trip-contribution/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
tuscany/sandbox/travelsample/trip-contribution/src/scatours/trip/Trip.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/trip-contribution/src/scatours/trip/Trip.java?rev=680283&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/trip-contribution/src/scatours/trip/Trip.java 
(added)
+++ tuscany/sandbox/travelsample/trip-contribution/src/scatours/trip/Trip.java 
Mon Jul 28 01:10:57 2008
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES 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.trip;
+
+import org.apache.tuscany.sca.data.collection.Item;
+import org.osoa.sca.annotations.Remotable;
+
+import scatours.common.TripItem;
+import scatours.common.TripLeg;
+
+/**
+ * The Trip service interface
+ */
[EMAIL PROTECTED]
+public interface Trip {
+    TripItem[] search(TripLeg tripLeg);
+    double getTotalPrice();
+}

Propchange: 
tuscany/sandbox/travelsample/trip-contribution/src/scatours/trip/Trip.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/sandbox/travelsample/trip-contribution/src/scatours/trip/Trip.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
tuscany/sandbox/travelsample/trip-contribution/src/scatours/trip/TripImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/trip-contribution/src/scatours/trip/TripImpl.java?rev=680283&view=auto
==============================================================================
--- 
tuscany/sandbox/travelsample/trip-contribution/src/scatours/trip/TripImpl.java 
(added)
+++ 
tuscany/sandbox/travelsample/trip-contribution/src/scatours/trip/TripImpl.java 
Mon Jul 28 01:10:57 2008
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES 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.trip;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.osoa.sca.annotations.Property;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+import scatours.common.Search;
+import scatours.common.SearchCallback;
+import scatours.common.TripItem;
+import scatours.common.TripLeg;
+import scatours.currencyconverter.CurrencyConverter;
+
+/**
+ * An implementation of the Trip service
+ */
[EMAIL PROTECTED]("COMPOSITE")
[EMAIL PROTECTED](interfaces={Trip.class})
+public class TripImpl implements Trip, SearchCallback {
+    
+    @Reference
+    protected CurrencyConverter currencyConverter;
+    
+    @Reference 
+    protected Search hotelSearch;
+        
+    @Property
+    public String quoteCurrencyCode = "USD";
+    
+    private List<TripItem> searchResults = new ArrayList<TripItem>();
+    
+    public TripItem[] search(TripLeg tripLeg) {
+        
+        hotelSearch.searchAsynch(tripLeg);
+        //flightSearch.searchAsynch(tripLeg);
+        //carSearch.searchAsynch(tripLeg);
+        
+        // TODO - extend this to have the three searches run in parallel
+        
+        TripItem[] tripItemArray = searchResults.toArray(new 
TripItem[searchResults.size()]);
+        searchResults.clear();
+        
+        return tripItemArray;
+    }
+       
+    public double getTotalPrice(){
+        String supplierCurrencyCode = "USD";
+        double price = 100.00;
+       
+        return currencyConverter.convert(supplierCurrencyCode, 
+                                         quoteCurrencyCode, 
+                                         price);
+    }
+    
+    public void searchResults(TripItem[] items){
+        for(int i = 0; i < items.length; i++ ){
+            searchResults.add(items[i]);
+        }
+    }
+}

Propchange: 
tuscany/sandbox/travelsample/trip-contribution/src/scatours/trip/TripImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/sandbox/travelsample/trip-contribution/src/scatours/trip/TripImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
tuscany/sandbox/travelsample/ui-contribution/META-INF/sca-contribution.xml
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/ui-contribution/META-INF/sca-contribution.xml?rev=680283&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/ui-contribution/META-INF/sca-contribution.xml 
(added)
+++ tuscany/sandbox/travelsample/ui-contribution/META-INF/sca-contribution.xml 
Mon Jul 28 01:10:57 2008
@@ -0,0 +1,27 @@
+<?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.    
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0";
+   xmlns:scatours="http://scatours";>
+   <import.java package="scatours.common"/>
+   <import.java package="scatours.currencyconverter"/>
+   <import.java package="scatours.hotel"/>
+   <import.java package="scatours.trip"/>
+   <deployable composite="scatours:scatours"/>
+</contribution>
\ No newline at end of file

Propchange: 
tuscany/sandbox/travelsample/ui-contribution/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/sandbox/travelsample/ui-contribution/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
tuscany/sandbox/travelsample/ui-contribution/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/sandbox/travelsample/ui-contribution/build.xml
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/ui-contribution/build.xml?rev=680283&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/ui-contribution/build.xml (added)
+++ tuscany/sandbox/travelsample/ui-contribution/build.xml Mon Jul 28 01:10:57 
2008
@@ -0,0 +1,106 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<project name="scatours-ui-contribution" default="compile">
+
+    <target name="compile">
+        <mkdir dir="target/classes"/>
+        <javac destdir="target/classes" debug="on" source="1.5" target="1.5">
+            <src path="src"/>
+            <classpath>
+                <fileset refid="tuscany.jars"/>
+                <fileset refid="3rdparty.jars"/>
+            </classpath>
+        </javac>
+        <copy todir="target/classes">
+            <fileset dir="." excludes="**/*.java, pom.xml, build.xml, target"/>
+        </copy>
+        <jar destfile="target/scatours-ui-contribution.jar" 
basedir="target/classes">
+            <manifest>
+                <attribute name="Main-Class" 
value="launch.LaunchTutorialAdmin"/>
+            </manifest>
+        </jar>
+    </target>
+
+    <target name="package" depends="compile"/>
+
+    <target name="run">
+        <java classname="launch.LaunchTutorialAdmin" fork="true">
+            <classpath>
+                <pathelement location="target/scatours-ui-contribution.jar"/>
+                <fileset refid="tuscany.jars"/>
+                <fileset refid="3rdparty.jars"/>
+            </classpath>
+        </java>
+    </target>
+
+    <target name="clean">
+        <delete includeemptydirs="true">
+            <fileset dir="target"/>
+        </delete>
+    </target>
+
+    <fileset id="tuscany.jars" dir="../../modules">
+        <include name="tuscany-assembly-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-assembly-xml-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-assembly-xsd-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-binding-sca-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-binding-sca-xml-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-contribution-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-contribution-impl-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-contribution-java-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-contribution-namespace-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-contribution-xml-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-core-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-core-databinding-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-core-spi-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-databinding-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-databinding-jaxb-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-definitions-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-definitions-xml-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-endpoint-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-extensibility-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-host-embedded-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-interface-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-interface-java-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-interface-java-jaxws-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-interface-java-xml-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-monitor-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-policy-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-policy-xml-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-sca-api-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-xsd-1.4-SNAPSHOT.jar"/>
+    </fileset>
+    <fileset id="3rdparty.jars" dir="../../lib">
+        <include name="XmlSchema-1.3.1.jar"/>
+        <include name="activation-1.1.jar"/>
+        <include name="asm-all-3.1.jar"/>
+        <include name="cglib-nodep-2.1_3.jar"/>
+        <include name="geronimo-commonj_1.1_spec-1.0.jar"/>
+        <include name="jaxb-api-2.1.jar"/>
+        <include name="jaxb-impl-2.1.7.jar"/>
+        <include name="jaxws-api-2.1.jar"/>
+        <include name="jsr181-api-1.0-MR1.jar"/>
+        <include name="jsr250-api-1.0.jar"/>
+        <include name="stax-api-1.0-2.jar"/>
+        <include name="wstx-asl-3.2.1.jar"/>
+        <include name="xml-apis-1.3.03.jar"/>
+    </fileset>
+
+</project>

Propchange: tuscany/sandbox/travelsample/ui-contribution/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sandbox/travelsample/ui-contribution/build.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/sandbox/travelsample/ui-contribution/build.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/sandbox/travelsample/ui-contribution/pom.xml
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/ui-contribution/pom.xml?rev=680283&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/ui-contribution/pom.xml (added)
+++ tuscany/sandbox/travelsample/ui-contribution/pom.xml Mon Jul 28 01:10:57 
2008
@@ -0,0 +1,102 @@
+<?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.    
+-->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>tuscany-sca</artifactId>
+        <version>1.4-SNAPSHOT</version>
+        <!--relativePath>../../pom.xml</relativePath-->
+    </parent>
+    <artifactId>scatours-ui-contribution</artifactId>
+    <name>Apache Tuscany SCA Tours User Interface Contribution</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>1.4-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>1.4-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-axis2</artifactId>
+            <version>1.4-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>  
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-tomcat</artifactId>
+            <version>1.4-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency> 
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.2</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+       <finalName>${artifactId}</finalName>
+       <sourceDirectory>${basedir}/src</sourceDirectory>
+       <resources>
+          <resource>
+              <directory>${basedir}</directory>
+              <excludes>
+                  <exclude>**/*.java</exclude>
+                  <exclude>**/.*/**</exclude>
+                  <exclude>pom.xml</exclude>
+                  <exclude>build.xml</exclude>
+                  <exclude>target/**</exclude>
+                  <exclude>src/**</exclude>
+              </excludes>
+          </resource>
+       </resources>
+       <plugins>
+            <plugin>
+                <groupId>org.apache.tuscany.sca</groupId>
+                <artifactId>tuscany-maven-ant-generator</artifactId>
+                <version>1.4-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <configuration>
+                            <mainClass>launch.LaunchTutorialAdmin</mainClass>
+                        </configuration>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+       </plugins>
+    </build>
+</project>

Propchange: tuscany/sandbox/travelsample/ui-contribution/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sandbox/travelsample/ui-contribution/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/sandbox/travelsample/ui-contribution/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/sandbox/travelsample/ui-contribution/scatours.composite
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/ui-contribution/scatours.composite?rev=680283&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/ui-contribution/scatours.composite (added)
+++ tuscany/sandbox/travelsample/ui-contribution/scatours.composite Mon Jul 28 
01:10:57 2008
@@ -0,0 +1,65 @@
+<?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://scatours";
+           xmlns:scatours="http://scatours";
+           xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0";
+           name="scatours">
+           
+    <component name="SCATours">
+        <tuscany:implementation.widget location="scatours.html"/>
+        <service name="Widget">
+            <tuscany:binding.http uri="/scatours"/>
+        </service>
+        <reference name="hotel" target="HotelComponent">
+            <tuscany:binding.jsonrpc/>
+        </reference>
+        <reference name="trip" target="TripComponent">
+            <tuscany:binding.jsonrpc/>
+        </reference>
+    </component>
+    
+    <component name="TripComponent">
+        <implementation.java class="scatours.trip.TripImpl"/>
+        <service name="Trip">
+            <tuscany:binding.jsonrpc/>
+        </service>
+        <reference name="hotelSearch" target="HotelComponent">
+            <binding.sca/>
+        </reference>
+        <reference name="currencyConverter" 
target="CurrencyConverterComponent">
+        </reference>
+    </component>
+        
+    <component name="HotelComponent">
+        <implementation.java class="scatours.hotel.HotelImpl"/>
+        <service name="Search">
+            <binding.sca/>
+            <tuscany:binding.jsonrpc/>
+        </service>
+    </component>    
+    
+    <component name="CurrencyConverterComponent">
+        <implementation.java 
class="scatours.currencyconverter.CurrencyConverterImpl"/>
+        <service name="CurrencyConverter">
+        </service>
+    </component>
+
+</composite>

Propchange: tuscany/sandbox/travelsample/ui-contribution/scatours.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sandbox/travelsample/ui-contribution/scatours.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/sandbox/travelsample/ui-contribution/scatours.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/sandbox/travelsample/ui-contribution/scatours.html
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/ui-contribution/scatours.html?rev=680283&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/ui-contribution/scatours.html (added)
+++ tuscany/sandbox/travelsample/ui-contribution/scatours.html Mon Jul 28 
01:10:57 2008
@@ -0,0 +1,145 @@
+<!--
+    * Licensed to the Apache Software Foundation (ASF) under one
+    * or more contributor license agreements.  See the NOTICE file
+    * distributed with this work for additional information
+    * regarding copyright ownership.  The ASF licenses this file
+    * to you under the Apache License, Version 2.0 (the
+    * "License"); you may not use this file except in compliance
+    * with the License.  You may obtain a copy of the License at
+    * 
+    *   http://www.apache.org/licenses/LICENSE-2.0
+    * 
+    * Unless required by applicable law or agreed to in writing,
+    * software distributed under the License is distributed on an
+    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    * KIND, either express or implied.  See the License for the
+    * specific language governing permissions and limitations
+    * under the License.    
+-->
+<html>
+<head>
+<title>SCA Tours</title>
+
+<link rel="stylesheet" type="text/css" href="style.css" />
+
+<script type="text/javascript" src="scatours.js"></script>
+
+<script language="JavaScript">
+
+       //@Reference
+       var hotel = new Reference("hotel");
+       
+    //@Reference
+    var trip = new Reference("trip");
+    
+    //local state
+    var hotels;
+    var flights;
+    var cars;
+    
+    //the constructor for trip leg beans
+    function TripLegType(id,
+                         fromLocation,
+                         toLocation,
+                         fromDate,
+                         toDate,
+                         noOfPeople) {
+          this.id           = id;
+          this.fromLocation = fromLocation;
+          this.toLocation   = toLocation;
+          this.fromDate     = fromDate;
+          this.toDate       = toDate;
+          this.noOfPeople   = noOfPeople;
+    }
+    
+    function getTripLeg(){
+        return new TripLegType("X",
+                               document.searchForm.fromLocation.value,
+                               document.searchForm.toLocation.value,
+                               document.searchForm.fromDate.value,
+                               document.searchForm.toDate.value,
+                               document.searchForm.noOfPeople.value);
+    }
+               
+    function init() {
+          try {
+
+          }
+          catch(e) {
+              alert(e);
+          }
+    }
+    
+    function searchHotels() {       
+        hotel.searchSynch(getTripLeg(), search_response);
+    }
+    
+    function searchTrip() {        
+        trip.search(getTripLeg(), search_response);
+    }
+        
+    function search_response(items, exception) {
+        if(exception){
+            alert(exception.javaStack);
+            return;
+        }
+        var hotelsHTML = "";
+        for (var i=0; i<items.length; i++) {
+            var item = items[i].name + ' - ' + items[i].description;
+            hotelsHTML += '<input name="items" type="checkbox" value="' + 
+                        item + '">' + item + ' <br>';
+        }
+        document.getElementById('searchResponse').innerHTML = hotelsHTML;
+        hotels = items;
+    }  
+       
+</script>
+
+</head>
+
+<body onload="init()" background="">
+       <img src="scatours.png" border="0" />
+       <div id="scatours">
+        <br>
+        <form name="searchForm">   
+            <table border="0">
+                <tr>
+                    <td>From Location:</td>
+                    <td><input type="text" name="fromLocation" 
value="LGW"></td>
+                    <td>To Location:</td>
+                    <td><input type="text" name="toLocation" value="ANU"></td>
+                </tr>
+                <tr>
+                    <td>Start Date:</td>
+                    <td><input type="text" name="fromDate" 
value="06/12/08"></td>
+                    <td>End Date:</td>
+                    <td><input type="text" name="toDate" value="06/12/08"></td>
+                </tr>
+                <tr>
+                    <td>Number of people:</td>
+                    <td><select name="noOfPeople">
+                        <option>1
+                        <option selected>2
+                        <option>3
+                        <option>4
+                    </select></td>
+                    <td/>
+                    <td/>
+                </tr>
+            </table>
+            <input type="button" onClick="searchHotels()" 
value="SearchHotels"> 
+            <input type="button" onClick="searchTrip()" value="SearchTrip"> 
+        </form>
+        <div id="searchResponse"></div>
+        <br>
+        <form name="tripForm">   
+            <input type="button" onClick="bookTrip()" value="BookTrip"> 
+        </form> 
+        <br> 
+        <div id="trip"></div>
+        <br>
+        <div id="total"></div>
+       </div>
+  
+</body>
+</html>

Propchange: tuscany/sandbox/travelsample/ui-contribution/scatours.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sandbox/travelsample/ui-contribution/scatours.html
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/sandbox/travelsample/ui-contribution/scatours.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: tuscany/sandbox/travelsample/ui-contribution/scatours.odg
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/ui-contribution/scatours.odg?rev=680283&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tuscany/sandbox/travelsample/ui-contribution/scatours.odg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tuscany/sandbox/travelsample/ui-contribution/scatours.png
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/ui-contribution/scatours.png?rev=680283&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tuscany/sandbox/travelsample/ui-contribution/scatours.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: tuscany/sandbox/travelsample/ui-contribution/style.css
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/ui-contribution/style.css?rev=680283&view=auto
==============================================================================
--- tuscany/sandbox/travelsample/ui-contribution/style.css (added)
+++ tuscany/sandbox/travelsample/ui-contribution/style.css Mon Jul 28 01:10:57 
2008
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *   
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+
+/*******************************************/
+
+p,table,li,h1,h2,h3
+{
+font-family: verdana, arial, 'sans serif'; 
+}
+
+p, h1, h2, h3, table, li, hr
+{
+margin-left: 10pt;
+}
+
+table
+{
+border-color: black;
+border-collapse: separate;
+border-spacing: 0px 1px;
+
+margin-right: 10pt;
+margin-left: 10pt;
+width: 800px;
+}
+
+.sourceDetailsTable
+{
+width: 600px;
+}
+
+tr, td
+{
+margin-left: 0pt;
+margin-right: 0pt;
+padding-left: 10pt;
+font-size: 90%;
+}
+
+p,li,th
+{
+font-size: 90%;
+margin-left: 10pt;
+}
+
+pre
+{
+margin-left: 10pt;
+}
+
+body
+{
+#ffffff;
+}
+
+h1,h2,h3,hr
+{
+color: firebrick;
+}
+
+a:link {COLOR: firebrick;}
+a:visited {COLOR: firebrick;}
+a:active {COLOR: navy;}
+
+.link
+{
+COLOR: firebrick;
+text-decoration: underline;
+}
+
+.clickable
+{
+cursor: pointer
+}
+
+.unread_title
+{
+font-weight: bold;
+}
+
+.read_title
+{
+font-weight: normal;
+}
+
+.summary
+{
+color: DimGrey;
+}
+
+.hidden
+{
+display: none;
+}
+
+.source_name
+{
+width: 600px;
+}
+
+.alert_text
+{
+width: 600px;
+}
+
+.alert_data
+{
+margin-left: 10px;
+width: 800px;
+height: 800px;
+}
+
+.source_0
+{
+background-color: LightGreen;
+}    
+

Propchange: tuscany/sandbox/travelsample/ui-contribution/style.css
------------------------------------------------------------------------------
    svn:eol-style = native


Reply via email to