incubator-stonehenge-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bende...@apache.org
Subject svn commit: r900654 - in /incubator/stonehenge/trunk/stocktrader/metro: active_sts/ active_sts/src/org/apache/stonehenge/stocktrader/sts/ business_service/ business_service/etc/ etc/active_sts/ etc/business_service/ trader_client/ trader_client/src/ tr...
Date Tue, 19 Jan 2010 03:06:48 GMT
Author: bendewey
Date: Tue Jan 19 03:06:47 2010
New Revision: 900654

URL: http://svn.apache.org/viewvc?rev=900654&view=rev
Log:
JIRA: STONEHENGE-118
Updated StockTrader metro to interop with .NET, Thanks
Submitted by: Pablo Cibraro

Modified:
    incubator/stonehenge/trunk/stocktrader/metro/active_sts/build.xml
    incubator/stonehenge/trunk/stocktrader/metro/active_sts/src/org/apache/stonehenge/stocktrader/sts/ActiveSTSAttributeProvider.java
    incubator/stonehenge/trunk/stocktrader/metro/business_service/build.xml
    incubator/stonehenge/trunk/stocktrader/metro/business_service/etc/sun-jaxws.xml
    incubator/stonehenge/trunk/stocktrader/metro/etc/active_sts/ActiveSTS.wsdl
    incubator/stonehenge/trunk/stocktrader/metro/etc/business_service/TradeServiceWsas.wsdl
    incubator/stonehenge/trunk/stocktrader/metro/trader_client/build.xml
    incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/org/apache/stonehenge/stocktrader/filter/STSFilter.java
    incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/org/apache/stonehenge/stocktrader/service/BusinessServiceClient.java
    incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/org/apache/stonehenge/stocktrader/service/CookieManager.java
    incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/wsit-client.xml
    incubator/stonehenge/trunk/stocktrader/metro/trader_client/web/WEB-INF/web.xml

Modified: incubator/stonehenge/trunk/stocktrader/metro/active_sts/build.xml
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/active_sts/build.xml?rev=900654&r1=900653&r2=900654&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/active_sts/build.xml (original)
+++ incubator/stonehenge/trunk/stocktrader/metro/active_sts/build.xml Tue Jan 19 03:06:47
2010
@@ -48,16 +48,16 @@
     </target>
 
     <target name="build" depends="import-ws">
-        <javac fork="true" srcdir="${common.src.dir}" destdir="${build.classes.home}">
+        <javac debug="on" fork="true" srcdir="${common.src.dir}" destdir="${build.classes.home}">
             <classpath refid="all.classpath"/>
         </javac>
         <copy todir="${build.classes.home}">
             <fileset dir="../resources/conf" includes="*.properties"/>
         </copy>
-        <javac fork="true" srcdir="${config.service.common.dal.dir}" destdir="${build.classes.home}">
+        <javac debug="on" fork="true" srcdir="${config.service.common.dal.dir}" destdir="${build.classes.home}">
             <classpath refid="all.classpath"/>
         </javac>
-        <javac fork="true" srcdir="${src.dir}" destdir="${build.classes.home}">
+        <javac debug="on" fork="true" srcdir="${src.dir}" destdir="${build.classes.home}">
             <classpath refid="all.classpath"/>
         </javac>
     </target>
@@ -69,10 +69,10 @@
                     dir="${active.sts.binding.dir}"
                     includes="*.wsdl, *.xsd"
                     prefix="WEB-INF/wsdl"/>
-            <classes dir="${build.classes.home}"/>
-            <zipfileset dir="${basedir}/etc"
-                        includes="com.sun.xml.ws.api.security.trust.STSAttributeProvider"
-                        prefix="WEB-INF/classes/META-INF/services"/>
+             <zipfileset dir="${active.sts.binding.dir}"
+                            includes="com.sun.*"
+                            prefix="WEB-INF/classes/META-INF/services"/>  
+                       
             <classes dir="${build.classes.home}"/>
             <lib dir="${lib.home}/commons"/>
             <lib dir="${lib.home}/log4j"/>

Modified: incubator/stonehenge/trunk/stocktrader/metro/active_sts/src/org/apache/stonehenge/stocktrader/sts/ActiveSTSAttributeProvider.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/active_sts/src/org/apache/stonehenge/stocktrader/sts/ActiveSTSAttributeProvider.java?rev=900654&r1=900653&r2=900654&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/active_sts/src/org/apache/stonehenge/stocktrader/sts/ActiveSTSAttributeProvider.java
(original)
+++ incubator/stonehenge/trunk/stocktrader/metro/active_sts/src/org/apache/stonehenge/stocktrader/sts/ActiveSTSAttributeProvider.java
Tue Jan 19 03:06:47 2010
@@ -69,6 +69,10 @@
             // Add Role attribute
             QName testQName = new QName("http://sun.com", "Role");
             List<String> testAttrs = new ArrayList<String>();
+            if(name == null)
+            {
+				name = "noname";
+            }
             testAttrs.add(getUserRole(name));
             attrs.put(testQName, testAttrs);
         }
@@ -152,10 +156,15 @@
                 }
             }
 
-            String idName = isActAs ? "ActAs" : NAME_IDENTIFIER;
+            String idName = isActAs ? "actor" : NAME_IDENTIFIER;
             List<String> nameIds = new ArrayList<String>();
-            nameIds.add(name);
-            attrs.put(new QName(nameNS, idName), nameIds);
+            
+            String actorXml = "<Actor><saml:Attribute AttributeName=\"name\" AttributeNamespace=\"http://schemas.xmlsoap.org/ws/2005/05/identity/claims\"
xmlns:saml=\"urn:oasis:names:tc:SAML:1.0:assertion\">" +
+              "<saml:AttributeValue>" + name + "</saml:AttributeValue></saml:Attribute></Actor>";
+              
+            nameIds.add(actorXml);
+            
+            attrs.put(new QName("http://schemas.xmlsoap.org/ws/2009/09/identity/claims/",
idName), nameIds);
         }
     }
 }

Modified: incubator/stonehenge/trunk/stocktrader/metro/business_service/build.xml
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/business_service/build.xml?rev=900654&r1=900653&r2=900654&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/business_service/build.xml (original)
+++ incubator/stonehenge/trunk/stocktrader/metro/business_service/build.xml Tue Jan 19 03:06:47
2010
@@ -70,7 +70,8 @@
                 verbose="${verbose}"
                 keep="${keep}"
                 destdir="${build.classes.home}"
-                wsdl="${business.service.wsdl}">
+                wsdl="${business.service.wsdl}"
+                extension="true">
             <binding dir="${business.service.binding.dir}" includes="${business.service.binding}"/>
             <xjcarg value="-extension"/>
         </wsimport>

Modified: incubator/stonehenge/trunk/stocktrader/metro/business_service/etc/sun-jaxws.xml
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/business_service/etc/sun-jaxws.xml?rev=900654&r1=900653&r2=900654&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/business_service/etc/sun-jaxws.xml (original)
+++ incubator/stonehenge/trunk/stocktrader/metro/business_service/etc/sun-jaxws.xml Tue Jan
19 03:06:47 2010
@@ -45,6 +45,7 @@
         wsdl="TradeServiceWsas.wsdl"
         service="{http://tempuri.org/}TradeServiceWsas"
         port="{http://tempuri.org/}BasicHttpBinding_ITradeServices"
+        binding="http://www.w3.org/2003/05/soap/bindings/HTTP/"
         url-pattern="/TradeServiceWsas"/>
 
     <endpoint
@@ -54,5 +55,6 @@
         wsdl="TradeServiceWsas.wsdl"
         service="{http://tempuri.org/}TradeServiceWsas"
         port="{http://tempuri.org/}CustomBinding_ITradeServices"
+        binding="http://www.w3.org/2003/05/soap/bindings/HTTP/"
         url-pattern="/TradeServiceWsasSTS"/>
 </endpoints>

Modified: incubator/stonehenge/trunk/stocktrader/metro/etc/active_sts/ActiveSTS.wsdl
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/etc/active_sts/ActiveSTS.wsdl?rev=900654&r1=900653&r2=900654&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/etc/active_sts/ActiveSTS.wsdl (original)
+++ incubator/stonehenge/trunk/stocktrader/metro/etc/active_sts/ActiveSTS.wsdl Tue Jan 19
03:06:47 2010
@@ -21,7 +21,7 @@
                                 <sp:X509Token
                                         sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
                                     <wsp:Policy>
-                                        <sp:RequireDerivedKeys/>
+                                        <!--<sp:RequireDerivedKeys/>-->
                                         <sp:RequireThumbprintReference/>
                                         <sp:WssX509V3Token10/>
                                     </wsp:Policy>
@@ -85,7 +85,12 @@
                     <tc:Contract>com.sun.xml.ws.security.trust.impl.WSTrustContractImpl</tc:Contract>
                     <tc:Issuer>SunSTS</tc:Issuer>
                     <tc:ServiceProviders>
-                        <tc:ServiceProvider endPoint="http://localhost:8091/business_service/TradeServiceWsasSTS">
+                        <tc:ServiceProvider endPoint="http://apps.stonehenge.com:1316/business_service/TradeServiceWsasSTS">
+                            <tc:CertAlias>mykey</tc:CertAlias>
+                            <tc:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1
+                            </tc:TokenType>
+                        </tc:ServiceProvider>
+                        <tc:ServiceProvider endPoint="http://localhost:9000/tradebusinessservice">
                             <tc:CertAlias>mykey</tc:CertAlias>
                             <tc:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1
                             </tc:TokenType>

Modified: incubator/stonehenge/trunk/stocktrader/metro/etc/business_service/TradeServiceWsas.wsdl
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/etc/business_service/TradeServiceWsas.wsdl?rev=900654&r1=900653&r2=900654&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/etc/business_service/TradeServiceWsas.wsdl
(original)
+++ incubator/stonehenge/trunk/stocktrader/metro/etc/business_service/TradeServiceWsas.wsdl
Tue Jan 19 03:06:47 2010
@@ -124,373 +124,373 @@
     <wsdl:types>
     </wsdl:types>
     <wsdl:binding name="BasicHttpBinding_ITradeServices" type="i0:ITradeServices">
-        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
+        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
         <wsdl:operation name="emptyMethodAction">
-            <soap:operation soapAction="" style="document"/>
+            <soap12:operation soapAction="" style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="isOnline">
-            <soap:operation soapAction="isOnline" style="document"/>
+            <soap12:operation soapAction="isOnline" style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
         </wsdl:operation>
         <wsdl:operation name="login">
-            <soap:operation soapAction="http://trade.samples.websphere.ibm.com/ITradeServices/login"
style="document"/>
+            <soap12:operation soapAction="http://trade.samples.websphere.ibm.com/ITradeServices/login"
style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getOrders">
-            <soap:operation soapAction="getOrders" style="document"/>
+            <soap12:operation soapAction="getOrders" style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getAccountData">
-            <soap:operation soapAction="getAccountData" style="document"/>
+            <soap12:operation soapAction="getAccountData" style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getAccountProfileData">
-            <soap:operation soapAction="getAccountProfileData" style="document"/>
+            <soap12:operation soapAction="getAccountProfileData" style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="updateAccountProfile">
-            <soap:operation soapAction="updateAccountProfile" style="document"/>
+            <soap12:operation soapAction="updateAccountProfile" style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="logout">
-            <soap:operation soapAction="logout" style="document"/>
+            <soap12:operation soapAction="logout" style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="buy">
-            <soap:operation soapAction="buy" style="document"/>
+            <soap12:operation soapAction="buy" style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="sell">
-            <soap:operation soapAction="sell" style="document"/>
+            <soap12:operation soapAction="sell" style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getHoldings">
-            <soap:operation soapAction="getHoldings" style="document"/>
+            <soap12:operation soapAction="getHoldings" style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="register">
-            <soap:operation soapAction="register" style="document"/>
+            <soap12:operation soapAction="register" style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getClosedOrders">
-            <soap:operation soapAction="getClosedOrders" style="document"/>
+            <soap12:operation soapAction="getClosedOrders" style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getMarketSummary">
-            <soap:operation soapAction="getMarketSummary" style="document"/>
+            <soap12:operation soapAction="getMarketSummary" style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getQuote">
-            <soap:operation soapAction="http://trade.samples.websphere.ibm.com/ITradeServices/getQuote"
+            <soap12:operation soapAction="http://trade.samples.websphere.ibm.com/ITradeServices/getQuote"
                             style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getHolding">
-            <soap:operation soapAction="getHolding" style="document"/>
+            <soap12:operation soapAction="getHolding" style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getTopOrders">
-            <soap:operation soapAction="getTopOrders" style="document"/>
+            <soap12:operation soapAction="getTopOrders" style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="sellEnhanced">
-            <soap:operation soapAction="sellEnhanced" style="document"/>
+            <soap12:operation soapAction="sellEnhanced" style="document"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
     <wsdl:binding name="CustomBinding_ITradeServices" type="i0:ITradeServices">
         <wsp:PolicyReference URI="#CustomBinding_TradeServiceWsas_policy"/>
-        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
+        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
         <wsdl:operation name="emptyMethodAction">
-            <soap:operation soapAction="" style="document"/>
+            <soap12:operation soapAction="" style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <wsp:PolicyReference URI="#ITradeServices_Output_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="isOnline">
-            <soap:operation soapAction="isOnline" style="document"/>
+            <soap12:operation soapAction="isOnline" style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
         </wsdl:operation>
         <wsdl:operation name="login">
-            <soap:operation soapAction="http://trade.samples.websphere.ibm.com/ITradeServices/login"
style="document"/>
+            <soap12:operation soapAction="http://trade.samples.websphere.ibm.com/ITradeServices/login"
style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <wsp:PolicyReference URI="#ITradeServices_Output_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getOrders">
-            <soap:operation soapAction="getOrders" style="document"/>
+            <soap12:operation soapAction="getOrders" style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <wsp:PolicyReference URI="#ITradeServices_Output_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getAccountData">
-            <soap:operation soapAction="getAccountData" style="document"/>
+            <soap12:operation soapAction="getAccountData" style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <wsp:PolicyReference URI="#ITradeServices_Output_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getAccountProfileData">
-            <soap:operation soapAction="getAccountProfileData" style="document"/>
+            <soap12:operation soapAction="getAccountProfileData" style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <wsp:PolicyReference URI="#ITradeServices_Output_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="updateAccountProfile">
-            <soap:operation soapAction="updateAccountProfile" style="document"/>
+            <soap12:operation soapAction="updateAccountProfile" style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <wsp:PolicyReference URI="#ITradeServices_Output_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="logout">
-            <soap:operation soapAction="logout" style="document"/>
+            <soap12:operation soapAction="logout" style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <wsp:PolicyReference URI="#ITradeServices_Output_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="buy">
-            <soap:operation soapAction="buy" style="document"/>
+            <soap12:operation soapAction="buy" style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <wsp:PolicyReference URI="#ITradeServices_Output_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="sell">
-            <soap:operation soapAction="sell" style="document"/>
+            <soap12:operation soapAction="sell" style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <wsp:PolicyReference URI="#ITradeServices_Output_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getHoldings">
-            <soap:operation soapAction="getHoldings" style="document"/>
+            <soap12:operation soapAction="getHoldings" style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <wsp:PolicyReference URI="#ITradeServices_Output_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="register">
-            <soap:operation soapAction="register" style="document"/>
+            <soap12:operation soapAction="register" style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <wsp:PolicyReference URI="#ITradeServices_Output_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getClosedOrders">
-            <soap:operation soapAction="getClosedOrders" style="document"/>
+            <soap12:operation soapAction="getClosedOrders" style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <wsp:PolicyReference URI="#ITradeServices_Output_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getMarketSummary">
-            <soap:operation soapAction="getMarketSummary" style="document"/>
+            <soap12:operation soapAction="getMarketSummary" style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <wsp:PolicyReference URI="#ITradeServices_Output_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getQuote">
-            <soap:operation soapAction="http://trade.samples.websphere.ibm.com/ITradeServices/getQuote"
+            <soap12:operation soapAction="http://trade.samples.websphere.ibm.com/ITradeServices/getQuote"
                             style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <wsp:PolicyReference URI="#ITradeServices_Output_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getHolding">
-            <soap:operation soapAction="getHolding" style="document"/>
+            <soap12:operation soapAction="getHolding" style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <wsp:PolicyReference URI="#ITradeServices_Output_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="getTopOrders">
-            <soap:operation soapAction="getTopOrders" style="document"/>
+            <soap12:operation soapAction="getTopOrders" style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <wsp:PolicyReference URI="#ITradeServices_Output_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="sellEnhanced">
-            <soap:operation soapAction="sellEnhanced" style="document"/>
+            <soap12:operation soapAction="sellEnhanced" style="document"/>
             <wsdl:input>
                 <wsp:PolicyReference URI="#ITradeServices_Input_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <wsp:PolicyReference URI="#ITradeServices_Output_policy"/>
-                <soap:body use="literal"/>
+                <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
     <wsdl:service name="TradeServiceWsas">
         <wsdl:port name="BasicHttpBinding_ITradeServices" binding="tns:BasicHttpBinding_ITradeServices">
-            <soap:address location=""/>
+            <soap12:address location=""/>
         </wsdl:port>
         <wsdl:port name="CustomBinding_ITradeServices" binding="tns:CustomBinding_ITradeServices">
-            <soap:address location=""/>
+            <soap12:address location=""/>
         </wsdl:port>
     </wsdl:service>
 </wsdl:definitions>

Modified: incubator/stonehenge/trunk/stocktrader/metro/trader_client/build.xml
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/trader_client/build.xml?rev=900654&r1=900653&r2=900654&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/trader_client/build.xml (original)
+++ incubator/stonehenge/trunk/stocktrader/metro/trader_client/build.xml Tue Jan 19 03:06:47
2010
@@ -112,6 +112,7 @@
             <lib dir="${lib.home}/agent"/>
             <lib dir="${lib.home}/mysql"/>
             <lib dir="${lib.home}/mssql"/>
+            <lib dir="${lib.home}/jersey"/>
         </war>
     </target>
 

Modified: incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/org/apache/stonehenge/stocktrader/filter/STSFilter.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/org/apache/stonehenge/stocktrader/filter/STSFilter.java?rev=900654&r1=900653&r2=900654&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/org/apache/stonehenge/stocktrader/filter/STSFilter.java
(original)
+++ incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/org/apache/stonehenge/stocktrader/filter/STSFilter.java
Tue Jan 19 03:06:47 2010
@@ -53,12 +53,18 @@
                 Cookie usernameCookie = new Cookie("username", userName);
                 httpServletResponse.addCookie(usernameCookie);
 
-                String assertion = ssoToken.getProperty("Assertion");
+                String tokenID = ssoToken.getTokenID().toString();
+                
+                Cookie assertionCookie = new Cookie("Assertion", tokenID);
+                
+                httpServletResponse.addCookie(assertionCookie);
+                
+                //String assertion = ssoToken.getProperty("Assertion");
 
-                assertion = assertion.replaceAll("\\\\\"", "'").replaceAll("\"", "'").replaceAll(">\\s+?<",
"><");
+                //assertion = assertion.replaceAll("\\\\\"", "'").replaceAll("\"", "'").replaceAll(">\\s+?<",
"><");
 
-                Cookie assertionCookie = new Cookie("Assertion", assertion);
-                httpServletResponse.addCookie(assertionCookie);
+                //Cookie assertionCookie = new Cookie("Assertion", assertion);
+                //httpServletResponse.addCookie(assertionCookie);
             }
         }
         filterChain.doFilter(httpServletRequest, httpServletResponse);

Modified: incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/org/apache/stonehenge/stocktrader/service/BusinessServiceClient.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/org/apache/stonehenge/stocktrader/service/BusinessServiceClient.java?rev=900654&r1=900653&r2=900654&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/org/apache/stonehenge/stocktrader/service/BusinessServiceClient.java
(original)
+++ incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/org/apache/stonehenge/stocktrader/service/BusinessServiceClient.java
Tue Jan 19 03:06:47 2010
@@ -47,7 +47,7 @@
     public ITradeServices getBusinessService() {
         TradeServiceWsas service = new TradeServiceWsas();
         BusinessServiceConfig config = configServiceClient.getClientConfig();
-        if (config.getEndpointURL().endsWith("STS")) {
+        
             try {
                 StringReader stringReader = new StringReader(samlAssertion);
                 XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(stringReader);
@@ -64,9 +64,7 @@
             } catch (XWSSecurityException e) {
                 throw new RuntimeException("thrown in createSAMLAssertion() " + samlAssertion,
e);
             }
-        } else {
-            tradeServices = service.getBasicHttpBindingITradeServices();
-        }
+        
         ((BindingProvider) tradeServices).getRequestContext()
                 .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, config.getEndpointURL());
 

Modified: incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/org/apache/stonehenge/stocktrader/service/CookieManager.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/org/apache/stonehenge/stocktrader/service/CookieManager.java?rev=900654&r1=900653&r2=900654&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/org/apache/stonehenge/stocktrader/service/CookieManager.java
(original)
+++ incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/org/apache/stonehenge/stocktrader/service/CookieManager.java
Tue Jan 19 03:06:47 2010
@@ -4,6 +4,7 @@
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import com.sun.identity.wsfederation.client.WSFederationClient;
 
 public class CookieManager {
     private static final String COOKIE_USERNAME = "username";
@@ -32,11 +33,34 @@
     }
 
      public String getSamlAssertion() {
-         final Cookie requestCookie = getRequestCookie(getRequest(), COOKIE_ASSERTION);
-        if (requestCookie != null) {
-            return requestCookie.getValue();
+        // final Cookie requestCookie = getRequestCookie(getRequest(), COOKIE_ASSERTION);
+        //if (requestCookie != null) {
+        //    return requestCookie.getValue();
+        //}
+        //return null;
+                
+        final Cookie requestCookie = getRequestCookie(getRequest(), COOKIE_ASSERTION);
+        
+        if(requestCookie != null) {
+          String assertionId = requestCookie.getValue();
+          
+          String url = "http://sp.stonehenge.com:8080/opensso/federationws/wsfederationservice";
+          
+          try
+          {
+            String samlAssertion = WSFederationClient.getUserSAMLAssertion(java.net.URLEncoder.encode(assertionId),
url, null, null);
+          
+            return samlAssertion;
+          }
+          catch(com.sun.identity.wsfederation.common.WSFederationException ex)
+          {
+            return null;
+          }
+          
         }
+        
         return null;
+        
     }
 
     public void writeUserCookie(String username) {

Modified: incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/wsit-client.xml
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/wsit-client.xml?rev=900654&r1=900653&r2=900654&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/wsit-client.xml (original)
+++ incubator/stonehenge/trunk/stocktrader/metro/trader_client/src/wsit-client.xml Tue Jan
19 03:06:47 2010
@@ -31,9 +31,10 @@
                     <scc:LifeTime>36000</scc:LifeTime>
                 </scc:SCClientConfiguration>
 
+<!--endpoint="http://apps.stonehenge.com:1316/active_sts/ActiveSTS"-->
                 <tc:PreconfiguredSTS xmlns:tc="http://schemas.sun.com/ws/2006/05/trust/client"
-                                     endpoint="http://localhost:8091/active_sts/ActiveSTS"
-                                     wsdlLocation="http://localhost:8091/active_sts/ActiveSTS?wsdl"
+                                     endpoint="http://localhost:9001/tradeactivests"
+                                     wsdlLocation="http://apps.stonehenge.com:1316/active_sts/ActiveSTS?wsdl"
                                      serviceName="SecurityTokenService"
                                      portName="ISecurityTokenService_Port"
                                      namespace="http://tempuri.org/" shareToken="false">

Modified: incubator/stonehenge/trunk/stocktrader/metro/trader_client/web/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/metro/trader_client/web/WEB-INF/web.xml?rev=900654&r1=900653&r2=900654&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/metro/trader_client/web/WEB-INF/web.xml (original)
+++ incubator/stonehenge/trunk/stocktrader/metro/trader_client/web/WEB-INF/web.xml Tue Jan
19 03:06:47 2010
@@ -36,15 +36,15 @@
         </param-value>
     </context-param>
 
-    <!--<filter>-->
-        <!--<filter-name>Agent</filter-name>-->
-        <!--<filter-class>com.sun.identity.agents.filter.AmAgentFilter</filter-class>-->
-    <!--</filter>-->
-
     <filter>
+        <filter-name>Agent</filter-name>
+        <filter-class>com.sun.identity.agents.filter.AmAgentFilter</filter-class>
+    </filter>
+
+    <!--<filter>
         <filter-name>Login Filter</filter-name>
         <filter-class>org.apache.stonehenge.stocktrader.filter.LoginFilter</filter-class>
-    </filter>
+    </filter>-->
 
     <filter>
         <display-name>RichFaces Filter</display-name>
@@ -52,24 +52,24 @@
         <filter-class>org.ajax4jsf.Filter</filter-class>
     </filter>
 
-    <!--<filter>-->
-        <!--<filter-name>STSFilter</filter-name>-->
-        <!--<filter-class>org.apache.stonehenge.stocktrader.filter.STSFilter</filter-class>-->
-    <!--</filter>-->
-
-    <!--<filter-mapping>-->
-        <!--<filter-name>Agent</filter-name>-->
-        <!--<url-pattern>/*</url-pattern>-->
-        <!--<dispatcher>REQUEST</dispatcher>-->
-        <!--<dispatcher>INCLUDE</dispatcher>-->
-        <!--<dispatcher>FORWARD</dispatcher>-->
-        <!--<dispatcher>ERROR</dispatcher>-->
-    <!--</filter-mapping>-->
-
-    <!--<filter-mapping>-->
-        <!--<filter-name>STSFilter</filter-name>-->
-        <!--<url-pattern>/*</url-pattern>-->
-    <!--</filter-mapping>-->
+    <filter>
+        <filter-name>STSFilter</filter-name>
+        <filter-class>org.apache.stonehenge.stocktrader.filter.STSFilter</filter-class>
+    </filter>
+
+    <filter-mapping>
+        <filter-name>Agent</filter-name>
+        <url-pattern>/*</url-pattern>
+        <dispatcher>REQUEST</dispatcher>
+        <dispatcher>INCLUDE</dispatcher>
+        <dispatcher>FORWARD</dispatcher>
+        <dispatcher>ERROR</dispatcher>
+    </filter-mapping>
+
+    <filter-mapping>
+        <filter-name>STSFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
 
     <filter-mapping>
         <filter-name>richfaces</filter-name>
@@ -79,11 +79,11 @@
         <dispatcher>INCLUDE</dispatcher>
     </filter-mapping>
 
-    <filter-mapping>
+<!--    <filter-mapping>
         <filter-name>Login Filter</filter-name>
         <url-pattern>*.faces</url-pattern>
         <dispatcher>REQUEST</dispatcher>
-    </filter-mapping>
+    </filter-mapping>-->
 
     <servlet>
         <servlet-name>Faces Servlet</servlet-name>



Mime
View raw message