incubator-stonehenge-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bende...@apache.org
Subject svn commit: r823397 [4/5] - in /incubator/stonehenge/trunk/stocktrader/dotnet: ./ business_service/BusinessServiceConsole/ business_service/BusinessServiceImplementation/ business_service/OrderProcessorASyncClient/ common/BasicClient/ common/ConfigClie...
Date Fri, 09 Oct 2009 04:05:00 GMT
Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsDalSqlServer/Customer.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsDalSqlServer/Customer.cs?rev=823397&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsDalSqlServer/Customer.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsDalSqlServer/Customer.cs Fri Oct  9 04:04:55 2009
@@ -0,0 +1,90 @@
+//
+// 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.
+//
+
+using System;
+using System.Data;
+using System.Data.SqlClient;
+using System.Text;
+using Trade.PassiveStsIDal;
+using Trade.PassiveStsModelClasses;
+using Trade.Utility;
+
+namespace Trade.PassiveStsDalSqlServer
+{
+    public class Customer : ICustomer
+    {
+        #region "Parameter Constants"
+        private const string PARM_USERID = "@UserId";
+        #endregion
+
+        #region "SQL Statement Constants"
+        private const string SQL_SELECT_CUSTOMERPROFILE_BYUSERID = "Set NOCOUNT ON; SELECT accountprofile.USERID, accountprofile.PASSWORD FROM dbo.accountprofile WITH (NOLOCK) WHERE accountprofile.USERID = @UserId";
+        #endregion
+
+        private SqlConnection _internalConnection = null;
+
+        #region IUser Members
+
+        public void Open(string connectionString)
+        {
+            if (_internalConnection == null)
+            {
+                _internalConnection = new SqlConnection(connectionString);
+                _internalConnection.Open();
+            }
+            if ((_internalConnection.State == ConnectionState.Broken) ||
+                (_internalConnection.State == ConnectionState.Closed))
+            {
+                _internalConnection.Open();
+            }
+        }
+
+        public AccountDataModel login(string userid, string password)
+        {
+            try
+            {
+                SqlParameter parm1 = new SqlParameter(PARM_USERID, SqlDbType.VarChar, 20);
+                parm1.Value = userid;
+                SqlDataReader rdr = SQLServerHelper.ExecuteReaderSingleRowSingleParm(_internalConnection, null, CommandType.Text, SQL_SELECT_CUSTOMERPROFILE_BYUSERID, parm1);
+                if (rdr.Read())
+                {
+                    string userPassword = rdr.GetString(1);
+                    rdr.Close();
+                    if (userPassword.Equals(password))
+                    {
+                        AccountDataModel customer = new AccountDataModel(userid);
+                        return customer;
+                    }
+                    rdr.Close();
+                }
+                return null;
+            }
+            catch
+            {
+                throw;
+            }
+        }
+
+        public void Close()
+        {
+            if (_internalConnection != null && _internalConnection.State != ConnectionState.Closed)
+                _internalConnection.Close();
+        }
+
+        #endregion
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsDalSqlServer/PassiveStsDalSqlServer.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsDalSqlServer/PassiveStsDalSqlServer.csproj?rev=823397&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsDalSqlServer/PassiveStsDalSqlServer.csproj (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsDalSqlServer/PassiveStsDalSqlServer.csproj Fri Oct  9 04:04:55 2009
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{765A45D4-E403-4C2A-96E3-B4F7062D9F2D}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Trade.PassiveStsDalSqlServer</RootNamespace>
+    <AssemblyName>Trade.PassiveStsDalSqlServer</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="SQLServerHelper.cs" />
+    <Compile Include="Customer.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\common\StockTraderUtility\Utility.csproj">
+      <Project>{382E6E1C-E430-4F6C-BC41-5D84A3798B02}</Project>
+      <Name>Utility</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\PassiveStsIDal\PassiveStsIDal.csproj">
+      <Project>{77C82597-1A72-4878-9F2A-77054E37BF66}</Project>
+      <Name>PassiveStsIDal</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\PassiveStsModelClasses\PassiveStsModelClasses.csproj">
+      <Project>{286AE987-A150-4BAC-859D-147D23473A08}</Project>
+      <Name>PassiveStsModelClasses</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PostBuildEvent>
+    </PostBuildEvent>
+  </PropertyGroup>
+</Project>
\ No newline at end of file

Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsDalSqlServer/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsDalSqlServer/Properties/AssemblyInfo.cs?rev=823397&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsDalSqlServer/Properties/AssemblyInfo.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsDalSqlServer/Properties/AssemblyInfo.cs Fri Oct  9 04:04:55 2009
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("PassiveStsDalSqlServer")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("PassiveStsDalSqlServer")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("06bc8b90-7fda-4737-b6cb-fc1d485e783d")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsDalSqlServer/SQLServerHelper.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsDalSqlServer/SQLServerHelper.cs?rev=823397&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsDalSqlServer/SQLServerHelper.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsDalSqlServer/SQLServerHelper.cs Fri Oct  9 04:04:55 2009
@@ -0,0 +1,309 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Data.SqlClient;
+using System.Collections;
+using System.Data;
+
+namespace Trade.PassiveStsDalSqlServer
+{
+    public abstract class SQLServerHelper
+    {
+
+        // Hashtable to store cached parameters
+        private static Hashtable parmCache = Hashtable.Synchronized(new Hashtable());
+
+
+        /// <summary>
+        /// Create and execute a command to return DataReader after binding to a single parameter.
+        /// </summary>
+        /// <param name="conn">Connection to execute against. If not open, it will be here.</param>
+        /// <param name="trans">ADO transaction.  If null, will not be attached to the command</param>
+        /// <param name="cmdType">Type of ADO command; such as Text or Procedure</param>
+        /// <param name="cmdText">The actual SQL or the name of the Stored Procedure depending on command type</param>
+        /// <param name="singleParm">The single SqlParameter object to bind to the query.</param>
+        public static SqlDataReader ExecuteReaderSingleParm(SqlConnection conn, SqlTransaction trans, CommandType cmdType, string cmdText, SqlParameter singleParm)
+        {
+            SqlCommand cmd = new SqlCommand();
+            if (conn.State != ConnectionState.Open)
+                conn.Open();
+            cmd.Connection = conn;
+            if (trans != null)
+                cmd.Transaction = trans;
+            cmd.CommandText = cmdText;
+            cmd.Parameters.Add(singleParm);
+            SqlDataReader rdr = cmd.ExecuteReader(CommandBehavior.SingleResult);
+            return rdr;
+        }
+
+        /// <summary>
+        /// Create and execute a command to return a single-row DataReader after binding to a single parameter.
+        /// </summary>
+        /// <param name="conn">Connection to execute against. If not open, it will be here.</param>
+        /// <param name="trans">ADO transaction.  If null, will not be attached to the command</param>
+        /// <param name="cmdType">Type of ADO command; such as Text or Procedure</param>
+        /// <param name="cmdText">The actual SQL or the name of the Stored Procedure depending on command type</param>
+        /// <param name="singleParm">The single SqlParameter object to bind to the query.</param>
+        public static SqlDataReader ExecuteReaderSingleRowSingleParm(SqlConnection conn, SqlTransaction trans, CommandType cmdType, string cmdText, SqlParameter singleParm)
+        {
+            if (conn.State != ConnectionState.Open)
+                conn.Open();
+            SqlCommand cmd = new SqlCommand();
+            cmd.Connection = conn;
+            if (trans != null)
+                cmd.Transaction = trans;
+            cmd.CommandText = cmdText;
+            cmd.Parameters.Add(singleParm);
+            SqlDataReader rdr = cmd.ExecuteReader(CommandBehavior.SingleRow);
+            return rdr;
+        }
+
+        /// <summary>
+        /// Create and execute a command to return a single-row DataReader after binding to multiple parameters.
+        /// </summary>
+        /// <param name="conn">Connection to execute against. If not open, it will be here.</param>
+        /// <param name="trans">ADO transaction.  If null, will not be attached to the command</param>
+        /// <param name="cmdType">Type of ADO command; such as Text or Procedure</param>
+        /// <param name="cmdText">The actual SQL or the name of the Stored Procedure depending on command type</param>
+        /// <param name="cmdParms">An array of SqlParameter objects to bind to the query.</param>
+        public static SqlDataReader ExecuteReaderSingleRow(SqlConnection conn, SqlTransaction trans, CommandType cmdType, string cmdText, SqlParameter[] cmdParms)
+        {
+            if (conn.State != ConnectionState.Open)
+                conn.Open();
+            SqlCommand cmd = new SqlCommand();
+            cmd.Connection = conn;
+            if (trans != null)
+                cmd.Transaction = trans;
+            cmd.CommandText = cmdText;
+            PrepareCommand(cmd, cmdParms);
+            SqlDataReader rdr = cmd.ExecuteReader(CommandBehavior.SingleRow);
+            return rdr;
+        }
+
+        /// <summary>
+        /// Create and execute a command to return a DataReader, no parameters used in the command.
+        /// </summary>
+        /// <param name="conn">Connection to execute against. If not open, it will be here.</param>
+        /// <param name="trans">ADO transaction.  If null, will not be attached to the command</param>
+        /// <param name="cmdType">Type of ADO command; such as Text or Procedure</param>
+        /// <param name="cmdText">The actual SQL or the name of the Stored Procedure depending on command type</param>
+        public static SqlDataReader ExecuteReaderNoParm(SqlConnection conn, SqlTransaction trans, CommandType cmdType, string cmdText)
+        {
+            if (conn.State != ConnectionState.Open)
+                conn.Open();
+            SqlCommand cmd = new SqlCommand();
+            cmd.Connection = conn;
+            if (trans != null)
+                cmd.Transaction = trans;
+            cmd.CommandText = cmdText;
+            SqlDataReader rdr = cmd.ExecuteReader(CommandBehavior.SingleResult);
+            return rdr;
+        }
+
+        /// <summary>
+        /// Create and execute a command to return a DataReader after binding to multiple parameters.
+        /// </summary>
+        /// <param name="conn">Connection to execute against. If not open, it will be here.</param>
+        /// <param name="trans">ADO transaction.  If null, will not be attached to the command</param>
+        /// <param name="cmdType">Type of ADO command; such as Text or Procedure</param>
+        /// <param name="cmdText">The actual SQL or the name of the Stored Procedure depending on command type</param>
+        /// <param name="cmdParms">An array of SqlParameter objects to bind to the query.</param>
+        public static SqlDataReader ExecuteReader(SqlConnection conn, SqlTransaction trans, CommandType cmdType, string cmdText, params SqlParameter[] cmdParms)
+        {
+            if (conn.State != ConnectionState.Open)
+                conn.Open();
+            SqlCommand cmd = new SqlCommand();
+            cmd.Connection = conn;
+            if (trans != null)
+                cmd.Transaction = trans;
+            cmd.CommandText = cmdText;
+            PrepareCommand(cmd, cmdParms);
+            SqlDataReader rdr = cmd.ExecuteReader(CommandBehavior.SingleResult);
+            return rdr;
+        }
+
+        /// <summary>
+        /// Create and execute a command to return a single scalar (int) value after binding to multiple parameters.
+        /// </summary>
+        /// <param name="conn">Connection to execute against. If not open, it will be here.</param>
+        /// <param name="trans">ADO transaction.  If null, will not be attached to the command</param>
+        /// <param name="cmdType">Type of ADO command; such as Text or Procedure</param>
+        /// <param name="cmdText">The actual SQL or the name of the Stored Procedure depending on command type</param>
+        /// <param name="cmdParms">An array of SqlParameter objects to bind to the query.</param>
+        public static int ExecuteScalar(SqlConnection conn, SqlTransaction trans, CommandType cmdType, string cmdText, params SqlParameter[] cmdParms)
+        {
+            if (conn.State != ConnectionState.Open)
+                conn.Open();
+            SqlCommand cmd = new SqlCommand();
+            cmd.CommandText = cmdText;
+            cmd.Connection = conn;
+            if (trans != null)
+                cmd.Transaction = trans;
+            PrepareCommand(cmd, cmdParms);
+            int val = Convert.ToInt32(cmd.ExecuteScalar());
+            return val;
+        }
+
+
+        /// <summary>
+        /// Create and execute a command to return a single scalar (int) value after binding to a single parameter.
+        /// </summary>
+        /// <param name="conn">Connection to execute against. If not open, it will be here.</param>
+        /// <param name="trans">ADO transaction.  If null, will not be attached to the command</param>
+        /// <param name="cmdType">Type of ADO command; such as Text or Procedure</param>
+        /// <param name="cmdText">The actual SQL or the name of the Stored Procedure depending on command type</param>
+        /// <param name="singleParm">A SqlParameter object to bind to the query.</param>
+        public static int ExecuteScalarSingleParm(SqlConnection conn, SqlTransaction trans, CommandType cmdType, string cmdText, SqlParameter singleParm)
+        {
+            if (conn.State != ConnectionState.Open)
+                conn.Open();
+            SqlCommand cmd = new SqlCommand();
+            cmd.CommandText = cmdText;
+            cmd.Connection = conn;
+            if (trans != null)
+                cmd.Transaction = trans;
+            cmd.Parameters.Add(singleParm);
+            int val = Convert.ToInt32(cmd.ExecuteScalar());
+            return val;
+        }
+
+        /// <summary>
+        /// Create and execute a command to return a single scalar (int) value. No parameters will be bound to the command.
+        /// </summary>
+        /// <param name="conn">Connection to execute against. If not open, it will be here.</param>
+        /// <param name="trans">ADO transaction.  If null, will not be attached to the command</param>
+        /// <param name="cmdType">Type of ADO command; such as Text or Procedure</param>
+        /// <param name="cmdText">The actual SQL or the name of the Stored Procedure depending on command type</param>
+        /// <param name="singleParm">A SqlParameter object to bind to the query.</param>
+        public static object ExecuteScalarNoParm(SqlConnection conn, SqlTransaction trans, CommandType cmdType, string cmdText)
+        {
+            if (conn.State != ConnectionState.Open)
+                conn.Open();
+            SqlCommand cmd = new SqlCommand();
+            cmd.CommandText = cmdText;
+            cmd.Connection = conn;
+            if (trans != null)
+                cmd.Transaction = trans;
+            object val = cmd.ExecuteScalar();
+            return val;
+        }
+
+        /// <summary>
+        /// Create and execute a command that returns no result set after binding to multiple parameters.
+        /// </summary>
+        /// <param name="conn">Connection to execute against. If not open, it will be here.</param>
+        /// <param name="trans">ADO transaction.  If null, will not be attached to the command</param>
+        /// <param name="cmdType">Type of ADO command; such as Text or Procedure</param>
+        /// <param name="cmdText">The actual SQL or the name of the Stored Procedure depending on command type</param>
+        /// <param name="cmdParms">An array of SqlParameter objects to bind to the query.</param>
+        public static int ExecuteNonQuery(SqlConnection conn, SqlTransaction trans, CommandType cmdType, string cmdText, params SqlParameter[] cmdParms)
+        {
+            if (conn.State != ConnectionState.Open)
+                conn.Open();
+            SqlCommand cmd = new SqlCommand();
+            cmd.Connection = conn;
+            if (trans != null)
+                cmd.Transaction = trans;
+            cmd.CommandText = cmdText;
+            PrepareCommand(cmd, cmdParms);
+            int val = cmd.ExecuteNonQuery();
+            return val;
+        }
+
+        /// <summary>
+        /// Create and execute a command that returns no result set after binding to a single parameter.
+        /// </summary>
+        /// <param name="conn">Connection to execute against. If not open, it will be here.</param>
+        /// <param name="trans">ADO transaction.  If null, will not be attached to the command</param>
+        /// <param name="cmdType">Type of ADO command; such as Text or Procedure</param>
+        /// <param name="cmdText">The actual SQL or the name of the Stored Procedure depending on command type</param>
+        /// <param name="singleParam">A SqlParameter object to bind to the query.</param>
+        public static int ExecuteNonQuerySingleParm(SqlConnection conn, SqlTransaction trans, CommandType cmdType, string cmdText, SqlParameter singleParam)
+        {
+            if (conn.State != ConnectionState.Open)
+                conn.Open();
+            SqlCommand cmd = new SqlCommand();
+            cmd.Connection = conn;
+            if (trans != null)
+                cmd.Transaction = trans;
+            cmd.CommandText = cmdText;
+            cmd.Parameters.Add(singleParam);
+            int val = cmd.ExecuteNonQuery();
+            return val;
+        }
+
+        /// <summary>
+        /// Create and execute a command that returns no result set after binding to a single parameter.
+        /// </summary>
+        /// <param name="conn">Connection to execute against. If not open, it will be here.</param>
+        /// <param name="trans">ADO transaction.  If null, will not be attached to the command</param>
+        /// <param name="cmdType">Type of ADO command; such as Text or Procedure</param>
+        /// <param name="cmdText">The actual SQL or the name of the Stored Procedure depending on command type</param>
+        /// <param name="singleParam">A SqlParameter object to bind to the query.</param>
+        public static int ExecuteNonQueryNoParm(SqlConnection conn, SqlTransaction trans, CommandType cmdType, string cmdText)
+        {
+            if (conn.State != ConnectionState.Open)
+                conn.Open();
+            SqlCommand cmd = new SqlCommand();
+            cmd.Connection = conn;
+            if (trans != null)
+                cmd.Transaction = trans;
+            cmd.CommandText = cmdText;
+            int val = cmd.ExecuteNonQuery();
+            return val;
+        }
+
+        /// <summary>
+        /// add parameter array to the cache
+        /// </summary>
+        /// <param name="cacheKey">Key to the parameter cache</param>
+        /// <param name="cmdParms">an array of SqlParamters to be cached</param>
+        public static void CacheParameters(string cacheKey, params SqlParameter[] cmdParms)
+        {
+            parmCache[cacheKey] = cmdParms;
+        }
+
+        /// <summary>
+        /// Retrieve cached parameters
+        /// </summary>
+        /// <param name="cacheKey">key used to lookup parameters</param>
+        /// <returns>Cached SqlParamters array</returns>
+        public static SqlParameter[] GetCacheParameters(string cacheKey)
+        {
+            SqlParameter[] cachedParms = (SqlParameter[])parmCache[cacheKey];
+
+            if (cachedParms == null)
+                return null;
+
+            SqlParameter[] clonedParms = new SqlParameter[cachedParms.Length];
+
+            for (int i = 0, j = cachedParms.Length; i < j; i++)
+                clonedParms[i] = (SqlParameter)((ICloneable)cachedParms[i]).Clone();
+
+            return clonedParms;
+        }
+
+        /// <summary>
+        /// Prepare a command for execution
+        /// </summary>
+        /// <param name="cmd">SqlCommand object</param>
+        /// <param name="conn">SqlConnection object</param>
+        /// <param name="trans">SqlTransaction object</param>
+        /// <param name="cmdType">Cmd type e.g. stored procedure or text</param>
+        /// <param name="cmdText">Command text, e.g. Select * from Products</param>
+        /// <param name="cmdParms">SqlParameters to use in the command</param>
+        private static void PrepareCommand(SqlCommand cmd, SqlParameter[] cmdParms)
+        {
+            if (cmdParms != null)
+            {
+                for (int i = 0; i < cmdParms.Length; i++)
+                {
+                    SqlParameter parm = (SqlParameter)cmdParms[i];
+                    cmd.Parameters.Add(parm);
+                }
+            }
+        }
+
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsIDal/ICustomer.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsIDal/ICustomer.cs?rev=823397&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsIDal/ICustomer.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsIDal/ICustomer.cs Fri Oct  9 04:04:55 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.
+//
+
+using System;
+using Trade.PassiveStsModelClasses;
+
+namespace Trade.PassiveStsIDal
+{
+    public interface ICustomer
+    {
+        void Open(string connectionString);
+        AccountDataModel login(string userId, string password);
+        void Close();
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsIDal/PassiveStsIDal.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsIDal/PassiveStsIDal.csproj?rev=823397&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsIDal/PassiveStsIDal.csproj (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsIDal/PassiveStsIDal.csproj Fri Oct  9 04:04:55 2009
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{77C82597-1A72-4878-9F2A-77054E37BF66}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Trade.PassiveStsIDal</RootNamespace>
+    <AssemblyName>Trade.PassiveStsIDal</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="ICustomer.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\PassiveStsModelClasses\PassiveStsModelClasses.csproj">
+      <Project>{286AE987-A150-4BAC-859D-147D23473A08}</Project>
+      <Name>PassiveStsModelClasses</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PostBuildEvent>
+    </PostBuildEvent>
+  </PropertyGroup>
+</Project>
\ No newline at end of file

Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsIDal/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsIDal/Properties/AssemblyInfo.cs?rev=823397&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsIDal/Properties/AssemblyInfo.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsIDal/Properties/AssemblyInfo.cs Fri Oct  9 04:04:55 2009
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("PassiveStsIDal")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("PassiveStsIDal")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("d106eb1e-0cf3-4d28-ad4c-36681f9b0812")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsImplementation/Class1.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsImplementation/Class1.cs?rev=823397&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsImplementation/Class1.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsImplementation/Class1.cs Fri Oct  9 04:04:55 2009
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace PassiveStsImplementation
+{
+    public class Class1
+    {
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsImplementation/PassiveStsImplementation.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsImplementation/PassiveStsImplementation.csproj?rev=823397&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsImplementation/PassiveStsImplementation.csproj (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsImplementation/PassiveStsImplementation.csproj Fri Oct  9 04:04:55 2009
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{E548668F-040C-4D9D-85DA-1E897CB37934}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Trade.PassiveStsImplementation</RootNamespace>
+    <AssemblyName>Trade.PassiveStsImplementation</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.configuration" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="StsClient.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\common\StockTraderUtility\Utility.csproj">
+      <Project>{382E6E1C-E430-4F6C-BC41-5D84A3798B02}</Project>
+      <Name>Utility</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\PassiveStsDalFactory\PassiveStsDalFactory.csproj">
+      <Project>{4DC8BC70-EB04-448D-9B2A-D9190B002EFC}</Project>
+      <Name>PassiveStsDalFactory</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\PassiveStsIDal\PassiveStsIDal.csproj">
+      <Project>{77C82597-1A72-4878-9F2A-77054E37BF66}</Project>
+      <Name>PassiveStsIDal</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\PassiveStsModelClasses\PassiveStsModelClasses.csproj">
+      <Project>{286AE987-A150-4BAC-859D-147D23473A08}</Project>
+      <Name>PassiveStsModelClasses</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file

Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsImplementation/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsImplementation/Properties/AssemblyInfo.cs?rev=823397&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsImplementation/Properties/AssemblyInfo.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsImplementation/Properties/AssemblyInfo.cs Fri Oct  9 04:04:55 2009
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("PassiveStsImplementation")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("PassiveStsImplementation")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("8316caf5-8440-43a1-97e1-d582456da3c6")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsImplementation/StsClient.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsImplementation/StsClient.cs?rev=823397&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsImplementation/StsClient.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsImplementation/StsClient.cs Fri Oct  9 04:04:55 2009
@@ -0,0 +1,54 @@
+//
+// 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.
+//
+
+using System;
+using System.Configuration;
+using System.Linq;
+using System.Text;
+using Trade.PassiveStsIDal;
+using Trade.PassiveStsModelClasses;
+using Trade.Utility;
+
+
+namespace Trade.PassiveStsImplementation
+{
+    public class StsClient
+    {
+        public AccountDataModel login(string userId, string password)
+        {
+            AccountDataModel account = null;
+            ICustomer customer = Trade.PassiveStsDalFactory.Customer.create
+                    (ConfigurationManager.AppSettings["DAL"]);
+            try
+            {
+                customer.Open(ConfigurationManager.AppSettings["SqlConnection"]);
+                account = customer.login(userId, password);
+
+                return account;
+            }
+            catch (Exception ex)
+            {
+                StockTraderUtility.Logger.WriteErrorMessage("StsClient.login Error: " + ex.ToString());
+                throw;
+            }
+            finally
+            {
+                customer.Close();
+            }
+        }
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsModelClasses/AccountDataModel.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsModelClasses/AccountDataModel.cs?rev=823397&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsModelClasses/AccountDataModel.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsModelClasses/AccountDataModel.cs Fri Oct  9 04:04:55 2009
@@ -0,0 +1,51 @@
+//
+// 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.
+//
+
+using System;
+
+namespace Trade.PassiveStsModelClasses
+{
+    /// <summary>
+    /// This class is part of the WCF Data Contract for StockTrader Business Services.
+    /// It defines the class used as the data model for account information. 
+    /// </summary>
+    public sealed class AccountDataModel
+    {
+        private string _userId;
+
+        public AccountDataModel()
+        {
+        }
+
+        public AccountDataModel(string userid)
+        {
+            this._userId = userid;
+        }
+
+        public string profileID
+        {
+            get
+            {
+                return _userId;
+            }
+            set
+            {
+                this._userId = value;
+            }
+        }
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsModelClasses/PassiveStsModelClasses.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsModelClasses/PassiveStsModelClasses.csproj?rev=823397&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsModelClasses/PassiveStsModelClasses.csproj (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsModelClasses/PassiveStsModelClasses.csproj Fri Oct  9 04:04:55 2009
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{286AE987-A150-4BAC-859D-147D23473A08}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Trade.PassiveStsModelClasses</RootNamespace>
+    <AssemblyName>Trade.PassiveStsModelClasses</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="AccountDataModel.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file

Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsModelClasses/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsModelClasses/Properties/AssemblyInfo.cs?rev=823397&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsModelClasses/Properties/AssemblyInfo.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/PassiveStsModelClasses/Properties/AssemblyInfo.cs Fri Oct  9 04:04:55 2009
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("PassiveStsModelClasses")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("PassiveStsModelClasses")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("f9b04c18-a721-4800-aaad-e022e92ade2d")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/Utility/Cryptography.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/Utility/Cryptography.cs?rev=823397&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/Utility/Cryptography.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/Utility/Cryptography.cs Fri Oct  9 04:04:55 2009
@@ -0,0 +1,46 @@
+//
+// 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.
+//
+
+using System;
+using System.Security.Cryptography;
+
+namespace StonehengeSts.Utility
+{
+    public class Cryptography
+    {
+        // Create a salt value using a cryptographic random number generator
+        public static byte[] CreateSalt()
+        {
+            byte[] salt = new byte[32];
+            RNGCryptoServiceProvider.Create().GetBytes(salt);
+            return salt;
+        }
+
+        // Calculate the SHA256 hash of the plain text value and the salt value.
+        public static byte[] GetSaltedHash(byte[] plainText, byte[] salt)
+        {
+            // Combine the plain text and salt values before calculating the hash
+            byte[] saltedText = new byte[plainText.Length + salt.Length];
+            System.Buffer.BlockCopy(plainText, 0, saltedText, 0, plainText.Length);
+            System.Buffer.BlockCopy(salt, 0, saltedText, plainText.Length, salt.Length);
+
+            // Create the SHA256Managed class and calculate the hash value 
+            SHA256Managed sha256 = new SHA256Managed();
+            return sha256.ComputeHash(saltedText);
+        }
+    }
+}

Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/Utility/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/Utility/Properties/AssemblyInfo.cs?rev=823397&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/Utility/Properties/AssemblyInfo.cs (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/Utility/Properties/AssemblyInfo.cs Fri Oct  9 04:04:55 2009
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Utility")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("Utility")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("b5410fe2-c6e1-4c7a-837c-0e7a541cba14")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

Added: incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/Utility/Utility.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/Utility/Utility.csproj?rev=823397&view=auto
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/Utility/Utility.csproj (added)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/identity_provider/Utility/Utility.csproj Fri Oct  9 04:04:55 2009
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{F31C8D23-1354-4667-A888-10E483604B8E}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>StonehengeSts.Utility</RootNamespace>
+    <AssemblyName>StonehengeSts.Utility</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Security" />
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Cryptography.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/App.config
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/App.config?rev=823397&r1=823396&r2=823397&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/App.config (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/App.config Fri Oct  9 04:04:55 2009
@@ -60,28 +60,27 @@
        Windows Communication Foundation.  
    -->
   <system.serviceModel>
-    <!--This enables the WCF ServiceModel performance counters for this application.-->
-    <!--<diagnostics performanceCounters="All"></diagnostics>-->
-    <!--The <services> section configures the WCF services that the .NET Stock Order Processor will host.
-    Note that StockTrader uses the configuration files only to specify base service names and their bindings.
-    Base addresses and Service/Client endpoints are created programmatically at runtime.-->
-    <!--********************************************************
-        
-    Config Service OPS Service
-    
-    *********************************************************-->
+   
     <services>
       <service name="Trade.OrderProcessorImplementation.OrderProcessor" 
                behaviorConfiguration="OpsHost_MSec_Behavior">
+
+        <endpoint binding="basicHttpBinding"
+                  bindingConfiguration="OpsHost_BasicHttpBinding"
+                  contract ="Trade.OrderProcessorContract.IOrderProcessor"
+                  />
+        
+        <endpoint address="msec"
+                  binding="wsHttpBinding"
+                  bindingConfiguration="OpsHost_WsHttpBinding_MSec"
+                  contract ="Trade.OrderProcessorContract.IOrderProcessor"
+                  />
+        <endpoint address="Mex"
+                  binding="mexHttpBinding"
+                  contract="IMetadataExchange" />
       </service>
     </services>
     
-    <!--********************************************************
-    
-    Config Service CLIENTS
-    
-    *********************************************************-->
-
     <client>
       <endpoint address="http://localhost:7000/tradeconfigservice"
           contract="Trade.ConfigServiceContract.IConfigService"
@@ -89,16 +88,10 @@
           name="ConfigClient_DotNet_BasicHttpBinding" />
     </client>
     
-    <!--********************************************************
-        
-    Config Service BINDINGS
-    
-    *********************************************************-->
     <bindings>
-      <!--BEGIN basicHttpBindings-->
+     
       <basicHttpBinding>
         
-        <!--THESE ARE TEMPLATE PRIMARY SERVICE HOST BINDINGS.  TO AUGMENT, ADD WITH PREFIX 'Host_'-->
         <binding name="OpsHost_BasicHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:30:00" sendTimeout="00:1:00" allowCookies="true" bypassProxyOnLocal="true" hostNameComparisonMode="StrongWildcard" maxBufferSize="1048576" maxBufferPoolSize="10485768" maxReceivedMessageSize="1048576" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
           <readerQuotas maxDepth="512" maxStringContentLength="262144" maxArrayLength="262144" maxBytesPerRead="65536" maxNameTableCharCount="262144" />
           <security mode="None">
@@ -108,106 +101,35 @@
         </binding>
       
       </basicHttpBinding>
-      <!--BEGIN wsHttpBindings-->
+      
       <wsHttpBinding>
-        <!--
-        <binding name="Host_WsHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:30:00" sendTimeout="00:1:00" allowCookies="true" maxReceivedMessageSize="65536" hostNameComparisonMode="StrongWildcard" messageEncoding="Text" textEncoding="utf-8" bypassProxyOnLocal="true" transactionFlow="false">
-          <readerQuotas maxDepth="512" maxStringContentLength="262144" maxArrayLength="262144" maxBytesPerRead="65536" maxNameTableCharCount="262144" />
-          <reliableSession enabled="false" ordered="true" inactivityTimeout="00:10:00" />
-          <security mode="None">
-            <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
-            <message clientCredentialType="Certificate" negotiateServiceCredential="true" algorithmSuite="Default" />
-          </security>
-        </binding>
-        -->
-        <binding name="OpsHost_WsHttpBinding_MSec" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:30:00" sendTimeout="00:1:00" allowCookies="true" maxReceivedMessageSize="65536" hostNameComparisonMode="StrongWildcard" messageEncoding="Text" textEncoding="utf-8" bypassProxyOnLocal="true" transactionFlow="false">
-          <readerQuotas maxDepth="512" maxStringContentLength="262144" maxArrayLength="262144" maxBytesPerRead="65536" maxNameTableCharCount="262144" />
-          <reliableSession enabled="false" ordered="true" inactivityTimeout="00:10:00" />
+       
+        <binding name="OpsHost_WsHttpBinding_MSec">
           <security mode="Message">
-            <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
-            <message clientCredentialType="Certificate" negotiateServiceCredential="true" algorithmSuite="Default" />
+            <message clientCredentialType="Certificate" negotiateServiceCredential="false" establishSecurityContext="false"/>
           </security>
         </binding>
       </wsHttpBinding>
-
-<customBinding>
-       <binding name="Host_CustomHttpBinding_M_Security_OPS">
-         <textMessageEncoding />
-         <security defaultAlgorithmSuite="Basic256" authenticationMode="AnonymousForCertificate" requireDerivedKeys="false" securityHeaderLayout="Lax" includeTimestamp="true" keyEntropyMode="CombinedEntropy" messageProtectionOrder="SignBeforeEncrypt" messageSecurityVersion="Default" requireSignatureConfirmation="true" >
-           <secureConversationBootstrap />
-         </security>
-         <httpTransport />
-       </binding>
-     </customBinding>
-
     </bindings>
-    <!--********************************************************
-    
-    Config Service BEHAVIORS
-    
-    *********************************************************-->
     <behaviors>
-      <!--Service Behaviors are applied (at the service level) to services that specify them, hence apply to ALL ENDPOINTS FOR A SERVICE HOST/VHOST -->
       <serviceBehaviors>
-
-        <!--
-        <behavior name="OpsHost_DefaultBehavior">
-          <serviceMetadata httpGetEnabled="true" />
-        </behavior>
-        
-        <behavior name="OpsHost_DebugServiceBehaviors">
-          <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
-          <serviceThrottling maxConcurrentInstances="400" maxConcurrentCalls="400" maxConcurrentSessions="100" />
-        </behavior>
-        -->
         <behavior name="OpsHost_MSec_Behavior">
           <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
+          <serviceMetadata httpGetEnabled="true"/>
           <serviceThrottling maxConcurrentInstances="400" maxConcurrentCalls="400" maxConcurrentSessions="100" />
           <serviceCredentials>
             <serviceCertificate findValue="OPS.Com" x509FindType="FindBySubjectName" storeLocation="LocalMachine" storeName="TrustedPeople" />
             <clientCertificate>
-              <authentication certificateValidationMode="Custom" customCertificateValidatorType="Trade.OrderProcessorImplementation.CustomCertValidator, Trade.OrderProcessorImplementation" revocationMode="Online" trustedStoreLocation="LocalMachine" />
+              <authentication certificateValidationMode="None" revocationMode="NoCheck" />
             </clientCertificate>
           </serviceCredentials>
         </behavior>
         
       </serviceBehaviors>
-      
-      
-      <!--Endpint Behaviors are applied at the individual endpoint level.-->
-      <endpointBehaviors>
-        <!--
-        <behavior name="ClientCertificateBehavior">
-          <clientCredentials>
-            <serviceCertificate>
-              <authentication certificateValidationMode="PeerOrChainTrust" />
-            </serviceCertificate>
-          </clientCredentials>
-        </behavior>
-        
-        <behavior name="OPS_ClientCertificateBehavior">
-          <clientCredentials>
-            <clientCertificate findValue="OPS.Com" x509FindType="FindBySubjectName" storeLocation="LocalMachine" storeName="TrustedPeople">
-            </clientCertificate>
-          </clientCredentials>
-        </behavior>
-        -->
-      </endpointBehaviors>
     </behaviors>
-    <!--END CONFIG SERVICE TEMPLATE BEHAVIORS-->
+   
   </system.serviceModel>
   
   
-  <system.web>
-    <membership defaultProvider="ClientAuthenticationMembershipProvider">
-      <providers>
-        <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
-      </providers>
-    </membership>
-    <roleManager defaultProvider="ClientRoleProvider" enabled="true">
-      <providers>
-        <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
-      </providers>
-    </roleManager>
-  </system.web>
+  
 </configuration>

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/Program.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/Program.cs?rev=823397&r1=823396&r2=823397&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/Program.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/order_processor/OrderProcessorConsoleServiceHost/Program.cs Fri Oct  9 04:04:55 2009
@@ -56,9 +56,6 @@
 {
     class OrderProcessor_ConsoleHost
     {
-        //private static EndPointBehaviors endpointBehaviorList;
-        //public static List<ServiceHostInfo> startupList;
-
         /// <summary>p
         /// The program entry class. Note how this simply inherits from the provided base class.
         /// </summary>
@@ -71,10 +68,6 @@
                 string shortHostName = System.Net.Dns.GetHostName();
                 IPHostEntry myEntry = System.Net.Dns.GetHostEntry(shortHostName);
                 string myName = myEntry.HostName;
-                //The key call to create our list of runtime hosts to be initialized.
-                //List<ServiceHostInfo> startupList = new List<ServiceHostInfo>(new ServiceHostInfo[] { new ServiceHostInfo(Settings.SELFHOST_VHOST_NAME, false, null, new object[] { new Trade.BusinessServiceImplementation.ErrorBehaviorAttribute() }, new TradeServiceWcf()) });
-                ////Stock call to startup the Master Host.
-                //base.startService(new Settings(), new ConfigurationService(), new NodeCommunication(), null, new ConfigurationActions(true), startupList, null, new object[] { typeof(IOrderProcessor) });
 
                 Settings thisSettings = new Settings();
 
@@ -83,30 +76,10 @@
                 //Create a ServiceHost for the Orderprocessor service.
                 Type serviceType = typeof(OrderProcessor);
                 host = new ServiceHost(serviceType, TradeServiceUriBase);
-                addEndpointsAndBehaviors(host, TradeServiceUriBase);
+               
                 host.Open();
 
-            }
-
-            private ServiceHost addEndpointsAndBehaviors(ServiceHost host, Uri uri)
-            {
-                ServiceMetadataBehavior mexbehavior = new ServiceMetadataBehavior();
-                mexbehavior.HttpGetEnabled = true;
-                mexbehavior.HttpGetUrl = uri;
-                host.Description.Behaviors.Add(mexbehavior);
-                Binding mexHttpBinding = MetadataExchangeBindings.CreateMexHttpBinding();
-                ServiceEndpoint sepMex = host.AddServiceEndpoint(typeof(IMetadataExchange), mexHttpBinding, uri.AbsoluteUri + "/mex");
-                BasicHttpBinding httpBinding = new BasicHttpBinding("OpsHost_BasicHttpBinding");
-                WSHttpBinding wsHttpBinding = new WSHttpBinding("OpsHost_WsHttpBinding_MSec");
-                CustomBinding customBinding = new CustomBinding("Host_CustomHttpBinding_M_Security_OPS");
-                host.AddServiceEndpoint(typeof(IOrderProcessor), httpBinding, "");
-                host.AddServiceEndpoint(typeof(IOrderProcessor), wsHttpBinding, "msec");
-				host.AddServiceEndpoint(typeof(IOrderProcessor), customBinding, "sec");
-
-                //Describe for Console output
                 StockTraderUtility.DescribeService(host); 
-                
-                return host;
             }
 
             public void Dispose()

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/setup_utilities/Util/AuthorizeWcfServices.bat
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/setup_utilities/Util/AuthorizeWcfServices.bat?rev=823397&r1=823396&r2=823397&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/setup_utilities/Util/AuthorizeWcfServices.bat (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/setup_utilities/Util/AuthorizeWcfServices.bat Fri Oct  9 04:04:55 2009
@@ -52,6 +52,7 @@
 netsh http add urlacl url=http://+:7000/ user=%user%
 netsh http add urlacl url=http://+:8000/ user=%user%
 netsh http add urlacl url=http://+:9000/ user=%user%
+netsh http add urlacl url=http://+:9001/ user=%user%
 %KIT_HOME%\winhttpcertcfg.exe -g -c LOCAL_MACHINE\TrustedPeople -s OPS.Com -a %user%
 %KIT_HOME%\winhttpcertcfg.exe -g -c LOCAL_MACHINE\TrustedPeople -s BSL.Com -a %user%
 %KIT_HOME%\winhttpcertcfg.exe -g -c LOCAL_MACHINE\TrustedPeople -s Trade.Com -a %user%
@@ -61,6 +62,7 @@
 netsh http delete urlacl url=http://+:7000/
 netsh http delete urlacl url=http://+:8000/
 netsh http delete urlacl url=http://+:9000/
+netsh http delete urlacl url=http://+:9001/
 %KIT_HOME%\winhttpcertcfg.exe -r -c LOCAL_MACHINE\TrustedPeople -s OPS.Com -a %user%
 %KIT_HOME%\winhttpcertcfg.exe -r -c LOCAL_MACHINE\TrustedPeople -s BSL.Com -a %user%
 %KIT_HOME%\winhttpcertcfg.exe -r -c LOCAL_MACHINE\TrustedPeople -s Trade.Com -a %user%

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.cs?rev=823397&r1=823396&r2=823397&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.cs Fri Oct  9 04:04:55 2009
@@ -56,7 +56,7 @@
     [System.Runtime.Serialization.KnownType(typeof(AccountDataModel))]
     public class BusinessServiceClient : ITradeServices
     {
-        public Client.Client bslclient;
+        public Client.Client<ITradeServices> bslclient;
 
         public BusinessServiceClient()
         {
@@ -64,9 +64,6 @@
             //be recognized without restarts
             Initialize();
           
-            //string endpointConfigName = null;
-            
-
             //Using the database configuration system - this BusinessServiceClient is created based on the CLIENTTOBS
             //Configuration Settings specified in the database i.e. the row containing DOTNET_CLIENT
             var configClient = new ConfigServiceClient();
@@ -85,14 +82,16 @@
             //service based on the info in the CLIENTTOBS table i.e. the row with DOTNET_CLIENT
             try
             {
-                if (clientConfig.BSName.Equals(Settings.BS_LABEL))
-                {
-                    bslclient = new Client.Client(typeof(ITradeServices), ConfigurationManager.AppSettings.Get(clientConfig.BSName), clientConfig.BS);
-                }
-                else
-                {
-                    bslclient = new Client.Client(typeof(ITradeServices), ConfigurationManager.AppSettings.Get(clientConfig.BSName), clientConfig.BS, Settings.BSL_USERID, Settings.BSL_PASSWORD);
-                }
+                //if (clientConfig.BSName.Equals(Settings.BS_LABEL))
+                //{
+                //    bslclient = new Client.Client<ITradeServices>(ConfigurationManager.AppSettings.Get(clientConfig.BSName), clientConfig.BS);
+                //}
+                //else
+                //{
+                //    bslclient = new Client.Client<ITradeServices>(ConfigurationManager.AppSettings.Get(clientConfig.BSName), clientConfig.BS, Settings.BSL_USERID, Settings.BSL_PASSWORD);
+                //}
+
+                bslclient = new Client.Client<ITradeServices>(ConfigurationManager.AppSettings.Get(clientConfig.BSName), clientConfig.BS, true);
             }
             catch
             {
@@ -105,11 +104,11 @@
         {
             get
             {
-                return (ITradeServices)bslclient.Channel;
+                return bslclient.Channel;
             }
             set
             {
-                bslclient.Channel = (IChannel)value;
+                bslclient.Channel = value;
             }
         }
 
@@ -448,7 +447,7 @@
         /// </summary>
         public static void Initialize()
         {
-            Client.Client.ClearCache();
+            Client.Client<ITradeServices>.ClearCache();
         }
 
     }

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.csproj?rev=823397&r1=823396&r2=823397&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.csproj (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/BusinessServiceClient/BusinessServiceClient.csproj Fri Oct  9 04:04:55 2009
@@ -68,6 +68,7 @@
     <Content Include="stocktrader.snk" />
   </ItemGroup>
   <ItemGroup>
+    <Reference Include="Microsoft.IdentityModel, Version=0.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
     <Reference Include="System" />
     <Reference Include="System.configuration" />
     <Reference Include="System.Core">

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Account.aspx.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Account.aspx.cs?rev=823397&r1=823396&r2=823397&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Account.aspx.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Account.aspx.cs Fri Oct  9 04:04:55 2009
@@ -19,6 +19,7 @@
 
 using System;
 using System.Web;
+using System.Web.Security;
 using System.Web.UI;
 using Trade.BusinessServiceClient;
 using Trade.StockTraderWebApplicationModelClasses;
@@ -36,7 +37,7 @@
         //
         protected override void OnPreRender(EventArgs e)
         {
-            string userid = HttpContext.Current.User.Identity.Name;
+            string userid = null;
             string action = Request.QueryString["action"] ?? string.Empty;
 
             NumOrdersShown.Text = AccountOrdersControl.totalOrders.ToString();

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Default.aspx
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Default.aspx?rev=823397&r1=823396&r2=823397&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Default.aspx (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Default.aspx Fri Oct  9 04:04:55 2009
@@ -1,4 +1,4 @@
-<%@ Page Title="Apache Stonehenge - .NET StockTrader - Welcome" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="Trade.Web.Default"  %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<% /* 
 Licensed to the Apache Software Foundation (ASF) under one or more
+<%@ Page Title="Apache Stonehenge - .NET StockTrader - Welcome" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="Trade.Web.Default" ValidateRequest="false"  %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<% /* 
 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

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Default.aspx.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Default.aspx.cs?rev=823397&r1=823396&r2=823397&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Default.aspx.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Default.aspx.cs Fri Oct  9 04:04:55 2009
@@ -16,6 +16,17 @@
 //
 
 using System;
+using System.Linq;
+using System.Security.Principal;
+using System.Threading;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using Trade.BusinessServiceClient;
+using Trade.StockTraderWebApplicationModelClasses;
+using Trade.StockTraderWebApplicationSettings;
+using Trade.Utility;
+using Microsoft.IdentityModel.Claims;
 
 namespace Trade.Web
 {

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Global.asax
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Global.asax?rev=823397&r1=823396&r2=823397&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Global.asax (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Global.asax Fri Oct  9 04:04:55 2009
@@ -17,6 +17,21 @@
 --%>
 <%@ Import Namespace = "Trade.StockTraderWebApplicationSettings" %>
 <%@ Import Namespace = "Trade.Utility" %>
+<%@ Import Namespace = "System.IdentityModel.Tokens" %>
+<%@ Import Namespace = "System.Linq" %>
+<%@ Import Namespace = "System.Security.Cryptography.X509Certificates" %>
+<%@ Import Namespace = "System.ServiceModel" %>
+<%@ Import Namespace = "System.ServiceModel.Channels" %>
+<%@ Import Namespace = "System.ServiceModel.Description" %>
+<%@ Import Namespace = "System.ServiceModel.Security" %>
+<%@ Import Namespace = "System.ServiceModel.Security.Tokens" %>
+<%@ Import Namespace = "System.Threading" %>
+<%@ Import Namespace = "System.Web" %>
+<%@ Import Namespace = "System.Web.Configuration" %>
+<%@ Import Namespace = "Microsoft.IdentityModel.Claims" %>
+<%@ Import Namespace = "Microsoft.IdentityModel.Protocols.WSTrust" %>
+<%@ Import Namespace = "Microsoft.IdentityModel.SecurityTokenService" %>
+<%@ Import Namespace = "Microsoft.IdentityModel.Tokens" %>
 
 <script runat="server">
 
@@ -37,8 +52,6 @@
 
     void Session_Start(object sender, EventArgs e) 
     {
-        // Code that runs when a new session is started
-
     }
 
     void Session_End(object sender, EventArgs e) 

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Order.aspx.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Order.aspx.cs?rev=823397&r1=823396&r2=823397&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Order.aspx.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Order.aspx.cs Fri Oct  9 04:04:55 2009
@@ -19,6 +19,7 @@
 using System;
 using System.Text;
 using System.Web;
+using System.Web.Security;
 using Trade.BusinessServiceClient;
 using Trade.StockTraderWebApplicationModelClasses;
 using Trade.StockTraderWebApplicationSettings;
@@ -40,7 +41,7 @@
             BSLClient businessServicesClient = new BSLClient();
             OrderDataUI order = null;
 
-            string userid = HttpContext.Current.User.Identity.Name;
+            string userid = null;
             string action = Input.InputText(Request["action"], 10) ?? string.Empty;
             double quantity = 0;
             string symbol = null;

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Portfolio.aspx.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Portfolio.aspx.cs?rev=823397&r1=823396&r2=823397&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Portfolio.aspx.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/Portfolio.aspx.cs Fri Oct  9 04:04:55 2009
@@ -19,8 +19,10 @@
 using System;
 using System.Collections.Generic;
 using System.Web;
+using System.Web.Security;
 using Trade.BusinessServiceClient;
 using Trade.StockTraderWebApplicationModelClasses;
+using Trade.StockTraderWebApplicationSettings;
 
 namespace Trade.Web
 {
@@ -34,7 +36,7 @@
         protected void Page_Load(object sender, EventArgs e)
         {
             BSLClient businessServicesClient = new BSLClient();
-            string userid = HttpContext.Current.User.Identity.Name;
+            string userid = null;
             totalHoldings = businessServicesClient.getHoldings(userid);
             List<HoldingDataUI> holdingList = totalHoldings.holdings;
             numOfHoldings.Text = totalHoldings.holdings.Count.ToString();

Modified: incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/PortfolioBySymbol.aspx.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/PortfolioBySymbol.aspx.cs?rev=823397&r1=823396&r2=823397&view=diff
==============================================================================
--- incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/PortfolioBySymbol.aspx.cs (original)
+++ incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/PortfolioBySymbol.aspx.cs Fri Oct  9 04:04:55 2009
@@ -19,9 +19,11 @@
 using System;
 using System.Linq;
 using System.Web;
+using System.Web.Security;
 using System.Web.UI.WebControls;
 using Trade.BusinessServiceClient;
 using Trade.StockTraderWebApplicationModelClasses;
+using Trade.StockTraderWebApplicationSettings;
 
 namespace Trade.Web
 {
@@ -37,7 +39,7 @@
         protected void Page_Load(object sender, EventArgs e)
         {
             BSLClient businessServicesClient = new BSLClient();
-            string userid = HttpContext.Current.User.Identity.Name;
+            string userid = null;
             totalHoldings = businessServicesClient.getHoldings(userid);
 
             var holdingsSubtotaled = from holding in totalHoldings.holdings



Mime
View raw message