You are viewing a plain text version of this content. The canonical link for it is here.
Posted to stonehenge-commits@incubator.apache.org by be...@apache.org on 2009/09/05 16:41:19 UTC

svn commit: r811675 [6/9] - in /incubator/stonehenge/trunk: ./ stocktrader/metro/ stocktrader/metro/business_service/ stocktrader/metro/business_service/etc/ stocktrader/metro/business_service/src/ stocktrader/metro/business_service/src/org/ stocktrade...

Added: incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/OrderProcessor.wsdl
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/OrderProcessor.wsdl?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/OrderProcessor.wsdl (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/OrderProcessor.wsdl Sat Sep  5 16:41:14 2009
@@ -0,0 +1,351 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions name="OrderProcessor" targetNamespace="http://tempuri.org/"
+                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+                  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+                  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+                  xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/"
+                  xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
+                  xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:i0="http://Trade.TraderOrderHost"
+                  xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
+                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+                  xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
+                  xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
+                  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+                  xmlns:wsa10="http://www.w3.org/2005/08/addressing"
+                  xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
+    <wsp:Policy wsu:Id="WSHttpBinding_OrderProcessorService_policy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                    <wsp:Policy>
+                        <sp:ProtectionToken>
+                            <wsp:Policy>
+                                <sp:SecureConversationToken
+                                        sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+                                    <wsp:Policy>
+                                        <sp:RequireDerivedKeys/>
+                                        <sp:BootstrapPolicy>
+                                            <wsp:Policy>
+                                                <sp:SignedParts>
+                                                    <sp:Body/>
+                                                    <sp:Header Name="To"
+                                                               Namespace="http://www.w3.org/2005/08/addressing"/>
+                                                    <sp:Header Name="From"
+                                                               Namespace="http://www.w3.org/2005/08/addressing"/>
+                                                    <sp:Header Name="FaultTo"
+                                                               Namespace="http://www.w3.org/2005/08/addressing"/>
+                                                    <sp:Header Name="ReplyTo"
+                                                               Namespace="http://www.w3.org/2005/08/addressing"/>
+                                                    <sp:Header Name="MessageID"
+                                                               Namespace="http://www.w3.org/2005/08/addressing"/>
+                                                    <sp:Header Name="RelatesTo"
+                                                               Namespace="http://www.w3.org/2005/08/addressing"/>
+                                                    <sp:Header Name="Action"
+                                                               Namespace="http://www.w3.org/2005/08/addressing"/>
+                                                </sp:SignedParts>
+                                                <sp:EncryptedParts>
+                                                    <sp:Body/>
+                                                </sp:EncryptedParts>
+                                                <sp:SymmetricBinding>
+                                                    <wsp:Policy>
+                                                        <sp:ProtectionToken>
+                                                            <wsp:Policy>
+                                                                <mssp:SslContextToken
+                                                                        sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"
+                                                                        xmlns:mssp="http://schemas.microsoft.com/ws/2005/07/securitypolicy">
+                                                                    <wsp:Policy>
+                                                                        <sp:RequireDerivedKeys/>
+                                                                        <mssp:RequireClientCertificate/>
+                                                                    </wsp:Policy>
+                                                                </mssp:SslContextToken>
+                                                            </wsp:Policy>
+                                                        </sp:ProtectionToken>
+                                                        <sp:AlgorithmSuite>
+                                                            <wsp:Policy>
+                                                                <sp:Basic256/>
+                                                            </wsp:Policy>
+                                                        </sp:AlgorithmSuite>
+                                                        <sp:Layout>
+                                                            <wsp:Policy>
+                                                                <sp:Strict/>
+                                                            </wsp:Policy>
+                                                        </sp:Layout>
+                                                        <sp:IncludeTimestamp/>
+                                                        <sp:EncryptSignature/>
+                                                        <sp:OnlySignEntireHeadersAndBody/>
+                                                    </wsp:Policy>
+                                                </sp:SymmetricBinding>
+                                                <sp:Wss11>
+                                                    <wsp:Policy>
+                                                        <sp:MustSupportRefKeyIdentifier/>
+                                                        <sp:MustSupportRefIssuerSerial/>
+                                                        <sp:MustSupportRefThumbprint/>
+                                                        <sp:MustSupportRefEncryptedKey/>
+                                                    </wsp:Policy>
+                                                </sp:Wss11>
+                                                <sp:Trust10>
+                                                    <wsp:Policy>
+                                                        <sp:MustSupportIssuedTokens/>
+                                                        <sp:RequireClientEntropy/>
+                                                        <sp:RequireServerEntropy/>
+                                                    </wsp:Policy>
+                                                </sp:Trust10>
+                                            </wsp:Policy>
+                                        </sp:BootstrapPolicy>
+                                    </wsp:Policy>
+                                </sp:SecureConversationToken>
+                            </wsp:Policy>
+                        </sp:ProtectionToken>
+                        <sp:AlgorithmSuite>
+                            <wsp:Policy>
+                                <sp:Basic256/>
+                            </wsp:Policy>
+                        </sp:AlgorithmSuite>
+                        <sp:Layout>
+                            <wsp:Policy>
+                                <sp:Strict/>
+                            </wsp:Policy>
+                        </sp:Layout>
+                        <sp:IncludeTimestamp/>
+                        <sp:EncryptSignature/>
+                        <sp:OnlySignEntireHeadersAndBody/>
+                    </wsp:Policy>
+                </sp:SymmetricBinding>
+                <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                    <wsp:Policy>
+                        <sp:MustSupportRefKeyIdentifier/>
+                        <sp:MustSupportRefIssuerSerial/>
+                        <sp:MustSupportRefThumbprint/>
+                        <sp:MustSupportRefEncryptedKey/>
+                    </wsp:Policy>
+                </sp:Wss11>
+                <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                    <wsp:Policy>
+                        <sp:MustSupportIssuedTokens/>
+                        <sp:RequireClientEntropy/>
+                        <sp:RequireServerEntropy/>
+                    </wsp:Policy>
+                </sp:Trust10>
+                <wsaw:UsingAddressing/>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+    <wsp:Policy wsu:Id="WSHttpBinding_OrderProcessorService_SubmitOrder_Input_policy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                    <sp:Body/>
+                    <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/>
+                </sp:SignedParts>
+                <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                    <sp:Body/>
+                </sp:EncryptedParts>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+    <wsp:Policy wsu:Id="WSHttpBinding_OrderProcessorService_isOnline_Input_policy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                    <sp:Body/>
+                    <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/>
+                </sp:SignedParts>
+                <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                    <sp:Body/>
+                </sp:EncryptedParts>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+    <wsp:Policy wsu:Id="CustomBinding_OrderProcessorService_policy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                    <wsp:Policy>
+                        <sp:ProtectionToken>
+                            <wsp:Policy>
+                                <sp:X509Token
+                                        sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+                                    <wsp:Policy>
+                                        <sp:RequireThumbprintReference/>
+                                        <sp:WssX509V3Token10/>
+                                    </wsp:Policy>
+                                </sp:X509Token>
+                            </wsp:Policy>
+                        </sp:ProtectionToken>
+                        <sp:AlgorithmSuite>
+                            <wsp:Policy>
+                                <sp:Basic256/>
+                            </wsp:Policy>
+                        </sp:AlgorithmSuite>
+                        <sp:Layout>
+                            <wsp:Policy>
+                                <sp:Lax/>
+                            </wsp:Policy>
+                        </sp:Layout>
+                        <sp:IncludeTimestamp/>
+                        <sp:OnlySignEntireHeadersAndBody/>
+                    </wsp:Policy>
+                </sp:SymmetricBinding>
+                <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                    <wsp:Policy>
+                        <sp:MustSupportRefKeyIdentifier/>
+                        <sp:MustSupportRefIssuerSerial/>
+                        <sp:MustSupportRefThumbprint/>
+                        <sp:MustSupportRefEncryptedKey/>
+                        <sp:RequireSignatureConfirmation/>
+                    </wsp:Policy>
+                </sp:Wss11>
+                <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                    <wsp:Policy>
+                        <sp:MustSupportIssuedTokens/>
+                        <sp:RequireClientEntropy/>
+                        <sp:RequireServerEntropy/>
+                    </wsp:Policy>
+                </sp:Trust10>
+                <wsaw:UsingAddressing/>
+
+                <sc:KeyStore xmlns:sc="http://schemas.sun.com/2006/03/wss/server" visibility="private" alias="mykey" storepass="changeit" type="JKS" location="server-keystore.jks"/>
+                <sc:TrustStore xmlns:sc="http://schemas.sun.com/2006/03/wss/server" visibility="private" peeralias="mykey" storepass="changeit" type="JKS" location="server-truststore.jks"/>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+    <wsp:Policy wsu:Id="CustomBinding_OrderProcessorService_SubmitOrder_Input_policy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                    <sp:Body/>
+                    <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/>
+                </sp:SignedParts>
+                <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                    <sp:Body/>
+                </sp:EncryptedParts>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+    <wsp:Policy wsu:Id="CustomBinding_OrderProcessorService_isOnline_Input_policy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                    <sp:Body/>
+                    <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/>
+                </sp:SignedParts>
+                <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                    <sp:Body/>
+                </sp:EncryptedParts>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+    <wsdl:import namespace="http://Trade.TraderOrderHost"
+                 location="wsdl0.wsdl"/>
+    <wsdl:types/>
+    <wsdl:binding name="BasicHttpBinding_OrderProcessorService" type="i0:OrderProcessorService">
+        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="SubmitOrder">
+            <soap:operation soapAction="SubmitOrder" style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+        <wsdl:operation name="isOnline">
+            <soap:operation soapAction="isOnline" style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="WSHttpBinding_OrderProcessorService" type="i0:OrderProcessorService">
+        <wsp:PolicyReference URI="#WSHttpBinding_OrderProcessorService_policy"/>
+        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="SubmitOrder">
+            <soap12:operation soapAction="SubmitOrder" style="document"/>
+            <wsdl:input>
+                <wsp:PolicyReference URI="#WSHttpBinding_OrderProcessorService_SubmitOrder_Input_policy"/>
+                <soap12:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+        <wsdl:operation name="isOnline">
+            <soap12:operation soapAction="isOnline" style="document"/>
+            <wsdl:input>
+                <wsp:PolicyReference URI="#WSHttpBinding_OrderProcessorService_isOnline_Input_policy"/>
+                <soap12:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="CustomBinding_OrderProcessorService" type="i0:OrderProcessorService">
+        <wsp:PolicyReference URI="#CustomBinding_OrderProcessorService_policy"/>
+        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="SubmitOrder">
+            <soap12:operation soapAction="SubmitOrder" style="document"/>
+            <wsdl:input>
+                <wsp:PolicyReference URI="#CustomBinding_OrderProcessorService_SubmitOrder_Input_policy"/>
+                <soap12:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+        <wsdl:operation name="isOnline">
+            <soap12:operation soapAction="isOnline" style="document"/>
+            <wsdl:input>
+                <wsp:PolicyReference URI="#CustomBinding_OrderProcessorService_isOnline_Input_policy"/>
+                <soap12:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="OrderProcessor">
+        <wsdl:port name="BasicHttpBinding_OrderProcessorService" binding="tns:BasicHttpBinding_OrderProcessorService">
+            <soap:address location="http://stocktrader:8000/tradeorderprocessor"/>
+        </wsdl:port>
+        <wsdl:port name="WSHttpBinding_OrderProcessorService" binding="tns:WSHttpBinding_OrderProcessorService">
+            <soap12:address location="http://stocktrader:8000/tradeorderprocessor/msec"/>
+            <wsa10:EndpointReference>
+                <wsa10:Address>http://stocktrader:8000/tradeorderprocessor/msec</wsa10:Address>
+                <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
+                    <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
+                        <X509Data>
+                            <X509Certificate>
+                                MIIB8DCCAVmgAwIBAgIQ1ELWkagtIaZA+rGlQ0DB/DANBgkqhkiG9w0BAQQFADASMRAwDgYDVQQDEwdPUFMuQ29tMB4XDTA4MDUyMTA0NDUwMVoXDTM5MTIzMTIzNTk1OVowEjEQMA4GA1UEAxMHT1BTLkNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAxwk9moHNb3pwAFdolsVrNRCypa9MAH9NOblGJRW6av93sC5oubfjbzfIgURycVgOYoI/6G3AZijENC//tR8CiNuwfc338j4gGJCYQMKF80f0v+wsOChbWA/jSMmW0XeZ2mtn28kUzZwBN+auK+iUurYmUfZlNCIzLrM49KKqLRMCAwEAAaNHMEUwQwYDVR0BBDwwOoAQGGhusN6c4j/7WSnvieRMbKEUMBIxEDAOBgNVBAMTB09QUy5Db22CENRC1pGoLSGmQPqxpUNAwfwwDQYJKoZIhvcNAQEEBQADgYEAZ8xVxioCvG8t8iCx5Xy7JgUyGVnTgxVhP3+uMGSca0u1wqnfoPethXkykPkCP5ZEYSS5SoBLdCKhn1HqICdTBkR2m0ebo50CoXT1lAy+5MELdzlR8SH9KV6nokwCPAW3RURk1huaDi3FO1oFDVm6146rAByZrG/PjDe3w+MUaHg=
+                            </X509Certificate>
+                        </X509Data>
+                    </KeyInfo>
+                </Identity>
+            </wsa10:EndpointReference>
+        </wsdl:port>
+        <wsdl:port name="CustomBinding_OrderProcessorService" binding="tns:CustomBinding_OrderProcessorService">
+            <soap12:address location="http://stocktrader:8000/tradeorderprocessor/sec"/>
+            <wsa10:EndpointReference>
+                <wsa10:Address>http://stocktrader:8000/tradeorderprocessor/sec</wsa10:Address>
+                <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
+                    <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
+                        <X509Data>
+                            <X509Certificate>
+                                MIIB8DCCAVmgAwIBAgIQ1ELWkagtIaZA+rGlQ0DB/DANBgkqhkiG9w0BAQQFADASMRAwDgYDVQQDEwdPUFMuQ29tMB4XDTA4MDUyMTA0NDUwMVoXDTM5MTIzMTIzNTk1OVowEjEQMA4GA1UEAxMHT1BTLkNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAxwk9moHNb3pwAFdolsVrNRCypa9MAH9NOblGJRW6av93sC5oubfjbzfIgURycVgOYoI/6G3AZijENC//tR8CiNuwfc338j4gGJCYQMKF80f0v+wsOChbWA/jSMmW0XeZ2mtn28kUzZwBN+auK+iUurYmUfZlNCIzLrM49KKqLRMCAwEAAaNHMEUwQwYDVR0BBDwwOoAQGGhusN6c4j/7WSnvieRMbKEUMBIxEDAOBgNVBAMTB09QUy5Db22CENRC1pGoLSGmQPqxpUNAwfwwDQYJKoZIhvcNAQEEBQADgYEAZ8xVxioCvG8t8iCx5Xy7JgUyGVnTgxVhP3+uMGSca0u1wqnfoPethXkykPkCP5ZEYSS5SoBLdCKhn1HqICdTBkR2m0ebo50CoXT1lAy+5MELdzlR8SH9KV6nokwCPAW3RURk1huaDi3FO1oFDVm6146rAByZrG/PjDe3w+MUaHg=
+                            </X509Certificate>
+                        </X509Data>
+                    </KeyInfo>
+                </Identity>
+            </wsa10:EndpointReference>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

Added: incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/custom-jaxbbean.xml
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/custom-jaxbbean.xml?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/custom-jaxbbean.xml (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/custom-jaxbbean.xml Sat Sep  5 16:41:14 2009
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License").  You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code.  If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license."  If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above.  However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+
+
+<jaxws:bindings
+        xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        wsdlLocation="wsdl0.wsdl">
+
+    <jaxws:bindings node="wsdl:definitions">
+        <jaxb:bindings node="//xsd:schema">
+            <jaxb:globalBindings generateElementProperty="false">
+				<jaxb:javaType name="java.util.Calendar" xmlType="xsd:dateTime" parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime" printMethod="javax.xml.bind.DatatypeConverter.printDateTime"/>
+				<jaxb:javaType name="java.util.Calendar" xmlType="xsd:date" parseMethod="javax.xml.bind.DatatypeConverter.parseDate" printMethod="javax.xml.bind.DatatypeConverter.printDate"/>
+			</jaxb:globalBindings>
+        </jaxb:bindings>
+    </jaxws:bindings>
+
+</jaxws:bindings>

Added: incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/custom-sei.xml
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/custom-sei.xml?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/custom-sei.xml (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/custom-sei.xml Sat Sep  5 16:41:14 2009
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License").  You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code.  If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license."  If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above.  However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+
+
+<bindings
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        wsdlLocation="OrderProcessor.wsdl"
+        xmlns="http://java.sun.com/xml/ns/jaxws">
+    <enableWrapperStyle>false</enableWrapperStyle>
+
+</bindings>

Added: incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/wsdl0.wsdl
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/wsdl0.wsdl?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/wsdl0.wsdl (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/wsdl0.wsdl Sat Sep  5 16:41:14 2009
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions targetNamespace="http://Trade.TraderOrderHost" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+                  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+                  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+                  xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://Trade.TraderOrderHost"
+                  xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
+                  xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+                  xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
+                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+                  xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
+                  xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
+                  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+                  xmlns:wsa10="http://www.w3.org/2005/08/addressing"
+                  xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
+    <wsdl:types>
+        <xsd:schema targetNamespace="http://Trade.TraderOrderHost/Imports">
+            <xsd:import schemaLocation="xsd0.xsd"
+                        namespace="http://Trade.TraderOrderHost"/>
+            <xsd:import schemaLocation="xsd1.xsd"
+                        namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
+            <xsd:import schemaLocation="xsd2.xsd"
+                        namespace="http://trade.samples.websphere.ibm.com"/>
+        </xsd:schema>
+    </wsdl:types>
+    <wsdl:message name="OrderProcessorService_SubmitOrder_InputMessage">
+        <wsdl:part name="parameters" element="tns:SubmitOrder"/>
+    </wsdl:message>
+    <wsdl:message name="OrderProcessorService_isOnline_InputMessage">
+        <wsdl:part name="parameters" element="tns:isOnline"/>
+    </wsdl:message>
+    <wsdl:portType name="OrderProcessorService">
+        <wsdl:operation name="SubmitOrder">
+            <wsdl:input wsaw:Action="SubmitOrder" message="tns:OrderProcessorService_SubmitOrder_InputMessage"/>
+        </wsdl:operation>
+        <wsdl:operation name="isOnline">
+            <wsdl:input wsaw:Action="isOnline" message="tns:OrderProcessorService_isOnline_InputMessage"/>
+        </wsdl:operation>
+    </wsdl:portType>
+</wsdl:definitions>
\ No newline at end of file

Added: incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/xsd0.xsd
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/xsd0.xsd?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/xsd0.xsd (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/xsd0.xsd Sat Sep  5 16:41:14 2009
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xs:schema elementFormDefault="qualified" targetNamespace="http://Trade.TraderOrderHost"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://Trade.TraderOrderHost">
+    <xs:import schemaLocation="xsd2.xsd"
+               namespace="http://trade.samples.websphere.ibm.com"/>
+    <xs:element name="SubmitOrder">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="order" nillable="true" type="q1:OrderDataBean"
+                            xmlns:q1="http://trade.samples.websphere.ibm.com"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="isOnline">
+        <xs:complexType>
+            <xs:sequence/>
+        </xs:complexType>
+    </xs:element>
+</xs:schema>
\ No newline at end of file

Added: incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/xsd1.xsd
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/xsd1.xsd?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/xsd1.xsd (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/xsd1.xsd Sat Sep  5 16:41:14 2009
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified"
+           targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="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:attribute name="Id" type="xs:ID"/>
+    <xs:attribute name="Ref" type="xs:IDREF"/>
+</xs:schema>
\ No newline at end of file

Added: incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/xsd2.xsd
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/xsd2.xsd?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/xsd2.xsd (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/xsd2.xsd Sat Sep  5 16:41:14 2009
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xs:schema elementFormDefault="qualified" targetNamespace="http://trade.samples.websphere.ibm.com"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://trade.samples.websphere.ibm.com">
+    <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:schema>
\ No newline at end of file

Added: incubator/stonehenge/trunk/stocktrader/metro/order_processor/build.xml
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/order_processor/build.xml?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/order_processor/build.xml (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/order_processor/build.xml Sat Sep  5 16:41:14 2009
@@ -0,0 +1,97 @@
+<project basedir="." default="war" name="order_processor">
+    <import file="../etc/as.xml"/>
+
+    <property name="src.dir" value="${basedir}/src"/>
+    <property name="build.home" value="${basedir}/build"/>
+    <property name="build.classes.home" value="${build.home}/classes"/>
+    <property name="build.war.home" value="${build.home}/war"/>
+    <property name="war.name" value="${ant.project.name}.war"/>
+    <property name="war.file" value="${build.war.home}/${war.name}"/>
+    <property name="lib.home" value="${basedir}/../lib"/>
+    <property name="lib.metro.home" value="${lib.home}/metro"/>
+    <property name="deploy.war" value="${deploy.dir}/${war.name}"/>
+    <property name="server.keystore" value="${basedir}/etc/server-keystore.jks"/>
+    <property name="server.truststore" value="${basedir}/etc/server-truststore.jks"/>
+
+    <path id="metro.classpath">
+        <pathelement location="${java.home}/../lib/tools.jar"/>
+        <fileset dir="${lib.metro.home}">
+            <include name="*.jar"/>
+        </fileset>
+    </path>
+
+    <path id="all.classpath">
+        <fileset dir="${lib.home}">
+            <include name="**/*.jar"/>
+        </fileset>
+    </path>
+
+    <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
+        <classpath refid="metro.classpath"/>
+    </taskdef>
+
+    <target name="setup" depends="clean">
+        <mkdir dir="${build.home}"/>
+        <mkdir dir="${build.classes.home}"/>
+        <mkdir dir="${build.war.home}"/>
+    </target>
+
+    <target name="clean">
+        <delete dir="${build.home}" includeEmptyDirs="true"/>
+    </target>
+    
+    <target name="import-ws" depends="setup">
+        <wsimport
+                debug="${debug}"
+                verbose="${verbose}"
+                keep="${keep}"
+                destdir="${build.classes.home}"
+                wsdl="${order.processor.wsdl}"
+                extension="true">
+            <binding dir="${order.processor.binding.dir}" includes="${order.processor.binding}"/>
+            <xjcarg value="-extension"/>
+        </wsimport>
+    </target>
+
+    <target name="build" depends="import-ws">
+        <copy todir="${build.classes.home}">
+            <fileset dir="../resources/conf" includes="*.properties"/>
+        </copy>
+        <javac
+                fork="true"
+                srcdir="${src.dir}"
+                destdir="${build.classes.home}">
+            <classpath refid="all.classpath"/>
+        </javac>
+    </target>
+
+    <target name="war" depends="build">
+        <war warfile="${war.file}" webxml="etc/web.xml">
+            <webinf dir="${basedir}/etc" includes="sun-jaxws.xml"/>
+            <zipfileset
+                    dir="${order.processor.binding.dir}"
+                    includes="*.wsdl, *.xsd"
+                    prefix="WEB-INF/wsdl"/>
+            <classes dir="${build.classes.home}"/>
+            <lib dir="${lib.home}/commons"/>
+            <lib dir="${lib.home}/log4j"/>
+            <lib dir="${lib.home}/mssql"/>
+            <lib dir="${lib.home}/mysql"/>
+        </war>
+    </target>
+
+    <target name="deploy-keystore">
+        <copy file="${server.keystore}" todir="${keystore.dir}"/>
+        <copy file="${server.truststore}" todir="${keystore.dir}"/>
+    </target>
+
+    <target name="deploy" depends="war, deploy-keystore">
+        <copy file="${war.file}" tofile="${deploy.war}"/>
+    </target>
+
+    <target name="undeploy">
+        <delete file="${deploy.dir}/${war.name}"/>
+    </target>
+
+    <target name="redeploy" depends="undeploy, deploy"/>
+</project>

Added: incubator/stonehenge/trunk/stocktrader/metro/order_processor/etc/server-keystore.jks
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/order_processor/etc/server-keystore.jks?rev=811675&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/trunk/stocktrader/metro/order_processor/etc/server-keystore.jks
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/trunk/stocktrader/metro/order_processor/etc/server-truststore.jks
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/order_processor/etc/server-truststore.jks?rev=811675&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/trunk/stocktrader/metro/order_processor/etc/server-truststore.jks
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/trunk/stocktrader/metro/order_processor/etc/sun-jaxws.xml
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/order_processor/etc/sun-jaxws.xml?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/order_processor/etc/sun-jaxws.xml (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/order_processor/etc/sun-jaxws.xml Sat Sep  5 16:41:14 2009
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License").  You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code.  If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license."  If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above.  However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+
+
+<endpoints xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime" version="2.0">
+    <endpoint 
+        name="OrderProcessorSec"
+        interface="org.tempuri.OrderProcessorService"
+        implementation="org.apache.stonehenge.stocktrader.service.OrderProcessorImpl"
+        wsdl="OrderProcessor.wsdl"
+        service="{http://tempuri.org/}OrderProcessor"
+        port="{http://tempuri.org/}CustomBinding_OrderProcessorService"
+        url-pattern="/OrderProcessorSec"
+        binding="http://www.w3.org/2003/05/soap/bindings/HTTP/" />
+
+    <endpoint
+        name="OrderProcessor"
+        interface="org.tempuri.OrderProcessorService"
+        implementation="org.apache.stonehenge.stocktrader.service.OrderProcessorImpl"
+        wsdl="OrderProcessor.wsdl"
+        service="{http://tempuri.org/}OrderProcessor"
+        port="{http://tempuri.org/}BasicHttpBinding_OrderProcessorService"
+        url-pattern="/OrderProcessor"/>
+
+</endpoints>

Added: incubator/stonehenge/trunk/stocktrader/metro/order_processor/etc/web.xml
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/order_processor/etc/web.xml?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/order_processor/etc/web.xml (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/order_processor/etc/web.xml Sat Sep  5 16:41:14 2009
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ 
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+ 
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License").  You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
+ language governing permissions and limitations under the License.
+ 
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code.  If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+ 
+ Contributor(s):
+ 
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license."  If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above.  However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+
+<web-app version="2.4" mlns="http://java.sun.com/xml/ns/j2ee">
+  <display-name>wsit-jaxws-fromwsdl</display-name>
+  <description>wsit-jaxws-fromwsdl</description>
+  <listener>
+    <listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
+  </listener>
+  <servlet>
+    <servlet-name>stocktrader</servlet-name>
+    <display-name>stocktrader</display-name>
+    <description>stocktrader endpoint</description>
+    <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
+    <load-on-startup>1</load-on-startup>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>stocktrader</servlet-name>
+    <url-pattern>/OrderProcessor</url-pattern>
+  </servlet-mapping>
+  <servlet-mapping>
+    <servlet-name>stocktrader</servlet-name>
+    <url-pattern>/OrderProcessorSec</url-pattern>
+  </servlet-mapping>
+  <session-config>
+    <session-timeout>60</session-timeout>
+  </session-config>
+</web-app>

Added: incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/CustomHoldingBean.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/CustomHoldingBean.java?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/CustomHoldingBean.java (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/CustomHoldingBean.java Sat Sep  5 16:41:14 2009
@@ -0,0 +1,126 @@
+/*
+ * 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.apache.stonehenge.stocktrader;
+
+import java.math.BigDecimal;
+import java.util.Calendar;
+
+/**
+ * This class is to be used as the data model for holding information.
+ */
+public class CustomHoldingBean {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 3294871357941879094L;
+	private int accountID;
+    private int holdingID;
+    private double quantity;
+    private BigDecimal purchasePrice;
+    private Calendar purchaseDate;
+    private String quoteID;
+
+	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;
+	}
+
+    public int getHoldingID() {
+        return holdingID;
+    }
+
+    public void setHoldingID(int holdingID) {
+        this.holdingID = holdingID;
+    }
+
+    public double getQuantity() {
+        return quantity;
+    }
+
+    public void setQuantity(double quantity) {
+        this.quantity = quantity;
+    }
+
+    public BigDecimal getPurchasePrice() {
+        return purchasePrice;
+    }
+
+    public void setPurchasePrice(BigDecimal purchasePrice) {
+        this.purchasePrice = purchasePrice;
+    }
+
+    public Calendar getPurchaseDate() {
+        return purchaseDate;
+    }
+
+    public void setPurchaseDate(Calendar purchaseDate) {
+        this.purchaseDate = purchaseDate;
+    }
+
+    public String getQuoteID() {
+        return quoteID;
+    }
+
+    public void setQuoteID(String quoteID) {
+        this.quoteID = quoteID;
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/CustomOrderBean.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/CustomOrderBean.java?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/CustomOrderBean.java (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/CustomOrderBean.java Sat Sep  5 16:41:14 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.apache.stonehenge.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/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/CustomQuoteBean.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/CustomQuoteBean.java?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/CustomQuoteBean.java (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/CustomQuoteBean.java Sat Sep  5 16:41:14 2009
@@ -0,0 +1,133 @@
+/*
+ * 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.apache.stonehenge.stocktrader;
+
+import java.math.BigDecimal;
+
+/**
+ * This class to be used as the data model for quote information.
+ */
+public class CustomQuoteBean {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 7129349720689180586L;
+
+    private String symbol;
+    private String companyName;
+    private double volume;
+    private BigDecimal price;
+    private BigDecimal open;
+    private BigDecimal low;
+    private BigDecimal high;
+    private double change;
+
+    public String getSymbol() {
+        return symbol;
+    }
+
+    public void setSymbol(String symbol) {
+        this.symbol = symbol;
+    }
+
+    public String getCompanyName() {
+        return companyName;
+    }
+
+    public void setCompanyName(String companyName) {
+        this.companyName = companyName;
+    }
+
+    public double getVolume() {
+        return volume;
+    }
+
+    public void setVolume(double volume) {
+        this.volume = volume;
+    }
+
+    public BigDecimal getPrice() {
+        return price;
+    }
+
+    public void setPrice(BigDecimal price) {
+        this.price = price;
+    }
+
+    public BigDecimal getOpen() {
+        return open;
+    }
+
+    public void setOpen(BigDecimal open) {
+        this.open = open;
+    }
+
+    public BigDecimal getLow() {
+        return low;
+    }
+
+    public void setLow(BigDecimal low) {
+        this.low = low;
+    }
+
+    public BigDecimal getHigh() {
+        return high;
+    }
+
+    public void setHigh(BigDecimal high) {
+        this.high = high;
+    }
+
+    public double getChange() {
+        return change;
+    }
+
+    public void setChange(double change) {
+        this.change = change;
+    }
+
+    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/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/CustomerDAO.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/CustomerDAO.java?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/CustomerDAO.java (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/CustomerDAO.java Sat Sep  5 16:41:14 2009
@@ -0,0 +1,31 @@
+/*
+ * 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.apache.stonehenge.stocktrader.dal;
+
+import java.math.BigDecimal;
+import org.apache.stonehenge.stocktrader.CustomHoldingBean;
+
+public interface CustomerDAO {
+
+	public CustomHoldingBean getHoldingForUpdate(int orderId)
+			throws DAOException;
+
+    public void updateAccountBalance(int accountId, BigDecimal total)
+			throws DAOException;
+
+}

Added: incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/DAOException.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/DAOException.java?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/DAOException.java (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/DAOException.java Sat Sep  5 16:41:14 2009
@@ -0,0 +1,31 @@
+/*
+ * 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.apache.stonehenge.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/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/DAOFactory.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/DAOFactory.java?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/DAOFactory.java (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/DAOFactory.java Sat Sep  5 16:41:14 2009
@@ -0,0 +1,97 @@
+/*
+ * 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.apache.stonehenge.stocktrader.dal;
+
+import org.apache.stonehenge.stocktrader.mssql.MSSQLDAOFactory;
+import org.apache.stonehenge.stocktrader.mysql.MySQLDAOFactory;
+import org.apache.stonehenge.stocktrader.util.StockTraderUtility;
+
+import java.util.Properties;
+import java.io.InputStream;
+import java.io.IOException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public abstract class DAOFactory {
+    public static final String PROP_DB_HOST = "org.apache.stonehenge.stocktrader.database.host";
+    public static final String PROP_DB_PORT = "org.apache.stonehenge.stocktrader.database.port";
+    public static final String PROP_DB_NAME = "org.apache.stonehenge.stocktrader.database.db";
+    public static final String PROP_DB_USER = "org.apache.stonehenge.stocktrader.database.user";
+    public static final String PROP_DB_PASSWORD = "org.apache.stonehenge.stocktrader.database.password";
+    public static final String PROP_DB_TYPE = "org.apache.stonehenge.stocktrader.database.type";
+
+    public static Properties prop = null;
+
+    public abstract CustomerDAO getCustomerDAO() throws DAOException;
+
+    public abstract MarketSummaryDAO getMarketSummaryDAO() throws DAOException;
+
+    public abstract OrderDAO getOrderDAO() throws DAOException;
+
+    public static DAOFactory getFacotry() {
+        DAOFactory factory;
+        loadProperties();
+        if ("mysql".equals(prop.getProperty(PROP_DB_TYPE))) {
+            factory = MySQLDAOFactory.getInstance();
+            return factory;
+        } else if ("mssql".equals(prop.getProperty(PROP_DB_TYPE))) {
+            factory = MSSQLDAOFactory.getInstance();
+            return factory;
+        } else {
+            throw new IllegalArgumentException("Unknown Database type " + prop.getProperty(PROP_DB_TYPE));
+        }
+    }
+
+    public static void loadProperties() {
+        Log logger = LogFactory.getLog(DAOFactory.class);
+        if (prop == null) {
+            prop = new Properties();
+//			MessageContext messageContext = MessageContext.getCurrentMessageContext();
+//			if (messageContext != null) {
+//				AxisService service = messageContext.getAxisService();
+//				ClassLoader serviceClassLoader = service.getClassLoader();
+//				InputStream is = serviceClassLoader.getResourceAsStream(StockTraderUtility.DB_PROPERRTIES_FILE);
+//				if (is != null) {
+//					try {
+//						prop.load(is);
+//					} catch (IOException e) {
+//						logger.debug("Unable to load mysql-db properties file and using [jdbc:mysql://localhost/stocktraderdb?user=trade&password=trade] as the default connection",e);
+//					}
+//				} else {
+//					logger.debug("Unable to load mysql-db properties file and using [jdbc:mysql://localhost/stocktraderdb?user=trade&password=trade] as the default connection");
+//
+//				}
+//			}
+
+            InputStream is = DAOFactory.class.getClassLoader()
+                    .getResourceAsStream(StockTraderUtility.DB_PROPERRTIES_FILE);
+            if (is != null) {
+                try {
+                    prop.load(is);
+                } catch (IOException e) {
+                    logger.debug("Unable to load mysql-db properties file and using [jdbc:mysql://localhost/stocktraderdb?user=trade&password=trade] as the default connection", e);
+                }
+            } else {
+                logger.debug("Unable to load mysql-db properties file and using [jdbc:mysql://localhost/stocktraderdb?user=trade&password=trade] as the default connection");
+
+            }
+        }
+    }
+
+}
\ No newline at end of file

Added: incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/MarketSummaryDAO.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/MarketSummaryDAO.java?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/MarketSummaryDAO.java (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/MarketSummaryDAO.java Sat Sep  5 16:41:14 2009
@@ -0,0 +1,29 @@
+/*
+ * 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.apache.stonehenge.stocktrader.dal;
+
+import org.apache.stonehenge.stocktrader.CustomQuoteBean;
+
+public interface MarketSummaryDAO {
+
+    public CustomQuoteBean getQuoteForUpdate(String symbol) throws DAOException;
+
+    public void updateStockPriceVolume(double quantity, CustomQuoteBean quote)
+            throws DAOException;
+
+}

Added: incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/OrderDAO.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/OrderDAO.java?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/OrderDAO.java (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/dal/OrderDAO.java Sat Sep  5 16:41:14 2009
@@ -0,0 +1,57 @@
+/*
+ * 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.apache.stonehenge.stocktrader.dal;
+
+import java.math.BigDecimal;
+
+import org.apache.stonehenge.stocktrader.CustomHoldingBean;
+import org.apache.stonehenge.stocktrader.CustomOrderBean;
+import org.apache.stonehenge.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 void updateAccountBalance(int accountId, BigDecimal total)
+			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;
+
+    public void beginTransaction() throws DAOException;
+
+    public void commitTransaction() throws DAOException;
+
+    public void rollbackTransaction() throws DAOException;
+
+    public void close() throws DAOException;
+}

Added: incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/mssql/AbstractMSSQLDAO.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/mssql/AbstractMSSQLDAO.java?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/mssql/AbstractMSSQLDAO.java (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/mssql/AbstractMSSQLDAO.java Sat Sep  5 16:41:14 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.apache.stonehenge.stocktrader.mssql;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stonehenge.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);
+		}
+	}
+}

Added: incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/mssql/MSSQLCustomerDAO.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/mssql/MSSQLCustomerDAO.java?rev=811675&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/mssql/MSSQLCustomerDAO.java (added)
+++ incubator/stonehenge/trunk/stocktrader/metro/order_processor/src/org/apache/stonehenge/stocktrader/mssql/MSSQLCustomerDAO.java Sat Sep  5 16:41:14 2009
@@ -0,0 +1,122 @@
+/*
+ * 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.apache.stonehenge.stocktrader.mssql;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stonehenge.stocktrader.CustomHoldingBean;
+import org.apache.stonehenge.stocktrader.dal.CustomerDAO;
+import org.apache.stonehenge.stocktrader.dal.DAOException;
+import org.apache.stonehenge.stocktrader.util.StockTraderUtility;
+
+import java.math.BigDecimal;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+public class MSSQLCustomerDAO extends AbstractMSSQLDAO implements CustomerDAO {
+    private static final Log logger = LogFactory.getLog(MSSQLCustomerDAO.class);
+
+    private static final String SQL_DEBIT_ACCOUNT = "UPDATE dbo.ACCOUNT WITH (ROWLOCK) SET BALANCE=(BALANCE-?) WHERE ACCOUNTID=?";
+    private static final String SQL_SELECT_HOLDING_LOCK = "Set NOCOUNT ON; SELECT dbo.HOLDING.ACCOUNT_ACCOUNTID, HOLDING.HOLDINGID, HOLDING.QUANTITY, HOLDING.PURCHASEPRICE, HOLDING.PURCHASEDATE, HOLDING.QUOTE_SYMBOL FROM dbo.HOLDING WITH (ROWLOCK) INNER JOIN ORDERS ON HOLDING.HOLDINGID = ORDERS.HOLDING_HOLDINGID WHERE (ORDERS.ORDERID = ?)";
+
+    public MSSQLCustomerDAO(Connection sqlConnection) throws DAOException {
+        super(sqlConnection);
+    }
+
+    public CustomHoldingBean getHoldingForUpdate(int orderId)
+            throws DAOException {
+        if (logger.isDebugEnabled()) {
+            logger
+                    .debug("MSSQLCustomerDAO.getHoldingForUpdate(int)\nOrder ID :"
+                            + orderId);
+        }
+
+        CustomHoldingBean holding = null;
+        PreparedStatement selectHoldingLockStat = null;
+        try {
+            selectHoldingLockStat = sqlConnection
+                    .prepareStatement(SQL_SELECT_HOLDING_LOCK);
+            selectHoldingLockStat.setInt(1, orderId);
+            ResultSet rs = selectHoldingLockStat.executeQuery();
+            if (rs.next()) {
+                try {
+                    holding = new CustomHoldingBean(
+                            rs.getInt(1),
+                            rs.getInt(2),
+                            rs.getDouble(3),
+                            rs.getBigDecimal(4),
+                            StockTraderUtility.convertToCalendar(rs.getDate(5)),
+                            rs.getString(6));
+                    return holding;
+                } finally {
+                    try {
+                        rs.close();
+                    } catch (SQLException e) {
+                        logger.debug("", e);
+                    }
+                }
+            }
+        } catch (SQLException e) {
+            throw new DAOException(
+                    "Exception is thrown when selecting the holding entry for order ID :"
+                            + orderId, e);
+        } finally {
+            if (selectHoldingLockStat != null) {
+                try {
+                    selectHoldingLockStat.close();
+                } catch (SQLException e) {
+                    logger.debug("", e);
+                }
+            }
+        }
+        return holding;
+    }
+
+    public void updateAccountBalance(int accountId, BigDecimal total)
+            throws DAOException {
+        if (logger.isDebugEnabled()) {
+            logger
+                    .debug("MSSQLCustomerDAO.updateAccoutBalance(int,BigDecimal)\n Account ID :"
+                            + accountId + "\nTotal :" + total);
+        }
+        PreparedStatement debitAccountStat = null;
+        try {
+            debitAccountStat = sqlConnection
+                    .prepareStatement(SQL_DEBIT_ACCOUNT);
+            debitAccountStat.setBigDecimal(1, total);
+            debitAccountStat.setInt(2, accountId);
+            debitAccountStat.executeUpdate();
+
+        } catch (SQLException e) {
+            throw new DAOException(
+                    "Excpetion is thrown when updating the account balance for accountID :"
+                            + accountId + " total :" + total, e);
+        } finally {
+            if (debitAccountStat != null) {
+                try {
+                    debitAccountStat.close();
+                } catch (SQLException e) {
+                    logger.debug("", e);
+                }
+            }
+        }
+    }
+
+}