Author: jsdelfino
Date: Thu Nov 15 08:42:22 2007
New Revision: 595351

URL: http://svn.apache.org/viewvc?rev=595351&view=rev
Log:
Added a new module to the tutorial to represent an Amazon shopping cart.

Added:
    incubator/tuscany/java/sca/tutorial/amazon/   (with props)
    incubator/tuscany/java/sca/tutorial/amazon/amazon/
    incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/
    incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCart.java   
(with props)
    incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCart.wsdl   
(with props)
    incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCartImpl.java  
 (with props)
    incubator/tuscany/java/sca/tutorial/amazon/amazoncart.composite   (with 
props)
    incubator/tuscany/java/sca/tutorial/amazon/launch/
    incubator/tuscany/java/sca/tutorial/amazon/launch/LaunchAmazonCart.java   
(with props)
    incubator/tuscany/java/sca/tutorial/amazon/pom.xml   (with props)
    incubator/tuscany/java/sca/tutorial/amazon/test/
    incubator/tuscany/java/sca/tutorial/amazon/test/AmazonCartTestCase.java   
(with props)
Modified:
    incubator/tuscany/java/sca/tutorial/pom.xml

Propchange: incubator/tuscany/java/sca/tutorial/amazon/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Nov 15 08:42:22 2007
@@ -0,0 +1,17 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+build.xml
+

Added: incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCart.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCart.java?rev=595351&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCart.java 
(added)
+++ incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCart.java Thu 
Nov 15 08:42:22 2007
@@ -0,0 +1,14 @@
+package amazon.cart;
+
+import org.osoa.sca.annotations.Remotable;
+
+import com.cart.amazon.*;
+
[EMAIL PROTECTED]
+public interface AmazonCart {
+       
+       public CartCreateResponse CartCreate(CartCreate cartCreate);
+       public CartAddResponse CartAdd(CartAdd cartAdd);
+       public CartClearResponse CartClear(CartClear cartClear);
+       public CartGetResponse CartGet(CartGet cartGet);
+}

Propchange: 
incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCart.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCart.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCart.wsdl
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCart.wsdl?rev=595351&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCart.wsdl 
(added)
+++ incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCart.wsdl Thu 
Nov 15 08:42:22 2007
@@ -0,0 +1,451 @@
+<?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.    
+-->
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:tns="http://amazon.cart.com/"; 
targetNamespace="http://amazon.cart.com/";>
+       <types>
+               <xs:schema targetNamespace="http://amazon.cart.com/"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:tns="http://amazon.cart.com/"; 
elementFormDefault="qualified">
+                       <xs:element name="CartGet">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element 
name="MarketplaceDomain" type="xs:string" minOccurs="0"/>
+                                               <xs:element 
name="AWSAccessKeyId" type="xs:string" minOccurs="0"/>
+                                               <xs:element 
name="SubscriptionId" type="xs:string" minOccurs="0"/>
+                                               <xs:element name="AssociateTag" 
type="xs:string" minOccurs="0"/>
+                                               <xs:element name="Validate" 
type="xs:string" minOccurs="0"/>
+                                               <xs:element name="XMLEscaping" 
type="xs:string" minOccurs="0"/>
+                                               <xs:element name="Shared" 
type="tns:CartGetRequest" minOccurs="0"/>
+                                               <xs:element name="Request" 
type="tns:CartGetRequest" minOccurs="0" maxOccurs="unbounded"/>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:complexType name="CartGetRequest">
+                               <xs:sequence>
+                                       <xs:element name="CartId" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="HMAC" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="MergeCart" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="ResponseGroup" 
type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+                               </xs:sequence>
+                       </xs:complexType>
+                       <xs:element name="CartAdd">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element 
name="MarketplaceDomain" type="xs:string" minOccurs="0"/>
+                                               <xs:element 
name="AWSAccessKeyId" type="xs:string" minOccurs="0"/>
+                                               <xs:element 
name="SubscriptionId" type="xs:string" minOccurs="0"/>
+                                               <xs:element name="AssociateTag" 
type="xs:string" minOccurs="0"/>
+                                               <xs:element name="Validate" 
type="xs:string" minOccurs="0"/>
+                                               <xs:element name="XMLEscaping" 
type="xs:string" minOccurs="0"/>
+                                               <xs:element name="Shared" 
type="tns:CartAddRequest" minOccurs="0"/>
+                                               <xs:element name="Request" 
type="tns:CartAddRequest" minOccurs="0" maxOccurs="unbounded"/>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:complexType name="CartAddRequest">
+                               <xs:sequence>
+                                       <xs:element name="CartId" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="HMAC" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="MergeCart" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="Items" minOccurs="0">
+                                               <xs:complexType>
+                                                       <xs:sequence>
+                                                               <xs:element 
name="Item" minOccurs="0" maxOccurs="unbounded">
+                                                                       
<xs:complexType>
+                                                                               
<xs:sequence>
+                                                                               
        <xs:element name="ASIN" type="xs:string" minOccurs="0"/>
+                                                                               
        <xs:element name="OfferListingId" type="xs:string" minOccurs="0"/>
+                                                                               
        <xs:element name="Quantity" type="xs:positiveInteger" minOccurs="0"/>
+                                                                               
        <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/>
+                                                                               
        <xs:element name="ListItemId" type="xs:string" minOccurs="0"/>
+                                                                               
</xs:sequence>
+                                                                       
</xs:complexType>
+                                                               </xs:element>
+                                                       </xs:sequence>
+                                               </xs:complexType>
+                                       </xs:element>
+                                       <xs:element name="ResponseGroup" 
type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+                               </xs:sequence>
+                       </xs:complexType>
+                       <xs:element name="CartCreate">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element 
name="MarketplaceDomain" type="xs:string" minOccurs="0"/>
+                                               <xs:element 
name="AWSAccessKeyId" type="xs:string" minOccurs="0"/>
+                                               <xs:element 
name="SubscriptionId" type="xs:string" minOccurs="0"/>
+                                               <xs:element name="AssociateTag" 
type="xs:string" minOccurs="0"/>
+                                               <xs:element name="Validate" 
type="xs:string" minOccurs="0"/>
+                                               <xs:element name="XMLEscaping" 
type="xs:string" minOccurs="0"/>
+                                               <xs:element name="Shared" 
type="tns:CartCreateRequest" minOccurs="0"/>
+                                               <xs:element name="Request" 
type="tns:CartCreateRequest" minOccurs="0" maxOccurs="unbounded"/>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:complexType name="CartCreateRequest">
+                               <xs:sequence>
+                                       <xs:element name="MergeCart" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="Items" minOccurs="0">
+                                               <xs:complexType>
+                                                       <xs:sequence>
+                                                               <xs:element 
name="Item" minOccurs="0" maxOccurs="unbounded">
+                                                                       
<xs:complexType>
+                                                                               
<xs:sequence>
+                                                                               
        <xs:element name="ASIN" type="xs:string" minOccurs="0"/>
+                                                                               
        <xs:element name="OfferListingId" type="xs:string" minOccurs="0"/>
+                                                                               
        <xs:element name="Quantity" type="xs:positiveInteger" minOccurs="0"/>
+                                                                               
        <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/>
+                                                                               
        <xs:element name="ListItemId" type="xs:string" minOccurs="0"/>
+                                                                               
</xs:sequence>
+                                                                       
</xs:complexType>
+                                                               </xs:element>
+                                                       </xs:sequence>
+                                               </xs:complexType>
+                                       </xs:element>
+                                       <xs:element name="ResponseGroup" 
type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+                               </xs:sequence>
+                       </xs:complexType>
+                       <xs:element name="CartClear">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element 
name="MarketplaceDomain" type="xs:string" minOccurs="0"/>
+                                               <xs:element 
name="AWSAccessKeyId" type="xs:string" minOccurs="0"/>
+                                               <xs:element 
name="SubscriptionId" type="xs:string" minOccurs="0"/>
+                                               <xs:element name="AssociateTag" 
type="xs:string" minOccurs="0"/>
+                                               <xs:element name="Validate" 
type="xs:string" minOccurs="0"/>
+                                               <xs:element name="XMLEscaping" 
type="xs:string" minOccurs="0"/>
+                                               <xs:element name="Shared" 
type="tns:CartClearRequest" minOccurs="0"/>
+                                               <xs:element name="Request" 
type="tns:CartClearRequest" minOccurs="0" maxOccurs="unbounded"/>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:complexType name="CartClearRequest">
+                               <xs:sequence>
+                                       <xs:element name="CartId" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="HMAC" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="MergeCart" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="ResponseGroup" 
type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+                               </xs:sequence>
+                       </xs:complexType>
+                       <xs:element name="CartGetResponse">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element 
ref="tns:OperationRequest" minOccurs="0"/>
+                                               <xs:element ref="tns:Cart" 
minOccurs="0" maxOccurs="unbounded"/>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="CartAddResponse">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element 
ref="tns:OperationRequest" minOccurs="0"/>
+                                               <xs:element ref="tns:Cart" 
minOccurs="0" maxOccurs="unbounded"/>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="CartCreateResponse">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element 
ref="tns:OperationRequest" minOccurs="0"/>
+                                               <xs:element ref="tns:Cart" 
minOccurs="0" maxOccurs="unbounded"/>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="CartClearResponse">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element 
ref="tns:OperationRequest" minOccurs="0"/>
+                                               <xs:element ref="tns:Cart" 
minOccurs="0" maxOccurs="unbounded"/>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="Cart">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element ref="tns:Request" 
minOccurs="0"/>
+                                               <xs:element name="CartId" 
type="xs:string"/>
+                                               <xs:element name="HMAC" 
type="xs:string"/>
+                                               <xs:element 
name="URLEncodedHMAC" type="xs:string"/>
+                                               <xs:element name="PurchaseURL" 
type="xs:string" minOccurs="0"/>
+                                               <xs:element name="SubTotal" 
type="tns:Price" minOccurs="0"/>
+                                               <xs:element ref="tns:CartItems" 
minOccurs="0"/>
+                                               <xs:element 
ref="tns:SavedForLaterItems" minOccurs="0"/>
+                                               <xs:element 
ref="tns:SimilarProducts" minOccurs="0"/>
+                                               <xs:element 
ref="tns:TopSellers" minOccurs="0"/>
+                                               <xs:element 
ref="tns:NewReleases" minOccurs="0"/>
+                                               <xs:element 
ref="tns:SimilarViewedProducts" minOccurs="0"/>
+                                               <xs:element 
ref="tns:OtherCategoriesSimilarProducts" minOccurs="0"/>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="SavedForLaterItems">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="SubTotal" 
type="tns:Price" minOccurs="0"/>
+                                               <xs:element 
name="SavedForLaterItem" type="tns:CartItem" maxOccurs="unbounded"/>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="SimilarProducts">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element 
name="SimilarProduct" maxOccurs="unbounded">
+                                                       <xs:complexType>
+                                                               <xs:sequence>
+                                                                       
<xs:element name="ASIN" type="xs:string" minOccurs="0"/>
+                                                                       
<xs:element name="Title" type="xs:string" minOccurs="0"/>
+                                                               </xs:sequence>
+                                                       </xs:complexType>
+                                               </xs:element>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="TopSellers">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="TopSeller" 
maxOccurs="unbounded">
+                                                       <xs:complexType>
+                                                               <xs:sequence>
+                                                                       
<xs:element name="ASIN" type="xs:string" minOccurs="0"/>
+                                                                       
<xs:element name="Title" type="xs:string" minOccurs="0"/>
+                                                               </xs:sequence>
+                                                       </xs:complexType>
+                                               </xs:element>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="NewReleases">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="NewRelease" 
maxOccurs="unbounded">
+                                                       <xs:complexType>
+                                                               <xs:sequence>
+                                                                       
<xs:element name="ASIN" type="xs:string" minOccurs="0"/>
+                                                                       
<xs:element name="Title" type="xs:string" minOccurs="0"/>
+                                                               </xs:sequence>
+                                                       </xs:complexType>
+                                               </xs:element>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="SimilarViewedProducts">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element 
name="SimilarViewedProduct" maxOccurs="unbounded">
+                                                       <xs:complexType>
+                                                               <xs:sequence>
+                                                                       
<xs:element name="ASIN" type="xs:string" minOccurs="0"/>
+                                                                       
<xs:element name="Title" type="xs:string" minOccurs="0"/>
+                                                               </xs:sequence>
+                                                       </xs:complexType>
+                                               </xs:element>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="OtherCategoriesSimilarProducts">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element 
name="OtherCategoriesSimilarProduct" maxOccurs="unbounded">
+                                                       <xs:complexType>
+                                                               <xs:sequence>
+                                                                       
<xs:element name="ASIN" type="xs:string" minOccurs="0"/>
+                                                                       
<xs:element name="Title" type="xs:string" minOccurs="0"/>
+                                                               </xs:sequence>
+                                                       </xs:complexType>
+                                               </xs:element>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="CartItems">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="SubTotal" 
type="tns:Price" minOccurs="0"/>
+                                               <xs:element name="CartItem" 
type="tns:CartItem" maxOccurs="unbounded"/>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="OperationRequest">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element 
ref="tns:HTTPHeaders" minOccurs="0"/>
+                                               <xs:element name="RequestId" 
type="xs:string" minOccurs="0"/>
+                                               <xs:element ref="tns:Arguments" 
minOccurs="0"/>
+                                               <xs:element ref="tns:Errors" 
minOccurs="0"/>
+                                               <xs:element 
name="RequestProcessingTime" type="xs:float" minOccurs="0" maxOccurs="1"/>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="Request">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element 
name="CartGetRequest" type="tns:CartGetRequest" minOccurs="0"/>
+                                               <xs:element 
name="CartAddRequest" type="tns:CartAddRequest" minOccurs="0"/>
+                                               <xs:element 
name="CartCreateRequest" type="tns:CartCreateRequest" minOccurs="0"/>
+                                               <xs:element 
name="CartClearRequest" type="tns:CartClearRequest" minOccurs="0"/>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="Arguments">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="Argument" 
maxOccurs="unbounded">
+                                                       <xs:complexType>
+                                                               <xs:attribute 
name="Name" type="xs:string" use="required"/>
+                                                               <xs:attribute 
name="Value" type="xs:string"/>
+                                                       </xs:complexType>
+                                               </xs:element>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="Errors">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="Error" 
maxOccurs="unbounded">
+                                                       <xs:complexType>
+                                                               <xs:sequence>
+                                                                       
<xs:element name="Code" type="xs:string"/>
+                                                                       
<xs:element name="Message" type="xs:string"/>
+                                                               </xs:sequence>
+                                                       </xs:complexType>
+                                               </xs:element>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="HTTPHeaders">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="Header" 
minOccurs="0" maxOccurs="unbounded">
+                                                       <xs:complexType>
+                                                               <xs:attribute 
name="Name" type="xs:string" use="required"/>
+                                                               <xs:attribute 
name="Value" type="xs:string" use="required"/>
+                                                       </xs:complexType>
+                                               </xs:element>
+                                       </xs:sequence>
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:complexType name="CartItem">
+                               <xs:sequence>
+                                       <xs:element name="CartItemId" 
type="xs:string"/>
+                                       <xs:element name="ASIN" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="ExchangeId" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="MerchantId" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="SellerId" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="SellerNickname" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="Quantity" 
type="xs:string"/>
+                                       <xs:element name="Title" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="ProductGroup" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="ListOwner" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="ListType" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="Price" 
type="tns:Price" minOccurs="0"/>
+                                       <xs:element name="ItemTotal" 
type="tns:Price" minOccurs="0"/>
+                               </xs:sequence>
+                       </xs:complexType>
+                       <xs:complexType name="Price">
+                               <xs:sequence>
+                                       <xs:element name="Amount" 
type="xs:integer" minOccurs="0"/>
+                                       <xs:element name="CurrencyCode" 
type="xs:string" minOccurs="0"/>
+                                       <xs:element name="FormattedPrice" 
type="xs:string"/>
+                               </xs:sequence>
+                       </xs:complexType>
+               </xs:schema>
+       </types>
+       <message name="CartGetRequestMsg">
+               <part name="body" element="tns:CartGet"/>
+       </message>
+       <message name="CartGetResponseMsg">
+               <part name="body" element="tns:CartGetResponse"/>
+       </message>
+       <message name="CartAddRequestMsg">
+               <part name="body" element="tns:CartAdd"/>
+       </message>
+       <message name="CartAddResponseMsg">
+               <part name="body" element="tns:CartAddResponse"/>
+       </message>
+       <message name="CartCreateRequestMsg">
+               <part name="body" element="tns:CartCreate"/>
+       </message>
+       <message name="CartCreateResponseMsg">
+               <part name="body" element="tns:CartCreateResponse"/>
+       </message>
+       <message name="CartClearRequestMsg">
+               <part name="body" element="tns:CartClear"/>
+       </message>
+       <message name="CartClearResponseMsg">
+               <part name="body" element="tns:CartClearResponse"/>
+       </message>
+       <portType name="AmazonCartServicePortType">
+               <operation name="CartGet">
+                       <input message="tns:CartGetRequestMsg"/>
+                       <output message="tns:CartGetResponseMsg"/>
+               </operation>
+               <operation name="CartAdd">
+                       <input message="tns:CartAddRequestMsg"/>
+                       <output message="tns:CartAddResponseMsg"/>
+               </operation>
+               <operation name="CartCreate">
+                       <input message="tns:CartCreateRequestMsg"/>
+                       <output message="tns:CartCreateResponseMsg"/>
+               </operation>
+               <operation name="CartClear">
+                       <input message="tns:CartClearRequestMsg"/>
+                       <output message="tns:CartClearResponseMsg"/>
+               </operation>
+       </portType>
+       <binding name="AmazonCartServiceBinding" 
type="tns:AmazonCartServicePortType">
+               <soap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
+               <operation name="CartGet">
+                       <soap:operation 
soapAction="http://soap.amazon.cart.com"/>
+                       <input>
+                               <soap:body use="literal"/>
+                       </input>
+                       <output>
+                               <soap:body use="literal"/>
+                       </output>
+               </operation>
+               <operation name="CartCreate">
+                       <soap:operation 
soapAction="http://soap.amazon.cart.com"/>
+                       <input>
+                               <soap:body use="literal"/>
+                       </input>
+                       <output>
+                               <soap:body use="literal"/>
+                       </output>
+               </operation>
+               <operation name="CartAdd">
+                       <soap:operation 
soapAction="http://soap.amazon.cart.com"/>
+                       <input>
+                               <soap:body use="literal"/>
+                       </input>
+                       <output>
+                               <soap:body use="literal"/>
+                       </output>
+               </operation>
+               <operation name="CartClear">
+                       <soap:operation 
soapAction="http://soap.amazon.cart.com"/>
+                       <input>
+                               <soap:body use="literal"/>
+                       </input>
+                       <output>
+                               <soap:body use="literal"/>
+                       </output>
+               </operation>
+       </binding>
+       <service name="AmazonCartService">
+               <port name="AmazonCartServicePort" 
binding="tns:AmazonCartServiceBinding">
+                       <soap:address 
location="http://localhost:8080/AmazonCartServiceComponent"/>
+               </port>
+       </service>
+</definitions>

Propchange: 
incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCart.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCartImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCartImpl.java?rev=595351&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCartImpl.java 
(added)
+++ incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCartImpl.java 
Thu Nov 15 08:42:22 2007
@@ -0,0 +1,87 @@
+package amazon.cart;
+
+import org.osoa.sca.annotations.Remotable;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.cart.amazon.*;
+
+
[EMAIL PROTECTED]
+public class AmazonCartImpl {
+
+       protected Map<String, Cart> cartsHash = new HashMap<String, Cart>();
+               
+       public CartCreateResponse CartCreate(CartCreate cartCreate){
+       
+               System.out.println("CartServiceID: " + this.toString());
+               System.out.println("Entering cartCreate...");
+               String userId = cartCreate.getAWSAccessKeyId();
+
+               Cart cart = getCart(userId);
+               if(cart != null){
+                       System.out.println("User " + 
cartCreate.getAWSAccessKeyId() + " has already created a cart with ID: " + 
cart.getCartId());
+                       return null;
+               }
+               cart = new Cart();              
+               cart.setCartItems(new CartItems());             
+               addCart(userId, cart);          
+               
+               System.out.println("Exiting cartCreate...");
+               return null;
+                       
+       }
+       
+       public CartAddResponse CartAdd(CartAdd cartAdd){
+               
+               String userId = cartAdd.getAWSAccessKeyId();
+               
+               Cart cart = getCart(userId);
+               if(cart == null){
+                       System.out.println("User has not associated Cart 
yet...");
+                       return null;
+               }
+               
+               List cartAddRequestList = cartAdd.getRequest();
+               CartAddRequest car = (CartAddRequest) cartAddRequestList.get(0);
+               Items1 carItems = car.getItems();
+               List itemList = carItems.getItem();
+               Item1 item = (Item1) itemList.get(0); //Take only the first 
one, no iteration for now
+               System.out.println("item.getASIN: " + item.getASIN());
+               System.out.println("item.getQuantity(): " + item.getQuantity());
+               CartItems cartItems = cart.getCartItems();
+               List<CartItem> cartItemList = cartItems.getCartItem();
+               cart.setCartItems(cartItems);
+               return null;
+       }
+       
+       public CartClearResponse CartClear(CartClear cartClear){
+               String userId = cartClear.getAWSAccessKeyId();
+               
+               Cart cart = getCart(userId);
+               if(cart == null){
+                       System.out.println("User has not associated Cart 
yet...");
+                       return null;
+               }
+               
+               cart.setCartItems(new CartItems());
+               return null;
+       }
+       
+       public CartGetResponse CartGet(CartGet cartGet){
+               return null;
+       }
+
+       
+       private Cart getCart(String userId){
+               Cart cart = null;
+               cart = this.cartsHash.get(userId);
+               return cart;
+       }
+       
+       private void addCart(String userId, Cart cart){
+               this.cartsHash.put(userId, cart);
+       }
+}

Propchange: 
incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCartImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/tutorial/amazon/amazon/cart/AmazonCartImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/tutorial/amazon/amazoncart.composite
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/amazon/amazoncart.composite?rev=595351&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/amazon/amazoncart.composite (added)
+++ incubator/tuscany/java/sca/tutorial/amazon/amazoncart.composite Thu Nov 15 
08:42:22 2007
@@ -0,0 +1,14 @@
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
+                       targetNamespace="http://amazon.cart.com/";
+                       xmlns:tns="http://amazon.cart.com/";
+           name="AmazonCart">
+    
+    <component name="AmazonCartServiceComponent">
+       <implementation.java class="amazon.cart.AmazonCartImpl" />
+           <service name="AmazonCartService" >
+               <interface.wsdl 
interface="http://amazon.cart.com/#wsdl.interface(AmazonCartServicePortType)" />
+               <binding.ws />
+           </service>
+    </component>
+
+</composite>
\ No newline at end of file

Propchange: incubator/tuscany/java/sca/tutorial/amazon/amazoncart.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/tutorial/amazon/launch/LaunchAmazonCart.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/amazon/launch/LaunchAmazonCart.java?rev=595351&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/amazon/launch/LaunchAmazonCart.java 
(added)
+++ incubator/tuscany/java/sca/tutorial/amazon/launch/LaunchAmazonCart.java Thu 
Nov 15 08:42:22 2007
@@ -0,0 +1,34 @@
+package launch;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.util.SCAContributionUtil;
+
+public class LaunchAmazonCart {
+
+       public static void main(String[] args) throws Exception {
+     
+       System.out.println("Starting ...");
+        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
+        SCANode node = nodeFactory.createSCANode(null, 
"http://localhost:9999";);
+        
+        URL contribution = 
SCAContributionUtil.findContributionFromClass(LaunchAmazonCart.class);
+        node.addContribution("http://amazonCart";, contribution);
+        
+        node.addToDomainLevelComposite(new QName("http://amazonCart";, 
"amazonCart"));
+        node.start();
+
+        System.out.println("amazoncart.composite ready for big business !!!");
+        System.in.read();
+        
+        System.out.println("Stopping ...");
+        node.stop();
+        node.destroy();
+        System.out.println();
+    }
+       
+}

Propchange: 
incubator/tuscany/java/sca/tutorial/amazon/launch/LaunchAmazonCart.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/tutorial/amazon/launch/LaunchAmazonCart.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/tutorial/amazon/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/amazon/pom.xml?rev=595351&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/amazon/pom.xml (added)
+++ incubator/tuscany/java/sca/tutorial/amazon/pom.xml Thu Nov 15 08:42:22 2007
@@ -0,0 +1,188 @@
+<?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>1.1-incubating-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <artifactId>amazon-cart</artifactId>
+    <name>Apache Tuscany SCA Tutorial Amazon Cart</name>
+
+    <dependencies>
+    
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-jetty</artifactId>
+            <version>1.1-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-node-api</artifactId>
+            <version>1.1-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-node-impl</artifactId>
+            <version>1.1-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>1.1-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-axis2</artifactId>
+            <version>1.1-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sdo</groupId>
+            <artifactId>tuscany-sdo-lib</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sdo</groupId>
+            <artifactId>tuscany-sdo-impl</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-databinding-sdo</artifactId>
+            <version>1.1-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.2</version>
+            <scope>compile</scope>
+        </dependency>
+
+    </dependencies>
+    
+    <build>
+       <finalName>${artifactId}</finalName>
+       <sourceDirectory>${basedir}</sourceDirectory>
+       <resources>
+          <resource>
+              <directory>${basedir}</directory>
+              <excludes>
+                  <exclude>**/*.java</exclude>
+                  <exclude>pom.xml</exclude>
+                  <exclude>build.xml</exclude>
+              </excludes>
+          </resource>
+       </resources>
+       <plugins>
+            <plugin>
+                               <groupId>org.apache.tuscany.sdo</groupId>
+                               <artifactId>tuscany-sdo-plugin</artifactId>
+                               <version>1.0-incubating-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <configuration>
+                            
<schemaFile>${basedir}/amazon/cart/AmazonCart.wsdl</schemaFile>
+                            <noNotification>true</noNotification>
+                            <noContainer>true</noContainer>
+                            <noInterfaces>true</noInterfaces>
+                            <noUnsettable>true</noUnsettable>
+                        </configuration>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.tuscany.sca</groupId>
+                <artifactId>tuscany-maven-ant-generator</artifactId>
+                <version>1.1-incubating-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                               <groupId>org.apache.tuscany.sca</groupId>
+                               <artifactId>tuscany-maven-wsdl2java</artifactId>
+                               <version>1.1-incubating-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <configuration>
+                            
<wsdlFile>${basedir}/amazon/cart/AmazonCart.wsdl</wsdlFile>
+                            <javaPackage>amazon.cart.api</javaPackage>
+                        </configuration>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.tuscany.sca</groupId>
+                <artifactId>tuscany-maven-ant-generator</artifactId>
+                <version>1.1-incubating-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <configuration>
+                            <mainClass>launch.LaunchAmazonCart</mainClass>
+                        </configuration>
+                        <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>
+             </plugin>
+       </plugins>
+    </build>
+       
+
+</project>
\ No newline at end of file

Propchange: incubator/tuscany/java/sca/tutorial/amazon/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/tutorial/amazon/test/AmazonCartTestCase.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/amazon/test/AmazonCartTestCase.java?rev=595351&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/amazon/test/AmazonCartTestCase.java 
(added)
+++ incubator/tuscany/java/sca/tutorial/amazon/test/AmazonCartTestCase.java Thu 
Nov 15 08:42:22 2007
@@ -0,0 +1,96 @@
+/*
+ * 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 test;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+
+import launch.LaunchAmazonCart;
+
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.util.SCAContributionUtil;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import amazon.cart.AmazonCart;
+
+import commonj.sdo.DataObject;
+
+/**
+ * Test case for helloworld web service client
+ */
+public class AmazonCartTestCase {
+
+    private SCANode node;
+    private AmazonCart amazonCart;
+
+    @Before
+    public void startClient() throws Exception {
+        try {
+
+            System.out.println("Starting ...");
+            SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
+            node = nodeFactory.createSCANode(null, "http://localhost:9999";);
+            
+            URL contribution = 
SCAContributionUtil.findContributionFromClass(LaunchAmazonCart.class);
+            node.addContribution("http://amazonCart";, contribution);
+            
+            node.addToDomainLevelComposite(new QName("http://amazonCart";, 
"amazonCart"));
+            node.start();
+
+            System.out.println("amazoncart.composite ready for big business 
!!!");
+            
+            amazonCart = node.getDomain().getService(AmazonCart.class, 
"AmazonCartServiceComponent");
+
+        } catch (Throwable e) {
+            e.printStackTrace();
+        }
+    }
+
+    @Test
+    public void testCartCreate() throws Exception {
+        System.out.println("Entering test...");
+        DataObject root = amazonCart.CartCreate(null);
+        // Assert.assertEquals("Hello Smith", msg);
+        System.out.println("Exiting test...");
+    }
+
+    /*
+     * @Test public void testEmbeddedReferenceClient() throws Exception { 
String
+     * msg = helloTuscanyService.getGreetings("Tuscany");
+     * Assert.assertEquals("Hello Tuscany", msg); }
+     */
+
+    @After
+    public void stopClient() throws Exception {
+        System.out.println("Stopping ...");
+        node.stop();
+        node.destroy();
+        System.out.println();
+    }
+
+    /*
+     * public void testCartCreate() throws Exception { DataObject root =
+     * amazonCart.cartCreate(null); //assertNotNull(root);
+     * //assertEquals("Luciano Resende", root.getString("CUSTOMER[1]/NAME")); }
+     */
+}

Propchange: 
incubator/tuscany/java/sca/tutorial/amazon/test/AmazonCartTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/tutorial/amazon/test/AmazonCartTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/tutorial/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/pom.xml?rev=595351&r1=595350&r2=595351&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/pom.xml Thu Nov 15 08:42:22 2007
@@ -41,6 +41,7 @@
                 <module>store</module>
                 <module>store-eu</module>
                 <module>www-cloud</module>
+                <module>amazon</module>
             </modules>
         </profile>
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to