You are viewing a plain text version of this content. The canonical link for it is here.
Posted to stonehenge-commits@incubator.apache.org by sh...@apache.org on 2008/11/26 10:55:41 UTC

svn commit: r720802 [1/4] - in /incubator/stonehenge/contrib/stocktrader: perl/ perl/trader_client/ perl/trader_client/images/ python/ python/trader_client/ python/trader_client/media/ python/trader_client/media/images/ python/trader_client/templates/

Author: shankar
Date: Wed Nov 26 02:55:38 2008
New Revision: 720802

URL: http://svn.apache.org/viewvc?rev=720802&view=rev
Log:
adding perl and python trader clients

Added:
    incubator/stonehenge/contrib/stocktrader/perl/
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/README
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/Thumbs.db   (with props)
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/bg.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/button-bg.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/footer-bg.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/green-arrow.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/header-bg.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/header-link-bg-hover.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/header-link-bg.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/header-links-bg.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/logo.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/middle-bg.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/powered-by-logo.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/red-arrow.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/style.css
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_account
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_config
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_confirmation
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_glossary
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_home
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_login
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_portfolio
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_quotes
    incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_register
    incubator/stonehenge/contrib/stocktrader/python/
    incubator/stonehenge/contrib/stocktrader/python/trader_client/
    incubator/stonehenge/contrib/stocktrader/python/trader_client/README
    incubator/stonehenge/contrib/stocktrader/python/trader_client/__init__.py
    incubator/stonehenge/contrib/stocktrader/python/trader_client/manage.py
    incubator/stonehenge/contrib/stocktrader/python/trader_client/media/
    incubator/stonehenge/contrib/stocktrader/python/trader_client/media/images/
    incubator/stonehenge/contrib/stocktrader/python/trader_client/media/images/Thumbs.db   (with props)
    incubator/stonehenge/contrib/stocktrader/python/trader_client/media/images/bg.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/python/trader_client/media/images/button-bg.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/python/trader_client/media/images/footer-bg.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/python/trader_client/media/images/green-arrow.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/python/trader_client/media/images/header-bg.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/python/trader_client/media/images/header-link-bg-hover.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/python/trader_client/media/images/header-link-bg.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/python/trader_client/media/images/header-links-bg.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/python/trader_client/media/images/logo.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/python/trader_client/media/images/middle-bg.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/python/trader_client/media/images/powered-by-logo.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/python/trader_client/media/images/red-arrow.gif   (with props)
    incubator/stonehenge/contrib/stocktrader/python/trader_client/media/style.css
    incubator/stonehenge/contrib/stocktrader/python/trader_client/request_processor.py
    incubator/stonehenge/contrib/stocktrader/python/trader_client/settings.py
    incubator/stonehenge/contrib/stocktrader/python/trader_client/templates/
    incubator/stonehenge/contrib/stocktrader/python/trader_client/templates/account.html
    incubator/stonehenge/contrib/stocktrader/python/trader_client/templates/base.html
    incubator/stonehenge/contrib/stocktrader/python/trader_client/templates/config.html
    incubator/stonehenge/contrib/stocktrader/python/trader_client/templates/confirmation.html
    incubator/stonehenge/contrib/stocktrader/python/trader_client/templates/glossary.html
    incubator/stonehenge/contrib/stocktrader/python/trader_client/templates/home.html
    incubator/stonehenge/contrib/stocktrader/python/trader_client/templates/index.html
    incubator/stonehenge/contrib/stocktrader/python/trader_client/templates/login.html
    incubator/stonehenge/contrib/stocktrader/python/trader_client/templates/portfolio.html
    incubator/stonehenge/contrib/stocktrader/python/trader_client/templates/quotes.html
    incubator/stonehenge/contrib/stocktrader/python/trader_client/urls.py
    incubator/stonehenge/contrib/stocktrader/python/trader_client/views.py

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/README
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/README?rev=720802&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/perl/trader_client/README (added)
+++ incubator/stonehenge/contrib/stocktrader/perl/trader_client/README Wed Nov 26 02:55:38 2008
@@ -0,0 +1,11 @@
+                         Stock Trader Perl Client
+                         ------------------------
+
+Installation
+------------
+
+1.  Create a folder names trader in your <document root>
+2.  Copy images folder and style.css to <document root>/trader/
+3.  Copy trader* files to your cgi-bin directory
+4.  Make sure to enable execute permissions for all the files inside the
+    cgi-bin directory

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/Thumbs.db
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/Thumbs.db?rev=720802&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/Thumbs.db
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/bg.gif
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/bg.gif?rev=720802&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/bg.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/button-bg.gif
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/button-bg.gif?rev=720802&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/button-bg.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/footer-bg.gif
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/footer-bg.gif?rev=720802&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/footer-bg.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/green-arrow.gif
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/green-arrow.gif?rev=720802&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/green-arrow.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/header-bg.gif
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/header-bg.gif?rev=720802&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/header-bg.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/header-link-bg-hover.gif
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/header-link-bg-hover.gif?rev=720802&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/header-link-bg-hover.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/header-link-bg.gif
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/header-link-bg.gif?rev=720802&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/header-link-bg.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/header-links-bg.gif
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/header-links-bg.gif?rev=720802&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/header-links-bg.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/logo.gif
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/logo.gif?rev=720802&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/logo.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/middle-bg.gif
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/middle-bg.gif?rev=720802&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/middle-bg.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/powered-by-logo.gif
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/powered-by-logo.gif?rev=720802&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/powered-by-logo.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/red-arrow.gif
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/red-arrow.gif?rev=720802&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/perl/trader_client/images/red-arrow.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/style.css
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/style.css?rev=720802&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/perl/trader_client/style.css (added)
+++ incubator/stonehenge/contrib/stocktrader/perl/trader_client/style.css Wed Nov 26 02:55:38 2008
@@ -0,0 +1,373 @@
+body {
+background-image: url(/trader/images/bg.gif);
+background-repeat: repeat-x;
+background-position: left top;
+background-attachment: scroll;
+font-size: 11px;
+font-family: Verdana, Arial, Helvetica, san-serif;
+padding: 0px;
+margin: 0px;
+}
+
+p { }
+
+h3 {
+margin-top:5px;
+font-size: 16px;
+font-weight: normal;
+color: #F47B20;
+}
+
+td { }
+
+a:link { 
+color: #0054A6;
+text-decoration: none;
+}
+
+a:visited {
+
+}
+
+a:hover {
+text-decoration: underline;
+}
+
+a:active { }
+
+input {
+border-left: solid 1px #999;
+border-bottom: solid 1px #333;
+border-right: solid 1px #333;
+border-top: solid 1px #999;
+margin-right: 7px;
+}
+input.button {
+background-image: url(/trader/images/button-bg.gif);
+background-repeat: repeat-x;
+background-position: left top;
+background-attachment: scroll;
+border-left: solid 1px #FDBB30;
+border-bottom: solid 2px #F47B20;
+border-right: solid 2px #F47B20;
+border-top: solid 1px #FDBB30;
+height: 22px;
+font-weight: bold;
+padding-left: 10px;
+padding-right: 10px;
+cursor: pointer;
+}
+td {
+vertical-align: top;
+}
+
+div#content {
+width: 902px;
+margin: auto;
+margin-top: 15px;
+}
+div#header {
+background-image: url(/trader/images/header-bg.gif);
+background-repeat: no-repeat;
+background-position: left top;
+background-attachment: scroll;
+background-color: #fff;
+height: 57px;
+}
+div#header div.logo {
+float: left;
+margin-top: 0px;
+margin-left: 20px;
+}
+div#header div.powered {
+float: right;
+margin-top: 10px;
+margin-right: 20px;
+}
+div#header-links {
+border-left: solid 2px #0093D0;
+border-right: solid 2px #0093D0;
+height: 35px;
+padding-left: 30px;
+padding-right: 20px;
+padding-top: 0px;
+background-image: url(/trader/images/header-links-bg.gif);
+background-repeat: no-repeat;
+background-position: left top;
+background-attachment: scroll;
+}
+div#header-links table {
+height: 30px;
+
+}
+div#header-links table td {
+}
+div#header-links table td a {
+display: block;
+text-decoration: none;
+color: #fff;
+padding-left: 15px;
+padding-right: 15px;
+padding-top: 7px;
+background-image: url(/trader/images/header-link-bg.gif);
+background-repeat: repeat-x;
+background-position: left top;
+background-attachment: scroll;
+height: 23px;
+font-size: 12px;
+font-weight: bold;
+}
+div#header-links table td a:hover {
+background-image: url(/trader/images/header-link-bg-hover.gif);
+background-repeat: repeat-x;
+background-position: left top;
+background-attachment: scroll;
+}
+div#middle {
+background-image: url(/trader/images/middle-bg.gif);
+background-repeat: repeat-y;
+background-position: left top;
+background-attachment: scroll;
+background-color: #fff;
+min-height: 300px;
+padding-left: 40px;
+padding-right: 40px;
+padding-top: 20px;
+padding-bottom: 20px;
+}
+div#middle div.main-title {
+border-bottom: solid 1px #3E739D;
+text-align: right;
+vertical-align: bottom;
+height: 30px;
+margin-bottom: 20px;
+}
+div#middle div.main-title h1{
+margin-top: 0px;
+padding-top: 0px;
+font-size: 22px;
+color: #3E739D;
+float: left;
+}
+div#middle div.main-title span.time {
+}
+div.left {
+width: 400px;
+}
+div.right {
+border: solid 1px #3E739D;
+margin-left: 40px;
+width: 373px;
+}
+div.right p {
+padding-left: 10px;
+padding-right: 10px;
+}
+div.right h3{
+margin: 0px;
+background-color: #0093D0;
+color: #fff;
+padding: 5px;
+font-size: 12px;
+}
+
+div.login {
+text-align: center;
+}
+div.login table {
+margin: auto;
+font-size: 12px;
+}
+div.login p.new-user {
+font-size: 12px;
+font-weight: bold;
+}
+div.quotes {
+text-align: center;
+width: auto;
+margin: auto;
+}
+div#middle table.normal {
+margin-bottom: 20px;
+}
+div#middle table.normal tr{
+text-align: left;
+font-size: 12px;
+}
+div#middle table.normal tr th {
+font-size: 12px;
+border-bottom: solid 1px #333;
+border-left: 0px;
+border-right: 0px;
+border-top: 0px;
+padding-bottom: 3px;
+color: #3E739D;
+}
+div#middle table.normal tr td.left {
+text-align: right;
+color: #3E739D;
+padding-top: 3px;
+vertical-align: top;
+}
+
+table.table-inner {
+border: solid 1px #999;
+width: 100%;
+}
+table.table-inner tr td,th{
+border: solid 1px #333;
+padding: 5px;
+}
+table.table-inner tr th {
+background-color: #999;
+color: #fff;
+}
+table.table-inner tbody tr td {
+background-color: #ccc;
+text-align: right;
+}
+
+table.table-outer {
+border: solid 0px #333;
+width: auto;
+}
+table.table-outer tr td,th{
+	border: solid 1px #fff;
+	padding: 5px;
+}
+table.table-outer thead tr th {
+background-color: #999;
+border: solid 1px #fff;
+color: #fff;
+padding: 3px;
+}
+table.table-outer tbody tr td {
+background-color: #ededed;
+text-align: center;
+}
+table.table-outer tbody tr td.special {
+background-color: #ccc;
+font-weight: bold;
+text-align: left;
+}
+table.table-outer tbody tr td.currency {
+text-align: right;
+}
+table.table-outer tbody tr.total td{
+background-color: #BCBEC0;
+font-weight: bold;
+text-align: right;
+}
+span.price {
+color: #5E8823;
+}
+span.price-gain {
+color: #5E8823;
+background-image: url(/trader/images/green-arrow.gif);
+background-repeat: no-repeat;
+background-position: right top;
+background-attachment: scroll;
+padding-right: 17px;
+}
+span.price-loss {
+color: #C0272D;
+background-image: url(/trader/images/red-arrow.gif);
+background-repeat: no-repeat;
+background-position: right bottom;
+background-attachment: scroll;
+padding-right: 17px;
+}
+table.profile {
+border: solid 1px #3E739D;
+width: 100%;
+margin-top: 15px;
+background-color: #ededed;
+}
+table.profile tr td,th{
+padding: 2px;
+}
+table.profile thead tr th {
+color: #3E739D;
+border-bottom: solid 1px #3E739D;
+font-size: 12px;
+padding: 5px;
+}
+table.profile tbody tr td {
+background-color: #ededed;
+text-align: right;
+}
+table.profile tbody tr td.button {
+text-align: center;
+padding: 7px;
+}
+table.profile-content {
+width: auto;
+margin-bottom: 10px;
+} 
+table.profile-content tbody tr td {
+padding: 5px;
+border: solid 1px #999;
+}
+table.profile-content tbody tr td.left {
+color: #3E739D;
+}
+table.glossary {
+width: 80%;
+background-color: #ccc;
+}
+table.glossary thead tr th {
+background-color: #666;
+color: #fff;
+border: 0px;
+padding: 5px;
+}
+table.glossary tbody tr td {
+background-color: #fff;
+padding: 5px;
+}
+table.glossary td.left {
+font-weight: bold;
+}
+div#confirm {
+margin-top: 7%;
+margin-bottom: 7%;
+width: 60%;
+margin-left: auto;
+margin-right: auto;
+}
+div#confirm h2 {
+color: #3E739D;
+text-align: center;
+font-size: 18px;
+}
+div#confirm div.confirm-content {
+background-color: #DEECF6;
+border-top: solid 1px #3E739D;
+border-left: solid 1px #3E739D;
+border-right: solid 2px #3E739D;
+border-bottom: solid 2px #3E739D;
+padding-top: 10px;
+padding-bottom: 20px;
+padding-left: 20px;
+padding-right: 20px;
+text-align: center;
+}
+div.bottom {
+margin-top: 10px;
+border-top: solid 1px #3E739D;
+padding-top: 10px;
+padding-bottom: 0px;
+text-align: center;
+vertical-align: middle;
+}
+div#footer {
+background-image: url(/trader/images/footer-bg.gif);
+background-repeat: no-repeat;
+background-position: left top;
+background-attachment: scroll;
+background-color: #fff;
+height: 30px;
+padding-top: 25px;
+padding-left: 20px;
+color: #3E739D;
+}
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader?rev=720802&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader (added)
+++ incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader Wed Nov 26 02:55:38 2008
@@ -0,0 +1,123 @@
+#!/usr/bin/perl
+
+# 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.
+
+use CGI qw/:standard/;
+use WSO2::WSF;
+
+my $q = new CGI;
+
+print $q->header();
+
+my $html =<<EOF;
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
+		<title>WSF/Perl StockTrader Welcome</title>
+		<link href="/trader/style.css" rel="stylesheet" type="text/css" media="all" />
+	</head>
+
+	<body>
+		<div id="content">
+		<div id="header">
+			<div class="logo"><img src="/trader/images/logo.gif"></div>
+		</div>
+		<div id="header-links">
+		<table>
+			<tr>
+			<td>
+			<a href="/cgi-bin/trader">Welcome</a>
+			</td>
+			<td>
+			<a href="/cgi-bin/trader_home">Home</a>
+			</td>
+			<td>
+			<a href="/cgi-bin/trader_account">Account</a>
+			</td>
+			<td>
+			<a href="/cgi-bin/trader_portfolio">Portfolio</a>
+			</td>
+			<td>
+			<a href="/cgi-bin/trader_quotes">Quotes/Trade</a>
+			</td>
+			<td>
+			<a href="/cgi-bin/trader_glossary">Glossary</a>
+			</td>
+			<td>
+			<a href="/cgi-bin/trader_config">Config</a>
+			</td>
+			<td>
+			<a href="/cgi-bin/trader_login">Login/Logout</a>
+			</td>
+			</tr>
+		</table>
+		</div>
+		<div id="middle">
+				<div class="main-title">
+		<h1>Welcome!</h1>
+		<script type=\"text/javascript\">
+			var thisdate = new Date();
+			document.writeln(thisdate.toLocaleString());
+		</script>
+		</div>
+		<table>
+		<tr>
+		<td>
+		<div class="left">
+				<p> The design of WSO2 StockTrader sample application is based on an online stock trading scenario with the functionality of the application equivalent to the  <a href="http://msdn.microsoft.com/stocktrader">Microsoft .NET Stock Trader </a> sample benchmark application and <a href="https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?source=trade6">IBM WebSphere's Trade 6.1 </a> sample application. WSO2 StockTrader sample application is powered by <a href="http://wso2.org/projects/wsf/php">WSO2 WSF/PHP</a> and <a href="http://wso2.org/projects/wsas/java">WSO2 WSAS</a>. It serves to illustrate interoperability between PHP Java and .NET in deploying high-performance, scalable service oriented applications. </p>
+
+<p>For more details, check <a href="http://wso2.org/interop/stocktrader">WSO2 Stock Trader home page</a>. </p>
+
+		</div>
+		</td>
+		<td>	
+		<div class="right">
+						<h3>Sample of Technologies Demonstrated</h3>
+						<table>
+							<tbody>
+								<tr>
+									<td>
+										<ul>
+											<li>Service-oriented, n-tier design with PHP, Java and .NET</li>
+											<li>Clean separation of UI, business services and DB access</li>
+											<li>WSO2 Web Services Framework For PHP</li>
+											<li>WSO2 Web Services Application Server</li>
+											<li>Interoperability with .NET</li>
+											<li>Loosely-coupled, message-oriented design</li>
+										</ul>
+									</td>
+								</tr>
+							</tbody>
+						</table>
+					</div>
+				</tr>	
+			</table>
+		</div>
+		<div id="footer">
+			<div style="float:left;">Copyright 2008, WSO2 Inc.</div>
+			<div style="margin-left:432px;float:left;">Powered by 
+			<img align="top" src="/trader/images/powered-by-logo.gif" style="margin-top:-3px; margin-left: 0px;"/></div>
+		</div>
+		</div>
+	</body>
+
+</html>
+EOF
+
+print $html;

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_account
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_account?rev=720802&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_account (added)
+++ incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_account Wed Nov 26 02:55:38 2008
@@ -0,0 +1,729 @@
+#!/usr/bin/perl
+
+# 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.
+
+use CGI qw/:standard/;
+use WSO2::WSF;
+use XML::LibXML;
+
+my $WSFC_HOME='/opt/wso2/wsf_c';
+
+my $q = new CGI;
+
+# check for logged in cookie and redirect to home if its' not set
+$username = $q->cookie('username');
+if(!$username) {
+    print redirect('/cgi-bin/trader_login');
+    exit(0);
+}
+
+print $q->header();
+
+
+# get the endpoitn from the configuration service
+sub get_endpoint {
+
+    $config_endpoint = $q->cookie('endpoint');
+    $input_xml = <<XML;
+    <ClientConfigRequest xmlns="http://wso2.org/interop/stocktrader/xsd">
+        <Client>PERL_CLIENT</Client>
+    </ClientConfigRequest>
+XML
+
+    my $client = new WSO2::WSF::WSClient( { 'to' => $config_endpoint,
+                                          'log_file' => '/tmp/stocktrader.log',
+                                          'log_level' => 4,
+                                          'wsfc_home' =>  $WSFC_HOME } );
+    my $response_msg = $client->request( { 'payload' => $input_xml } );
+    my $response_str = $response_msg->{str};
+
+    my $response_parser = XML::LibXML->new();
+    $response_xml = $response_parser->parse_string($response_str);
+
+    my $xpc = XML::LibXML::XPathContext->new($response_xml);
+    $xpc->registerNs('ns'=> 'http://wso2.org/interop/stocktrader/xsd');
+
+    $bs =  $xpc->findvalue('//ns:BS');   
+    
+    return $bs;
+}
+
+
+
+sub UpdateAccountProfile {
+    $userID = shift;
+    $fullName = shift;
+    $email = shift;
+    $address = shift;
+    $creditCard = shift;
+    $password = shift;
+
+    $request = <<XML;
+      <updateAccountProfile xmlns="http://trade.samples.websphere.ibm.com">
+         <profileData>
+            <userID>${userID}</userID>
+            <password>${password}</password>
+            <fullName>${fullName}</fullName>
+            <address>${address}</address>
+            <email>${email}</email>
+            <creditCard>${creditCard}</creditCard>
+         </profileData>
+      </updateAccountProfile>
+XML
+
+    my $endpoint = get_endpoint();
+    my $client = new WSO2::WSF::WSClient( { 'to' => $endpoint,
+                                          'log_file' => '/tmp/stocktrader.log',
+                                          'log_level' => 4,
+                                          'wsfc_home' => $WSFC_HOME } );
+    $response = $client->request( { 'payload' => $request } );
+    
+    $get_closed_orders_response = $response->{str};
+
+#    my $get_closed_orders_response = <<XML;
+#      <updateAccountProfileResponse xmlns="http://trade.samples.websphere.ibm.com">
+#         <updateAccountProfileReturn xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
+#         </updateAccountProfileReturn>
+#      </updateAccountProfileResponse>
+#XML
+
+    return  $get_closed_orders_response;
+
+}
+
+sub get_orders {
+    my $userID = shift;
+
+    $request = <<XML;
+      <getOrders xmlns="http://trade.samples.websphere.ibm.com">
+         <userID>${userID}</userID>
+      </getOrders>
+XML
+
+    my $endpoint = get_endpoint();
+    my $client = new WSO2::WSF::WSClient( { 'to' => $endpoint,
+                                          'log_file' => '/tmp/stocktrader.log',
+                                          'log_level' => 4,
+                                          'wsfc_home' => $WSFC_HOME } );
+    $response = $client->request( { 'payload' => $request } );
+    
+    my $get_orders_response = $response->{str};
+
+#    my $get_orders_response = <<XML;
+#      <getOrdersResponse xmlns="http://trade.samples.websphere.ibm.com">
+#         <getOrdersReturn xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
+#            <OrderDataBean>
+#               <orderID>46</orderID>
+#               <orderType>sell</orderType>
+#               <orderStatus>completed</orderStatus>
+#               <openDate>2008-05-21T16:01:44.157</openDate>
+#               <completionDate>2008-05-21T16:01:44.157</completionDate>
+#               <quantity>200</quantity>
+#               <price>100.00</price>
+#               <orderFee>24.50</orderFee>
+#               <symbol>s:9</symbol>
+#            </OrderDataBean>
+#            <OrderDataBean>
+#               <orderID>46</orderID>
+#               <orderType>buy</orderType>
+#               <orderStatus>completed</orderStatus>
+#               <openDate>2008-05-21T16:01:44.157</openDate>
+#               <completionDate>2008-05-21T16:01:44.157</completionDate>
+#               <quantity>200</quantity>
+#               <price>100.00</price>
+#               <orderFee>21.50</orderFee>
+#               <symbol>s:9</symbol>
+#            </OrderDataBean>
+#            <OrderDataBean>
+#               <orderID>42</orderID>
+#               <orderType>buy</orderType>
+#               <orderStatus>completed</orderStatus>
+#               <openDate>2008-05-21T16:01:44.157</openDate>
+#               <completionDate>2008-05-21T16:01:44.157</completionDate>
+#               <quantity>200</quantity>
+#               <price>100.00</price>
+#               <orderFee>24.50</orderFee>
+#               <symbol>s:8</symbol>
+#            </OrderDataBean>
+#            <OrderDataBean>
+#               <orderID>37</orderID>
+#               <orderType>buy</orderType>
+#               <orderStatus>completed</orderStatus>
+#               <openDate>2008-05-21T16:01:44.157</openDate>
+#               <completionDate>2008-05-21T16:01:44.157</completionDate>
+#               <quantity>200</quantity>
+#               <price>100.00</price>
+#               <orderFee>24.50</orderFee>
+#               <symbol>s:7</symbol>
+#            </OrderDataBean>
+#            <OrderDataBean>
+#               <orderID>32</orderID>
+#               <orderType>buy</orderType>
+#               <orderStatus>completed</orderStatus>
+#               <openDate>2008-05-21T16:01:44.157</openDate>
+#               <completionDate>2008-05-21T16:01:44.157</completionDate>
+#               <quantity>200</quantity>
+#               <price>100.00</price>
+#               <orderFee>24.50</orderFee>
+#               <symbol>s:6</symbol>
+#            </OrderDataBean>
+#            <OrderDataBean>
+#               <orderID>26</orderID>
+#               <orderType>buy</orderType>
+#               <orderStatus>completed</orderStatus>
+#               <openDate>2008-05-21T16:01:44.14</openDate>
+#               <completionDate>2008-05-21T16:01:44.14</completionDate>
+#               <quantity>200</quantity>
+#               <price>100.00</price>
+#               <orderFee>24.50</orderFee>
+#               <symbol>s:5</symbol>
+#            </OrderDataBean>
+#         </getOrdersReturn>
+#      </getOrdersResponse>
+#XML
+
+    my $parser = XML::LibXML->new();
+    $get_orders_xml = $parser->parse_string($get_orders_response);
+
+    return $get_orders_xml;
+}
+
+sub get_user_account_summary {
+    $orders_return_xml = shift;
+
+    my $xpc = XML::LibXML::XPathContext->new($orders_return_xml);
+    $xpc->registerNs('ns'=> 'http://trade.samples.websphere.ibm.com');
+
+    @nodes = $xpc->findnodes('//ns:OrderDataBean');
+        
+    $tax = 0;
+    $buys = 0;
+    $sells = 0;
+    foreach my $bean (@nodes) {
+
+        my $xpc = XML::LibXML::XPathContext->new($bean);
+        $xpc->registerNs('ns'=> 'http://trade.samples.websphere.ibm.com');
+
+        $order_fee = $xpc->findvalue('./ns:orderFee');
+        $price = $xpc->findvalue('./ns:price');
+        $order_type = $xpc->findvalue('./ns:orderType');
+        $quantity = $xpc->findvalue('./ns:quantity');
+
+        if ($order_type eq "buy")
+        {
+            $buys = $buys + (($price) *
+                int($quantity)) +
+                ($order_fee);
+        }
+        elsif ($order_type eq "sell")
+        {
+            $sells = $sells +  (($price) *
+                int($quantity)) - 
+                ($order_fee);
+        }
+        $tax = $tax + $order_fee;
+    }
+
+    return %account_summary = ('totalBuys' => $buys,
+                              'totalSells' => $sells,
+                              'totalTax' => $tax,
+                              'totalImpact' => $buys + $tax - $sells);
+}
+
+sub get_account_data {
+    my($username) = shift;
+
+    my $get_account_data_request = <<XML;
+          <getAccountData xmlns="http://trade.samples.websphere.ibm.com">
+             <userID>${username}</userID>
+          </getAccountData>
+XML
+
+    my $endpoint = get_endpoint();
+    my $client = new WSO2::WSF::WSClient( { 'to' => $endpoint,
+                                          'log_file' => '/tmp/stocktrader.log',
+                                          'log_level' => 4,
+                                          'wsfc_home' => $WSFC_HOME } );
+    $response = $client->request( { 'payload' => $get_account_data_request} );
+
+    my $get_account_data_response = $response->{str};
+
+#    my $get_account_data_response = <<XML;
+#          <getAccountDataResponse xmlns="http://trade.samples.websphere.ibm.com">
+#             <getAccountDataReturn xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
+#                <accountID>1</accountID>
+#                <loginCount>5</loginCount>
+#                <logoutCount>0</logoutCount>
+#                <lastLogin>2008-07-18T16:06:35.42</lastLogin>
+#                <creationDate>2008-05-21T16:01:44.063</creationDate>
+#                <balance>100000.00</balance>
+#                <openBalance>200000.00</openBalance>
+#                <profileID>uid:0</profileID>
+#             </getAccountDataReturn>
+#          </getAccountDataResponse>
+#XML
+
+
+    my $parser = XML::LibXML->new();
+    $account_data_xml = $parser->parse_string($get_account_data_response);
+
+    return $account_data_xml;
+}
+
+sub get_account_profile_data {
+    my($username) = shift;
+
+    $request = <<E;
+      <getAccountProfileData xmlns="http://trade.samples.websphere.ibm.com">
+          <userID>${username}</userID>
+      </getAccountProfileData>
+E
+
+    my $endpoint = get_endpoint();
+    my $client = new WSO2::WSF::WSClient( { 'to' => $endpoint,
+                                          'log_file' => '/tmp/stocktrader.log',
+                                          'log_level' => 4,
+                                          'wsfc_home' => $WSFC_HOME } );
+    $response = $client->request( { 'payload' => $request } );
+    $response_str = $response->{str};
+
+
+#    $response_str = <<E;
+#      <getAccountProfileDataResponse xmlns="http://trade.samples.websphere.ibm.com">
+#         <getAccountProfileDataReturn xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
+#            <userID>uid:0</userID>
+#            <password>xxx</password>
+#            <fullName>Full Name 0</fullName>
+#            <address>111 First Street, Redmond, WA 98033</address>
+#            <email>user0@company.com</email>
+#            <creditCard>469023-0320</creditCard>
+#         </getAccountProfileDataReturn>
+#      </getAccountProfileDataResponse>
+#E
+
+    my $parser = XML::LibXML->new();
+    $account_data_xml = $parser->parse_string($response_str);
+
+    return $account_data_xml;
+}
+
+
+# If the user requested to update his profile information
+if ($q->param('UPDATEUSERPROFILE'))
+{
+    $userID = $q->cookie("username");
+    $password = $q->cookie('PASSWORD');
+    $fullName = $q->cookie('FULLNAME');
+    $address = $q->cookie('ADDRESS');
+    $email = $q->cookie('EMAIL');
+    $creditCard = $q->cookie('CREDITCARD');
+
+    UpdateAccountProfile($userID,
+        $fullName, $email, $address, $creditCard, $password);
+}
+
+$orders_return = get_orders($username);
+%account_summary = get_user_account_summary($orders_return);
+$user_account_data = get_account_data($username);
+$user_account_profile_data = get_account_profile_data($username);
+
+
+#convert the date
+sub convert_date {
+  my($str) = shift;
+  if($str) {
+    $str =~ s/[T:\.]/-/g;
+    @date_arr = split("-", $str);
+    $year = @date_arr[0];
+    $mon = @date_arr[1];
+    $date = @date_arr[2];
+    $hour = @date_arr[3];
+    $min = @date_arr[4];
+    $sec = @date_arr[5];
+
+    if($hour > 12) {
+      $hour = $hour - 12;
+      $ampm = "PM";
+    }
+    else {
+      $ampm = "AM";
+    }
+    return "${mon}/${date}/${year} ${hour}:${min}:${sec} ${ampm}";
+  }
+  return "";
+}
+
+
+# Gets closed orders of current user
+# @return collection of orders whose status is closed
+sub get_closed_orders
+{
+    my($username) = shift;
+
+    my $get_closed_orders_request = <<XML;
+          <getClosedOrders xmlns="http://trade.samples.websphere.ibm.com">
+             <userID>${username}</userID>
+          </getClosedOrders>
+XML
+
+    my $endpoint = get_endpoint();
+    my $client = new WSO2::WSF::WSClient( { 'to' => $endpoint,
+                                          'log_file' => '/tmp/stocktrader.log',
+                                          'log_level' => 4,
+                                          'wsfc_home' => $WSFC_HOME } );
+    $response = $client->request( { 'payload' => $get_closed_orders_request } );
+    my $get_closed_orders_response = $response->{str};
+
+#    my $get_closed_orders_response = <<XML;
+#      <getClosedOrdersResponse xmlns="http://trade.samples.websphere.ibm.com">
+#         <getClosedOrdersReturn xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
+#            <OrderDataBean>
+#               <orderID>100000023</orderID>
+#               <orderType>sell</orderType>
+#               <orderStatus>completed</orderStatus>
+#               <openDate>2008-07-22T10:02:42.543</openDate>
+#               <completionDate>2008-07-22T10:02:42.607</completionDate>
+#               <quantity>1</quantity>
+#               <price>96.78</price>
+#               <orderFee>15.95</orderFee>
+#               <symbol>s:0</symbol>
+#            </OrderDataBean>
+#         </getClosedOrdersReturn>
+#      </getClosedOrdersResponse>
+#XML
+
+    my $closed_orders_parser = XML::LibXML->new();
+    $closed_orders_xml = $closed_orders_parser->parse_string($get_closed_orders_response);
+
+    return $closed_orders_xml;
+  
+}
+
+
+$get_closed_orders_return = get_closed_orders($username);
+
+
+
+my $html_begin =<<E;
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
+		<meta name="generator" content="Adobe GoLive" />
+		<title>WSF/PHP StockTrader Welcome</title>
+		<link href="/trader/style.css" rel="stylesheet" type="text/css" media="all" />
+	</head>
+
+	<body>
+		<div id="content">
+			<div id="header">
+				<div class="logo"><img src="/trader/images/logo.gif"></div>
+			</div>
+			<div id="header-links">
+				<table>
+					<tr>
+					<td>
+						<a href="/cgi-bin/trader">Welcome</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_home">Home</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_account">Account</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_portfolio">Portfolio</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_quotes">Quotes/Trade</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_glossary">Glossary</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_config">Config</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_login">Login/Logout</a>
+					</td>
+					</tr>
+				</table>
+			</div>
+			<div id="middle">
+E
+
+# call WSClient and get data
+
+
+
+
+
+print $html_begin;
+if($get_closed_orders_return) {
+
+    my $xpc = XML::LibXML::XPathContext->new($get_closed_orders_return);
+    $xpc->registerNs('ns'=> 'http://trade.samples.websphere.ibm.com');
+
+
+    @nodes = $xpc->findnodes('//ns:OrderDataBean');
+
+    if(@nodes) { 
+        # checking whether a new status change happened in a particular order
+        print("<p style=\"color: red\" align=\"center\">Trade Alert: The following orders have completed.</p>");
+        print("<table class=\"table-outer\" cellspacing=\"0\" align=\"center\"><thead>
+                <tr><th>Order ID</th><th>Order Status</th><th>Creation Date</th><th>Completion Date</th>
+                <th>Txn Fee</th><th>Type</th><th>Symbol</th><th>Quantity</th></tr></thead><tbody>");
+
+
+
+        foreach my $bean (@nodes) {
+
+            my $xpc = XML::LibXML::XPathContext->new($bean);
+            $xpc->registerNs('ns'=> 'http://trade.samples.websphere.ibm.com');
+
+            $open_date = convert_date($xpc->findvalue('./ns:openDate'));
+
+            $completion_date = convert_date($xpc->findvalue('./ns:completionDate'));
+
+            $order_status = $xpc->findvalue('./ns:orderStatus');
+
+            $order_id = $xpc->findvalue('./ns:orderID');
+
+            $order_fee = $xpc->findvalue('./ns:orderFee');
+
+            $order_type = $xpc->findvalue('./ns:orderType');
+
+            $symbol = $xpc->findvalue('./ns:symbol');
+
+            $quantity = $xpc->findvalue('./ns:quantity');
+
+            print ("<tr><td>${order_id}</td>
+                <td>${order_status}</td>
+                <td>${open_date}</td>
+                <td>${completion_date}</td>
+                <td>${order_fee}</td>
+                <td>${order_type}</td>
+                <td>${symbol}</td>
+                <td>${quantity}</td></tr>");
+        }
+        # get order details and display
+        print("</tbody></table><br/><br/>");
+    }
+}
+
+
+
+# Display the account summary information of a particular user.
+if (%account_summary)
+{
+    $total_buys = $account_summary{"totalBuys"};
+    $total_sells = $account_summary{"totalSells"};
+    $total_tax = $account_summary{"totalTax"};
+    $total_impact = $account_summary{"totalImpact"};
+
+    print ("<div class=\"main-title\"><h1>Account Information
+        </h1><script type=\"text/javascript\">var thisdate = new Date();
+    document.writeln(thisdate.toLocaleString());</script></div>");
+
+    print ("<table class=\"table-outer\" cellspacing=\"0\" align=\"center\">
+        <thead><tr><th>Subtotal Buys</th><th>Subtotal Sells</th><th>Subtotal Fees
+        </th><th>Net Impact Cash Balance</th></tr></thead><tbody><tr>");
+
+    printf("<td class=\"currency\">\$%.2f</td>", $total_buys);
+    printf("<td class=\"currency\">\$%.2f</td>", $total_sells);
+    printf("<td class=\"currency\">\$%.2f</td>", $total_tax);
+    printf("<td class=\"currency\">");
+
+    if ($total_impact > 0)
+    {
+        printf("<span class=\"price-loss\">\$%.2f</span>", $total_impact);
+    }
+    elsif ($total_impact < 0)
+    {
+        printf("<span class=\"price-gain\">\$%.2f</span>", $total_impact);
+    }
+    else
+    {
+        printf("<span>(\$%.2f)</span>", $total_impact);
+    }
+    printf("</td></tr></tbody></table>");
+}
+
+
+# Display the orders a particular user is associated with.
+if ($orders_return)
+{
+    print("<div><p><b>Total Orders Shown</b></p></div>");
+    print("<table class=\"table-outer\" cellspacing=\"0\" align=\"center\"><thead><tr>");
+    print("<th>Order ID</th><th>Order Status</th><th>Creation Date</th><th>Completion Date
+        </th><th>Txn Fee</th><th>Type</th><th>Symbol</th><th>Quantity</th><th>Price
+        </th><th>Total</th></tr></thead><tbody>");
+
+    $index = 0;
+
+    my $xpc = XML::LibXML::XPathContext->new($orders_return);
+    $xpc->registerNs('ns'=> 'http://trade.samples.websphere.ibm.com');
+
+    @nodes = $xpc->findnodes('//ns:OrderDataBean');
+
+    foreach my $bean (@nodes) {
+        
+        my $xpc = XML::LibXML::XPathContext->new($bean);
+        $xpc->registerNs('ns'=> 'http://trade.samples.websphere.ibm.com');
+
+        $open_date = convert_date($xpc->findvalue('./ns:openDate'));
+
+        $completion_date = convert_date($xpc->findvalue('./ns:completionDate'));
+
+        $order_status = $xpc->findvalue('./ns:orderStatus');
+
+        $order_id = $xpc->findvalue('./ns:orderID');
+
+        $order_fee = $xpc->findvalue('./ns:orderFee');
+
+        $order_type = $xpc->findvalue('./ns:orderType');
+
+        $symbol = $xpc->findvalue('./ns:symbol');
+
+        $quantity = $xpc->findvalue('./ns:quantity');
+
+        $calculated_fee = (($price *
+            $quantity) +
+            $order_fee);
+
+        print ("<tr><td>${order_id}</td>
+            <td>${order_status}</td>
+            <td>${open_date}
+            </td><td>${completion_date}</td>
+            <td class=\"currency\">\$${order_fee}</td>
+            <td>${order_type}</td>");
+
+        print ("<td><form action = \"/cgi-bin/trader_quotes\" method = \"post\">
+            <input type=\"hidden\" name=\"SYMBOLS\" value=\"${symbol}\"/>
+            <input type=\"submit\" name=\"GETQUOTE\" value=\"${symbol}\"/></form></td>");
+
+        print ("<td class=\"currency\">${quantity}</td>
+            <td class=\"currency\">\$${price}</td>
+            <td class=\"currency\">\$${calculated_fee}</td></tr>");
+
+        $index ++;
+    }
+    print ("</tbody></table>");
+}
+
+if($user_account_profile_data) 
+{
+    my $xpc = XML::LibXML::XPathContext->new($user_account_profile_data);
+    $xpc->registerNs('ns'=> 'http://trade.samples.websphere.ibm.com');
+
+    $fullName = $xpc->findvalue('//ns:fullName');
+    $email = $xpc->findvalue('//ns:email');
+    $address = $xpc->findvalue('//ns:address');
+    $creditCard = $xpc->findvalue('//ns:creditCard');
+    $password = $xpc->findvalue('//ns:password');
+
+    print ("<form action = \"/cgi-bin/trader_account\"  method =\"post\">
+        <table class=\"profile\" cellspacing=\"0\" width=\"100%\"><thead><tr>
+        <th>Update Account Profile:${username}</th></tr></thead><tbody><tr><td>");
+    print ("<table cellspacing=\"0\" align=\"center\">");
+    print ("<tr><td>Full Name:</td><td><input name=\"FULLNAME\" type=\"text\" value=\"${fullName}\" id=\"\" size=\"25\"/>
+        </td><td>Email Address:</td><td><input name=\"EMAIL\" type=\"text\" value=\"${email}\" id=\"\" size=\"25\"/></td></tr>");
+    print ("<tr><td>Address:</td><td><input name=\"ADDRESS\" type=\"text\" value=\"${address}\" id=\"\" size=\"25\"/></td>
+        <td>Password:</td><td><input type=\"password\" name=\"PASSWORD\" type=\"text\" value=\"${password}\" id=\"\" size=\"25\"/></td></tr>");
+    print ("<tr><td>Credit Card:</td><td><input name=\"CREDITCARD\" type=\"text\" value=\"${creditCard}\" id=\"\" size=\"25\"/></td>
+        <td>Confirm Password:</td><td><input type=\"password\" name=\"PASSWORD\" type=\"text\" value=\"${password}\" id=\"\" size=\"25\"/></td></tr>");
+    print ("<tr><td colspan=\"4\" class=\"button\"><input type=\"submit\" 
+        name=\"UPDATEUSERPROFILE\"value=\"Update\" class=\"button\"/></td></tr>");
+    print ("</table></form");
+
+
+    # Display the account information of a the user
+    if ($user_account_data)
+    {
+
+        my $xpc = XML::LibXML::XPathContext->new($user_account_data);
+        $xpc->registerNs('ns'=> 'http://trade.samples.websphere.ibm.com');
+
+        my $creation_date = convert_date($xpc->findvalue('//ns:creationDate'));
+
+        my $last_login = convert_date($xpc->findvalue('//ns:lastLogin'));
+
+        my $account_id = $xpc->findvalue('//ns:accountID');
+
+        my $login_count = $xpc->findvalue('//ns:loginCount');
+        my $logout_count = $xpc->findvalue('//ns:logoutCount');
+
+        my $profile_id = $xpc->findvalue('//ns:profileID');
+        my $open_balance = $xpc->findvalue('//ns:openBalance');
+        my $balance = $xpc->findvalue('//ns:balance');
+
+
+
+        print("<table align=\"center\" class=\"profile-content\" cellspacing=\"0\"><tbody>");
+        print ("<tr><td class=\"left\">Account ID:</td>
+            <td>${account_id}</td><td class=\"left\">
+            Account Created</td><td>${creation_date}</td></tr>");
+        print ("<tr><td class=\"left\">User ID:</td>
+            <td>${profile_id}</td><td class=\"left\">
+            Last Login:</td><td>${last_login}</td></tr>");
+        print ("<tr><td class=\"left\">Opening Balance:</td>
+            <td>${open_balance}</td>
+            <td class=\"left\">Total Logins:</td>
+            <td>${login_count}</td></tr>");
+        print("<tr><td class=\"left\">Cash Balance:</td>");
+
+        if ($balance > 0)
+        {
+            print("<td><span class=\"price-gain\">\$
+                ${balance}</span></td>");
+        }
+        elsif($balance < 0)
+        {
+            $positive_balance = -1 * $balance;
+            print("<td><span class=\"price-loss\">\$${positive_balance}</span></td>");
+        }
+        else
+        {
+            print("<td>\$${balance}</td>");
+        }
+        print("<td class=\"left\">Total Logous:</td>
+            <td>${logout_count}</td></tr>");
+        print("</tbody></table>");
+    }
+    print("</td></tr></tbody></table>");
+}
+
+print <<E;
+            <div class="bottom">
+            <form method = "post"  action = "/cgi-bin/trader_quotes">
+            <input type="text" value="${symbol}" name="SYMBOLS" size="25"/>
+            <input type="submit" value="Get Quote" name="GETQUOTE" class="button"/>
+            </form>
+            </div>
+            </div>
+            <div id="footer">
+                <div style="float:left;">Copyright 2008, WSO2 Inc.</div>
+                <div style="margin-left:432px;float:left;">Powered by
+                <img align="top" src="/trader/images/powered-by-logo.gif" style="margin-top:-3px; margin-left: 0px;"/></div>
+            </div>
+        </div>
+    </body>
+
+</html>
+
+E

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_config
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_config?rev=720802&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_config (added)
+++ incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_config Wed Nov 26 02:55:38 2008
@@ -0,0 +1,146 @@
+#!/usr/bin/perl
+
+# 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.
+
+use CGI qw/:standard/;
+use WSO2::WSF;
+use XML::Twig;
+
+my $q = new CGI;
+
+my $WSFC_HOME='/opt/wso2/wsf_c/';
+
+if ($q->param('SETENDPOINT'))
+{
+	if (($q->param('ENDPOINT')))
+	{
+
+        $cookie = cookie( -name  => 'endpoint',
+                          -value => $q->param('ENDPOINT') );
+
+        # redirect the endpoint
+        print $q->header( -cookie => $cookie);
+
+        print "<script type=\"text/javascript\">window.location='/cgi-bin/trader_login'</script>";
+        exit(0);
+	}
+    else {
+      print $q->header();
+    }
+}
+else {
+    print $q->header();
+}
+
+
+sub GetEndpoint() {
+    return $q->cookie('endpoint');
+}
+
+my $endpoint;
+if (!GetEndpoint()) {
+    $endpoint = "http://localhost:8080/config_service/config_svc.php";
+}
+else {
+    $endpoint = GetEndpoint();
+}
+
+
+print <<E
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+	<head>
+		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
+		<meta name="generator" content="Adobe GoLive" />
+		<title>WSF/PHP StockTrader Welcome</title>
+		<link href="/trader/style.css" rel="stylesheet" type="text/css" media="all" />
+	</head>
+
+	<body>
+
+	<form method = "post"  action = "/cgi-bin/trader_config">
+
+		<div id="content">
+		<div id="header">
+			<div class="logo"><img src="/trader/images/logo.gif"></div>
+		</div>
+
+		<div id="header-links">
+		<table>
+			<tr>
+			<td>
+			<a href="/cgi-bin/trader">Welcome</a>
+			</td>
+			<td>
+			<a href="/cgi-bin/trader_home">Home</a>
+			</td>
+			<td>
+			<a href="/cgi-bin/trader_account">Account</a>
+			</td>
+			<td>
+			<a href="/cgi-bin/trader_portfolio">Portfolio</a>
+			</td>
+			<td>
+			<a href="/cgi-bin/trader_quotes">Quotes/Trade</a>
+			</td>
+			<td>
+			<a href="/cgi-bin/trader_glossary">Glossary</a>
+			</td>
+			<td>
+			<a href="/cgi-bin/trader_config">Config</a>
+			</td>
+			<td>
+			<a href="/cgi-bin/trader_login">Login/Logout</a>
+			</td>
+			</tr>
+		</table>
+		</div>
+
+		<div id="middle">
+
+		<div class="main-title">
+		<h1>Config</h1>
+		<script type=\"text/javascript\">
+			var thisdate = new Date();
+			document.writeln(thisdate.toLocaleString());
+		</script>
+		</div>
+
+		<div class="login">
+		<table>
+		<tr>
+		<td>Configuration Service</td>
+		<td><input type="text" name = "ENDPOINT" value ="${endpoint}"  size = "75"/></td>
+		</tr>
+		<tr>
+		<td></td>
+		<td><input type = "submit" name = "SETENDPOINT" value = "Set" class="button"/></td>
+		</tr>
+		</table>
+		</div>
+		</div>
+		<div id="footer">
+			<div style="float:left;">Copyright 2008, WSO2 Inc.</div>
+			<div style="margin-left:432px;float:left;">Powered by 
+            <img align="top" src="/trader/images/powered-by-logo.gif" style="margin-top:-3px; margin-left: 0px;"/></div>
+	</div>
+
+		</div>
+		</form>
+	</body>
+</html>
+
+E

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_confirmation
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_confirmation?rev=720802&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_confirmation (added)
+++ incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_confirmation Wed Nov 26 02:55:38 2008
@@ -0,0 +1,158 @@
+#!/usr/bin/perl
+
+# 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.
+
+use CGI qw/:standard/;
+use WSO2::WSF;
+use XML::Twig;
+
+my $q = new CGI;
+
+$username = $q->cookie('username');
+if(!$username) {
+    #print redirect('/cgi-bin/trader_login');
+}
+
+print $q->header();
+
+
+
+if ($q->param('SELL'))
+{
+    $isSell = $q->param('SELL');
+    $holdingID = $q->param('HOLDINGID');
+    $quantity = $q->param('QUANTITY');
+    $symbol = $q->param('SYMBOL');
+}
+elsif ($q->param('BUY'))
+{
+    $quantity = $q->param('QUANTITY');
+    $symbol = $q->param('SYMBOL');
+    $price = $q->param('PRICE');
+    $isBuy = $q->param('BUY');
+}
+else
+{
+    print ("This is not buy or sell.");
+}
+
+print <<E;
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
+		<meta name="generator" content="Adobe GoLive" />
+		<title>WSF/PHP StockTrader Welcome</title>
+		<link href="/trader/style.css" rel="stylesheet" type="text/css" media="all" />
+	</head>
+
+	<body>
+		<div id="content">
+			<div id="header">
+			    <div class="logo"><img src="/trader/images/logo.gif"></div>
+			</div>
+			<div id="header-links">
+				<table>
+					<tr>
+					<td>
+						<a href="/cgi-bin/trader">Welcome</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_home">Home</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_account">Account</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_portfolio">Portfolio</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_quotes">Quotes/Trade</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_glossary">Glossary</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_config">Config</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_login">Login/Logout</a>
+					</td>
+					</tr>
+				</table>
+			</div>
+			<div id="middle">
+				<div class="main-title">
+					<h1>Trade</h1>
+					<script type=\"text/javascript\">
+						var thisdate = new Date();
+						document.writeln(thisdate.toLocaleString());
+					</script>
+				</div>
+				
+				<div id="confirm">
+				<h2>Trade Confirmation</h2>
+				<div class="confirm-content">
+					<form action="/cgi-bin/trader_quotes" method="post">
+E
+
+						if ($isSell)
+						{
+							print("<p>You have requested to sell all or part of your holding ${holdingID} 
+									This holding has a total of ${quantity} shares of stock ${symbol} 
+									Please indicate how many share to sell.</p>");
+
+							print("<nobr>Number of Shares: <input type=\"text\" name=\"QUANTITY\" value=\"${quantity}\" id=\"\" size=\"10\"/>");
+							print ("<input type=\"hidden\" name=\"HOLDINGID\" value=\"${holdingID}\"></input>");
+							print ("<input type=\"submit\" name=\"SELL\" value=\"Sell\" class=\"button\"/>");
+						}
+						elsif ($isBuy)
+						{
+							print("<nobr>Number of Shares: <input type=\"text\" name=\"QUANTITY\" value=\"${quantity}\" id=\"\" size=\"10\"/>");
+							print("<p>You have requested to buy shares of ${symbol} which is currently trading at \$${price}</p>");
+							print ("<input type=\"hidden\" name=\"SYMBOL\" value=\"${symbol}\"></input>");
+							print ("<input type=\"submit\" name=\"BUY\" value=\"Buy\" class=\"button\"/>");
+						}
+						else
+						{
+						}
+						print ("<input type=\"submit\" name = \"CANCEL\" value=\"Cancel\" class=\"button\"/></nobr>");
+
+print <<E;
+					</form>
+				</div>
+				</div>
+				
+			<div class="bottom">
+			<form method = "post"  action = "/cgi-bin/trader_quotes">
+			<input type="text" value="${symbol}" name="SYMBOLS" size="25"/>
+			<input type="submit" value="Get Quote" name="GETQUOTE" class="button"/>
+			</form>
+			</div>
+			</div>
+			<div id="footer">
+				<div style="float:left;">Copyright 2008, WSO2 Inc.</div>
+				<div style="margin-left:432px;float:left;">Powered by 
+                <img align="top" src="/trader/images/powered-by-logo.gif" style="margin-top:-3px; margin-left: 0px;"/></div>
+			</div>
+		</div>
+	</body>
+
+</html>
+E
+

Added: incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_glossary
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_glossary?rev=720802&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_glossary (added)
+++ incubator/stonehenge/contrib/stocktrader/perl/trader_client/trader_glossary Wed Nov 26 02:55:38 2008
@@ -0,0 +1,232 @@
+#!/usr/bin/perl
+
+# 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.
+
+use CGI qw/:standard/;
+use WSO2::WSF;
+
+my $q = new CGI;
+
+print $q->header();
+
+print <<HTML_CODE;
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+	<head>
+		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
+		<meta name="generator" content="Adobe GoLive" />
+		<title>WSF/PHP StockTrader Welcome</title>
+		<link href="/trader/style.css" rel="stylesheet" type="text/css" media="all" />
+	</head>
+
+	<body>
+		<div id="content">
+			<div id="header">
+			    <div class="logo"><img src="/trader/images/logo.gif"></div>
+			</div>
+			<div id="header-links">
+				<table>
+					<tr>
+					<td>
+						<a href="/cgi-bin/trader">Welcome</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_home">Home</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_account">Account</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_portfolio">Portfolio</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_quotes">Quotes/Trade</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_glossary">Glossary</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_config">Config</a>
+					</td>
+					<td>
+						<a href="/cgi-bin/trader_login">Login/Logout</a>
+					</td>
+					</tr>
+				</table>
+			</div>
+			<div id="middle">
+				<div class="main-title">
+					<h1>Glossary</h1>
+					<script type="text/javascript">
+						var thisdate = new Date();
+						document.writeln(thisdate.toLocaleString());
+					</script>
+				</div>
+				<table align="center" class="glossary" >
+					<thead>
+						<tr>
+							<th>Term</th>
+							<th>Description</th>
+						</tr>
+					</thead>
+					<tbody>
+						<tr>
+							<td class="left">Account ID</td>
+							<td>A unique Integer based key. Each user is assigned an account ID at account creation time.</td>
+						</tr>
+						<tr>
+							<td class="left">Account Created</td>
+							<td>The time and date the users account was first created.</td>
+						</tr>
+						<tr>
+							<td class="left">Cash Balance</td>
+							<td>The current cash balance in the users account. This does not include current stock holdings.</td>
+						</tr>
+							<td class="left">Company</td>
+							<td>The full company name for an individual stock.</td>
+						</tr>
+							<td class="left">Current Gain/Loss</td>
+							<td>The total gain or loss of this account, computed by substracting the current sum of cash/holdings minus the opening account balance.</td>
+						</tr>
+							<td class="left">Current Price</td>
+							<td>The current trading price for a given stock symbol.</td>
+						</tr>
+							<td class="left">Gain/Loss</td>
+							<td>The current gain or loss of an individual stock holding, computed as (current market value - holding basis).</td>
+						</tr>
+						</tr>
+							<td class="left">Last Login</td>
+							<td>The date and time this user last logged in to Trade.</td>
+						</tr>
+						</tr>
+							<td class="left">Market Value</td>
+							<td>The current total value of a stock holding, computed as (quantity * current price).</td>
+						</tr>
+						</tr>
+							<td class="left">Number of Holdings</td>
+							<td>The total number of stocks currently owned by this account.</td>
+						</tr>
+						</tr>
+							<td class="left">Open Price</td>
+							<td>The price of a given stock at the open of the trading session.</td>
+						</tr>
+						</tr>
+							<td class="left">Order ID</td>
+							<td>A unique Integer based key. Each order is assigned an order ID at order creation time.</td>
+						</tr>
+						</tr>
+							<td class="left">Opening Balance</td>
+							<td>The initial cash balance in this account when it was opened.</td>
+						</tr>
+						</tr>
+							<td class="left">Order Status</td>
+							<td>orders are opened, processed, closed and completed. Order status shows the current stat for this order.</td>
+						</tr>
+						</tr>
+							<td class="left">Price Range</td>
+							<td>The low and high prices for this stock during the current trading session</td>
+						</tr>
+						</tr>
+							<td class="left">Purchase Date</td>
+							<td>The date and time the a stock was purchased.</td>
+						</tr>
+						</tr>
+							<td class="left">Purchase Price</td>
+							<td>The price used when purchasing the stock.</td>
+						</tr>
+						</tr>
+							<td class="left">Purchase Basis</td>
+							<td>The total cost to purchase this holding. This is computed as (quantity * purchase price).</td>
+						</tr>
+						</tr>
+							<td class="left">Quantity</td>
+							<td>The number of stock shares in the order or user holding.</td>
+						</tr>
+						</tr>
+							<td class="left">Session Created</td>
+							<td>An HTTP session is created for each user at during login. Session created shows the time and day when the session was created.</td>
+						</tr>
+						</tr>
+							<td class="left">Sum of Cash/Holdings</td>
+							<td>The total current value of this account. This is the sum of the cash balance along with the value of current stock holdings.</td>
+						</tr>
+						</tr>
+							<td class="left">Symbol</td>
+							<td>The symbol for a Trade stock.</td>
+						</tr>
+						</tr>
+							<td class="left">Total Logins</td>
+							<td>The total number of logins performed by this user.</td>
+						</tr>
+						</tr>
+							<td class="left">Total Logouts</td>
+							<td>The total number of logouts performed by this user.</td>
+						</tr>
+						</tr>
+							<td class="left">Total of Holdings</td>
+							<td>The current total value of all stock holdings in this account given the current valuation of each stock held.</td>
+						</tr>
+						</tr>
+							<td class="left">Top gainers</td>
+							<td>The list of stocks (matching LIKE CLAUSE 's:1__%' per WebSphere Trade 6.1 behavior) gaining the most in price during the current trading session.</td>
+						</tr>
+						</tr>
+							<td class="left">Top Losers</td>
+							<td>The list of stocks (matching LIKE CLAUSE 's:1__%' per WebSphere Trade 6.1 behavior) falling the most in price during the current trading session.</td>
+						</tr>
+						</tr>
+							<td class="left">Trader Stock Index (TSIA)</td>
+							<td>A computed index of the top 20 stocks (matching LIKE CLAUSE 's:1__%' per WebSphere Trade 6.1 behavior) in Trade.</td>
+						</tr>
+						</tr>
+							<td class="left">Trading Volume</td>
+							<td>The total number of shares traded for stocks (matching LIKE CLAUSE 's:1__%' per WebSphere Trade 6.1 behavior) during this trading session.</td>
+						</tr>
+						</tr>
+							<td class="left">Txn Fee</td>
+							<td>The fee charged by the brokerage to process this order.</td>
+						</tr>
+						</tr>
+							<td class="left">Type</td>
+							<td>The order type (buy or sell).</td>
+						</tr>
+						</tr>
+							<td class="left">User ID</td>
+							<td>The unique user ID for the account chosen by the user at account registration.</td>
+						</tr>
+						</tr>
+							<td class="left">Volume</td>
+							<td>The total number of shares traded for this stock.</td>
+						</tr>
+					</tbody>
+				</table>
+								
+				
+				
+			
+			</div>
+			<div id="footer">
+				<div style="float:left;">Copyright 2008, WSO2 Inc.</div>
+				<div style="margin-left:432px;float:left;">Powered by 
+                <img align="top" src="/trader/images/powered-by-logo.gif" style="margin-top:-3px; margin-left: 0px;"/></div>
+			</div>
+		</div>
+	</body>
+
+</html>
+HTML_CODE