summaryrefslogtreecommitdiffstats
path: root/sandbox/sebastien/java/sca-node/tutorial/store-mashup
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/sebastien/java/sca-node/tutorial/store-mashup')
-rw-r--r--sandbox/sebastien/java/sca-node/tutorial/store-mashup/META-INF/sca-contribution.xml25
-rw-r--r--sandbox/sebastien/java/sca-node/tutorial/store-mashup/build-openajax.xml86
-rw-r--r--sandbox/sebastien/java/sca-node/tutorial/store-mashup/gadget/map-gadget.html50
-rw-r--r--sandbox/sebastien/java/sca-node/tutorial/store-mashup/gadget/store-gadget.html148
-rw-r--r--sandbox/sebastien/java/sca-node/tutorial/store-mashup/map-gadget.composite32
-rw-r--r--sandbox/sebastien/java/sca-node/tutorial/store-mashup/mashup/store-mash.html70
-rw-r--r--sandbox/sebastien/java/sca-node/tutorial/store-mashup/pom.xml136
-rw-r--r--sandbox/sebastien/java/sca-node/tutorial/store-mashup/store-gadget.composite64
-rw-r--r--sandbox/sebastien/java/sca-node/tutorial/store-mashup/store-mashup.composite48
9 files changed, 659 insertions, 0 deletions
diff --git a/sandbox/sebastien/java/sca-node/tutorial/store-mashup/META-INF/sca-contribution.xml b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..4ec08403e5
--- /dev/null
+++ b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/META-INF/sca-contribution.xml
@@ -0,0 +1,25 @@
+<?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:s="http://store">
+ <import.java package="services"/>
+ <import.java package="services.map"/>
+ <deployable composite="s:store-mashup"/>
+</contribution>
diff --git a/sandbox/sebastien/java/sca-node/tutorial/store-mashup/build-openajax.xml b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/build-openajax.xml
new file mode 100644
index 0000000000..4668dedc1d
--- /dev/null
+++ b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/build-openajax.xml
@@ -0,0 +1,86 @@
+<?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 name="OpenAjaxZipInstaller">
+
+ <property name="openajax.version" value="1.0_build117_v1.0"/>
+ <property name="unpack.location" value="${basedir}/openajax"/>
+
+ <target name="check-openajax-installed">
+ <condition property="already.installed" >
+ <available file="${localRepository}/openajax/openajax/${openajax.version}/openajax-${openajax.version}.zip"/>
+ </condition>
+ <condition property="maven.suffix" value="">
+ <os family="unix"/>
+ </condition>
+ <condition property="maven.suffix" value=".bat">
+ <os family="windows"/>
+ </condition>
+ </target>
+
+
+ <target name="check-openajax-unpacked">
+ <condition property="already.unpacked" >
+ <available file="${unpack.location}"/>
+ </condition>
+ </target>
+
+ <target name="install-openajax" depends="check-openajax-installed" unless="already.installed">
+ <mkdir dir="${basedir}/target/openajax-download/"/>
+ <get src="http://downloads.sourceforge.net/openajaxallianc/OpenAjaxHub${openajax.version}.zip"
+ dest="${basedir}/target/openajax-download/openajax-${openajax.version}.zip"
+ verbose="true"
+ usetimestamp="true"/>
+ <exec executable="mvn${maven.suffix}" dir="${basedir}" failonerror="false">
+ <arg line="install:install-file -DgroupId=openajax -DartifactId=openajax -Dversion=${openajax.version} -Dpackaging=zip -DgeneratePom=true -Dfile=${basedir}/target/openajax-download/openajax-${openajax.version}.zip"/>
+ </exec>
+ </target>
+
+ <target name="install-openajax-nomaven" depends="check-openajax-installed" unless="already.installed">
+ <mkdir dir="${basedir}/target/openajax-download/"/>
+ <get src="http://downloads.sourceforge.net/openajaxallianc/OpenAjaxHub${openajax.version}.zip"
+ dest="${basedir}/target/openajax-download/openajax-${openajax.version}.zip"
+ verbose="true"
+ usetimestamp="true"/>
+ <copy file="${basedir}/target/openajax-download/openajax-${openajax.version}.zip"
+ tofile="${localRepository}/openajax/openajax/${openajax.version}/openajax-${openajax.version}.zip"/>
+ </target>
+
+
+ <target name="unpack-openajax-files" depends="check-openajax-installed, check-openajax-unpacked" unless="already.unpacked">
+ <fail message="openajax zip file not installed in local repository: ${localRepository}" unless="already.installed"/>
+ <mkdir dir="${basedir}/target/openajax-unpack-temp/"/>
+ <unzip src="${localRepository}/openajax/openajax/${openajax.version}/openajax-${openajax.version}.zip"
+ dest="${basedir}/target/openajax-unpack-temp/"
+ overwrite="false">
+ <patternset>
+ <include name="OpenAjaxHub${openajax.version}/release/**"/>
+ </patternset>
+ </unzip>
+ <move file="${basedir}/target/openajax-unpack-temp/OpenAjaxHub${openajax.version}/release"
+ tofile="${unpack.location}"
+ verbose="true"/>
+ <delete dir="${basedir}/target/openajax-unpack-temp/"/>
+ </target>
+
+
+ <target name="clean-openajax-files">
+ <delete dir="${unpack.location}"/>
+ </target>
+</project>
diff --git a/sandbox/sebastien/java/sca-node/tutorial/store-mashup/gadget/map-gadget.html b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/gadget/map-gadget.html
new file mode 100644
index 0000000000..d76bcad91b
--- /dev/null
+++ b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/gadget/map-gadget.html
@@ -0,0 +1,50 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<html>
+<head>
+<title>Map</title>
+
+<script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA"></script>
+
+<script language="JavaScript">
+
+ function coordsChangedCallback(eventname, publisherData, subscriberData) {
+ var coords = publisherData.split(',');
+ if (coords.length >= 2) {
+ subscriberData.setCenter(new GLatLng(coords[0], coords[1]));
+ }
+ }
+
+ function init() {
+ if (GBrowserIsCompatible()) {
+ var map = new GMap2(document.getElementById("map_canvas"));
+ map.setCenter(new GLatLng(37.4419, -122.1419), 13);
+
+ if (window.top.hub != null) {
+ window.top.hub.subscribe("geospatial.coords", coordsChangedCallback, null, map);
+ }
+ }
+ }
+</script>
+</head>
+
+<body onload="init()">
+ <div id="map_canvas" style="width: 100%; height: 100%"></div>
+</body>
+</html>
diff --git a/sandbox/sebastien/java/sca-node/tutorial/store-mashup/gadget/store-gadget.html b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/gadget/store-gadget.html
new file mode 100644
index 0000000000..c2a8ba5118
--- /dev/null
+++ b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/gadget/store-gadget.html
@@ -0,0 +1,148 @@
+<!--
+ * 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>Store</title>
+
+<script type="text/javascript" src="/gadget/store/store-gadget.js"></script>
+
+<script language="JavaScript">
+
+ //@Reference
+ var catalog = new Reference("catalog");
+
+ //@Reference
+ var shoppingCart = new Reference("shoppingCart");
+
+ //@Reference
+ var shoppingTotal = new Reference("shoppingTotal");
+
+ var catalogItems;
+
+ function catalog_getResponse(items) {
+ var catalog = "";
+ for (var i=0; i<items.length; i++) {
+ var item = items[i].name + ' - ' + items[i].price;
+ catalog += '<input name="items" type="checkbox" onClick="selectItem(' + i + ')" value="' +
+ item + '">' + item + ' <br>';
+ }
+ document.getElementById('catalog').innerHTML=catalog;
+ catalogItems = items;
+ }
+
+ function shoppingCart_getResponse(feed) {
+ if (feed != null) {
+ var entries = feed.getElementsByTagName("entry");
+ var list = "";
+ for (var i=0; i<entries.length; i++) {
+ var content = entries[i].getElementsByTagName("content")[0];
+ var name = content.getElementsByTagName("name")[0].firstChild.nodeValue;
+ var price = content.getElementsByTagName("price")[0].firstChild.nodeValue;
+ list += name + ' - ' + price + ' <br>';
+ }
+ document.getElementById("shoppingCart").innerHTML = list;
+
+ if (entries.length != 0) {
+ shoppingTotal.getTotal(shoppingTotal_getTotalResponse);
+ }
+ }
+ }
+
+ function shoppingTotal_getTotalResponse(total) {
+ document.getElementById('total').innerHTML = total;
+ }
+
+ function shoppingCart_postResponse(entry) {
+ shoppingCart.get("", shoppingCart_getResponse);
+ }
+
+ function addToCart() {
+ var items = document.catalogForm.items;
+ var j = 0;
+ for (var i=0; i<items.length; i++)
+ if (items[i].checked) {
+ var entry = '<entry xmlns="http://www.w3.org/2005/Atom"><title>item</title><content type="text/xml">' +
+ '<Item xmlns="http://services/">' +
+ '<name xmlns="">' + catalogItems[i].name + '</name>' + '<price xmlns="">' + catalogItems[i].price + '</price>' +
+ '</Item>' + '</content></entry>';
+ shoppingCart.post(entry, shoppingCart_postResponse);
+ items[i].checked = false;
+ }
+ }
+ function checkoutCart() {
+ document.getElementById('store').innerHTML='<h2>' +
+ 'Thanks for Shopping With Us!</h2>'+
+ '<h2>Your Order</h2>'+
+ '<form name="orderForm" action="/gadget/store">'+
+ document.getElementById('shoppingCart').innerHTML+
+ '<br>'+
+ document.getElementById('total').innerHTML+
+ '<br>'+
+ '<br>'+
+ '<input type="submit" value="Continue Shopping">'+
+ '</form>';
+ shoppingCart.del("", null);
+ }
+ function deleteCart() {
+ shoppingCart.del("", null);
+ document.getElementById('shoppingCart').innerHTML = "";
+ document.getElementById('total').innerHTML = "";
+ }
+
+ function selectItem(i) {
+ var item = catalogItems[i];
+ if (window.top.hub != null) {
+ window.top.hub.publish("geospatial.coords", item.origin);
+ }
+ }
+
+ function init() {
+ catalog.get(catalog_getResponse);
+ shoppingCart.get("", shoppingCart_getResponse);
+ }
+
+</script>
+
+</head>
+
+<body onload="init()">
+<h1>Store</h1>
+ <div id="store">
+ <h2>Catalog</h2>
+ <form name="catalogForm">
+ <div id="catalog" ></div>
+ <br>
+ <input type="button" onClick="addToCart()" value="Add to Cart">
+ </form>
+
+ <br>
+
+ <h2>Your Shopping Cart</h2>
+ <form name="shoppingCartForm">
+ <div id="shoppingCart"></div>
+ <br>
+ <div id="total"></div>
+ <br>
+ <input type="button" onClick="checkoutCart()" value="Checkout">
+ <input type="button" onClick="deleteCart()" value="Empty">
+ <a href="/ShoppingCart/Cart/" target="_top">(feed)</a>
+ </form>
+ </div>
+</body>
+</html>
diff --git a/sandbox/sebastien/java/sca-node/tutorial/store-mashup/map-gadget.composite b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/map-gadget.composite
new file mode 100644
index 0000000000..77db2edbf2
--- /dev/null
+++ b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/map-gadget.composite
@@ -0,0 +1,32 @@
+<?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"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://store"
+ name="map-gadget">
+
+ <component name="MapGadget">
+ <t:implementation.widget location="gadget/map-gadget.html"/>
+ <service name="Widget">
+ <t:binding.http uri="/gadget/map"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sandbox/sebastien/java/sca-node/tutorial/store-mashup/mashup/store-mash.html b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/mashup/store-mash.html
new file mode 100644
index 0000000000..aab14bc065
--- /dev/null
+++ b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/mashup/store-mash.html
@@ -0,0 +1,70 @@
+<!--
+ * 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>Store Mashup</title>
+
+<script type="text/javascript" src='/openajax/OpenAjax.js'></script>
+
+<script type="text/javascript" src="/mashup/store-mash.js"></script>
+
+<script language="JavaScript">
+
+ //@Reference
+ var storeGadget = new Reference("storeGadget");
+
+ //@Reference
+ var mapGadget = new Reference("mapGadget");
+
+ function storeGadget_getResponse(gadget) {
+ var gadget1 = document.getElementById('gadget1').contentDocument;
+ gadget1.open();
+ gadget1.write(gadget);
+ gadget1.close();
+ }
+
+ function mapGadget_getResponse(gadget) {
+ var gadget2 = document.getElementById('gadget2').contentDocument;
+ gadget2.open();
+ gadget2.write(gadget);
+ gadget2.close();
+ }
+
+ function init() {
+ window.top.hub = OpenAjax.hub;
+
+ storeGadget.get('', storeGadget_getResponse);
+ mapGadget.get('', mapGadget_getResponse);
+ }
+
+</script>
+</head>
+
+<body onload="init()">
+<h1>Store Mashup</h1>
+<br>
+<table border="0" cellpadding="0" cellspacing="2">
+ <tr>
+ <td><iframe id="gadget1" style='overflow:hidden;width:400px;height:500px;border:1px solid black;'></iframe></td>
+ <td><iframe id="gadget2" style='overflow:hidden;width:400px;height:500px;border:1px solid black;'></iframe></td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/sandbox/sebastien/java/sca-node/tutorial/store-mashup/pom.xml b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/pom.xml
new file mode 100644
index 0000000000..10a18103af
--- /dev/null
+++ b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/pom.xml
@@ -0,0 +1,136 @@
+<?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-tutorial</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>tutorial-store-mashup</artifactId>
+ <name>Apache Tuscany SCA Tutorial Online Store Mashup</name>
+
+ <repositories>
+ <repository>
+ <id>apache.incubator</id>
+ <url>http://people.apache.org/repo/m2-incubating-repository</url>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>${artifactId}</finalName>
+ <sourceDirectory>${basedir}</sourceDirectory>
+ <resources>
+ <resource>
+ <directory>${basedir}</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ <exclude>**/.*/**</exclude>
+ <exclude>pom.xml</exclude>
+ <exclude>build.xml</exclude>
+ <exclude>target/**</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-maven-ant-generator</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ </dependencies>
+
+ <executions>
+ <execution>
+ <id>install-openajax</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <ant antfile="./build-openajax.xml" target="install-openajax">
+ <property name="localRepository" value="${settings.localRepository}"/>
+ </ant>
+ </tasks>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-openajax-files</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <ant antfile="./build-openajax.xml" target="unpack-openajax-files">
+ <property name="localRepository" value="${settings.localRepository}"/>
+ <property name="artifactId" value="${artifactId}"/>
+ </ant>
+ </tasks>
+ </configuration>
+ </execution>
+ <execution>
+ <id>clean-openajax-files</id>
+ <phase>clean</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <ant antfile="./build-openajax.xml" target="clean-openajax-files">
+ <property name="localRepository" value="${settings.localRepository}"/>
+ <property name="artifactId" value="${artifactId}"/>
+ </ant>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/sandbox/sebastien/java/sca-node/tutorial/store-mashup/store-gadget.composite b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/store-gadget.composite
new file mode 100644
index 0000000000..7c10651e52
--- /dev/null
+++ b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/store-gadget.composite
@@ -0,0 +1,64 @@
+<?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"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://store"
+ name="store-gadget">
+
+ <component name="StoreGadget">
+ <t:implementation.widget location="gadget/store-gadget.html"/>
+ <service name="Widget">
+ <t:binding.http uri="/gadget/store"/>
+ </service>
+ <reference name="catalog" target="StoreGadgetCatalog">
+ <t:binding.jsonrpc/>
+ </reference>
+ <reference name="shoppingCart" target="StoreGadgetShoppingCart/Cart">
+ <t:binding.atom/>
+ </reference>
+ <reference name="shoppingTotal" target="StoreGadgetShoppingCart/Total">
+ <t:binding.jsonrpc/>
+ </reference>
+ </component>
+
+ <component name="StoreGadgetCatalog">
+ <implementation.java class="services.map.FruitsCatalogImpl"/>
+ <property name="currencyCode">USD</property>
+ <service name="Catalog">
+ <t:binding.jsonrpc/>
+ </service>
+ <reference name="currencyConverter" target="StoreGadgetCurrencyConverter"/>
+ </component>
+
+ <component name="StoreGadgetShoppingCart">
+ <implementation.java class="services.ShoppingCartImpl"/>
+ <service name="Cart">
+ <t:binding.atom uri="/ShoppingCart/Cart"/>
+ </service>
+ <service name="Total">
+ <t:binding.jsonrpc/>
+ </service>
+ </component>
+
+ <component name="StoreGadgetCurrencyConverter">
+ <implementation.java class="services.CurrencyConverterImpl"/>
+ </component>
+
+</composite>
diff --git a/sandbox/sebastien/java/sca-node/tutorial/store-mashup/store-mashup.composite b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/store-mashup.composite
new file mode 100644
index 0000000000..84e4933e63
--- /dev/null
+++ b/sandbox/sebastien/java/sca-node/tutorial/store-mashup/store-mashup.composite
@@ -0,0 +1,48 @@
+<?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"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://store"
+ xmlns:s="http://store"
+ name="store-mashup">
+
+ <include name="s:store-gadget"/>
+ <include name="s:map-gadget"/>
+
+ <component name="StoreMashup">
+ <t:implementation.widget location="mashup/store-mash.html"/>
+ <service name="Widget">
+ <t:binding.http uri="/mashup"/>
+ </service>
+ <reference name="storeGadget" target="StoreGadget">
+ <t:binding.http/>
+ </reference>
+ <reference name="mapGadget" target="MapGadget">
+ <t:binding.http/>
+ </reference>
+ </component>
+
+ <component name="openajax">
+ <t:implementation.resource location="openajax"/>
+ <service name="Resource">
+ <t:binding.http uri="/openajax"/>
+ </service>
+ </component>
+</composite>