incubator-stonehenge-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From drew...@apache.org
Subject svn commit: r781666 [2/6] - in /incubator/stonehenge/contrib/stocktrader/metro: ./ business_service/ business_service/config/ business_service/etc/ business_service/etc/order_processor/ business_service/lib/ business_service/lib/commons/ business_servi...
Date Thu, 04 Jun 2009 07:04:27 GMT
Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/etc/wsdl0.wsdl
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/etc/wsdl0.wsdl?rev=781666&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/business_service/etc/wsdl0.wsdl (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/business_service/etc/wsdl0.wsdl Thu Jun  4 07:04:21 2009
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions targetNamespace="http://trade.samples.websphere.ibm.com" xmlns:tns="http://trade.samples.websphere.ibm.com" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract">
+  <wsdl:types>
+    <xsd:schema targetNamespace="http://trade.samples.websphere.ibm.com/Imports">
+      <xsd:import namespace="http://trade.samples.websphere.ibm.com" schemaLocation="xsd0.xsd"/>
+      <xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" schemaLocation="xsd1.xsd"/>
+    </xsd:schema>
+  </wsdl:types>
+  <wsdl:message name="ITradeServices_getHolding_InputMessage">
+    <wsdl:part name="parameters" element="tns:getHolding">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_sellEnhanced_OutputMessage">
+    <wsdl:part name="parameters" element="tns:sellEnhancedResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_logout_InputMessage">
+    <wsdl:part name="parameters" element="tns:logout">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getAccountProfileData_InputMessage">
+    <wsdl:part name="parameters" element="tns:getAccountProfileData">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_updateAccountProfile_OutputMessage">
+    <wsdl:part name="parameters" element="tns:updateAccountProfileResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_isOnline_InputMessage">
+    <wsdl:part name="parameters" element="tns:isOnline">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_login_OutputMessage">
+    <wsdl:part name="parameters" element="tns:loginResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_register_InputMessage">
+    <wsdl:part name="parameters" element="tns:register">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getQuote_InputMessage">
+    <wsdl:part name="parameters" element="tns:getQuote">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getAccountData_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getAccountDataResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getClosedOrders_InputMessage">
+    <wsdl:part name="parameters" element="tns:getClosedOrders">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_logout_OutputMessage">
+    <wsdl:part name="parameters" element="tns:logoutResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_sell_InputMessage">
+    <wsdl:part name="parameters" element="tns:sell">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getMarketSummary_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getMarketSummaryResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getClosedOrders_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getClosedOrdersResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_emptyMethodAction_InputMessage">
+    <wsdl:part name="parameters" element="tns:emptyMethodAction">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_sellEnhanced_InputMessage">
+    <wsdl:part name="parameters" element="tns:sellEnhanced">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getMarketSummary_InputMessage">
+    <wsdl:part name="parameters" element="tns:getMarketSummary">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_login_InputMessage">
+    <wsdl:part name="parameters" element="tns:login">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getTopOrders_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getTopOrdersResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getAccountProfileData_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getAccountProfileDataResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_emptyMethodAction_OutputMessage">
+    <wsdl:part name="parameters" element="tns:emptyMethodActionResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getHoldings_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getHoldingsResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getQuote_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getQuoteResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getHoldings_InputMessage">
+    <wsdl:part name="parameters" element="tns:getHoldings">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getTopOrders_InputMessage">
+    <wsdl:part name="parameters" element="tns:getTopOrders">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_register_OutputMessage">
+    <wsdl:part name="parameters" element="tns:registerResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_updateAccountProfile_InputMessage">
+    <wsdl:part name="parameters" element="tns:updateAccountProfile">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getAccountData_InputMessage">
+    <wsdl:part name="parameters" element="tns:getAccountData">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getOrders_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getOrdersResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getHolding_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getHoldingResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getOrders_InputMessage">
+    <wsdl:part name="parameters" element="tns:getOrders">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_buy_InputMessage">
+    <wsdl:part name="parameters" element="tns:buy">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_buy_OutputMessage">
+    <wsdl:part name="parameters" element="tns:buyResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_sell_OutputMessage">
+    <wsdl:part name="parameters" element="tns:sellResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:portType name="ITradeServices">
+    <wsdl:operation name="emptyMethodAction">
+      <wsdl:input message="tns:ITradeServices_emptyMethodAction_InputMessage" wsaw:Action="">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_emptyMethodAction_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/emptyMethodActionResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="isOnline">
+      <wsdl:input message="tns:ITradeServices_isOnline_InputMessage" wsaw:Action="isOnline">
+    </wsdl:input>
+    </wsdl:operation>
+    <wsdl:operation name="login">
+      <wsdl:input message="tns:ITradeServices_login_InputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/login">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_login_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/loginResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getOrders">
+      <wsdl:input message="tns:ITradeServices_getOrders_InputMessage" wsaw:Action="getOrders">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getOrders_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getOrdersResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getAccountData">
+      <wsdl:input message="tns:ITradeServices_getAccountData_InputMessage" wsaw:Action="getAccountData">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getAccountData_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getAccountDataResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getAccountProfileData">
+      <wsdl:input message="tns:ITradeServices_getAccountProfileData_InputMessage" wsaw:Action="getAccountProfileData">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getAccountProfileData_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getAccountProfileDataResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="updateAccountProfile">
+      <wsdl:input message="tns:ITradeServices_updateAccountProfile_InputMessage" wsaw:Action="updateAccountProfile">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_updateAccountProfile_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/updateAccountProfileResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="logout">
+      <wsdl:input message="tns:ITradeServices_logout_InputMessage" wsaw:Action="logout">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_logout_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/logoutResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="buy">
+      <wsdl:input message="tns:ITradeServices_buy_InputMessage" wsaw:Action="buy">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_buy_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/buyResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="sell">
+      <wsdl:input message="tns:ITradeServices_sell_InputMessage" wsaw:Action="sell">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_sell_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/sellResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getHoldings">
+      <wsdl:input message="tns:ITradeServices_getHoldings_InputMessage" wsaw:Action="getHoldings">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getHoldings_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getHoldingsResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="register">
+      <wsdl:input message="tns:ITradeServices_register_InputMessage" wsaw:Action="register">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_register_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/registerResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getClosedOrders">
+      <wsdl:input message="tns:ITradeServices_getClosedOrders_InputMessage" wsaw:Action="getClosedOrders">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getClosedOrders_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getClosedOrdersResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getMarketSummary">
+      <wsdl:input message="tns:ITradeServices_getMarketSummary_InputMessage" wsaw:Action="getMarketSummary">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getMarketSummary_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getMarketSummaryResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getQuote">
+      <wsdl:input message="tns:ITradeServices_getQuote_InputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getQuote">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getQuote_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getQuoteResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getHolding">
+      <wsdl:input message="tns:ITradeServices_getHolding_InputMessage" wsaw:Action="getHolding">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getHolding_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getHoldingResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getTopOrders">
+      <wsdl:input message="tns:ITradeServices_getTopOrders_InputMessage" wsaw:Action="getTopOrders">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getTopOrders_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getTopOrdersResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="sellEnhanced">
+      <wsdl:input message="tns:ITradeServices_sellEnhanced_InputMessage" wsaw:Action="sellEnhanced">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_sellEnhanced_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/sellEnhancedResponse">
+    </wsdl:output>
+    </wsdl:operation>
+  </wsdl:portType>
+</wsdl:definitions>

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/etc/xsd0.xsd
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/etc/xsd0.xsd?rev=781666&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/business_service/etc/xsd0.xsd (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/business_service/etc/xsd0.xsd Thu Jun  4 07:04:21 2009
@@ -0,0 +1,355 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://trade.samples.websphere.ibm.com" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://trade.samples.websphere.ibm.com">
+    <xs:element name="emptyMethodAction">
+        <xs:complexType>
+            <xs:sequence/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="emptyMethodActionResponse">
+        <xs:complexType>
+            <xs:sequence/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="isOnline">
+        <xs:complexType>
+            <xs:sequence/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="login">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="password" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="loginResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="loginReturn" nillable="true" type="tns:AccountDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="AccountDataBean">
+        <xs:sequence>
+            <xs:element minOccurs="0" name="accountID" type="xs:int"/>
+            <xs:element minOccurs="0" name="loginCount" type="xs:int"/>
+            <xs:element minOccurs="0" name="logoutCount" type="xs:int"/>
+            <xs:element minOccurs="0" name="lastLogin" type="xs:dateTime"/>
+            <xs:element minOccurs="0" name="creationDate" type="xs:dateTime"/>
+            <xs:element minOccurs="0" name="balance" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="openBalance" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="profileID" nillable="true" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="AccountDataBean" nillable="true" type="tns:AccountDataBean"/>
+    <xs:complexType name="OrderDataBean">
+        <xs:sequence>
+            <xs:element minOccurs="0" name="orderID" type="xs:int"/>
+            <xs:element minOccurs="0" name="orderType" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="orderStatus" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="openDate" type="xs:dateTime"/>
+            <xs:element minOccurs="0" name="completionDate" type="xs:dateTime"/>
+            <xs:element minOccurs="0" name="quantity" type="xs:double"/>
+            <xs:element minOccurs="0" name="price" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="orderFee" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="symbol" nillable="true" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="OrderDataBean" nillable="true" type="tns:OrderDataBean"/>
+    <xs:element name="getOrders">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getOrdersResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getOrdersReturn" nillable="true" type="tns:ArrayOfOrderDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="ArrayOfOrderDataBean">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="OrderDataBean" nillable="true" type="tns:OrderDataBean"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="ArrayOfOrderDataBean" nillable="true" type="tns:ArrayOfOrderDataBean"/>
+    <xs:element name="getAccountData">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getAccountDataResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getAccountDataReturn" nillable="true" type="tns:AccountDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getAccountProfileData">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getAccountProfileDataResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getAccountProfileDataReturn" nillable="true" type="tns:AccountProfileDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="AccountProfileDataBean">
+        <xs:sequence>
+            <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="password" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="fullName" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="address" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="email" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="creditCard" nillable="true" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="AccountProfileDataBean" nillable="true" type="tns:AccountProfileDataBean"/>
+    <xs:element name="updateAccountProfile">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="profileData" nillable="true" type="tns:AccountProfileDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="updateAccountProfileResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="updateAccountProfileReturn" nillable="true" type="tns:AccountProfileDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="logout">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="logoutResponse">
+        <xs:complexType>
+            <xs:sequence/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="buy">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="symbol" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="quantity" type="xs:double"/>
+                <xs:element minOccurs="0" name="orderProcessingMode" type="xs:int"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="buyResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="buyReturn" nillable="true" type="tns:OrderDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="sell">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="holdingID" type="xs:int"/>
+                <xs:element minOccurs="0" name="orderProcessingMode" type="xs:int"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="sellResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="sellReturn" nillable="true" type="tns:OrderDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="HoldingDataBean">
+        <xs:sequence>
+            <xs:element minOccurs="0" name="holdingID" type="xs:int"/>
+            <xs:element minOccurs="0" name="quantity" type="xs:double"/>
+            <xs:element minOccurs="0" name="purchasePrice" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="purchaseDate" type="xs:dateTime"/>
+            <xs:element minOccurs="0" name="quoteID" nillable="true" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="HoldingDataBean" nillable="true" type="tns:HoldingDataBean"/>
+    <xs:element name="getHoldings">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getHoldingsResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getHoldingsReturn" nillable="true" type="tns:ArrayOfHoldingDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="ArrayOfHoldingDataBean">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="HoldingDataBean" nillable="true" type="tns:HoldingDataBean"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="ArrayOfHoldingDataBean" nillable="true" type="tns:ArrayOfHoldingDataBean"/>
+    <xs:element name="register">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="password" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="fullname" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="address" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="email" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="creditcard" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="openBalance" type="xs:decimal"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="registerResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="registerReturn" nillable="true" type="tns:AccountDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getClosedOrders">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getClosedOrdersResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getClosedOrdersReturn" nillable="true" type="tns:ArrayOfOrderDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="QuoteDataBean">
+        <xs:sequence>
+            <xs:element minOccurs="0" name="symbol" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="companyName" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="price" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="open" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="low" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="high" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="change" type="xs:double"/>
+            <xs:element minOccurs="0" name="volume" type="xs:double"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="QuoteDataBean" nillable="true" type="tns:QuoteDataBean"/>
+    <xs:element name="getMarketSummary">
+        <xs:complexType>
+            <xs:sequence/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getMarketSummaryResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getMarketSummaryReturn" nillable="true" type="tns:MarketSummaryDataBeanWS"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="MarketSummaryDataBeanWS">
+        <xs:sequence>
+            <xs:element minOccurs="0" name="TSIA" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="openTSIA" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="volume" type="xs:double"/>
+            <xs:element minOccurs="0" name="topGainers" nillable="true" type="tns:ArrayOfQuoteDataBean">
+                <xs:annotation>
+                    <xs:appinfo>
+                        <DefaultValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/" EmitDefaultValue="false"/>
+                    </xs:appinfo>
+                </xs:annotation>
+            </xs:element>
+            <xs:element minOccurs="0" name="topLosers" nillable="true" type="tns:ArrayOfQuoteDataBean">
+                <xs:annotation>
+                    <xs:appinfo>
+                        <DefaultValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/" EmitDefaultValue="false"/>
+                    </xs:appinfo>
+                </xs:annotation>
+            </xs:element>
+            <xs:element minOccurs="0" name="summaryDate" type="xs:dateTime"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="MarketSummaryDataBeanWS" nillable="true" type="tns:MarketSummaryDataBeanWS"/>
+    <xs:complexType name="ArrayOfQuoteDataBean">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="QuoteDataBean" nillable="true" type="tns:QuoteDataBean"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="ArrayOfQuoteDataBean" nillable="true" type="tns:ArrayOfQuoteDataBean"/>
+    <xs:element name="getQuote">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="symbol" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getQuoteResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getQuoteReturn" nillable="true" type="tns:QuoteDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getHolding">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="holdingID" type="xs:int"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getHoldingResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getHoldingReturn" nillable="true" type="tns:HoldingDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getTopOrders">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getTopOrdersResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getTopOrdersReturn" nillable="true" type="tns:ArrayOfOrderDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="sellEnhanced">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="holdingID" type="xs:int"/>
+                <xs:element minOccurs="0" name="quantity" type="xs:double"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="sellEnhancedResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="sellEnhancedReturn" nillable="true" type="tns:OrderDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+</xs:schema>

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/etc/xsd1.xsd
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/etc/xsd1.xsd?rev=781666&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/business_service/etc/xsd1.xsd (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/business_service/etc/xsd1.xsd Thu Jun  4 07:04:21 2009
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/">
+    <xs:element name="anyType" nillable="true" type="xs:anyType"/>
+    <xs:element name="anyURI" nillable="true" type="xs:anyURI"/>
+    <xs:element name="base64Binary" nillable="true" type="xs:base64Binary"/>
+    <xs:element name="boolean" nillable="true" type="xs:boolean"/>
+    <xs:element name="byte" nillable="true" type="xs:byte"/>
+    <xs:element name="dateTime" nillable="true" type="xs:dateTime"/>
+    <xs:element name="decimal" nillable="true" type="xs:decimal"/>
+    <xs:element name="double" nillable="true" type="xs:double"/>
+    <xs:element name="float" nillable="true" type="xs:float"/>
+    <xs:element name="int" nillable="true" type="xs:int"/>
+    <xs:element name="long" nillable="true" type="xs:long"/>
+    <xs:element name="QName" nillable="true" type="xs:QName"/>
+    <xs:element name="short" nillable="true" type="xs:short"/>
+    <xs:element name="string" nillable="true" type="xs:string"/>
+    <xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte"/>
+    <xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt"/>
+    <xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong"/>
+    <xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort"/>
+    <xs:element name="char" nillable="true" type="tns:char"/>
+    <xs:simpleType name="char">
+        <xs:restriction base="xs:int"/>
+    </xs:simpleType>
+    <xs:element name="duration" nillable="true" type="tns:duration"/>
+    <xs:simpleType name="duration">
+        <xs:restriction base="xs:duration">
+            <xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
+            <xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
+            <xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:element name="guid" nillable="true" type="tns:guid"/>
+    <xs:simpleType name="guid">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:attribute name="FactoryType" type="xs:QName"/>
+</xs:schema>

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/commons/commons-logging-1.1.1.jar
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/commons/commons-logging-1.1.1.jar?rev=781666&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/commons/commons-logging-1.1.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/log4j/log4j-1.2.15.jar
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/log4j/log4j-1.2.15.jar?rev=781666&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/log4j/log4j-1.2.15.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/metro/webservices-api.jar
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/metro/webservices-api.jar?rev=781666&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/metro/webservices-api.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/metro/webservices-extra-api.jar
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/metro/webservices-extra-api.jar?rev=781666&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/metro/webservices-extra-api.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/metro/webservices-extra.jar
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/metro/webservices-extra.jar?rev=781666&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/metro/webservices-extra.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/metro/webservices-rt.jar
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/metro/webservices-rt.jar?rev=781666&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/metro/webservices-rt.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/metro/webservices-tools.jar
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/metro/webservices-tools.jar?rev=781666&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/metro/webservices-tools.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/mssql/jtds-1.2.2.jar
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/mssql/jtds-1.2.2.jar?rev=781666&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/metro/business_service/lib/mssql/jtds-1.2.2.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomAccountBean.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomAccountBean.java?rev=781666&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomAccountBean.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomAccountBean.java Thu Jun  4 07:04:21 2009
@@ -0,0 +1,69 @@
+/*
+ * 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 org.wso2.stocktrader;
+
+import java.math.BigDecimal;
+import java.util.Calendar;
+
+import com.ibm.websphere.samples.trade.AccountDataBean;
+
+public class CustomAccountBean extends AccountDataBean {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -6368651996080304426L;
+
+	protected String userID;
+
+	public CustomAccountBean() {
+	}
+
+	public CustomAccountBean(AccountDataBean accountDataBean) {
+		setAccountID(accountDataBean.getAccountID());
+		setBalance(accountDataBean.getBalance());
+		setCreationDate(accountDataBean.getCreationDate());
+		setLastLogin(accountDataBean.getLastLogin());
+		setLoginCount(accountDataBean.getLoginCount());
+		setLogoutCount(accountDataBean.getLogoutCount());
+		setOpenBalance(accountDataBean.getOpenBalance());
+	}
+
+	public CustomAccountBean(int accountId, String profileId,
+			Calendar creationDate, BigDecimal openBalance, int logoutCount,
+			BigDecimal balance, Calendar lastLogIn, int loginCount) {
+		setAccountID(accountId);
+		setProfileID(profileId);
+		setCreationDate(creationDate);
+		setOpenBalance(openBalance);
+		setLogoutCount(logoutCount);
+		setBalance(balance);
+		setLastLogin(lastLogIn);
+		setLoginCount(loginCount);
+		setLogoutCount(logoutCount);
+	}
+
+	public String getUserID() {
+		return this.userID;
+	}
+
+	public void setUserID(String userID) {
+		this.userID = userID;
+	}
+
+}

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomAccountProfileBean.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomAccountProfileBean.java?rev=781666&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomAccountProfileBean.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomAccountProfileBean.java Thu Jun  4 07:04:21 2009
@@ -0,0 +1,52 @@
+/*
+ * 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 org.wso2.stocktrader;
+
+import com.ibm.websphere.samples.trade.AccountProfileDataBean;
+
+public class CustomAccountProfileBean extends AccountProfileDataBean {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1485167358537563576L;
+
+	public CustomAccountProfileBean() {
+	}
+
+	public CustomAccountProfileBean(
+			AccountProfileDataBean accountProfileDataBean) {
+		setAddress(accountProfileDataBean.getAddress());
+		setCreditCard(accountProfileDataBean.getCreditCard());
+		setEmail(accountProfileDataBean.getEmail());
+		setFullName(accountProfileDataBean.getFullName());
+		setPassword(accountProfileDataBean.getPassword());
+		setUserID(accountProfileDataBean.getUserID());
+	}
+
+	public CustomAccountProfileBean(String userId, String password,
+			String fullName, String address, String email, String creditcard) {
+		setUserID(userId);
+		setPassword(password);
+		setFullName(fullName);
+		setAddress(address);
+		setEmail(email);
+		setCreditCard(creditcard);
+	}
+
+}

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomHoldingBean.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomHoldingBean.java?rev=781666&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomHoldingBean.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomHoldingBean.java Thu Jun  4 07:04:21 2009
@@ -0,0 +1,83 @@
+/*
+ * 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 org.wso2.stocktrader;
+
+import java.math.BigDecimal;
+import java.util.Calendar;
+
+import com.ibm.websphere.samples.trade.HoldingDataBean;
+
+/**
+ * This class is to be used as the data model for holding information.
+ */
+public class CustomHoldingBean extends HoldingDataBean {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 3294871357941879094L;
+	private int accountID;
+
+	public CustomHoldingBean() {
+	}
+
+	/**
+	 * Constructs a data model instance with holding information.
+	 * 
+	 * @param accountId
+	 *            the account ID of the buyer
+	 * @param holdingID
+	 *            the holding ID of the stock
+	 * @param quantity
+	 *            the quantity of the stock
+	 * @param purchasePrice
+	 *            the purchase price of the stock
+	 * @param purchaseDate
+	 *            the date of the purchase of the stock
+	 * @param quoteID
+	 *            the quote ID of the stock
+	 */
+	public CustomHoldingBean(int accountId, int holdingID, double quantity,
+			BigDecimal purchasePrice, Calendar purchaseDate, String quoteID) {
+		setAccountID(accountId);
+		setHoldingID(holdingID);
+		setQuantity(quantity);
+		setPurchasePrice(purchasePrice);
+		setPurchaseDate(purchaseDate);
+		setQuoteID(quoteID);
+	}
+
+	public CustomHoldingBean(int holdingID, double quantity,
+			BigDecimal purchasePrice, Calendar purchaseDate, String quoteID,
+			int accountID) {
+		setHoldingID(holdingID);
+		setAccountID(accountID);
+		setQuantity(quantity);
+		setPurchasePrice(purchasePrice);
+		setPurchaseDate(purchaseDate);
+		setQuoteID(quoteID);
+	}
+
+	public int getAccountID() {
+		return accountID;
+	}
+
+	public void setAccountID(int accountID) {
+		this.accountID = accountID;
+	}
+}

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomMarketSummaryBean.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomMarketSummaryBean.java?rev=781666&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomMarketSummaryBean.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomMarketSummaryBean.java Thu Jun  4 07:04:21 2009
@@ -0,0 +1,67 @@
+/*
+ * 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 org.wso2.stocktrader;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+import com.ibm.websphere.samples.trade.ArrayOfQuoteDataBean;
+import com.ibm.websphere.samples.trade.MarketSummaryDataBeanWS;
+
+public class CustomMarketSummaryBean extends MarketSummaryDataBeanWS {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 6180349684421231291L;
+
+	public CustomMarketSummaryBean(BigDecimal tSIA, BigDecimal openTSIA,
+			double volume, List<CustomQuoteBean> topGainers,
+			List<CustomQuoteBean> topLosers) {
+		setTSIA(tSIA);
+		setOpenTSIA(openTSIA);
+		setVolume(volume);
+		setTopGainers(topGainers);
+		setTopLosers(topLosers);
+	}
+
+	private void setTopGainers(List<CustomQuoteBean> topGainers) {
+		ArrayOfQuoteDataBean arrayOfQuoteDataBean = new ArrayOfQuoteDataBean();
+        
+        // FIXED: used array for metro generated code
+        arrayOfQuoteDataBean.getQuoteDataBean().addAll(topGainers);
+        
+//        CustomQuoteBean[] qouteBeans = new CustomQuoteBean[topGainers.size()];
+//		qouteBeans = (CustomQuoteBean[]) topGainers.toArray(qouteBeans);
+//		arrayOfQuoteDataBean.setQuoteDataBean(qouteBeans);
+		setTopGainers(arrayOfQuoteDataBean);
+	}
+
+	private void setTopLosers(List<CustomQuoteBean> topLosers) {
+		ArrayOfQuoteDataBean arrayOfQouteDataBean = new ArrayOfQuoteDataBean();
+
+        // FIXED: used array for metro generated code
+        arrayOfQouteDataBean.getQuoteDataBean().addAll(topLosers);
+
+//		CustomQuoteBean[] qouteBeans = new CustomQuoteBean[topLosers.size()];
+//		qouteBeans = (CustomQuoteBean[]) topLosers.toArray(qouteBeans);
+//		arrayOfQouteDataBean.setQuoteDataBean(qouteBeans);
+		setTopLosers(arrayOfQouteDataBean);
+	}
+
+}

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomOrderBean.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomOrderBean.java?rev=781666&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomOrderBean.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomOrderBean.java Thu Jun  4 07:04:21 2009
@@ -0,0 +1,89 @@
+/*
+ * 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 org.wso2.stocktrader;
+
+import java.math.BigDecimal;
+import java.util.Calendar;
+
+import com.ibm.websphere.samples.trade.OrderDataBean;
+
+/**
+ * This class is to be used as the data model for order information.
+ */
+public class CustomOrderBean extends OrderDataBean {
+
+	private static final long serialVersionUID = 5294153874232419015L;
+
+	int accountId;
+	int holdingId;
+
+	public CustomOrderBean(OrderDataBean orderDataBean) {
+		setCompletionDate(orderDataBean.getCompletionDate());
+		setOpenDate(orderDataBean.getOpenDate());
+		setOrderFee(orderDataBean.getOrderFee());
+		setOrderID(orderDataBean.getOrderID());
+		setOrderStatus(orderDataBean.getOrderStatus());
+		setOrderType(orderDataBean.getOrderType());
+		setPrice(orderDataBean.getPrice());
+		setQuantity(orderDataBean.getQuantity());
+		setSymbol(orderDataBean.getSymbol());
+	}
+
+	public CustomOrderBean(int orderId, String orderType, String orderStatus,
+			Calendar openDate, Calendar completionDate, double quantity,
+			BigDecimal price, BigDecimal orderFee, String symbol) {
+		setOrderID(orderId);
+		setOrderType(orderType);
+		setOrderStatus(orderStatus);
+		setOpenDate(openDate);
+		setCompletionDate(completionDate);
+		setQuantity(quantity);
+		setPrice(price);
+		setOrderFee(orderFee);
+		setSymbol(symbol);
+	}
+
+	/**
+	 * Constructs data instance for order information.
+	 * 
+	 * @param accountId
+	 *            the account ID of the buyer or seller
+	 * @param holdingId
+	 *            the ID of corresponding holding of the order
+	 */
+	public CustomOrderBean(int accountId, int holdingId) {
+		this.accountId = accountId;
+		this.holdingId = holdingId;
+	}
+
+	public int getAccountId() {
+		return accountId;
+	}
+
+	public void setAccountId(int accountId) {
+		this.accountId = accountId;
+	}
+
+	public int getHoldingId() {
+		return holdingId;
+	}
+
+	public void setHoldingId(int holdingId) {
+		this.holdingId = holdingId;
+	}
+}

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomQuoteBean.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomQuoteBean.java?rev=781666&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomQuoteBean.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/CustomQuoteBean.java Thu Jun  4 07:04:21 2009
@@ -0,0 +1,62 @@
+/*
+ * 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 org.wso2.stocktrader;
+
+import java.math.BigDecimal;
+
+import com.ibm.websphere.samples.trade.QuoteDataBean;
+
+/**
+ * This class to be used as the data model for quote information.
+ */
+public class CustomQuoteBean extends QuoteDataBean {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 7129349720689180586L;
+
+	public CustomQuoteBean() {
+	}
+
+	/**
+	 * Constructs an instance for quote information.
+	 * 
+	 * @param symbol
+	 * @param companyName
+	 * @param volume
+	 * @param price
+	 * @param open
+	 * @param low
+	 * @param high
+	 * @param change
+	 */
+	public CustomQuoteBean(String symbol, String companyName, double volume,
+			BigDecimal price, BigDecimal open, BigDecimal low, BigDecimal high,
+			double change) {
+		setSymbol(symbol);
+		setCompanyName(companyName);
+		setVolume(volume);
+		setPrice(price);
+		setOpen(open);
+		setLow(low);
+		setHigh(high);
+		setChange(change);
+	}
+
+}

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/CustomerDAO.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/CustomerDAO.java?rev=781666&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/CustomerDAO.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/CustomerDAO.java Thu Jun  4 07:04:21 2009
@@ -0,0 +1,69 @@
+/*
+ * 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 org.wso2.stocktrader.dal;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+import org.wso2.stocktrader.CustomAccountBean;
+import org.wso2.stocktrader.CustomAccountProfileBean;
+import org.wso2.stocktrader.CustomOrderBean;
+import org.wso2.stocktrader.CustomHoldingBean;
+
+public interface CustomerDAO {
+
+	public CustomHoldingBean getHoldingForUpdate(int orderId)
+			throws DAOException;
+
+	public CustomHoldingBean getHolding(String userId, int holdingID)
+			throws DAOException;
+
+	public void updateAccountBalance(int accountId, BigDecimal total)
+			throws DAOException;
+
+	public CustomAccountBean login(String userId, String password)
+			throws DAOException;
+
+	public void logoutUser(String userId) throws DAOException;
+
+	public CustomAccountBean getCustomerByUserId(String userId)
+			throws DAOException;
+
+	public CustomAccountProfileBean getAccountProfileData(String userId)
+			throws DAOException;
+
+	public List<CustomOrderBean> getOrders(String userId, boolean top,
+			int maxTop, int maxDefault) throws DAOException;
+
+	public List<CustomOrderBean> getClosedOrders(String userId)
+			throws DAOException;
+
+	public void insertAccountProfile(CustomAccountProfileBean accountProfileBean)
+			throws DAOException;
+
+	public void insertAccount(CustomAccountBean accountBean)
+			throws DAOException;
+
+	public CustomAccountProfileBean update(
+			CustomAccountProfileBean customAccountProfile) throws DAOException;
+
+	public List<CustomHoldingBean> getHoldings(String userID)
+			throws DAOException;
+
+}

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/DAOException.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/DAOException.java?rev=781666&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/DAOException.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/DAOException.java Thu Jun  4 07:04:21 2009
@@ -0,0 +1,32 @@
+/*
+ * 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 org.wso2.stocktrader.dal;
+
+public class DAOException extends Exception {
+
+	private static final long serialVersionUID = -3206469251941804179L;
+
+	public DAOException(String message) {
+		super(message);
+	}
+
+	public DAOException(String message, Throwable throwable) {
+		super(message, throwable);
+	}
+}

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/DAOFactory.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/DAOFactory.java?rev=781666&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/DAOFactory.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/DAOFactory.java Thu Jun  4 07:04:21 2009
@@ -0,0 +1,39 @@
+/*
+ * 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 org.wso2.stocktrader.dal;
+
+import org.wso2.stocktrader.mssql.MSSQLDAOFactory;
+
+public abstract class DAOFactory {
+	public static final int MS_SQL_FACTORY = 1;
+
+	public abstract CustomerDAO getCustomerDAO() throws DAOException;
+	public abstract MarketSummaryDAO getMarketSummaryDAO() throws DAOException;
+	public abstract OrderDAO getOrderDAO() throws DAOException;
+
+	public static DAOFactory getFacotry(int type) {
+		switch (type) {
+		case MS_SQL_FACTORY:
+			DAOFactory factory = MSSQLDAOFactory.getInstance();
+			return factory;
+		default:
+			throw new IllegalArgumentException("Unknown Database type " + type);
+		}
+	}
+
+}

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/MarketSummaryDAO.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/MarketSummaryDAO.java?rev=781666&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/MarketSummaryDAO.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/MarketSummaryDAO.java Thu Jun  4 07:04:21 2009
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.wso2.stocktrader.dal;
+
+import org.wso2.stocktrader.CustomMarketSummaryBean;
+import org.wso2.stocktrader.CustomQuoteBean;
+
+public interface MarketSummaryDAO {
+
+	public CustomQuoteBean getQuote(String symbol) throws DAOException;
+	
+	public CustomQuoteBean getQuoteForUpdate(String symbol) throws DAOException;
+
+	public void updateStockPriceVolume(double quantity, CustomQuoteBean quote)
+			throws DAOException;
+
+	public CustomMarketSummaryBean getCustomMarketSummary() throws DAOException;
+	
+	 
+
+}

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/OrderDAO.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/OrderDAO.java?rev=781666&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/OrderDAO.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/dal/OrderDAO.java Thu Jun  4 07:04:21 2009
@@ -0,0 +1,55 @@
+/*
+ * 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 org.wso2.stocktrader.dal;
+
+import java.math.BigDecimal;
+
+import org.wso2.stocktrader.CustomHoldingBean;
+import org.wso2.stocktrader.CustomOrderBean;
+import org.wso2.stocktrader.CustomQuoteBean;
+
+public interface OrderDAO {
+
+	public CustomQuoteBean getQuoteForUpdate(String symbol) throws DAOException;
+
+	public int createHolding(CustomOrderBean order) throws DAOException;
+
+	public void updateHolding(int holdingId, double quantity)
+			throws DAOException;
+
+	public void deleteHolding(int holdingId) throws DAOException;
+
+	public CustomHoldingBean getHoldingForUpdate(int orderId)
+			throws DAOException;
+
+	public CustomHoldingBean getHolding(int holdingId) throws DAOException;
+
+	public void updateAccountBalance(int accountId, BigDecimal total)
+			throws DAOException;
+
+	public CustomOrderBean createOrder(String userID, String symbol,
+			String orderType, double quantity, int holdingID)
+			throws DAOException;
+
+	public void updateOrder(CustomOrderBean order) throws DAOException;
+
+	public void updateStockPriceVolume(double quantity, CustomQuoteBean quote)
+			throws DAOException;
+
+	public void closeOrder(CustomOrderBean order) throws DAOException;
+}

Added: incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/mssql/AbstractMSSQLDAO.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/mssql/AbstractMSSQLDAO.java?rev=781666&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/mssql/AbstractMSSQLDAO.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/business_service/src/org/wso2/stocktrader/mssql/AbstractMSSQLDAO.java Thu Jun  4 07:04:21 2009
@@ -0,0 +1,87 @@
+/*
+ * 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 org.wso2.stocktrader.mssql;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.stocktrader.dal.DAOException;
+
+public class AbstractMSSQLDAO {
+
+	private static final Log logger = LogFactory.getLog(AbstractMSSQLDAO.class);
+
+	protected Connection sqlConnection;
+
+	private int previousTransactionIsolation;
+
+	public AbstractMSSQLDAO(Connection sqlConnection) throws DAOException {
+		this.sqlConnection = sqlConnection;
+	}
+
+	public void beginTransaction() throws DAOException {
+		logger.debug("AbstractMSSQLDAO.beginTransaction()");
+		try {
+			sqlConnection.setAutoCommit(false);
+			previousTransactionIsolation = sqlConnection
+					.getTransactionIsolation();
+			sqlConnection
+					.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
+		} catch (SQLException e) {
+			e.printStackTrace();
+			logger.debug("", e);
+			throw new DAOException(
+					"Exception was thrown during the start of transaction", e);
+		}
+	}
+
+	public void commitTransaction() throws DAOException {
+		logger.debug("AbstractMSSQLDAO.commitTransaction()");
+		try {
+			sqlConnection.commit();
+			sqlConnection.setAutoCommit(true);
+			sqlConnection.setTransactionIsolation(previousTransactionIsolation);
+		} catch (SQLException e) {
+			throw new DAOException(
+					"Exception is thrown during the commit of transaction", e);
+		}
+	}
+
+	public void rollbackTransaction() throws DAOException {
+		logger.debug("AbstractMSSQLDAO.rollbackTransaction()");
+		try {
+			sqlConnection.rollback();
+			sqlConnection.setAutoCommit(true);
+			sqlConnection.setTransactionIsolation(previousTransactionIsolation);
+		} catch (SQLException e) {
+			throw new DAOException(
+					"Exception is thrown during the rollback of transaction", e);
+
+		}
+	}
+
+	public void close() throws DAOException {
+		try {
+			sqlConnection.close();
+		} catch (SQLException e) {
+			throw new DAOException("", e);
+		}
+	}
+}



Mime
View raw message