incubator-stonehenge-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bende...@apache.org
Subject svn commit: r918827 - in /incubator/stonehenge/trunk/stocktrader/metro: business_service/src/org/apache/stonehenge/stocktrader/services/TraderServiceManager.java etc/order_processor/OrderProcessor.wsdl
Date Thu, 04 Mar 2010 02:49:19 GMT
Author: bendewey
Date: Thu Mar  4 02:49:18 2010
New Revision: 918827

URL: http://svn.apache.org/viewvc?rev=918827&view=rev
Log:
JIRA: STONEHENGE-99
Updated METRO Stocktrader to support username with Transport Security, Thanks
Submitted by: Pablo Cibraro

Modified:
    incubator/stonehenge/trunk/stocktrader/metro/business_service/src/org/apache/stonehenge/stocktrader/services/TraderServiceManager.java
    incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/OrderProcessor.wsdl

Modified: incubator/stonehenge/trunk/stocktrader/metro/business_service/src/org/apache/stonehenge/stocktrader/services/TraderServiceManager.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/business_service/src/org/apache/stonehenge/stocktrader/services/TraderServiceManager.java?rev=918827&r1=918826&r2=918827&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/business_service/src/org/apache/stonehenge/stocktrader/services/TraderServiceManager.java
(original)
+++ incubator/stonehenge/trunk/stocktrader/metro/business_service/src/org/apache/stonehenge/stocktrader/services/TraderServiceManager.java
Thu Mar  4 02:49:18 2010
@@ -38,12 +38,22 @@
 
 public class TraderServiceManager {
 
+  static {
+    //WORKAROUND. TO BE REMOVED.
+    javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(
+      new javax.net.ssl.HostnameVerifier(){
+        public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) {
+            return true;
+        }});
+      
+  }
+                    
 	private static final Log logger = LogFactory
 			.getLog(TraderServiceManager.class);
 
 	private DAOFactory factory = null;
 
-	public TraderServiceManager() {
+  public TraderServiceManager() {
 		factory = DAOFactory.getFacotry();
 	}
 
@@ -145,6 +155,10 @@
 
 	public CustomOrderBean placeOrder(String orderType, String userID,
 			int holdingID, String symbol, double quantity) throws DAOException {
+		
+	  	
+	  System.setProperty("java.net.debug", "ssl,handshake");	
+	  	
 		OrderDAO orderDAO = factory.getOrderDAO();
 		CustomOrderBean order = null;
 		CustomHoldingBean holding = new CustomHoldingBean();

Modified: 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=918827&r1=918826&r2=918827&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/OrderProcessor.wsdl (original)
+++ incubator/stonehenge/trunk/stocktrader/metro/etc/order_processor/OrderProcessor.wsdl Thu
Mar  4 02:49:18 2010
@@ -300,75 +300,15 @@
 						<sp:IncludeTimestamp/>
 					</wsp:Policy>
 				</sp:TransportBinding>
-				<sp:EndorsingSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
-					<wsp:Policy>
-						<sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
-							<wsp:Policy>
-								<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:TransportBinding>
-											<wsp:Policy>
-												<sp:TransportToken>
-													<wsp:Policy>
-														<sp:HttpsToken RequireClientCertificate="false"/>
-													</wsp:Policy>
-												</sp:TransportToken>
-												<sp:AlgorithmSuite>
-													<wsp:Policy>
-														<sp:Basic256/>
-													</wsp:Policy>
-												</sp:AlgorithmSuite>
-												<sp:Layout>
-													<wsp:Policy>
-														<sp:Strict/>
-													</wsp:Policy>
-												</sp:Layout>
-												<sp:IncludeTimestamp/>
-											</wsp:Policy>
-										</sp:TransportBinding>
-										<sp:SignedSupportingTokens>
-											<wsp:Policy>
-												<sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
-													<wsp:Policy>
-														<sp:WssUsernameToken10/>
-													</wsp:Policy>
-												</sp:UsernameToken>
-											</wsp:Policy>
-										</sp:SignedSupportingTokens>
-										<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:EndorsingSupportingTokens>
+				<sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+          <wsp:Policy>
+            <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+              <wsp:Policy>
+                <sp:WssUsernameToken10/>
+              </wsp:Policy>
+            </sp:UsernameToken>
+          </wsp:Policy>
+        </sp:SignedSupportingTokens>
 				<sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
 					<wsp:Policy>
 						<sp:MustSupportIssuedTokens/>
@@ -376,7 +316,7 @@
 						<sp:RequireServerEntropy/>
 					</wsp:Policy>
 				</sp:Trust10>
-				<wsap:UsingAddressing/>
+				<wsaw:UsingAddressing/>
 				<sc:ValidatorConfiguration wspp:visibility="private" xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy"
xmlns:sc="http://schemas.sun.com/2006/03/wss/server">
 					<sc:Validator name="usernameValidator" classname="org.apache.stonehenge.stocktrader.UsernamePasswordValidator"/>
 				</sc:ValidatorConfiguration>
@@ -463,45 +403,21 @@
             <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:port name="SecureConversationBinding_OrderProcessorService" binding="tns:SecureConversationBinding_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>



Mime
View raw message